{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../../../../../../../../packages/core/src/util/decorators.ts","webpack:///../../../../../../packages/core/src/di/metadata.ts","webpack:///../../../../../../../../../packages/core/src/di/interface/injector.ts","webpack:///../../../../../../../../packages/core/src/util/property.ts","webpack:///../../../../../../../../../packages/core/src/di/interface/defs.ts","webpack:///../../../../../../../../packages/core/src/util/stringify.ts","webpack:///../../../../../../packages/core/src/di/forward_ref.ts","webpack:///../../../../../../../../packages/core/src/util/global.ts","webpack:///../../../../../../../../packages/core/src/compiler/compiler_facade_interface.ts","webpack:///../../../../../../../../packages/core/src/compiler/compiler_facade.ts","webpack:///../../../../../../packages/core/src/di/injection_token.ts","webpack:///../../../../../../packages/core/src/di/injector_compatibility.ts","webpack:///../../../../../../packages/core/src/di/jit/environment.ts","webpack:///../../../../../../packages/core/src/linker/ng_module_factory.ts","webpack:///../../../../../../../../packages/core/src/util/ng_dev_mode.ts","webpack:///../../../../../../packages/core/src/change_detection/constants.ts","webpack:///../../../../../../packages/core/src/metadata/view.ts","webpack:///../../../../../../../../packages/core/src/util/array_utils.ts","webpack:///../../../../../../../../packages/core/src/util/assert.ts","webpack:///../../../../../../../../packages/core/src/util/closure.ts","webpack:///../../../../../../packages/core/src/render3/empty.ts","webpack:///../../../../../../packages/core/src/render3/fields.ts","webpack:///../../../../../../packages/core/src/render3/definition.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/type_checks.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/container.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/view.ts","webpack:///../../../../../../packages/core/src/render3/assert.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/injector.ts","webpack:///../../../../../../packages/core/src/render3/node_assert.ts","webpack:///../../../../../../packages/core/src/render3/hooks.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/state.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/context.ts","webpack:///../../../../../../packages/core/src/render3/state.ts","webpack:///../../../../../../packages/core/src/render3/util/view_utils.ts","webpack:///../../../../../../packages/core/src/render3/util/misc_utils.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/util.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/renderer.ts","webpack:///../../../../../../packages/core/src/render3/util/attrs_utils.ts","webpack:///../../../../../../packages/core/src/render3/util/injector_utils.ts","webpack:///../../../../../../packages/core/src/render3/util/view_traversal_utils.ts","webpack:///../../../../../../packages/core/src/render3/di.ts","webpack:///../../../../../../packages/core/src/errors.ts","webpack:///../../../../../../packages/core/src/error_handler.ts","webpack:///../../../../../../packages/core/src/metadata/schema.ts","webpack:///../../../../../../packages/core/src/sanitization/bypass.ts","webpack:///../../../../../../../../packages/core/src/util/is_dev_mode.ts","webpack:///../../../../../../packages/core/src/sanitization/inert_body.ts","webpack:///../../../../../../packages/core/src/sanitization/url_sanitizer.ts","webpack:///../../../../../../packages/core/src/sanitization/html_sanitizer.ts","webpack:///../../../../../../packages/core/src/sanitization/security.ts","webpack:///../../../../../../packages/core/src/sanitization/style_sanitizer.ts","webpack:///../../../../../../packages/core/src/sanitization/sanitization.ts","webpack:///../../../../../../../../packages/core/src/util/named_array_type.ts","webpack:///../../../../../../../../packages/core/src/util/ng_reflect.ts","webpack:///../../../../../../packages/core/src/render3/context_discovery.ts","webpack:///../../../../../../packages/core/src/render3/errors.ts","webpack:///../../../../../../packages/core/src/render3/node_selector_matcher.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/bindings.ts","webpack:///../../../../../../packages/core/src/render3/tokens.ts","webpack:///../../../../../../packages/core/src/render3/interfaces/i18n.ts","webpack:///../../../../../../packages/core/src/render3/util/debug_utils.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/map_based_bindings.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/styling_debug.ts","webpack:///../../../../../../packages/core/src/render3/instructions/lview_debug.ts","webpack:///../../../../../../packages/core/src/render3/instructions/select.ts","webpack:///../../../../../../packages/core/src/render3/instructions/shared.ts","webpack:///../../../../../../packages/core/src/render3/node_manipulation.ts","webpack:///../../../../../../packages/core/src/render3/view_ref.ts","webpack:///../../../../../../packages/core/src/render3/view_engine_compatibility.ts","webpack:///../../../../../../packages/core/src/render3/node_util.ts","webpack:///../../../../../../packages/core/src/change_detection/change_detector_ref.ts","webpack:///../../../../../../../../packages/core/src/interface/type.ts","webpack:///../../../../../../../../packages/core/src/reflection/reflection_capabilities.ts","webpack:///../../../../../../packages/core/src/di/jit/util.ts","webpack:///../../../../../../packages/core/src/di/jit/injectable.ts","webpack:///../../../../../../packages/core/src/di/util.ts","webpack:///../../../../../../packages/core/src/di/injectable.ts","webpack:///../../../../../../packages/core/src/di/scope.ts","webpack:///../../../../../../packages/core/src/di/r3_injector.ts","webpack:///../../../../../../packages/core/src/di/injector.ts","webpack:///../../../../../../packages/core/src/di/reflective_errors.ts","webpack:///../../../../../../../../packages/core/src/util/errors.ts","webpack:///../../../../../../packages/core/src/di/reflective_key.ts","webpack:///../../../../../../../../packages/core/src/reflection/reflection.ts","webpack:///../../../../../../../../packages/core/src/reflection/reflector.ts","webpack:///../../../../../../packages/core/src/di/reflective_provider.ts","webpack:///../../../../../../packages/core/src/di/reflective_injector.ts","webpack:///../../../../../../packages/core/src/metadata/di.ts","webpack:///../../../../../../packages/core/src/metadata/resource_loading.ts","webpack:///../../../../../../packages/core/src/render3/instructions/alloc_host_vars.ts","webpack:///../../../../../../../../packages/core/src/util/symbol.ts","webpack:///../../../../../../../../packages/core/src/util/comparison.ts","webpack:///../../../../../../packages/core/src/change_detection/change_detection_util.ts","webpack:///../../../../../../packages/core/src/render3/bindings.ts","webpack:///../../../../../../packages/core/src/render3/instructions/property.ts","webpack:///../../../../../../packages/core/src/render3/instructions/attribute.ts","webpack:///../../../../../../packages/core/src/render3/instructions/interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/attribute_interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/change_detection.ts","webpack:///../../../../../../packages/core/src/render3/instructions/container.ts","webpack:///../../../../../../packages/core/src/render3/instructions/storage.ts","webpack:///../../../../../../packages/core/src/render3/instructions/di.ts","webpack:///../../../../../../packages/core/src/render3/styling_next/instructions.ts","webpack:///../../../../../../packages/core/src/render3/instructions/element.ts","webpack:///../../../../../../packages/core/src/render3/instructions/element_container.ts","webpack:///../../../../../../packages/core/src/render3/instructions/embedded_view.ts","webpack:///../../../../../../packages/core/src/render3/instructions/get_current_view.ts","webpack:///../../../../../../../../packages/core/src/util/lang.ts","webpack:///../../../../../../packages/core/src/render3/instructions/listener.ts","webpack:///../../../../../../packages/core/src/render3/instructions/next_context.ts","webpack:///../../../../../../packages/core/src/render3/instructions/projection.ts","webpack:///../../../../../../packages/core/src/render3/instructions/property_interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/text.ts","webpack:///../../../../../../packages/core/src/render3/instructions/text_interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/class_map_interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/style_prop_interpolation.ts","webpack:///../../../../../../packages/core/src/render3/instructions/host_property.ts","webpack:///../../../../../../packages/core/src/render3/util/discovery_utils.ts","webpack:///../../../../../../packages/core/src/render3/util/global_utils.ts","webpack:///../../../../../../packages/core/src/render3/component.ts","webpack:///../../../../../../../../packages/core/src/interface/simple_change.ts","webpack:///../../../../../../packages/core/src/render3/features/ng_onchanges_feature.ts","webpack:///../../../../../../packages/core/src/render3/features/inherit_definition_feature.ts","webpack:///../../../../../../packages/core/src/render3/di_setup.ts","webpack:///../../../../../../packages/core/src/render3/features/providers_feature.ts","webpack:///../../../../../../packages/core/src/linker/component_factory.ts","webpack:///../../../../../../packages/core/src/linker/component_factory_resolver.ts","webpack:///../../../../../../../../packages/core/src/util/noop.ts","webpack:///../../../../../../packages/core/src/linker/element_ref.ts","webpack:///../../../../../../packages/core/src/render/api.ts","webpack:///../../../../../../packages/core/src/version.ts","webpack:///../../../../../../packages/core/src/change_detection/differs/default_iterable_differ.ts","webpack:///../../../../../../packages/core/src/change_detection/differs/default_keyvalue_differ.ts","webpack:///../../../../../../packages/core/src/change_detection/differs/iterable_differs.ts","webpack:///../../../../../../packages/core/src/change_detection/differs/keyvalue_differs.ts","webpack:///../../../../../../packages/core/src/change_detection/change_detection.ts","webpack:///../../../../../../packages/core/src/linker/template_ref.ts","webpack:///../../../../../../packages/core/src/linker/view_container_ref.ts","webpack:///../../../../../../packages/core/src/view/errors.ts","webpack:///../../../../../../packages/core/src/view/types.ts","webpack:///../../../../../../packages/core/src/view/util.ts","webpack:///../../../../../../packages/core/src/view/ng_module.ts","webpack:///../../../../../../packages/core/src/view/view_attach.ts","webpack:///../../../../../../packages/core/src/view/refs.ts","webpack:///../../../../../../packages/core/src/view/provider.ts","webpack:///../../../../../../packages/core/src/render3/component_ref.ts","webpack:///../../../../../../../../packages/core/src/util/ng_i18n_closure_mode.ts","webpack:///../../../../../../packages/core/src/i18n/locale_data.ts","webpack:///../../../../../../packages/core/src/i18n/locale_en.ts","webpack:///../../../../../../packages/core/src/i18n/locale_data_api.ts","webpack:///../../../../../../packages/core/src/i18n/localization.ts","webpack:///../../../../../../packages/core/src/render3/i18n.ts","webpack:///../../../../../../packages/core/src/linker/ng_module_factory_registration.ts","webpack:///../../../../../../packages/core/src/render3/ng_module_ref.ts","webpack:///../../../../../../packages/core/src/render3/metadata.ts","webpack:///../../../../../../packages/core/src/render3/pure_function.ts","webpack:///../../../../../../packages/core/src/render3/pipe.ts","webpack:///../../../../../../packages/core/src/event_emitter.ts","webpack:///../../../../../../packages/core/src/linker/query_list.ts","webpack:///../../../../../../packages/core/src/render3/query.ts","webpack:///../../../../../../packages/core/src/render3/view_engine_compatibility_prebound.ts","webpack:///../../../../../../packages/core/src/render3/jit/environment.ts","webpack:///../../../../../../packages/core/src/render3/jit/module.ts","webpack:///../../../../../../packages/core/src/render3/jit/directive.ts","webpack:///../../../../../../packages/core/src/render3/jit/pipe.ts","webpack:///../../../../../../packages/core/src/metadata/directives.ts","webpack:///../../../../../../packages/core/src/metadata/ng_module.ts","webpack:///../../../../../../packages/core/src/application_init.ts","webpack:///../../../../../../packages/core/src/application_tokens.ts","webpack:///../../../../../../packages/core/src/i18n/tokens.ts","webpack:///../../../../../../packages/core/src/console.ts","webpack:///../../../../../../packages/core/src/ivy_switch.ts","webpack:///../../../../../../packages/core/src/linker/compiler.ts","webpack:///../../../../../../packages/core/src/profile/wtf_impl.ts","webpack:///../../../../../../packages/core/src/profile/profile.ts","webpack:///../../../../../../../../packages/core/src/util/microtask.ts","webpack:///../../../../../../packages/core/src/zone/ng_zone.ts","webpack:///../../../../../../packages/core/src/testability/testability.ts","webpack:///../../../../../../packages/core/src/application_ref.ts","webpack:///../../../../../../packages/core/src/linker/ng_module_factory_loader.ts","webpack:///../../../../../../packages/core/src/linker/system_js_ng_module_factory_loader.ts","webpack:///../../../../../../packages/core/src/linker/view_ref.ts","webpack:///../../../../../../packages/core/src/debug/debug_node.ts","webpack:///../../../../../../packages/core/src/platform_core_providers.ts","webpack:///../../../../../../packages/core/src/application_module.ts","webpack:///../../../../../../packages/core/src/view/view.ts","webpack:///../../../../../../packages/core/src/view/element.ts","webpack:///../../../../../../packages/core/src/view/query.ts","webpack:///../../../../../../packages/core/src/view/ng_content.ts","webpack:///../../../../../../packages/core/src/view/pure_expression.ts","webpack:///../../../../../../packages/core/src/view/text.ts","webpack:///../../../../../../packages/core/src/view/services.ts","webpack:///../../../../../../packages/core/src/view/entrypoint.ts","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/moment/moment.js","webpack:///ng://ngx-bootstrap/chronos/utils.ts","webpack:///ng://ngx-bootstrap/chronos/utils/type-checks.ts","webpack:///ng://ngx-bootstrap/chronos/units/aliases.ts","webpack:///ng://ngx-bootstrap/chronos/utils/zero-fill.ts","webpack:///ng://ngx-bootstrap/chronos/format/format.ts","webpack:///ng://ngx-bootstrap/chronos/create/date-from-array.ts","webpack:///ng://ngx-bootstrap/chronos/utils/date-getters.ts","webpack:///ng://ngx-bootstrap/chronos/parse/regex.ts","webpack:///ng://ngx-bootstrap/chronos/parse/token.ts","webpack:///ng://ngx-bootstrap/chronos/create/parsing-flags.ts","webpack:///ng://ngx-bootstrap/chronos/units/year.ts","webpack:///ng://ngx-bootstrap/chronos/units/month.ts","webpack:///ng://ngx-bootstrap/chronos/utils/date-setters.ts","webpack:///ng://ngx-bootstrap/chronos/create/clone.ts","webpack:///ng://ngx-bootstrap/chronos/utils/start-end-of.ts","webpack:///ng://ngx-bootstrap/chronos/units/day-of-week.ts","webpack:///ng://ngx-bootstrap/chronos/units/day-of-year.ts","webpack:///ng://ngx-bootstrap/chronos/units/week-calendar-utils.ts","webpack:///ng://ngx-bootstrap/chronos/locale/locale.class.ts","webpack:///ng://ngx-bootstrap/chronos/locale/calendar.ts","webpack:///ng://ngx-bootstrap/chronos/locale/locale.defaults.ts","webpack:///ng://ngx-bootstrap/chronos/utils/compare-arrays.ts","webpack:///ng://ngx-bootstrap/chronos/units/week.ts","webpack:///ng://ngx-bootstrap/chronos/units/week-year.ts","webpack:///ng://ngx-bootstrap/chronos/units/timestamp.ts","webpack:///ng://ngx-bootstrap/chronos/units/quarter.ts","webpack:///ng://ngx-bootstrap/chronos/units/constants.ts","webpack:///ng://ngx-bootstrap/chronos/units/offset.ts","webpack:///ng://ngx-bootstrap/chronos/units/hour.ts","webpack:///ng://ngx-bootstrap/chronos/locale/locales.ts","webpack:///ng://ngx-bootstrap/chronos/units/timezone.ts","webpack:///ng://ngx-bootstrap/chronos/units/second.ts","webpack:///ng://ngx-bootstrap/chronos/units/minute.ts","webpack:///ng://ngx-bootstrap/chronos/units/millisecond.ts","webpack:///ng://ngx-bootstrap/chronos/units/day-of-month.ts","webpack:///ng://ngx-bootstrap/chronos/duration/valid.ts","webpack:///ng://ngx-bootstrap/chronos/utils/abs-ceil.ts","webpack:///ng://ngx-bootstrap/chronos/duration/bubble.ts","webpack:///ng://ngx-bootstrap/chronos/duration/humanize.ts","webpack:///ng://ngx-bootstrap/chronos/duration/constructor.ts","webpack:///ng://ngx-bootstrap/chronos/create/valid.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-string.ts","webpack:///ng://ngx-bootstrap/chronos/format.ts","webpack:///ng://ngx-bootstrap/chronos/utils/defaults.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-array.ts","webpack:///ng://ngx-bootstrap/chronos/create/check-overflow.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-string-and-format.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-object.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-anything.ts","webpack:///ng://ngx-bootstrap/chronos/create/from-string-and-array.ts","webpack:///ng://ngx-bootstrap/chronos/create/local.ts","webpack:///ng://ngx-bootstrap/chronos/utils/abs-round.ts","webpack:///ng://ngx-bootstrap/chronos/utils/date-compare.ts","webpack:///ng://ngx-bootstrap/chronos/duration/create.ts","webpack:///ng://ngx-bootstrap/chronos/moment/add-subtract.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ar.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/bg.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ca.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/cs.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/da.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/de.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/en-gb.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/es-do.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/es.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/es-us.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/et.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/fi.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/fr.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/gl.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/he.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/hi.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/hu.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/id.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/it.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ja.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ko.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/lt.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/mn.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/nb.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/nl-be.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/nl.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/pl.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/pt-br.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ro.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/ru.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/sk.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/sl.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/sv.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/th.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/tr.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/vi.ts","webpack:///ng://ngx-bootstrap/chronos/i18n/zh-cn.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/tags.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/html_tags.ts","webpack:///../../../../../../packages/compiler/src/selector.ts","webpack:///../../../../../../packages/compiler/src/core.ts","webpack:///../../../../../../packages/compiler/src/output/output_ast.ts","webpack:///../../../../../../packages/compiler/src/util.ts","webpack:///../../../../../../packages/compiler/src/constant_pool.ts","webpack:///../../../../../../packages/compiler/src/identifiers.ts","webpack:///../../../../../../packages/compiler/src/aot/static_symbol.ts","webpack:///../../../../../../packages/compiler/src/compile_metadata.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_identifiers.ts","webpack:///../../../../../../packages/compiler/src/chars.ts","webpack:///../../../../../../packages/compiler/src/parse_util.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_ast.ts","webpack:///../../../../../../packages/compiler/src/i18n/i18n_ast.ts","webpack:///../../../../../../packages/compiler/src/i18n/digest.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/serializer.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/xml_helper.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/xmb.ts","webpack:///../../../../../../packages/compiler/src/output/map_util.ts","webpack:///../../../../../../packages/compiler/src/render3/view/i18n/util.ts","webpack:///../../../../../../packages/compiler/src/render3/view/util.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_factory.ts","webpack:///../../../../../../packages/compiler/src/render3/util.ts","webpack:///../../../../../../packages/compiler/src/assertions.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/interpolation_config.ts","webpack:///../../../../../../packages/compiler/src/output/source_map.ts","webpack:///../../../../../../packages/compiler/src/output/abstract_emitter.ts","webpack:///../../../../../../packages/compiler/src/output/abstract_js_emitter.ts","webpack:///../../../../../../packages/compiler/src/output/output_jit.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_jit.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_module_compiler.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_pipe_compiler.ts","webpack:///../../../../../../packages/compiler/src/expression_parser/ast.ts","webpack:///../../../../../../packages/compiler/src/compiler_util/expression_converter.ts","webpack:///../../../../../../packages/compiler/src/shadow_css.ts","webpack:///../../../../../../packages/compiler/src/style_compiler.ts","webpack:///../../../../../../packages/compiler/src/ast_path.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/ast.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/lexer.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/parser.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/html_parser.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/html_whitespaces.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/icu_ast_expander.ts","webpack:///../../../../../../packages/compiler/src/template_parser/template_ast.ts","webpack:///../../../../../../packages/compiler/src/provider_analyzer.ts","webpack:///../../../../../../packages/compiler/src/style_url_resolver.ts","webpack:///../../../../../../packages/compiler/src/template_parser/binding_parser.ts","webpack:///../../../../../../packages/compiler/src/template_parser/template_preparser.ts","webpack:///../../../../../../packages/compiler/src/template_parser/template_parser.ts","webpack:///../../../../../../packages/compiler/src/render3/view/style_parser.ts","webpack:///../../../../../../packages/compiler/src/render3/view/styling_builder.ts","webpack:///../../../../../../packages/compiler/src/expression_parser/lexer.ts","webpack:///../../../../../../packages/compiler/src/expression_parser/parser.ts","webpack:///../../../../../../packages/compiler/src/schema/dom_security_schema.ts","webpack:///../../../../../../packages/compiler/src/schema/element_schema_registry.ts","webpack:///../../../../../../packages/compiler/src/schema/dom_element_schema_registry.ts","webpack:///../../../../../../packages/compiler/src/render3/r3_template_transform.ts","webpack:///../../../../../../packages/compiler/src/render3/view/i18n/context.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/placeholder.ts","webpack:///../../../../../../packages/compiler/src/i18n/i18n_parser.ts","webpack:///../../../../../../packages/compiler/src/render3/view/i18n/meta.ts","webpack:///../../../../../../packages/compiler/src/render3/view/i18n/serializer.ts","webpack:///../../../../../../packages/compiler/src/render3/view/template.ts","webpack:///../../../../../../packages/compiler/src/render3/view/compiler.ts","webpack:///../../../../../../packages/compiler/src/resource_loader.ts","webpack:///../../../../../../packages/compiler/src/jit_compiler_facade.ts","webpack:///../../../../../../packages/compiler/src/injectable_compiler_2.ts","webpack:///../../../../../../packages/compiler/src/version.ts","webpack:///../../../../../../packages/compiler/src/config.ts","webpack:///../../../../../../packages/compiler/src/directive_normalizer.ts","webpack:///../../../../../../packages/compiler/src/directive_resolver.ts","webpack:///../../../../../../packages/compiler/src/i18n/parse_util.ts","webpack:///../../../../../../packages/compiler/src/i18n/extractor_merger.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/xml_tags.ts","webpack:///../../../../../../packages/compiler/src/ml_parser/xml_parser.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/xliff.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/xliff2.ts","webpack:///../../../../../../packages/compiler/src/i18n/serializers/xtb.ts","webpack:///../../../../../../packages/compiler/src/i18n/translation_bundle.ts","webpack:///../../../../../../packages/compiler/src/i18n/i18n_html_parser.ts","webpack:///../../../../../../packages/compiler/src/output/value_util.ts","webpack:///../../../../../../packages/compiler/src/injectable_compiler.ts","webpack:///../../../../../../packages/compiler/src/aot/util.ts","webpack:///../../../../../../packages/compiler/src/lifecycle_reflector.ts","webpack:///../../../../../../packages/compiler/src/metadata_resolver.ts","webpack:///../../../../../../packages/compiler/src/view_compiler/provider_compiler.ts","webpack:///../../../../../../packages/compiler/src/ng_module_compiler.ts","webpack:///../../../../../../packages/compiler/src/ng_module_resolver.ts","webpack:///../../../../../../packages/compiler/src/output/ts_emitter.ts","webpack:///../../../../../../packages/compiler/src/pipe_resolver.ts","webpack:///../../../../../../packages/compiler/src/view_compiler/type_check_compiler.ts","webpack:///../../../../../../packages/compiler/src/view_compiler/view_compiler.ts","webpack:///../../../../../../packages/compiler/src/i18n/message_bundle.ts","webpack:///../../../../../../packages/compiler/src/aot/generated_file.ts","webpack:///../../../../../../packages/compiler/src/aot/lazy_routes.ts","webpack:///../../../../../../packages/compiler/src/aot/static_symbol_resolver.ts","webpack:///../../../../../../packages/compiler/src/aot/summary_serializer.ts","webpack:///../../../../../../packages/compiler/src/aot/compiler.ts","webpack:///../../../../../../packages/compiler/src/aot/formatted_error.ts","webpack:///../../../../../../packages/compiler/src/aot/static_reflector.ts","webpack:///../../../../../../packages/compiler/src/aot/summary_resolver.ts","webpack:///../../../../../../packages/compiler/src/aot/compiler_factory.ts","webpack:///../../../../../../packages/compiler/src/summary_resolver.ts","webpack:///../../../../../../packages/compiler/src/output/output_interpreter.ts","webpack:///../../../../../../packages/compiler/src/jit/compiler.ts","webpack:///../../../../../../packages/compiler/src/compile_reflector.ts","webpack:///../../../../../../packages/compiler/src/url_resolver.ts","webpack:///../../../../../../packages/compiler/src/i18n/extractor.ts","webpack:///../../../../../../packages/compiler/src/render3/view/t2_binder.ts","webpack:///../../../../../../packages/compiler/src/compiler.ts","webpack:///./node_modules/rxjs/_esm5/internal/Subscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/Observable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/toSubscriber.js","webpack:///ng://ngx-bootstrap/utils/trigger.class.ts","webpack:///ng://ngx-bootstrap/utils/triggers.ts","webpack:///ng://ngx-bootstrap/utils/theme-provider.ts","webpack:///ng://ngx-bootstrap/utils/facade/browser.ts","webpack:///ng://ngx-bootstrap/utils/linked-list.class.ts","webpack:///ng://ngx-bootstrap/utils/decorators.ts","webpack:///ng://ngx-bootstrap/utils/utils.class.ts","webpack:///ng://ngx-bootstrap/utils/warn-once.ts","webpack:///./node_modules/rxjs/_esm5/internal/innerSubscribe.js","webpack:///../../../../../../packages/common/src/location/platform_location.ts","webpack:///../../../../../../packages/common/src/location/location_strategy.ts","webpack:///../../../../../../packages/common/src/location/location.ts","webpack:///../../../../../../packages/common/src/location/hash_location_strategy.ts","webpack:///../../../../../../packages/common/src/i18n/locale_data_api.ts","webpack:///../../../../../../packages/common/src/location/path_location_strategy.ts","webpack:///../../../../../../packages/common/src/i18n/currencies.ts","webpack:///../../../../../../packages/common/src/i18n/format_date.ts","webpack:///../../../../../../packages/common/src/i18n/format_number.ts","webpack:///../../../../../../packages/common/src/i18n/localization.ts","webpack:///../../../../../../packages/common/src/i18n/locale_data.ts","webpack:///../../../../../../packages/common/src/cookie.ts","webpack:///../../../../../../packages/common/src/directives/styling_differ.ts","webpack:///../../../../../../packages/common/src/directives/ng_class_impl.ts","webpack:///../../../../../../packages/common/src/directives/ng_class.ts","webpack:///../../../../../../packages/common/src/directives/ng_component_outlet.ts","webpack:///../../../../../../packages/common/src/directives/ng_for_of.ts","webpack:///../../../../../../packages/common/src/directives/ng_if.ts","webpack:///../../../../../../packages/common/src/directives/ng_switch.ts","webpack:///../../../../../../packages/common/src/directives/ng_plural.ts","webpack:///../../../../../../packages/common/src/directives/ng_style_impl.ts","webpack:///../../../../../../packages/common/src/directives/ng_style.ts","webpack:///../../../../../../packages/common/src/directives/ng_template_outlet.ts","webpack:///../../../../../../packages/common/src/directives/index.ts","webpack:///../../../../../../packages/common/src/pipes/invalid_pipe_argument_error.ts","webpack:///../../../../../../packages/common/src/pipes/deprecated/intl.ts","webpack:///../../../../../../packages/common/src/pipes/deprecated/date_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/deprecated/number_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/deprecated/index.ts","webpack:///../../../../../../packages/common/src/pipes/async_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/case_conversion_pipes.ts","webpack:///../../../../../../packages/common/src/pipes/date_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/i18n_plural_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/i18n_select_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/json_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/keyvalue_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/number_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/slice_pipe.ts","webpack:///../../../../../../packages/common/src/pipes/index.ts","webpack:///../../../../../../packages/common/src/common_module.ts","webpack:///../../../../../../packages/common/src/dom_tokens.ts","webpack:///../../../../../../packages/common/src/platform_id.ts","webpack:///../../../../../../packages/common/src/version.ts","webpack:///../../../../../../packages/common/src/viewport_scroller.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.js","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/framework/fluent-assign.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/framework/utils.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/framework/createComponent.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/errors.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/dialog-ref.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/tokens.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/vc-ref-store.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/overlay/overlay.directives.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/components/base-dynamic-component.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/components/css-backdrop.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/components/css-dialog-container.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/overlay/overlay.component.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/dialog-ref-stack.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/overlay/overlay.service.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/providers/dom-modal-renderer.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/providers/modal.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/providers/outside-event-plugin.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/overlay-context.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/modal-context.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/models/modal-open-context.ts","webpack:///ng://ngx-modialog/projects/ngx-modialog/src/lib/ngx-modialog.module.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./src/app/services/http_client.ts","webpack:///../../../../../../packages/animations/src/animation_builder.ts","webpack:///../../../../../../packages/animations/src/animation_metadata.ts","webpack:///../../../../../../packages/animations/src/util.ts","webpack:///../../../../../../packages/animations/src/players/animation_player.ts","webpack:///../../../../../../packages/animations/src/players/animation_group_player.ts","webpack:///../../../../../../packages/animations/src/private_export.ts","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscription.js","webpack:///./node_modules/rxjs/_esm5/internal/Subject.js","webpack:///./src/app/services/localization/cm-translate.service.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/modal-context.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/modal-container.component.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/message-modal.component.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/presets/message-modal-preset.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/presets/one-button-preset.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/presets/two-button-preset.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/modal.ts","webpack:///ng://ngx-modialog/plugins/bootstrap/projects/plugins/bootstrap/src/lib/bootstrap.module.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/from.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///../../../../../../packages/router/src/events.ts","webpack:///../../../../../../packages/router/src/components/empty_outlet.ts","webpack:///../../../../../../packages/router/src/shared.ts","webpack:///../../../../../../packages/router/src/config.ts","webpack:///../../../../../../packages/router/src/utils/collection.ts","webpack:///../../../../../../packages/router/src/url_tree.ts","webpack:///../../../../../../packages/router/src/utils/tree.ts","webpack:///../../../../../../packages/router/src/router_state.ts","webpack:///../../../../../../packages/router/src/create_router_state.ts","webpack:///../../../../../../packages/router/src/create_url_tree.ts","webpack:///../../../../../../packages/router/src/operators/activate_routes.ts","webpack:///../../../../../../packages/router/src/utils/type_guards.ts","webpack:///../../../../../../packages/router/src/apply_redirects.ts","webpack:///../../../../../../packages/router/src/operators/apply_redirects.ts","webpack:///../../../../../../packages/router/src/utils/preactivation.ts","webpack:///../../../../../../packages/router/src/operators/prioritized_guard_value.ts","webpack:///../../../../../../packages/router/src/operators/check_guards.ts","webpack:///../../../../../../packages/router/src/recognize.ts","webpack:///../../../../../../packages/router/src/operators/recognize.ts","webpack:///../../../../../../packages/router/src/operators/resolve_data.ts","webpack:///../../../../../../packages/router/src/operators/switch_tap.ts","webpack:///../../../../../../packages/router/src/route_reuse_strategy.ts","webpack:///../../../../../../packages/router/src/router_config_loader.ts","webpack:///../../../../../../packages/router/src/url_handling_strategy.ts","webpack:///../../../../../../packages/router/src/router.ts","webpack:///../../../../../../packages/router/src/directives/router_link.ts","webpack:///../../../../../../packages/router/src/directives/router_link_active.ts","webpack:///../../../../../../packages/router/src/router_outlet_context.ts","webpack:///../../../../../../packages/router/src/directives/router_outlet.ts","webpack:///../../../../../../packages/router/src/router_preloader.ts","webpack:///../../../../../../packages/router/src/router_scroller.ts","webpack:///../../../../../../packages/router/src/router_module.ts","webpack:///../../../../../../packages/router/src/version.ts","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArray.js","webpack:///./src/app/shared/tabTitle.ts","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/generate.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/iif.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/interval.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/pairs.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/partition.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/range.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/using.js","webpack:///ng://ngx-bootstrap/component-loader/bs-component-ref.class.ts","webpack:///ng://ngx-bootstrap/component-loader/content-ref.class.ts","webpack:///ng://ngx-bootstrap/component-loader/component-loader.class.ts","webpack:///ng://ngx-bootstrap/component-loader/component-loader.factory.ts","webpack:///../../../../../../packages/forms/src/directives/control_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/checkbox_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/default_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/abstract_control_directive.ts","webpack:///../../../../../../packages/forms/src/directives/control_container.ts","webpack:///../../../../../../packages/forms/src/directives/ng_control.ts","webpack:///../../../../../../packages/forms/src/directives/ng_control_status.ts","webpack:///../../../../../../packages/forms/src/validators.ts","webpack:///../../../../../../packages/forms/src/directives/normalize_validator.ts","webpack:///../../../../../../packages/forms/src/directives/number_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/radio_control_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/range_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/error_examples.ts","webpack:///../../../../../../packages/forms/src/directives/reactive_errors.ts","webpack:///../../../../../../packages/forms/src/directives/select_control_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/select_multiple_control_value_accessor.ts","webpack:///../../../../../../packages/forms/src/directives/shared.ts","webpack:///../../../../../../packages/forms/src/model.ts","webpack:///../../../../../../packages/forms/src/directives/ng_form.ts","webpack:///../../../../../../packages/forms/src/directives/template_driven_errors.ts","webpack:///../../../../../../packages/forms/src/directives/ng_form_selector_warning.ts","webpack:///../../../../../../packages/forms/src/directives/abstract_form_group_directive.ts","webpack:///../../../../../../packages/forms/src/directives/ng_model_group.ts","webpack:///../../../../../../packages/forms/src/directives/ng_model.ts","webpack:///../../../../../../packages/forms/src/directives/ng_no_validate_directive.ts","webpack:///../../../../../../packages/forms/src/directives/reactive_directives/form_control_directive.ts","webpack:///../../../../../../packages/forms/src/directives/reactive_directives/form_group_directive.ts","webpack:///../../../../../../packages/forms/src/directives/reactive_directives/form_group_name.ts","webpack:///../../../../../../packages/forms/src/directives/reactive_directives/form_control_name.ts","webpack:///../../../../../../packages/forms/src/directives/validators.ts","webpack:///../../../../../../packages/forms/src/directives.ts","webpack:///../../../../../../packages/forms/src/form_builder.ts","webpack:///../../../../../../packages/forms/src/version.ts","webpack:///../../../../../../packages/forms/src/form_providers.ts","webpack:///./src/app/services/guards/cm-guard.service.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///ng://ngx-bootstrap/positioning/utils/getStyleComputedProperty.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getParentNode.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getScrollParent.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isBrowser.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isIE.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOffsetParent.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getRoot.ts","webpack:///ng://ngx-bootstrap/positioning/utils/findCommonOffsetParent.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isOffsetContainer.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getBordersSize.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getWindowSizes.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getScroll.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getClientRect.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getBoundingClientRect.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOffsetRectRelativeToArbitraryNode.ts","webpack:///ng://ngx-bootstrap/positioning/utils/includeScroll.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getFixedPositionOffsetParent.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getBoundaries.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getViewportOffsetRectRelativeToArtbitraryNode.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isFixed.ts","webpack:///ng://ngx-bootstrap/positioning/utils/computeAutoPlacement.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOuterSizes.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getReferenceOffsets.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getTargetOffsets.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOppositePlacement.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isModifierEnabled.ts","webpack:///ng://ngx-bootstrap/positioning/utils/setStyles.ts","webpack:///ng://ngx-bootstrap/positioning/utils/isNumeric.ts","webpack:///ng://ngx-bootstrap/positioning/modifiers/arrow.ts","webpack:///ng://ngx-bootstrap/positioning/modifiers/flip.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOppositeVariation.ts","webpack:///ng://ngx-bootstrap/positioning/modifiers/preventOverflow.ts","webpack:///ng://ngx-bootstrap/positioning/modifiers/shift.ts","webpack:///ng://ngx-bootstrap/positioning/ng-positioning.ts","webpack:///ng://ngx-bootstrap/positioning/modifiers/initData.ts","webpack:///ng://ngx-bootstrap/positioning/utils/getOffsets.ts","webpack:///ng://ngx-bootstrap/positioning/utils/updateContainerClass.ts","webpack:///ng://ngx-bootstrap/positioning/positioning.service.ts","webpack:///./node_modules/rxjs/_esm5/internal/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMap.js","webpack:///./src/app/services/cm-data.service.ts","webpack:///./node_modules/rxjs/_esm5/internal/BehaviorSubject.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMap.js","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker.config.ts","webpack:///ng://ngx-bootstrap/datepicker/base/bs-datepicker-container.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/bs-datepicker.actions.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-locale.service.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/bs-datepicker.effects.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/bs-datepicker.state.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/_defaults.ts","webpack:///ng://ngx-bootstrap/datepicker/utils/bs-calendar-utils.ts","webpack:///ng://ngx-bootstrap/datepicker/utils/matrix-utils.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/calc-days-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/format-days-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/flag-days-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/view-mode.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/format-months-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/format-years-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/bs-datepicker.reducer.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/flag-months-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/engine/flag-years-calendar.ts","webpack:///ng://ngx-bootstrap/datepicker/reducer/bs-datepicker.store.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-datepicker-container.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker-inline.config.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-datepicker-inline-container.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker-inline.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker-input.directive.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-daterangepicker.config.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-daterangepicker-container.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-daterangepicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-daterangepicker-input.directive.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-calendar-layout.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-current-date-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-custom-dates-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-datepicker-day-decorator.directive.ts","webpack:///ng://ngx-bootstrap/datepicker/models/index.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-datepicker-navigation-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-days-calendar-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-months-calendar-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-timepicker-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/themes/bs/bs-years-calendar-view.component.ts","webpack:///ng://ngx-bootstrap/datepicker/bs-datepicker.module.ts","webpack:///ng://ngx-bootstrap/datepicker/date-formatter.ts","webpack:///ng://ngx-bootstrap/datepicker/datepicker-inner.component.ts","webpack:///ng://ngx-bootstrap/datepicker/datepicker.config.ts","webpack:///ng://ngx-bootstrap/datepicker/datepicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/daypicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/monthpicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/yearpicker.component.ts","webpack:///ng://ngx-bootstrap/datepicker/datepicker.module.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/audit.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/auditTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/buffer.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferCount.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/combineAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/count.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/debounce.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isDate.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delayWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/dematerialize.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinct.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/elementAt.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/endWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/exhaust.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/expand.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/find.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/findIndex.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/isEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/materialize.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/max.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeScan.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/min.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pairwise.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/partition.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publish.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishLast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/race.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/repeat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/retry.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/retryWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sampleTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/single.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipLast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipUntil.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipWhile.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeWhile.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttleTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeInterval.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeout.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timestamp.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/window.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowCount.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowToggle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/zip.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/zipAll.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js","webpack:///./node_modules/rxjs/_esm5/internal/config.js","webpack:///./node_modules/rxjs/_esm5/internal/util/identity.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/multicast.js","webpack:///./node_modules/rxjs/_esm5/internal/OuterSubscriber.js","webpack:///../../../../../../packages/platform-browser/src/dom/dom_adapter.ts","webpack:///../../../../../../packages/platform-browser/src/browser/browser_adapter.ts","webpack:///../../../../../../packages/platform-browser/src/browser/generic_browser_adapter.ts","webpack:///../../../../../../packages/platform-browser/src/browser/location/history.ts","webpack:///../../../../../../packages/platform-browser/src/browser/location/browser_platform_location.ts","webpack:///../../../../../../packages/platform-browser/src/browser/server-transition.ts","webpack:///../../../../../../packages/platform-browser/src/browser/testability.ts","webpack:///../../../../../../packages/platform-browser/src/dom/util.ts","webpack:///../../../../../../packages/platform-browser/src/dom/debug/ng_probe.ts","webpack:///../../../../../../packages/platform-browser/src/dom/events/event_manager.ts","webpack:///../../../../../../packages/platform-browser/src/dom/shared_styles_host.ts","webpack:///../../../../../../packages/platform-browser/src/dom/dom_renderer.ts","webpack:///../../../../../../packages/platform-browser/src/dom/events/dom_events.ts","webpack:///../../../../../../packages/platform-browser/src/dom/events/hammer_gestures.ts","webpack:///../../../../../../packages/platform-browser/src/dom/events/key_events.ts","webpack:///../../../../../../packages/platform-browser/src/security/dom_sanitization_service.ts","webpack:///../../../../../../packages/platform-browser/src/browser.ts","webpack:///../../../../../../packages/platform-browser/src/browser/meta.ts","webpack:///../../../../../../packages/platform-browser/src/browser/title.ts","webpack:///../../../../../../packages/platform-browser/src/browser/tools/browser.ts","webpack:///../../../../../../packages/platform-browser/src/browser/tools/common_tools.ts","webpack:///../../../../../../packages/platform-browser/src/browser/tools/tools.ts","webpack:///../../../../../../packages/platform-browser/src/browser/transfer_state.ts","webpack:///../../../../../../packages/platform-browser/src/dom/debug/by.ts","webpack:///../../../../../../packages/platform-browser/src/version.ts","webpack:///./node_modules/rxjs/_esm5/internal/Notification.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/iterator.js","webpack:///./node_modules/rxjs/_esm5/internal/util/noop.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///ng://ngx-spinner/lib/ngx-spinner.enum.ts","webpack:///ng://ngx-spinner/lib/ngx-spinner.service.ts","webpack:///ng://ngx-spinner/lib/ngx-spinner.component.ts","webpack:///ng://ngx-spinner/lib/ngx-spinner.module.ts","webpack:///./src/app/shared/cm-util.ts","webpack:///./node_modules/rxjs/_esm5/internal/symbol/observable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js","webpack:///./src/app/components/cm-main/main.css?bbe6","webpack:///./src/app/shared/spinnerUtils.ts","webpack:///../../../../../../packages/common/http/src/backend.ts","webpack:///../../../../../../packages/common/http/src/headers.ts","webpack:///../../../../../../packages/common/http/src/params.ts","webpack:///../../../../../../packages/common/http/src/request.ts","webpack:///../../../../../../packages/common/http/src/response.ts","webpack:///../../../../../../packages/common/http/src/client.ts","webpack:///../../../../../../packages/common/http/src/interceptor.ts","webpack:///../../../../../../packages/common/http/src/jsonp.ts","webpack:///../../../../../../packages/common/http/src/xhr.ts","webpack:///../../../../../../packages/common/http/src/xsrf.ts","webpack:///../../../../../../packages/common/http/src/module.ts","webpack:///./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/EmptyError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isFunction.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/take.js","webpack:///./src/app/shared/tableFilter.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/AsyncSubject.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/Action.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isNumeric.js","webpack:///ng://@ngx-translate/core/lib/translate.loader.ts","webpack:///ng://@ngx-translate/core/lib/missing-translation-handler.ts","webpack:///ng://@ngx-translate/core/lib/translate.compiler.ts","webpack:///ng://@ngx-translate/core/lib/util.ts","webpack:///ng://@ngx-translate/core/lib/translate.parser.ts","webpack:///ng://@ngx-translate/core/lib/translate.store.ts","webpack:///ng://@ngx-translate/core/lib/translate.service.ts","webpack:///ng://@ngx-translate/core/lib/translate.directive.ts","webpack:///ng://@ngx-translate/core/lib/translate.pipe.ts","webpack:///ng://@ngx-translate/core/public_api.ts","webpack:///./src/app/services/cm-location.service.ts","webpack:///./src/app/shared/marker.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/reduce.js","webpack:///ng://ngx-bootstrap/mini-ngrx/state.class.ts","webpack:///ng://ngx-bootstrap/mini-ngrx/store.class.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./node_modules/rxjs/_esm5/internal/ReplaySubject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeTo.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/hostReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/first.js","webpack:///./src/app/shared/const/missionType.ts","webpack:///./src/app/services/cm-component-tracker-service.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/catchError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/pipe.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeLast.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/Immediate.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/asap.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/app/components/cm-sortable-th/cm-sortable-th.component.ts","webpack:///./src/app/shared/bike.ts","webpack:///./src/app/components/cm-report/cm-report.component.ts","webpack:///ng://ngx-bootstrap/progressbar/progressbar.config.ts","webpack:///ng://ngx-bootstrap/progressbar/progressbar.component.ts","webpack:///ng://ngx-bootstrap/progressbar/bar.component.ts","webpack:///ng://ngx-bootstrap/progressbar/progressbar.module.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/refCount.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/zip.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/queue.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/canReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/Observer.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/startWith.js","webpack:///./src/app/services/cm-auth.service.ts","webpack:///./src/app/services/cm-organization.service.ts","webpack:///./src/app/app.component.ts","webpack:///./src/app/shared/serializable.ts","webpack:///./src/app/components/cm-assign/cm-assign.component.ts","webpack:///./src/app/components/cm-trouble-ticket/item/cm-trouble-ticket.component.ts","webpack:///./src/app/shared/reportExtractParam.ts","webpack:///ng://ngx-bootstrap/timepicker/reducer/timepicker.actions.ts","webpack:///ng://ngx-bootstrap/timepicker/timepicker.utils.ts","webpack:///ng://ngx-bootstrap/timepicker/timepicker-controls.util.ts","webpack:///ng://ngx-bootstrap/timepicker/timepicker.config.ts","webpack:///ng://ngx-bootstrap/timepicker/reducer/timepicker.reducer.ts","webpack:///ng://ngx-bootstrap/timepicker/reducer/timepicker.store.ts","webpack:///ng://ngx-bootstrap/timepicker/timepicker.component.ts","webpack:///ng://ngx-bootstrap/timepicker/timepicker.module.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/observeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/Scheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/timer.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/share.js","webpack:///./src/app/services/cm-station.service.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/groupBy.js","webpack:///./src/app/components/cm-location/modal-window/cm-modal-location-list.component.ts","webpack:///./src/app/components/cm-bike-job/cm-bike-job-list.model.ts","webpack:///./src/app/services/cm-amazon-picture.service.ts","webpack:///./src/app/components/cm-trouble-ticket/list/cm-trouble-tiket-list.component.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/TimeoutError.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/race.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduled.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/schedulePromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/SubjectSubscription.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArrayLike.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/last.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/util/not.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///./src/app/shared/coordinates.ts","webpack:///./src/app/components/cm-auto-ticket-config/item/cm-auto-ticket-config.component.ts","webpack:///./node_modules/moment/locale/de.js","webpack:///./node_modules/moment/locale/fr.js","webpack:///./node_modules/moment/locale/ru.js","webpack:///./src/app/components/cm-bike-short-list/modal-window/cm-modal-bike-list.component.ts","webpack:///./src/app/components/cm-map/cm-map.component.ts","webpack:///./src/app/services/cm-user-workload.service.ts","webpack:///./src/app/components/cm-job-list/item/cm-job-item.component.ts","webpack:///./src/app/components/cm-bike-job/list/cm-bike-job-list.component.ts","webpack:///./src/app/components/cm-bike-job/item/cm-bike-job-item.component.ts","webpack:///./src/app/services/cm-pager.service.ts","webpack:///./src/app/components/cm-repair/list/cm-repair-list.component.ts","webpack:///./src/app/components/cm-repair/item/cm-repair-item.component.ts","webpack:///./src/app/components/cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component.ts","webpack:///./src/app/components/cm-spare-part/list-modal/cm-spare-part-list-modal.component.ts","webpack:///./src/app/components/cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/every.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/finalize.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/bindCallback.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/forkJoin.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sample.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/shareReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/toArray.js","webpack:///./src lazy namespace object","webpack:///./node_modules/rxjs/Subject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/debounceTime.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/app/components/cm-main/cm-home.component.ts","webpack:///./src/app/components/cm-login/cm-login.component.ts","webpack:///./src/app/components/cm-auto-ticket-config/list/cm-auto-ticket-config-list.component.ts","webpack:///./src/app/services/cm-alive-service.ts","webpack:///./node_modules/rxjs/add/operator/map.js","webpack:///./src/app/components/cm-auto-ticket-config/cm-base-auto-ticket-config.component.ts","webpack:///./node_modules/moment/locale/af.js","webpack:///./node_modules/moment/locale/ar.js","webpack:///./node_modules/moment/locale/ar-dz.js","webpack:///./node_modules/moment/locale/ar-kw.js","webpack:///./node_modules/moment/locale/ar-ly.js","webpack:///./node_modules/moment/locale/ar-ma.js","webpack:///./node_modules/moment/locale/ar-sa.js","webpack:///./node_modules/moment/locale/ar-tn.js","webpack:///./node_modules/moment/locale/az.js","webpack:///./node_modules/moment/locale/be.js","webpack:///./node_modules/moment/locale/bg.js","webpack:///./node_modules/moment/locale/bm.js","webpack:///./node_modules/moment/locale/bn.js","webpack:///./node_modules/moment/locale/bn-bd.js","webpack:///./node_modules/moment/locale/bo.js","webpack:///./node_modules/moment/locale/br.js","webpack:///./node_modules/moment/locale/bs.js","webpack:///./node_modules/moment/locale/ca.js","webpack:///./node_modules/moment/locale/cs.js","webpack:///./node_modules/moment/locale/cv.js","webpack:///./node_modules/moment/locale/cy.js","webpack:///./node_modules/moment/locale/da.js","webpack:///./node_modules/moment/locale/de-at.js","webpack:///./node_modules/moment/locale/de-ch.js","webpack:///./node_modules/moment/locale/dv.js","webpack:///./node_modules/moment/locale/el.js","webpack:///./node_modules/moment/locale/en-au.js","webpack:///./node_modules/moment/locale/en-ca.js","webpack:///./node_modules/moment/locale/en-gb.js","webpack:///./node_modules/moment/locale/en-ie.js","webpack:///./node_modules/moment/locale/en-il.js","webpack:///./node_modules/moment/locale/en-in.js","webpack:///./node_modules/moment/locale/en-nz.js","webpack:///./node_modules/moment/locale/en-sg.js","webpack:///./node_modules/moment/locale/eo.js","webpack:///./node_modules/moment/locale/es.js","webpack:///./node_modules/moment/locale/es-do.js","webpack:///./node_modules/moment/locale/es-mx.js","webpack:///./node_modules/moment/locale/es-us.js","webpack:///./node_modules/moment/locale/et.js","webpack:///./node_modules/moment/locale/eu.js","webpack:///./node_modules/moment/locale/fa.js","webpack:///./node_modules/moment/locale/fi.js","webpack:///./node_modules/moment/locale/fil.js","webpack:///./node_modules/moment/locale/fo.js","webpack:///./node_modules/moment/locale/fr-ca.js","webpack:///./node_modules/moment/locale/fr-ch.js","webpack:///./node_modules/moment/locale/fy.js","webpack:///./node_modules/moment/locale/ga.js","webpack:///./node_modules/moment/locale/gd.js","webpack:///./node_modules/moment/locale/gl.js","webpack:///./node_modules/moment/locale/gom-deva.js","webpack:///./node_modules/moment/locale/gom-latn.js","webpack:///./node_modules/moment/locale/gu.js","webpack:///./node_modules/moment/locale/he.js","webpack:///./node_modules/moment/locale/hi.js","webpack:///./node_modules/moment/locale/hr.js","webpack:///./node_modules/moment/locale/hu.js","webpack:///./node_modules/moment/locale/hy-am.js","webpack:///./node_modules/moment/locale/id.js","webpack:///./node_modules/moment/locale/is.js","webpack:///./node_modules/moment/locale/it.js","webpack:///./node_modules/moment/locale/it-ch.js","webpack:///./node_modules/moment/locale/ja.js","webpack:///./node_modules/moment/locale/jv.js","webpack:///./node_modules/moment/locale/ka.js","webpack:///./node_modules/moment/locale/kk.js","webpack:///./node_modules/moment/locale/km.js","webpack:///./node_modules/moment/locale/kn.js","webpack:///./node_modules/moment/locale/ko.js","webpack:///./node_modules/moment/locale/ku.js","webpack:///./node_modules/moment/locale/ky.js","webpack:///./node_modules/moment/locale/lb.js","webpack:///./node_modules/moment/locale/lo.js","webpack:///./node_modules/moment/locale/lt.js","webpack:///./node_modules/moment/locale/lv.js","webpack:///./node_modules/moment/locale/me.js","webpack:///./node_modules/moment/locale/mi.js","webpack:///./node_modules/moment/locale/mk.js","webpack:///./node_modules/moment/locale/ml.js","webpack:///./node_modules/moment/locale/mn.js","webpack:///./node_modules/moment/locale/mr.js","webpack:///./node_modules/moment/locale/ms.js","webpack:///./node_modules/moment/locale/ms-my.js","webpack:///./node_modules/moment/locale/mt.js","webpack:///./node_modules/moment/locale/my.js","webpack:///./node_modules/moment/locale/nb.js","webpack:///./node_modules/moment/locale/ne.js","webpack:///./node_modules/moment/locale/nl.js","webpack:///./node_modules/moment/locale/nl-be.js","webpack:///./node_modules/moment/locale/nn.js","webpack:///./node_modules/moment/locale/oc-lnc.js","webpack:///./node_modules/moment/locale/pa-in.js","webpack:///./node_modules/moment/locale/pl.js","webpack:///./node_modules/moment/locale/pt.js","webpack:///./node_modules/moment/locale/pt-br.js","webpack:///./node_modules/moment/locale/ro.js","webpack:///./node_modules/moment/locale/sd.js","webpack:///./node_modules/moment/locale/se.js","webpack:///./node_modules/moment/locale/si.js","webpack:///./node_modules/moment/locale/sk.js","webpack:///./node_modules/moment/locale/sl.js","webpack:///./node_modules/moment/locale/sq.js","webpack:///./node_modules/moment/locale/sr.js","webpack:///./node_modules/moment/locale/sr-cyrl.js","webpack:///./node_modules/moment/locale/ss.js","webpack:///./node_modules/moment/locale/sv.js","webpack:///./node_modules/moment/locale/sw.js","webpack:///./node_modules/moment/locale/ta.js","webpack:///./node_modules/moment/locale/te.js","webpack:///./node_modules/moment/locale/tet.js","webpack:///./node_modules/moment/locale/tg.js","webpack:///./node_modules/moment/locale/th.js","webpack:///./node_modules/moment/locale/tk.js","webpack:///./node_modules/moment/locale/tl-ph.js","webpack:///./node_modules/moment/locale/tlh.js","webpack:///./node_modules/moment/locale/tr.js","webpack:///./node_modules/moment/locale/tzl.js","webpack:///./node_modules/moment/locale/tzm.js","webpack:///./node_modules/moment/locale/tzm-latn.js","webpack:///./node_modules/moment/locale/ug-cn.js","webpack:///./node_modules/moment/locale/uk.js","webpack:///./node_modules/moment/locale/ur.js","webpack:///./node_modules/moment/locale/uz.js","webpack:///./node_modules/moment/locale/uz-latn.js","webpack:///./node_modules/moment/locale/vi.js","webpack:///./node_modules/moment/locale/x-pseudo.js","webpack:///./node_modules/moment/locale/yo.js","webpack:///./node_modules/moment/locale/zh-cn.js","webpack:///./node_modules/moment/locale/zh-hk.js","webpack:///./node_modules/moment/locale/zh-mo.js","webpack:///./node_modules/moment/locale/zh-tw.js","webpack:///./src/app/components/cm-profile/settings/cm-settings.component.ts","webpack:///./src/app/components/cm-main-map/cm-map-with-filters.component.ts","webpack:///./node_modules/@agm/core/fesm5/agm-core.js","webpack:///./src/app/components/cm-no-roles/cm-no-role.component.ts","webpack:///./src/app/components/cm-job-list/list/cm-job-list.component.ts","webpack:///./src/app/components/cm-filters/cm-location-filter/cm-location-filter.component.ts","webpack:///./src/app/services/cm-email-service.service.ts","webpack:///./src/app/components/cm-trouble-ticket/cm-trouble-ticket.model.ts","webpack:///./src/app/components/pager/pager.component.ts","webpack:///./src/app/components/cm-location/list/cm-location-list.component.ts","webpack:///./src/app/components/cm-location/item/cm-location-item.component.ts","webpack:///./src/app/components/cm-spare-part/list/cm-spare-part-list.component.ts","webpack:///./src/app/components/cm-spare-parts-move/cm-move-spare-part.component.ts","webpack:///./src/app/components/cm-spare-parts-category/add/cm-spare-part-category.component.ts","webpack:///./src/app/components/cm-spare-parts-category/cm-spare-part-category.model.ts","webpack:///./src/app/components/cm-spare-part/item/cm-spare-part-detail.component.ts","webpack:///./src/app/components/cm-spare-parts-category/rename/cm-spare-part-cat-window.component.ts","webpack:///./src/app/components/cm-job-list-disctrict-group/cm-job-list-by-district.component.ts","webpack:///./src/app/components/cm-bike-dispatch/list/cm-bike-dispatch.component.ts","webpack:///./src/app/components/cm-bike-dispatch/item/cm-bike-dispatch-item.component.ts","webpack:///./src/app/services/cm-bike-blocking.service.ts","webpack:///./src/app/components/cm-news/cm-news.component.ts","webpack:///./src/app/components/cm-damage-cat-bike-config/cm-damage-cat-bike.model.ts","webpack:///./src/app/components/cm-damage-cat-bike-config/item/cm-damage-cat-bike-config-item.component.ts","webpack:///./src/app/components/cm-damage-cat-location-config/cm-damage-cat-location.model.ts","webpack:///./src/app/components/cm-damage-cat-location-config/item/cm-damage-cat-location-config-item.component.ts","webpack:///./src/app/components/cm-error-page/cm-page-not-found.component.ts","webpack:///./src/app/components/cm-modal-message/cm-modal-message-component.ts","webpack:///./src/app/services/cm-global-handler-service.ts","webpack:///./node_modules/url/url.js","webpack:///./node_modules/nouislider/distribute/nouislider.js","webpack:///./src/app/main.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/compiler_reflector.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/compiler_factory.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/platform_core_dynamic.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/resource_loader/resource_loader_impl.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/platform_providers.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/resource_loader/resource_loader_cache.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/version.ts","webpack:///../../../../../../packages/platform-browser-dynamic/src/platform-browser-dynamic.ts","webpack:///./src/app/app.module.ts","webpack:///./node_modules/rxjs-compat/Subject.js","webpack:///./node_modules/punycode/punycode.js","webpack:///./node_modules/url/util.js","webpack:///./node_modules/querystring-es3/index.js","webpack:///./node_modules/querystring-es3/decode.js","webpack:///./node_modules/querystring-es3/encode.js","webpack:///./src/app/app.routes.ts","webpack:///./src/app/components/cm-main/cm-home.component.html","webpack:///./src/app/img/checkmobile.jpg","webpack:///./src/app/components/cm-main/cm-home.component.scss?b2b1","webpack:///./src/app/components/cm-main/cm-home.component.scss","webpack:///./src/app/components/cm-main/color_theme.css?c882","webpack:///./src/app/components/cm-main/color_theme.css","webpack:///./src/app/components/cm-main/main.css","webpack:///./src/app/components/cm-login/cm-login.component.html","webpack:///./src/app/components/cm-login/cm-login.component.scss?2c42","webpack:///./src/app/components/cm-login/cm-login.component.scss","webpack:///./src/app/components/cm-main/cm-home.routes.ts","webpack:///./node_modules/rxjs-compat/add/operator/map.js","webpack:///./node_modules/rxjs-compat/operator/map.js","webpack:///./src/app/services/mock/language.mock.ts","webpack:///./src/app/components/cm-sortable-th/cm-sortable-th.component.html","webpack:///./src/app/components/cm-sortable-th/cm-sortable-th.component.scss?d84b","webpack:///./src/app/components/cm-sortable-th/cm-sortable-th.component.scss","webpack:///./src/app/components/cm-auto-ticket-config/cm-auto-ticket-conifg.model.ts","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./src/app/components/cm-bike-short-list/modal-window/cm-modal-bike-list.component.html","webpack:///./src/app/components/cm-bike-short-list/modal-window/cm-modal-bike-list.component.scss?7230","webpack:///./src/app/components/cm-bike-short-list/modal-window/cm-modal-bike-list.component.scss","webpack:///./src/app/components/cm-location/modal-window/cm-modal-location-list.component.html","webpack:///./src/app/components/cm-location/modal-window/cm-modal-location-list.component.scss?0253","webpack:///./src/app/components/cm-location/modal-window/cm-modal-location-list.component.scss","webpack:///./src/app/components/cm-job-list/item/cm-job-item.model.ts","webpack:///./src/app/components/cm-auto-ticket-config/item/cm-auto-ticket-config.component.html","webpack:///./src/app/components/cm-auto-ticket-config/item/cm-auto-ticket-config.component.scss?0b03","webpack:///./src/app/components/cm-auto-ticket-config/item/cm-auto-ticket-config.component.scss","webpack:///./src/app/components/cm-auto-ticket-config/list/cm-auto-ticket-config-list.component.html","webpack:///./src/app/components/cm-profile/settings/cm-settings.component.html","webpack:///./src/app/components/cm-job-list/cm-job.model.ts","webpack:///./src/app/components/cm-map/cm-map.component.html","webpack:///./src/app/components/cm-map/cm-map.component.scss?8edf","webpack:///./src/app/components/cm-map/cm-map.component.scss","webpack:///./src/app/shared/bikeCluster.ts","webpack:///./src/app/shared/employee.ts","webpack:///./src/app/components/cm-main-map/cm-map-with-filters.component.html","webpack:///./src/app/components/cm-main-map/cm-map-with-filters.component.scss?828a","webpack:///./src/app/components/cm-main-map/cm-map-with-filters.component.scss","webpack:///./src/app/components/cm-assign/cm-assign.component.html","webpack:///./src/app/components/cm-assign/cm-assign.component.scss?8199","webpack:///./src/app/components/cm-assign/cm-assign.component.scss","webpack:///./src/app/components/cm-filters/cm-location-filter/cm-location-filter.component.html","webpack:///./src/app/components/cm-bike-job/item/cm-bike-job-item.component.html","webpack:///./src/app/components/cm-bike-job/item/cm-bike-job-item.component.scss?a44b","webpack:///./src/app/components/cm-bike-job/item/cm-bike-job-item.component.scss","webpack:///./src/app/components/cm-report/cm-progressbar-conf.model.ts","webpack:///./src/app/components/cm-report/cm-report.component.html","webpack:///./src/app/components/cm-report/cm-report.component.css?8b4c","webpack:///./src/app/components/cm-report/cm-report.component.css","webpack:///./src/app/components/cm-bike-job/list/cm-bike-job-list.component.html","webpack:///./src/app/components/cm-bike-job/list/cm-bike-job-list.component.scss?a23e","webpack:///./src/app/components/cm-bike-job/list/cm-bike-job-list.component.scss","webpack:///./node_modules/uuid/v4.js","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./src/app/components/pager/pager.component.html","webpack:///./src/app/components/cm-trouble-ticket/list/cm-trouble-ticket-list.component.html","webpack:///./src/app/components/cm-trouble-ticket/item/cm-trip-model.ts","webpack:///./src/app/components/cm-trouble-ticket/item/cm-trouble-ticket.component.html","webpack:///./src/app/components/cm-trouble-ticket/item/cm-trouble-ticket.component.scss?e4c9","webpack:///./src/app/components/cm-trouble-ticket/item/cm-trouble-ticket.component.scss","webpack:///./src/app/components/cm-job-list/item/cm-job-item.component.html","webpack:///./src/app/components/cm-job-list/item/cm-job-item.component.scss?430a","webpack:///./src/app/components/cm-job-list/item/cm-job-item.component.scss","webpack:///./src/app/components/cm-job-list/list/cm-job-list.component.html","webpack:///./src/app/components/cm-job-list/list/cm-job-list.component.scss?4dae","webpack:///./src/app/components/cm-job-list/list/cm-job-list.component.scss","webpack:///./src/app/components/cm-location/list/cm-location-list.component.html","webpack:///./src/app/components/cm-location/item/cm-location-item.component.html","webpack:///./src/app/components/cm-location/item/cm-location-item.component.scss?f8c8","webpack:///./src/app/components/cm-location/item/cm-location-item.component.scss","webpack:///./src/app/components/cm-spare-part/list/cm-spare-part-list.component.html","webpack:///./src/app/components/cm-spare-parts-move/cm-move-spare-part.component.html","webpack:///./src/app/components/cm-spare-parts-category/add/cm-spare-part-category.component.html","webpack:///./src/app/components/cm-spare-part/cm-spare-part-list.model.ts","webpack:///./src/app/components/cm-spare-parts-category/rename/cm-spare-part-cat-window.component.html","webpack:///./src/app/components/cm-spare-parts-category/rename/cm-spare-part-cat-window.component.scss?f638","webpack:///./src/app/components/cm-spare-parts-category/rename/cm-spare-part-cat-window.component.scss","webpack:///./src/app/components/cm-spare-part/item/cm-spare-part-detail.component.html","webpack:///./src/app/components/cm-spare-part/item/cm-spare-part-detail.component.scss?e4cc","webpack:///./src/app/components/cm-spare-part/item/cm-spare-part-detail.component.scss","webpack:///./src/app/components/cm-job-list-disctrict-group/cm-job-list-by-district.component.html","webpack:///./src/app/components/cm-job-list-disctrict-group/cm-job-list-by-district.component.scss?672f","webpack:///./src/app/components/cm-job-list-disctrict-group/cm-job-list-by-district.component.scss","webpack:///./src/app/components/cm-bike-dispatch/list/cm-bike-dispatch.component.html","webpack:///./src/app/components/cm-bike-dispatch/list/cm-bike-dispatch.component.scss?cc27","webpack:///./src/app/components/cm-bike-dispatch/list/cm-bike-dispatch.component.scss","webpack:///./src/app/shared/location.ts","webpack:///./src/app/components/cm-bike-dispatch/cm-bike-dispatch.model.ts","webpack:///./src/app/components/cm-repair/cm-repair.model.ts","webpack:///./src/app/components/cm-repair/item/cm-repair-item.component.html","webpack:///./src/app/components/cm-repair/item/cm-repair-item.component.scss?0d36","webpack:///./src/app/components/cm-repair/item/cm-repair-item.component.scss","webpack:///./src/app/components/cm-repair/list/cm-repair-list.component.html","webpack:///./node_modules/rxjs/observable/forkJoin.js","webpack:///./node_modules/rxjs-compat/observable/forkJoin.js","webpack:///./src/app/components/cm-bike-dispatch/item/cm-bike-dispatch-item.component.html","webpack:///./src/app/components/cm-news/cm-news.component.html","webpack:///./src/app/components/cm-news/cm-news.component.scss?93f6","webpack:///./src/app/components/cm-news/cm-news.component.scss","webpack:///./src/app/components/cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component.html","webpack:///./src/app/components/cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component.css?d19e","webpack:///./src/app/components/cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component.css","webpack:///./src/app/components/cm-spare-part/list-modal/cm-spare-part-list-modal.component.html","webpack:///./src/app/components/cm-spare-part/list-modal/cm-spare-part-list-modal.component.scss?6f1d","webpack:///./src/app/components/cm-spare-part/list-modal/cm-spare-part-list-modal.component.scss","webpack:///./src/app/components/cm-damage-cat-bike-config/item/cm-damage-cat-bike-config-item.component.html","webpack:///./src/app/components/cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component.html","webpack:///./src/app/components/cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component.css?0a32","webpack:///./src/app/components/cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component.css","webpack:///./src/app/components/cm-damage-cat-location-config/item/cm-damage-cat-location-config-item.component.html","webpack:///./src/app/components/cm-main/cm-home.module.ts","webpack:///./src/app/components/cm-profile/cm-profile.component.ts","webpack:///./src/app/components/cm-profile/cm-profile.component.html","webpack:///./src/app/img/avatar.jpg","webpack:///./src/app/components/cm-profile/cm-profile.component.scss?6b9f","webpack:///./src/app/components/cm-profile/cm-profile.component.scss","webpack:///./src/app/components/cm-profile/cm-current-station/cm-current-station.component.ts","webpack:///./src/app/components/cm-profile/cm-current-station/cm-current-station.component.html","webpack:///./src/app/components/cm-profile/cm-current-station/cm-current-station.component.scss?f39e","webpack:///./src/app/components/cm-profile/cm-current-station/cm-current-station.component.scss","webpack:///./src/app/components/cm-job-list/item/cm-job-item-map.component.ts","webpack:///./src/app/components/cm-job-list/item/cm-job-item-map.component.html","webpack:///./src/app/components/cm-pictures/cm-pictures.component.ts","webpack:///./src/app/components/cm-pictures/cm-pictures.component.html","webpack:///./src/app/components/cm-pictures/cm-pictures.component.scss?7b02","webpack:///./src/app/components/cm-pictures/cm-pictures.component.scss","webpack:///./src/app/components/cm-user/cm-user.component.ts","webpack:///./src/app/components/cm-user/cm-user.component.html","webpack:///./src/app/shared/shared.module.ts","webpack:///./src/app/services/localization/cm-localization.service.ts","webpack:///ts/src/ng2-nouislider.component.ts","webpack:///ts/src/ng2-nouislider.module.ts","webpack:///./src/app/components/datetimepicker/datetimepicker.component.ts","webpack:///./src/app/components/datetimepicker/datetimepicker.component.html","webpack:///./src/app/components/datetimepicker/datetimepicker.component.scss?2b50","webpack:///./src/app/components/datetimepicker/datetimepicker.component.scss","webpack:///./node_modules/ngx-bootstrap/datepicker/bs-datepicker.scss?aba9","webpack:///./node_modules/ngx-bootstrap/datepicker/bs-datepicker.scss","webpack:///./src/app/components/cm-bike-short-list/cm-bike-list.component.ts","webpack:///./src/app/components/cm-bike-short-list/cm-bike-list.component.html","webpack:///./src/app/components/cm-filters/cm-bike-branding-filter/cm-bike-branding-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-bike-branding-filter/cm-bike-branding-filter.component.html","webpack:///./src/app/components/cm-filters/cm-bike-branding-filter/cm-bike-branding-filter.component.scss?2e1a","webpack:///./src/app/components/cm-filters/cm-bike-branding-filter/cm-bike-branding-filter.component.scss","webpack:///./src/app/components/cm-filters/cm-district-filter/cm-district-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-district-filter/cm-district-filter.component.html","webpack:///./src/app/components/cm-filters/cm-users-filter/cm-users-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-users-filter/cm-users-filter.component.html","webpack:///./src/app/components/cm-filters/cm-users-filter/cm-users-filter.component.scss?4add","webpack:///./src/app/components/cm-filters/cm-users-filter/cm-users-filter.component.scss","webpack:///./src/app/components/cm-filters/cm-job-status-filter/cm-job-status-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-job-status-filter/cm-job-status-filter.component.html","webpack:///./src/app/components/cm-validatable/numberfield/cm-validatable-numberfield.component.ts","webpack:///./src/app/components/cm-validatable/numberfield/cm-validatable-numberfield.component.html","webpack:///./src/app/components/cm-table-total/cm-table-total.component.ts","webpack:///./src/app/components/cm-table-total/cm-table-total.component.html","webpack:///./src/app/components/cm-table-total/cm-table-total.component.scss?0f88","webpack:///./src/app/components/cm-table-total/cm-table-total.component.scss","webpack:///./src/app/components/cm-filters/cm-tt-category-filter/cm-tt-category-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-tt-category-filter/cm-tt-category-filter.component.html","webpack:///./src/app/components/cm-show-on-map/cm-show-on-map.component.ts","webpack:///./src/app/components/cm-show-on-map/cm-show-on-map.component.html","webpack:///./src/app/components/cm-validatable/hour-minute/cm-hour-minute.component.ts","webpack:///./src/app/components/cm-validatable/hour-minute/cm-hour-minute.component.html","webpack:///./src/app/components/cm-validatable/hour-minute/cm-hour-minute.component.scss?5858","webpack:///./src/app/components/cm-validatable/hour-minute/cm-hour-minute.component.scss","webpack:///./src/app/components/cm-validatable/hour-minute-countdown/cm-hour-minute-countdown.component.ts","webpack:///./src/app/components/cm-validatable/hour-minute-countdown/cm-hour-minute-countdown.component.html","webpack:///./src/app/components/cm-validatable/hour-minute-countdown/cm-hour-minute-countdown.component.scss?68f9","webpack:///./src/app/components/cm-validatable/hour-minute-countdown/cm-hour-minute-countdown.component.scss","webpack:///./src/app/components/cm-modal-message/cm-modal-message-component.html","webpack:///./src/app/components/cm-modal-message/cm-modal-message-component.scss?ccc4","webpack:///./src/app/components/cm-modal-message/cm-modal-message-component.scss","webpack:///./src/app/components/cm-filters/cm-bike-status-filter/cm-bike-status-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-bike-status-filter/cm-bike-status-filter.component.html","webpack:///./src/app/components/cm-filters/cm-bike-status-filter/cm-bike-status-filter.component.scss?93bc","webpack:///./src/app/components/cm-filters/cm-bike-status-filter/cm-bike-status-filter.component.scss","webpack:///./src/app/components/cm-filters/cm-bike-type-filter/cm-bike-type-filter.component.ts","webpack:///./src/app/components/cm-filters/cm-bike-type-filter/cm-bike-type-filter.component.html","webpack:///./src/app/components/cm-filters/cm-bike-type-filter/cm-bike-type-filter.component.scss?7c82","webpack:///./src/app/components/cm-filters/cm-bike-type-filter/cm-bike-type-filter.component.scss","webpack:///ng://ngx-bootstrap/collapse/collapse-animations.ts","webpack:///ng://ngx-bootstrap/collapse/collapse.directive.ts","webpack:///ng://ngx-bootstrap/collapse/collapse.module.ts","webpack:///ng://ngx-bootstrap/accordion/accordion.config.ts","webpack:///ng://ngx-bootstrap/accordion/accordion.component.ts","webpack:///ng://ngx-bootstrap/accordion/accordion-group.component.ts","webpack:///ng://ngx-bootstrap/accordion/accordion.module.ts","webpack:///ng://ngx-bootstrap/alert/alert.config.ts","webpack:///ng://ngx-bootstrap/alert/alert.component.ts","webpack:///ng://ngx-bootstrap/alert/alert.module.ts","webpack:///ng://ngx-bootstrap/buttons/button-checkbox.directive.ts","webpack:///ng://ngx-bootstrap/buttons/button-radio-group.directive.ts","webpack:///ng://ngx-bootstrap/buttons/button-radio.directive.ts","webpack:///ng://ngx-bootstrap/buttons/buttons.module.ts","webpack:///ng://ngx-bootstrap/carousel/carousel.config.ts","webpack:///ng://ngx-bootstrap/carousel/carousel.component.ts","webpack:///ng://ngx-bootstrap/carousel/utils.ts","webpack:///ng://ngx-bootstrap/carousel/slide.component.ts","webpack:///ng://ngx-bootstrap/carousel/carousel.module.ts","webpack:///ng://ngx-bootstrap/modal/bs-modal-ref.service.ts","webpack:///ng://ngx-bootstrap/modal/modal-backdrop.options.ts","webpack:///ng://ngx-bootstrap/modal/modal-options.class.ts","webpack:///ng://ngx-bootstrap/modal/modal-container.component.ts","webpack:///ng://ngx-bootstrap/modal/modal-backdrop.component.ts","webpack:///ng://ngx-bootstrap/modal/modal.directive.ts","webpack:///ng://ngx-bootstrap/modal/bs-modal.service.ts","webpack:///ng://ngx-bootstrap/modal/modal.module.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown.config.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown.state.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown-container.component.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown.directive.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown-menu.directive.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown-toggle.directive.ts","webpack:///ng://ngx-bootstrap/dropdown/bs-dropdown.module.ts","webpack:///ng://ngx-bootstrap/pagination/pagination.config.ts","webpack:///ng://ngx-bootstrap/pagination/pager.component.ts","webpack:///ng://ngx-bootstrap/pagination/pagination.component.ts","webpack:///ng://ngx-bootstrap/pagination/pagination.module.ts","webpack:///ng://ngx-bootstrap/rating/rating.component.ts","webpack:///ng://ngx-bootstrap/rating/rating.module.ts","webpack:///ng://ngx-bootstrap/sortable/draggable-item.service.ts","webpack:///ng://ngx-bootstrap/sortable/sortable.component.ts","webpack:///ng://ngx-bootstrap/sortable/sortable.module.ts","webpack:///ng://ngx-bootstrap/tabs/ng-transclude.directive.ts","webpack:///ng://ngx-bootstrap/tabs/tabset.config.ts","webpack:///ng://ngx-bootstrap/tabs/tabset.component.ts","webpack:///ng://ngx-bootstrap/tabs/tab.directive.ts","webpack:///ng://ngx-bootstrap/tabs/tab-heading.directive.ts","webpack:///ng://ngx-bootstrap/tabs/tabs.module.ts","webpack:///ng://ngx-bootstrap/tooltip/tooltip.config.ts","webpack:///ng://ngx-bootstrap/tooltip/tooltip-container.component.ts","webpack:///ng://ngx-bootstrap/tooltip/tooltip.directive.ts","webpack:///ng://ngx-bootstrap/tooltip/tooltip.module.ts","webpack:///ng://ngx-bootstrap/typeahead/latin-map.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead-options.class.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead-match.class.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead-utils.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead-container.component.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead.config.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead.directive.ts","webpack:///ng://ngx-bootstrap/typeahead/typeahead.module.ts","webpack:///ng://ngx-bootstrap/popover/popover.config.ts","webpack:///ng://ngx-bootstrap/popover/popover-container.component.ts","webpack:///ng://ngx-bootstrap/popover/popover.directive.ts","webpack:///ng://ngx-bootstrap/popover/popover.module.ts","webpack:///./node_modules/@auth0/angular-jwt/src/jwtoptions.token.js","webpack:///./node_modules/@auth0/angular-jwt/src/jwthelper.service.js","webpack:///./node_modules/@auth0/angular-jwt/src/jwt.interceptor.js","webpack:///./node_modules/@auth0/angular-jwt/index.js","webpack:///../../../../../../packages/animations/browser/src/render/shared.ts","webpack:///../../../../../../packages/animations/browser/src/render/animation_driver.ts","webpack:///../../../../../../packages/animations/browser/src/util.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_transition_expr.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_ast_builder.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_timeline_instruction.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/element_instruction_map.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_timeline_builder.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_transition_instruction.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_transition_factory.ts","webpack:///../../../../../../packages/animations/browser/src/dsl/animation_trigger.ts","webpack:///../../../../../../packages/animations/browser/src/render/timeline_animation_engine.ts","webpack:///../../../../../../packages/animations/browser/src/render/transition_animation_engine.ts","webpack:///../../../../../../packages/animations/browser/src/render/animation_engine_next.ts","webpack:///../../../../../../packages/animations/browser/src/render/special_cased_styles.ts","webpack:///../../../../../../packages/animations/browser/src/render/css_keyframes/element_animation_style_handler.ts","webpack:///../../../../../../packages/animations/browser/src/render/css_keyframes/css_keyframes_player.ts","webpack:///../../../../../../packages/animations/browser/src/render/css_keyframes/direct_style_player.ts","webpack:///../../../../../../packages/animations/browser/src/render/css_keyframes/css_keyframes_driver.ts","webpack:///../../../../../../packages/animations/browser/src/render/web_animations/web_animations_player.ts","webpack:///../../../../../../packages/animations/browser/src/render/web_animations/web_animations_driver.ts","webpack:///../../../../../../packages/platform-browser/animations/src/animation_builder.ts","webpack:///../../../../../../packages/platform-browser/animations/src/animation_renderer.ts","webpack:///../../../../../../packages/platform-browser/animations/src/providers.ts","webpack:///../../../../../../packages/platform-browser/animations/src/module.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","props","parentClass","additionalProcessing","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","this","args","annotationInstance","cls","push","ngMetadataName","annotationCls","values","propName","makeParamDecorator","ParamDecoratorFactory","apply","ParamDecorator","annotation","unusedKey","index","parameters","length","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","target","constructor","meta","unshift","InjectFlags","token","Inject","Optional","Self","SkipSelf","Host","attributeName","Attribute","getClosureSafeProperty","objWithPropertyToExtract","Error","fillProperties","source","opts","providedIn","factory","undefined","defineInjectable","options","providers","imports","getInjectableDef","type","def","NG_INJECTABLE_DEF","getInjectorDef","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","stringify","Array","map","join","overriddenName","res","toString","newLineIndex","indexOf","substring","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","fn","R3ResolvedDependencyType","__globalThis","globalThis","__window","window","__self","self","WorkerGlobalScope","_global","global","getCompilerFacade","globalNg","_injectImplementation","_desc","__NG_ELEMENT_ID__","INJECTOR","InjectionToken","THROW_IF_NOT_FOUND","NEW_LINE","USE_VALUE","provide","String","useValue","_currentInjector","setCurrentInjector","injector","former","setInjectImplementation","impl","previous","injectInjectorOnly","flags","Default","injectRootLimpMode","inject","notFoundValue","injectableDef","injectArgs","types","arg","isArray","j","error","catchInjectorError","e","injectorErrorName","tokenPath","message","formatError","text","obj","charAt","substr","context","parts","JSON","replace","angularCoreDiEnv","typeAny","locationString","newCounters","allowNgDevModeTrue","ChangeDetectionStrategy","ChangeDetectorStatus","ViewEncapsulation","addAllToArray","items","arr","flatten","list","dst","item","slice","deepForEach","input","forEach","addToArray","splice","removeFromArray","pop","assertEqual","actual","expected","msg","throwError","assertNotEqual","assertNotSame","assertLessThan","assertGreaterThan","assertDefined","assertDomNode","node","Node","assertDataInRange","maxLen","isDefaultChangeDetectionStrategy","changeDetectionStrategy","noSideEffects","ngDevMode","location","namedConstructors","firstTemplatePass","tNode","tView","rendererCreateTextNode","rendererSetText","rendererCreateElement","rendererAddEventListener","rendererSetAttribute","rendererRemoveAttribute","rendererSetProperty","rendererSetClassName","rendererAddClass","rendererRemoveClass","rendererSetStyle","rendererRemoveStyle","rendererDestroy","rendererDestroyNode","rendererMoveNode","rendererRemoveNode","rendererAppendChild","rendererInsertBefore","rendererCreateComment","styleMap","styleMapCacheMiss","classMap","classMapCacheMiss","styleProp","stylePropCacheMiss","classProp","classPropCacheMiss","flushStyling","classesApplied","stylesApplied","stylingWritePersistedState","stylingReadPersistedState","EMPTY_OBJ","EMPTY_ARRAY","freeze","NG_COMPONENT_DEF","ngComponentDef","NG_DIRECTIVE_DEF","ngDirectiveDef","NG_PIPE_DEF","ngPipeDef","NG_MODULE_DEF","ngModuleDef","NG_LOCALE_ID_DEF","ngLocaleIdDef","NG_BASE_DEF","ngBaseDef","NG_ELEMENT_ID","_renderCompCount","componentDefinition","typePrototype","declaredInputs","providersResolver","consts","vars","template","ngContentSelectors","hostBindings","contentQueries","inputs","outputs","exportAs","onChanges","onInit","ngOnInit","doCheck","ngDoCheck","afterContentInit","ngAfterContentInit","afterContentChecked","ngAfterContentChecked","afterViewInit","ngAfterViewInit","afterViewChecked","ngAfterViewChecked","onDestroy","ngOnDestroy","onPush","changeDetection","OnPush","directiveDefs","pipeDefs","selectors","viewQuery","features","data","encapsulation","Emulated","id","styles","_","setInput","schemas","directiveTypes","directives","feature","pipeTypes","pipes","invertObject","extractDirectiveDef","extractPipeDef","getComponentDef","getDirectiveDef","getPipeDef","bootstrap","declarations","transitiveCompileScopes","getNgModuleDef","scope","secondary","newLookup","minifiedKey","publicName","declaredName","baseDefinition","pipeDef","pure","getBaseDef","throwNotFound","isLView","isLContainer","isContentQueryHost","isComponent","isComponentDef","isRootView","assertTNodeForLView","lView","tView_","assertComponentType","assertHasParent","parent","assertLContainer","assertLViewOrUndefined","assertLView","assertFirstTemplatePass","errMessage","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","assertNodeType","typeName","assertNodeOfPossibleTypes","found","some","registerPreOrderHooks","directiveIndex","directiveDef","nodeIndex","initialPreOrderHooksLength","initialPreOrderCheckHooksLength","preOrderHooks","preOrderCheckHooks","registerPostOrderHooks","directiveStart","end","directiveEnd","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executePreOrderHooks","currentView","checkNoChangesMode","currentNodeIndex","executeHooks","firstPassHooks","checkHooks","initPhaseState","hooksToCall","initPhase","startIndex","nodeIndexLimit","lastNodeIndexFound","callHook","callHooks","isInitHook","hook","directive","_stylingState","_stateStorage","Map","_stylingElement","getStylingState","element","readFromMap","classesBitMask","classesIndex","stylesBitMask","stylesIndex","resetStylingState","elementDepthCount","unwrapRNode","getNativeByIndex","getNativeByTNode","getNativeByTNodeOrNull","getTNode","view","loadInternal","getComponentViewByIndex","hostView","slotValue","readPatchedData","readPatchedLView","resetPreOrderHookFlags","bindingsEnabled","currentDirectiveDef","setCurrentDirectiveDef","getBindingsEnabled","getLView","previousOrParentTNode","isParent","activeDirectiveId","activeDirectiveSuperClassDepthPosition","activeDirectiveSuperClassHeight","setActiveHostElement","elementIndex","_selectedIndex","setSelectedIndex","incrementActiveDirectiveId","adjustActiveDirectiveSuperClassDepthPosition","delta","Math","max","contextLView","viewToRestore","getPreviousOrParentTNode","setPreviousOrParentTNode","_isParent","setTNodeAndViewData","getIsParent","setIsNotParent","isCreationMode","getContextLView","getCheckNoChangesMode","setCheckNoChangesMode","bindingRootIndex","getBindingRoot","setBindingRoot","currentQueryIndex","getCurrentQueryIndex","setCurrentQueryIndex","enterView","newView","hostTNode","oldView","bindingStartIndex","nextContextImpl","level","nestingLevel","walkUpViews","resetComponentState","setCurrentStyleSanitizer","clear","leaveView","safeToRunHooks","getSelectedIndex","_currentSanitizer","_currentNamespace","namespaceHTMLInternal","sanitizer","getCurrentStyleSanitizer","isDifferent","a","b","renderStringify","stringifyForError","defaultScheduler","requestAnimationFrame","setTimeout","ownerDocument","defaultView","body","isPropMetadataString","str","maybeUnwrapFn","Function","RendererStyleFlags3","updateLastDirectiveIndex","lastDirectiveIndex","setConfig","getConfig","markContextToPersistState","getProp","getPropConfig","isSanitizationRequired","getGuardMask","setGuardMask","maskValue","config","guardMask","getValuesCount","getBindingValue","offset","getDefaultValue","allowStylingFlush","isContextLocked","stateIsPersisted","getPropValuesStartPosition","hasValueChanged","compareValueA","compareValueB","isStylingValueDefined","concatString","separator","hyphenate","v","toLowerCase","getStylingMapArray","isStylingContext","getInitialStylingValue","hasClassInput","hasStyleInput","getMapProp","setMapValue","getMapValue","isProceduralRenderer","renderer","domRendererFactory3","createRenderer","hostElement","rendererType","document","setUpAttributes","native","attrs","isProc","namespaceURI","attrName","attrVal","setAttribute","setAttributeNS","isAnimationProp","setProperty","isNameOnlyAttributeMarker","marker","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorViewOffset","getParentInjectorView","startView","viewOffset","parentView","getLViewParent","getRootView","componentOrLView","findComponentView","rootTNode","getRootContext","viewOrComponent","rootView","includeViewProviders","setIncludeViewProviders","oldValue","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentLView","parentData","footer","diPublicInInjector","charCodeAt","bloomBit","BLOOM_SIZE","mask","b7","b6","b5","tData","bloomAdd","injectAttributeImpl","attrNameToInject","classes","attrsLength","getOrCreateInjectable","bloomHash","tokenId","bloomHashBitOrFactory","savePreviousOrParentTNode","saveLView","NodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","instance","searchTokensOnInjector","NOT_FOUND","moduleInjector","previousInjectImplementation","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","lData","getPrototypeOf","NodeInjectorFactory","previousIncludeViewProviders","injectorView","isFirstHostTNode","_tNode","_lView","getDebugContext","getOriginalError","defaultErrorLogger","console","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","getErrorLogger","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","BRAND","allowSanitizationBypass","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustString","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","trustedString","trusted","_devMode","_runModeLocked","isDevMode","enableProdMode","defaultDoc","inertDocument","implementation","createHTMLDocument","inertBodyElement","inertHtml","createElement","appendChild","innerHTML","querySelector","DOMParser","isDOMParserAvailable","getInertBodyElement","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","getInertBodyElement_XHR","html","encodeURI","xhr","XMLHttpRequest","responseType","open","send","response","removeChild","firstChild","parseFromString","templateEl","documentMode","stripCustomNsAttrs","el","elAttrs","attributes","removeAttribute","childNode","nodeType","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","url","match","warn","sanitizeSrcset","srcset","split","trim","tagSet","tags","tslib_1.__values","merge","sets","inertBodyHelper","SecurityContext","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","ARIA_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","sanitizedSomething","buf","sanitizeChildren","current","traverseContent","startElement","TEXT_NODE","chars","nodeValue","endElement","next","checkClobberedElement","parentNode","tagName","nodeName","elAttr","lower","encodeEntities","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","_sanitizeHtml","unsafeHtmlInput","InertBodyHelper","unsafeHtml","mXSSAttempts","parsedHtml","SanitizingHtmlSerializer","safeHtml","getTemplateContent","isTemplateElement","content","SAFE_STYLE_VALUE","RegExp","URL_RE","_sanitizeStyle","urlMatch","outsideSingle","outsideDouble","hasBalancedQuotes","getSanitizer","sanitize","HTML","STYLE","unsafeStyle","URL","unsafeUrl","RESOURCE_URL","unsafeResourceUrl","SCRIPT","unsafeScript","getUrlSanitizer","tag","prop","doSanitizeValue","createNamedArrayType","FunctionConstructor","normalizeDebugBindingName","CAMEL_CASE_REGEXP","normalizeDebugBindingValue","getLContext","mpValue","component","findViaComponent","isDirectiveInstance","directiveInstance","directiveIndexStart","directiveIndexEnd","traverseNextElement","findViaDirective","getDirectivesAtNodeIndex","findViaNativeElement","existingCtx","createLContext","attachPatchData","rElement","parentContext","localRefs","getComponentViewByInstance","componentInstance","child","componentIndices","components","elementComponentIndex","includeComponents","directiveStartIndex","directiveEndIndex","throwMultipleComponentError","throwMixedMultiProviderError","isCssClassMatching","nodeClassAttrVal","cssClassToMatch","nodeClassesLen","matchIndex","matchEndIdx","hasTagAndTypeMatch","currentSelector","isProjectionMode","isNodeMatchingSelector","selector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","isInlineTemplate","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","deferredBindingQueue","updateClassBinding","bindingIndex","deferRegistration","forceUpdate","isMapBased","state","updateBindingData","updateStyleBinding","counterIndex","sanitizationRequired","deferBindingRegistration","flushDeferredBindings","registerBinding","changed","countId","bindingValue","registered","valuesCount","allocateNewContextEntry","addBindingIntoContext","firstValueIndex","lastValueIndex","classesContext","stylesContext","styleSanitizer","persistState","allowFlushClasses","allowFlushStyles","classesFlushed","maybeApplyStyling","setClass","stylesFlushed","setStyle","delete","deleteStylingStateFromStorage","set","storeStylingState","allowFlush","bitMask","styleSetter","initialValues","initialStyling","updateInitialStylingOnContext","lockContext","lockAndFinalizeContext","contextHasUpdates","applyStyling","bindingData","bitMaskValue","applyStylingFn","normalizeBitMaskValue","stylingMapsSyncFn","_activeStylingMapApplyFn","mapsMode","valueApplied","valuesCountUpToDefault","defaultValue","valueAppliedWithinMap","nativeStyle","style","DashCase","removeStyle","removeProperty","className","classList","addClass","add","removeClass","remove","renderStylingMap","stylingValues","isClassBased","stylingMapArr","NO_CHANGE","ELEMENT_MARKER","COMMENT_MARKER","attachDebugObject","debug","syncStylingMap","targetProp","targetPropValueWasApplied","runTheSyncAlgorithm","loopUntilEnd","innerSyncStylingMap","currentMapIndex","totalMaps","cursor","mapIndex","MAP_CURSORS","getCurrentSyncCursor","iteratedTooFar","isTargetPropMatched","valueIsDefined","innerMode","resolveInnerMapMode","isValueAllowedToBeApplied","useDefault","valueToApply","bindingIndexToApply","finalValue","indexValue","resetSyncCursors","activateStylingMapFeature","currentMode","isExactMatch","doApplyValue","addItemToStylingMap","allowOverwrite","propAtIndex","applied","valueAtIndex","stylingMapToString","attrValue","stylingMapToStringMap","stringMap","LVIEW_EMPTY","entries","bindingsStartPosition","sources","_data","_isClassBased","_sanitizer","overrideSanitizer","_mapValues","LViewArray","TVIEWDATA_EMPTY","TViewConstructor","queries","expandoStartIndex","expandoInstructions","staticViewQueries","staticContentQueries","cleanup","directiveRegistry","pipeRegistry","TNodeConstructor","propertyMetadataStartIndex","propertyMetadataEndIndex","localNames","initialInputs","tViews","projectionNext","projection","TViewData","LViewBlueprint","MatchesArray","TViewComponents","TNodeLocalNames","TNodeInitialInputs","TNodeInitialData","LCleanup","TCleanup","toDebug","toHtml","includeChildren","isTextNode","textContent","_raw_lView","__raw__flags__","creationMode","firstViewPass","checkAlways","dirty","attached","destroyed","isRoot","indexWithinInitPhase","toDebugNodes","debugNodes","tNodeCursor","rawValue","componentLViewDebug","readLViewValue","NodeStylingDebug","nodes","rendererFactory","childHead","childTail","declarationView","tHost","childViews","__other__","_raw_lContainer","HEADER_OFFSET","__raw_opCode","__raw_opCodes","__lView","results","opCode","result","I18NDebugItem","commentValue","code","icus","checkBit","skipCodes","tIcuIndex","tIcu","sanitizeFn","selectInternal","_CLEAN_PROMISE","Promise","resolve","refreshDescendantViews","dynamicViewData","renderEmbeddedTemplate","refreshDynamicEmbeddedViews","refreshContentQueries","viewData","selectedIndex","currentDirectiveIndex","currentElementIndex","instruction","providerCount","hostCtx","setHostBindings","executeViewQueryFn","hostLView","componentRefresh","refreshChildComponents","queryStartIdx","directiveDefIdx","elementCreate","overriddenRenderer","rendererToUse","namespace","createElementNS","createLView","host","tHostNode","concat","LViewDebug","attachLViewDebug","getOrCreateTNode","adjustedIndex","tParentNode","createTNode","createTNodeAtIndex","assignTViewNodeToLView","viewToRender","_previousOrParentTNode","tickRootContext","executeTemplate","getRenderFlags","renderComponentOrTemplate","templateFn","normalExecutionPath","creationModeIsActive","begin","rf","prevSelectedIndex","executeContentQueries","start","createDirectivesAndLocals","localRefExtractor","addComponentLogic","postProcessDirective","instantiateAllDirectives","expando","invokeHostBindingsInCreationMode","invokeDirectivesHostBindings","localIndex","saveResolvedLocalsInData","getOrCreateTView","createTView","viewIndex","initialViewLength","fill","createViewBlueprint","createError","locateHostElement","elementOrSelector","defaultRenderer","rNode","selectRootElement","tParent","generatePropertyAliases","direction","propStore","isInput","defs","propertyAliasMap","internalName","ATTR_TO_PROP","elementPropertyInternal","nativeOnly","loadRendererFn","inputData","dataValue","initializeTNodeInputs","setInputsForProperty","childComponentLView","markDirtyIfOnPush","setNgReflectProperty","startsWith","validateAgainstEventProperties","matchingSchemas","createUnknownPropertyError","validateAgainstUnknownProperties","lastBindingIndex","bindingMetadata","savePropertyDebugData","debugValue","setValue","schema","resolveDirectives","registry","matches","findDirectiveMatches","exportsMap","initNodeFlags","generateExpandoInstructionBlock","baseResolveDirective","saveNameToExportMap","cacheMatchingLocalNames","previousExpandoLength","directiveCount","providerStartIndex","postProcessBaseDirective","initialInputData","minifiedInputName","generateInitialInputs","privateName","nativeElement","setInputsFromAttrs","assertPreviousIsParent","queueComponentIndexForCheck","numberOfDirectives","directiveFactory","nodeInjectorFactory","componentView","addToViewTree","elementAttributeInternal","validateAgainstEventAttributes","strValue","LContainerArray","createLContainer","hostNative","isForViewContainerRef","lContainer","LContainerDebug","attachLContainerDebug","adjustedElementIndex","componentTView","syncViewWithBlueprint","checkView","lViewOrLContainer","markViewDirty","rootContext","rootComponent","detectChangesInternal","detectChangesInRootView","checkNoChangesInternal","hostTView","storeBindingMetadata","prefix","suffix","CLEAN_PROMISE","getCleanup","getTViewCleanup","loadComponentRenderer","errorHandler","ErrorHandler","textBindingInternal","renderInitialStyling","getLContainer","embeddedView","container","getContainerRenderParent","tViewNode","nativeParentNode","executeActionOnElementOrContainer","action","lNodeToHandle","beforeNode","nativeInsertBefore","nativeRemoveNode","destroyNode","renderParent","anchor","executeActionOnView","executeActionOnContainer","createTextNode","createText","addRemoveViewFromContainer","insertMode","insertView","indexInContainer","containerLength","declarationLContainer","declarationContainer","declaredViews","trackMovedView","lQueries","detachMovedView","projectedViews","declaredViewIndex","detachView","removeIndex","viewToDetach","removedLView","removeView","detachedView","destroyLView","cleanUpView","firstView","getParentState","destroyViewTree","executeOnDestroys","tCleanup","lCleanup","idxOrTargetGetter","listener","useCaptureOrSubIdx","removeEventListener","unsubscribe","removeListeners","destroy","getRenderParent","getHighestElementOrICUContainer","getHostNative","isIcuCase","ShadowDom","Native","insertBefore","nativeAppendOrInsertBefore","nativeAppendChild","childEl","childTNode","anchorNode","parentTNode","getBeforeNodeForView","getNativeAnchorNode","viewIndexInContainer","nextViewIndex","tViewNodeChild","isHostElement","nativeParent","nativeRemoveChild","appendProjectedNodes","tProjectionNode","selectorIndex","projectedView","nodeToProject","appendProjectedNode","appendProjectedChildren","ngContainerChildTNode","projectionView","projectedTNode","nodeOrContainer","viewRootTNode","executeActionOnNode","executeActionOnElementContainerOrIcuContainer","componentLView","componentNode","projectionTNode","projectedComponentLView","executeActionOnProjection","R3ElementRef","R3TemplateRef","R3ViewContainerRef","_context","_componentIndex","_appRef","_viewContainerRef","_tViewNode","collectNativeNodes","tNodeChild","nativeNode","componentHost","currentProjectedNode","_lookUpContext","detach","callback","cleanupFn","markForCheck","reattach","detectChanges","checkNoChanges","attachToViewContainerRef","vcRef","detachFromAppRef","renderDetachView","attachToAppRef","appRef","_view","tslib_1.__extends","checkNoChangesInRootView","ViewRef","createElementRef","ElementRefToken","createTemplateRef","TemplateRefToken","_declarationView","_declarationTContainer","elementRef","createEmbeddedView","embeddedTView","createEmbeddedViewAndNode","declarationViewLQueries","viewRef","createContainerRef","ViewContainerRefToken","_lContainer","_hostTNode","_hostView","startTNode","getParentInjectorTNode","templateRef","insert","createComponent","componentFactory","projectableNodes","ngModuleRef","contextInjector","parentInjector","ngModule","viewEngine_NgModuleRef","componentRef","allocateContainerIfNeeded","adjustedIdx","_adjustIndex","move","newIndex","shift","commentNode","createComment","nativeNextSibling","injectChangeDetectorRef","isPipe","componentIndex","hostComponentView","createViewRef","SWITCH_CHANGE_DETECTOR_REF_FACTORY","SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__","render3InjectChangeDetectorRef","SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__","Type","isType","DELEGATE_CTOR","INHERITED_CLASS","INHERITED_CLASS_WITH_CTOR","INHERITED_CLASS_WITH_DELEGATE_CTOR","reflect","_reflect","isReflectionEnabled","_zipTypesAndAnnotations","paramTypes","paramAnnotations","_ownParameters","parentCtor","typeStr","test","isDelegateCtor","tsickleCtorParams","ctorParameters","ctorParam","convertTsickleDecoratorIntoMetadata","decorators","getOwnMetadata","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","keys","ownPropMetadata","hasLifecycleHook","lcProperty","guards","setter","method","importUri","resourceUri","resolveIdentifier","moduleUrl","members","runtime","resolveEnum","enumIdentifier","decoratorInvocations","decoratorInvocation","annotationArgs","ctor","parentProto","getReflect","ReflectionCapabilities","reflectDependencies","convertDependencies","deps","compiler","dep","optional","resolved","Token","skipSelf","setTokenAndResolvedType","param","__proto__","ChangeDetectorRef","reflectDependency","compileInjectable","srcMeta","hasAProvider","isUseClassProvider","isUseFactoryProvider","isUseValueProvider","isUseExistingProvider","compilerMeta","typeArgumentCount","ctorDeps","userDeps","useClass","useFactory","useExisting","convertInjectableProviderToFactory","provider","reflectionCapabilities","Injectable","SWITCH_COMPILE_INJECTABLE","SWITCH_COMPILE_INJECTABLE__POST_R3__","render3CompileInjectable","injectableType","APP_ROOT","NOT_YET","CIRCULAR","NULL_INJECTOR","getNullInjector","NullInjector","createInjector","defType","additionalProviders","R3Injector","records","injectorDefTypes","Set","_destroyed","dedupStack","injectorDef","processInjectorType","processProvider","makeRecord","isRootInjector","has","assertNotDestroyed","service","previousInjector","record","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","tokens","defOrWrappedDef","parents","defName","isDuplicate","imported","defProviders","ngModuleType","isTypeProvider","providerToFactory","isValueProvider","providerToRecord","multi","existing","throwCyclicDependencyError","paramLength","inheritedInjectableDef","getUndecoratedInjectableFactory","isFactoryProvider","ngModuleDetail","throwInvalidProviderError","hasDeps","INJECTOR_IMPL__POST_R3__","INJECTOR_IMPL","StaticInjector","NULL","Injector","IDENT","EMPTY","MULTI_PROVIDER_FN","arguments","_records","useNew","recursivelyProcessProviders","staticError","resolvedProvider","providerDeps","computeDeps","resolveProvider","multiProvider","multiProviderMixError","tryResolveToken","NO_NEW_LINE","depRecords","depRecord","childRecord","resolveToken","constructResolvingPath","findFirstClosedCycle","reverse","k","injectionError","constructResolvingMessage","errMsg","wrappedError","addKey","injectors","noAnnotationError","params","signature","ii","parameter","displayName","_globalKeyRegistry","numberOfKeys","_allKeys","ReflectiveKey","newKey","size","reflector","updateCapabilities","caps","identifier","visibility","fromKey","ReflectiveDependency","_EMPTY_LIST","resolvedFactories","resolvedFactory","dependencies","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","_extractToken","constructDependencies","ResolvedReflectiveFactory","resolveReflectiveProvider","ResolvedReflectiveProvider_","resolveReflectiveProviders","resolvedProviderMap","normalizedProvidersMap","mergeResolvedReflectiveProviders","_normalizeProviders","from","metadata","_createDependency","paramMetadata","UNDEFINED","resolveAndCreate","ResolvedReflectiveProviders","ReflectiveInjector","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","resolveAndCreateChild","createChildFromResolved","inj","resolveAndInstantiate","instantiateResolved","_instantiateProvider","getProviderAtIndex","outOfBoundsError","_new","_getMaxNumberOfObjects","_instantiate","originalException","_getByReflectiveDependency","stack","first","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","_getObjByKeyId","keyId","_throwOrNull","noProviderError","inj_","_mapProviders","ANALYZE_FOR_ENTRY_COMPONENTS","ContentChildren","isViewQuery","descendants","Query","ContentChild","ViewChildren","ViewChild","resolveComponentResources","resourceResolver","componentResolved","urlMap","cachedResourceResolve","promise","resp","then","unwrapResponse","componentResourceResolutionQueue","promises","templateUrl","styleUrls","styleOffset","styleUrl","fullyResolved","all","componentDefPendingResolution","componentDefResolved","clearResolutionOfComponentResourcesQueue","componentNeedsResolution","old","hostVars","queueHostBindingForCheck","count","totalHostVars","prefillHostVars","_symbolIterator","getSymbolIterator","iterator","getOwnPropertyNames","looseIdentical","isNaN","devModeEqual","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","comparator","iterator1","iterator2","item1","item2","done","areIterablesEqual","wrapped","wrap","WrappedValue","unwrap","isWrapped","isJsObject","updateBinding","getBinding","bindingUpdated","oldValueToCompare","currValue","throwErrorIfNoChangesMode","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","bindReconciledValue","bound","interpolationV","isBindingUpdated","interpolation1","v0","interpolation2","i0","v1","interpolation3","i1","v2","interpolation4","i2","v3","interpolation5","i3","v4","interpolation6","i4","v5","interpolation7","i5","v6","interpolation8","i6","v7","interpolatedValue","interpolated","markDirty","nothingScheduled","clean","scheduler","playerHandler","flushPlayers","containerInternal","tContainerNode","nextIndex","comment","store","getActiveDirectiveStylingIndex","_updateLastDirectiveIndex","getClassesContext","getStylesContext","stylePropInternal","updated","_stylingProp","resolvedValue","resolveStylePropValue","deferStylingUpdate","defer","updateDirectiveInputValue","_stylingMap","classMapInternal","valueHasChanged","newValues","normalizeProps","allValuesTrue","normalizeIntoStylingMap","newValue","initialValue","forceStylesAsString","normalizeStylingDirectiveInputValue","getRenderer","registerInitialStylingOnTNode","hasAdditionalInitialStyling","attr","updateRawValueOnContext","getContext","TStylingContextDebug","attachStylingDebugObject","lastAttrIndex","elementStart","elementEnd","setDirectiveStylingInput","hostElementIndex","stylingInputs","viewBlockId","containerTNode","startIdx","viewAtPositionId","scanForView","containerTViews","getOrCreateEmbeddedTView","viewHost","isPromise","isObservable","subscribe","eventName","listenerFn","useCapture","eventTargetResolver","listenerInternal","processOutputs","lCleanupIndex","existingListener","hasDirectives","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","findExistingListener","__ngNextListenerFn__","wrapListener","listen","addEventListener","propsLength","minifiedName","output","subscription","idx","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","preventDefault","returnValue","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","ngProjectAsAttrIdx","getProjectAsAttrValue","numProjectionSlots","projectionHeads","tails","componentChild","slotIndex","delayProjection","setDelayProjection","textNative","valueSuffix","getComponent","loadLContextFromNode","getComponentAtNodeIndex","getViewComponent","loadLContext","getRootComponents","getInjector","getDirectives","throwOnNotFound","getHostElement","isBrowserEvents","getListeners","listeners","firstParam","secondParam","listenerElement","useCaptureOrIndx","sort","sortListeners","_published","publishDefaultGlobalUtils","publishGlobalUtil","w","renderComponent","componentType","componentDef","componentTag","hostRNode","rootFlags","createRootContext","createRootComponentView","createRootComponent","hostFeatures","instantiateRootComponent","LifecycleHooksFeature","rootTView","dirIndex","whenRendered","previousValue","currentValue","firstChange","isFirstChange","NgOnChangesFeatureImpl","ngInherit","definition","ngOnChanges","ngOnChangesSetInput","simpleChangesStore","getSimpleChangesStore","setSimpleChangesStore","previousChange","SimpleChange","superType","superDef","baseDef","writeableDef","maybeUnwrapEmpty","baseViewQuery","baseContentQueries","baseHostBindings","inheritHostBindings","inheritViewQuery","inheritContentQueries","superHostBindings","superViewQuery","superContentQueries","superPrototype","prevViewQuery","ctx","prevContentQueries","prevHostBindings","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesProvidersFactoryExist","doesViewProvidersFactoryExist","f","componentProviders","multiFactoryAdd","multiFactory","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","isComponentProvider","multiResolve","factories","componentCount","multiProviders","processProvidersFn","viewProviders","noComponentFactoryError","ERROR_COMPONENT","resolveComponentFactory","_NullComponentFactoryResolver","_ngModule","_factories","ComponentFactoryBoundToModule","rootSelectorOrNode","ComponentFactory","noop","RendererStyleFlags2","SWITCH_ELEMENT_REF_FACTORY","ElementRef","SWITCH_ELEMENT_REF_FACTORY__POST_R3__","slotCount","animations","SWITCH_RENDERER2_FACTORY","SWITCH_RENDERER2_FACTORY__POST_R3__","nodeAtIndex","getOrCreateRenderer2","full","major","minor","patch","VERSION","Version","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","_next","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","check","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","prev","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_head","_tail","atOrAfterIndex","duplicates","_DuplicateItemRecordList","recordList","moveOffset","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","before","KeyValueChangeRecord_","_addToAdditions","_addToChanges","copied","IterableDiffers","extend","find","iterable","DefaultIterableDifferFactory","KeyValueDiffers","kv","DefaultKeyValueDifferFactory","keyValDiff","iterableDiff","defaultIterableDiffers","defaultKeyValueDiffers","SWITCH_TEMPLATE_REF_FACTORY","TemplateRef","SWITCH_TEMPLATE_REF_FACTORY__POST_R3__","SWITCH_VIEW_CONTAINER_REF_FACTORY","ViewContainerRef","SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__","expressionChangedAfterItHasBeenCheckedError","isFirstCheck","err","_addDebugContext","viewDebugError","logError","viewDestroyedError","shiftInitState","priorInitState","newInitState","initState","initIndex","shouldCallLifecycleInitHook","asTextData","asElementData","asProviderData","asPureExpressionData","asQueryList","Services","setCurrentNode","createRootView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","NOOP","_tokenKeyCache","tokenKey","unwrapValue","nodeIdx","bindingIdx","globalBindingIdx","oldValues","createRendererType2","checkBinding","checkAndUpdateBinding","checkBindingNoChanges","bindingName","bindings","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","event","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","isComponentView","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","references","valueType","splitDepsDsl","sourceName","configurable","getParentRenderElement","renderHost","componentRendererType","DEFINITION_CACHE","WeakMap","resolveDefinition","visitRootRenderNodes","lastRenderRootNode","visitSiblingRenderNodes","nodeDef","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","interpolate","valueCount","constAndInterp","_toStringWithNull","inlineInterpolate","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","EMPTY_MAP","UNDEFINED_VALUE","InjectorRefTokenKey","INJECTORRefTokenKey","NgModuleRefTokenKey","NgModuleRef","moduleProvideDef","moduleDef","providersByKey","resolveNgModuleDep","depDef","providerDef","_def","providerInstance","_createProviderInstance","moduleTransitivelyPresent","injectable","depValues","_createClass","_callFactory","attachEmbeddedView","elementData","vcElementData","dvcElementData","_projectedViews","viewDef","nodeFlags","childFlags","markNodeAsProjectedTemplate","attachProjectedView","renderAttachEmbeddedView","detachEmbeddedView","prevView","prevRenderNode","EMPTY_CONTEXT","createComponentFactory","viewDefFactory","ComponentFactory_","getComponentViewDefinitionFactory","_inputs","_outputs","inputsArr","templateName","outputsArr","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","_viewRef","_component","_elDef","changeDetectorRef","Injector_","ComponentRef","createViewContainerData","elDef","elData","ViewContainerRef_","ref","viewRef_","oldViewIndex","newViewIndex","createChangeDetectorRef","renderNodes","fs","disposables","createTemplateData","TemplateRef_","_parentView","allowPrivateServices","createRendererV1","RendererAdapter","delegate","selectorOrNode","namespaceAndName","createViewRoot","createTemplateAnchor","parentElement","projectNodes","attachViewAfter","viewRootNodes","viewAllNodes","listenGlobal","setElementProperty","propertyName","propertyValue","setElementAttribute","attributeValue","setBindingDebugInfo","setElementClass","isAdd","setElementStyle","styleName","styleValue","invokeElementMethod","methodName","setText","animate","moduleType","bootstrapComponents","NgModuleRef_","_moduleType","_bootstrapComponents","_destroyListeners","provDef","initNgModule","injectFlags","ComponentFactoryResolver","lifecycles","callNgModuleLifecycle","RendererV1TokenKey","RendererV1","Renderer2TokenKey","Renderer2","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","checkIndex","nonMinifiedName","securityContext","outputDefs","depDefs","outputIndex","directChildFlags","childMatchedQueries","query","createProviderInstance","createPipeInstance","createClass","createDirectiveInstance","outputObservable","eventHandlerClosure","callFactory","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","searchView","findCompView","allProviders","publicProviders","providerData","updateProp","changes","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","viewEngine_ComponentFactoryResolver","toRefArray","array","nonMinified","minified","SCHEDULER","isBoundToModule","rootViewInjector","createChainedInjector","RendererFactory2","Sanitizer","isIsolated","tElementNode","rootLView","oldLView","nodesforSlot","viewEngine_ElementRef","viewEngine_ComponentFactory","_rootLView","destroyCbs","RootViewRef","viewEngine_ComponentRef","ngI18nClosureMode","goog","getMsg","LocaleDataIndex","LOCALE_DATA","u","floor","abs","getLocalePluralCase","locale","findLocaleData","PluralCase","normalizedLocale","parentLocale","localeEn","DEFAULT_LOCALE_ID","ICU_BLOCK_REGEXP","SUBTEMPLATE_REGEXP","PH_REGEXP","BINDING_REGEXP","ICU_REGEXP","PP_MULTI_VALUE_PLACEHOLDERS_REGEXP","PP_PLACEHOLDERS_REGEXP","PP_ICU_VARS_REGEXP","PP_ICU_PLACEHOLDERS_REGEXP","PP_ICUS_REGEXP","PP_CLOSE_TEMPLATE_REGEXP","PP_TEMPLATE_ID_REGEXP","extractParts","pattern","prevPos","braceStack","braces","lastIndex","exec","pos","block","parseICUBlock","cases","icuType","mainBinding","binding","parseInt","blocks","removeInnerTemplateTranslation","tagMatched","inTemplate","MARKER","generateBindingUpdateOpCodes","destinationNode","updateOpCodes","textParts","textValue","toMaskBit","getBindingMask","icuExpression","valueArr","i18nIndexStack","i18nIndexStackPointer","min","i18nVarsCount","parentIndexStack","subTemplateIndex","parentIndexPointer","createOpCodes","icuExpressions","msgParts","NGSP_UNICODE_REGEXP","replaceNgsp","search","getTranslationForTemplate","phIndex","icuNodeIndex","icuStart","hasBinding","textNodeIndex","numSlotsToAlloc","allocExpando","mutateOpCodes","I18nMutateOpCodesDebug","I18nUpdateOpCodesDebug","icu","icuCase","update","attachI18nOpCodesDebug","tI18n","i18nStartFirstPass","appendI18nNode","previousTNode","replacements","phs","tmpl","placeholders","placeholder","templateId","isCloseTemplateTag","currentTemplateId","_type","_idx","rootIndex","lastCreatedNode","visitedNodes","readCreateOpCodes","removeNode","i18nEndFirstPass","createDynamicNodeAtIndex","currentTNode","textRNode","destinationNodeIndex","destinationTNode","elementNodeIndex","commentNodeIndex","commentRNode","activeCaseIndex","tagNameValue","elementRNode","removedPhTNode","removedPhRNode","previousElementIndex","i18nAttributesFirstPass","changeMask","shiftsCounter","readUpdateOpCodes","bindingsStartIndex","bypassCheckBit","caseCreated","icuTNode","removeCodes","removeOpCode","activeIndex","caseIndex","getCaseIndex","resolvedCase","getPluralCase","LOCALE_ID","tIcus","createCodes","updateCodes","childIcus","nestedIcus","icuIndex","parseIcuCase","opCodes","parseNodes","currentNode","nestedIcusToCreate","lowerAttrName","COMMENT_NODE","NESTED_ICU","nestedIcuIndex","newLocal","nestedIcu","nestedIcuNodeIndex","nestTIcuIndex","TRANSLATIONS","i18nConfigureLocalize","translations","LOCALIZE_PH_REGEXP","setLocaleId","localeId","registerModuleFactory","assertSameOrNotExisting","incoming","registerNgModuleType","getRegisteredNgModuleType","COMPONENT_FACTORY_RESOLVER","_r3Injector","viewEngine_NgModuleFactory","setClassMetadata","clazz","parentPrototype","parentConstructor","slotOffset","thisArg","pureFn","exp","exp5","exp6","exp7","exp8","exps","pipeName","pipeInstance","isPure","transform","isAsync","__isAsync","emit","generatorOrNext","complete","schedulerFn","errorFn","completeFn","sink","symbolIterator","_results","EventEmitter","symbol","proto","QueryList","filter","reduce","init","toArray","reset","resultsTree","last","notifyOnChanges","setDirty","queryList","clone","LQuery_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","parentLQuery","indexInDeclarationView","LQueries_","dirtyQueriesWithMatches","getTQuery","predicate","isStatic","read","queriesForTemplateRef","childQueryIndex","tqueryClone","TQueries_","track","tquery","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","TQuery_","matchTNodeWithReadOption","getIdxOfMatchingSelector","typePredicate","ViewEngine_TemplateRef","nodeMatchIdx","ViewEngine_ElementRef","directiveOrProviderIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tViewData","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","viewResult","embeddedLView","descend","viewQueryInternal","createTQuery","TQueryMetadata_","createLQuery","loadQueryInternal","contentQueryInternal","tViewContentQueries","lastSavedDirectiveIndex","saveContentQueryAndDirectiveIndex","storeCleanupWithContext","angularCoreEnv","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineBase","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetFactoryOf","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵinjectPipeChangeDetectorRef","r3.ɵɵtemplateRefExtractor","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵcontainer","r3.ɵɵnextContext","r3.ɵɵcontainerRefreshStart","r3.ɵɵcontainerRefreshEnd","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵallocHostVars","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵelementContainer","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵlistener","r3.ɵɵload","r3.ɵɵprojection","r3.ɵɵupdateSyntheticHostBinding","r3.ɵɵcomponentHostSyntheticListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵhostProperty","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵviewQuery","r3.ɵɵstaticViewQuery","r3.ɵɵstaticContentQuery","r3.ɵɵloadViewQuery","r3.ɵɵcontentQuery","r3.ɵɵloadContentQuery","r3.ɵɵreference","r3.ɵɵelementHostAttrs","r3.ɵɵclassMap","r3.ɵɵclassMapInterpolate1","r3.ɵɵclassMapInterpolate2","r3.ɵɵclassMapInterpolate3","r3.ɵɵclassMapInterpolate4","r3.ɵɵclassMapInterpolate5","r3.ɵɵclassMapInterpolate6","r3.ɵɵclassMapInterpolate7","r3.ɵɵclassMapInterpolate8","r3.ɵɵclassMapInterpolateV","r3.ɵɵstyling","r3.ɵɵstyleMap","r3.ɵɵstyleProp","r3.ɵɵstylePropInterpolate1","r3.ɵɵstylePropInterpolate2","r3.ɵɵstylePropInterpolate3","r3.ɵɵstylePropInterpolate4","r3.ɵɵstylePropInterpolate5","r3.ɵɵstylePropInterpolate6","r3.ɵɵstylePropInterpolate7","r3.ɵɵstylePropInterpolate8","r3.ɵɵstylePropInterpolateV","r3.ɵɵstyleSanitizer","r3.ɵɵstylingApply","r3.ɵɵclassProp","r3.ɵɵselect","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextBinding","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵembeddedViewStart","r3.ɵɵembeddedViewEnd","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵi18nLocalize","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵdefaultStyleSanitizer","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","moduleQueue","flushingModuleQueue","flushModuleScopingQueueAsMuchAsPossible","every","isResolvedDeclaration","setScopeOnDeclaredComponents","declaration","compileNgModule","compileNgModuleDefs","enqueueModuleForDelayedScoping","allowDuplicateDeclarationsInRoot","expandModuleWithProviders","emitInline","verifySemanticsOfNgModuleDef","compileInjector","importingModule","verifiedNgModule","errors","unwrapModuleWithProvidersImports","mod","verifySemanticsOfNgModuleImport","combinedDeclarations","computeCombinedExports","kind","lastIndexOf","decl","suppressErrors","existingModule","ownerNgModule","verifyDeclarationIsUnique","getAnnotation","entryComponents","verifyComponentIsPartOfNgModule","typeOrWithProviders","collect","__annotations__","readAnnotation","decorator","resetCompiledComponents","transitiveScopes","transitiveScopesFor","patchComponentDefWithScope","ngSelectorScope","compilation","dir","pipe","processNgModuleFn","isNgModule","scopes","exported","declared","importedType","importedScope","entry","exportedType","exportedScope","isModuleWithProviders","compileComponent","maybeQueueResolutionOfComponentResources","directiveMetadata","typeSourceSpan","createParseSourceSpan","preserveWhitespaces","interpolation","usesInheritance","addBaseDefToUndecoratedParents","compileDirective","sourceMapUrl","facade","extendsDirectlyFromObject","extractQueriesMetadata","isContentQuery","lifecycle","usesOnChanges","extractExportAs","viewQueries","objPrototype","extractBaseDefMetadata","compileBase","hasHostDecorators","field","ann","metadataName","bindingPropertyName","isQueryAnn","queriesMeta","isInputAnn","piece","static","convertToR3QueryMetadata","part","compilePipe","Directive","SWITCH_COMPILE_DIRECTIVE","Component","SWITCH_COMPILE_COMPONENT","Pipe","SWITCH_COMPILE_PIPE","Input","Output","HostBinding","hostPropertyName","HostListener","SWITCH_COMPILE_COMPONENT__POST_R3__","render3CompileComponent","SWITCH_COMPILE_DIRECTIVE__POST_R3__","render3CompileDirective","SWITCH_COMPILE_PIPE__POST_R3__","render3CompilePipe","NgModule","SWITCH_COMPILE_NGMODULE","SWITCH_COMPILE_NGMODULE__POST_R3__","render3CompileNgModule","APP_INITIALIZER","appInits","initialized","donePromise","rej","reject","runInitializers","asyncInitPromises","initResult","catch","ApplicationInitStatus","tslib_1.__param","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","fromCharCode","random","MissingTranslationStrategy","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","log","Console","TRANSLATIONS_FORMAT","SWITCH_IVY_ENABLED__POST_R3__","ivyEnabled","ngModuleFactory","componentFactories","_throwError","trace","events","Compiler_compileModuleSync__POST_R3__","NgModuleFactoryR3","Compiler_compileModuleSync","Compiler_compileModuleAsync__POST_R3__","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__POST_R3__","ComponentFactoryR3","ModuleWithComponentFactories","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync__POST_R3__","Compiler_compileModuleAndAllComponentsAsync","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","Compiler","COMPILER_OPTIONS","detectWTF","wtf","createScope","leave","leaveScope","startTimeRange","rangeType","beginTimeRange","endTimeRange","range","wtfEnabled","noopScope","arg0","arg1","wtfCreateScope","wtfLeave","wtfStartTimeRange","wtfEndTimeRange","scheduleMicroTask","Zone","enableLongStackTrace","hasPendingMicrotasks","hasPendingMacrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","zone","_nesting","_outer","_inner","fork","properties","onInvokeTask","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","invoke","onHasTask","hasTaskState","hasTask","change","microTask","checkStable","macroTask","onHandleError","runOutsideAngular","isInAngularZone","assertInAngularZone","NgZone","assertNotInAngularZone","run","runTask","scheduleEventTask","EMPTY_PAYLOAD","cancelTask","runGuarded","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","clearTimeout","timeoutId","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","Testability","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","TestabilityRegistry","setTestabilityGetter","_platform","compileNgModuleFactory","CompilerFactory","createCompiler","compileNgModuleFactory__POST_R3__","moduleFactory","R3NgModuleFactory","compilerOptions","compilerProviders","resourceLoader","ResourceLoader","cf","isBoundToModule__POST_R3__","ALLOW_MULTIPLE_PLATFORMS","createPlatform","PlatformRef","inits","createPlatformFactory","parentPlatformFactory","desc","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","destroyPlatform","_injector","_modules","bootstrapModuleFactory","ngZone","ngZoneOption","NoopNgZone","getNgZone","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","optionsReducer","ApplicationRef","ngDoBootstrap","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","componentTypes","tick","isCurrentlyStable","observer","stableSub","unstableSub","componentOrFactory","compRef","_unloadComponent","_loadComponent","_tickScope","attachView","getModuleFactory__PRE_R3__","noModuleError","getModuleFactory__POST_R3__","getModuleFactory","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","_compiler","_config","load","path","loadFactory","loadAndCompile","exportName","checkNotEmpty","factoryClassSuffix","SystemJsNgModuleLoader","SystemJsNgModuleLoaderConfig","modulePath","_debugContext","DebugElement__PRE_R3__","addChild","providerTokens","childNodes","childIndex","insertChildrenAfter","newChildren","siblingIndex","refChild","newChild","refIndex","queryAll","_queryElementChildren","queryAllNodes","_queryNodeChildren","triggerEventHandler","eventObj","DebugNode__PRE_R3__","asNativeElements","debugEls","DebugElement__POST_R3__","discoverLocalRefs","getInjectionTokens","metadataIndex","currentBindingIndex","getFirstBindingIndex","metadataParts","collectPropertyBindings","hostProperties","hostPropIndex","collectHostPropertyBindings","debugElement","collectClassNames","tNodeAttrs","lowercaseTNodeAttrs","eAttrs","_getStylingDebugInfo","children","getDebugNode__POST_R3__","_queryAllR3","DebugNode__POST_R3__","elementsOnly","_queryNodeChildrenR3","rootNativeNode","_addQueryMatchR3","_queryNativeNodeDescendants","debugNode","getDebugNode","_queryNodeChildrenInContainerR3","head","nextTNode","nextLView","childView","_nativeNodeToDebugNode","indexDebugNode","DebugNode","DebugElement","platformCore","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","LOCALE","APPLICATION_MODULE_PROVIDERS","zoneSchedulerFactory","queue","ViewAction","ApplicationModule","anchorDef","templateFactory","elementDef","fixedAttrs","bindingDefs","suffixOrSecurityContext","isFilled","None","resolveRendererType2","parentEl","preserveContent","listenToElementOutputs","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","checkAndUpdateElementValue","renderValue","unit","queryDef","bindingType","filterId","queryIds","nodeMatchedQueries","tplDef","checkAndUpdateQuery","calcQueryValues","notify","boundValue","getQueryValue","dvc","queryValueType","ngContentDef","appendNgContent","purePipeDef","argCount","_pureExpressionDef","pureArrayDef","pureObjectDef","propToIndex","nbKeys","propertyNames","textDef","staticText","_addInterpolationPart","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentParent","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","validateNode","isPrivateService","isNgContainer","newParent","rootNodeFlags","bindingCount","outputCount","nodeCount","parentEnd","createView","initView","createViewNodes","compRenderer","hostDef","nodeData","compViewDef","execComponentViewsAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","v8","v9","bindLen","checkAndUpdateElementInline","checkAndUpdateTextInline","checkAndUpdateDirectiveInline","checkAndUpdatePureExpressionInline","checkAndUpdateNodeInline","checkAndUpdateElementDynamic","checkAndUpdateTextDynamic","checkAndUpdateDirectiveDynamic","checkAndUpdatePureExpressionDynamic","checkAndUpdateNodeDynamic","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","detachProjectedView","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","DebugContext_","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","createProdRootView","prodCheckAndUpdateNode","prodCheckNoChangesNode","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","viewDefOverrides","hasOverrides","hasDeprecatedOverrides","providerOverrides","override","deprecatedBehavior","providerOverridesWithScope","applyProviderOverrides","applyProviderOverridesToNgModule","_currentAction","_currentView","_currentNodeIndex","comp","compFactory","hostViewDef","elementIndicesWithOverwrittenProviders","elIndicesWithOverwrittenProviders","lastElementDef","findElementIndicesWithOverwrittenProviders","applyProviderOverridesToElement","elIndex","nextDirectiveWithBinding","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","givenValues","bindingValues","elView","elOrCompView","childDef","collectReferences","findHostElement","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","nodeLogger","refName","oldAction","oldNodeIndex","viewWrappedDebugError","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","debugContextFactory","removeDebugNodeFromIndex","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","fullName","DebugEventListener","createNgModuleFactory","defFactory","NgModuleFactory_","_ngModuleDefFactory","cloneNgModuleDefinition","NgModuleFactory","extendStatics","setPrototypeOf","__extends","__","__assign","assign","__decorate","getOwnPropertyDescriptor","Reflect","decorate","__param","paramIndex","__metadata","metadataKey","metadataValue","__awaiter","_arguments","P","generator","fulfilled","step","rejected","__generator","y","g","label","sent","trys","ops","verb","op","TypeError","__values","__read","ar","__spread","hookCallback","hooks","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","Date","valueOf","createUTC","format","strict","createLocalOrUTC","utc","getParsingFlags","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","isValid","_isValid","parsedParts","isNowValid","_d","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","fun","momentProperties","updateInProgress","copyConfig","to","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","deprecations","deprecateSimple","isFunction","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","number","targetLength","forceSign","absNumber","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","formatMoment","expandFormat","mom","makeFormatFunction","invalidDate","replaceLongDateFormatTokens","longDateFormat","aliases","addUnitAlias","shorthand","lowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","isLeapYear","year","absFloor","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","regexEscape","matched","p1","p2","p3","p4","addParseToken","addWeekParseToken","_w","addTimeToArrayFromToken","_a","x","modMonth","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","parseTwoDigitYear","getSetYear","createDate","h","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","day","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","hours","lowercase","minutes","matchMeridiem","_meridiemParse","seconds","kInput","_isPm","isPM","_meridiem","pos1","pos2","globalLocale","getSetHour","baseConfig","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","LT","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","relativeTime","future","past","ss","mm","hh","dd","ww","MM","yy","meridiemParse","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","_abbr","getSetGlobalLocale","getLocale","defineLocale","abbr","names","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","string","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","getDay","checkWeekday","obsOffset","militaryOffset","numOffset","hm","calculateOffset","setUTCMinutes","getUTCMinutes","defaults","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","now","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","currentDateArray","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","_week","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","hour","isPm","meridiemHour","meridiemFixWrap","erasConvertYear","prepareConfig","preparse","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","score","configFromStringAndArray","createFromInputFallback","configFromString","dayOrDate","minute","second","millisecond","configFromObject","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","unitHasDecimal","parseFloat","isDurationValid","_milliseconds","_days","_months","_bubble","isDuration","absRound","round","utcOffset","sign","offsetFromString","chunkOffset","matcher","cloneWithOffset","model","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","ret","diffRes","base","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","period","tmp","addSubtract","isAdding","invalid","subtract","isString","isMomentInput","arrayTest","dataTypeTest","isNumberOrStringArray","objectTest","propertyTest","isMomentInputObject","isCalendarSpec","monthDiff","wholeMonthDiff","newLocaleData","defaultFormat","defaultFormatUtc","lang","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","abbrPieces","namePieces","narrowPieces","eras","narrow","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","eraYearOrdinalParse","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","preParsePostFormat","time","formats","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","postformat","withoutSuffix","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","getPrioritizedUnits","toObject","toDate","toISOString","keepOffset","inspect","isLocal","for","toJSON","unix","creationData","eraName","since","until","eraNarrow","eraAbbr","eraYear","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_isDSTShifted","array1","array2","dontConvert","lengthDiff","diffs","compareArrays","proto$1","get$1","listMonthsImpl","out","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","toUpperCase","tok","_invalidDate","_ordinal","isFuture","_relativeTime","pastFuture","_eras","isFormat","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","isLower","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","posNegDuration","relativeTime$1","toIsoString","version","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","limit","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","DATE","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","num","isDateValid","_mapUnits","_unit","removeFormattingTokens","getHours","getUTCHours","getMinutes","getSeconds","getUTCSeconds","getMilliseconds","getUTCMilliseconds","getFirstDayOfMonth","isFirstDayOfWeek","isSameMonth","date1","date2","isSameYear","isSameDay","matchTimestamp","_token","getYear","defaultTimeUnit","shiftDate","setFullDate","getNum","setUTCMonth","setDate","setUTCDate","cloneDate","_date","setUTCHours","setHours","setMinutes","setUTCSeconds","setSeconds","setUTCMilliseconds","setMilliseconds","getLocaleDayOfWeek","setLocaleDayOfWeek","setDayOfWeek","getDayOfWeek","setISODayOfWeek","getDayOfYear","someDate","defaultLongDateFormat","confKey","standalone","handleMonthStrictParse","_shortMonths","_key","handleWeekStrictParse","formatLongDate","initWeek","getWeek","getISOWeek","_getWeekYearFormatCb","getWeekYear","_getISOWeekYearFormatCb","getISOWeekYear","initTimestamp","initQuarter","getQuarter","addOffsetFormatToken","getUTCOffset","initOffset","_min","initHour","kFormat","parentProp","childProp","initMillisecond","getISODayOfWeek","setDefaultLocale","listLocales","orderingHash","mem","order","dur","bubble","localeKey","_units","markInvalid","formatDate","_format","formatArr","inputLength","_hour","createFromConfig","_arr","_input","parseDate","isDisabledDay","daysDisabled","_other","offsetDiff","momentsDifference","convertDuration","_num","_weekDay","symbolMap","1","2","3","4","5","6","7","8","9","0","numberMap","pluralForm","plurals","pluralize","arLocale","weekdaysParseExact","bgLocale","Number","lastDigit","last2Digits","monthsShortDot","caLocale","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","plural","translate","csLocale","daLocale","processRelativeTime","deLocale","monthsParseExact","enGbLocale","esDoLocale","esLocale","esUsLocale","etLocale","numbersPast","numbersFuture","verbalNumber","fiLocale","ll","lll","llll","frLocale","glLocale","heLocale","hiLocale","weekEndings","huLocale","idLocale","itLocale","jaLocale","koLocale","isUpper","translateSingular","forms","special","ltLocale","mnLocale","nbLocale","monthsShortWithDots","monthsShortWithoutDots","nlBeLocale","nlLocale","monthsNominative","monthsSubjective","plLocale","ptBrLocale","relativeTimeWithPlural","roLocale","word","ruLocale","skLocale","slLocale","svLocale","thLocale","suffixes","70","80","20","50","100","10","30","60","90","trLocale","viLocale","zhCnLocale","TagContentType","splitNsName","elementName","colonIndex","isNgContent","isNgTemplate","getNsPrefix","mergeNsAndName","localName","NAMED_ENTITIES","_DEFAULT_TAG_DEFINITION","TAG_DEFINITIONS","closedByChildren","implicitNamespacePrefix","contentType","closedByParent","isVoid","ignoreFirstLf","canSelfClose","isClosedByChild","getHtmlTagDefinition","HtmlTagDefinition","RAW_TEXT","ESCAPABLE_RAW_TEXT","_SELECTOR_REGEXP","classNames","notSelectors","parse","_addResult","cssSel","cssSelector","CssSelector","inNot","setElement","addClassName","addAttribute","isElementSelector","hasElementSelector","getMatchingElementTemplate","classAttr","getAttrs","klass","notSelector","_elementMap","_elementPartialMap","_classMap","_classPartialMap","_attrValueMap","_attrValuePartialMap","_listContexts","createNotMatcher","notMatcher","SelectorMatcher","addSelectables","cssSelectors","callbackCtxt","listContext","SelectorListContext","_addSelectable","selectable","SelectorContext","isTerminal","_addTerminal","_addPartial","terminalMap","terminalValuesMap","partialMap","partialValuesMap","terminalList","matchedCallback","alreadyMatched","_matchTerminal","_matchPartial","selectables","starSelectables","finalize","nestedSelector","cbContext","createInject","makeMetadataFactory","createInjectionToken","createAttribute","createContentChildren","createContentChild","createViewChildren","createViewChild","createDirective","createPipe","createInput","createOutput","createHostBinding","createHostListener","createNgModule","createInjectable","createOptional","createSelf","createSkipSelf","createHost","isTypeOf","parserSelectorToR3Selector","positive","parserSelectorToSimpleSelector","negative","parserSelectorToNegativeSelector","parseSelectorToR3Selector","TypeModifier","BuiltinTypeName","modifiers","hasModifier","modifier","BinaryOperator","visitType","visitor","visitBuiltinType","typeParams","visitExpressionType","of","visitArrayType","visitMapType","DYNAMIC_TYPE","BuiltinType","Dynamic","INFERRED_TYPE","Inferred","BOOL_TYPE","Bool","NUMBER_TYPE","Int","NONE_TYPE","nullSafeIsEquivalent","isEquivalent","areAllEquivalent","BuiltinVar","sourceSpan","ReadPropExpr","ReadKeyExpr","callMethod","InvokeMethodExpr","callFn","InvokeFunctionExpr","instantiate","InstantiateExpr","conditional","trueCase","falseCase","ConditionalExpr","equals","rhs","BinaryOperatorExpr","Equals","notEquals","NotEquals","identical","Identical","notIdentical","NotIdentical","minus","Minus","plus","Plus","divide","Divide","multiply","Multiply","modulo","Modulo","and","And","bitwiseAnd","parens","BitwiseAnd","or","Or","Lower","lowerEquals","LowerEquals","bigger","Bigger","biggerEquals","BiggerEquals","isBlank","TYPED_NULL_EXPR","cast","CastExpr","toStmt","ExpressionStatement","BuiltinMethod","builtin","ReadVarExpr","isConstant","visitExpression","visitReadVarExpr","WriteVarExpr","Expression","expr","visitTypeofExpr","TypeofExpr","WrappedNodeExpr","visitWrappedNodeExpr","visitWriteVarExpr","toDeclStmt","DeclareVarStmt","toConstDecl","StmtModifier","Final","receiver","WriteKeyExpr","visitWriteKeyExpr","WritePropExpr","visitWritePropExpr","visitInvokeMethodExpr","visitInvokeFunctionExpr","classExpr","visitInstantiateExpr","LiteralExpr","visitLiteralExpr","ExternalExpr","moduleName","visitExternalExpr","condition","visitConditionalExpr","NotExpr","visitNotExpr","AssertNotNull","visitAssertNotNullExpr","visitCastExpr","statements","FunctionExpr","visitFunctionExpr","DeclareFunctionStmt","operator","lhs","visitBinaryOperatorExpr","visitReadPropExpr","visitReadKeyExpr","LiteralArrayExpr","visitLiteralArrayExpr","quoted","LiteralMapExpr","visitLiteralMapExpr","CommaExpr","visitCommaExpr","NULL_EXPR","This","Super","CatchError","CatchStack","stmt","visitStatement","visitDeclareVarStmt","Statement","visitDeclareFunctionStmt","visitExpressionStmt","ReturnStatement","visitReturnStmt","initializer","AbstractClassPart","fields","getters","constructorMethod","methods","ClassStmt","visitDeclareClassStmt","IfStmt","visitIfStmt","multiline","CommentStmt","visitCommentStmt","JSDocCommentStmt","visitJSDocCommentStmt","tagToString","serializeTags","bodyStmts","catchStmts","TryCatchStmt","visitTryCatchStmt","visitThrowStmt","transformExpr","transformStmt","ast","visitAllExpressions","visitAllStatements","LiteralMapEntry","mapType","MapType","exprs","ClassGetter","ctorMethod","ClassMethod","ThrowStmt","stmts","findReadVarNames","_ReadVarVisitor","varNames","RecursiveAstVisitor","externalReferences","applySourceSpanToStatementIfNeeded","transformer","_ApplySourceSpanTransformer","applySourceSpanToExpressionIfNeeded","_clone","AstTransformer","variable","importExpr","importType","typeModifiers","expressionType","ExpressionType","literalArr","literalMap","ifStmt","thenClause","elseClause","literal","DASH_CASE_REGEXP","splitAtColon","defaultValues","_splitAt","character","characterIndex","visitValue","visitArray","STRING_MAP_PROTO","visitStringMap","visitPrimitive","visitOther","isDefined","noUndefined","SyncAsync","syncAsyncValues","syntaxError","parseErrors","ERROR_SYNTAX_ERROR","ERROR_PARSE_ERRORS","escapeRegExp","utf8Encode","encoded","codePoint","low","splits","KEY_CONTEXT","original","FixupExpression","fixup","expression","shared","o.Expression","literals","literalFactories","injectorDefinitions","directiveDefinitions","componentDefinitions","pipeDefinitions","nextNameIndex","getConstLiteral","forceShared","o.LiteralExpr","keyOf","freshName","o.variable","o.INFERRED_TYPE","o.StmtModifier","getDefinition","definitions","definitionsOf","propertyNameOf","getLiteralFactory","o.LiteralArrayExpr","argumentsForKey","o.literal","o.literalArr","_getLiteralFactory","expressionForKey","o.literalMap","resultMap","literalFactory","literalFactoryArguments","resultExpressions","pureFunctionDeclaration","o.fn","isVariable","o.FnParam","o.DYNAMIC_TYPE","o.ReturnStatement","uniqueName","KeyVisitor","quote","mapKey","o.ReadVarExpr","CORE","CodegenComponentFactoryResolver","createModuleFactory","moduleProviderDef","RegisterModuleFactoryFn","InjectableDef","Renderer","RendererType2","ViewDefinition","createTokenForReference","reference","createTokenForExternalReference","resolveExternalReference","filePath","assertNoMembers","cache","declarationFile","StaticSymbol","HOST_REG_EXP","sanitizeIdentifier","CompileSummaryKind","_anonymousTypeIndex","identifierName","compileIdentifier","identifierModuleUrl","viewClassName","compType","embeddedTemplateIndex","rendererTypeName","componentFactoryName","tokenName","tokenReference","_normalizeArray","htmlAst","externalStylesheets","isInline","toSummary","isHost","hostListeners","hostAttributes","componentViewType","inputsMap","bindConfig","outputsMap","CompileDirectiveMetadata","summaryKind","declaredDirectives","exportedDirectives","declaredPipes","exportedPipes","importedModules","exportedModules","transitiveModule","directivesSet","exportedDirectivesSet","pipesSet","exportedPipesSet","modulesSet","entryComponentsSet","addProvider","addDirective","addExportedDirective","addPipe","addExportedPipe","addModule","addEntryComponent","ec","flat","flatItem","jitSourceUrl","templateSourceUrl","compMeta","templateMeta","NEW_METHOD","TRANSFORM_METHOD","PATCH_DEPS","namespaceHTML","namespaceMathML","namespaceSVG","select","updateSyntheticHostBinding","componentHostSyntheticListener","attribute","attributeInterpolate1","attributeInterpolate2","attributeInterpolate3","attributeInterpolate4","attributeInterpolate5","attributeInterpolate6","attributeInterpolate7","attributeInterpolate8","attributeInterpolateV","elementContainerStart","elementContainerEnd","elementContainer","styling","classMapInterpolate1","classMapInterpolate2","classMapInterpolate3","classMapInterpolate4","classMapInterpolate5","classMapInterpolate6","classMapInterpolate7","classMapInterpolate8","classMapInterpolateV","stylePropInterpolate1","stylePropInterpolate2","stylePropInterpolate3","stylePropInterpolate4","stylePropInterpolate5","stylePropInterpolate6","stylePropInterpolate7","stylePropInterpolate8","stylePropInterpolateV","stylingApply","elementHostAttrs","containerCreate","nextContext","templateCreate","textBinding","enableBindings","disableBindings","allocHostVars","getCurrentView","textInterpolate","textInterpolate1","textInterpolate2","textInterpolate3","textInterpolate4","textInterpolate5","textInterpolate6","textInterpolate7","textInterpolate8","textInterpolateV","restoreView","pureFunction0","pureFunction1","pureFunction2","pureFunction3","pureFunction4","pureFunction5","pureFunction6","pureFunction7","pureFunction8","pureFunctionV","pipeBind1","pipeBind2","pipeBind3","pipeBind4","pipeBindV","hostProperty","propertyInterpolate","propertyInterpolate1","propertyInterpolate2","propertyInterpolate3","propertyInterpolate4","propertyInterpolate5","propertyInterpolate6","propertyInterpolate7","propertyInterpolate8","propertyInterpolateV","i18n","i18nAttributes","i18nExp","i18nStart","i18nEnd","i18nApply","i18nPostprocess","i18nLocalize","projectionDef","injectAttribute","injectPipeChangeDetectorRef","directiveInject","templateRefExtractor","resolveWindow","resolveDocument","resolveBody","defineBase","BaseDef","defineComponent","setComponentScope","ComponentDefWithMeta","defineDirective","DirectiveDefWithMeta","InjectorDef","defineInjector","NgModuleDefWithMeta","defineNgModule","setNgModuleScope","PipeDefWithMeta","definePipe","queryRefresh","staticViewQuery","staticContentQuery","loadViewQuery","contentQuery","loadContentQuery","NgOnChangesFeature","InheritDefinitionFeature","ProvidersFeature","getFactoryOf","getInheritedFactory","sanitizeHtml","sanitizeStyle","defaultStyleSanitizer","sanitizeResourceUrl","sanitizeScript","sanitizeUrl","sanitizeUrlOrResourceUrl","isWhitespace","isDigit","isAsciiLetter","isNewLine","isOctalDigit","ParseErrorLevel","file","line","col","moveBy","ch","priorLine","ParseLocation","maxChars","maxLines","startOffset","endOffset","ctxChars","ctxLines","after","details","EMPTY_PARSE_LOCATION","ParseSourceFile","ParseSourceSpan","span","ERROR","contextualMessage","visit","visitText","visitBoundText","valueSpan","visitTextAttribute","fromBoundElementProperty","BoundAttribute","visitBoundAttribute","handler","phase","handlerSpan","fromParsedEvent","targetOrPhase","BoundEvent","visitBoundEvent","startSourceSpan","endSourceSpan","visitElement","templateAttrs","variables","visitTemplate","visitContent","visitVariable","visitReference","visitIcu","visitAll","newAttributes","transformAll","newInputs","newOutputs","newReferences","Element","newTemplateAttrs","newVariables","Template","newNode","placeholderToMessage","meaning","description","startLine","startCol","endLine","endCol","visitContainer","startName","closeName","visitTagPlaceholder","visitPlaceholder","visitIcuPlaceholder","Text","Container","Icu","expressionPlaceholder","ph","TagPlaceholder","Placeholder","IcuPlaceholder","digest","utf8","words32","endian","wordAt","stringToWords32","Endian","Big","h0","h1","h2","h3","h4","rol32","add32","hex","byteAt","byteStringToHexString","words32ToByteString","sha1","serializerVisitor","decimalDigest","_SerializerIgnoreIcuExpVisitor","hi","lo","him","lom","ah","al","bh","bl","carry","decimal","toThePower","addBigInt","numberTimesBigInt","byteStringToDecString","computeMsgId","strCases","_SerializerVisitor","fk","fingerprint","hash32","Little","mix","sub32","add32to64","high","word32ToByteString","sum","tmpSum","product","bToThePower","createNameMapper","mapName","internalToPublic","publicToNextId","publicToInternal","toPublicName","toInternalName","visitPlaceholderName","nextId","i18n.RecurseVisitor","_visitor","visitTag","strAttrs","_serializeAttributes","strChildren","visitDeclaration","visitDoctype","doctype","rootTag","dtd","serialize","unescapedAttrs","escapeXml","unescapedValue","_ESCAPED_CHARS","write","messages","exampleVisitor","ExampleVisitor","_Visitor","rootNode","xml.Tag","sourceTags","xml.Text","xml.CR","xml.serialize","xml.Declaration","encoding","xml.Doctype","addDefaultExamples","SimplePlaceholderMapper","Serializer","startTagAsText","startEx","startTagPh","closeTagAsText","closeEx","closeTagPh","interpolationAsText","exTag","icuCases","icuAsText","exText","mapLiteral","i18nTranslationToDeclStmt","closureVar","o.DeclareVarStmt","docStatements","o.JSDocCommentStmt","i18nMetaToDocStmt","thenStatements","googFnCall","o.ExpressionStatement","localizeFnCall","o.importExpr","R3","elseStatements","o.ifStmt","isI18nAttribute","isI18nRootNode","i18n.Message","isSingleI18nIcu","i18n.Icu","metaFromI18nMessage","icuFromI18nMessage","wrapI18nPlaceholder","contextId","getSeqNumberGenerator","startsAt","placeholdersToParams","updatePlaceholderMap","assembleBoundTextPlaceholders","i18n.Container","i18n.Placeholder","formatI18nPlaceholderName","useCamelCase","postfix","chunks","raw","getTranslationConstPrefix","extra","UNSAFE_OBJECT_KEY_NAME_REGEXP","temporaryAllocator","unsupported","asLiteral","conditionallyCreateMapObjectLiteral","keepDeclared","mapToExpression","trimTrailingNulls","getQueryPredicate","constantPool","R3FactoryDelegateType","toLiteralMap","getAttrsForDirectiveMatching","elOrTpl","attributesMap","t.Template","chainedInstruction","calls","getInterpolationArgsLength","expressions","strings","compileFactoryFunction","typeForCtor","isDelegatedMetadata","o.BinaryOperatorExpr","o.BinaryOperator","ctorExpr","o.InstantiateExpr","injectDependencies","injectFn","baseFactory","baseFactoryStmt","Exported","ctorExprFinal","retExpr","makeConditionalFactory","nonCtorExpr","o.NULL_EXPR","ctorStmt","makeErrorStmt","delegateType","Factory","delegateFactory","delegateFactoryStmt","delegateArgs","delegateDeps","Class","o.InvokeFunctionExpr","isExpressionFactoryMetadata","flagsParam","compileInjectDependency","dependenciesFromGlobalMetadata","outputCtx","Identifiers","diDeps","dependency","tokenRef","isAttribute","isOptional","isSelf","isSkipSelf","o.ThrowStmt","mapToMapExpression","convertMetaToOutput","typeWithParameters","numParams","o.expressionType","prepareSyntheticPropertyName","prepareSyntheticListenerFunctionName","assertArrayOfStrings","UNUSABLE_INTERPOLATION_REGEXPS","assertInterpolationSymbols","regexp","fromArray","markers","InterpolationConfig","DEFAULT_INTERPOLATION_CONFIG","sourcesContent","lines","lastCol0","hasMappings","addSource","addLine","addMapping","col0","sourceUrl","sourceLine0","sourceCol0","currentLine","sourcesIndex","mappings","lastSourceIndex","lastSourceLine0","lastSourceCol0","segments","segment","segAsStr","toBase64VLQ","toJsComment","b64","toBase64Digit","toBase64String","digit","_SINGLE_QUOTE_ESCAPE_STRING_RE","_LEGAL_IDENTIFIER_RE","CATCH_ERROR_VAR","CATCH_STACK_VAR","indent","partsLength","srcSpans","_indent","_classes","_preambleLineCount","_lines","_EmittedLine","createRoot","EmitterVisitorContext","println","lastPart","print","lineIsEmpty","_currentLine","lineLength","newLine","removeEmptyLastLine","incIndent","decIndent","pushClass","popClass","toSource","sourceLines","_createIndent","toSourceMapGenerator","genFilePath","startsAtLine","SourceMapGenerator","firstOffsetMapped","mapFirstOffsetIfNeeded","lineIdx","spans","spanIdx","sourceLine","sourceCol","setPreambleLineCount","spanOf","column","emittedLine","columnsLeft","partIndex","_escapeDollarInStrings","hasElseCase","lineWasEmpty","getBuiltinMethodName","varName","o.BuiltinVar","escapeIdentifier","opStr","visitAllObjects","incrementedIndent","escapeDollar","alwaysQuote","_visitClassConstructor","_visitClassGetter","_visitClassMethod","_visitParams","fnExpr","currentClass","o.BuiltinMethod","ConcatArray","SubscribeObservable","Bind","AbstractEmitterVisitor","evaluateStatements","createSourceMaps","converter","JitEmitterVisitor","createReturnStmt","evaluateCode","getArgs","createSourceMap","fnBody","fnArgNames","fnArgValues","argName","emptyFn","headerLines","executeFunction","_evalArgNames","_evalArgValues","_evalExportedVars","o.LiteralMapExpr","resultVar","o.LiteralMapEntry","_emitReferenceToExternal","AbstractJsEmitterVisitor","shallowAnnotations","tryAnnotations","componentModuleUrl","cmpMetadata","containsForwardDecls","additionalStatements","definitionMap","refsToArray","setNgModuleScopeCall","scopeMap","generateSetNgModuleScopeCall","o.ExpressionType","tupleTypeOf","o.NONE_TYPE","refs","shouldForwardDeclare","compilePipeFromMetadata","definitionMapValues","errLocation","ctxLocation","uninterpretedExpression","visitQuote","AST","visitImplicitReceiver","visitChain","trueExp","falseExp","visitConditional","visitPropertyRead","visitPropertyWrite","visitSafePropertyRead","visitKeyedRead","visitKeyedWrite","visitPipe","visitLiteralPrimitive","visitLiteralArray","visitLiteralMap","visitInterpolation","operation","left","right","visitBinary","visitPrefixNot","visitNonNullAssert","visitMethodCall","visitSafeMethodCall","visitFunctionCall","absoluteOffset","ParseSpan","AbsoluteSourceSpan","visitASTWithSource","keyIsVar","asts","Interpolation","LiteralPrimitive","PropertyRead","PropertyWrite","SafePropertyRead","MethodCall","SafeMethodCall","FunctionCall","LiteralArray","LiteralMap","Binary","PrefixNot","NonNullAssert","Conditional","BindingPipe","KeyedRead","KeyedWrite","Chain","Quote","modified","ParsedPropertyType","isLiteral","LITERAL_ATTR","isAnimation","ANIMATION","allowDefault","render3Stmts","statement","convertActionBinding","localResolver","implicitReceiver","bindingId","interpolationFunction","baseSourceSpan","DefaultLocalResolver","actionWithoutBuiltins","convertPropertyBindingBuiltins","createLiteralArrayConverter","createLiteralMapConverter","createPipeConverter","_AstToIrVisitor","actionStmts","flattenStatements","_Mode","temporaryCount","temporaryDeclaration","prependTemporaryDecls","usesImplicitReceiver","notifyImplicitReceiverUse","preventDefaultVar","returnExpr","convertStmtIntoExpression","createPreventDefaultVar","ConvertActionBindingResult","converterFactory","_BuiltinAstConverter","convertBuiltins","BindingForm","currValExpr","convertPropertyBinding","expressionWithoutBuiltins","form","createCurrValueExpr","outputExpr","getStatementsFromVisitor","TrySimple","ConvertPropertyBindingResult","temporaryName","temporaryNumber","ensureExpressionMode","convertToStatementIfNeeded","_converterFactory","tslib_1.__spread","BuiltinFunctionCall","cdAst.AstTransformer","_localResolver","_implicitReceiver","_nodeMap","_resultMap","_currentTemporary","_visit","convertSourceSpan","ensureStatementMode","convertedArgs","leftMostSafe","leftMostSafeNode","convertSafeAccess","_getLocal","getLocal","cdAst.ImplicitReceiver","prevUsesImplicitReceiver","varExpr","localExpr","o.ReadPropExpr","guardedExpression","temporary","needsTemporary","allocateTemporary","cdAst.SafeMethodCall","cdAst.MethodCall","cdAst.PropertyRead","access","releaseTemporary","visitSome","tempNumber","EventHandlerVars","cdAst.FunctionCall","strictStyling","shimCssText","cssText","hostSelector","commentsWithHash","_commentWithHashRe","_commentRe","stripComments","_insertDirectives","scopedCssText","_scopeCssText","_insertPolyfillDirectivesInCssText","_insertPolyfillRulesInCssText","_cssContentNextSelectorRe","_cssContentRuleRe","rule","scopeSelector","unscopedRules","_extractUnscopedRulesFromCssText","_insertPolyfillHostInCssText","_convertColonHost","_convertColonHostContext","_convertShadowDOMSelectors","_scopeSelectors","_cssContentUnscopedRuleRe","_convertColonRule","_cssColonHostRe","_colonHostPartReplacer","_cssColonHostContextRe","_colonHostContextPartReplacer","regExp","partReplacer","_polyfillHostNoCombinator","_polyfillHost","_shadowDOMSelectorsRe","ruleCallback","inputWithEscapedBlocks","nextBlockIndex","_scopeSelector","CssRule","inputParts","_curlyRe","resultParts","escapedBlocks","bracketCount","currentBlockParts","StringWithEscapedBlocks","escapeBlocks","escapedString","_ruleRe","contentPrefix","_shadowDeepSelectors","deepParts","shallowPart","_selectorNeedsScoping","_applyStrictSelectorScope","_applySelectorScope","applyScope","otherParts","_makeScopeMatcher","_selectorReSuffix","_applySimpleSelectorScope","_polyfillHostRe","_polyfillHostNoCombinatorRe","hnc","colon","_scopeSelectorPart","scopedP","safeContent","SafeSelector","scopedSelector","sep","shouldScope","restore","_colonHostContextRe","_polyfillHostContext","_colonHostRe","keep","replaceBy","_content","pseudo","_parenSuffix","stylesVar","isShimmed","_urlResolver","_shadowCss","ShadowCss","_compileStyles","CompileStylesheetMetadata","needsStyleShim","compileStyles","stylesheet","shim","isComponentStylesheet","styleExpressions","plainStyle","_shimIfNeeded","exprIndex","StylesCompileDependency","getStylesVarName","o.ArrayType","o.TypeModifier","Const","CompiledStylesheet","position","parentOf","childOf","switchValue","switchValueSourceSpan","visitExpansion","valueSourceSpan","expSourceSpan","visitExpansionCase","visitAttribute","visitComment","astResult","TokenType","visitChildren","errorMsg","tokenType","ParseError","_CR_OR_CRLF_REGEXP","_unexpectedCharacterErrorMsg","charCode","_unknownEntityErrorMsg","entitySrc","_file","_getTagDefinition","_currentTokenStart","_currentTokenType","_expansionCaseStack","_inInterpolation","_tokenizeIcu","tokenizeExpansionForms","_interpolationConfig","interpolationConfig","_leadingTriviaCodePoints","leadingTriviaChars","codePointAt","endPos","startPos","_cursor","EscapedCharacterCursor","PlainCharacterCursor","_processCarriageReturns","tokenize","peek","_attemptCharCode","_consumeCdata","_consumeComment","_consumeDocType","_consumeTagClose","_consumeTagOpen","_tokenizeExpansionForm","_consumeText","_beginToken","EOF","_endToken","TokenizeResult","srcTokens","dstTokens","lastDstToken","TEXT","mergeTextTokens","isExpansionFormStart","_consumeExpansionFormStart","chars.isAsciiLetter","chars.isDigit","_isInExpansionForm","_consumeExpansionCaseStart","_isInExpansionCase","_consumeExpansionCaseEnd","_consumeExpansionFormEnd","TokenError","getSpan","_createError","_ControlFlowError","CursorError","advance","_attemptCharCodeCaseInsensitive","code1","code2","toUpperCaseCharCode","_requireCharCode","_attemptStr","charsLeft","initialPosition","_attemptStrCaseInsensitive","_requireStr","_attemptCharCodeUntilFn","_requireCharCodeUntilFn","_attemptUntilChar","char","_readChar","decodeEntities","_decodeEntity","fromCodePoint","nameStart","isNamedEntityEnd","getChars","isHex","codeStart","isDigitEntityEnd","strNum","_consumeRawText","endMarkerPredicate","tagCloseStart","foundEndMarker","COMMENT_START","COMMENT_END","CDATA_START","CDATA_END","DOC_TYPE","contentStart","_consumePrefixAndName","nameOrPrefixStart","isNameEnd","openTagToken","tokensBeforeTagOpen","innerStart","_consumeTagOpenStart","isNotWhitespace","_consumeAttributeName","_consumeAttributeValue","_consumeTagOpenEnd","contentTokenType","_consumeRawTextWithTagClose","TAG_CLOSE","TAG_OPEN_START","attrNameStart","ATTR_NAME","prefixAndName","ATTR_QUOTE","quoteChar","ATTR_VALUE","valueStart","TAG_OPEN_END_VOID","TAG_OPEN_END","EXPANSION_FORM_START","_readUntil","EXPANSION_CASE_VALUE","EXPANSION_CASE_EXP_START","EXPANSION_CASE_EXP_END","EXPANSION_FORM_END","_isTextEnd","isInterpolation","chars.isWhitespace","chars.isAsciiHexDigit","fileOrCursor","advanceState","updatePeek","leadingTriviaCodePoints","currentChar","chars.isNewLine","internalState","processEscapeSequence","digitStart","decodeHexDigits","chars.isOctalDigit","octal","TreeError","rootNodes","getTagDefinition","tokensAndErrors","_Tokenizer","lex.tokenize","treeAndErrors","_TreeBuilder","build","ParseTreeResult","_index","_rootNodes","_errors","_elementStack","_advance","_peek","lex.TokenType","_consumeStartTag","_consumeEndTag","_closeVoidElement","_consumeExpansion","_advanceIf","startToken","_addToParent","html.Comment","expCase","_parseExpansionCase","html.Expansion","_collectExpansionExpTokens","lex.Token","parsedExp","html.ExpansionCase","expansionFormStack","lastOnStack","_getParentElement","html.Text","startTagToken","_consumeAttr","_getElementFullName","selfClosing","tagDef","html.Element","_pushElement","_popElement","endTagToken","stackIndex","valueToken","html.Attribute","_getParentElementSkippingContainers","_insertBeforeContainer","Parser","SKIP_WS_TRIM_TAGS","NO_WS_REGEXP","WS_REPLACE_REGEXP","html.visitAll","expansion","expansionCase","removeWhitespaces","htmlAstWithErrors","WhitespaceVisitor","PLURAL_CASES","expandNodes","expander","_Expander","ExpansionResult","isExpanded","expanded","ExpansionError","expansionResult","switchAttr","_expandDefaultForm","ProviderAstType","visitAttr","BoundPropertyMapping","fromBoundProperty","BoundElementPropertyAst","visitElementProperty","BoundEventAst","calcFullName","visitEvent","originalValue","fromParsedVariable","VariableAst","hasViewContainer","queryMatches","visitEmbeddedTemplate","directiveName","visitDirectiveProperty","hostEvents","contentQueryStartId","visitDirective","eager","providerType","lifecycleHooks","isModule","visitNgContent","templateVisitAll","viewQueryId","_addQueryToTokenMap","_getViewQueries","viewContext","_isViewRoot","_directiveAsts","isTemplate","_sourceSpan","_transformedProviders","_seenProviders","_queriedTokens","transformedHasViewContainer","_attrs","attrAst","targetErrors","providersByToken","directivesMeta","directiveAst","_allProviders","_resolveProviders","PublicService","PrivateService","_contentQueries","contentQueryId","_getContentQueries","_addQueryReadsTo","templateRefId","refAst","defaultQueryValue","_getOrCreateLocalProvider","afterElement","lazyProviders","eagerProviders","sortedProviderTypes","transformProviders","sortedDirectives","dir1","dir2","allMatches","queryReadTokens","_getQueriesFor","queryValue","currentEl","distance","requestingProviderType","Builtin","transformedProviderAst","ProviderError","transformedProviders","transformedUseValue","transformedUseExisting","transformedDeps","existingDiDep","_getDependency","_transformProvider","_transformProviderAst","_getLocalDependency","isValue","currElement","currEager","prevElement","errorString","requestorSourceSpan","ProviderAst","targetProvidersByToken","isUseValue","isStyleUrlResolvable","schemeMatch","URL_WITH_SCHEMA_REGEXP","CSS_IMPORT_REGEXP","CSS_STRIPPABLE_COMMENT_REGEXP","_exprParser","_schemaRegistry","pipesByName","_usedPipes","getUsedPipes","createBoundHostProperties","dirMeta","parsePropertyBinding","_reportError","createDirectiveHostPropertyAsts","elementSelector","boundProps","createBoundElementProperty","createDirectiveHostEventAsts","parseEvent","parseInterpolation","sourceInfo","_reportExpressionParserErrors","_checkPipes","wrapLiteralPrimitive","parseInlineTemplateBinding","tplKey","tplValue","targetMatchableAttrs","targetProps","targetVars","_parseTemplateBindings","ParsedVariable","_parsePropertyAst","parseLiteralAttr","bindingsResult","parseTemplateBindings","templateBindings","warnings","warning","WARNING","isAnimationLabel","_parseAnimation","ParsedProperty","_parseBinding","parsePropertyInterpolation","DEFAULT","isHostBinding","parseSimpleBinding","parseBinding","boundProp","skipValidation","mapPropertyName","BoundElementProperty","NONE","boundPropertyName","securityContexts","_validatePropertyOrAttributeName","calcPossibleSecurityContexts","nsSeparatorIdx","mappedPropName","getMappedPropName","targetEvents","_parseAnimationEvent","_parseRegularEvent","_parseAction","ParsedEvent","parseAction","EmptyExpr","collector","PipeCollector","pipeMeta","isAttr","report","validateAttribute","validateProperty","ctxs","elementNames","allKnownElementNames","notElementNames","possibleElementNames","PreparsedElementType","preparseElement","selectAttr","hrefAttr","relAttr","nonBindable","projectAs","lcAttrName","normalizeNgContentSelect","OTHER","NG_CONTENT","STYLESHEET","PreparsedElement","_TEXT_CSS_SELECTOR","BIND_NAME_REGEXP","TEXT_CSS_SELECTOR","templateAst","usedPipes","_reflector","_htmlParser","transforms","tryParse","htmlParseResult","getInterpolationConfig","tryParseHtml","expandHtml","uniqDirectives","removeSummaryDuplicates","uniqPipes","providerViewContext","ProviderViewContext","bindingParser","BindingParser","parseVisitor","TemplateParseVisitor","EMPTY_ELEMENT_CONTEXT","_assertNoReferenceDuplicationOnTemplate","t.templateVisitAll","TemplateParseResult","forced","expandedHtmlAst","existingReferences","TemplateParseError","_bindingParser","_schemas","_targetErrors","selectorMatcher","directivesIndex","ngContentCount","findNgContentIndex","valueNoNgsp","t.BoundTextAst","t.TextAst","t.AttrAst","queryStartIndex","elName","preparsedElement","matchableAttrs","elementOrDirectiveProps","elementOrDirectiveRefs","elementVars","templateElementOrDirectiveProps","templateMatchableAttrs","templateElementVars","hasInlineTemplates","templateValue","templateKey","_parseAttr","t.VariableAst","normalizedName","_normalizeAttributeName","hasTemplateBinding","elementCssSelector","createElementCssSelector","matchElement","boundDirectivePropNames","directiveAsts","_createDirectiveAsts","directiveMetas","elementProps","_createElementPropertyAsts","isViewRoot","providerContext","ProviderElementContext","NON_BINDABLE_VISITOR","ElementContext","parsedElement","projectionSelector","_isEmptyTextNode","t.NgContentAst","_assertAllEventsPublishedByDirectives","_assertNoComponentsNorElementBindingsOnTemplate","t.EmbeddedTemplateAst","transformedDirectiveAsts","_assertElementExists","_assertOnlyOneComponent","t.ElementAst","templateQueryStartIndex","templateSelector","templateBoundDirectivePropNames","templateDirectiveAsts","templateElementProps","templateProviderContext","targetRefs","srcSpan","boundEvents","bindParts","_parseVariable","_parseReference","_parseAssignmentEvent","t.BoundEventAst","ElementOrDirectiveRef","_parseDirectives","elementSourceSpan","targetReferences","targetBoundDirectivePropNames","matchedReferences","directiveProperties","t.BoundElementPropertyAst","_checkPropertiesInSchema","parsedEvents","_createDirectivePropertyAsts","elOrDirRef","isReferenceToDirective","t.ReferenceAst","t.DirectiveAst","refToken","targetBoundDirectiveProps","prevValue","dirProp","elProp","isEmptyExpression","t.BoundDirectivePropertyAst","boundElementProps","_findComponentDirectives","_findComponentDirectiveNames","componentTypeNames","hasElement","allDirectiveEvents","hasProperty","attrNameAndValues","_ngContentIndexMatcher","_wildcardNgContentIndex","ngContentIndices","elNameNoNs","attrNameNoNs","NonBindableVisitor","ASTWithSource","stripUnnecessaryQuotes","qS","tempValue","_elementIndexExpr","_directiveExpr","_hasInitialValues","hasBindings","_classMapInput","_styleMapInput","_singleStyleInputs","_singleClassInputs","_lastStylingInput","_firstStylingInput","_stylesIndex","_classesIndex","_initialStyleValues","_initialClassValues","_useDefaultSanitizer","registerBoundInput","registerInputBasedOnName","registerStyleInput","registerClassInput","nameToMatch","isStyle","hasOverrideFlag","bindingUnit","isStyleSanitizable","registerIntoMap","registerStyleAttr","parenDepth","propStart","currentProp","valueHasQuotes","styleVal","parseStyle","registerClassAttr","populateInitialStylingAttrs","buildHostAttrsInstruction","allocateBindingSlots","o.WrappedNodeExpr","getConstantLiteralFromArray","buildStylingInstruction","buildClassMapInstruction","valueConverter","_buildMapBasedInstruction","buildStyleMapInstruction","stylingInput","totalBindingSlotsRequired","mapValue","getClassMapInterpolationExpression","supportsInterpolation","convertFn","convertResult","_buildSingleInputs","allowUnits","getInterpolationExpressionFn","_buildClassInputs","_buildStyleInputs","getStylePropInterpolationExpression","_buildApplyFn","_buildSanitizerFn","buildUpdateLevelInstructions","instructions","styleMapInstruction","classMapInstruction","parseProperty","overrideIndex","unitIndex","KEYWORDS","scanner","_Scanner","scanToken","numValue","isCharacter","Character","isOperator","Operator","isIdentifier","Identifier","isKeyword","Keyword","isKeywordLet","isKeywordAs","isKeywordNull","isKeywordUndefined","isKeywordTrue","isKeywordFalse","isKeywordThis","isError","toNumber","newCharacterToken","newOperatorToken","isIdentifierStart","scanIdentifier","scanNumber","scanCharacter","scanString","scanOperator","scanComplexOperator","one","twoCode","two","threeCode","three","isIdentifierPart","newIdentifierToken","simple","isExponentSign","parseIntAutoRadix","buffer","unescapedCode","unescape","newErrorToken","offsets","_createInterpolateRegExp","_SECURITY_SCHEMA","_lexer","_checkNoInterpolation","sourceToLex","_stripComments","_ParseAST","parseChain","_parseBindingAst","SimpleExpressionChecker","ParserError","_parseQuote","prefixSeparatorIndex","splitInterpolation","expressionText","_findInterpolationErrorColumn","SplitInterpolation","_commentStart","outerQuote","nextChar","partInErrIdx","rparensExpected","rbracketsExpected","rbracesExpected","inputIndex","optionalCharacter","peekKeywordLet","peekKeywordAs","expectCharacter","optionalOperator","expectOperator","expectIdentifierOrKeyword","expectIdentifierOrKeywordOrString","parsePipe","parseExpression","parseConditional","parseLogicalOr","yes","no","parseLogicalAnd","parseEquality","parseRelational","parseAdditive","parseMultiplicative","parsePrefix","parseCallChain","parsePrimary","parseAccessMemberOrMethodCall","parseCallArguments","ImplicitReceiver","elements","parseExpressionList","parseLiteralMap","literalValue","terminator","isSafe","positionals","expectTemplateBindingKey","operatorFound","firstBinding","rawKey","isVar","TemplateBinding","letStart","letName","TemplateBindingParseResult","locationText","skip","SECURITY_SCHEMA","registerContext","specs","spec","SCHEMA","_ATTR_TO_PROP","_schema","encodedType","strType","typeNames","superName","schemaMetas","getDefaultComponentElementName","normalizeAnimationStyleProperty","normalizeAnimationStyleValue","camelCaseProp","userProvidedProp","strVal","_isPixelDimensionStyle","valAndSuffixMatch","ElementSchemaRegistry","htmlAstToRender3Ast","htmlNodes","HtmlAstToIvyAst","ivyNodes","allErrors","TagType","contents","parsedProperties","i18nAttrsMeta","templateParsedProperties","templateVariables","elementHasInlineTemplate","normalizeAttributeName","isTemplateBinding","reportError","parsedVariables","t.Variable","parseAttribute","isEmptyTextNode","isCommentNode","t.Content","extractAttributes","t.Element","hoistedAttrs","t.TextAttribute","_visitTextWithInterpolation","t.Icu","i18nPropsMeta","bep","t.BoundAttribute","matchableAttributes","parseVariable","parseReference","addEvents","parseAssignmentEvent","t.BoundText","t.Text","t.Reference","t.BoundEvent","templateIndex","isEmitted","_unresolvedCtxCount","_registry","getUniqueId","appendTag","closed","getSerializedPlaceholders","serializePlaceholderValue","appendBinding","appendIcu","appendBoundText","appendTemplate","TEMPLATE","appendElement","ELEMENT","appendProjection","PROJECTION","forkChildContext","I18nContext","reconcileChildContext","findTemplateFn","tmplIdx","findIndex","isCloseTag","endsWith","wrapTag","TAG_TO_PLACEHOLDER_NAMES","_placeHolderNameCounts","_signatureToName","getStartTagPlaceholderName","_hashTag","upperTag","baseName","_generateUniqueName","getCloseTagPlaceholderName","_hashClosingTag","getPlaceholderName","upperName","getUniquePlaceholder","_expParser","ExpressionParser","ExpressionLexer","createI18nMessageFactory","_I18nVisitor","visitNodeFn","toI18nMessage","_expressionParser","_isIcu","_icuDepth","_placeholderRegistry","PlaceholderRegistry","_placeholderToContent","_placeholderToMessage","_visitNodeFn","i18nodes","_visitNode","startPhName","closePhName","i18n.TagPlaceholder","i18nIcuCases","i18nIcu","caze","expPh","phName","i18n.IcuPlaceholder","i18n.Text","_CUSTOM_PH_EXP","sDelimiter","eDelimiter","lastStringIdx","setI18nRefs","keepI18nAttrs","_createI18nMessage","_generateI18nMessage","parsed","idIndex","descIndex","meaningAndDesc","parseI18nMeta","hasI18nAttrs","attrsMeta","icuNestingLevel","formatPh","isInsideIcu","formatted","GLOBAL_TARGET_RESOLVERS","LEADING_TRIVIA_CHARS","renderFlagCheckIfStmt","prepareEventListenerParameters","eventAst","handlerName","implicitReceiverExpr","bindingLevel","getOrCreateSharedContextVar","bindingExpr","restoreViewStatement","variableDeclarations","prepareSyntheticListenerName","fnName","handlerFn","parentBindingScope","contextName","i18nContext","directiveMatcher","pipeTypeByName","_namespace","relativeContextFilePath","i18nUseExternalIds","_dataIndex","_bindingContext","_prefixCode","_creationCodeFns","_updateCodeFns","_lastNodeIndexWithFlush","_tempVariables","_nestedTemplateFns","_unsupported","_pureFunctionSlots","_bindingSlots","_ngContentReservedSlots","_ngContentSelectorsOffset","_implicitReceiverExpr","_bindingScope","nestedScope","fileBasedI18nSuffix","_valueConverter","ValueConverter","allocateDataSlot","numSlots","allocatePureFunctionSlots","slot","pipeType","creationInstruction","registerContextVariables","scopedName","freshReferenceName","retrievalLevel","relativeLevel","sharedCtxVar","getSharedContextName","generateNextContextExpr","buildTemplateFunction","ngContentSelectorsOffset","initI18nContext","selfClosingI18nInstruction","hasTextChildrenOnly","t.visitAll","updatePipeSlotOffsets","buildTemplateFn","r3ReservedSlots","core.parseSelectorToR3Selector","creationStatements","updateStatements","creationVariables","viewSnapshotStatements","updateVariables","creationBlock","updateBlock","o.NUMBER_TYPE","i18nTranslate","transformFn","_ref","i18nGenerateClosureVar","formattedParams","i18nFormatPlaceholderNames","getTranslationDeclStmts","getSerializedI18nContent","_params","i18nAppendBindings","i18nBindProps","acc","lastIdx","assembleI18nBoundString","messageId","uniqueSuffix","i18nUpdateRef","isResolved","updateInstructionChain","updateInstruction","projectionSlotIdx","getNgProjectAsLiteral","getNamespaceInstruction","namespaceKey","addNamespaceInstruction","nsInstruction","stylingBuilder","StylingBuilder","isNonBindableMode","isI18nRootElement","i18nAttrs","outputAttrs","checkIsNgContainer","matchDirectives","allOtherInputs","getAttributeNameLiterals","prepareNonRenderAttrs","toAttrsParam","prepareRefsParameter","wasInNamespace","currentNamespace","hasChildren","createSelfClosingInstruction","createSelfClosingI18nInstruction","converted","convertExpressionBinding","processStylingInstruction","outputAst","prepareListenerParameter","stylingInstructions","emptyValueBindInstruction","propertyBindings","attributeBindings","inputType","attrNamespace","isAttributeBinding","sanitizationRef","resolveSanitizationFn","namespaceLiteral","interpolatedUpdateInstruction","getPropertyInterpolationExpression","getAttributeInterpolationExpression","getUpdateInstructionArguments","attrsExprs","templateVisitor","TemplateDefinitionBuilder","templateFunctionExpr","getConstCount","getVarCount","templatePropertyBindings","getTextInterpolationExpression","initWasInvoked","getNgContentSelectors","bindingContext","instructionFn","fns","paramsOrFn","prepend","createMode","addSelectInstructionIfNecessary","fnParams","originalSlots","getImplicitReceiverExpr","convertedPropertyBinding","valExpr","contextVariableExpression","expressionWithArgumentsToExtract","cdAst.Interpolation","staticType","alreadySeen","attrExprs","addAttrExpr","attrsLengthBeforeInputs","o.TYPED_NULL_EXPR","refsParam","variableName","nextContextStmt","refExpr","bindingFnName","allocateSlot","_pipeBindExprs","slotPseudoLocal","pureFunctionSlot","pipeBindingIdentifiers","isVarLength","pipeBindExpr","bindingSlots","AstMemoryEfficientTransformer","pureFunctionIdentifiers","relativeLevelDiff","allocateSlots","startSlot","attributeNamespace","nameLiteral","referenceNameIndex","restoreViewVariable","BindingScope","_ROOT_SCOPE","declareLocalCallback","declare","localRef","maybeGenerateSharedContextVar","maybeRestoreView","getComponentProperty","SHARED_CONTEXT_KEY","newScope","generateSharedContextVar","bindingKey","sharedCtxObj","componentValue","localRefLookup","isListenerScope","getCurrentViewInstruction","currentContextLevel","levelDiff","currStmts","parsedR3Selector","makeBindingParser","Lexer","DomElementSchemaRegistry","core.SecurityContext","ATTR_REGEX","baseDirectiveFields","DefinitionMap","createContentQueriesFunction","createViewQueriesFunction","createHostBindingsFunction","addFeatures","compileDirectiveFromMetadata","createTypeForDef","compileComponentFromMetadata","firstSelector","selectorAttributes","templateTypeName","directivesUsed","pipesUsed","templateBuilder","ROOT_SCOPE","templateFunctionExpression","directivesExpr","wrapDirectivesAndPipesInClosure","pipesExpr","core.ViewEncapsulation","shadowCss","core.ChangeDetectionStrategy","directiveMetadataFromGlobalMetadata","queriesFromGlobalMetadata","selectorsFromGlobalMetadata","selectorStrings","prepareQueryParams","createStatements","tempAllocator","queryInstruction","getQueryList","refresh","updateDirective","contentQueriesFnName","stringMapAsType","stringArrayAsType","typeBase","selectorForType","q","queryDefinition","viewQueryFnName","hostBindingsMetadata","hostVarsCount","elVarExp","styleBuilder","styleAttr","totalHostVarsCount","hostBindingSourceSpan","directiveSummary","metadataAsSummary","getValueConverter","originalVarsCount","eventBindings","createHostListeners","syntheticHostBindings","bindingFn","attrMatches","sanitizerFn","instructionParams","hostAttrs","convertAttributesToExpressions","hostInstruction","createStylingStmt","stylingInstruction","hostBindingsFnName","implicit","typeMapToExpressionMap","jitEvaluator","JitEvaluator","elementSchemaRegistry","convertR3DependencyMetadataArray","jitExpression","factoryMeta","useClassOnSelf","wrapReference","ConstantPool","convertDirectiveFacadeToMetadata","preStatements","parseResult","HtmlParser","I18nMetaVisitor","parseTemplate","vx","compileBaseDefFromMetadata","extractHostBindings","sourceFile","r3JitTypeSourceSpan","R3JitReflector","USE_CLASS","USE_FACTORY","USE_EXISTING","inputsFromMetadata","parseInputOutputs","outputsFromMetadata","inputsFromType","outputsFromType","isOutput","wrapExpression","computeProvidedIn","convertR3DependencyMetadata","facades","specialAttributes","parseHostBindings","summary","verifyHostBindings","isHostListener","defaultEncapsulation","useJit","jitDevMode","missingTranslation","strictInjectionParameters","preserveWhitespacesDefault","preserveWhitespacesOption","defaultSetting","_resourceLoader","_resourceLoaderCache","normalizedDirective","_fetch","normalizeTemplate","prenormData","_preParseTemplate","preparsedTemplate","_normalizeTemplateMetadata","prenomData","_preparseLoadedTemplate","templateAbsUrl","rootNodesAndErrors","templateMetadataStyles","_normalizeStylesheet","TemplatePreparseVisitor","templateStyles","inlineStyleUrls","_loadMissingExternalStylesheets","_normalizeLoadedTemplateMetadata","stylesheets","_inlineStyles","CompileTemplateMetadata","targetStyles","loadedStylesheets","loadedStyle","allStyleUrls","allStyles","resolver","baseUrl","foundUrls","modifiedCssText","styleWithImports","StyleWithImports","ngNonBindableStackCount","QUERY_METADATA_IDENTIFIERS","isDirective","typeMetadata","isDirectiveMetadata","throwIfNotFound","findLast","propertyMetadata","_mergeWithPropertyMetadata","dm","directiveType","hostBinding","startWith","hostListener","_merge","_extractPublicName","_dedupeBindings","publicNames","reversedResult","mergedInputs","mergedOutputs","mergedHost","mergedQueries","_I18N_COMMENT_PREFIX_REGEXP","i18nCommentsWarned","_VisitorMode","_implicitTags","_implicitAttrs","extract","_init","Extract","_inI18nBlock","ExtractionResult","_messages","Merge","_translations","translatedNode","_mode","_mayBeAddBlockChildren","wasInIcu","_inIcu","_isInTranslatableSection","_addMessage","isOpening","isClosing","_isClosingComment","_inI18nNode","_depth","_blockStartDepth","_closeTranslatableSection","_blockChildren","_blockMeaningAndDesc","_translateMessage","_openTranslatableSection","wasInI18nNode","wasInImplicitNode","_inImplicitNode","translatedChildNodes","i18nAttr","i18nMeta","isImplicit","isTopLevelImplicit","isTranslatable","visited","_visitAttributesOf","translatedAttrs","_translateAttributes","_msgCountAtSectionStart","explicitAttrNameToValue","implicitAttrNames","msgMeta","i18nParsedMessageMeta","_parseMessageMeta","translatedAttributes","directChildren","I18nError","_TAG_DEFINITION","PARSABLE_DATA","requireExtraParent","getXmlTagDefinition","_WriteVisitor","transUnits","contextTags","contextGroupTag","purpose","transUnit","datatype","xliff","xmlns","XliffParser","msgIdToHtml","i18nNodesByMsgId","XmlToI18n","msgId","i18nNodes","ctype","getCtypeForTag","equivText","_unitMlString","_msgIdToHtml","xml","XmlParser","ml.visitAll","idAttr","_addError","innerTextStart","innerTextEnd","innerText","localeAttr","convert","xmlIcu","nameAttr","caseMap","notes","category","srcLang","Xliff2Parser","getTypeForTag","_nextPlaceholderId","equiv","disp","tagPc","equivStart","equivEnd","dispStart","dispEnd","idStr","versionAttr","startAttr","endAttr","startId","endId","XtbParser","valueFn","createLazyProperty","xtb","_bundleDepth","langAttr","_i18nNodesByMsgId","mapperFactory","missingTranslationStrategy","Warning","_i18nToHtml","I18nToHtmlVisitor","serializer","TranslationBundle","srcMsg","_digest","_mapperFactory","_missingTranslationStrategy","_contextStack","_convertToText","_srcMsg","_mapper","mapper","translationsFormat","Xmb","Xtb","Xliff2","Xliff","createSerializer","_translationBundle","implicitTags","implicitAttrs","mergeTranslations","convertValueToOutputAst","_ValueOutputAstTransformer","quotedSet","mapEntry","alwaysGenerateDef","tokenInjector","depsArray","tokenExpr","factoryFor","retValue","depArgs","compile","o.ClassStmt","o.ClassField","Static","o.ClassMethod","STRIP_SRC_FILE_SUFFIXES","GENERATED_FILE","JIT_SUMMARY_FILE","JIT_SUMMARY_NAME","ngfactoryFilePath","forceSourceFile","urlWithSuffix","splitTypescriptSuffix","normalizeGenFileSuffix","stripGeneratedFileSuffix","lastDot","srcFileSuffix","summaryFileName","fileName","summaryForJitFileName","summaryForJitName","symbolName","LifecycleHooks","LOWERED_SYMBOL","LIFECYCLE_HOOKS_VALUES","OnInit","OnDestroy","DoCheck","OnChanges","AfterContentInit","AfterContentChecked","AfterViewInit","AfterViewChecked","getHookName","_ngModuleResolver","_directiveResolver","_pipeResolver","_summaryResolver","_directiveNormalizer","_staticSymbolCache","_errorCollector","_nonNormalizedDirectiveCache","_directiveCache","_summaryCache","_pipeCache","_ngModuleCache","_ngModuleOfTypes","_shallowModuleCache","getReflector","_createProxyClass","baseType","proxyClass","setDelegate","getGeneratedClass","dirType","getComponentViewClass","cpl.viewClassName","getHostComponentViewClass","getHostComponentType","cpl.identifierName","getRendererType","cpl.rendererTypeName","getComponentFactory","cpl.componentFactoryName","initComponentFactory","_loadSummary","typeSummary","resolveSummary","getHostComponentMetadata","hostViewType","hostType","cpl.CompileDirectiveMetadata","cpl.CompileTemplateMetadata","loadDirectiveMetadata","isSync","createDirectiveMetadata","templateMetadata","normalizedDirMeta","componentStillLoadingError","getNonNormalizedDirectiveMetadata","cacheEntry","nonNormalizedTemplateMetadata","entryComponentMetadata","_getProvidersMetadata","stringifyType","flattenAndDedupeArray","_getEntryComponentMetadata","_getQueriesMetadata","_getTypeMetadata","getDirectiveMetadata","getDirectiveSummary","dirSummary","cpl.CompileSummaryKind","getNgModuleSummary","alreadyCollecting","moduleSummary","moduleMeta","getNgModuleMetadata","loadNgModuleDirectiveAndPipeMetadata","loading","_loadPipeMetadata","getShallowModuleMetadata","compileMeta","ngModuleMeta","rawExports","rawImports","rawProviders","exportedNonModuleIdentifiers","importedModuleType","isValidType","moduleWithProviders","_checkSelfImport","_getTypeDescriptor","importedModuleSummary","exportedModuleSummary","_getIdentifierMetadata","_getTransitiveNgModuleMetadata","declaredType","declaredIdentifier","_addTypeToModule","exportedId","cpl.CompileNgModuleMetadata","oldModule","cpl.TransitiveCompileNgModuleMetadata","modulesByToken","modSummary","addedTokens","cpl.tokenReference","prevModules","isInjectable","getInjectableSummary","getInjectableMetadata","throwOnUnknownDeps","_getDependenciesMetadata","_getFactoryMetadata","getPipeMetadata","getPipeSummary","pipeSummary","getOrLoadPipeMetadata","pipeAnnotation","cpl.CompilePipeMetadata","hasUnknownDeps","dependenciesMetadata","paramEntry","_getTokenMetadata","depsTokens","targetEntryComponents","debugInfo","compileProviders","providerIdx","providerMeta","_validateProvider","cpl.ProviderMeta","providersInfo","soFar","seenProvider","seenProviderIdx","_getEntryComponentsFromProvider","getProviderMetadata","targetIdentifiers","collectedIdentifiers","_CompileValueConverter","_getInjectableTypeMetadata","compileDeps","compileTypeMetadata","compileFactoryMetadata","_getQueryMetadata","_queryVarBindings","otherType","tree","flattenArray","ValueTransformer","providerAst","lifecycleHook","lifecycleHookToNodeFlag","allDepDefs","allParams","providerIndex","depExprs","convertDeps","providerExpr","depsExpr","depIndex","paramName","singleProviderDef","tokenMeta","nodeFlag","componentFactoryResolverProviderDef","entryComponentFactories","entryComponent","classMeta","ngModuleFactoryVar","LOG_VAR","sourceFileName","providerParser","NgModuleProviderAnalyzer","providerDefs","ngModuleDefFactory","_createNgModuleFactory","registerFactoryStmt","NgModuleCompileResult","createStub","ngModuleReference","ngModuleFactoryStmt","o.importType","emitStatementsAndContext","preamble","emitSourceMaps","referenceFilter","importFilter","_TsEmitterVisitor","preambleLines","reexports","exportedModuleName","reexportsCode","reexport","importsWithPrefixes","importedModuleName","sm","sourceText","emitStatements","typeExpression","defaultType","_visitIdentifier","o.ExternalExpr","_printColonType","_visitClassField","Private","o.BuiltinTypeName","metas","defaultResolver","componentId","externalReferenceVars","embeddedViewCount","viewBuilderFactory","embeddedViewIndex","ViewBuilder","isHostComponent","refOutputVars","updates","actions","getOutputVar","getTypeGuardExpressions","guard","useIf","astNodes","targetStatements","viewStmts","o.applySourceSpanToStatementIfNeeded","guardExpression","guardClause","o.IfStmt","viewName","viewFactory","o.DeclareFunctionStmt","visitElementOrTemplate","fullTemplateTypeCheck","childVisitor","inputAst","dirAst","outputVarType","hostEventAst","currBuilder","varAst","pipeOutputVar","preprocessUpdateExpression","viewClassVar","rendererTypeVar","staticQueryIds","findStaticQueryIds","dynamicQueryIds","ElementAst","childData","EmbeddedTemplateAst","renderComponentVarName","customRenderData","renderComponentVar","ViewCompileResult","VIEW_VAR","CHECK_VAR","COMP_VAR","EVENT_NAME_VAR","ALLOW_DEFAULT_VAR","purePipeNodeIndices","refNodeIndices","nodeStaticQueryIds","_createPipe","calcStaticDynamicQueryFlags","needsAdditionalRootNode","lastAstNode","NgContentAst","updateRendererStmts","updateDirectivesStmts","nodeDefExprs","updateRendererFn","_createUpdateFn","updateDirectivesFn","viewFlags","updateStmts","updateFn","preStmts","o.findReadVarNames","inter","updateRendererExpressions","_preprocessUpdateExpression","queryMatchesExpr","_createElementHandleEventFn","usedEvents","inputDefs","dirHostBindings","elementBindingDef","compAst","compRendererType","fixedAttrsDef","_visitElementOrTemplate","elementEventFullName","_visitComponentFactoryResolverProvider","localDirAst","dirHostEvents","_visitProvider","queryMatchExprs","_visitDirective","updateDirectiveExpressions","dirContextExpr","_addProviderNode","_visitProviderOrDirective","componentDirMeta","providerFlags","currViewExpr","refNodeIndex","varValue","_createLiteralArrayConverter","callCheckStmt","_createLiteralMapConverter","_createPipeConverter","compViewExpr","compBuilder","pipeNodeIndex","callUnwrapValue","diDep","_createNodeExpressions","updateBindingCount","createUpdateStatements","o.applySourceSpanToExpressionIfNeeded","o.CommaExpr","allowEmptyExprs","handlers","handleEventFn","handleEventStmts","handleEventBindingCount","trueStmts","fullEventName","o.BOOL_TYPE","elementAst","mapResult","attrValue1","attrValue2","elementEventNameAndTarget","shouldResolveAsStaticQuery","updateFromTemplate","htmlParserResult","i18nParserResult","extractMessages","getMessages","filterSources","mapperVisitor","MapPlaceholderNames","msgList","src","transformedMessage","i18n.CloneVisitor","srcFileUrl","genFileUrl","sourceOrStmts","listLazyRoutes","allLazyRoutes","ROUTES","loadChildren","_collectLoadChildren","route","parseLazyRoute","routes","routePath","routeName","referencedModule","TS","staticSymbolCache","summaryResolver","errorRecorder","metadataCache","resolvedSymbols","resolvedFilePaths","importAs","symbolResourcePaths","symbolFromFile","knownFileNameToModuleNames","resolveSymbol","staticSymbol","_resolveSymbolMembers","resultFromSummary","_resolveSymbolFromSummary","resultFromCache","_createSymbolsOf","getImportAs","useSummaries","baseSymbol","getStaticSymbol","baseImportAs","summarizedFileName","summarizedName","getResourcePath","getTypeArity","resolvedSymbol","unwrapResolvedMetadata","arity","getKnownModuleName","recordImportAs","sourceSymbol","targetSymbol","recordModuleNameForFileName","invalidateFile","symbols","ignoreErrorsFor","recorder","baseResolvedSymbol","baseMetadata","ResolvedStaticSymbol","__symbolic","statics","hasDecorators","getModuleMetadata","getSymbolsOf","summarySymbols","metadataSymbols","moduleExport","export","exportSymbol","symName","unescapeIdentifier","resolvedModule","resolveModule","createExport","symbolMeta","origin","originFilePath","getOutputName","createResolvedSymbol","topLevelPath","topLevelSymbolNames","_originalFileMemo","isTsFile","isLibraryFile","getOriginalName","transformedMeta","functionParams","symbolic","oldLen","getMetadataFor","unwrappedTransformedMeta","moduleMetadata","moduleMetadatas","md","errorMessage","getSymbolByModule","containingFile","moduleNameToFileName","createSummaryForJitFunction","symbolResolver","srcFileName","indexBySymbol","reexportedBy","processedSummaryBySymbol","processedSummaries","unprocessedSymbolSummariesBySymbol","addSummary","unprocessedSummary","processedSummary","processValue","isCall","isMethodCallOnVariable","declarationSymbol","ngModuleSummary","createExternalSymbolReexports","json","summaries","reexportSymbol","__symbol","toSummaryFileName","visitStaticSymbol","loadSummary","addSourceType","isLibrary","addLibType","exportAsArr","exportAsBySymbol","ngModuleSymbols","serializeSummaryWithDeps","ngModuleSymbol","jitExportAsName","serializeSummaryRef","serializeSummary","CompileNgModuleMetadata","typeSymbol","jitImportedSymbol","Transformer","symbolCache","deserialize","libraryFileName","allImportAs","serializedSymbol","fromSummaryFileName","_options","_host","_metadataResolver","_templateParser","_styleCompiler","_viewCompiler","_typeCheckCompiler","_ngModuleCompiler","_injectableCompiler","_outputEmitter","_symbolResolver","_templateAstCache","_analyzedFiles","_analyzedFilesForInjectables","analyzeModulesSync","rootFiles","analyzeResult","analyzeAndValidateNgModules","ngModules","analyzeModulesAsync","_analyzeFile","analyzedFile","analyzeFile","_analyzeFileForInjectables","staticSymbolResolver","metadataResolver","injectables","shallowModules","analyzeFileForInjectables","findGeneratedFileNames","genFileNames","allowEmptyCodegenFiles","exportsNonSourceFiles","enableSummariesForJit","fileSuffix","dirSymbol","normalizedUrl","resourceNameToFileName","needsShim","_stylesModuleUrl","emitBasicStub","genFileName","originalFileName","_createOutputContext","originalFile","_createNgFactoryStub","_createEmptyStub","createForJitStub","_codegenSourceModule","emitTypeCheckStub","loadFilesAsync","fileNames","tsFiles","files","loadingPromises","analyzedInjectables","tsFile","analyzedModules","mergeAndValidateNgFiles","loadFilesSync","emitFlags","ngModuleIndex","_externalIdentifierReferences","typeIndex","dirId","_createTypeCheckBlock","parsedTemplate","emitMessageBundle","htmlParser","messageBundle","MessageBundle","compMetas","emitAllPartialModules","r3Files","ngModuleByPipeOrDirective","contextMap","_compilePartialModule","_compileShallowModules","injectableCompiler","injectorDefArg","schemaRegistry","hostBindingParser","expressionParser","render3Ast","directiveTypeBySel","definitionField","compileR3Component","compileR3Directive","pipeMetadata","compileR3Pipe","emitAllPartialModules2","_emitPartialModule2","emitAllImpls","_compileImplFile","generatedFiles","_createSummary","_compileModule","componentStylesheet","stylesheetMeta","_codegenStyles","_compileComponent","_compileComponentFactory","srcModule","ngFactoryCtx","symbolSummaries","typeData","forJitOutputCtx","forJitCtx","toJsonSerializer","ToJsonSerializer","ForJitSerializer","GeneratedFile","i18nFormat","hostMeta","hostViewFactoryVar","compFactoryVar","inputsExprs","outputsExprs","directiveIdentifiers","componentStyles","stylesExpr","_resolveStyleStatements","_parseTemplate","importModule","_fileNameToModuleName","suppliedTypeParams","missingTypeParamsCount","allTypeParams","memberName","o.ExternalReference","importedFilePath","containingFilePath","fileNameToModuleName","stylesheetMetadata","compiledStylesheet","entryRoute","visitLazyRoute","seenRoutes","lazyRoutes","lazyRoute","compileResult","stylesheetUrl","analyzeNgModules","mergeAnalyzedFiles","seenFiles","visitFile","isSourceFile","modMeta","_analyzeFilesIncludingNonProgramFiles","validateAnalyzedModules","symbolsMissingModule","isNgSymbol","Visitor","isValueExportingNonSourceFile","analyzedFiles","allNgModules","allPipesAndDirectives","af","formatChain","chain","indentStr","half","ANGULAR_CORE","HIDDEN_KEY","IGNORE","REFERENCE_SET","shouldIgnore","knownMetadataClasses","knownMetadataFunctions","annotationCache","shallowAnnotationCache","propertyCache","parameterCache","methodCache","staticCache","conversionMap","resolvedExternalReferences","annotationForParentClassWithSummaryKind","initializeConversionMap","kc","_registerDecoratorOrConstructor","kf","_registerFunction","findSymbolDeclaration","refSymbol","findDeclaration","tryFindDeclaration","resolvedMetadata","originalRecorder","_annotations","simplify","classMetadata","getTypeMetadata","parentType","findParentType","parentAnnotations","requiredAnnotationTypes","requiredType","formatMetadataError","metadataError","ctorData","rawParameterTypes","rawParamType","nestedResult","paramType","trySimplify","_methodNames","methodNames","isMethod","_staticMembers","staticMembers","staticMemberData","injectionToken","opaqueToken","lazy","calling","simplifyInContext","depth","resolveReferenceValue","simplifyEagerly","simplifyNested","nestedContext","isMetadataError","summaryMsg","FUNCTION_CALL_NOT_SUPPORTED","errorSummary","advise","isPrimitive","spreadArray","spreadItem","declarationValue","operand","indexTarget","member","selectContext","selectTarget","localValue","missing","argExpressions","functionSymbol","targetFunction","targetExpression","functionScope","define","oldScope","simplifyCall","mapStringMap","simplifyLazily","reportingContext","PopulatedScope","formatMetadataMessageChain","expandedMessage","formattedError","messageAdvise","summaryCache","loadedFilePaths","referringSrcFileName","referringLibFileName","rootSymbol","_loadSummaryFile","hasSummary","summaryFilePath","FromJsonDeserializer","createAotUrlResolver","basePath","_summaries","_executeFunctionStatements","varValues","childCtx","createChildWihtLocalVars","_ExecutionContext","debugAst","o.Statement","o.Type","debugOutputAstAsTypeScript","currCtx","ReturnValue","_classStmt","_ctx","propertyDescriptors","instanceCtx","paramNames","writable","ctorParamNames","superClass","createDynamicClass","_declareFn","_jitEvaluator","_compilerConfig","getExtraNgModuleProviders","_compiledTemplateCache","_compiledHostTemplateCache","_compiledDirectiveWrapperCache","_compiledNgModuleCache","_sharedStylesheetCount","_addedAotSummaries","_compileModuleAndComponents","_compileModuleAndAllComponents","loadAotSummaries","_addAotSummaries","hasAotSummary","_filterJitIdentifiers","ids","_loadModules","_compileComponents","mainModule","mainNgModule","nestedNgModule","createOutputContext","_interpretOrJit","ngModuleJitUrl","allComponentFactories","moduleByJitDirective","templates","transJitModules","localMod","localModuleMeta","dirRef","_createCompiledTemplate","_createCompiledHostTemplate","entryComponentType","_compileTemplate","compiledTemplate","assertComponent","CompiledTemplate","isCompiled","externalStylesheetsByModuleUrl","outputContext","_resolveStylesCompileResult","ir.variable","evalResult","templateJitUrl","viewClass","compiled","nestedCompileResult","nestedStylesArr","_resolveAndEvalStylesCompileResult","pathParts","StatementInterpreter","interpretStatements","_viewClass","ir.importExpr","UrlResolver","_packagePrefix","resolvedUrl","_split","baseParts","_ComponentIndex","Scheme","_joinAndCanonicalizePath","Port","Path","_resolveUrl","resolvedParts","getUrlScheme","_splitRe","uri","opt_scheme","opt_userInfo","opt_domain","opt_port","opt_path","opt_queryData","opt_fragment","leadingSlash","trailingSlash","up","_removeDotSegments","UserInfo","Domain","QueryData","Fragment","urlResolver","StaticSymbolCache","AotSummaryResolver","StaticSymbolResolver","staticReflector","StaticReflector","CompilerConfig","normalizer","DirectiveNormalizer","loadResource","CompileMetadataResolver","NgModuleResolver","DirectiveResolver","PipeResolver","extractor","Extractor","Scope","R3BoundTarget","parentScope","namedEntities","childScopes","ingest","maybeDeclare","thing","lookup","getChildScope","DirectiveBinder","dirTarget","processAttribute","visitBoundAttributeOrEvent","visitNode","TemplateBinder","childScope","maybeMap","exprTargets","getDirectivesOfNode","getReferenceTarget","getConsumerOfBinding","getExpressionTarget","getTemplateOfSymbol","getNestingLevel","getUsedDirectives","dirs","ng","publishFacade","Subscriber","_super","destinationOrNext","_this","syncErrorValue","syncErrorThrown","syncErrorThrowable","isStopped","destination","SafeSubscriber","subscriber","_error","_complete","_unsubscribeAndRecycle","_parentOrParents","_parentSubscriber","observerOrNext","useDeprecatedSynchronousErrorHandling","__tryOrSetError","__tryOrUnsub","wrappedComplete","_unsubscribe","Observable","_isScalar","_subscribe","lift","observable","nextOrObserver","rxSubscriber","toSubscriber","_trySubscribe","canReportError","promiseCtor","getPromiseCtor","operations","toPromise","close","isManual","DEFAULT_ALIASES","hover","focus","parseTriggers","triggers","trimmedTriggers","parsedTriggers","trigger","triggerPair","Trigger","manualTriggers","listenToTriggers","showFn","hideFn","toggleFn","unsubscribeFn","listenToTriggersV2","_registerHide","registerHide","useToggle","toggle","show","hide","registerOutsideClick","outsideClick","contains","targets","registerEscClick","outsideEsc","guessedVersion","win","gc","performance","Event","MouseEvent","KeyboardEvent","EventTarget","History","Location","EventListener","setTheme","theme","isBs3","__theme","spanEl","rect","getBoundingClientRect","top","_guessBsVersion","asArray","tail","currentPreviousNode","getNode","currentNextNode","createInternalArrayRepresentation","removedNode","findAll","lastItem","outArray","OnChange","propertyKey","reflow","offsetHeight","getStyles","opener","getComputedStyle","_messagesHash","_hideMsg","warnOnce","SimpleInnerSubscriber","notifyNext","notifyError","notifyComplete","SimpleOuterSubscriber","innerValue","innerSubscribe","innerSubscriber","LOCATION_INITIALIZED","APP_BASE_HREF","platformStrategy","platformLocation","_subject","_urlChangeListeners","_platformStrategy","browserBaseHref","getBaseHref","_platformLocation","_baseHref","stripTrailingSlash","_stripIndexHtml","onPopState","ev","includeHash","normalize","getState","isCurrentPathEqualTo","normalizeQueryParams","baseHref","_stripBaseHref","prepareExternalUrl","go","pushState","_notifyUrlChangeListeners","replaceState","forward","back","onUrlChange","onNext","onThrow","onReturn","joinWithSlash","slashes","pathEndIdx","droppedSlashIdx","LocationStrategy","PlatformLocation","NumberFormatStyle","Plural","FormStyle","TranslationWidth","FormatWidth","NumberSymbol","WeekDay","onHashChange","hash","internal","title","queryParams","pathname","HashLocationStrategy","href","getBaseHrefFromDOM","externalUrl","PathLocationStrategy","CURRENCIES_EN","getLocaleId","LocaleId","getLocaleDayPeriods","formStyle","width","amPm","getLastDefinedValue","DayPeriodsFormat","DayPeriodsStandalone","getLocaleDayNames","DaysFormat","DaysStandalone","getLocaleMonthNames","MonthsFormat","MonthsStandalone","getLocaleEraNames","Eras","getLocaleFirstDayOfWeek","FirstDayOfWeek","getLocaleWeekEndRange","WeekendRange","getLocaleDateFormat","DateFormat","getLocaleTimeFormat","TimeFormat","getLocaleDateTimeFormat","DateTimeFormat","getLocaleNumberSymbol","NumberSymbols","CurrencyDecimal","Decimal","CurrencyGroup","Group","getLocaleNumberFormat","NumberFormats","getLocaleCurrencySymbol","CurrencySymbol","getLocaleCurrencyName","CurrencyName","checkFullData","ExtraData","getLocaleExtraDayPeriodRules","extractTime","getLocaleExtraDayPeriods","dayPeriods","getCurrencySymbol","currency","Currencies","getLocaleCurrencies","symbolNarrow","getNumberOfCurrencyDigits","digits","ZoneWidth","DateType","TranslationType","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","timezone","parsedNb","isoStringToDate","getNamedFormat","formatValue","Short","Medium","Long","Full","shortTime","shortDate","formatDateTime","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","dateTimezoneOffset","timezoneToOffset","reverseValue","timezoneOffset","addDateMinutes","convertTimezoneToLocal","dateFormatter","DATE_FORMATS","formatter","dateStrGetter","Abbreviated","Wide","Narrow","dateGetter","FullYear","Month","Months","Standalone","weekGetter","Days","DayPeriods","Format","Hours","Minutes","Seconds","FractionalSeconds","timeZoneGetter","Extended","ShortGMT","getDateFormatter","opt_values","padNumber","minusSign","negWrap","neg","Day","getDatePart","localeMinus","MinusSign","extended","rules","hoursFrom","minutesFrom","hoursTo","minutesTo","getDateTranslation","monthBased","datetime","nbDaysBefore1stDayOfMonth","today","firstThurs","THURSDAY","fallback","requestedTimezoneOffset","tzHour","tzMin","dateSetter","timeSetter","NUMBER_FORMAT_REGEXP","formatNumberToLocaleString","groupSymbol","decimalSymbol","digitsInfo","isPercent","formattedText","isZero","parsedNumber","integerLen","zeros","numStr","exponent","MAX_DIGITS","parseNumber","fractionLen","toPercent","minInt","minFraction","minFrac","maxFraction","maxFrac","minIntPart","minFractionPart","maxFractionPart","fractionSize","roundAt","dropTrailingZeros","minLen","reduceRight","roundNumber","decimals","groups","lgSize","gSize","Exponential","Infinity","negPre","negSuf","posPre","posSuf","formatCurrency","currencyCode","parseNumberFormat","Currency","formatPercent","Percent","PercentSign","formatNumber","patternParts","positiveParts","integer","fraction","trunkLen","DEPRECATED_PLURAL_FN","getPluralCategory","ngLocalization","deprecatedPluralFn","Zero","One","Two","Few","Many","NgLocaleLocalization","NgLocalization","nLike","nDecimal","Other","registerLocaleData","extraData","parseCookieValue","cookieStr","encodeURIComponent","cookie","eqIndex","cookieName","cookieValue","decodeURIComponent","_name","_lastSetValue","_lastSetValueType","_lastSetValueIdentityChange","trimValues","parseOutUnits","allowSubKeys","oldKeys","newKeys","arrayEqualsArray","mapHasChanged","bulidMapFromValues","errorPrefix","setMapValues","assertValidValue","innerKeys","setIndividualMapValue","normalizeStyleKeyAndValue","_iterableDiffers","_keyValueDiffers","_ngEl","_renderer","_initialClasses","getValue","_removeClasses","_applyClasses","_rawClass","setNgClass","_iterableDiffer","_keyValueDiffer","applyChanges","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","_toggleClass","rawClassVal","enabled","NgClassR2Impl","_value","_ngClassDiffer","StylingDiffer","_classStringDiffer","classChanged","ngClassChanged","classValue","NgClassR3Impl","NgClassImplProvider__PRE_R3__","NgClassImpl","NgClassImplProvider__POST_R3__","NgClassImplProvider","ngClassDirectiveDef__POST_R3__","_delegate","tslib_1.__decorate","NgClass","NgClassBase","_componentRef","_moduleRef","ngComponentOutlet","ngComponentOutletInjector","ngComponentOutletNgModuleFactory","parentModule","componentFactoryResolver","ngComponentOutletContent","NgComponentOutlet","$implicit","ngForOf","even","_viewContainer","_template","_differs","_ngForOfDirty","_differ","_ngForOf","ngForTrackBy","_applyChanges","insertTuples","adjustedPreviousIndex","NgForOfContext","tuple","RecordViewTuple","_perViewChange","ilen","ngTemplateContextGuard","NgForOf","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","ngIf","_updateView","assertTemplate","NgIf","_templateRef","_created","enforceState","created","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_defaultViews","_matchCase","NgSwitch","ngSwitch","SwitchView","ngSwitchCase","NgSwitchCase","NgSwitchDefault","_localization","_caseViews","_switchValue","addCase","switchView","_clearViews","_activateView","_activeView","NgPlural","ngPlural","isANumber","NgPluralCase","setNgStyle","_ngStyle","_setStyle","nameAndUnit","NgStyleR2Impl","NgStyleR3Impl","NgStyleImplProvider__PRE_R3__","NgStyleImpl","NgStyleImplProvider__POST_R3__","NgStyleImplProvider","ngStyleDirectiveDef__POST_R3__","NgStyle","NgStyleBase","ngTemplateOutletContext","ngTemplateOutlet","_shouldRecreateView","_updateExistingContext","ctxChange","_hasContextShapeChanged","prevCtxKeys","currCtxKeys","NgTemplateOutlet","COMMON_DIRECTIVES","invalidPipeArgumentError","inner","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","currencyAsSymbol","currencyDisplay","Intl","NumberFormat","PATTERN_ALIASES","datePartGetterFactory","combine","digitCondition","nameCondition","digitModifier","hourExtractor","hour12Modify","intlDateFormat","hour12","timeZoneName","merged","opt","DATE_FORMATTER_CACHE","cacheKey","partToTime","DeprecatedDatePipe","DateFormatter","_ALIASES","NumberFormatter","DeprecatedDecimalPipe","DeprecatedPercentPipe","DeprecatedCurrencyPipe","symbolDisplay","COMMON_DEPRECATED_I18N_PIPES","createSubscription","async","updateLatestValue","dispose","_promiseStrategy","_observableStrategy","ObservableStrategy","_latestValue","_latestReturnedValue","_subscription","_obj","_strategy","AsyncPipe","_dispose","_selectStrategy","_updateLatestValue","LowerCasePipe","unicodeWordMatch","TitleCasePipe","txt","UpperCasePipe","DatePipe","_INTERPOLATION_REGEXP","I18nPluralPipe","pluralMap","I18nSelectPipe","mapping","JsonPipe","differs","keyValues","compareFn","differ","differChanges","KeyValuePipe","defaultComparator","keyValueA","keyValueB","aString","bString","DecimalPipe","isEmpty","strToNumber","PercentPipe","CurrencyPipe","display","SlicePipe","COMMON_PIPES","CommonModule","DeprecatedI18NPipesModule","DOCUMENT","PLATFORM_BROWSER_ID","PLATFORM_SERVER_ID","PLATFORM_WORKER_APP_ID","PLATFORM_WORKER_UI_ID","isPlatformBrowser","platformId","isPlatformServer","isPlatformWorkerApp","isPlatformWorkerUi","ViewportScroller","BrowserViewportScroller","setOffset","getScrollPosition","supportScrollRestoration","scrollX","scrollY","scrollToPosition","scrollTo","scrollToAnchor","CSS","escape","elSelectedById","scrollToElement","elSelectedByName","setHistoryScrollRestoration","scrollRestoration","history","pageXOffset","pageYOffset","project","MapOperator","MapSubscriber","validateMethodName","objectDefinePropertyValue","applyDefaultValues","privateKey","writeOnce","subject","m1","m2","cmpFactory","overlay","PromiseCompleter","_onDestroy","asObservable","vcRefCollection","dialogRef","overlayRef","setClickBoundary","register","BROWSER_PREFIX","animationEnd","forceReflow","docListener","keyCode","_stack","_stackMap","_modalRenderer","dropInName","unsupportedDropInError","dialogs","isDoc","clickOutside","mousedownOutside","mouseupOutside","mousemoveOutside","eventMap","keyboard","DEFAULT_VALUES","DEFAULT_SETTERS","http","stationService","urlPrefix","protocol","hostname","defaultTimeout","getUrlPrefix","setToken","processTimeout","getWithoutAuth","post","headers","HttpHeaders","thisTimeout","localStorage","getItem","access_token","Authorization","station","CmHttpClient","HttpClient","CmStationService","AUTO_STYLE","timings","sequence","steps","transition","stateChangeExpr","animation","delay","_onDoneFns","_onStartFns","_onDestroyFns","_started","_finished","parentPlayer","totalTime","_onFinish","onStart","onDone","hasStarted","play","_onStart","triggerMicrotask","pause","restart","finish","setPosition","getPosition","triggerCallback","phaseName","_players","players","doneCount","destroyCount","startCount","player","timeAtPosition","beforeDestroy","useSourceMap","cssMapping","btoa","sourceMapping","sourceMap","base64","sourceURLs","sourceRoot","cssWithMappingToString","mediaQuery","dedupe","alreadyImportedModules","memo","stylesInDom","isOldIE","atob","getTarget","getElement","styleTarget","HTMLIFrameElement","contentDocument","singleton","singletonCounter","stylesInsertedAtTop","fixUrls","addStylesToDom","domStyle","addStyle","listToStyles","newStyles","css","media","insertStyleElement","insertInto","lastStyleElementInsertedAtTop","insertAt","removeStyleElement","createStyleElement","nonce","getNonce","addAttrs","default","styleIndex","applyToSingletonTag","createObjectURL","revokeObjectURL","Blob","link","rel","createLinkElement","updateLink","applyToTag","newObj","DEBUG","newList","mayRemove","textStore","replaceText","replacement","Boolean","styleSheet","cssNode","autoFixUrls","convertToAbsoluteUrls","blob","oldSrc","Subscription","_subscriptions","_ctorUnsubscribe","flattenUnsubscriptionErrors","sub","teardown","subscriptions","subscriptionIndex","errs","SubjectSubscriber","Subject","observers","hasError","thrownError","AnonymousSubject","copy","interpolateParams","CmTranslateService","TranslateService","dialog","Modal","BaseModal","BSModalContainer","FilterOperator","FilterSubscriber","navigationTrigger","restoredState","RouterEvent","urlAfterRedirects","reason","shouldActivate","snapshot","routeConfig","routerEvent","PRIMARY_OUTLET","getAll","convertToParamMap","ParamsAsMap","navigationCancelingError","defaultUrlMatcher","segmentGroup","pathMatch","posParams","consumed","validateConfig","parentPath","getFullPath","fullPath","outlet","redirectTo","currentRoute","standardizeConfig","EmptyOutletComponent","shallowEqual","k1","k2","wrapIntoObservable","containsTree","containee","exact","equalQueryParams","equalSegmentGroups","equalPath","numberOfChildren","containsQueryParams","containsSegmentGroup","containsSegmentGroupHelper","containeePaths","fragment","_queryParamMap","DEFAULT_SERIALIZER","serializePaths","_parameterMap","serializePath","bs","mapChildrenIntoArray","childOutlet","UrlParser","UrlTree","parseRootSegment","parseQueryParams","parseFragment","strParams","serializeSegment","primary","encodeUriQuery","DefaultUrlSerializer","encodeUriString","encodeUriSegment","decode","decodeQuery","SEGMENT_RE","matchSegments","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","UrlSegmentGroup","parseChildren","parseQueryParam","parseSegment","capture","parseParens","UrlSegment","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","_root","pathFromRoot","findNode","siblings","findPath","cc","nodeChildrenAsMap","setRouterState","Tree","createEmptyState","urlTree","activated","ActivatedRouteSnapshot","RouterStateSnapshot","TreeNode","createEmptyStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","RouterState","futureSnapshot","_futureSnapshot","_routerState","_paramMap","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","curr","_resolvedData","flattenInherited","urlSegment","lastPathIndex","_urlSegment","_lastPathIndex","_resolve","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalUrlParams","parentsMismatch","createNode","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","detachedRouteHandle","retrieve","setFutureSnapshotsOfActivatedRoutes","createUrlTree","commands","nav","Navigation","numberOfDoubleDots","isAbsolute","cmd","cmdIdx","outlets","segmentPath","urlPart","computeNavigation","toRoot","startingPosition","Position","isMatrixParams","group","ci","createPositionApplyingDoubleDots","findStartingPosition","processChildren","updateSegmentGroupChildren","updateSegmentGroup","command","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","oldSegment","newSegment","cmdWithOutlet","getPath","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","compare","prefixedWith","slicedCommands","createNewSegmentGroup","getOutlets","paths","createNewSegmentChildren","futureState","currState","forwardEvent","activate","parentContexts","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","contexts","futureChild","childOutletName","deactivateRoutes","childName","deactivateRouteAndItsChildren","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","onOutletDeactivated","deactivate","activateRoutes","ActivationEnd","ChildActivationEnd","getOrCreateContext","shouldAttach","stored","onOutletReAttached","attachRef","attach","advanceActivatedRouteNodeAndItsChildren","_loadedConfig","parentLoadedConfig","cmpFactoryResolver","activateWith","isUrlTree","obs","NoMatch","absoluteRedirect","newTree","AbsoluteRedirect","namedOutletsRedirect","configLoader","urlSerializer","allowRedirects","expandSegmentGroup","rootSegmentGroup","noMatchError","rootCandidate","expandChildren","expandSegment","waitHead","waitTail","mapped","lastValue","waitForMap","expandSegmentAgainstRoute","noLeftoversInUrl","getOutlet","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","lineralizeSegments","newSegments","consumedSegments","lastChild","positionalParamSegments","rawSegmentGroup","cfg","rawSlicedSegments","getChildConfig","routerConfig","childModule","slicedSegments","isEmptyPathRedirect","containsEmptyPathRedirectsWithNamedOutlets","mergeTrivialChildren","primarySegmentGroup","createChildrenForEmptySegments","containsEmptyPathRedirects","addEmptySegmentsToChildrenIfNeeded","cs","LoadedRouterConfig","canLoad","guardVal","isCanLoad","runCanLoadGuard","shouldLoad","canLoadFails","applyRedirectCreatreUrlTree","newRoot","createSegmentGroup","createQueryParams","redirectToParams","actualParams","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","applyRedirects","ApplyRedirects","applyRedirectsFn","extractedUrl","getToken","getClosestLoadedConfig","getChildRouteGuards","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","CanActivate","CanDeactivate","getRouteGuards","isActivated","INITIAL_VALUE","prioritizedGuardValue","isPending","innerAcc","checkGuards","targetSnapshot","guardsResult","futureRSS","currRSS","currARS","canDeactivate","canDeactivateObservables","isCanDeactivate","runCanDeactivate","runCanDeactivateChecks","fireChildActivationStart","fireActivationStart","runCanActivateChild","runCanActivate","runCanActivateChecks","ActivationStart","ChildActivationStart","futureARS","canActivate","canActivateObservables","isCanActivate","canActivateChildGuardsMapped","canActivateChild","getCanActivateChild","guardsMapped","isCanActivateChild","rootComponentType","relativeLinkResolution","recognize","processSegmentGroup","routeState","inheritParamsAndData","routeNode","processSegment","routeWithSameOutletName","localeCompare","sortActivatedRouteSnapshots","processSegmentAgainstRoute","rawSegment","getData","getSourceSegmentGroup","getPathIndexShift","getResolve","_sourceSegment","_segmentIndexShift","emptyPathMatch","containsEmptyPathMatchesWithNamedOutlets","primarySegment","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","Recognizer","recognizeFn","resolveData","getResolver","resolveNode","resolvedData","runResolve","switchTap","nextResult","detachedTree","loader","onLoadStartListener","onLoadEndListener","loadModuleFactory","shouldProcessUrl","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","defaultRouterHook","runExtras","rootContexts","lastSuccessfulNavigation","currentNavigation","navigationId","isNgZoneEnabled","malformedUriErrorHandler","navigated","lastSuccessfulId","beforePreactivation","afterPreactivation","urlHandlingStrategy","DefaultUrlHandlingStrategy","DefaultRouteReuseStrategy","onSameUrlNavigation","urlUpdateStrategy","resetConfig","currentUrlTree","rawUrlTree","browserUrlTree","RouterConfigLoader","triggerEvent","RouteConfigLoadStart","RouteConfigLoadEnd","routerState","transitions","currentRawUrl","rawUrl","extras","currentRouterState","targetRouterState","navigations","setupNavigations","processNavigations","eventsSubject","tslib_1.__assign","completed","errored","initialUrl","previousNavigation","urlTransition","NavigationStart","serializeUrl","finalUrl","skipLocationChange","setBrowserUrl","replaceUrl","routesRecognized","RoutesRecognized","navStart","appliedUrlTree","guardsStart","GuardsCheckStart","evt","guardsEnd","GuardsCheckEnd","resetUrlToCurrentUrlTree","navCancel","NavigationCancel","resolveStart","ResolveStart","resolveEnd","ResolveEnd","ActivateRoutes","redirecting","resetStateAndUrl","navigateByUrl","navError","NavigationError","ee","resetRootComponentType","getTransition","setTransition","initialNavigation","setUpLocationChangeListener","locationSubscription","parseUrl","scheduleNavigation","getCurrentNavigation","navigationExtras","relativeTo","preserveQueryParams","queryParamsHandling","preserveFragment","removeEmptyProps","mergedTree","navigate","validateCommands","isActive","NavigationEnd","lastNavigation","storedState","storedUrl","router","tabIndex","preserve","onClick","attrBoolValue","RouterLink","Router","locationStrategy","updateTargetUrlAndHref","button","ctrlKey","metaKey","shiftKey","RouterLinkWithHref","linkWithHref","routerLinkActiveOptions","links","linksWithHrefs","hasActiveLinks","isLinkActive","isActiveCheckFn","RouterLinkActive","ChildrenOutletContexts","onChildOutletCreated","onChildOutletDestroyed","OutletContext","changeDetector","_activatedRoute","activateEvents","deactivateEvents","cmp","activatedRoute","childContexts","OutletInjector","RouterOutlet","preload","moduleLoader","preloadingStrategy","setUpPreloading","processRoutes","preloadConfig","RouterPreloader","PreloadingStrategy","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","Scroll","ROUTER_DIRECTIVES","ROUTER_CONFIGURATION","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","UrlSerializer","setupRouter","UrlHandlingStrategy","RouteReuseStrategy","rootRoute","NoPreloading","PreloadAllModules","enableTracing","routerNgProbeToken","RouterModule","forRoot","provideRoutes","provideForRootGuard","provideLocationStrategy","RouterScroller","createRouterScroller","provideRouterInitializer","forChild","scrollOffset","platformLocationStrategy","useHash","getDOM","logGroup","logGroupEnd","initNavigation","resultOfPreactivationDone","appInitializer","isLegacyDisabled","isLegacyEnabled","bootstrapListener","bootstrappedComponentRef","preloader","routerScroller","RouterInitializer","getAppInitializer","getBootstrapListener","ROUTER_INITIALIZER","asyncScheduler","tabTitle","trans","TabTitle","CM_WEB_PORTAL","VirtualTimeScheduler","SchedulerAction","maxFrames","POSITIVE_INFINITY","frame","flush","execute","frameTimeFactor","VirtualAction","work","active","schedule","requestAsyncId","sortActions","recycleAsyncId","_execute","AsyncAction","bindNodeCallback","callbackFunc","resultSelector","isScheduler","dispatch","AsyncSubject","innerArgs","dispatchError","dispatchNext","generate","initialStateOrOptions","iterate","resultSelectorOrObservable","initialState","identity","conditionResult","needIterate","iif","trueResult","falseResult","interval","isNumeric","counter","NEVER","never","onErrorResumeNext","remainder","subNext","pairs","partition","subscribeTo","not","resourceFactory","observableFactory","resource","_elementRef","_applicationRef","_posService","onBeforeShow","onShown","onBeforeHide","onHidden","_isHiding","containerDefaultSelector","_listenOpts","_globalListener","_componentFactory","attachment","_subscribePositioning","_innerComponent","_contentRef","_getContentRef","_registerOutsideClick","deletePositionElement","componentEl","_removeGlobalListener","isShown","_unsubscribePositioning","_unregisterListenersFn","listenOpts","attachInline","vRef","_inlineViewRef","getInnerComponent","_zoneSubscription","appendToBody","calcPosition","ContentRef","contentCmptFactory","modalContentInjector","createLoader","ComponentLoader","NG_VALUE_ACCESSOR","CHECKBOX_VALUE_ACCESSOR","CheckboxControlValueAccessor","onChange","onTouched","writeValue","registerOnChange","registerOnTouched","setDisabledState","isDisabled","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","userAgent","_composing","getUserAgent","normalizedValue","_handleInput","_compositionStart","_compositionEnd","control","valid","pending","disabled","pristine","touched","status","untouched","statusChanges","valueChanges","errorCode","getError","AbstractControlDirective","unimplemented","valueAccessor","_rawValidators","_rawAsyncValidators","cd","_cd","ngControlStatusHost","NgControlStatus","NgControl","AbstractControlStatus","NgControlStatusGroup","ControlContainer","isEmptyInputValue","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","required","requiredTrue","email","minLength","maxLength","regexStr","Validators","nullValidator","compose","validators","presentValidators","isPresent","_mergeErrors","_executeValidators","composeAsync","observables","_executeAsyncValidators","toObservable","arrayOfErrors","normalizeValidator","validator","validate","normalizeAsyncValidator","NUMBER_VALUE_ACCESSOR","NumberValueAccessor","RADIO_VALUE_ACCESSOR","RadioControlValueAccessor","_accessors","accessor","_isSameGroup","fireUncheck","controlPair","_control","RadioControlRegistry","_checkName","_state","_fn","formControlName","_throwNameError","RANGE_VALUE_ACCESSOR","RangeValueAccessor","FormErrorExamples","controlParentException","Examples","ngModelGroupException","missingFormException","groupParentException","arrayParentException","disabledAttrWarning","ngModelWarning","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_buildValueString","_optionMap","_idCounter","_compareWith","_getOptionId","valueString","_getOptionValue","_registerOption","_extractId","_element","_select","_setElementValue","NgSelectOption","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","optionSelectedStateSetter","_setSelected","selected","selectedOptions","controlPath","setUpControl","asyncValidator","_pendingValue","_pendingChange","_pendingDirty","updateOn","updateControl","setUpViewChangePipeline","emitModelEvent","viewToModelUpdate","setUpModelChangePipeline","_pendingTouched","markAsTouched","setUpBlurPipeline","registerOnDisabledChange","registerOnValidatorChange","updateValueAndValidity","markAsDirty","emitModelToViewChange","setUpFormContainer","_noControlError","messageEnd","composeValidators","composeAsyncValidators","isPropertyUpdated","viewModel","BUILTIN_ACCESSORS","syncPendingControls","_syncPendingControls","selectValueAccessor","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","removeDir","_ngModelWarning","warningConfig","_ngModelWarningSentOnce","_ngModelWarningSent","ReactiveErrors","coerceToValidator","validatorOrOpts","isOptionsObj","coerceToAsyncValidator","origAsyncValidator","asyncValidators","_onCollectionChange","_onDisabledChange","_updateOn","setValidators","newValidator","setAsyncValidators","clearValidators","clearAsyncValidators","onlySelf","markAllAsTouched","_forEachChild","markAsUntouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","emitEvent","disable","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","enable","setParent","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","delimiter","FormGroup","controls","FormArray","at","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_isBoxedValue","formState","_registerOnCollectionChange","_setUpdateStrategy","parentDirty","_onChange","_applyFormState","emitViewToModelChange","patchValue","_clearChangeFns","AbstractControl","_setUpControls","registerControl","addControl","removeControl","setControl","controlName","_checkAllValuesPresent","_throwIfControlMissing","getRawValue","_reduceChildren","FormControl","subtreeUpdated","_reduceValue","initValue","_registerControl","removeAt","formDirectiveProvider","NgForm","resolvedPromise","submitted","_directives","ngSubmit","_findContainer","getControl","addFormGroup","removeFormGroup","getFormGroup","updateModel","onSubmit","$event","onReset","resetForm","modelParentException","formGroupNameException","missingNameException","modelGroupParentException","ngFormWarning","NG_FORM_SELECTOR_WARNING","_ngFormWarning","TemplateDrivenErrors","NgFormSelectorWarning","_checkParentType","formDirective","_validators","_asyncValidators","modelGroupProvider","NgModelGroup","AbstractFormGroupDirective","formControlBinding","NgModel","_registered","_checkForErrors","_setUpControl","_updateDisabled","_isStandalone","_setUpStandalone","disabledValue","NG_MODEL_WITH_FORM_CONTROL_WARNING","FormControlDirective","_ngModelWarningConfig","_isControlChanged","FormGroupDirective","_checkFormPresent","_updateValidators","_updateDomValue","_updateRegistrations","addFormArray","removeFormArray","getFormArray","newCtrl","cleanUpControl","_oldForm","sync","formGroupNameProvider","FormGroupName","_hasInvalidParent","formArrayNameProvider","FormArrayName","controlNameBinding","FormControlName","_added","REQUIRED_VALIDATOR","RequiredValidator","CHECKBOX_REQUIRED_VALIDATOR","CheckboxRequiredValidator","_required","EMAIL_VALIDATOR","EmailValidator","_enabled","MIN_LENGTH_VALIDATOR","MinLengthValidator","_createValidator","minlength","_validator","MAX_LENGTH_VALIDATOR","MaxLengthValidator","maxlength","PATTERN_VALIDATOR","PatternValidator","SHARED_FORM_DIRECTIVES","NgNoValidate","NgSelectMultipleOption","TEMPLATE_DRIVEN_DIRECTIVES","REACTIVE_DRIVEN_DIRECTIVES","controlsConfig","_reduceControls","isAbstractControlOptions","_createControl","controlConfig","FormBuilder","FormsModule","withConfig","warnOnDeprecatedNgFormSelector","InternalFormsSharedModule","ReactiveFormsModule","warnOnNgModelWithFormControl","authService","jwtHelper","JwtHelperService","isTokenExpired","refresh_token","refreshToken","isUserTokenAlive","isUserInRole","role","decodedToken","decodeToken","authorities","roleItem","isOrganizationAdmin","ORGANIZATION_ADMIN_ROLE","isStationManager","STATION_MANAGEMENT_ROLE","getUserName","user_name","getUserOrganizationFromToken","getDecodedToken","org","getStationList","getAuthorities","getTokenParam","CmGuardService","CmAuthService","emptyScheduled","getStyleComputedProperty","getParentNode","getScrollParent","overflowX","overflowY","isBrowser","isIE11","MSInputMethodContext","isIE10","isIE","getOffsetParent","documentElement","sibling","noOffsetParent","offsetParent","nextElementSibling","getRoot","findCommonOffsetParent","element1","element2","DOCUMENT_POSITION_FOLLOWING","createRange","setStart","setEnd","commonAncestorContainer","firstElementChild","element1root","getBordersSize","axis","sideA","sideB","getSize","computedStyle","getWindowSizes","height","getScroll","side","upperSide","scrollingElement","getClientRect","bottom","scrollTop","scrollLeft","sizes","clientWidth","clientHeight","horizScrollbar","offsetWidth","vertScrollbar","getOffsetRectRelativeToArbitraryNode","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","includeScroll","getFixedPositionOffsetParent","getBoundaries","padding","boundariesElement","boundaries","excludeScroll","relativeOffset","innerWidth","innerHeight","getViewportOffsetRectRelativeToArtbitraryNode","boundariesNode","isFixed","computeAutoPlacement","placement","refRect","allowedPositions","rects","sortedAreas","area","filteredAreas","computedPlacement","allowedPosition","variation","getOuterSizes","marginBottom","marginRight","getReferenceOffsets","getTargetOffsets","hostOffsets","targetRect","targetOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","getOppositePlacement","isModifierEnabled","modifierName","setStyles","arrow","arrowElement","isVertical","sideCapitalized","altSide","opSide","arrowElementSize","center","targetMarginSide","targetBorderSide","sideValue","flip","adaptivePosition","flipOrder","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariation","getOppositeVariation","preventOverflow","basePlacement","shiftvariation","shiftOffsets","targetElement","positionElements","modifiedData","hostElPosition","placementAuto","positionFixed","initData","positionService","Positioning","getOffsets","containerClass","updateContainerClass","update$$","positionElement","_getHtmlElement","addPositionElement","elRef","setOptions","mergeMap","concurrent","MergeMapOperator","MergeMapSubscriber","hasCompleted","_tryNext","_innerSub","ish","innerSubscription","flatMap","damageCategoriesUrl","reportingSqlUrl","areaUrl","returnMap","processJsonFromData","returnLocalizedMap","selectedLang","DEFAULT_LANGUAGE","returnIdCodeMap","returnNumberCodeMap","readCityAreas","sendCsvConfigurationFile","getUploadFileHeaders","sendCsvFile","sendJson","append","getLanguages","LANGUAGES","getSparePartsCategoriesList","showHidden","getSparePartsByCategory","saveBikeAllowed","bikeId","allowedLocationIds","getBikeAllowedLocations","getStationFromList","stationList","stationId","getReportExtract2","reportType","reqParams","getReportExtract","getErrorMsg","retStr","objectName","defaultMessage","getArchivedReportList","deleteArchivedReport","uuid","deleteReturnResponse","cancelReportProcessing","postReturnSame","loadArchivedReport","Headers","DataService","BehaviorSubject","switchMap","SwitchMapOperator","SwitchMapSubscriber","displayMonths","showWeekNumbers","dateInputFormat","rangeSeparator","rangeInputFormat","monthTitle","yearTitle","dayLabel","monthLabel","yearLabel","weekNumbers","_customRangesFish","_effects","setMinDate","setMaxDate","setDaysDisabled","setDatesDisabled","setDisabled","setDateCustomClasses","setViewMode","navigateTo","dayHoverHandler","weekHoverHandler","monthHoverHandler","yearHoverHandler","daySelectHandler","monthSelectHandler","yearSelectHandler","_stopPropagation","stopPropagation","calculate","BsDatepickerActions","CALCULATE","FORMAT","flag","FLAG","SELECT","payload","changeViewMode","CHANGE_VIEWMODE","NAVIGATE_TO","navigateStep","NAVIGATE_OFFSET","SET_OPTIONS","selectRange","SELECT_RANGE","hoverDay","HOVER","isHovered","cell","minDate","SET_MIN_DATE","maxDate","SET_MAX_DATE","SET_DAYSDISABLED","datesDisabled","SET_DATESDISABLED","SET_IS_DISABLED","SET_DATE_CUSTOM_CLASSES","setLocale","SET_LOCALE","_defaultLocale","_localeChange","use","currentLocale","_actions","_localeService","_subs","_bsDatepickerStore","_store","setRangeValue","setBindings","daysCalendar","flaggedMonths","monthsCalendar","flaggedMonthsCalendar","yearsCalendar","yearsCalendarFlagged","viewMode","setEventHandlers","_cell","isOtherMonth","registerDatepickerSideEffects","monthsModel","monthModel","formattedMonths","selectedDate","selectedRange","yearsCalendarModel","hoveredDate","dateCustomClasses","localeChange","BsLocaleService","_initialView","initialDatepickerState","BsDatepickerConfig","monthViewOptions","isMonthDisabled","minBound","maxBound","isYearDisabled","createMatrix","initialDate","matrix","calcDaysCalendar","startingDate","firstDay","startingDayOffset","calculateDateOffset","getStartingDayOfCalendar","daysMatrix","getShiftedWeekdays","flagDaysCalendar","formattedMonth","dayIndex","isSelectionStart","isSelectionEnd","isSelected","isInRange","isDateInRange","dateDisabled","isToday","customClasses","dcc","newDay","hideLeftArrow","monthIndex","hideRightArrow","disableLeftArrow","disableRightArrow","canSwitchMode","minMode","formatMonthsCalendar","viewDate","formatOptions","initialShift","yearsPerCalendar","formatYearsCalendar","yearsMatrix","formatYearRangeTitle","bsDatepickerReducer","calendarIndex","getFormatOptions","calculateReducer","weekIndex","formatDaysCalendar","formatReducer","monthCalendar","hoveredMonth","rowIndex","newMonth","yearIndex","hoveredYear","flagYearsCalendar","flagReducer","newState","getViewDate","_dispatcher","_positionService","valueChange","isOtherMonthsActive","selectFromOtherMonth","BsDatepickerStore","BsDatepickerEffects","BsDatepickerAbstractComponent","cis","bsValueChange","_datepicker","_bsValue","_datepickerRef","BsDatepickerContainerComponent","bsValue","isOpen","bsConfig","_positioningService","BsDatepickerInlineContainerComponent","BsDatepickerInlineConfig","BS_DATEPICKER_VALUE_ACCESSOR","BsDatepickerInputDirective","BS_DATEPICKER_VALIDATOR","_picker","_elRef","_onTouched","_validatorChange","_setInputValue","bsDate","_localeKey","onBlur","blur","BsDatepickerDirective","_rangeStack","BsDaterangepickerContainerComponent","BsDaterangepickerConfig","BS_DATERANGEPICKER_VALUE_ACCESSOR","BsDaterangepickerInputDirective","BS_DATERANGEPICKER_VALIDATOR","_isFirstDateValid","_isSecondDateValid","_val","BsDaterangepickerDirective","customTodayClass","UP","DOWN","onNavigate","onViewMode","navTo","down","BsNavigationDirection","onSelect","onHover","onHoverWeek","selectDay","selectWeek","selectedDay","isWeekHovered","isOtherMonthHovered","viewMonth","hoverMonth","ampm","viewYear","hoverYear","_exports","BsDatepickerInlineDirective","BsDatepickerModule","BsDatepickerDayDecoratorComponent","BsCurrentDateViewComponent","BsDatepickerNavigationViewComponent","BsTimepickerViewComponent","BsCalendarLayoutComponent","BsDaysCalendarViewComponent","BsMonthCalendarViewComponent","BsYearsCalendarViewComponent","BsCustomDatesViewComponent","selectionDone","activeDateChange","stepDay","stepMonth","stepYear","modes","_activeDate","uniqueId","initDate","activeDate","refreshView","checkIfActiveDateGotUpdated","setCompareHandler","compareHandlerDay","compareHandlerMonth","compareHandlerYear","datepickerMode","setRefreshViewHandler","refreshViewHandlerDay","refreshViewHandlerMonth","refreshViewHandlerYear","dateFilter","dateObject","activeDateId","uid","createDateObject","fixTimeZone","customClass","getCustomClassForDate","arrays","expectedStep","toggleMode","_direction","maxMode","customClassObject","compareDateDisabled","date1Disabled","isDateDisabled","disabledDate","dayDisabled","startingDay","yearRange","showWeeks","formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","onlyCurrentMonth","monthColLimit","yearColLimit","shortcutPropagation","DATEPICKER_CONTROL_VALUE_ACCESSOR","DatePickerComponent","_now","configureOptions","onUpdate","onSelectionDone","onActiveDateChange","_datePicker","DatepickerConfig","DatePickerInnerComponent","datePicker","labels","rows","firstDayOfMonth","difference","numDisplayedFromPreviousMonth","firstDate","getDates","_dateObject","thursdayIndex","numWeeks","getISO8601WeekNumber","d1","d2","startDate","checkDate","getStartingYear","DatepickerModule","DayPickerComponent","MonthPickerComponent","YearPickerComponent","audit","durationSelector","AuditOperator","AuditSubscriber","hasValue","throttled","clearThrottle","auditTime","timer","closingNotifier","BufferOperator","BufferSubscriber","bufferCount","bufferSize","startBufferEvery","BufferCountOperator","subscriberClass","BufferCountSubscriber","BufferSkipCountSubscriber","buffers","bufferTime","bufferTimeSpan","bufferCreationInterval","maxBufferSize","BufferTimeOperator","Context","BufferTimeSubscriber","openContext","timespanOnly","timeSpanOnlyState","closeAction","dispatchBufferTimeSpanOnly","closeState","creationState","dispatchBufferClose","dispatchBufferCreation","filledBufferContext","context_1","onBufferFull","context_2","closeContext","prevContext","bufferToggle","openings","closingSelector","BufferToggleOperator","BufferToggleSubscriber","subscribeToResult","outerValue","closeBuffer","openBuffer","innerSub","trySubscribe","OuterSubscriber","bufferWhen","BufferWhenOperator","BufferWhenSubscriber","subscribing","closingSubscription","combineAll","concatMapTo","innerObservable","concatMap","CountOperator","CountSubscriber","_tryPredicate","debounce","DebounceOperator","DebounceSubscriber","emitValue","durationSubscription","delayFor","DelayOperator","DelaySubscriber","notification","observe","delay_1","_schedule","scheduleNotification","DelayMessage","Notification","createNext","createComplete","delayWhen","delayDurationSelector","subscriptionDelay","DelayWhenOperator","DelayWhenSubscriber","delayNotifierSubscriptions","_innerValue","_outerIndex","_innerIndex","removeSubscription","tryComplete","delayNotifier","tryDelay","subscriptionIdx","notifierSubscription","SubscriptionDelayObservable","SubscriptionDelaySubscriber","sourceSubscribed","unused","subscribeToSource","dematerialize","DeMaterializeOperator","DeMaterializeSubscriber","distinct","keySelector","flushes","DistinctOperator","DistinctSubscriber","_useKeySelector","_finalizeNext","distinctUntilKeyChanged","distinctUntilChanged","elementAt","ArgumentOutOfRangeError","hasDefaultValue","take","defaultIfEmpty","throwIfEmpty","endWith","exhaust","SwitchFirstOperator","SwitchFirstSubscriber","hasSubscription","exhaustMap","ExhaustMapOperator","ExhaustMapSubscriber","tryNext","expand","ExpandOperator","ExpandSubscriber","subscribeToProjection","FindValueOperator","yieldIndex","FindValueSubscriber","ignoreElements","IgnoreElementsOperator","IgnoreElementsSubscriber","IsEmptyOperator","IsEmptySubscriber","mapTo","MapToOperator","MapToSubscriber","materialize","MaterializeOperator","MaterializeSubscriber","comparer","mergeMapTo","mergeScan","accumulator","seed","MergeScanOperator","MergeScanSubscriber","nextSources","OnErrorResumeNextOperator","OnErrorResumeNextSubscriber","subscribeToNextSource","pairwise","PairwiseOperator","PairwiseSubscriber","hasPrev","pair","pluck","plucker","publish","multicast","publishBehavior","publishLast","publishReplay","windowTime","selectorOrScheduler","ReplaySubject","race","repeat","RepeatOperator","RepeatSubscriber","repeatWhen","notifier","RepeatWhenOperator","RepeatWhenSubscriber","sourceIsBeingSubscribedTo","retries","subscribeToRetries","retriesSubscription","notifications","retry","RetryOperator","RetrySubscriber","retryWhen","RetryWhenOperator","RetryWhenSubscriber","sampleTime","SampleTimeOperator","SampleTimeSubscriber","dispatchNotification","sequenceEqual","compareTo","SequenceEqualOperator","SequenceEqualSubscriber","_b","_oneComplete","checkValues","areEqual","nextB","completeB","SequenceEqualCompareToSubscriber","single","SingleOperator","SingleSubscriber","seenValue","applySingleValue","singleValue","EmptyError","skipLast","SkipLastOperator","_skipCount","SkipLastSubscriber","_count","_ring","skipCount","ring","skipUntil","SkipUntilOperator","SkipUntilSubscriber","skipWhile","SkipWhileOperator","SkipWhileSubscriber","skipping","tryCallPredicate","SubscribeOnObservable","delayTime","asap","subscribeOn","SubscribeOnOperator","switchAll","switchMapTo","takeWhile","inclusive","TakeWhileOperator","TakeWhileSubscriber","nextOrComplete","predicateResult","defaultThrottleConfig","leading","trailing","throttle","ThrottleOperator","ThrottleSubscriber","_leading","_trailing","_hasValue","_sendValue","_throttled","tryDurationSelector","throttlingDone","throttleTime","ThrottleTimeOperator","ThrottleTimeSubscriber","_hasTrailingValue","_trailingValue","timeInterval","scan","TimeInterval","timeoutWith","due","withObservable","absoluteTimeout","waitFor","TimeoutWithOperator","TimeoutWithSubscriber","scheduleTimeout","dispatchTimeout","TimeoutError","timestamp","Timestamp","windowBoundaries","WindowOperator","windowSubscriber","sourceSubscription","WindowSubscriber","openWindow","prevWindow","newWindow","windowCount","windowSize","startWindowEvery","WindowCountOperator","WindowCountSubscriber","windows","window_1","windowTimeSpan","windowCreationInterval","maxWindowSize","WindowTimeOperator","CountedSubject","_numberOfNextedValues","WindowTimeSubscriber","dispatchWindowClose","dispatchWindowCreation","dispatchWindowTimeSpanOnly","numberOfNextedValues","closeWindow","window_2","timeSpanState","windowToggle","WindowToggleOperator","WindowToggleSubscriber","openSubscription","context_3","outerIndex","innerIndex","context_4","windowWhen","_outerValue","unsubscribeClosingNotification","closingNotification","withLatestFrom","WithLatestFromOperator","WithLatestFromSubscriber","toRespond","_tryProject","zip","zipAll","InnerSubscriber","outerSubscriber","_enable_super_gross_mode_that_will_cause_bad_things","subjectOrSubjectFactory","subjectFactory","MulticastOperator","connectable","_DOM","setRootDomAdapter","adapter","urlParsingNode","resourceLoaderType","_attrToPropMap","_animationPrefix","_transitionEnd","getStyle","domPrefixes","WebkitTransition","MozTransition","OTransition","getDistributedNodes","resolveAndSetHref","supportsDOMEvents","supportsNativeShadowDOM","createShadowRoot","getAnimationPrefix","getTransitionEnd","supportsAnimation","DomAdapter","_keyMap","_chromeNumKeyPadMap","nodeContains","templateHtml","makeCurrent","BrowserDomAdapter","getProperty","groupEnd","nodeA","nodeB","querySelectorAll","on","onAndCancel","createMouseEvent","eventType","getDefaultDocument","createEvent","initEvent","isPrevented","defaultPrevented","getInnerHTML","getOuterHTML","childNodesAsList","clearNodes","replaceChild","insertAllBefore","insertAfter","setInnerHTML","getText","getChecked","checked","setChecked","createTemplate","doc","createScriptTag","getShadowRoot","shadowRoot","getHost","cloneNode","getElementsByClassName","getElementsByTagName","hasClass","stylename","hasStyle","attributeMap","attrib","hasAttribute","hasAttributeNS","getAttribute","getAttributeNS","removeAttributeNS","templateAwareRoot","createHtmlDocument","getTitle","setTitle","newTitle","elementMatches","isElementNode","msMatchesSelector","webkitMatchesSelector","hasShadowRoot","HTMLElement","isShadowRoot","DocumentFragment","importIntoDoc","importNode","adoptNode","getHref","getEventKey","keyIdentifier","getGlobalEventTarget","getHistory","getLocation","baseElement","getBaseElementHref","relativePath","resetBaseElement","navigator","setData","supportsWebAnimation","performanceNow","supportsCookies","getCookie","setCookie","GenericBrowserDomAdapter","supportsState","_doc","_history","port","newPath","BrowserPlatformLocation","TRANSITION_ID","appInitializerFactory","transitionId","dom","SERVER_TRANSITION_PROVIDERS","BrowserGetTestability","testabilities","didWork","decrement","didWork_","exportNgVar","COMPILED","CORE_TOKENS","inspectNativeElement","_createNgProbe","coreTokens","ELEMENT_PROBE_PROVIDERS__POST_R3__","ELEMENT_PROBE_PROVIDERS__PRE_R3__","ELEMENT_PROBE_PROVIDERS","EVENT_MANAGER_PLUGINS","plugins","_eventNameToPlugin","manager","_plugins","_findPluginFor","addGlobalEventListener","getZone","plugin","EventManager","_stylesSet","addStyles","additions","onStylesAdded","getAllStyles","SharedStylesHost","_hostNodes","_styleNodes","_addStylesToHost","styleEl","addHost","hostNode","removeHost","styleNode","DomSharedStylesHost","NAMESPACE_URIS","COMPONENT_REGEX","HOST_ATTR","CONTENT_ATTR","shimContentAttribute","componentShortId","shimHostAttribute","flattenStyles","compId","decoratePreventDefault","eventHandler","eventManager","sharedStylesHost","appId","rendererByCompId","DefaultDomRenderer2","EmulatedEncapsulationDomRenderer2","applyToHost","ShadowDomRenderer","DomRendererFactory2","namespaceUri","Important","checkNoSyntheticProp","AT_CHARCODE","nameKind","contentAttr","hostAttr","hostEl","attachShadow","nodeOrShadowRoot","__symbol__","ADD_EVENT_LISTENER","REMOVE_EVENT_LISTENER","symbolNames","stopSymbol","blackListedMap","blackListedEvents","isBlackListedEvent","globalListener","taskDatas","taskData","copiedTasks","patchEvent","stopImmediatePropagation","zoneJsLoaded","globalListenerRegistered","callbackRegistered","underlyingRemove","DomEventsPlugin","EventManagerPlugin","EVENT_NAMES","HAMMER_GESTURE_CONFIG","HAMMER_LOADER","overrides","buildHammer","mc","Hammer","HammerGestureConfig","isCustomEvent","off","HammerGesturesPlugin","MODIFIER_KEYS","MODIFIER_KEY_GETTERS","altKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","domEventName","_normalizeKey","fullKey","getEventFullKey","modifierGetter","keyName","SafeHtmlImpl","changingThisBreaksApplicationSecurity","checkNotSafeValue","SafeStyleImpl","SafeScriptImpl","SafeResourceUrlImpl","SafeUrlImpl","expectedType","SafeValueImpl","getTypeName","bypassSecurityTrustHtml","bypassSecurityTrustStyle","bypassSecurityTrustScript","bypassSecurityTrustUrl","bypassSecurityTrustResourceUrl","DomSanitizerImpl","DomSanitizer","INTERNAL_BROWSER_PLATFORM_PROVIDERS","initDomAdapter","_document","BROWSER_SANITIZATION_PROVIDERS","platformBrowser","BROWSER_MODULE_PROVIDERS","BrowserModule","withServerTransition","createMeta","Meta","_dom","addTag","forceCreation","_getOrCreateElement","addTags","getTag","attrSelector","getTags","updateTag","_parseSelector","_setMetaElementAttributes","removeTag","removeTagElement","_containsAttributes","createTitle","Title","msPerTick","numTicks","timeChangeDetection","isProfilerAvailable","profile","profileEnd","ChangeDetectionPerfRecord","enableDebugTools","AngularProfiler","disableDebugTools","escapeHtml","escapedText","'","makeStateKey","onSerializeCallbacks","TransferState","transferState","hasKey","onSerialize","toJson","initTransferState","unescapedText","script","getElementById","BrowserTransferStateModule","NotificationKind","do","accept","undefinedValueNotification","completeNotification","tap","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","LOADERS","DEFAULTS","spinnerObservable","getSpinner","spinner","_reject","NgxSpinner","NgxSpinnerService","spinnerService","ngUnsubscribe","setDefaultOptions","bdColor","color","fullScreen","divArray","divCount","zIndex","onInputChange","changedProp","getClass","sizeClass","class","NgxSpinnerComponent","opacity","NgxSpinnerModule","SORT_DIRECTION","simpleSort","sortProperty","DESC","prop1","prop2","ASC","DEFAULT_DATE_FORMAT","moment","writeDownFile","csv","msSaveOrOpenBlob","msSaveBlob","download","click","CSVToArray","strData","strDelimiter","objPattern","arrData","arrMatches","strMatchedValue","strMatchedDelimiter","downloadFile","CmUtil","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","locals","SpinnerUtils","normalizedNames","lazyUpdate","lazyInit","maybeSetNormalizedName","lcName","copyFrom","applyUpdate","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","rawParams","codec","cloneFrom","encoder","HttpUrlEncodingCodec","fromString","fromObject","eqIdx","eKey","HttpParams","isArrayBuffer","ArrayBuffer","isBlob","isFormData","FormData","HttpEventType","third","fourth","reportProgress","withCredentials","mightHaveBody","urlWithParams","qIdx","serializeBody","detectContentTypeHeader","setHeaders","setParams","HttpRequest","defaultStatus","defaultStatusText","statusText","ok","ResponseHeader","HttpHeaderResponse","HttpResponseBase","Response","HttpResponse","addBody","request","req","events$","handle","res$","jsonp","callbackParam","HttpHandler","interceptor","intercept","HTTP_INTERCEPTORS","NoopInterceptor","nextRequestId","callbackMap","nextCallback","finished","cancelled","onLoad","HttpErrorResponse","Sent","JsonpClientBackend","JsonpCallbackContext","JsonpInterceptor","XSSI_PREFIX","BrowserXhr","xhrFactory","setRequestHeader","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","responseURL","getResponseHeader","getResponseUrl","responseText","originalBody","sentHeaders","onDownProgress","progressEvent","DownloadProgress","loaded","lengthComputable","partialText","onUpProgress","progress","UploadProgress","upload","abort","HttpXhrBackend","XhrFactory","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","lastCookieString","lastToken","parseCount","cookieString","HttpXsrfCookieExtractor","tokenService","headerName","lcUrl","HttpXsrfInterceptor","HttpXsrfTokenExtractor","backend","interceptors","HttpInterceptorHandler","HttpInterceptingHandler","HttpBackend","jsonpCallbackContext","HttpClientXsrfModule","withOptions","HttpClientModule","HttpClientJsonpModule","ArgumentOutOfRangeErrorImpl","EmptyErrorImpl","TakeOperator","TakeSubscriber","localStorageKey","save","setItem","sortField","sortDirection","ASC_STRING","DESC_STRING","objProperty","TableFilter","DefaultIfEmptyOperator","DefaultIfEmptySubscriber","AsyncScheduler","scheduled","hasNext","setInterval","clearInterval","errorValue","Action","getTranslation","TranslateLoader","compileTranslations","TranslateCompiler","o1","o2","keySet","t1","templateMatcher","interpolateString","interpolateFunction","TranslateParser","currentLang","defaultLang","langs","onTranslationChange","onLangChange","onDefaultLangChange","USE_STORE","USE_DEFAULT_LANG","currentLoader","parser","missingTranslationHandler","useDefaultLang","isolate","_onTranslationChange","_onLangChange","_onDefaultLangChange","_langs","_translationRequests","_defaultLang","_currentLang","setDefaultLang","retrieveTranslations","changeDefaultLang","getDefaultLang","changeLang","loadingTranslations","updateLangs","setTranslation","shouldMerge","mergeDeep","getLangs","addLangs","getParsedResult","mergedObs","translateService","onComplete","stream","instant","reloadLang","resetLang","getBrowserLang","browserLang","languages","language","browserLanguage","userLanguage","getBrowserCultureLang","browserCultureLang","TranslateStore","MissingTranslationHandler","onTranslationChangeSub","checkNodes","onLangChangeSub","onDefaultLangChangeSub","currentParams","setContent","lastKey","getContent","trimmedContent","originalContent","updateValue","lastParams","onTranslation","validArgs","SyntaxError","TranslateModule","TranslateFakeLoader","TranslateFakeCompiler","TranslateDefaultParser","FakeMissingTranslationHandler","TranslatePipe","TranslateDirective","STATUS_ACTIVE","STATUS_INACTIVE","masterDataLocations","masterDataMap","masterDataLoaded","masterDataLoaded$","masterDataLoadedNew","masterDataLoadedNew$","dataBaseDataLoaded","dataBaseDataLoaded$","changeMdSuccess","changeMdSuccess$","locationItemLoaded","locationItemLoaded$","masterDataKey","loadStationMD","getFullName","ani","CmLocationInterval","loadStationMDNew","page","getById","getNameById","loadFullData","pageLimit","filters","dataParsed","dataBaseData","mergeDataBaseAndMasterData","submitData","fireChangeSuccessEvent","loadDataByLocation","jobItemList","mv","addJobs","JobInLocationType","assignedTo","convertCheck","moveToWs","toWs","locationStatusUpdate","locationId","locationStatus","getJobItemText","taskType","qty","bike","user","CmJobItem","locationName","street1","street2","job","masterData","bikeNumber","isLocationActive","currentStatus","CmLocationsService","BikeType","startTime","finishTime","CmLocation","CmDBJobList","highlighted","bordered","Serializable","Marker","MarkerType","_initialState","actionsDispatcher$","reducer","_reducer","state$","pathOrMapFn","MiniStore","hasSeed","ScanOperator","ScanSubscriber","_seed","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","eventsCount","spliceCount","isArrayLike","subscribeToArray","hostReportError","return","BIKE_TYPE","LOCATION_TYPE","BIKE_AND_LOCATION_TYPES","componentLastPageMapping","isDetailedComponent","goFromParentComponentPage","isBackFromDetailedToParent","readLastParentPageForCurrentComponentIfExist","goToDetailsFromParentPage","CmComponentTrackerService","errorFactory","defaultErrorFactory","ThrowIfEmptyOperator","ThrowIfEmptySubscriber","combineLatest","CombineLatestOperator","CombineLatestSubscriber","oldVal","_tryResultSelector","concatAll","catchError","CatchOperator","caught","CatchSubscriber","err2","pipeFromArray","mergeAll","takeLast","TakeLastOperator","TakeLastSubscriber","nextHandle","RESOLVED","activeHandles","findAndClearHandle","Immediate","AsapAction","asapScheduler","AsapScheduler","UnsubscriptionError","UnsubscriptionErrorImpl","isSortAsc","isSortDesc","isNoSort","CmSortableThComponent","Bike","Battery","dataService","modal","processingAction","onListSize","pbConf","CmProgressbarConfModel","processing","updateArchivedListSubs","progressbarSubs","loadArchivedList","substObjectMsg","substDonectMsg","subPocessing","reports","anyInProcess","ready","archivedReports","r1","r2","timestampCreated","rep","shortDetails","error1","startProcessingProcess","removeArchivedReport","confirm","okBtn","cancelBtn","fileUuid","removeLastReportFromList","alert","filename","timestampToDateStr","cancelReport","CmReportComponent","isStacked","bars","_max","_animate","_striped","striped","bar","recalculatePercentage","addBar","removeBar","ProgressbarConfig","percent","totalPercentage","ProgressbarComponent","ProgressbarModule","BarComponent","refCount","RefCountOperator","_refCount","refCounter","RefCountSubscriber","connection","connect","sharedConnection","_connection","ZipOperator","ZipSubscriber","iterators","StaticArrayIterator","StaticIterator","ZipBufferIterator","stillUnsubscribed","notifyInactive","checkIterators","shouldComplete","_tryresultSelector","isComplete","QueueAction","queueScheduler","QueueScheduler","closed_1","scheduleArray","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","сmHttpClient","organizationService","httpClient","errorAuthText","errorTextChanges$","successLogin","successLogin$","alivePeriod","deviceManagementUrl","loginUrlPrefix","loginRefreshPrefix","logoutPrefix","confPeriodPrefix","login","username","password","requestOptions","createHeaders","isLoggedIn","readAliveParameter","loginError","logout","removeItem","urlToRedirect","error_description","CmOrganizationService","citySettingsUrl","loadOrganizationSettingsByLoginContext","settings","orgaName","isSettingsValid","orgaSettings","eastLongitude","westLongitude","northLatitude","southLatitude","loadCoordinatesByLoginContext","extractCoordinates","share","coordinates","CmCoordinates","latitude","longitude","BERLIN_CENTER","cmAliveService","AppComponent","CmAliveService","fromJSON","workloadService","employeeList","sourceEmployeeList","unassign","Employee","userList","sortUsers","reloadData","selectEmployee","employee","assignee","jobItem","undispatch","CmJobType","TO_CHECK","loadEmployeeWorkLoad","employeeWorkLoad","workload","calculateJobsWorkload","EMPLOYEE_WORKLOAD_THRESHOLD","getName","cancel","prompt","jobItems","filterUsers","lastName","firstName","CmAssignComponent","DialogRef","CmUserWorkloadService","BSModalContext","CustomModalContext","emailService","orgaService","amazonPictures","ticket","TroubleTicket","priorityList","trip","CmTripModel","modelChanged","isSavePressed","ticketId","missionType","selectBike","selectLocation","troubleTicketsType","bikes","TroubleTicketBike","loadTrip","reporter","bailOut","setNoticeDate","closeAndRefreshParent","removeBike","row","submitPictures","pictureLinks","pictureNames","pictures","submitPicture","prepareSaveRequest","troubleTicket","isExisting","isBikeTicketType","complain","emailToCustomer","emailToDispatcher","saveAndClose","saveRequest","openLocations","CmModalLocationListComponent","overlayConfigFactory","openBikes","CmModalBikeListComponent","linkToHal","keyToHal","booking","modelChangedConfirmDialog","onYesListener","okBtnClass","cancelBtnClass","turnIntoJob","bikeFilters","BikesJobListFilters","turnIntoJobRequest","CmTroubleTicketListComponent","dateCreatedTo","closeTicket","formatTimestamp","dateStr","isLocationTicketType","getMissionType","userFormatTrip","firstTripInMinutes","convertMinutesToHhMmFormat","getTripStart","fromLocation","fromCoordinates","getTripStop","toLocation","toCoordinates","categoryChanged","getAdditionalBikeCategory","CmTroubleTicketComponent","CmEmailServiceService","CmAmazonPicturesService","TTModalDialog","ReportExtractParam","substitutions","ReportExtractParamField","TimepickerActions","WRITE_VALUE","changeHours","CHANGE_HOURS","changeMinutes","CHANGE_MINUTES","changeSeconds","CHANGE_SECONDS","SET_TIME_UNIT","updateControls","UPDATE_CONTROLS","isValidDate","isValidLimit","newDate","parseHours","parseMinutes","parseSeconds","parseTime","changeTime","isHourInputValid","isMinuteInputValid","isSecondInputValid","isInputValid","canChangeValue","readonlyInput","mousewheel","arrowkeys","getControlsValue","hourStep","minuteStep","secondsStep","showSpinners","showMeridian","showSeconds","meridians","showMinutes","TimepickerConfig","canIncrementHours","canIncrementMinutes","canIncrementSeconds","canDecrementHours","canDecrementMinutes","canDecrementSeconds","canToggleMeridian","timepickerReducer","_newTime","canChangeMinutes","canChangeSeconds","_newControlsState","_newHour","_newMinutes","_newSeconds","timepickerControls","_newState","TIMEPICKER_CONTROL_VALUE_ACCESSOR","TimepickerComponent","_timepickerActions","invalidHours","invalidMinutes","invalidSeconds","timepickerSub","_renderTime","controlsState","resetValidation","meridian","prevDef","wheelSign","deltaY","updateHours","_updateTime","updateMinutes","updateSeconds","_seconds","_minutes","toggleMeridian","isEditable","_hours","TimepickerStore","TimepickerModule","observeOn","ObserveOnOperator","ObserveOnSubscriber","scheduleMessage","ObserveOnMessage","Scheduler","dueTime","periodOrScheduler","shareSubjectFactory","stationSubj","stationChange$","_station","setStation","groupBy","subjectSelector","GroupByOperator","GroupBySubscriber","attemptedToUnsubscribe","_group","groupedObservable","GroupedObservable","GroupDurationSubscriber","removeGroup","groupSubject","refCountSubscription","InnerRefCountSubscription","issues","categories","spareParts","BikeJobListItem","uuidv4","_url","picture","checkIfPictureFormat","getContentType","uuid4","getPicture","tickets","totalExport","subs","CmTroubleTicketFilters","statusList","missionTypes","currentPage","spType","spText","spColor","spBdColor","spFullScreen","spSize","childProcessing","reportsListLen","maxReportsListSize","troubleTicketsStatus","loadData","deserializeTickets","openTicket","openTTModal","setPage","addNewBikeTicket","addNewLocationTicket","clearFilters","substrText","exportTickets","archivedChild","urlParams","reportFileName","reportParams","statusSubstitutions","canLoadXls","processingMessage","PagerComponent","statuses","branding","dateFrom","dateTo","bikeTypes","resetDates","currDate","ConnectableObservable","_isComplete","getSubject","ConnectableSubscriber","connectableObservableDescriptor","connectableProto","TimeoutErrorImpl","RaceOperator","RaceSubscriber","hasFirst","isInteropObservable","scheduleObservable","schedulePromise","isIterable","scheduleIterable","AnimationFrameAction","cancelAnimationFrame","animationFrameScheduler","AnimationFrameScheduler","animationFrame","SubjectSubscription","subscriberIndex","fromEvent","setupSubscription","sourceObj","isEventTarget","source_1","isJQueryStyleEventEmitter","source_2","addListener","removeListener","isNodeStyleEventEmitter","source_3","pred","notPred","takeUntil","TakeUntilOperator","takeUntilSubscriber","TakeUntilSubscriber","currentDir","fullMatch","origUrl","newUrl","unquotedOrigUrl","$1","translationService","damageCategoryType","isLocationAutoTroubleTicket","showMessage","allowedToEditSettings","isBikeAutoTroubleTicket","CmAutoTicketConfigComponent","CmBaseAutoTicketConfigComponent","CmAutoTicketConfigModalDialog","mapHeight","changeBound","openedMarker","zoom","bikeIconPath","red","normal","pedelec","yellow","green","bikeClusterPath","stationUrlBase","employeePath","boundsInitialized","styleFunc","clickable","strokeColor","fillOpacity","strokeWeight","areas","fullPolygon","displaySingleMarkerInMapCenter","loadMapCenterByLoginContext","validCoords","mapCenter","closeMarkerDialogs","childrenList","getOpacity","getZIndex","getDotDev","getDot","BIKE","getBikeMarker","EMPLOYEE","BIKE_CLUSTER","getStationMarker","isJobType","JOB","isBikeType","isEmployeeType","isBikeClusterType","getLabel","boundsChange","bounds","currentTimeout","stopTimeout","restartTimeout","sendBox","getSouthWest","lat","getNorthEast","lng","cargopedelec","hasLockedBikes","quantities","getStringValue","border","quantity","SPERR_HAL_STATUS","SPERR_MSP_STATUS","AgmInfoWindow","CmMapComponent","READY_HAL_STATUS","READY_MSP_STATUS","jobs","estimatedRepairTime","repairTime","locationService","showClose","closeJob","checkAll","inProgressOpenStatuses","currentTimeStr","jobId","tempList","loadLocation","closeJobItem","idArray","TO_MOVE","TO_CHARGE","TO_WORKSHOP","FOR_LOCATION","LOCATION","getBikeTypes","getQuantity","bikeType","selectAll","isBikeValid","isLocationValid","CmJobItemComponent","CmJobListModalDialog","componentTracker","typeList","bikesJobListType","jobStatus","showDetails","CmBikeJobItemComponent","getTaskName","taskId","getStatusName","getLocationType","dataExtract","toStringExportCase","paging","stationSubstitution","typeSubstitution","LOAD","UNLOAD","jobsDataExtractReport","filterString","wordStr","statusSubstitution","dataExtractMovingReport","quantitiesPrefix","CmBikeJobListComponent","initDates","disabledBikes","haveNoLocation","users","dateCreatedFrom","dateFinishedFrom","dateFinishedTo","CmBikeJobItemModalDialog","getPager","totalItems","pageSize","pageFromStorage","startPage","endPage","totalPages","pages","PagerService","itemList","CmBikeRepairFilters","initPage","CmRepairItemComponent","repairId","exportRepairs","trueFalseSubstitutions","sparePartTypeSubstitutions","CmRepairListComponent","CmRepairModel","CmRepairModalDialog","globalSettings","CmDamageCatBikeConfigGlobalModel","categoryConfigList","tempArray","DAMAGE_CAT_BIKE_GLOBAL_KEY","toBSC","checkTime","closeComplainDirectly","closeWhenBikeMoves","withoutReportDaysLimit","CmDamageBikeCategoryModel","mappingText","el1","el2","csvFileName","saveGlobal","openCategory","removeCategory","ex","importCSV","newArr","csvFile","isNotEmptyObject","reps","loadCsvFile","reader","FileReader","thisContext","readAsText","loadDataForCsv","CSV","CmDamageBikeCatConfigComponent","city","CmDamageBikeCategoryBasic","Filters","stationCodes","loadInventoryPart","openItem","addSuggestedPart","createUrl","addGroup","addPart","createMovement","exportData","CmSparePartListModalComponent","showAllCities","articleNumber","freeText","CmDamageLocationCategoryModel","DAMAGE_CAT_LOCATION_GLOBAL_KEY","CmDamageLocationCatConfigComponent","EveryOperator","EverySubscriber","everyValueMatch","FinallyOperator","FinallySubscriber","bindCallback","forkJoin","first_1","forkJoinInternal","resultSelector_1","emitted","_loop_1","fromEventPattern","addHandler","removeHandler","sample","SampleOperator","sampleSubscriber","SampleSubscriber","shareReplay","configOrBufferSize","_c","useRefCount","shareReplayOperator","SkipOperator","SkipSubscriber","toArrayReducer","webpackEmptyAsyncContext","__export","debounceTime","DebounceTimeOperator","DebounceTimeSubscriber","debouncedSubscription","clearDebounce","debouncedNext","webpackPolyfill","mobileView","rolesMapping","MainMenuRoles","attachEvents","processMenu","notifyUrl","selectMenu","menu","selectedMenu","onresize","getWidth","toggleSidebar","checkStationSelected","disableStationSelect","includes","CmHome","infleeting","defleeting","rent","delivery","deliveryHAS","gate","collectionHAS","transit","turnaround","idleSighting","movementIn","movementout","damageUpdate","movementInTransporter","movementoutTransporter","subAuth","errorText","CmLogin","configs","CmAutoTicketConfigFilters","prios","showPage","toHttpGet","openConfig","addConfigForBike","addConfig","addConfigForLocation","CmAutoTicketConfig","deleteConfig","changeType","CmAutoTicketListComponent","cmGuardService","auth","aliveUrl","changeLoggedStatus","thisSaved","alive","loggedInValue","isLogged","dateString","relativeTimeWithMutation","mutationTable","softMutation","mutation","minWeekdaysParse","fullWeekdaysParse","shortWeekdaysParse","lastNumber","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","_calendarEl","eraYearOrdinalRegex","$0","$2","40","eifelerRegelAppliesToNumber","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","12","13","numbersNouns","numberNoun","hundred","ten","numberAsNoun","processHoursFunction","nominative","accusative","genitive","_dataService","selectLang","langValue","langList","timeoutValue","halUrl","CmSettingsComponent","filterModel","CmMapFiltersModel","markerList","jobList","bikesList","bikesTotal","maxPointsCount","bikeLimit","stationLimits","chargeSliderConfig","tooltips","CmMapCenter","isFull","openOnCenter","getScreenSize","scrHeight","calculateMapHeight","filtersContainer","filtersHeight","calculatedHeight","reloadMarkers","updateMarkers","stationFilters","assignments","updateBikeAndLocations","loadLocations","showStation","createBoundHeader","OutsideJob","filterEmployees","loadBikes","singleBike","mustLoad","filterGoal","CmBikeFilterGoal","bikesWithCheckTasks","bikesWithLogisticTasks","bikesWithTasks","statusChangedHoursAgo","chargeInPercentFrom","chargeInPercentTo","isCharging","cnt","BikeCluster","performAdditionalFiltering","changeChargeLevel","showTotalBikes","loadEmployees","EmployeeMap","boundingBox","getEnterBikeNumberText","searchSignleBike","tmpContent","bikeFilterGoals","bikeFilterGoalLabel","filterGoalStr","allBikes","noBikes","CmRootPageComponent","showServiceAgents","CmBikeFilter","CmLocationFilter","charging","notCharging","MapsAPILoader","GoogleMapsAPIWrapper","_loader","_map","_mapResolver","createMap","mapOptions","google","maps","setMapOptions","createMarker","addToMap","createInfoWindow","InfoWindow","createCircle","strokePosition","StrokePosition","Circle","createRectangle","Rectangle","createPolyline","getNativeMap","Polyline","setMap","createPolygon","polygon","Polygon","createDataLayer","Data","createTransitLayer","newLayer","TransitLayer","visible","createBicyclingLayer","BicyclingLayer","containsLocation","latLng","geometry","poly","subscribeToMapEvent","clearInstanceListeners","setCenter","getZoom","getBounds","getMapTypeId","setZoom","getCenter","panTo","panBy","fitBounds","panToBounds","triggerMapEvent","LayerManager","_wrapper","_layers","addTransitLayer","layer","addBicyclingLayer","deleteLayer","currentLayer","toggleLayerVisibility","layerId","AgmBicyclingLayer","_manager","_addedToManager","_id","CircleManager","_apiWrapper","_circles","addCircle","circle","draggable","editable","fillColor","radius","strokeOpacity","removeCircle","getRadius","setEditable","setDraggable","setVisible","setRadius","getNativeCircle","createEventObservable","AgmCircle","centerChange","circleClick","circleDblClick","drag","dragEnd","dragStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","radiusChange","rightClick","_circleAddedToManager","_eventSubscriptions","AgmCircle_1","_registerEventListeners","_updateCircleOptionsChanges","optionKeys","_mapOptions","eventEmitter","coords","DataLayerManager","addDataLayer","geoJson","getDataFeatures","deleteDataLayer","updateGeoJson","setDataOptions","setControlPosition","controlPosition","setControls","setDrawingMode","drawingMode","addGeoJson","loadGeoJson","layerId$1","AgmDataLayer","layerClick","AgmDataLayer_1","_addEventListeners","os","geoJsonChange","dataOptions","_dataOptionsAttributes","FitBoundsAccessor","FitBoundsService","_boundsChangeSampleTime$","_includeInBounds$","bounds$","includeInBounds","_generateBounds","LatLngBounds","addToBounds","_createIdentifier","removeFromBounds","changeFitBoundsChangeSampleTime","timeMs","getBounds$","AgmFitBounds","_fitBoundsAccessor","_fitBoundsService","agmFitBounds","_destroyed$","_latestFitBoundsDetails","_updateBounds","getFitBoundsDetails$","newFitBoundsDetails","MarkerManager","_mapsWrapper","_markers","convertAnimation","uiAnim","Animation","deleteMarker","updateMarkerPosition","updateTitle","updateLabel","setLabel","updateDraggable","updateIcon","setIcon","iconUrl","updateOpacity","setOpacity","updateVisible","updateZIndex","setZIndex","updateClickable","setClickable","updateAnimation","setAnimation","addMarker","markerPromise","icon","getNativeMarker","InfoWindowManager","_markerManager","_infoWindows","deleteInfoWindow","infoWindow","iWindow","hostMarker","addInfoWindow","maxWidth","disableAutoPan","infoWindowPromise","infoWindowId","_infoWindowManager","_el","infoWindowClose","_infoWindowAddedToManager","AgmInfoWindow_1","_updateOpenState","_setInfoWindowOptions","_infoWindowOptionsInputs","KmlLayerManager","addKmlLayer","KmlLayer","preserveViewport","screenOverlays","suppressInfoWindows","deleteKmlLayer","layerId$2","AgmKmlLayer","defaultViewportChange","statusChange","AgmKmlLayer_1","_updatePolygonOptions","_kmlLayerOptions","createMVCEventObservable","eventNames","evName","getArray","_handler","evListeners","evListener","MvcArrayMock","vals","getAt","getLength","insert_at","deleted","remove_at","setAt","set_at","listenerArr","SymbolPath","ControlPosition","MapTypeId","MapTypeControlStyle","ScaleControlStyle","ZoomControlStyle","GeocoderLocationType","GeocoderStatus","PolygonManager","_polygons","addPolygon","polygonPromise","geodesic","updatePolygon","setPaths","setPolygonOptions","deletePolygon","getPaths","createPathEventObservable","agmPolygon","parentMVEvent","chMVC","chMVCEvent","retVal","subArr","PolylineManager","_polylines","PolylineManager_1","_convertPoints","_getPoints","point","_convertPath","symbolPath","_convertIcons","icons","_getIcons","agmIcon","fixedRotation","Point","anchorX","anchorY","rotation","scale","addPolyline","polylinePromise","updatePolylinePoints","setPath","updateIconSequences","setPolylineOptions","deletePolyline","getMVCPath","agmPolyline","RectangleManager","_rectangles","addRectangle","rectangle","north","east","south","west","removeRectangle","setBounds","AgmMap","_elem","_platformId","disableDoubleClickZoom","disableDefaultUI","scrollwheel","keyboardShortcuts","usePanning","scaleControl","mapTypeControl","panControl","rotateControl","fullscreenControl","mapTypeId","clickableIcons","showDefaultInfoWindow","gestureHandling","tilt","_observableSubscriptions","mapClick","mapRightClick","mapDblClick","mapTypeIdChange","idle","zoomChange","mapReady","tilesLoaded","AgmMap_1","_initMapInstance","minZoom","maxZoom","controlSize","backgroundColor","draggableCursor","draggingCursor","zoomControl","zoomControlOptions","streetViewControl","streetViewControlOptions","scaleControlOptions","mapTypeControlOptions","panControlOptions","rotateControlOptions","fullscreenControlOptions","restriction","_handleMapCenterChange","_handleMapZoomChange","_handleMapMouseEvents","_handleBoundsChange","_handleMapTypeIdChange","_handleTilesLoadedEvent","_handleIdleEvent","_fitBoundsSubscription","_updateMapOptionsChanges","_updatePosition","_mapOptionsAttributes","triggerResize","recenter","_fitBounds","_setCenter","newCenter","_subscribeToFitBoundsUpdates","fitBoundsPadding","_isLatLngBoundsLiteral","newBounds","union","z","emitter","placeId","stop","markerId","AgmMarker","openInfoWindow","animationChange","markerClick","markerDblClick","markerRightClick","_markerAddedToManger","_fitBoundsDetails$","AgmMarker_1","handleInfoWindowUpdate","_updateFitBoundsDetails","dcs","rc","ds","de","mover","mout","anChng","AgmPolygon","_polygonManager","polyClick","polyDblClick","polyDrag","polyDragEnd","polyDragStart","polyMouseDown","polyMouseMove","polyMouseOut","polyMouseOver","polyMouseUp","polyRightClick","polyPathsChange","_polygonAddedToManager","AgmPolygon_1","paths$","pathEvent","_polygonOptionsAttributes","AgmPolylineIcon","AgmPolylinePoint","positionChanged","AgmPolylinePoint_1","polylineId","AgmPolyline","_polylineManager","lineClick","lineDblClick","lineDrag","lineDragEnd","lineDragStart","lineMouseDown","lineMouseMove","lineMouseOut","lineMouseOver","lineMouseUp","lineRightClick","polyPathChange","_polylineAddedToManager","AgmPolyline_1","points","pointSub","iconSub","iconSequences","_polylineOptionsAttributes","ob$","AgmRectangle","rectangleClick","rectangleDblClick","_rectangleAddedToManager","AgmRectangle_1","_updateRectangleOptionsChanges","layerId$3","AgmTransitLayer","GoogleMapsScriptProtocol","AgmGeocoder","connectableGeocoder$","_createGeocoder","geocoder$","geocode","geocoder","_getGoogleResults","geocodeObservable","OK","Geocoder","WindowRef","getNativeWindow","DocumentRef","getNativeDocument","BROWSER_GLOBALS_PROVIDERS","LAZY_MAPS_API_CONFIG","LazyMapsAPILoader","_SCRIPT_ID","callbackName","_windowRef","_documentRef","_scriptLoadingPromise","scriptOnPage","_assignScriptLoadingPromise","_getScriptSrc","scriptElem","onerror","HTTPS","AUTO","HTTP","hostAndPath","apiVersion","apiKey","client","clientId","channel","libraries","region","NoOpMapsAPILoader","coreDirectives","AgmCoreModule","AgmCoreModule_1","lazyMapsAPILoaderConfig","CmNoRolesComponent","modalDialog","locationsService","filtersSorters","JobListFiltersAndSorters","tableSummary","openLocation","outsideJob","changeDistrict","district","locations","locationFilter","readRelatedLocations","CmLocationFilterComponent","CmJobListComponent","changeLocation","locationList","_changeLocation","pagerService","pageNo","pager","_pager","skipPage","setLastPage","setFirstPage","setNextPage","LocationFilters","lastPage","uploadFileChoose","CmLocationListComponent","like","intervals","validList","maxValue","maxIntervalsCount","intervalDefault","intervalCurrent","pedelecIntervalDefault","pedelecIntervalCurrent","cargoIntervalDefault","cargoIntervalCurrent","INTERVAL_DEFAULT","INTERVAL_CURRENT","PEDELEC_DEFAULT","PEDELEC_CURRENT","CARGO_DEFAULT","CARGO_CURRENT","statusChanged","tmpLocation","loadIntervals","PEDELEC","CARGOPEDELEC","changeLocationStatus","validIntervals","loc","optimum","thresholdMax","thresholdMin","isCorrect","reload","CmLocationItemComponent","reloadCategories","openSparePart","sparePart","onPager","stationsVar","loadReportCsv","pathVar","substitutionsQuantityType","substitutionsType","getStationName","testId","uploadCSVasJSON","msgArr","canAddSparePart","canAddStockMovement","CmSparePartListComponent","dateMovingStarted","dateMovingFinished","CmSparePartMovement","stationFromList","stationToList","quantityTypeList","newFrom","wasteTo","quantityType","CmMoveSparePartComponent","CmSparePartCategory","saveData","loadCategories","onNameChange","trimLeft","CmAddSparePartCategoryComponent","RenameSparePartContext","movementList","partData","CmSparePart","movementLimit","stations","partDataCopy","categoryId","renameCategory","catNameItemList","CmModalSparePartCatWindow","currentTarget","onTextChange","CmSparePartDetailComponent","districtList","districtSourceList","districtObject","districtHashMap","showUserJob","CmJobListByDistrictComponent","CmBikeDispatchFilters","subList","stationSub","bikeStatus","getRowColor","isBikeMissing","getStation","getStatus","statusId","getBikeType","hasLock","lock","latitudeIndex","longitudeIndex","locationIdIndex","currentline","lockTypeSubstitutions","stationSubstitutions","st","exportCSV","downloadBikesLimit","jsonAr","uploadCsvFileChooser","CmBikeDispatchComponent","customerCare","lostBike","showInactive","noLock","translationServiceNative","bikeBlockingService","CmBikeDispatchModel","_showMap","bikePath","lastAllowedLocationSortedProperty","allowedLocations","backendName","localization","whoIsCalledLocationPopup","CmLocationData","showMap","selectCoordinates","getMarker","newStatus","blockUnblockRequest","blockUnblockBike","sendStatus","allowedIds","blockBike","unblockBike","goToTT","ttFilters","repairs","repairFilters","dynamicSort","sortOrder","removeAllowedLocation","addAllowedLocation","CmBikeDispatchItemComponent","CmBikeBlockingService","EventType","SPERRUNG","ENTSPERRUNG","news","CmNewsModel","newsList","loadNews","author","CmNewsComponent","suggestedParts","catExistsError","mappingTextStr","sp","openParts","incQuantity","decQuantity","removePart","CmDamageBikeCatConfigItemComponent","mappingStr","CmDamageLocationCatConfigItemComponent","CmPageNotFoundComponent","showMore","btnNameLong","btnNameShort","btnName","msgName","shortMsg","extMsg","showAdditionalInfo","CmGlobalErrorHandler","isShownCmModalMessageComponent","onKeydownHandler","CmModalMessageComponent","CmModalMessageComponentContext","showAlertPopup","showHttpErrorPopup","showUnexpectedError","promptMessage","punycode","util","Url","urlParse","relative","resolveObject","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","querystring","parseQueryString","slashesDenoteHost","splitter","uSplit","rest","simplePath","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","ae","esc","qm","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","hasTrailingSlash","removeElement","isSet","addClassFor","countDecimals","pieces","getPageOffset","supportPageOffset","isCSS1Compat","compatMode","subRangeRatio","pa","pb","fromPercentage","startRange","getJ","toStepping","xVal","xPct","va","vb","toPercentage","getStep","xSteps","snap","closest","handleEntryPoint","percentage","xHighestCompleteStep","handleStepPoint","totalSteps","xNumSteps","highestStep","Spectrum","singleStep","ordered","getDistance","distances","getAbsoluteDistance","start_factor","xPct_index","rest_factor","rest_rel_distance","range_pct","rel_range_distance","abs_distance_counter","range_counter","fromStepping","isPercentage","getDefaultStep","isDown","getNearbySteps","stepBefore","startValue","thisStep","stepAfter","countStepDecimals","stepDecimals","defaultFormatter","cssClasses","handleLower","handleUpper","touchArea","horizontal","vertical","background","connects","ltr","rtl","textDirectionLtr","textDirectionRtl","tooltip","pips","pipsHorizontal","pipsVertical","markerHorizontal","markerVertical","markerNormal","markerLarge","markerSub","valueHorizontal","valueVertical","valueNormal","valueLarge","valueSub","INTERNAL_EVENT_NS","validateFormat","isValidFormatter","testStep","testKeyboardPageMultiplier","keyboardPageMultiplier","testKeyboardDefaultStep","keyboardDefaultStep","testRange","spectrum","testStart","handles","testSnap","testAnimate","testAnimationDuration","animationDuration","testConnect","testOrientation","ort","testMargin","margin","testLimit","testPadding","totalPadding","firstValue","testDirection","testBehaviour","fixed","unconstrained","testTooltips","testAriaFormat","ariaFormat","testFormat","testKeyboardSupport","keyboardSupport","testDocumentElement","testCssPrefix","cssPrefix","testCssClasses","testOptions","tests","orientation","behaviour","msPrefix","msTransform","noPrefix","transformRule","originalOptions","scope_Base","scope_Handles","scope_Connects","scope_Pips","scope_Tooltips","scope_Self","addTarget","pointerEnabled","msPointerEnabled","supportsPassive","getSupportsPassive","scope_Target","scope_Spectrum","scope_Values","scope_Locations","scope_HandleNumbers","scope_ActiveHandlesCount","scope_Events","scope_Document","scope_DocumentElement","scope_Body","scope_DirOffset","addNodeTo","div","addOrigin","handleNumber","isSliderDisabled","isHandleDisabled","horizontalKeys","verticalKeys","largeStepKeys","edgeKeys","isLargeDown","isLargeUp","isUp","isMin","isMax","multiplier","getNextStepsForHandle","setHandle","fireEvent","eventKeydown","addConnect","addTooltip","removeTooltips","removeEvent","bindEvent","unencoded","formattedValue","addMarking","spread","filterFunc","valueSizeClasses","markerSizeClasses","valueOrientationClasses","markerOrientationClasses","getClasses","sizeClasses","addSpread","removePips","grid","density","stepped","getGroup","indexes","firstInRange","lastInRange","ignoreFirst","ignoreLast","prevPct","newPct","pctDifference","pctPos","realSteps","stepSize","isSteps","generateSpread","baseSize","alt","attachEvent","pageOffset","eventTarget","touch","mouse","pointer","buttons","touches","isTouchOnTarget","checkTouch","targetTouches","pageX","pageY","targetTouch","changedTouches","clientX","clientY","fixEvent","doNotReject","calcPoint","passive","calcPointToPercentage","docElem","proposal","clientTop","clientLeft","documentLeave","relatedTarget","eventEnd","eventMove","appVersion","buttonsProperty","movement","startCalcPoint","moveHandles","handleNumbers","setZindex","eventStart","moveEvent","endEvent","outEvent","eventTap","clickedPosition","smallestDifference","handlePosition","differenceWithThisHandle","getClosestHandle","eventHover","targetEvent","namespacedEvent","tEvent","tNamespace","isInternalNamespace","checkHandlePosition","lookBackward","lookForward","inRuleOrder","upward","proposals","transformDirection","exactInput","translateRule","updateConnect","updateHandlePosition","connectWidth","scaleRule","resolveToValue","valueSet","fireSetEvent","isInit","valueGet","nearbySteps","increment","connectOptions","connectBase","addElements","handleBefore","handleAfter","eventHolders","eventHolder","positions","noUiSlider","__moveHandles","updateOptions","optionsToUpdate","updateAble","newOptions","getTooltips","getOrigins","__spectrum","api","platformBrowserDynamic","AppModule","builtinExternalReferences","ERROR_COLLECTOR_TOKEN","DEFAULT_PACKAGE_URL_PROVIDER","_NO_RESOURCE_LOADER","baseHtmlParser","templateParser","styleCompiler","viewCompiler","ngModuleCompiler","compileReflector","compilerConfig","COMPILER_PROVIDERS","JitReflector","Ignore","CompilerImpl","defaultOptions","_defaultOptions","optionsArr","_lastDefined","_mergeArrays","platformCoreDynamic","JitCompilerFactory","onload","ResourceLoaderImpl","INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS","_cache","$templateCache","RESOURCE_CACHE_PROVIDER","CachedResourceLoader","routing","CmSharedModule","secServicies","secComponents","rxjs_1","freeGlobal","maxInt","regexPunycode","regexNonASCII","regexSeparators","stringFromCharCode","RangeError","mapDomain","ucs2decode","ucs2encode","digitToBasic","adapt","numPoints","baseMinusTMin","basic","oldi","baseMinusT","bias","encode","handledCPCount","basicLength","handledCPCountPlusOne","qMinusT","qs","eq","maxKeys","kstr","vstr","xs","stringifyPrimitive","objectKeys","ks","mainRoutes","___CSS_LOADER_API_IMPORT___","map_1","operators_1","webpackContext","webpackContextResolve","inNumber","getType","rng","bytesToUuid","rnds","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","byteToHex","bth","CmRepairSparePart","CmProfileComponent","CmCurrentStationComponent","CmJobItemMapComponent","CmPicturesComponent","CmUserComponent","htmlTemplateUrl","userName","isDropdown","displayPrivacyStatement","clickSettings","clickProfile","currentStation","selectStation","toogleDropdown","routeFrom","readonly","insideModalWindow","loadPictures","dHolder","readAsDataURL","clearInputFile","removePicture","viewPicture","showUserJobs","_showUserJobs","CmUserModel","showJobs","recalculate","sendToDriver","removeRow","allowDrop","dragAndDropEl","drop","dropTo","CmUserJob","transporter","districts","letters","generateTransporter","generateLicensePlate","bootstrap3Mode","CmLocalizationService","ModalModule","BootstrapModalModule","BrowserAnimationsModule","NouisliderComponent","DateTimePickerComponent","CmBikeListComponent","CmBikeBrandingFilterComponent","CmDistrictFilterComponent","CmUsersFilterComponent","CmStatusFilterComponent","CmValidatableNumberfieldComponent","CmHourMinuteComponent","CmHourMinuteCountdownComponent","CmTableTotalComponent","CmTtCategoryFilterComponent","CmShowOnMapComponent","CmBikeStatusFilterComponent","CmBikeTypeFilterComponent","dataSubject","data$","emitEvents","pageSteps","onKeydown","inputsConfig","noUiSlider.create","toValues","localeService","showTimePart","allowFuture","datePickerselect","defaultMaxDate","colorTheme","opened","validTime","dateTimeValue","dateTime","selDate","oKBtn","clearBtn","isValidTime","closeAllDatePickers","filterValue","filterList","selectedBrands","selectedBrandsChange","brandsLoaded","brandsList","dataSourceInit","brand","BrandListItem","_changeStatus","outList","cmHttp","_changeDistrict","selectedEmployee","changeEmployee","EmployeeListItem","_changeEmployee","selectedStatuses","dataSource","changeStatus","StatusListItem","setVal","validatableList","showLabel","changeCategory","loadValues","locationTypeList","createBothList","bikeTypeList","_changeCategory","additionalBikeCategory","bothTypeList","currentType","openMap","createParams","entity","entityId","outHours","outMinutes","outDuration","durationTimeUnits","calculateHumanReadableValues","setDuration","hoursHumanReadable","minutesHumanReadable","changeHoursModel","changeMinutesModel","plusHour","minusHour","plusMinute","minusMinute","ActiveIcon","cdRef","diffInMs","activeIcon","DONE","MISSED","formatDiff","RUNNING","diffInMsUnsigned","formatTimePart","timePart","timePartStr","statusChangedHoursAgoChange","selectedStatusesChange","statusesLoaded","MAP_STATUSES","mapMode","localizationKey","statusData","statusChangedHoursAgoChanged","tmpValue","selectedTypes","selectedTypesChange","typesLoaded","TypeListItem","_changeType","expandAnimation","collapseAnimation","_builder","collapsed","collapses","expands","isCollapsed","isCollapse","isCollapsing","isAnimated","_display","_stylesLoaded","_COLLAPSE_ACTION_NAME","_EXPAND_ACTION_NAME","_factoryCollapseAnimation","_factoryExpandAnimation","animationRun","factoryAnimation","_player","CollapseModule","closeOthers","closeOtherPanels","openGroup","accordion","isOpenChange","_isOpen","panelClass","toggleOpen","AccordionModule","dismissible","dismissOnTimeout","onClose","onClosed","dismissibleChange","AlertModule","CHECKBOX_CONTROL_VALUE_ACCESSOR","btnCheckboxTrue","btnCheckboxFalse","trueValue","falseValue","RADIO_CONTROL_VALUE_ACCESSOR","cdr","_disabled","btnRadio","uncheckable","ButtonsModule","noPause","noWrap","showIndicators","itemsPerSlide","singleSlideOffset","UNKNOWN","NEXT","PREV","activeSlideChange","slideRangeChange","startFromIndex","_slides","_currentVisibleSlidesIndex","getActive","slide","makeSlidesConsistent","slides","_currentActiveSlide","multilist","_interval","restartTimer","_chunkedSlides","chunk","chunkByNumber","mapSlidesAndIndexes","selectInitialSlides","addSlide","activeSlide","removeSlide","remIndex","isLast","getCurrentSlideIndex","nextSlide","force","Direction","previousSlide","getFirstVisibleIndex","getLastVisibleIndex","findLastIndex","firstVisibleIndex","lastVisibleIndex","moveMultilist","findNextSlideIndex","selectSlide","selectSlideRange","isPlaying","resetTimer","isFirst","hideSlides","_slidesWithIndexes","slidesToAppend","selectRangeByNestedIndex","getVisibleIndexes","nextSlideIndex","isIndexInRange","isIndexOnTheEdges","slidesList","isVisibleSlideListLast","isVisibleSlideListFirst","moveSliderByOneItem","indexToHide","indexToShow","slidesToReorder","displayedIndex","currentSlide","currentInterval","nInterval","carousel","itemWidth","CarouselModule","modalConfigDefaults","backdrop","ignoreBackdropClick","animated","CLASS_NAME","TRANSITION_DURATIONS","DISMISS_REASONS","isModalHiding","bsModalService","getModalsCount","checkScrollbar","setScrollbar","setDismissReason","onEsc","tabindex","_isShown","_isAnimated","clf","onShow","onHide","isBodyOverflowing","originalBodyPadding","scrollbarWidth","timerHideModal","timerRmBackDrop","isNested","_backdrop","conf","dismissReason","hideModal","showBackdrop","showElement","transitionComplete","resetScrollbar","resetAdjustments","focusOtherModal","callbackRemove","removeBackdrop","otherOpenedModals","getScrollbarWidth","getPropertyValue","paddingRight","scrollDiv","modalsCount","lastDismissReason","loaders","_backdropLoader","_createLoaders","_showBackdrop","_showModal","_hideBackdrop","_hideModal","removeLoaders","isBackdropEnabled","isBackdropInDOM","backdropRef","modalLoader","bsModalRef","modalContainerRef","newClass","copyEvent","autoClose","insideClick","isDisabledChange","toggleClick","dropdownMenu","resolveDropdownMenu","dropdown","_contains","_cis","_isInlineOpen","_isInited","_dropdown","_isDisabled","_showInline","_inlinedMenu","addBs4Polyfills","_dropup","dropup","_placement","removeShowClass","removeDropupStyles","addShowClass","checkRightAlignment","addDropupStyles","isRightAligned","_changeDetectorRef","_documentClickListener","_escKeyUpListener","BsDropdownModule","main","maxSize","itemsPerPage","boundaryLinks","directionLinks","firstText","previousText","nextText","lastText","pageBtnClass","rotate","align","PAGER_CONTROL_VALUE_ACCESSOR","paginationConfig","numPages","pageChanged","inited","_page","_itemsPerPage","calculateTotalPages","_totalItems","_totalPages","selectPage","_previous","getPages","noPrevious","noNext","makePage","isMaxSized","previousPageSet","nextPageSet","PAGINATION_CONTROL_VALUE_ACCESSOR","PaginationModule","RATING_CONTROL_VALUE_ACCESSOR","which","rate","titles","buildTemplateObjects","preValue","enter","RatingModule","onCapture","draggableItem","captureItem","overZoneIndex","lastZoneIndex","onCaptureItem","transfer","wrapperClass","wrapperStyle","itemClass","itemStyle","itemActiveClass","itemActiveStyle","placeholderClass","placeholderStyle","placeholderItem","showPlaceholder","activeItem","onChanged","currentZoneIndex","SortableComponent","globalZoneIndex","onDrop","_items","onItemDragstart","initDragstartEvent","initialIndex","onItemDragover","dragItem","newArray","updatePlaceholderState","cancelEvent","resetActiveItem","fieldName","getItemStyle","dataTransfer","SortableModule","_ngTransclude","tabs","_vertical","setClassMap","_justified","isDestroyed","addTab","tab","removeTab","reselect","hasAvailableTabs","newActiveIndex","getClosestTabIndex","removed","tabsLength","prevIndex","justified","tabset","selectTab","deselect","_customClass","cssClass","_active","removable","headingRef","TabsModule","in","fade","tooltipId","tooltipChange","tooltipAnimation","tooltipFadeDuration","ariaDescribedby","tooltipStateChanged","_tooltip","_delayTimeoutId","showTooltip","cancelDelayedTooltipShowing","_tooltipCancelShowFn","TooltipModule","latinMap","header","isHeader","latinize","wordRegexDelimiters","phraseRegexDelimiters","preTokenized","preTokenizedLength","replacePhraseDelimiters","getValueFromObject","option","propertiesArray","isFocused","_matches","isScrolledIntoView","containerViewTop","ulElement","containerViewBottom","elemTop","offsetTop","needScrollbar","typeaheadScrollable","typeaheadOptionsInScrollableView","setScrollableMode","typeaheadIsFirstItemActive","nextActiveMatch","concurrency","selectActive","optionsListTemplate","typeaheadItemTemplate","selectActiveMatch","isActiveItemChanged","typeaheadSelectFirstItem","selectMatch","prevActiveMatch","scrollPrevious","scrollNext","highlight","tokenLen","itemStr","itemStrHelper","typeaheadLatinize","queryLen","focusLost","changeModel","typeaheadOnSelect","liElements","ulStyles","liStyles","ulPaddingBottom","ulPaddingTop","optionHeight","guiHeight","liElement","scrollToBottom","scrollToTop","scrollHeight","hideResultsOnBlur","selectFirstItem","isFirstItemActive","ngControl","viewContainerRef","typeaheadMinLength","typeaheadAsync","typeaheadSingleWords","typeaheadWordDelimiters","typeaheadPhraseDelimiters","typeaheadLoading","typeaheadNoResults","typeaheadOnBlur","isTypeaheadOptionsListActive","keyUpEventEmitter","_typeahead","typeaheadHideResultsOnBlur","typeaheadOptionsLimit","typeaheadWaitMs","typeahead","asyncActions","syncActions","onInput","_container","onFocus","valueStr","typeaheadRef","_outsideClickListener","onOutsideClick","normalizedQuery","finalizeAsyncCall","normalizeQuery","testMatch","normalizeOption","optionValue","typeaheadOptionField","spaceLength","prepareMatches","hasMatches","limited","typeaheadGroupField","TypeaheadMatch","TypeaheadModule","_popover","popover","popoverContext","popoverTitle","PopoverModule","JWT_OPTIONS","tokenGetter","urlBase64Decode","b64DecodeUnicode","b64decode","bc","decoded","getTokenExpirationDate","offsetSeconds","JwtInterceptor","authScheme","whitelistedDomains","blacklistedRoutes","throwNoTokenError","skipWhenExpired","isWhitelistedDomain","requestUrl","domain","isBlacklistedRoute","handleInterception","tokenIsExpired","asyncToken","JwtModule","jwtOptionsProvider","isNode","process","optimizeGroupPlayer","normalizeKeyframes","driver","keyframes","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","isSameOffset","normalizedKeyframe","normalizePropertyName","PRE_STYLE","preStyles","normalizeStyleValue","listenOnPlayer","copyAnimationEvent","makeAnimationEvent","triggerName","fromState","toState","getOrSetAsInMap","parseTimelineCommand","separatorPos","elm1","elm2","_query","_isNode","matchesSelector","mozMatchesSelector","oMatchesSelector","elm","_CACHED_BODY","_IS_WEBKIT","validateStyleProperty","getBodyNode","containsVendorPrefix","matchesElement","containsElement","invokeQuery","hypenatePropsObject","newProp","computeStyle","easing","previousPlayers","scrubberAccessRequested","NoopAnimationDriver","resolveTimingValue","_convertTimeValueToMS","resolveTiming","allowNegativeValues","delayMatch","easingVal","containsErrors","parseTimeExpression","copyObj","normalizeStyles","normalizedStyles","copyStyles","readPrototype","getStyleAttributeString","writeStyleAttribute","styleAttrValue","camelProp","dashCaseToCamelCase","formerStyles","eraseStyles","normalizeAnimationEntry","PARAM_REGEX","SUBSTITUTION_EXPR_START","extractStyleParams","localVal","iteratorToArray","allowPreviousPlayerStylesMerge","balancePreviousStylesIntoKeyframes","previousStyles","previousStyleProps","visitDslNode","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","parseTransitionExpr","transitionValue","eventStr","parseAnimationAlias","makeLambdaFromStates","isFullAnyStateExpr","parseInnerTransitionStr","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","currentTime","queryCount","depCount","states","styleAst","astParams","containsDynamicStyles","missingSubsArr","matchers","normalizeAnimationOptions","furthestTime","innerAst","timingAst","makeTimingAst","dynamic","constructTimingAst","currentAnimateTimings","styleMetadata","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","styleTuple","collectedEasing","styleData","endTime","collectedEntry","updateCollectedStyle","totalKeyframesWithOffsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","generatedOffset","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","hasAmpersand","NG_TRIGGER_SELECTOR","includeSelf","originalSelector","currentTransition","createTimelineInstruction","subTimeline","preStyleProps","postStyleProps","consume","existingInstructions","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","currentTimeline","timelines","timeline","containsAnimation","tl","allowOnlyTimelineStyles","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","previousNode","instructionTimings","appendInstructionToTimeline","subContextCount","snapshotCurrentStyles","DEFAULT_NOOP_PREVIOUS_NODE","delayNextStep","applyStylesToKeyframe","innerTimelines","mergeTimelineCollectedStyles","_visitTiming","incrementTime","getCurrentStyleProperties","forwardFrame","applyEmptyStep","innerTimeline","forwardTime","elms","currentQueryTotal","sameElementTimeline","maxTime","currentStaggerTime","startingTime","_enterClassName","_leaveClassName","initialTimeline","skipIfExists","newParams","_copyOptions","newTime","AnimationTimelineContext","updatedTimings","builder","stretchStartingKeyframe","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_localTimelineStyles","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","TimelineBuilder","_updateStyle","allProperties","getFinalKeyframe","details0","details1","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","timeAtKeyframe","decimalPoints","mult","_animationAst","buildTimelines","destinationStyles","dest","userProvidedProperty","normalizedProperty","DIMENSIONAL_PROP_MAP","AnimationStyleNormalizer","createTransitionInstruction","isRemovalTransition","fromStyles","queriedElements","toStyles","EMPTY_OBJECT","_triggerName","_stateStyles","currentState","nextState","matchFns","oneOrMoreTransitionsMatch","buildStyles","stateName","backupStateStyler","stateStyler","backupStyles","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","queriedElementsList","defaultParams","combinedParams","transitionFactories","AnimationStateStyles","balanceProperties","fallbackTransition","matchTransition","matchStyles","key1","key2","EMPTY_INSTRUCTION_MAP","bodyNode","_normalizer","_animations","_playersById","_buildPlayer","autoStylesMap","inst","_getPlayer","baseEvent","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","isObj","normalizeTriggerValue","absorbOptions","DEFAULT_STATE_VALUE","StateValue","_engine","_triggers","_queue","_elementListeners","_hostClassName","triggersWithStates","statesByElement","NG_TRIGGER_CLASSNAME","afterFlush","_getTrigger","defaultToFallback","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","objEquals","deregister","stateMap","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","namespaces","fetchNamespacesByElement","triggerLeaveAnimation","destroyAfterComplete","triggerStates","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","markedForDestroy","d0","elementContainsData","containsData","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","onRemovalComplete","createNamespace","AnimationTransitionNamespace","_balanceNamespaceList","collectEnterElement","nextNamespace","registerTrigger","_fetchNamespace","afterFlushAnimationsDone","elementStates","nsId","markElementAsDisabled","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","cleanupFns","_flushAnimations","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","nodeIsOrphaned","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","getRealPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","finalPlayers","_flattenGroupPlayersRecur","AnimationGroupPlayer","pp","wrappedPlayer","currentValues","deleteOrUnsetInMap","_containsRealPlayer","_queuedCallbacks","_queueEvent","cloakElement","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","roots","rootMap","nodeSet","localRootMap","postEntry","preEntry","_triggerCache","_transitionEngine","_timelineEngine","AnimationTrigger","buildTrigger","onInsert","onRemove","disableAnimations","eventPhase","packageNonAnimatableStyles","startStyles","endStyles","filterNonAnimatableStyles","SpecialCasedStyles","_startStyles","_endStyles","initialStyles","initialStylesByElement","_initialStyles","isNonAnimatableStyle","_duration","_delay","_easing","_fillMode","_onDoneFn","_startTime","_position","_eventFn","_handleCallback","anim","getAnimationStyle","countChars","setAnimationStyle","applyKeyframeAnimation","addRemoveAnimationEvent","playPauseAnimation","resume","findIndexForAnimation","_ngTestManualTimestamp","elapsedTime","animationName","findMatchingTokenIndex","removeKeyframeAnimation","searchToken","doRemove","_finalStyles","_specialStyles","_buildStyler","_styler","_flushStartFns","_flushDoneFns","ElementAnimationStyleHandler","_startingStyles","__initialized","_styles","_warningIssued","buildKeyframeElement","keyframeStr","kfElm","_notifyFaultyScrubber","previousCssKeyframePlayers","CssKeyframesPlayer","flatKeyframes","flattenKeyframesIntoStyles","specialStyles","_initialized","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","_isNativeImpl","getElementAnimateFn","_cssKeyframesDriver","CssKeyframesDriver","overrideWebAnimationsSupport","supported","playerOptions","previousWebAnimationPlayers","WebAnimationsPlayer","rootRenderer","_nextAnimationId","issueAnimationCommand","BrowserAnimationBuilder","RendererAnimationPlayer","_command","_listen","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","BaseAnimationRenderer","_scheduleCountTask","scheduleListenerCallback","AnimationRendererFactory","AnimationEngine","resolveElementFromTarget","dotIndex","InjectableAnimationEngine","AnimationDriver","instantiateSupportedAnimationDriver","WebAnimationsDriver","instantiateDefaultStyleNormalizer","WebAnimationsStyleNormalizer","instantiateRendererFactory","ANIMATION_MODULE_TYPE","SHARED_ANIMATION_PROVIDERS","BROWSER_ANIMATIONS_PROVIDERS","BROWSER_NOOP_ANIMATIONS_PROVIDERS","NoopAnimationsModule"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiB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C,EACAC,EACAC,EACAumB,EACA/sB,EACAsiB,EACA0K,EACAC,EACA3S,EACApY,GA1BA,KAAAJ,KACA,KAAAmR,YACA,KAAApT,WACA,KAAA6sB,UACA,KAAAjrB,YACA,KAAAhG,OACA,KAAAkG,OACA,KAAAmK,oBACA,KAAA6gB,oBACA,KAAAC,sBACA,KAAAzwB,oBACA,KAAA0wB,oBACA,KAAAC,uBACA,KAAAhnB,gBACA,KAAAC,qBACA,KAAAK,eACA,KAAAC,oBACA,KAAAC,YACA,KAAAC,iBACA,KAAAC,eACA,KAAAumB,UACA,KAAA/sB,iBACA,KAAAsiB,aACA,KAAA0K,oBACA,KAAAC,eACA,KAAA3S,aACA,KAAApY,WAIAgrB,GAAgB,WAC3B,WACW7oB,EACA7P,EACAlC,EACAygB,EACA9M,EACAE,EACAgnB,EACAC,EACAv1B,EACAge,EACAiI,EACAjN,EACAwc,EACAC,EACArtB,EACAC,EACAqtB,EACA5P,EACA6P,EACApL,EACA5d,EACAipB,EACA1rB,EACAqS,GAvBA,KAAA/P,SACA,KAAA7P,OACA,KAAAlC,QACA,KAAAygB,gBACA,KAAA9M,iBACA,KAAAE,eACA,KAAAgnB,6BACA,KAAAC,2BACA,KAAAv1B,QACA,KAAAge,kBACA,KAAAiI,UACA,KAAAjN,QACA,KAAAwc,aACA,KAAAC,gBACA,KAAArtB,SACA,KAAAC,UACA,KAAAqtB,SACA,KAAA5P,OACA,KAAA6P,iBACA,KAAApL,QACA,KAAA5d,SACA,KAAAipB,aACA,KAAA1rB,SACA,KAAAqS,UAgCb,OA7BE,sBAAI,oBAAK,C,IAAT,WACE,OAAQ7iB,KAAKiD,MACX,KAAK,EACH,MAAO,sBACT,KAAK,EACH,MAAO,oBACT,KAAK,EACH,MAAO,6BACT,KAAK,EACH,MAAO,yBACT,KAAK,EACH,MAAO,uBACT,KAAK,EACH,MAAO,iBACT,QACE,MAAO,kB,gCAIb,sBAAI,qBAAM,C,IAAV,WACE,IAAMqD,EAAkB,GAOxB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A,EAAKwoJ,MAAM,OAElE,YAAAoa,WAAA,SAAW9vB,EAAYp1I,KAEvB,YAAA+kK,WAAA,SAAW3vB,EAAYp1I,KACzB,EAlDA,GCnvBA,SAAgB4hM,KAkCd,OAjCKnE,KACHA,GAAmB,GAGnBoE,GAAgB7+K,EAAgB2D,KAAM,CACpC,gBACA,cACA,gBAEFk7K,GAAgB7+K,EAAgB4D,MAAO,CAAC,YAExCi7K,GAAgB7+K,EAAgB8D,IAAK,CACnC,eAAgB,YAAmB,YAAmB,YAAgB,SACtE,SAAgB,kBAAmB,kBAAmB,WAAgB,cACtE,UAAgB,aAAmB,YAAmB,WAAgB,SACtE,aAAgB,gBAAmB,YAAmB,eAAgB,cAExE+6K,GAAgB7+K,EAAgBgE,aAAc,CAC5C,cACA,kBACA,YACA,YACA,YACA,eACA,gBACA,aACA,YACA,YACA,kBACA,cACA,gBAGGy2K,GAGT,SAASoE,GAAgBh0I,EAAsBi0I,G,YAC7C,IAAmB,MAAAl/K,YAAAk/K,GAAK,+BAAnB,IAAMC,EAAI,QAAWtE,GAAiBsE,EAAKvrL,eAAiBq3C,G;;;;;;;GCpDnE,oBCmEMm0I,GAAmB,CACvB,iYAGA,s1BACA,qgCACA,gOACA,2uBACA,uBACA,2CACA,uBACA,wCACA,uBACA,kCACA,yCACA,mLACA,8JACA,eACA,yBACA,iCACA,iQACA,yHACA,sCACA,+BACA,4BACA,0BACA,8BACA,yCACA,6BACA,0BACA,uDACA,wCACA,qCACA,uGACA,iGACA,sOACA,mDACA,sBACA,wCACA,6BACA,2JACA,oJACA,wbACA,+BACA,8BACA,6BACA,wIACA,yBACA,4HACA,8BACA,mDACA,2DACA,sCACA,kDACA,uIACA,yCACA,6EACA,wDACA,wBACA,gDACA,yBACA,2BACA,qCACA,mCACA,gGACA,wGACA,wBACA,0BACA,mDACA,sBACA,2CACA,8BACA,mHACA,+DACA,oHACA,iDACA,wDACA,0BACA,qNACA,2BACA,sDACA,iCACA,yBACA,oCACA,wBACA,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IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,I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,EAAyBr9L,G,OACvD,YAAMwwF,EAAIxgU,KAAMqta,EAAQr9L,IAAW,KAEvC,OAL+Cv6M,iBAAlCy7Z,EAAyB,aADrC,uBAGM/4W,cAAA,iBAAO,c,wCAA4Bg5W,EAA6BhU,MAF1D+T,G,CAAkCH,I,SAO/BK,KACd,MHiDwC,mBAA1B7B,KGjDmB,IAAI8B,GAAwB,IAAI5B,GAGnE,SAAgB6B,KACd,OAAO,IAAIC,GAGb,SAAgBC,GACZ3ub,EAA+Bogb,EAAyBvmW,GAC1D,OAAO,IAAI,GAAyB75E,EAAUogb,EAAQvmW,GAMxD,IAAa+0W,GACT,IAAI,iBAAqD,uBAEvDC,GAAyC,CAC7C,CAAChoc,QAAS,IAAkBg0C,SAAU,IACtC,CAACh0C,QAASyzb,GAA0Bx/Y,WAAY2zZ,IAChD,CAAC5nc,QAASqnc,GAAiBrzZ,SAAU,IAA4B,CAC/Dh0C,QAAS,mBACTi0C,WAAY6zZ,GACZr1Z,KAAM,CAAC8rS,0BAAqB8oH,GAAiB,YAQpCY,GAA4B,aACvC,CAACjoc,QAASync,EAAiBxzZ,WAAYyzZ,IACvC,CAAC1nc,QAAS+nc,GAAuB7nc,SAAU,sBAAyB8nc,IAOzDE,GAAiC,aAC5C,CAACloc,QAASync,EAAiBzzZ,SAAUsyY,GACrC,CAACtmb,QAAS+nc,GAAuB7nc,SAAU,mBAAsB8nc,IChDnE,4BACA,OADaloC,EAAuB,aAJnC,mBAAS,CACRtoa,QAAS,CAAC,iBACV2F,UAAW8qc,MAEAnoC,GAAb,GAWA,4BACA,OADaqoC,EAAoB,aAJhC,mBAAS,CACR3wc,QAAS,CAAC,iBACV2F,UAAW+qc,MAEAC,GAAb","file":"app.537e4a7f2af20f562738.bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 995);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n  /**\n   * Invoke as decorator.\n   */\n  <T extends Type<any>>(type: T): T;\n\n  // Make TypeDecorator assignable to built-in ParameterDecorator type.\n  // ParameterDecorator is declared in lib.d.ts as a `declare type`\n  // so we cannot declare this interface as a subtype.\n  // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n  (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n    name: string, props?: (...args: any[]) => any, parentClass?: any,\n    additionalProcessing?: (type: Type<T>) => void,\n    typeFn?: (type: Type<T>, ...args: any[]) => void):\n    {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any;} {\n  const metaCtor = makeMetadataCtor(props);\n\n  function DecoratorFactory(\n      this: unknown | typeof DecoratorFactory, ...args: any[]): (cls: Type<T>) => any {\n    if (this instanceof DecoratorFactory) {\n      metaCtor.call(this, ...args);\n      return this as typeof DecoratorFactory;\n    }\n\n    const annotationInstance = new (DecoratorFactory as any)(...args);\n    return function TypeDecorator(cls: Type<T>) {\n      if (typeFn) typeFn(cls, ...args);\n      // Use of Object.defineProperty is important since it creates non-enumerable property which\n      // prevents the property is copied during subclassing.\n      const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n          (cls as any)[ANNOTATIONS] :\n          Object.defineProperty(cls, ANNOTATIONS, {value: []})[ANNOTATIONS];\n      annotations.push(annotationInstance);\n\n\n      if (additionalProcessing) additionalProcessing(cls);\n\n      return cls;\n    };\n  }\n\n  if (parentClass) {\n    DecoratorFactory.prototype = Object.create(parentClass.prototype);\n  }\n\n  DecoratorFactory.prototype.ngMetadataName = name;\n  (DecoratorFactory as any).annotationCls = DecoratorFactory;\n  return DecoratorFactory as any;\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n  return function ctor(this: any, ...args: any[]) {\n    if (props) {\n      const values = props(...args);\n      for (const propName in values) {\n        this[propName] = values[propName];\n      }\n    }\n  };\n}\n\nexport function makeParamDecorator(\n    name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n  const metaCtor = makeMetadataCtor(props);\n  function ParamDecoratorFactory(\n      this: unknown | typeof ParamDecoratorFactory, ...args: any[]): any {\n    if (this instanceof ParamDecoratorFactory) {\n      metaCtor.apply(this, args);\n      return this;\n    }\n    const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n    (<any>ParamDecorator).annotation = annotationInstance;\n    return ParamDecorator;\n\n    function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n      // Use of Object.defineProperty is important since it creates non-enumerable property which\n      // prevents the property is copied during subclassing.\n      const parameters = cls.hasOwnProperty(PARAMETERS) ?\n          (cls as any)[PARAMETERS] :\n          Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n      // there might be gaps if some in between parameters do not have annotations.\n      // we pad with nulls.\n      while (parameters.length <= index) {\n        parameters.push(null);\n      }\n\n      (parameters[index] = parameters[index] || []).push(annotationInstance);\n      return cls;\n    }\n  }\n  if (parentClass) {\n    ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n  }\n  ParamDecoratorFactory.prototype.ngMetadataName = name;\n  (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n  return ParamDecoratorFactory;\n}\n\nexport function makePropDecorator(\n    name: string, props?: (...args: any[]) => any, parentClass?: any,\n    additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n  const metaCtor = makeMetadataCtor(props);\n\n  function PropDecoratorFactory(this: unknown | typeof PropDecoratorFactory, ...args: any[]): any {\n    if (this instanceof PropDecoratorFactory) {\n      metaCtor.apply(this, args);\n      return this;\n    }\n\n    const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n    function PropDecorator(target: any, name: string) {\n      const constructor = target.constructor;\n      // Use of Object.defineProperty is important since it creates non-enumerable property which\n      // prevents the property is copied during subclassing.\n      const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n          (constructor as any)[PROP_METADATA] :\n          Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n      meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n      meta[name].unshift(decoratorInstance);\n\n      if (additionalProcessing) additionalProcessing(target, name, ...args);\n    }\n\n    return PropDecorator;\n  }\n\n  if (parentClass) {\n    PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n  }\n\n  PropDecoratorFactory.prototype.ngMetadataName = name;\n  (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n  return PropDecoratorFactory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {makeParamDecorator} from '../util/decorators';\n\n\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n  /**\n   * Parameter decorator on a dependency parameter of a class constructor\n   * that specifies a custom provider of the dependency.\n   *\n   * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n   *\n   * @usageNotes\n   * The following example shows a class constructor that specifies a\n   * custom provider of a dependency using the parameter decorator.\n   *\n   * When `@Inject()` is not present, the injector uses the type annotation of the\n   * parameter as the provider.\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"InjectWithoutDecorator\">\n   * </code-example>\n   */\n  (token: any): any;\n  new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n  /**\n   * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.\n   */\n  token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token}));\n\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which marks the parameter as being an optional dependency.\n   * The DI framework provides null if the dependency is not found.\n   *\n   * Can be used together with other parameter decorators\n   * that modify how dependency injection operates.\n   *\n   * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n   *\n   * @usageNotes\n   *\n   * The following code allows the possibility of a null result:\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\">\n   * </code-example>\n   *\n   */\n  (): any;\n  new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator = makeParamDecorator('Optional');\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which tells the DI framework to start dependency resolution from the local injector.\n   *\n   * Resolution works upward through the injector hierarchy, so the children\n   * of this class must configure their own providers or be prepared for a null result.\n   *\n   * @usageNotes\n   *\n   * In the following example, the dependency can be resolved\n   * by the local injector when instantiating the class itself, but not\n   * when instantiating a child.\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\">\n   * </code-example>\n   *\n   *\n   * @see `SkipSelf`\n   * @see `Optional`\n   *\n   */\n  (): any;\n  new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator = makeParamDecorator('Self');\n\n\n/**\n * Type of the SkipSelf decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which tells the DI framework to start dependency resolution from the parent injector.\n   * Resolution works upward through the injector hierarchy, so the local injector\n   * is not checked for a provider.\n   *\n   * @usageNotes\n   *\n   * In the following example, the dependency can be resolved when\n   * instantiating a child, but not when instantiating the class itself.\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\">\n   * </code-example>\n   *\n   * Learn more in the\n   * [Dependency Injection guide](guide/dependency-injection-in-action#skip).\n   *\n   * @see `Self`\n   * @see `Optional`\n   *\n   */\n  (): any;\n  new (): SkipSelf;\n}\n\n/**\n * Type of the SkipSelf metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');\n\n/**\n * Type of the Host decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n  /**\n   * Parameter decorator on a view-provider parameter of a class constructor\n   * that tells the DI framework to resolve the view by checking injectors of child\n   * elements, and stop when reaching the host element of the current component.\n   *\n   * For an extended example, see\n   * [\"Dependency Injection Guide\"](guide/dependency-injection-in-action#optional).\n   *\n   * @usageNotes\n   *\n   * The following shows use with the `@Optional` decorator, and allows for a null result.\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\">\n   * </code-example>\n   */\n  (): any;\n  new (): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator = makeParamDecorator('Host');\n\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n  /**\n   * Parameter decorator for a directive constructor that designates\n   * a host-element attribute whose value is injected as a constant string literal.\n   *\n   * @usageNotes\n   *\n   * Suppose we have an `<input>` element and want to know its `type`.\n   *\n   * ```html\n   * <input type=\"text\">\n   * ```\n   *\n   * The following example uses the decorator to inject the string literal `text`.\n   *\n   * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n   *\n   * ### Example as TypeScript Decorator\n   *\n   * {@example core/ts/metadata/metadata.ts region='attributeFactory'}\n   *\n   */\n  (name: string): any;\n  new (name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n  /**\n   * The name of the attribute whose value can be injected.\n   */\n  attributeName?: string;\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator =\n    makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nexport enum InjectFlags {\n  // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.\n\n  /** Check self and check parent injector if needed */\n  Default = 0b0000,\n  /**\n   * Specifies that an injector should retrieve a dependency from any injector until reaching the\n   * host element of the current component. (Only used with Element Injector)\n   */\n  Host = 0b0001,\n  /** Don't ascend to ancestors of the node requesting injection. */\n  Self = 0b0010,\n  /** Skip the node that is requesting injection. */\n  SkipSelf = 0b0100,\n  /** Inject `defaultValue` instead if token not found. */\n  Optional = 0b1000,\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n  for (let key in objWithPropertyToExtract) {\n    if (objWithPropertyToExtract[key] === getClosureSafeProperty as any) {\n      return key;\n    }\n  }\n  throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: {[key: string]: string}, source: {[key: string]: string}) {\n  for (const key in source) {\n    if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n      target[key] = source[key];\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider} from './provider';\n\n\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ÉµÉµInjectableDef<T> {\n  /**\n   * Specifies that the given type belongs to a particular injector:\n   * - `InjectorType` such as `NgModule`,\n   * - `'root'` the root injector\n   * - `'any'` all injectors.\n   * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n   *   `providers`.\n   */\n  providedIn: InjectorType<any>|'root'|'any'|null;\n\n  /**\n   * The token to which this definition belongs.\n   *\n   * Note that this may not be the same as the type that the `factory` will create.\n   */\n  token: unknown;\n\n  /**\n   * Factory method to execute to create an instance of the injectable.\n   */\n  factory: (t?: Type<any>) => T;\n\n  /**\n   * In a case of no explicit injector, a location where the instance of the injectable is stored.\n   */\n  value: T|undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ÉµÉµInjectorDef<T> {\n  factory: () => T;\n\n  // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n  // class they are decorating (to add the ngInjectableDef property for example).\n  providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n              StaticClassProvider|ClassProvider|any[])[];\n\n  imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has an `InjectableDef` static field.\n *\n * `InjectableDefType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n  /**\n   * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n   */\n  ngInjectableDef: never;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorDefTypes` can be used to configure a `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n  /**\n   * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n   */\n  ngInjectorDef: never;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n  ngModule: InjectorType<T>;\n  providers?: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n               StaticClassProvider|ClassProvider|any[])[];\n}\n\n\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n *   provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n *   The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n */\nexport function ÉµÉµdefineInjectable<T>(opts: {\n  token: unknown,\n  providedIn?: Type<any>| 'root' | 'any' | null,\n  factory: () => T,\n}): never {\n  return ({\n    token: opts.token, providedIn: opts.providedIn as any || null, factory: opts.factory,\n        value: undefined,\n  } as ÉµÉµInjectableDef<T>) as never;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only be generated code, and that\n * code should now use ÉµÉµdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ÉµÉµdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n *   create the type must be provided. If that factory function needs to inject arguments, it can\n *   use the `inject` function.\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n *   either have a factory or point to a type which has an `ngInjectableDef` static property (the\n *   type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n *   whose providers will also be added to the injector. Locally provided types will override\n *   providers from imports.\n *\n * @publicApi\n */\nexport function ÉµÉµdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):\n    never {\n  return ({\n    factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n  } as ÉµÉµInjectorDef<any>) as never;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited\n * value.\n *\n * @param type A type which may have its own (non-inherited) `ngInjectableDef`.\n */\nexport function getInjectableDef<T>(type: any): ÉµÉµInjectableDef<T>|null {\n  const def = type[NG_INJECTABLE_DEF] as ÉµÉµInjectableDef<T>;\n  // The definition read above may come from a base class. `hasOwnProperty` is not sufficient to\n  // distinguish this case, as in older browsers (e.g. IE10) static property inheritance is\n  // implemented by copying the properties.\n  //\n  // Instead, the ngInjectableDef's token is compared to the type, and if they don't match then the\n  // property was not defined directly on the type itself, and was likely inherited. The definition\n  // is only returned if the type matches the def.token.\n  return def && def.token === type ? def : null;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` or read the `ngInjectableDef` from one of its ancestors.\n *\n * @param type A type which may have `ngInjectableDef`, via inheritance.\n *\n * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the\n * `ngInjectableDef` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ÉµÉµInjectableDef<T>|null {\n  if (type && type[NG_INJECTABLE_DEF]) {\n    // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n    // ngDevMode &&\n    console.warn(\n        `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n        `This will become an error in v10. Please add @Injectable() to the \"${type.name}\" class.`);\n    return type[NG_INJECTABLE_DEF];\n  } else {\n    return null;\n  }\n}\n\n/**\n * Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have `ngInjectorDef`\n */\nexport function getInjectorDef<T>(type: any): ÉµÉµInjectorDef<T>|null {\n  return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;\n}\n\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function stringify(token: any): string {\n  if (typeof token === 'string') {\n    return token;\n  }\n\n  if (token instanceof Array) {\n    return '[' + token.map(stringify).join(', ') + ']';\n  }\n\n  if (token == null) {\n    return '' + token;\n  }\n\n  if (token.overriddenName) {\n    return `${token.overriddenName}`;\n  }\n\n  if (token.name) {\n    return `${token.name}`;\n  }\n\n  const res = token.toString();\n\n  if (res == null) {\n    return '' + res;\n  }\n\n  const newLineIndex = res.indexOf('\\n');\n  return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n\n\n/**\n * An interface that a function passed into {@link forwardRef} has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn { (): any; }\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n  (<any>forwardRefFn).__forward_ref__ = forwardRef;\n  (<any>forwardRefFn).toString = function() { return stringify(this()); };\n  return (<Type<any>><any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n  const fn: any = type;\n  if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n      fn.__forward_ref__ === forwardRef) {\n    return fn();\n  } else {\n    return type;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n// Not yet available in TypeScript: https://github.com/Microsoft/TypeScript/pull/29332\ndeclare var globalThis: any /** TODO #9100 */;\n\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n    self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n *  - packages/compiler/src/compiler_facade_interface.ts             (master)\n *  - packages/core/src/render3/jit/compiler_facade_interface.ts     (copy)\n *\n * Please ensure that the two files are in sync using this command:\n * ```\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n *    packages/core/src/render3/jit/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade { ÉµcompilerFacade: CompilerFacade; }\n\nexport interface CompilerFacade {\n  compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n      any;\n  compileInjectable(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n  compileInjector(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n  compileNgModule(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n  compileDirective(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n  compileComponent(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n  compileBase(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3BaseMetadataFacade):\n      any;\n\n  createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n  R3ResolvedDependencyType: typeof R3ResolvedDependencyType;\n  ResourceLoader: {new (): ResourceLoader};\n}\n\nexport interface CoreEnvironment { [name: string]: Function; }\n\nexport type ResourceLoader = {\n  get(url: string): Promise<string>| string;\n};\n\nexport type StringMap = {\n  [key: string]: string;\n};\n\nexport type StringMapWithRename = {\n  [key: string]: string | [string, string];\n};\n\nexport type Provider = any;\n\nexport enum R3ResolvedDependencyType {\n  Token = 0,\n  Attribute = 1,\n  ChangeDetectorRef = 2,\n}\n\nexport interface R3DependencyMetadataFacade {\n  token: any;\n  resolved: R3ResolvedDependencyType;\n  host: boolean;\n  optional: boolean;\n  self: boolean;\n  skipSelf: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n  name: string;\n  type: any;\n  typeArgumentCount: number;\n  pipeName: string;\n  deps: R3DependencyMetadataFacade[]|null;\n  pure: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n  name: string;\n  type: any;\n  typeArgumentCount: number;\n  ctorDeps: R3DependencyMetadataFacade[]|null;\n  providedIn: any;\n  useClass?: any;\n  useFactory?: any;\n  useExisting?: any;\n  useValue?: any;\n  userDeps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n  type: any;\n  bootstrap: Function[];\n  declarations: Function[];\n  imports: Function[];\n  exports: Function[];\n  emitInline: boolean;\n  schemas: {name: string}[]|null;\n  id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n  name: string;\n  type: any;\n  deps: R3DependencyMetadataFacade[]|null;\n  providers: any[];\n  imports: any[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n  name: string;\n  type: any;\n  typeArgumentCount: number;\n  typeSourceSpan: ParseSourceSpan;\n  deps: R3DependencyMetadataFacade[]|null;\n  selector: string|null;\n  queries: R3QueryMetadataFacade[];\n  host: {[key: string]: string};\n  propMetadata: {[key: string]: any[]};\n  lifecycle: {usesOnChanges: boolean;};\n  inputs: string[];\n  outputs: string[];\n  usesInheritance: boolean;\n  exportAs: string[]|null;\n  providers: Provider[]|null;\n  viewQueries: R3QueryMetadataFacade[];\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n  template: string;\n  preserveWhitespaces: boolean;\n  animations: any[]|undefined;\n  pipes: Map<string, any>;\n  directives: {selector: string, expression: any}[];\n  styles: string[];\n  encapsulation: ViewEncapsulation;\n  viewProviders: Provider[]|null;\n  interpolation?: [string, string];\n  changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3BaseMetadataFacade {\n  name: string;\n  type: any;\n  propMetadata: {[key: string]: any[]};\n  inputs?: {[key: string]: string | [string, string]};\n  outputs?: {[key: string]: string};\n  queries?: R3QueryMetadataFacade[];\n  viewQueries?: R3QueryMetadataFacade[];\n}\n\nexport type ViewEncapsulation = number;\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n  propertyName: string;\n  first: boolean;\n  predicate: any|string[];\n  descendants: boolean;\n  read: any|null;\n  static: boolean;\n}\n\nexport interface ParseSourceSpan {\n  start: any;\n  end: any;\n  details: any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport function getCompilerFacade(): CompilerFacade {\n  const globalNg: ExportedCompilerFacade = global['ng'];\n  if (!globalNg || !globalNg.ÉµcompilerFacade) {\n    throw new Error(\n        `Angular JIT compilation failed: '@angular/compiler' not loaded!\\n` +\n        `  - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n` +\n        `  - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n` +\n        `  - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`);\n  }\n  return globalNg.ÉµcompilerFacade;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {ÉµÉµdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n  /** @internal */\n  readonly ngMetadataName = 'InjectionToken';\n\n  readonly ngInjectableDef: never|undefined;\n\n  constructor(protected _desc: string, options?: {\n    providedIn?: Type<any>| 'root' | null,\n    factory: () => T\n  }) {\n    this.ngInjectableDef = undefined;\n    if (typeof options == 'number') {\n      // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n      // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.\n      // We are using it to assign `-1` which is used to identify `Injector`.\n      (this as any).__NG_ELEMENT_ID__ = options;\n    } else if (options !== undefined) {\n      this.ngInjectableDef = ÉµÉµdefineInjectable({\n        token: this,\n        providedIn: options.providedIn || 'root',\n        factory: options.factory,\n      });\n    }\n  }\n\n  toString(): string { return `InjectionToken ${this._desc}`; }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> { ngInjectableDef: never; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {getInjectableDef, ÉµÉµInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\n\n\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n    'INJECTOR',\n    -1 as any  // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n    );\n\nconst _THROW_IF_NOT_FOUND = new Object();\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'Éµ';\nexport const SOURCE = '__source';\n\nexport const USE_VALUE =\n    getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector|undefined|null = undefined;\n\nexport function setCurrentInjector(injector: Injector | null | undefined): Injector|undefined|null {\n  const former = _currentInjector;\n  _currentInjector = injector;\n  return former;\n}\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n *  1. `Injector` should not depend on ivy logic.\n *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation:\n    (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null)|undefined;\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n    impl: (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null) | undefined):\n    (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null)|undefined {\n  const previous = _injectImplementation;\n  _injectImplementation = impl;\n  return previous;\n}\n\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>): T;\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|\n    null;\nexport function injectInjectorOnly<T>(\n    token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n  if (_currentInjector === undefined) {\n    throw new Error(`inject() must be called from an injection context`);\n  } else if (_currentInjector === null) {\n    return injectRootLimpMode(token, undefined, flags);\n  } else {\n    return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n  }\n}\n\n/**\n * Generated instruction: Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this instruction)\n *\n * @see inject\n * @codeGenApi\n */\nexport function ÉµÉµinject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ÉµÉµinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;\nexport function ÉµÉµinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|\n    null {\n  return (_injectImplementation || injectInjectorOnly)(token, flags);\n}\n\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns True if injection is successful, null otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport const inject = ÉµÉµinject;\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\nexport function injectRootLimpMode<T>(\n    token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {\n  const injectableDef: ÉµÉµInjectableDef<T>|null = getInjectableDef(token);\n  if (injectableDef && injectableDef.providedIn == 'root') {\n    return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n                                               injectableDef.value;\n  }\n  if (flags & InjectFlags.Optional) return null;\n  if (notFoundValue !== undefined) return notFoundValue;\n  throw new Error(`Injector: NOT_FOUND [${stringify(token)}]`);\n}\n\nexport function injectArgs(types: (Type<any>| InjectionToken<any>| any[])[]): any[] {\n  const args: any[] = [];\n  for (let i = 0; i < types.length; i++) {\n    const arg = resolveForwardRef(types[i]);\n    if (Array.isArray(arg)) {\n      if (arg.length === 0) {\n        throw new Error('Arguments array must have arguments.');\n      }\n      let type: Type<any>|undefined = undefined;\n      let flags: InjectFlags = InjectFlags.Default;\n\n      for (let j = 0; j < arg.length; j++) {\n        const meta = arg[j];\n        if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {\n          flags |= InjectFlags.Optional;\n        } else if (\n            meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n          flags |= InjectFlags.SkipSelf;\n        } else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n          flags |= InjectFlags.Self;\n        } else if (meta instanceof Inject || meta === Inject) {\n          type = meta.token;\n        } else {\n          type = meta;\n        }\n      }\n\n      args.push(ÉµÉµinject(type !, flags));\n    } else {\n      args.push(ÉµÉµinject(arg));\n    }\n  }\n  return args;\n}\n\n\nexport class NullInjector implements Injector {\n  get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n    if (notFoundValue === THROW_IF_NOT_FOUND) {\n      // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n      // reason why correctly written application should cause this exception.\n      // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n      // if(ngDevMode) debugger;\n      const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n      error.name = 'NullInjectorError';\n      throw error;\n    }\n    return notFoundValue;\n  }\n}\n\n\nexport function catchInjectorError(\n    e: any, token: any, injectorErrorName: string, source: string | null): never {\n  const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n  if (token[SOURCE]) {\n    tokenPath.unshift(token[SOURCE]);\n  }\n  e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n  e[NG_TOKEN_PATH] = tokenPath;\n  e[NG_TEMP_TOKEN_PATH] = null;\n  throw e;\n}\n\nexport function formatError(\n    text: string, obj: any, injectorErrorName: string, source: string | null = null): string {\n  text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n  let context = stringify(obj);\n  if (obj instanceof Array) {\n    context = obj.map(stringify).join(' -> ');\n  } else if (typeof obj === 'object') {\n    let parts = <string[]>[];\n    for (let key in obj) {\n      if (obj.hasOwnProperty(key)) {\n        let value = obj[key];\n        parts.push(\n            key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n      }\n    }\n    context = `{${parts.join(', ')}}`;\n  }\n  return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n  ')}`;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {ÉµÉµinject} from '../injector_compatibility';\nimport {getInjectableDef, getInjectorDef, ÉµÉµdefineInjectable, ÉµÉµdefineInjector} from '../interface/defs';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n  'ÉµÉµdefineInjectable': ÉµÉµdefineInjectable,\n  'ÉµÉµdefineInjector': ÉµÉµdefineInjector,\n  'ÉµÉµinject': ÉµÉµinject,\n  'ÉµÉµgetFactoryOf': getFactoryOf,\n};\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T)|null {\n  const typeAny = type as any;\n  const def = getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n  if (!def || def.factory === undefined) {\n    return null;\n  }\n  return def.factory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n  /**\n   * The injector that contains all of the providers of the NgModule.\n   */\n  abstract get injector(): Injector;\n\n  /**\n   * The ComponentFactoryResolver to get hold of the ComponentFactories\n   * declared in the `entryComponents` property of the module.\n   */\n  abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n  /**\n   * The NgModule instance.\n   */\n  abstract get instance(): T;\n\n  /**\n   * Destroys the module instance and all of the data structures associated with it.\n   */\n  abstract destroy(): void;\n\n  /**\n   * Allows to register a callback that will be called when the module is destroyed.\n   */\n  abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n  // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n  // exposed to the user.\n  _bootstrapComponents: Type<any>[];\n}\n\n/**\n * @publicApi\n */\nexport abstract class NgModuleFactory<T> {\n  abstract get moduleType(): Type<T>;\n  abstract create(parentInjector: Injector|null): NgModuleRef<T>;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n  const ngDevMode: null|NgDevModePerfCounters;\n  interface NgDevModePerfCounters {\n    namedConstructors: boolean;\n    firstTemplatePass: number;\n    tNode: number;\n    tView: number;\n    rendererCreateTextNode: number;\n    rendererSetText: number;\n    rendererCreateElement: number;\n    rendererAddEventListener: number;\n    rendererSetAttribute: number;\n    rendererRemoveAttribute: number;\n    rendererSetProperty: number;\n    rendererSetClassName: number;\n    rendererAddClass: number;\n    rendererRemoveClass: number;\n    rendererSetStyle: number;\n    rendererRemoveStyle: number;\n    rendererDestroy: number;\n    rendererDestroyNode: number;\n    rendererMoveNode: number;\n    rendererRemoveNode: number;\n    rendererAppendChild: number;\n    rendererInsertBefore: number;\n    rendererCreateComment: number;\n    styleMap: number;\n    styleMapCacheMiss: number;\n    classMap: number;\n    classMapCacheMiss: number;\n    styleProp: number;\n    stylePropCacheMiss: number;\n    classProp: number;\n    classPropCacheMiss: number;\n    flushStyling: number;\n    classesApplied: number;\n    stylesApplied: number;\n    stylingWritePersistedState: number;\n    stylingReadPersistedState: number;\n  }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n  const locationString = typeof location !== 'undefined' ? location.toString() : '';\n  const newCounters: NgDevModePerfCounters = {\n    namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n    firstTemplatePass: 0,\n    tNode: 0,\n    tView: 0,\n    rendererCreateTextNode: 0,\n    rendererSetText: 0,\n    rendererCreateElement: 0,\n    rendererAddEventListener: 0,\n    rendererSetAttribute: 0,\n    rendererRemoveAttribute: 0,\n    rendererSetProperty: 0,\n    rendererSetClassName: 0,\n    rendererAddClass: 0,\n    rendererRemoveClass: 0,\n    rendererSetStyle: 0,\n    rendererRemoveStyle: 0,\n    rendererDestroy: 0,\n    rendererDestroyNode: 0,\n    rendererMoveNode: 0,\n    rendererRemoveNode: 0,\n    rendererAppendChild: 0,\n    rendererInsertBefore: 0,\n    rendererCreateComment: 0,\n    styleMap: 0,\n    styleMapCacheMiss: 0,\n    classMap: 0,\n    classMapCacheMiss: 0,\n    styleProp: 0,\n    stylePropCacheMiss: 0,\n    classProp: 0,\n    classPropCacheMiss: 0,\n    flushStyling: 0,\n    classesApplied: 0,\n    stylesApplied: 0,\n    stylingWritePersistedState: 0,\n    stylingReadPersistedState: 0,\n  };\n\n  // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n  const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n  global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n  return newCounters;\n}\n\n/**\n * This checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * NOTE: changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n  ngDevModeResetPerfCounters();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n  /**\n   * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n   * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n   * Change detection can still be explicitly invoked.\n   * This strategy applies to all child directives and cannot be overridden.\n   */\n  OnPush = 0,\n\n  /**\n   * Use the default `CheckAlways` strategy, in which change detection is automatic until\n   * explicitly deactivated.\n   */\n  Default = 1,\n}\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nexport enum ChangeDetectorStatus {\n  /**\n   * A state in which, after calling `detectChanges()`, the change detector\n   * state becomes `Checked`, and must be explicitly invoked or reactivated.\n   */\n  CheckOnce,\n\n  /**\n   * A state in which change detection is skipped until the change detector mode\n   * becomes `CheckOnce`.\n   */\n  Checked,\n\n  /**\n   * A state in which change detection continues automatically until explicitly\n   * deactivated.\n   */\n  CheckAlways,\n\n  /**\n   * A state in which a change detector sub tree is not a part of the main tree and\n   * should be skipped.\n   */\n  Detached,\n\n  /**\n   * Indicates that the change detector encountered an error checking a binding\n   * or calling a directive lifecycle method and is now in an inconsistent state. Change\n   * detectors in this state do not detect changes.\n   */\n  Errored,\n\n  /**\n   * Indicates that the change detector has been destroyed.\n   */\n  Destroyed,\n}\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n    boolean {\n  return changeDetectionStrategy == null ||\n      changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n  /**\n   * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n   * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n   * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n   * selectors.\n   *\n   * This is the default option.\n   */\n  Emulated = 0,\n  /**\n   * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n   * Use the native encapsulation mechanism of the renderer.\n   *\n   * For the DOM this means using the deprecated [Shadow DOM\n   * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n   * creating a ShadowRoot for Component's Host Element.\n   */\n  Native = 1,\n  /**\n   * Don't provide any template or style encapsulation.\n   */\n  None = 2,\n\n  /**\n   * Use Shadow DOM to encapsulate styles.\n   *\n   * For the DOM this means using modern [Shadow\n   * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n   * creating a ShadowRoot for Component's Host Element.\n   */\n  ShadowDom = 3\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n* Equivalent to ES6 spread, add each item to an array.\n*\n* @param items The items to add\n* @param arr The array to which you want to add the items\n*/\nexport function addAllToArray(items: any[], arr: any[]) {\n  for (let i = 0; i < items.length; i++) {\n    arr.push(items[i]);\n  }\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[], dst?: any[]): any[] {\n  if (dst === undefined) dst = list;\n  for (let i = 0; i < list.length; i++) {\n    let item = list[i];\n    if (Array.isArray(item)) {\n      // we need to inline it.\n      if (dst === list) {\n        // Our assumption that the list was already flat was wrong and\n        // we need to clone flat since we need to write to it.\n        dst = list.slice(0, i);\n      }\n      flatten(item, dst);\n    } else if (dst !== list) {\n      dst.push(item);\n    }\n  }\n  return dst;\n}\n\nexport function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n  input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n  // perf: array.push is faster than array.splice!\n  if (index >= arr.length) {\n    arr.push(value);\n  } else {\n    arr.splice(index, 0, value);\n  }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n  // perf: array.pop is faster than array.splice!\n  if (index >= arr.length - 1) {\n    return arr.pop();\n  } else {\n    return arr.splice(index, 1)[0];\n  }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string) {\n  if (typeof actual != 'number') {\n    throwError(msg);\n  }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n  if (actual != expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string) {\n  if (actual == expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string) {\n  if (actual !== expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n  if (actual === expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string) {\n  if (actual >= expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string) {\n  if (actual <= expected) {\n    throwError(msg);\n  }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n  if (actual != null) {\n    throwError(msg);\n  }\n}\n\nexport function assertDefined<T>(actual: T, msg: string) {\n  if (actual == null) {\n    throwError(msg);\n  }\n}\n\nexport function throwError(msg: string): never {\n  // tslint:disable-next-line\n  debugger;  // Left intentionally for better debugger experience.\n  throw new Error(`ASSERTION ERROR: ${msg}`);\n}\n\nexport function assertDomNode(node: any) {\n  // If we're in a worker, `Node` will not be defined.\n  assertEqual(\n      (typeof Node !== 'undefined' && node instanceof Node) ||\n          (typeof node === 'object' && node != null &&\n           node.constructor.name === 'WebWorkerRenderNode'),\n      true, `The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n}\n\n\nexport function assertDataInRange(arr: any[], index: number) {\n  const maxLen = arr ? arr.length : 0;\n  assertLessThan(index, maxLen, `Index expected to be less than ${maxLen} but got ${index}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects(fn: () => void): string {\n  return '' + {toString: fn};\n}","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport '../util/ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: {} = {};\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n  // These property accesses can be ignored because ngDevMode will be set to false\n  // when optimizing code and the whole if statement will be dropped.\n  // tslint:disable-next-line:no-toplevel-property-access\n  Object.freeze(EMPTY_OBJ);\n  // tslint:disable-next-line:no-toplevel-property-access\n  Object.freeze(EMPTY_ARRAY);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMPONENT_DEF = getClosureSafeProperty({ngComponentDef: getClosureSafeProperty});\nexport const NG_DIRECTIVE_DEF = getClosureSafeProperty({ngDirectiveDef: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ngPipeDef: getClosureSafeProperty});\nexport const NG_MODULE_DEF = getClosureSafeProperty({ngModuleDef: getClosureSafeProperty});\nexport const NG_LOCALE_ID_DEF = getClosureSafeProperty({ngLocaleIdDef: getClosureSafeProperty});\nexport const NG_BASE_DEF = getClosureSafeProperty({ngBaseDef: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {NG_INJECTABLE_DEF, ÉµÉµdefineInjectable} from '../di/interface/defs';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {stringify} from '../util/stringify';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from './empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_LOCALE_ID_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ÉµÉµBaseDef} from './interfaces/definition';\n// while SelectorFlags is unused here, it's required so that types don't get resolved lazily\n// see: https://github.com/Microsoft/web-build-tools/issues/1050\nimport {CssSelectorList, SelectorFlags} from './interfaces/projection';\n\nlet _renderCompCount = 0;\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ngComponentDef = defineComponent({\n *     ...\n *   });\n * }\n * ```\n * @codeGenApi\n */\nexport function ÉµÉµdefineComponent<T>(componentDefinition: {\n  /**\n   * Directive type, needed to configure the injector.\n   */\n  type: Type<T>;\n\n  /** The selectors that will be used to match nodes to this component. */\n  selectors: CssSelectorList;\n\n  /**\n   * Factory method used to create an instance of directive.\n   */\n  factory: FactoryFn<T>;\n\n  /**\n   * The number of nodes, local refs, and pipes in this component template.\n   *\n   * Used to calculate the length of this component's LView array, so we\n   * can pre-fill the array and set the binding start index.\n   */\n  // TODO(kara): remove queries from this count\n  consts: number;\n\n  /**\n   * The number of bindings in this component template (including pure fn bindings).\n   *\n   * Used to calculate the length of this component's LView array, so we\n   * can pre-fill the array and set the host binding start index.\n   */\n  vars: number;\n\n  /**\n   * A map of input names.\n   *\n   * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n   *\n   * Given:\n   * ```\n   * class MyComponent {\n   *   @Input()\n   *   publicInput1: string;\n   *\n   *   @Input('publicInput2')\n   *   declaredInput2: string;\n   * }\n   * ```\n   *\n   * is described as:\n   * ```\n   * {\n   *   publicInput1: 'publicInput1',\n   *   declaredInput2: ['publicInput2', 'declaredInput2'],\n   * }\n   * ```\n   *\n   * Which the minifier may translate to:\n   * ```\n   * {\n   *   minifiedPublicInput1: 'publicInput1',\n   *   minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],\n   * }\n   * ```\n   *\n   * This allows the render to re-construct the minified, public, and declared names\n   * of properties.\n   *\n   * NOTE:\n   *  - Because declared and public name are usually same we only generate the array\n   *    `['public', 'declared']` format when they differ.\n   *  - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n   *    inconsistent behavior in that it uses declared names rather than minified or public. For\n   *    this reason `NgOnChanges` will be deprecated and removed in future version and this\n   *    API will be simplified to be consistent with `output`.\n   */\n  inputs?: {[P in keyof T]?: string | [string, string]};\n\n  /**\n   * A map of output names.\n   *\n   * The format is in: `{[actualPropertyName: string]:string}`.\n   *\n   * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n   *\n   * This allows the render to re-construct the minified and non-minified names\n   * of properties.\n   */\n  outputs?: {[P in keyof T]?: string};\n\n  /**\n   * Function executed by the parent template to allow child directive to apply host bindings.\n   */\n  hostBindings?: HostBindingsFunction<T>;\n\n  /**\n   * Function to create instances of content queries associated with a given directive.\n   */\n  contentQueries?: ContentQueriesFunction<T>;\n\n  /**\n   * Defines the name that can be used in the template to assign this directive to a variable.\n   *\n   * See: {@link Directive.exportAs}\n   */\n  exportAs?: string[];\n\n  /**\n   * Template function use for rendering DOM.\n   *\n   * This function has following structure.\n   *\n   * ```\n   * function Template<T>(ctx:T, creationMode: boolean) {\n   *   if (creationMode) {\n   *     // Contains creation mode instructions.\n   *   }\n   *   // Contains binding update instructions\n   * }\n   * ```\n   *\n   * Common instructions are:\n   * Creation mode instructions:\n   *  - `elementStart`, `elementEnd`\n   *  - `text`\n   *  - `container`\n   *  - `listener`\n   *\n   * Binding update instructions:\n   * - `bind`\n   * - `elementAttribute`\n   * - `elementProperty`\n   * - `elementClass`\n   * - `elementStyle`\n   *\n   */\n  template: ComponentTemplate<T>;\n\n  /**\n   * An array of `ngContent[selector]` values that were found in the template.\n   */\n  ngContentSelectors?: string[];\n\n  /**\n   * Additional set of instructions specific to view query processing. This could be seen as a\n   * set of instruction to be inserted into the template function.\n   *\n   * Query-related instructions need to be pulled out to a specific function as a timing of\n   * execution is different as compared to all other instructions (after change detection hooks but\n   * before view hooks).\n   */\n  viewQuery?: ViewQueriesFunction<T>| null;\n\n  /**\n   * A list of optional features to apply.\n   *\n   * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n   */\n  features?: ComponentDefFeature[];\n\n  /**\n   * Defines template and style encapsulation options available for Component's {@link Component}.\n   */\n  encapsulation?: ViewEncapsulation;\n\n  /**\n   * Defines arbitrary developer-defined data to be stored on a renderer instance.\n   * This is useful for renderers that delegate to other renderers.\n   *\n   * see: animation\n   */\n  data?: {[kind: string]: any};\n\n  /**\n   * A set of styles that the component needs to be present for component to render correctly.\n   */\n  styles?: string[];\n\n  /**\n   * The strategy that the default change detector uses to detect changes.\n   * When set, takes effect the next time change detection is triggered.\n   */\n  changeDetection?: ChangeDetectionStrategy;\n\n  /**\n   * Registry of directives and components that may be found in this component's view.\n   *\n   * The property is either an array of `DirectiveDef`s or a function which returns the array of\n   * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n   */\n  directives?: DirectiveTypesOrFactory | null;\n\n  /**\n   * Registry of pipes that may be found in this component's view.\n   *\n   * The property is either an array of `PipeDefs`s or a function which returns the array of\n   * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n   */\n  pipes?: PipeTypesOrFactory | null;\n\n  /**\n   * The set of schemas that declare elements to be allowed in the component's template.\n   */\n  schemas?: SchemaMetadata[] | null;\n}): never {\n  const type = componentDefinition.type;\n  const typePrototype = type.prototype;\n  const declaredInputs: {[key: string]: string} = {} as any;\n  const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n    type: type,\n    providersResolver: null,\n    consts: componentDefinition.consts,\n    vars: componentDefinition.vars,\n    factory: componentDefinition.factory,\n    template: componentDefinition.template || null !,\n    ngContentSelectors: componentDefinition.ngContentSelectors,\n    hostBindings: componentDefinition.hostBindings || null,\n    contentQueries: componentDefinition.contentQueries || null,\n    declaredInputs: declaredInputs,\n    inputs: null !,   // assigned in noSideEffects\n    outputs: null !,  // assigned in noSideEffects\n    exportAs: componentDefinition.exportAs || null,\n    onChanges: null,\n    onInit: typePrototype.ngOnInit || null,\n    doCheck: typePrototype.ngDoCheck || null,\n    afterContentInit: typePrototype.ngAfterContentInit || null,\n    afterContentChecked: typePrototype.ngAfterContentChecked || null,\n    afterViewInit: typePrototype.ngAfterViewInit || null,\n    afterViewChecked: typePrototype.ngAfterViewChecked || null,\n    onDestroy: typePrototype.ngOnDestroy || null,\n    onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n    directiveDefs: null !,  // assigned in noSideEffects\n    pipeDefs: null !,       // assigned in noSideEffects\n    selectors: componentDefinition.selectors,\n    viewQuery: componentDefinition.viewQuery || null,\n    features: componentDefinition.features as DirectiveDefFeature[] || null,\n    data: componentDefinition.data || {},\n    // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the\n    // next line. Also `None` should be 0 not 2.\n    encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n    id: 'c',\n    styles: componentDefinition.styles || EMPTY_ARRAY,\n    _: null as never,\n    setInput: null,\n    schemas: componentDefinition.schemas || null,\n    tView: null,\n  };\n  def._ = noSideEffects(() => {\n    const directiveTypes = componentDefinition.directives !;\n    const feature = componentDefinition.features;\n    const pipeTypes = componentDefinition.pipes !;\n    def.id += _renderCompCount++;\n    def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n    def.outputs = invertObject(componentDefinition.outputs),\n    feature && feature.forEach((fn) => fn(def));\n    def.directiveDefs = directiveTypes ?\n        () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n                  .map(extractDirectiveDef) :\n        null;\n    def.pipeDefs = pipeTypes ?\n        () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n        null;\n\n    // Add ngInjectableDef so components are reachable through the module injector by default\n    // (unless it has already been set by the @Injectable decorator). This is mostly to\n    // support injecting components in tests. In real application code, components should\n    // be retrieved through the node injector, so this isn't a problem.\n    if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {\n      (type as any)[NG_INJECTABLE_DEF] =\n          ÉµÉµdefineInjectable<T>({token: type, factory: componentDefinition.factory as() => T});\n    }\n  }) as never;\n\n  return def as never;\n}\n\n/**\n * @codeGenApi\n */\nexport function ÉµÉµsetComponentScope(\n    type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {\n  const def = (type.ngComponentDef as ComponentDef<any>);\n  def.directiveDefs = () => directives.map(extractDirectiveDef);\n  def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any>|ComponentDef<any> {\n  const def = getComponentDef(type) || getDirectiveDef(type);\n  if (ngDevMode && !def) {\n    throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n  }\n  return def !;\n}\n\nexport function extractPipeDef(type: Type<any>): PipeDef<any> {\n  const def = getPipeDef(type);\n  if (ngDevMode && !def) {\n    throw new Error(`'${type.name}' is not a 'PipeType'.`);\n  }\n  return def !;\n}\n\n/**\n * @codeGenApi\n */\nexport function ÉµÉµdefineNgModule<T>(def: {\n  /** Token representing the module. Used by DI. */\n  type: T;\n\n  /** List of components to bootstrap. */\n  bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n  /** List of components, directives, and pipes declared by this module. */\n  declarations?: Type<any>[] | (() => Type<any>[]);\n\n  /** List of modules or `ModuleWithProviders` imported by this module. */\n  imports?: Type<any>[] | (() => Type<any>[]);\n\n  /**\n   * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n   * module.\n   */\n  exports?: Type<any>[] | (() => Type<any>[]);\n\n  /** The set of schemas that declare elements to be allowed in the NgModule. */\n  schemas?: SchemaMetadata[] | null;\n\n  /** Unique ID for the module that is used with `getModuleFactory`. */\n  id?: string | null;\n}): never {\n  const res: NgModuleDef<T> = {\n    type: def.type,\n    bootstrap: def.bootstrap || EMPTY_ARRAY,\n    declarations: def.declarations || EMPTY_ARRAY,\n    imports: def.imports || EMPTY_ARRAY,\n    exports: def.exports || EMPTY_ARRAY,\n    transitiveCompileScopes: null,\n    schemas: def.schemas || null,\n    id: def.id || null,\n  };\n  return res as never;\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ÉµÉµsetNgModuleScope(type: any, scope: {\n  /** List of components, directives, and pipes declared by this module. */\n  declarations?: Type<any>[] | (() => Type<any>[]);\n\n  /** List of modules or `ModuleWithProviders` imported by this module. */\n  imports?: Type<any>[] | (() => Type<any>[]);\n\n  /**\n   * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n   * module.\n   */\n  exports?: Type<any>[] | (() => Type<any>[]);\n}): void {\n  return noSideEffects(() => {\n    const ngModuleDef = getNgModuleDef(type, true);\n    ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n    ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n    ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n  }) as never;\n}\n\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n *   @Input()\n *   propName1: string;\n *\n *   @Input('publicName2')\n *   declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n *   propName1: 'propName1',\n *   declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n *   minifiedPropName1: 'propName1',\n *   minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n *  'propName1': 'minifiedPropName1',\n *  'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n *  'propName1': 'propName1',\n *  'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject<T>(\n    obj?: {[P in keyof T]?: string | [string, string]},\n    secondary?: {[key: string]: string}): {[P in keyof T]: string} {\n  if (obj == null) return EMPTY_OBJ as any;\n  const newLookup: any = {};\n  for (const minifiedKey in obj) {\n    if (obj.hasOwnProperty(minifiedKey)) {\n      let publicName: string|[string, string] = obj[minifiedKey] !;\n      let declaredName = publicName;\n      if (Array.isArray(publicName)) {\n        declaredName = publicName[1];\n        publicName = publicName[0];\n      }\n      newLookup[publicName] = minifiedKey;\n      if (secondary) {\n        (secondary[publicName] = declaredName as string);\n      }\n    }\n  }\n  return newLookup;\n}\n\n/**\n * Create a base definition\n *\n * # Example\n * ```ts\n * class ShouldBeInherited {\n *   static ngBaseDef = ÉµÉµdefineBase({\n *      ...\n *   })\n * }\n * ```\n *\n * @param baseDefinition The base definition parameters\n *\n * @codeGenApi\n */\nexport function ÉµÉµdefineBase<T>(baseDefinition: {\n  /**\n   * A map of input names.\n   *\n   * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n   *\n   * Given:\n   * ```\n   * class MyComponent {\n   *   @Input()\n   *   publicInput1: string;\n   *\n   *   @Input('publicInput2')\n   *   declaredInput2: string;\n   * }\n   * ```\n   *\n   * is described as:\n   * ```\n   * {\n   *   publicInput1: 'publicInput1',\n   *   declaredInput2: ['declaredInput2', 'publicInput2'],\n   * }\n   * ```\n   *\n   * Which the minifier may translate to:\n   * ```\n   * {\n   *   minifiedPublicInput1: 'publicInput1',\n   *   minifiedDeclaredInput2: [ 'declaredInput2', 'publicInput2'],\n   * }\n   * ```\n   *\n   * This allows the render to re-construct the minified, public, and declared names\n   * of properties.\n   *\n   * NOTE:\n   *  - Because declared and public name are usually same we only generate the array\n   *    `['declared', 'public']` format when they differ.\n   *  - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n   *    inconsistent behavior in that it uses declared names rather than minified or public. For\n   *    this reason `NgOnChanges` will be deprecated and removed in future version and this\n   *    API will be simplified to be consistent with `outputs`.\n   */\n  inputs?: {[P in keyof T]?: string | [string, string]};\n\n  /**\n   * A map of output names.\n   *\n   * The format is in: `{[actualPropertyName: string]:string}`.\n   *\n   * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n   *\n   * This allows the render to re-construct the minified and non-minified names\n   * of properties.\n   */\n  outputs?: {[P in keyof T]?: string};\n\n  /**\n   * Function to create instances of content queries associated with a given directive.\n   */\n  contentQueries?: ContentQueriesFunction<T>| null;\n\n  /**\n   * Additional set of instructions specific to view query processing. This could be seen as a\n   * set of instructions to be inserted into the template function.\n   */\n  viewQuery?: ViewQueriesFunction<T>| null;\n\n  /**\n   * Function executed by the parent template to allow children to apply host bindings.\n   */\n  hostBindings?: HostBindingsFunction<T>;\n}): ÉµÉµBaseDef<T> {\n  const declaredInputs: {[P in keyof T]: string} = {} as any;\n  return {\n    inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),\n    declaredInputs: declaredInputs,\n    outputs: invertObject<T>(baseDefinition.outputs as any),\n    viewQuery: baseDefinition.viewQuery || null,\n    contentQueries: baseDefinition.contentQueries || null,\n    hostBindings: baseDefinition.hostBindings || null\n  };\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ngDirectiveDef = ÉµÉµdefineDirective({\n *     ...\n *   });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ÉµÉµdefineDirective = ÉµÉµdefineComponent as any as<T>(directiveDefinition: {\n  /**\n   * Directive type, needed to configure the injector.\n   */\n  type: Type<T>;\n\n  /** The selectors that will be used to match nodes to this directive. */\n  selectors: CssSelectorList;\n\n  /**\n   * Factory method used to create an instance of directive.\n   */\n  factory: FactoryFn<T>;\n\n  /**\n   * A map of input names.\n   *\n   * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n   *\n   * Given:\n   * ```\n   * class MyComponent {\n   *   @Input()\n   *   publicInput1: string;\n   *\n   *   @Input('publicInput2')\n   *   declaredInput2: string;\n   * }\n   * ```\n   *\n   * is described as:\n   * ```\n   * {\n   *   publicInput1: 'publicInput1',\n   *   declaredInput2: ['declaredInput2', 'publicInput2'],\n   * }\n   * ```\n   *\n   * Which the minifier may translate to:\n   * ```\n   * {\n   *   minifiedPublicInput1: 'publicInput1',\n   *   minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],\n   * }\n   * ```\n   *\n   * This allows the render to re-construct the minified, public, and declared names\n   * of properties.\n   *\n   * NOTE:\n   *  - Because declared and public name are usually same we only generate the array\n   *    `['declared', 'public']` format when they differ.\n   *  - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n   *    inconsistent behavior in that it uses declared names rather than minified or public. For\n   *    this reason `NgOnChanges` will be deprecated and removed in future version and this\n   *    API will be simplified to be consistent with `output`.\n   */\n  inputs?: {[P in keyof T]?: string | [string, string]};\n\n  /**\n   * A map of output names.\n   *\n   * The format is in: `{[actualPropertyName: string]:string}`.\n   *\n   * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n   *\n   * This allows the render to re-construct the minified and non-minified names\n   * of properties.\n   */\n  outputs?: {[P in keyof T]?: string};\n\n  /**\n   * A list of optional features to apply.\n   *\n   * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n   */\n  features?: DirectiveDefFeature[];\n\n  /**\n   * Function executed by the parent template to allow child directive to apply host bindings.\n   */\n  hostBindings?: HostBindingsFunction<T>;\n\n  /**\n   * Function to create instances of content queries associated with a given directive.\n   */\n  contentQueries?: ContentQueriesFunction<T>;\n\n  /**\n   * Additional set of instructions specific to view query processing. This could be seen as a\n   * set of instructions to be inserted into the template function.\n   */\n  viewQuery?: ViewQueriesFunction<T>| null;\n\n  /**\n   * Defines the name that can be used in the template to assign this directive to a variable.\n   *\n   * See: {@link Directive.exportAs}\n   */\n  exportAs?: string[];\n}) => never;\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n *   // Generated by Angular Template Compiler\n *   static ngPipeDef = definePipe({\n *     ...\n *   });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ÉµÉµdefinePipe<T>(pipeDef: {\n  /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n  name: string,\n\n  /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n  type: Type<T>,\n\n  /** A factory for creating a pipe instance. */\n  factory: FactoryFn<T>,\n\n  /** Whether the pipe is pure. */\n  pure?: boolean\n}): never {\n  return (<PipeDef<T>>{\n    name: pipeDef.name,\n    factory: pipeDef.factory,\n    pure: pipeDef.pure !== false,\n    onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n  }) as never;\n}\n\n/**\n * The following getter methods retrieve the definition form the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T>|null {\n  return (type as any)[NG_COMPONENT_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n  return (type as any)[NG_DIRECTIVE_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n  return (type as any)[NG_PIPE_DEF] || null;\n}\n\nexport function getBaseDef<T>(type: any): ÉµÉµBaseDef<T>|null {\n  return (type as any)[NG_BASE_DEF] || null;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T>|null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T>|null {\n  const ngModuleDef = (type as any)[NG_MODULE_DEF] || null;\n  if (!ngModuleDef && throwNotFound === true) {\n    throw new Error(`Type ${stringify(type)} does not have 'ngModuleDef' property.`);\n  }\n  return ngModuleDef;\n}\n\nexport function getNgLocaleIdDef(type: any): string|null {\n  return (type as any)[NG_LOCALE_ID_DEF] || null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentDef, DirectiveDef} from '..';\n\nimport {LContainer, TYPE} from './container';\nimport {TNode, TNodeFlags} from './node';\nimport {RNode} from './renderer';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n\n/**\n* True if `value` is `LView`.\n* @param value wrapped value of `RNode`, `LView`, `LContainer`\n*/\nexport function isLView(value: RNode | LView | LContainer | {} | null): value is LView {\n  return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLContainer(value: RNode | LView | LContainer | {} | null): value is LContainer {\n  return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n  return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponent(tNode: TNode): boolean {\n  return (tNode.flags & TNodeFlags.isComponent) === TNodeFlags.isComponent;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n  return (def as ComponentDef<T>).template !== null;\n}\n\nexport function isRootView(target: LView): boolean {\n  return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewRef} from '../../linker/view_ref';\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer';\n\nimport {HOST, LView, NEXT, PARENT, T_HOST} from './view';\n\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\nexport const ACTIVE_INDEX = 2;\n\n// PARENT and NEXT are indices 3 and 4\n// As we already have these constants in LView, we don't need to re-create them.\n\nexport const MOVED_VIEWS = 5;\n\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\n\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 9;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n  /**\n   * The host element of this LContainer.\n   *\n   * The host could be an LView if this container is on a component node.\n   * In that case, the component LView is its HOST.\n   */\n  readonly[HOST]: RElement|RComment|LView;\n\n  /**\n   * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n   * efficient way. The value is always set to `true`\n   */\n  [TYPE]: true;\n\n  /**\n   * The next active index in the views array to read or write to. This helps us\n   * keep track of where we are in the views array.\n   * In the case the LContainer is created for a ViewContainerRef,\n   * it is set to null to identify this scenario, as indices are \"absolute\" in that case,\n   * i.e. provided directly by the user of the ViewContainerRef API.\n   */\n  [ACTIVE_INDEX]: number;\n\n  /**\n   * Access to the parent view is necessary so we can propagate back\n   * up from inside a container to parent[NEXT].\n   */\n  [PARENT]: LView;\n\n  /**\n   * This allows us to jump from a container to a sibling container or component\n   * view with the same parent, so we can remove listeners efficiently.\n   */\n  [NEXT]: LView|LContainer|null;\n\n  /**\n   * A collection of views created based on the underlying `<ng-template>` element but inserted into\n   * a different `LContainer`. We need to track views created from a given declaration point since\n   * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n   */\n  [MOVED_VIEWS]: LView[]|null;\n\n  /**\n   * Pointer to the `TNode` which represents the host of the container.\n   */\n  [T_HOST]: TNode;\n\n  /** The comment element that serves as an anchor for this LContainer. */\n  readonly[NATIVE]:\n      RComment;  // TODO(misko): remove as this value can be gotten by unwrapping `[HOST]`\n\n  /**\n   * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n   *\n   * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n   */\n  [VIEW_REFS]: ViewRef[]|null;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\nimport {Injector} from '../../di/injector';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata';\nimport {Sanitizer} from '../../sanitization/security';\n\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n} from './i18n';\nimport {TElementNode, TNode, TViewNode} from './node';\nimport {PlayerHandler} from './player';\nimport {LQueries, TQueries} from './query';\nimport {RElement, Renderer3, RendererFactory3} from './renderer';\n\n\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const QUERIES = 5;\nexport const T_HOST = 6;\nexport const BINDING_INDEX = 7;\nexport const CLEANUP = 8;\nexport const CONTEXT = 9;\nexport const INJECTOR = 10;\nexport const RENDERER_FACTORY = 11;\nexport const RENDERER = 12;\nexport const SANITIZER = 13;\nexport const CHILD_HEAD = 14;\nexport const CHILD_TAIL = 15;\nexport const DECLARATION_VIEW = 16;\nexport const DECLARATION_LCONTAINER = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\n/** Size of LView's header. Necessary to adjust for it when setting slots.  */\nexport const HEADER_OFFSET = 19;\n\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n  '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView extends Array<any> {\n  /**\n   * The host node for this LView instance, if this is a component view.\n   * If this is an embedded view, HOST will be null.\n   */\n  [HOST]: RElement|null;\n\n  /**\n   * The static data for this view. We need a reference to this so we can easily walk up the\n   * node tree in DI and get the TView.data array associated with a node (where the\n   * directive defs are stored).\n   */\n  readonly[TVIEW]: TView;\n\n  /** Flags for this view. See LViewFlags for more info. */\n  [FLAGS]: LViewFlags;\n\n  /**\n   * This may store an {@link LView} or {@link LContainer}.\n   *\n   * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n   * LView. Without this, the render method would have to keep a stack of\n   * views as it is recursively rendering templates.\n   *\n   * `LContainer` - The current view is part of a container, and is an embedded view.\n   */\n  [PARENT]: LView|LContainer|null;\n\n  /**\n   *\n   * The next sibling LView or LContainer.\n   *\n   * Allows us to propagate between sibling view states that aren't in the same\n   * container. Embedded views already have a node.next, but it is only set for\n   * views in the same container. We need a way to link component views and views\n   * across containers as well.\n   */\n  [NEXT]: LView|LContainer|null;\n\n  /** Queries active for this view - nodes from a view are reported to those queries. */\n  [QUERIES]: LQueries|null;\n\n  /**\n   * Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.\n   *\n   * If `TViewNode`, this is an embedded view of a container. We need this to be able to\n   * efficiently find the `LViewNode` when inserting the view into an anchor.\n   *\n   * If `TElementNode`, this is the LView of a component.\n   *\n   * If null, this is the root view of an application (root component is in this view).\n   */\n  [T_HOST]: TViewNode|TElementNode|null;\n\n  /**\n   * The binding index we should access next.\n   *\n   * This is stored so that bindings can continue where they left off\n   * if a view is left midway through processing bindings (e.g. if there is\n   * a setter that creates an embedded view, like in ngIf).\n   */\n  [BINDING_INDEX]: number;\n\n  /**\n   * When a view is destroyed, listeners need to be released and outputs need to be\n   * unsubscribed. This context array stores both listener functions wrapped with\n   * their context and output subscription instances for a particular view.\n   *\n   * These change per LView instance, so they cannot be stored on TView. Instead,\n   * TView.cleanup saves an index to the necessary context in this array.\n   */\n  // TODO: flatten into LView[]\n  [CLEANUP]: any[]|null;\n\n  /**\n   * - For dynamic views, this is the context with which to render the template (e.g.\n   *   `NgForContext`), or `{}` if not defined explicitly.\n   * - For root view of the root component the context contains change detection data.\n   * - For non-root components, the context is the component instance,\n   * - For inline views, the context is null.\n   */\n  [CONTEXT]: {}|RootContext|null;\n\n  /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n  readonly[INJECTOR]: Injector|null;\n\n  /** Renderer to be used for this view. */\n  [RENDERER_FACTORY]: RendererFactory3;\n\n  /** Renderer to be used for this view. */\n  [RENDERER]: Renderer3;\n\n  /** An optional custom sanitizer. */\n  [SANITIZER]: Sanitizer|null;\n\n  /**\n   * Reference to the first LView or LContainer beneath this LView in\n   * the hierarchy.\n   *\n   * Necessary to store this so views can traverse through their nested views\n   * to remove listeners and call onDestroy callbacks.\n   */\n  [CHILD_HEAD]: LView|LContainer|null;\n\n  /**\n   * The last LView or LContainer beneath this LView in the hierarchy.\n   *\n   * The tail allows us to quickly add a new state to the end of the view list\n   * without having to propagate starting from the first child.\n   */\n  [CHILD_TAIL]: LView|LContainer|null;\n\n  /**\n   * View where this view's template was declared.\n   *\n   * Only applicable for dynamically created views. Will be null for inline/component views.\n   *\n   * The template for a dynamically created view may be declared in a different view than\n   * it is inserted. We already track the \"insertion view\" (view where the template was\n   * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n   * (view where the template was declared). Otherwise, we wouldn't be able to call the\n   * view's template function with the proper contexts. Context should be inherited from\n   * the declaration view tree, not the insertion view tree.\n   *\n   * Example (AppComponent template):\n   *\n   * <ng-template #foo></ng-template>       <-- declared here -->\n   * <some-comp [tpl]=\"foo\"></some-comp>    <-- inserted inside this component -->\n   *\n   * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n   * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n   * but the insertion view would be SomeComp. When we are removing views, we would want to\n   * traverse through the insertion view to clean up listeners. When we are calling the\n   * template function during change detection, we need the declaration view to get inherited\n   * context.\n   */\n  [DECLARATION_VIEW]: LView|null;\n\n  /**\n   * A declaration point of embedded views (ones instantiated based on the content of a\n   * <ng-template>), null for other types of views.\n   *\n   * We need to track all embedded views created from a given declaration point so we can prepare\n   * query matches in a proper order (query matches are ordered based on their declaration point and\n   * _not_ the insertion point).\n   */\n  [DECLARATION_LCONTAINER]: LContainer|null;\n\n  /**\n   * More flags for this view. See PreOrderHookFlags for more info.\n   */\n  [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n  /** The state of the init phase on the first 2 bits */\n  InitPhaseStateIncrementer = 0b00000000001,\n  InitPhaseStateMask = 0b00000000011,\n\n  /**\n   * Whether or not the view is in creationMode.\n   *\n   * This must be stored in the view rather than using `data` as a marker so that\n   * we can properly support embedded views. Otherwise, when exiting a child view\n   * back into the parent view, `data` will be defined and `creationMode` will be\n   * improperly reported as false.\n   */\n  CreationMode = 0b00000000100,\n\n  /**\n   * Whether or not this LView instance is on its first processing pass.\n   *\n   * An LView instance is considered to be on its \"first pass\" until it\n   * has completed one creation mode run and one update mode run. At this\n   * time, the flag is turned off.\n   */\n  FirstLViewPass = 0b00000001000,\n\n  /** Whether this view has default change detection strategy (checks always) or onPush */\n  CheckAlways = 0b00000010000,\n\n  /**\n   * Whether or not manual change detection is turned on for onPush components.\n   *\n   * This is a special mode that only marks components dirty in two cases:\n   * 1) There has been a change to an @Input property\n   * 2) `markDirty()` has been called manually by the user\n   *\n   * Note that in this mode, the firing of events does NOT mark components\n   * dirty automatically.\n   *\n   * Manual mode is turned off by default for backwards compatibility, as events\n   * automatically mark OnPush components dirty in View Engine.\n   *\n   * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on\n   */\n  ManualOnPush = 0b00000100000,\n\n  /** Whether or not this view is currently dirty (needing check) */\n  Dirty = 0b000001000000,\n\n  /** Whether or not this view is currently attached to change detection tree. */\n  Attached = 0b000010000000,\n\n  /** Whether or not this view is destroyed. */\n  Destroyed = 0b000100000000,\n\n  /** Whether or not this view is the root view */\n  IsRoot = 0b001000000000,\n\n  /**\n   * Index of the current init phase on last 22 bits\n   */\n  IndexWithinInitPhaseIncrementer = 0b010000000000,\n  IndexWithinInitPhaseShift = 10,\n  IndexWithinInitPhaseReset = 0b001111111111,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n  OnInitHooksToBeRun = 0b00,\n  AfterContentInitHooksToBeRun = 0b01,\n  AfterViewInitHooksToBeRun = 0b10,\n  InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[FLAGS_MORE]) */\nexport const enum PreOrderHookFlags {\n  /** The index of the next pre-order hook to be called in the hooks array, on the first 16\n     bits */\n  IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n  /**\n   * The number of init hooks that have already been called, on the last 16 bits\n   */\n  NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n  NumberOfInitHooksCalledShift = 16,\n  NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Set of instructions used to process host bindings efficiently.\n *\n * See VIEW_DATA.md for more information.\n */\nexport interface ExpandoInstructions extends Array<number|HostBindingsFunction<any>|null> {}\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n  /**\n   * ID for inline views to determine whether a view is the same as the previous view\n   * in a certain position. If it's not, we know the new view needs to be inserted\n   * and the one that exists needs to be removed (e.g. if/else statements)\n   *\n   * If this is -1, then this is a component view or a dynamically created view.\n   */\n  readonly id: number;\n\n  /**\n   * This is a blueprint used to generate LView instances for this TView. Copying this\n   * blueprint is faster than creating a new LView from scratch.\n   */\n  blueprint: LView;\n\n  /**\n   * The template function used to refresh the view of dynamically created views\n   * and components. Will be null for inline views.\n   */\n  template: ComponentTemplate<{}>|null;\n\n  /**\n   * A function containing query-related instructions.\n   */\n  viewQuery: ViewQueriesFunction<{}>|null;\n\n  /**\n   * Pointer to the host `TNode` (not part of this TView).\n   *\n   * If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.\n   * We need this pointer to be able to efficiently find this node when inserting the view\n   * into an anchor.\n   *\n   * If this is a `TElementNode`, this is the view of a root component. It has exactly one\n   * root TNode.\n   *\n   * If this is null, this is the view of a component that is not at root. We do not store\n   * the host TNodes for child component views because they can potentially have several\n   * different host TNodes, depending on where the component is being used. These host\n   * TNodes cannot be shared (due to different indices, etc).\n   */\n  node: TViewNode|TElementNode|null;\n\n  /** Whether or not this template has been processed. */\n  firstTemplatePass: boolean;\n\n  /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n  data: TData;\n\n  /**\n   * The binding start index is the index at which the data array\n   * starts to store bindings only. Saving this value ensures that we\n   * will begin reading bindings at the correct point in the array when\n   * we are in update mode.\n   */\n  bindingStartIndex: number;\n\n  /**\n   * The index where the \"expando\" section of `LView` begins. The expando\n   * section contains injectors, directive instances, and host binding values.\n   * Unlike the \"consts\" and \"vars\" sections of `LView`, the length of this\n   * section cannot be calculated at compile-time because directives are matched\n   * at runtime to preserve locality.\n   *\n   * We store this start index so we know where to start checking host bindings\n   * in `setHostBindings`.\n   */\n  expandoStartIndex: number;\n\n  /**\n   * Whether or not there are any static view queries tracked on this view.\n   *\n   * We store this so we know whether or not we should do a view query\n   * refresh after creation mode to collect static query results.\n   */\n  staticViewQueries: boolean;\n\n  /**\n   * Whether or not there are any static content queries tracked on this view.\n   *\n   * We store this so we know whether or not we should do a content query\n   * refresh after creation mode to collect static query results.\n   */\n  staticContentQueries: boolean;\n\n  /**\n   * A reference to the first child node located in the view.\n   */\n  firstChild: TNode|null;\n\n  /**\n   * Set of instructions used to process host bindings efficiently.\n   *\n   * See VIEW_DATA.md for more information.\n   */\n  expandoInstructions: ExpandoInstructions|null;\n\n  /**\n   * Full registry of directives and components that may be found in this view.\n   *\n   * It's necessary to keep a copy of the full def list on the TView so it's possible\n   * to render template functions without a host component.\n   */\n  directiveRegistry: DirectiveDefList|null;\n\n  /**\n   * Full registry of pipes that may be found in this view.\n   *\n   * The property is either an array of `PipeDefs`s or a function which returns the array of\n   * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n   *\n   * It's necessary to keep a copy of the full def list on the TView so it's possible\n   * to render template functions without a host component.\n   */\n  pipeRegistry: PipeDefList|null;\n\n  /**\n   * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n   * creation mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  preOrderHooks: HookData|null;\n\n  /**\n   * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  preOrderCheckHooks: HookData|null;\n\n  /**\n   * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n   * for this view in creation mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  contentHooks: HookData|null;\n\n  /**\n   * Array of ngAfterContentChecked hooks that should be executed for this view in update\n   * mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  contentCheckHooks: HookData|null;\n\n  /**\n   * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n   * this view in creation mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  viewHooks: HookData|null;\n\n  /**\n   * Array of ngAfterViewChecked hooks that should be executed for this view in\n   * update mode.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  viewCheckHooks: HookData|null;\n\n  /**\n   * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n   *\n   * Even indices: Directive index\n   * Odd indices: Hook function\n   */\n  destroyHooks: HookData|null;\n\n  /**\n   * When a view is destroyed, listeners need to be released and outputs need to be\n   * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n   * and output data (in chunks of 2) for a particular view. Combining the arrays\n   * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n   * separate for loops).\n   *\n   * If it's a native DOM listener or output subscription being stored:\n   * 1st index is: event name  `name = tView.cleanup[i+0]`\n   * 2nd index is: index of native element or a function that retrieves global target (window,\n   *               document or body) reference based on the native element:\n   *    `typeof idxOrTargetGetter === 'function'`: global target getter function\n   *    `typeof idxOrTargetGetter === 'number'`: index of native element\n   *\n   * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n   * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n   *    `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n   *    `typeof useCaptureOrIndx == 'number':\n   *         `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n   *         `useCaptureOrIndx <  0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n   *\n   * If it's an output subscription or query list destroy hook:\n   * 1st index is: output unsubscribe function / query list destroy function\n   * 2nd index is: index of function context in LView.cleanupInstances[]\n   *               `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n   */\n  cleanup: any[]|null;\n\n  /**\n   * A list of element indices for child components that will need to be\n   * refreshed when the current view has finished its check. These indices have\n   * already been adjusted for the HEADER_OFFSET.\n   *\n   */\n  components: number[]|null;\n\n  /**\n   * A collection of queries tracked in a given view.\n   */\n  queries: TQueries|null;\n\n  /**\n   * An array of indices pointing to directives with content queries alongside with the\n   * corresponding\n   * query index. Each entry in this array is a tuple of:\n   * - index of the first content query index declared by a given directive;\n   * - index of a directive.\n   *\n   * We are storing those indexes so we can refresh content queries as part of a view refresh\n   * process.\n   */\n  contentQueries: number[]|null;\n\n  /**\n   * Set of schemas that declare elements to be allowed inside the view.\n   */\n  schemas: SchemaMetadata[]|null;\n}\n\nexport const enum RootContextFlags {Empty = 0b00, DetectChanges = 0b01, FlushPlayers = 0b10}\n\n\n/**\n * RootContext contains information which is shared for all components which\n * were bootstrapped with {@link renderComponent}.\n */\nexport interface RootContext {\n  /**\n   * A function used for scheduling change detection in the future. Usually\n   * this is `requestAnimationFrame`.\n   */\n  scheduler: (workFn: () => void) => void;\n\n  /**\n   * A promise which is resolved when all components are considered clean (not dirty).\n   *\n   * This promise is overwritten every time a first call to {@link markDirty} is invoked.\n   */\n  clean: Promise<null>;\n\n  /**\n   * RootComponents - The components that were instantiated by the call to\n   * {@link renderComponent}.\n   */\n  components: {}[];\n\n  /**\n   * The player flushing handler to kick off all animations\n   */\n  playerHandler: PlayerHandler|null;\n\n  /**\n   * What render-related operations to run once a scheduler has been set\n   */\n  flags: RootContextFlags;\n}\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n *  - even indices are directive indices\n *  - odd indices are hook functions\n *\n * Special cases:\n *  - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = (number | (() => void))[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array.  Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView       |   TView.data\n *------------------------\n *  v0 value   |   'a'\n *  v1 value   |   'b'\n *  v2 value   |   id ï¿½ prefix ï¿½ suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData =\n    (TNode | PipeDef<any>| DirectiveDef<any>| ComponentDef<any>| number | Type<any>|\n     InjectionToken<any>| TI18n | I18nUpdateOpCodes | null | string)[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {TNode} from './interfaces/node';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {LView, TVIEW, TView} from './interfaces/view';\n\nexport function assertTNodeForLView(tNode: TNode, lView: LView) {\n  tNode.hasOwnProperty('tView_') && assertEqual(\n                                        (tNode as any as{tView_: TView}).tView_, lView[TVIEW],\n                                        'This TNode does not belong to this LView.');\n}\n\nexport function assertComponentType(\n    actual: any,\n    msg: string =\n        'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.') {\n  if (!getComponentDef(actual)) {\n    throwError(msg);\n  }\n}\n\nexport function assertNgModuleType(\n    actual: any,\n    msg: string =\n        'Type passed in is not NgModuleType, it does not have \\'ngModuleDef\\' property.') {\n  if (!getNgModuleDef(actual)) {\n    throwError(msg);\n  }\n}\n\nexport function assertPreviousIsParent(isParent: boolean) {\n  assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode | null) {\n  assertDefined(tNode, 'previousOrParentTNode should exist!');\n  assertDefined(tNode !.parent, 'previousOrParentTNode should have a parent');\n}\n\nexport function assertDataNext(lView: LView, index: number, arr?: any[]) {\n  if (arr == null) arr = lView;\n  assertEqual(\n      arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nexport function assertLContainerOrUndefined(value: any): void {\n  value && assertEqual(isLContainer(value), true, 'Expecting LContainer or undefined or null');\n}\n\nexport function assertLContainer(value: any): void {\n  assertDefined(value, 'LContainer must be defined');\n  assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): void {\n  value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any) {\n  assertDefined(value, 'LView must be defined');\n  assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nexport function assertFirstTemplatePass(tView: TView, errMessage: string) {\n  assertEqual(tView.firstTemplatePass, true, errMessage);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\nimport {InjectFlags} from '../../di/interface/injector';\nimport {Type} from '../../interface/type';\n\nimport {TElementNode} from './node';\nimport {LView, TData} from './view';\n\nexport const TNODE = 8;\nexport const PARENT_INJECTOR = 8;\nexport const INJECTOR_BLOOM_PARENT_SIZE = 9;\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport interface RelativeInjectorLocation { __brand__: 'RelativeInjectorLocationFlags'; }\n\nexport const enum RelativeInjectorLocationFlags {\n  InjectorIndexMask = 0b111111111111111,\n  ViewOffsetShift = 16,\n  NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR: RelativeInjectorLocation = -1 as any;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n *    // Cumulative bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Cumulative bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Cumulative bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Cumulative bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Cumulative bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Cumulative bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Cumulative bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Cumulative bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // We need to store a reference to the injector's parent so DI can keep looking up\n *    // the injector tree until it finds the dependency it's looking for.\n *    [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n *    // Shared node bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Shared node bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Shared node bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Shared node bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Shared node bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Shared node bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Shared node bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Shared node bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // Necessary to find directive indices for a particular node.\n *    [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n *  }\n */\n\n/**\n* Factory for creating instances of injectors in the NodeInjector.\n*\n* This factory is complicated by the fact that it can resolve `multi` factories as well.\n*\n* NOTE: Some of the fields are optional which means that this class has two hidden classes.\n* - One without `multi` support (most common)\n* - One with `multi` values, (rare).\n*\n* Since VMs can cache up to 4 inline hidden classes this is OK.\n*\n* - Single factory: Only `resolving` and `factory` is defined.\n* - `providers` factory: `componentProviders` is a number and `index = -1`.\n* - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n*/\nexport class NodeInjectorFactory {\n  /**\n   * The inject implementation to be activated when using the factory.\n   */\n  injectImpl: null|(<T>(token: Type<T>|InjectionToken<T>, flags?: InjectFlags) => T);\n\n  /**\n   * Marker set to true during factory invocation to see if we get into recursive loop.\n   * Recursive loop causes an error to be displayed.\n   */\n  resolving = false;\n\n  /**\n   * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n   */\n  canSeeViewProviders: boolean;\n\n  /**\n   * An array of factories to use in case of `multi` provider.\n   */\n  multi?: Array<() => any>;\n\n  /**\n   * Number of `multi`-providers which belong to the component.\n   *\n   * This is needed because when multiple components and directives declare the `multi` provider\n   * they have to be concatenated in the correct order.\n   *\n   * Example:\n   *\n   * If we have a component and directive active an a single element as declared here\n   * ```\n   * component:\n   *   provides: [ {provide: String, useValue: 'component', multi: true} ],\n   *   viewProvides: [ {provide: String, useValue: 'componentView', multi: true} ],\n   *\n   * directive:\n   *   provides: [ {provide: String, useValue: 'directive', multi: true} ],\n   * ```\n   *\n   * Then the expected results are:\n   *\n   * ```\n   * providers: ['component', 'directive']\n   * viewProviders: ['component', 'componentView', 'directive']\n   * ```\n   *\n   * The way to think about it is that the `viewProviders` have been inserted after the component\n   * but before the directives, which is why we need to know how many `multi`s have been declared by\n   * the component.\n   */\n  componentProviders?: number;\n\n  /**\n   * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n   * See `providerFactory`.\n   */\n  index?: number;\n\n  /**\n   * Because the same `multi` provider can be declared in `provides` and `viewProvides` it is\n   * possible for `viewProvides` to shadow the `provides`. For this reason we store the\n   * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n   *\n   * Example:\n   *\n   * Given:\n   * ```\n   * provides: [ {provide: String, useValue: 'all', multi: true} ],\n   * viewProvides: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n   * ```\n   *\n   * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n   * of view injection. We further have to make sure that the shared instances (in our case\n   * `all`) are the exact same instance in both the content as well as the view injection. (We\n   * have to make sure that we don't double instantiate.) For this reason the `viewProvides`\n   * `Factory` has a pointer to the shadowed `provides` factory so that it can instantiate the\n   * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n   * ['all', 'viewOnly']`).\n   */\n  providerFactory?: NodeInjectorFactory|null;\n\n\n  constructor(\n      /**\n       * Factory to invoke in order to create a new instance.\n       */\n      public factory:\n          (this: NodeInjectorFactory, _: undefined,\n           /**\n            * array where injectables tokens are stored. This is used in\n            * case of an error reporting to produce friendlier errors.\n            */\n           tData: TData,\n           /**\n            * array where existing instances of injectables are stored. This is used in case\n            * of multi shadow is needed. See `multi` field documentation.\n            */\n           lView: LView,\n           /**\n            * The TNode of the same element injector.\n            */\n           tNode: TElementNode) => any,\n      /**\n       * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n       */\n      isViewProvider: boolean, injectImplementation: null|\n      (<T>(token: Type<T>|InjectionToken<T>, flags?: InjectFlags) => T)) {\n    this.canSeeViewProviders = isViewProvider;\n    this.injectImpl = injectImplementation;\n  }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n  // See: https://jsperf.com/instanceof-vs-getprototypeof\n  return obj !== null && typeof obj == 'object' &&\n      Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual} from '../util/assert';\nimport {TNode, TNodeType} from './interfaces/node';\n\nexport function assertNodeType(tNode: TNode, type: TNodeType) {\n  assertDefined(tNode, 'should be called with a TNode');\n  assertEqual(tNode.type, type, `should be a ${typeName(type)}`);\n}\n\nexport function assertNodeOfPossibleTypes(tNode: TNode, ...types: TNodeType[]) {\n  assertDefined(tNode, 'should be called with a TNode');\n  const found = types.some(type => tNode.type === type);\n  assertEqual(\n      found, true,\n      `Should be one of ${types.map(typeName).join(', ')} but got ${typeName(tNode.type)}`);\n}\n\nfunction typeName(type: TNodeType): string {\n  if (type == TNodeType.Projection) return 'Projection';\n  if (type == TNodeType.Container) return 'Container';\n  if (type == TNodeType.View) return 'View';\n  if (type == TNodeType.Element) return 'Element';\n  if (type == TNodeType.ElementContainer) return 'ElementContainer';\n  return '<unknown>';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../util/assert';\n\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\n\n\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n * @param nodeIndex The index of the node to which the directive is attached\n * @param initialPreOrderHooksLength the number of pre-order hooks already registered before the\n * current process, used to know if the node index has to be added to the array. If it is -1,\n * the node index is never added.\n * @param initialPreOrderCheckHooksLength same as previous for pre-order check hooks\n */\nexport function registerPreOrderHooks(\n    directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView, nodeIndex: number,\n    initialPreOrderHooksLength: number, initialPreOrderCheckHooksLength: number): void {\n  ngDevMode &&\n      assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n\n  const {onChanges, onInit, doCheck} = directiveDef;\n  if (initialPreOrderHooksLength >= 0 &&\n      (!tView.preOrderHooks || initialPreOrderHooksLength === tView.preOrderHooks.length) &&\n      (onChanges || onInit || doCheck)) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(nodeIndex);\n  }\n\n  if (initialPreOrderCheckHooksLength >= 0 &&\n      (!tView.preOrderCheckHooks ||\n       initialPreOrderCheckHooksLength === tView.preOrderCheckHooks.length) &&\n      (onChanges || doCheck)) {\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(nodeIndex);\n  }\n\n  if (onChanges) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges);\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges);\n  }\n\n  if (onInit) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit);\n  }\n\n  if (doCheck) {\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck);\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck);\n  }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n  if (tView.firstTemplatePass) {\n    // It's necessary to loop through the directives at elementEnd() (rather than processing in\n    // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n    // hooks for projected components and directives must be called *before* their hosts.\n    for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n      const directiveDef = tView.data[i] as DirectiveDef<any>;\n      if (directiveDef.afterContentInit) {\n        (tView.contentHooks || (tView.contentHooks = [])).push(-i, directiveDef.afterContentInit);\n      }\n\n      if (directiveDef.afterContentChecked) {\n        (tView.contentHooks || (tView.contentHooks = [])).push(i, directiveDef.afterContentChecked);\n        (tView.contentCheckHooks || (tView.contentCheckHooks = [\n         ])).push(i, directiveDef.afterContentChecked);\n      }\n\n      if (directiveDef.afterViewInit) {\n        (tView.viewHooks || (tView.viewHooks = [])).push(-i, directiveDef.afterViewInit);\n      }\n\n      if (directiveDef.afterViewChecked) {\n        (tView.viewHooks || (tView.viewHooks = [])).push(i, directiveDef.afterViewChecked);\n        (tView.viewCheckHooks || (tView.viewCheckHooks = [\n         ])).push(i, directiveDef.afterViewChecked);\n      }\n\n      if (directiveDef.onDestroy != null) {\n        (tView.destroyHooks || (tView.destroyHooks = [])).push(i, directiveDef.onDestroy);\n      }\n    }\n  }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the  array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n/**\n * Executes necessary hooks at the start of executing a template.\n *\n * Executes hooks that are to be run during the initialization of a directive such\n * as `onChanges`, `onInit`, and `doCheck`.\n *\n * @param lView The current view\n * @param tView Static data for the view containing the hooks to be executed\n * @param checkNoChangesMode Whether or not we're in checkNoChanges mode.\n * @param @param currentNodeIndex 2 cases depending the the value:\n * - undefined: execute hooks only from the saved index until the end of the array (pre-order case,\n * when flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executePreOrderHooks(\n    currentView: LView, tView: TView, checkNoChangesMode: boolean,\n    currentNodeIndex: number | undefined): void {\n  if (!checkNoChangesMode) {\n    executeHooks(\n        currentView, tView.preOrderHooks, tView.preOrderCheckHooks, checkNoChangesMode,\n        InitPhaseState.OnInitHooksToBeRun,\n        currentNodeIndex !== undefined ? currentNodeIndex : null);\n  }\n}\n\n/**\n * Executes hooks against the given `LView` based off of whether or not\n * This is the first pass.\n *\n * @param currentView The view instance data to run the hooks against\n * @param firstPassHooks An array of hooks to run if we're in the first view pass\n * @param checkHooks An Array of hooks to run if we're not in the first view pass.\n * @param checkNoChangesMode Whether or not we're in no changes mode.\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeHooks(\n    currentView: LView, firstPassHooks: HookData | null, checkHooks: HookData | null,\n    checkNoChangesMode: boolean, initPhaseState: InitPhaseState,\n    currentNodeIndex: number | null | undefined): void {\n  if (checkNoChangesMode) return;\n  const hooksToCall = (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState ?\n      firstPassHooks :\n      checkHooks;\n  if (hooksToCall) {\n    callHooks(currentView, hooksToCall, initPhaseState, currentNodeIndex);\n  }\n  // The init phase state must be always checked here as it may have been recursively updated\n  if (currentNodeIndex == null &&\n      (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState &&\n      initPhaseState !== InitPhaseState.InitPhaseCompleted) {\n    currentView[FLAGS] &= LViewFlags.IndexWithinInitPhaseReset;\n    currentView[FLAGS] += LViewFlags.InitPhaseStateIncrementer;\n  }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n    currentView: LView, arr: HookData, initPhase: InitPhaseState,\n    currentNodeIndex: number | null | undefined): void {\n  const startIndex = currentNodeIndex !== undefined ?\n      (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n      0;\n  const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n  let lastNodeIndexFound = 0;\n  for (let i = startIndex; i < arr.length; i++) {\n    const hook = arr[i + 1] as() => void;\n    if (typeof hook === 'number') {\n      lastNodeIndexFound = arr[i] as number;\n      if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n        break;\n      }\n    } else {\n      const isInitHook = arr[i] < 0;\n      if (isInitHook)\n        currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n      if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n        callHook(currentView, initPhase, arr, i);\n        currentView[PREORDER_HOOK_FLAGS] =\n            (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) + i +\n            2;\n      }\n      i++;\n    }\n  }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n  const isInitHook = arr[i] < 0;\n  const hook = arr[i + 1] as() => void;\n  const directiveIndex = isInitHook ? -arr[i] : arr[i] as number;\n  const directive = currentView[directiveIndex];\n  if (isInitHook) {\n    const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n    // The init phase state must be always checked here as it may have been recursively\n    // updated\n    if (indexWithintInitPhase <\n            (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n        (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n      currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n      hook.call(directive);\n    }\n  } else {\n    hook.call(directive);\n  }\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\n\n/**\n * --------\n *\n * // TODO(matsko): add updateMask info\n *\n * This file contains all state-based logic for styling in Angular.\n *\n * Styling in Angular is evaluated with a series of styling-specific\n * template instructions which are called one after another each time\n * change detection occurs in Angular.\n *\n * Styling makes use of various temporary, state-based variables between\n * instructions so that it can better cache and optimize its values.\n * These values are usually populated and cleared when an element is\n * exited in change detection (once all the instructions are run for\n * that element).\n *\n * There are, however, situations where the state-based values\n * need to be stored and used at a later point. This ONLY occurs when\n * there are template-level as well as host-binding-level styling\n * instructions on the same element. The example below shows exactly\n * what could be:\n *\n * ```html\n * <!-- two sources of styling: the template and the directive -->\n * <div [style.width]=\"width\" dir-that-sets-height></div>\n * ```\n *\n * If and when this situation occurs, the current styling state is\n * stored in a storage map value and then later accessed once the\n * host bindings are evaluated. Once styling for the current element\n * is over then the map entry will be cleared.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\nlet _stylingState: StylingState|null = null;\nconst _stateStorage = new Map<any, StylingState>();\n\n// this value is not used outside this file and is only here\n// as a caching check for when the element changes.\nlet _stylingElement: any = null;\n\n/**\n * Used as a state reference for update values between style/class binding instructions.\n */\nexport interface StylingState {\n  classesBitMask: number;\n  classesIndex: number;\n  stylesBitMask: number;\n  stylesIndex: number;\n}\n\nexport const STYLING_INDEX_START_VALUE = 1;\nexport const BIT_MASK_START_VALUE = 0;\n\nexport function getStylingState(element: any, readFromMap?: boolean): StylingState {\n  if (!_stylingElement || element !== _stylingElement) {\n    _stylingElement = element;\n    if (readFromMap) {\n      _stylingState = _stateStorage.get(element) || null;\n      ngDevMode && ngDevMode.stylingReadPersistedState++;\n    }\n    _stylingState = _stylingState || {\n      classesBitMask: BIT_MASK_START_VALUE,\n      classesIndex: STYLING_INDEX_START_VALUE,\n      stylesBitMask: BIT_MASK_START_VALUE,\n      stylesIndex: STYLING_INDEX_START_VALUE,\n    };\n  }\n  return _stylingState !;\n}\n\nexport function resetStylingState() {\n  _stylingState = null;\n  _stylingElement = null;\n}\n\nexport function storeStylingState(element: any, state: StylingState) {\n  ngDevMode && ngDevMode.stylingWritePersistedState++;\n  _stateStorage.set(element, state);\n}\n\nexport function deleteStylingStateFromStorage(element: any) {\n  _stateStorage.delete(element);\n}\n\nexport function resetAllStylingState() {\n  resetStylingState();\n  _stateStorage.clear();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {RNode} from './renderer';\nimport {LView} from './view';\n\n/**\n * This property will be monkey-patched on elements, components and directives\n */\nexport const MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nexport interface LContext {\n  /**\n   * The component's parent view data.\n   */\n  lView: LView;\n\n  /**\n   * The index instance of the node.\n   */\n  nodeIndex: number;\n\n  /**\n   * The instance of the DOM node that is attached to the lNode.\n   */\n  native: RNode;\n\n  /**\n   * The instance of the Component node.\n   */\n  component: {}|null|undefined;\n\n  /**\n   * The list of active directives that exist on this element.\n   */\n  directives: any[]|null|undefined;\n\n  /**\n   * The map of local references (local reference name => element or directive instance) that exist\n   * on this element.\n   */\n  localRefs: {[key: string]: any}|null|undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StyleSanitizeFn} from '../sanitization/style_sanitizer';\nimport {assertDefined} from '../util/assert';\n\nimport {assertLViewOrUndefined} from './assert';\nimport {executeHooks} from './hooks';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {TElementNode, TNode, TViewNode} from './interfaces/node';\nimport {BINDING_INDEX, CONTEXT, DECLARATION_VIEW, FLAGS, InitPhaseState, LView, LViewFlags, OpaqueViewState, TVIEW} from './interfaces/view';\nimport {resetAllStylingState, resetStylingState} from './styling_next/state';\nimport {resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can than attach `LView` to only those elements.\n */\nlet elementDepthCount !: number;\n\nexport function getElementDepthCount() {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n  elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n  elementDepthCount--;\n}\n\nlet currentDirectiveDef: DirectiveDef<any>|ComponentDef<any>|null = null;\n\nexport function getCurrentDirectiveDef(): DirectiveDef<any>|ComponentDef<any>|null {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return currentDirectiveDef;\n}\n\nexport function setCurrentDirectiveDef(def: DirectiveDef<any>| ComponentDef<any>| null): void {\n  currentDirectiveDef = def;\n}\n\n/**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` than we need to prevent the runtime form matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n * </div>\n * ```\n */\nlet bindingsEnabled !: boolean;\n\nexport function getBindingsEnabled(): boolean {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return bindingsEnabled;\n}\n\n\n/**\n * Enables directive matching on elements.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ÉµÉµdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ÉµÉµenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ÉµÉµenableBindings(): void {\n  bindingsEnabled = true;\n}\n\n/**\n * Disables directive matching on element.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ÉµÉµdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ÉµÉµenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ÉµÉµdisableBindings(): void {\n  bindingsEnabled = false;\n}\n\nexport function getLView(): LView {\n  return lView;\n}\n\n/**\n * Used as the starting directive id value.\n *\n * All subsequent directives are incremented from this value onwards.\n * The reason why this value is `1` instead of `0` is because the `0`\n * value is reserved for the template.\n */\nconst MIN_DIRECTIVE_ID = 1;\n\nlet activeDirectiveId = MIN_DIRECTIVE_ID;\n\n/**\n * Position depth (with respect from leaf to root) in a directive sub-class inheritance chain.\n */\nlet activeDirectiveSuperClassDepthPosition = 0;\n\n/**\n * Total count of how many directives are a part of an inheritance chain.\n *\n * When directives are sub-classed (extended) from one to another, Angular\n * needs to keep track of exactly how many were encountered so it can accurately\n * generate the next directive id (once the next directive id is visited).\n * Normally the next directive id just a single incremented value from the\n * previous one, however, if the previous directive is a part of an inheritance\n * chain (a series of sub-classed directives) then the incremented value must\n * also take into account the total amount of sub-classed values.\n *\n * Note that this value resets back to zero once the next directive is\n * visited (when `incrementActiveDirectiveId` or `setActiveHostElement`\n * is called).\n */\nlet activeDirectiveSuperClassHeight = 0;\n\n/**\n * Sets the active directive host element and resets the directive id value\n * (when the provided elementIndex value has changed).\n *\n * @param elementIndex the element index value for the host element where\n *                     the directive/component instance lives\n */\nexport function setActiveHostElement(elementIndex: number | null = null) {\n  if (_selectedIndex !== elementIndex) {\n    setSelectedIndex(elementIndex == null ? -1 : elementIndex);\n    activeDirectiveId = elementIndex == null ? 0 : MIN_DIRECTIVE_ID;\n    activeDirectiveSuperClassDepthPosition = 0;\n    activeDirectiveSuperClassHeight = 0;\n  }\n}\n\n/**\n * Returns the current id value of the current directive.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (id == 1)\n * dirTwo->hostBindings() (id == 2)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function getActiveDirectiveId() {\n  return activeDirectiveId;\n}\n\n/**\n * Increments the current directive id value.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (index = 1)\n * // increment\n * dirTwo->hostBindings() (index = 2)\n *\n * Depending on whether or not a previous directive had any inherited\n * directives present, that value will be incremented in addition\n * to the id jumping up by one.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function incrementActiveDirectiveId() {\n  activeDirectiveId += 1 + activeDirectiveSuperClassHeight;\n\n  // because we are dealing with a new directive this\n  // means we have exited out of the inheritance chain\n  activeDirectiveSuperClassDepthPosition = 0;\n  activeDirectiveSuperClassHeight = 0;\n}\n\n/**\n * Set the current super class (reverse inheritance) position depth for a directive.\n *\n * For example we have two directives: Child and Other (but Child is a sub-class of Parent)\n * <div child-dir other-dir></div>\n *\n * // increment\n * parentInstance->hostBindings() (depth = 1)\n * // decrement\n * childInstance->hostBindings() (depth = 0)\n * otherInstance->hostBindings() (depth = 0 b/c it's a different directive)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function adjustActiveDirectiveSuperClassDepthPosition(delta: number) {\n  activeDirectiveSuperClassDepthPosition += delta;\n\n  // we keep track of the height value so that when the next directive is visited\n  // then Angular knows to generate a new directive id value which has taken into\n  // account how many sub-class directives were a part of the previous directive.\n  activeDirectiveSuperClassHeight =\n      Math.max(activeDirectiveSuperClassHeight, activeDirectiveSuperClassDepthPosition);\n}\n\n/**\n * Returns he current depth of the super/sub class inheritance chain.\n *\n * This will return how many inherited directive/component classes\n * exist in the current chain.\n *\n * ```typescript\n * @Directive({ selector: '[super-dir]' })\n * class SuperDir {}\n *\n * @Directive({ selector: '[sub-dir]' })\n * class SubDir extends SuperDir {}\n *\n * // if `<div sub-dir>` is used then the super class height is `1`\n * // if `<div super-dir>` is used then the super class height is `0`\n * ```\n */\nexport function getActiveDirectiveSuperClassHeight() {\n  return activeDirectiveSuperClassHeight;\n}\n\n/**\n * Returns the current super class (reverse inheritance) depth for a directive.\n *\n * This is designed to help instruction code distinguish different hostBindings\n * calls from each other when a directive has extended from another directive.\n * Normally using the directive id value is enough, but with the case\n * of parent/sub-class directive inheritance more information is required.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function getActiveDirectiveSuperClassDepth() {\n  return activeDirectiveSuperClassDepthPosition;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\nexport function ÉµÉµrestoreView(viewToRestore: OpaqueViewState) {\n  contextLView = viewToRestore as any as LView;\n}\n\n/** Used to set the parent property when nodes are created and track query results. */\nlet previousOrParentTNode: TNode;\n\nexport function getPreviousOrParentTNode(): TNode {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return previousOrParentTNode;\n}\n\nexport function setPreviousOrParentTNode(tNode: TNode, _isParent: boolean) {\n  previousOrParentTNode = tNode;\n  isParent = _isParent;\n}\n\nexport function setTNodeAndViewData(tNode: TNode, view: LView) {\n  ngDevMode && assertLViewOrUndefined(view);\n  previousOrParentTNode = tNode;\n  lView = view;\n}\n\n/**\n * If `isParent` is:\n *  - `true`: then `previousOrParentTNode` points to a parent node.\n *  - `false`: then `previousOrParentTNode` points to previous node (sibling).\n */\nlet isParent: boolean;\n\nexport function getIsParent(): boolean {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return isParent;\n}\n\nexport function setIsNotParent(): void {\n  isParent = false;\n}\nexport function setIsParent(): void {\n  isParent = true;\n}\n\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView = lView): boolean {\n  return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nlet lView: LView;\n\n/**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\nlet contextLView: LView = null !;\n\nexport function getContextLView(): LView {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return contextLView;\n}\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nlet checkNoChangesMode = false;\n\nexport function getCheckNoChangesMode(): boolean {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return checkNoChangesMode;\n}\n\nexport function setCheckNoChangesMode(mode: boolean): void {\n  checkNoChangesMode = mode;\n}\n\n/**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\nlet bindingRootIndex: number = -1;\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n  return bindingRootIndex;\n}\n\nexport function setBindingRoot(value: number) {\n  bindingRootIndex = value;\n}\n\n/**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\nlet currentQueryIndex: number = 0;\n\nexport function getCurrentQueryIndex(): number {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n  currentQueryIndex = value;\n}\n\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nexport function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView {\n  ngDevMode && assertLViewOrUndefined(newView);\n  const oldView = lView;\n  if (newView) {\n    const tView = newView[TVIEW];\n    bindingRootIndex = tView.bindingStartIndex;\n  }\n\n  previousOrParentTNode = hostTNode !;\n  isParent = true;\n\n  lView = contextLView = newView;\n  return oldView;\n}\n\nexport function nextContextImpl<T = any>(level: number = 1): T {\n  contextLView = walkUpViews(level, contextLView !);\n  return contextLView[CONTEXT] as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n  while (nestingLevel > 0) {\n    ngDevMode && assertDefined(\n                     currentView[DECLARATION_VIEW],\n                     'Declaration view should be defined if nesting level is greater than 0.');\n    currentView = currentView[DECLARATION_VIEW] !;\n    nestingLevel--;\n  }\n  return currentView;\n}\n\n/**\n * Resets the application state.\n */\nexport function resetComponentState() {\n  isParent = false;\n  previousOrParentTNode = null !;\n  elementDepthCount = 0;\n  bindingsEnabled = true;\n  setCurrentStyleSanitizer(null);\n  resetAllStylingState();\n}\n\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n *\n * @param newView New state to become active\n * @param safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.\n * This is not always the case (for example, the application may have crashed and `leaveView` is\n * being executed while unwinding the call stack).\n */\nexport function leaveView(newView: LView, safeToRunHooks: boolean): void {\n  const tView = lView[TVIEW];\n  if (isCreationMode(lView)) {\n    lView[FLAGS] &= ~LViewFlags.CreationMode;\n  } else {\n    try {\n      resetPreOrderHookFlags(lView);\n      safeToRunHooks && executeHooks(\n                            lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode,\n                            InitPhaseState.AfterViewInitHooksToBeRun, undefined);\n    } finally {\n      // Views are clean and in update mode after being checked, so these bits are cleared\n      lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n      lView[BINDING_INDEX] = tView.bindingStartIndex;\n    }\n  }\n  enterView(newView, null);\n}\n\nlet _selectedIndex = -1;\n\n/**\n * Gets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n  return _selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function setSelectedIndex(index: number) {\n  _selectedIndex = index;\n\n  // we have now jumped to another element\n  // therefore the state is stale\n  resetStylingState();\n}\n\n\nlet _currentNamespace: string|null = null;\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ÉµÉµnamespaceSVG() {\n  _currentNamespace = 'http://www.w3.org/2000/svg';\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ÉµÉµnamespaceMathML() {\n  _currentNamespace = 'http://www.w3.org/1998/MathML/';\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ÉµÉµnamespaceHTML() {\n  namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n  _currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n  return _currentNamespace;\n}\n\nlet _currentSanitizer: StyleSanitizeFn|null;\nexport function setCurrentStyleSanitizer(sanitizer: StyleSanitizeFn | null) {\n  _currentSanitizer = sanitizer;\n}\n\nexport function getCurrentStyleSanitizer() {\n  return _currentSanitizer;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDataInRange, assertDefined, assertDomNode, assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from '../interfaces/context';\nimport {TNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, TData, TVIEW} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n *   - `typeof value[TYPE] === 'object'` => `LView`\n *      - This happens when we have a component at a given location\n *   - `typeof value[TYPE] === true` => `LContainer`\n *      - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapRNode(value: RNode | LView | LContainer): RNode {\n  while (Array.isArray(value)) {\n    value = value[HOST] as any;\n  }\n  return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLView(value: RNode | LView | LContainer): LView|null {\n  while (Array.isArray(value)) {\n    // This check is same as `isLView()` but we don't call at as we don't want to call\n    // `Array.isArray()` twice and give JITer more work for inlining.\n    if (typeof value[TYPE] === 'object') return value as LView;\n    value = value[HOST] as any;\n  }\n  return null;\n}\n\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLContainer(value: RNode | LView | LContainer): LContainer|null {\n  while (Array.isArray(value)) {\n    // This check is same as `isLContainer()` but we don't call at as we don't want to call\n    // `Array.isArray()` twice and give JITer more work for inlining.\n    if (value[TYPE] === true) return value as LContainer;\n    value = value[HOST] as any;\n  }\n  return null;\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n  return unwrapRNode(lView[index + HEADER_OFFSET]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  ngDevMode && assertDataInRange(lView, tNode.index);\n  const node: RNode = unwrapRNode(lView[tNode.index]);\n  ngDevMode && assertDomNode(node);\n  return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode, lView: LView): RNode|null {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  const index = tNode.index;\n  const node: RNode|null = index == -1 ? null : unwrapRNode(lView[index]);\n  ngDevMode && node !== null && assertDomNode(node);\n  return node;\n}\n\n\n/**\n * A helper function that returns `true` if a given `TNode` has any matching directives.\n */\nexport function hasDirectives(tNode: TNode): boolean {\n  return tNode.directiveEnd > tNode.directiveStart;\n}\n\nexport function getTNode(index: number, view: LView): TNode {\n  ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n  ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');\n  return view[TVIEW].data[index + HEADER_OFFSET] as TNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function loadInternal<T>(view: LView | TData, index: number): T {\n  ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);\n  return view[index + HEADER_OFFSET];\n}\n\nexport function getComponentViewByIndex(nodeIndex: number, hostView: LView): LView {\n  // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n  const slotValue = hostView[nodeIndex];\n  const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n  return lView;\n}\n\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView|LContext|null {\n  ngDevMode && assertDefined(target, 'Target expected');\n  return target[MONKEY_PATCH_KEY_NAME];\n}\n\nexport function readPatchedLView(target: any): LView|null {\n  const value = readPatchedData(target);\n  if (value) {\n    return Array.isArray(value) ? value : (value as LContext).lView;\n  }\n  return null;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n  return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n  return isLContainer(view[PARENT]);\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n  lView[PREORDER_HOOK_FLAGS] = 0;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from '../../util/global';\nimport {RElement} from '../interfaces/renderer';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Returns whether the values are different from a change detection stand point.\n *\n * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.\n */\nexport function isDifferent(a: any, b: any): boolean {\n  // NaN is the only value that is not equal to itself so the first\n  // test checks if both a and b are not NaN\n  return !(a !== a && b !== b) && a !== b;\n}\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n */\nexport function renderStringify(value: any): string {\n  if (typeof value === 'string') return value;\n  if (value == null) return '';\n  return '' + value;\n}\n\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n  if (typeof value === 'function') return value.name || value.toString();\n  if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n    return value.type.name || value.type.toString();\n  }\n\n  return renderStringify(value);\n}\n\n\nexport const defaultScheduler =\n    (() =>\n         (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame ||  // browser only\n          setTimeout  // everything else\n          ).bind(global))();\n\n/**\n *\n * @codeGenApi\n */\nexport function ÉµÉµresolveWindow(element: RElement & {ownerDocument: Document}) {\n  return {name: 'window', target: element.ownerDocument.defaultView};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ÉµÉµresolveDocument(element: RElement & {ownerDocument: Document}) {\n  return {name: 'document', target: element.ownerDocument};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ÉµÉµresolveBody(element: RElement & {ownerDocument: Document}) {\n  return {name: 'body', target: element.ownerDocument.body};\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `ï¿½`;\n\n/**\n * Determines whether or not the given string is a property metadata string.\n * See storeBindingMetadata().\n */\nexport function isPropMetadataString(str: string): boolean {\n  return str.indexOf(INTERPOLATION_DELIMITER) >= 0;\n}\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T | (() => T)): T {\n  if (value instanceof Function) {\n    return value();\n  } else {\n    return value;\n  }\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {TNode, TNodeFlags} from '../interfaces/node';\nimport {isDifferent} from '../util/misc_utils';\n\nimport {StylingMapArray, StylingMapArrayIndex, TStylingConfigFlags, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\n\nconst MAP_BASED_ENTRY_PROP_NAME = '--MAP--';\nconst TEMPLATE_DIRECTIVE_INDEX = 0;\n\n/**\n * Creates a new instance of the `TStylingContext`.\n *\n * The `TStylingContext` is used as a manifest of all style or all class bindings on\n * an element. Because it is a T-level data-structure, it is only created once per\n * tNode for styles and for classes. This function allocates a new instance of a\n * `TStylingContext` with the initial values (see `interfaces.ts` for more info).\n */\nexport function allocTStylingContext(initialStyling?: StylingMapArray | null): TStylingContext {\n  // because map-based bindings deal with a dynamic set of values, there\n  // is no way to know ahead of time whether or not sanitization is required.\n  // For this reason the configuration will always mark sanitization as active\n  // (this means that when map-based values are applied then sanitization will\n  // be checked against each property).\n  const mapBasedConfig = TStylingContextPropConfigFlags.SanitizationRequired;\n  return [\n    initialStyling || [''],  // empty initial-styling map value\n    TStylingConfigFlags.Initial,\n    TEMPLATE_DIRECTIVE_INDEX,\n    mapBasedConfig,\n    0,\n    MAP_BASED_ENTRY_PROP_NAME,\n  ];\n}\n\n/**\n * Sets the provided directive as the last directive index in the provided `TStylingContext`.\n *\n * Styling in Angular can be applied from the template as well as multiple sources of\n * host bindings. This means that each binding function (the template function or the\n * hostBindings functions) will generate styling instructions as well as a styling\n * apply function (i.e. `stylingApply()`). Because host bindings functions and the\n * template function are independent from one another this means that the styling apply\n * function will be called multiple times. By tracking the last directive index (which\n * is what happens in this function) the styling algorithm knows exactly when to flush\n * styling (which is when the last styling apply function is executed).\n */\nexport function updateLastDirectiveIndex(\n    context: TStylingContext, lastDirectiveIndex: number): void {\n  if (lastDirectiveIndex === TEMPLATE_DIRECTIVE_INDEX) {\n    const currentValue = context[TStylingContextIndex.LastDirectiveIndexPosition];\n    if (currentValue > TEMPLATE_DIRECTIVE_INDEX) {\n      // This means that a directive or two contained a host bindings function, but\n      // now the template function also contains styling. When this combination of sources\n      // comes up then we need to tell the context to store the state between updates\n      // (because host bindings evaluation happens after template binding evaluation).\n      markContextToPersistState(context);\n    }\n  } else {\n    context[TStylingContextIndex.LastDirectiveIndexPosition] = lastDirectiveIndex;\n  }\n}\n\nfunction getConfig(context: TStylingContext) {\n  return context[TStylingContextIndex.ConfigPosition];\n}\n\nexport function setConfig(context: TStylingContext, value: number) {\n  context[TStylingContextIndex.ConfigPosition] = value;\n}\n\nexport function getProp(context: TStylingContext, index: number) {\n  return context[index + TStylingContextIndex.PropOffset] as string;\n}\n\nfunction getPropConfig(context: TStylingContext, index: number): number {\n  return (context[index + TStylingContextIndex.ConfigAndGuardOffset] as number) &\n      TStylingContextPropConfigFlags.Mask;\n}\n\nexport function isSanitizationRequired(context: TStylingContext, index: number) {\n  return (getPropConfig(context, index) & TStylingContextPropConfigFlags.SanitizationRequired) > 0;\n}\n\nexport function getGuardMask(context: TStylingContext, index: number) {\n  const configGuardValue = context[index + TStylingContextIndex.ConfigAndGuardOffset] as number;\n  return configGuardValue >> TStylingContextPropConfigFlags.TotalBits;\n}\n\nexport function setGuardMask(context: TStylingContext, index: number, maskValue: number) {\n  const config = getPropConfig(context, index);\n  const guardMask = maskValue << TStylingContextPropConfigFlags.TotalBits;\n  context[index + TStylingContextIndex.ConfigAndGuardOffset] = config | guardMask;\n}\n\nexport function getValuesCount(context: TStylingContext, index: number) {\n  return context[index + TStylingContextIndex.ValuesCountOffset] as number;\n}\n\nexport function getBindingValue(context: TStylingContext, index: number, offset: number) {\n  return context[index + TStylingContextIndex.BindingsStartOffset + offset] as number | string;\n}\n\nexport function getDefaultValue(context: TStylingContext, index: number): string|boolean|null {\n  const valuesCount = getValuesCount(context, index);\n  return context[index + TStylingContextIndex.BindingsStartOffset + valuesCount - 1] as string |\n      boolean | null;\n}\n\n/**\n * Temporary function which determines whether or not a context is\n * allowed to be flushed based on the provided directive index.\n */\nexport function allowStylingFlush(context: TStylingContext | null, index: number) {\n  return (context && index === context[TStylingContextIndex.LastDirectiveIndexPosition]) ? true :\n                                                                                           false;\n}\n\nexport function lockContext(context: TStylingContext) {\n  setConfig(context, getConfig(context) | TStylingConfigFlags.Locked);\n}\n\nexport function isContextLocked(context: TStylingContext): boolean {\n  return (getConfig(context) & TStylingConfigFlags.Locked) > 0;\n}\n\nexport function stateIsPersisted(context: TStylingContext): boolean {\n  return (getConfig(context) & TStylingConfigFlags.PersistStateValues) > 0;\n}\n\nexport function markContextToPersistState(context: TStylingContext) {\n  setConfig(context, getConfig(context) | TStylingConfigFlags.PersistStateValues);\n}\n\nexport function getPropValuesStartPosition(context: TStylingContext) {\n  return TStylingContextIndex.MapBindingsBindingsStartPosition +\n      context[TStylingContextIndex.MapBindingsValuesCountPosition];\n}\n\nexport function isMapBased(prop: string) {\n  return prop === MAP_BASED_ENTRY_PROP_NAME;\n}\n\nexport function hasValueChanged(\n    a: StylingMapArray | number | String | string | null | boolean | undefined | {},\n    b: StylingMapArray | number | String | string | null | boolean | undefined | {}): boolean {\n  let compareValueA = Array.isArray(a) ? a[StylingMapArrayIndex.RawValuePosition] : a;\n  let compareValueB = Array.isArray(b) ? b[StylingMapArrayIndex.RawValuePosition] : b;\n\n  // these are special cases for String based values (which are created as artifacts\n  // when sanitization is bypassed on a particular value)\n  if (compareValueA instanceof String) {\n    compareValueA = compareValueA.toString();\n  }\n  if (compareValueB instanceof String) {\n    compareValueB = compareValueB.toString();\n  }\n  return isDifferent(compareValueA, compareValueB);\n}\n\n/**\n * Determines whether the provided styling value is truthy or falsy.\n */\nexport function isStylingValueDefined(value: any) {\n  // the reason why null is compared against is because\n  // a CSS class value that is set to `false` must be\n  // respected (otherwise it would be treated as falsy).\n  // Empty string values are because developers usually\n  // set a value to an empty string to remove it.\n  return value != null && value !== '';\n}\n\nexport function concatString(a: string, b: string, separator = ' '): string {\n  return a + ((b.length && a.length) ? separator : '') + b;\n}\n\nexport function hyphenate(value: string): string {\n  return value.replace(/[a-z][A-Z]/g, v => v.charAt(0) + '-' + v.charAt(1)).toLowerCase();\n}\n\n/**\n * Returns an instance of `StylingMapArray`.\n *\n * This function is designed to find an instance of `StylingMapArray` in case it is stored\n * inside of an instance of `TStylingContext`. When a styling context is created it\n * will copy over an initial styling values from the tNode (which are stored as a\n * `StylingMapArray` on the `tNode.classes` or `tNode.styles` values).\n */\nexport function getStylingMapArray(value: TStylingContext | StylingMapArray | null):\n    StylingMapArray|null {\n  return isStylingContext(value) ?\n      (value as TStylingContext)[TStylingContextIndex.InitialStylingValuePosition] :\n      value;\n}\n\nexport function isStylingContext(value: TStylingContext | StylingMapArray | null): boolean {\n  // the StylingMapArray is in the format of [initial, prop, string, prop, string]\n  // and this is the defining value to distinguish between arrays\n  return Array.isArray(value) &&\n      value.length >= TStylingContextIndex.MapBindingsBindingsStartPosition &&\n      typeof value[1] !== 'string';\n}\n\nexport function getInitialStylingValue(context: TStylingContext | StylingMapArray | null): string {\n  const map = getStylingMapArray(context);\n  return map && (map[StylingMapArrayIndex.RawValuePosition] as string | null) || '';\n}\n\nexport function hasClassInput(tNode: TNode) {\n  return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\nexport function hasStyleInput(tNode: TNode) {\n  return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\n}\n\nexport function getMapProp(map: StylingMapArray, index: number): string {\n  return map[index + StylingMapArrayIndex.PropOffset] as string;\n}\n\nexport function setMapValue(\n    map: StylingMapArray, index: number, value: string | boolean | null): void {\n  map[index + StylingMapArrayIndex.ValueOffset] = value;\n}\n\nexport function getMapValue(map: StylingMapArray, index: number): string|null {\n  return map[index + StylingMapArrayIndex.ValueOffset] as string | null;\n}\n\nexport function forceClassesAsString(classes: string | {[key: string]: any} | null | undefined):\n    string {\n  if (classes && typeof classes !== 'string') {\n    classes = Object.keys(classes).join(' ');\n  }\n  return (classes as string) || '';\n}\n\nexport function forceStylesAsString(styles: {[key: string]: any} | null | undefined): string {\n  let str = '';\n  if (styles) {\n    const props = Object.keys(styles);\n    for (let i = 0; i < props.length; i++) {\n      const prop = props[i];\n      str = concatString(str, `${prop}:${styles[prop]}`, ';');\n    }\n  }\n  return str;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * The goal here is to make sure that the browser DOM API is the Renderer.\n * We do this by defining a subset of DOM API to be the renderer and than\n * use that time for rendering.\n *\n * At runtime we can then use the DOM api directly, in server or web-worker\n * it will be easy to implement such API.\n */\n\nimport {RendererStyleFlags2, RendererType2} from '../../render/api';\n\n\n// TODO: cleanup once the code is merged in angular/angular\nexport enum RendererStyleFlags3 {\n  Important = 1 << 0,\n  DashCase = 1 << 1\n}\n\nexport type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;\n\nexport type GlobalTargetName = 'document' | 'window' | 'body';\n\nexport type GlobalTargetResolver = (element: any) => {\n  name: GlobalTargetName, target: EventTarget\n};\n\n/**\n * Object Oriented style of API needed to create elements and text nodes.\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade\n * (reducing payload size).\n * */\nexport interface ObjectOrientedRenderer3 {\n  createComment(data: string): RComment;\n  createElement(tagName: string): RElement;\n  createElementNS(namespace: string, tagName: string): RElement;\n  createTextNode(data: string): RText;\n\n  querySelector(selectors: string): RElement|null;\n}\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nexport function isProceduralRenderer(renderer: ProceduralRenderer3 | ObjectOrientedRenderer3):\n    renderer is ProceduralRenderer3 {\n  return !!((renderer as any).listen);\n}\n\n/**\n * Procedural style of API needed to create elements and text nodes.\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the\n * facade that enables element manipulation. This also facilitates backwards compatibility\n * with Renderer2.\n */\nexport interface ProceduralRenderer3 {\n  destroy(): void;\n  createComment(value: string): RComment;\n  createElement(name: string, namespace?: string|null): RElement;\n  createText(value: string): RText;\n  /**\n   * This property is allowed to be null / undefined,\n   * in which case the view engine won't call it.\n   * This is used as a performance optimization for production mode.\n   */\n  destroyNode?: ((node: RNode) => void)|null;\n  appendChild(parent: RElement, newChild: RNode): void;\n  insertBefore(parent: RNode, newChild: RNode, refChild: RNode|null): void;\n  removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;\n  selectRootElement(selectorOrNode: string|any): RElement;\n\n  parentNode(node: RNode): RElement|null;\n  nextSibling(node: RNode): RNode|null;\n\n  setAttribute(el: RElement, name: string, value: string, namespace?: string|null): void;\n  removeAttribute(el: RElement, name: string, namespace?: string|null): void;\n  addClass(el: RElement, name: string): void;\n  removeClass(el: RElement, name: string): void;\n  setStyle(\n      el: RElement, style: string, value: any,\n      flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n  removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n  setProperty(el: RElement, name: string, value: any): void;\n  setValue(node: RText|RComment, value: string): void;\n\n  // TODO(misko): Deprecate in favor of addEventListener/removeEventListener\n  listen(\n      target: GlobalTargetName|RNode, eventName: string,\n      callback: (event: any) => boolean | void): () => void;\n}\n\nexport interface RendererFactory3 {\n  createRenderer(hostElement: RElement|null, rendererType: RendererType2|null): Renderer3;\n  begin?(): void;\n  end?(): void;\n}\n\nexport const domRendererFactory3: RendererFactory3 = {\n  createRenderer: (hostElement: RElement | null, rendererType: RendererType2 | null):\n                      Renderer3 => { return document;}\n};\n\n/** Subset of API needed for appending elements and text nodes. */\nexport interface RNode {\n  /**\n   * Returns the parent Element, Document, or DocumentFragment\n   */\n  parentNode: RNode|null;\n\n\n  /**\n   * Returns the parent Element if there is one\n   */\n  parentElement: RElement|null;\n\n  /**\n   * Gets the Node immediately following this one in the parent's childNodes\n   */\n  nextSibling: RNode|null;\n\n  /**\n   * Removes a child from the current node and returns the removed node\n   * @param oldChild the child node to remove\n   */\n  removeChild(oldChild: RNode): RNode;\n\n  /**\n   * Insert a child node.\n   *\n   * Used exclusively for adding View root nodes into ViewAnchor location.\n   */\n  insertBefore(newChild: RNode, refChild: RNode|null, isViewRoot: boolean): void;\n\n  /**\n   * Append a child node.\n   *\n   * Used exclusively for building up DOM which are static (ie not View roots)\n   */\n  appendChild(newChild: RNode): RNode;\n}\n\n/**\n * Subset of API needed for writing attributes, properties, and setting up\n * listeners on Element.\n */\nexport interface RElement extends RNode {\n  style: RCssStyleDeclaration;\n  classList: RDomTokenList;\n  className: string;\n  setAttribute(name: string, value: string): void;\n  removeAttribute(name: string): void;\n  setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\n  addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\n  removeEventListener(type: string, listener?: EventListener, options?: boolean): void;\n\n  setProperty?(name: string, value: any): void;\n}\n\nexport interface RCssStyleDeclaration {\n  removeProperty(propertyName: string): string;\n  setProperty(propertyName: string, value: string|null, priority?: string): void;\n}\n\nexport interface RDomTokenList {\n  add(token: string): void;\n  remove(token: string): void;\n}\n\nexport interface RText extends RNode { textContent: string|null; }\n\nexport interface RComment extends RNode { textContent: string|null; }\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {ProceduralRenderer3, RElement, isProceduralRenderer} from '../interfaces/renderer';\nimport {RENDERER} from '../interfaces/view';\nimport {getLView} from '../state';\n\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n *  attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n *  attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n *\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(native: RElement, attrs: TAttributes): number {\n  const renderer = getLView()[RENDERER];\n  const isProc = isProceduralRenderer(renderer);\n\n  let i = 0;\n  while (i < attrs.length) {\n    const value = attrs[i];\n    if (typeof value === 'number') {\n      // only namespaces are supported. Other value types (such as style/class\n      // entries) are not supported in this function.\n      if (value !== AttributeMarker.NamespaceURI) {\n        break;\n      }\n\n      // we just landed on the marker value ... therefore\n      // we should skip to the next entry\n      i++;\n\n      const namespaceURI = attrs[i++] as string;\n      const attrName = attrs[i++] as string;\n      const attrVal = attrs[i++] as string;\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      isProc ?\n          (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal, namespaceURI) :\n          native.setAttributeNS(namespaceURI, attrName, attrVal);\n    } else {\n      // attrName is string;\n      const attrName = value as string;\n      const attrVal = attrs[++i];\n      // Standard attributes\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      if (isAnimationProp(attrName)) {\n        if (isProc) {\n          (renderer as ProceduralRenderer3).setProperty(native, attrName, attrVal);\n        }\n      } else {\n        isProc ?\n            (renderer as ProceduralRenderer3)\n                .setAttribute(native, attrName as string, attrVal as string) :\n            native.setAttribute(attrName as string, attrVal as string);\n      }\n      i++;\n    }\n  }\n\n  // another piece of code may iterate over the same attributes array. Therefore\n  // it may be helpful to return the exact spot where the attributes array exited\n  // whether by running into an unsupported marker or if all the static values were\n  // iterated over.\n  return i;\n}\n\n\nexport function attrsStylingIndexOf(attrs: TAttributes, startIndex: number): number {\n  for (let i = startIndex; i < attrs.length; i++) {\n    const val = attrs[i];\n    if (val === AttributeMarker.Classes || val === AttributeMarker.Styles) {\n      return i;\n    }\n  }\n  return -1;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string | AttributeMarker | CssSelector) {\n  return marker === AttributeMarker.Bindings || marker === AttributeMarker.Template ||\n      marker === AttributeMarker.I18n;\n}\n\nexport const ANIMATION_PROP_PREFIX = '@';\n\nexport function isAnimationProp(name: string): boolean {\n  return name[0] === ANIMATION_PROP_PREFIX;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, LView} from '../interfaces/view';\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n  return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n  return (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n  return (parentLocation as any as number) >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n  let viewOffset = getParentInjectorViewOffset(location);\n  let parentView = startView;\n  // For most cases, the parent injector can be found on the host node (e.g. for component\n  // or container), but we must keep the loop here to support the rarer case of deeply nested\n  // <ng-template> tags or inline views, where the parent injector might live many views\n  // above the child injector.\n  while (viewOffset > 0) {\n    parentView = parentView[DECLARATION_VIEW] !;\n    viewOffset--;\n  }\n  return parentView;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {TNodeType} from '../interfaces/node';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {CONTEXT, DECLARATION_VIEW, FLAGS, LView, LViewFlags, PARENT, RootContext, T_HOST} from '../interfaces/view';\n\nimport {readPatchedLView} from './view_utils';\n\n\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView|null {\n  ngDevMode && assertLView(lView);\n  const parent = lView[PARENT];\n  return isLContainer(parent) ? parent[PARENT] ! : parent;\n}\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView(componentOrLView: LView | {}): LView {\n  ngDevMode && assertDefined(componentOrLView, 'component');\n  let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView) !;\n  while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n    lView = getLViewParent(lView) !;\n  }\n  ngDevMode && assertLView(lView);\n  return lView;\n}\n\n/**\n * Given an `LView`, find the closest declaration view which is not an embedded view.\n *\n * This method searches for the `LView` associated with the component which declared the `LView`.\n *\n * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise\n * it walks the declaration parents until it finds a component view (non-embedded-view.)\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nexport function findComponentView(lView: LView): LView {\n  let rootTNode = lView[T_HOST];\n  while (rootTNode !== null && rootTNode.type === TNodeType.View) {\n    ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');\n    lView = lView[DECLARATION_VIEW] !;\n    rootTNode = lView[T_HOST];\n  }\n  ngDevMode && assertLView(lView);\n  return lView;\n}\n\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext(viewOrComponent: LView | {}): RootContext {\n  const rootView = getRootView(viewOrComponent);\n  ngDevMode &&\n      assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n  return rootView[CONTEXT] as RootContext;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/injector_compatibility';\nimport {getInjectableDef, getInjectorDef} from '../di/interface/defs';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual} from '../util/assert';\n\nimport {getComponentDef, getDirectiveDef, getPipeDef} from './definition';\nimport {NG_ELEMENT_ID} from './fields';\nimport {DirectiveDef, FactoryFn} from './interfaces/definition';\nimport {NO_PARENT_INJECTOR, NodeInjectorFactory, PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags, TNODE, isFactory} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {isComponent, isComponentDef} from './interfaces/type_checks';\nimport {DECLARATION_VIEW, INJECTOR, LView, TData, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {getLView, getPreviousOrParentTNode, setTNodeAndViewData} from './state';\nimport {getInitialStylingValue} from './styling_next/util';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\n\n\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n *   constructor(public value: String) {}\n * }\n *\n * @Component({\n *   providers: [\n *     MyService,\n *     {provide: String, value: 'providers' }\n *   ]\n *   viewProviders: [\n *     {provide: String, value: 'viewProviders'}\n *   ]\n * })\n * class MyComponent {\n *   constructor(myService: MyService, value: String) {\n *     // We expect that Component can see into `viewProviders`.\n *     expect(value).toEqual('viewProviders');\n *     // `MyService` was not declared in `viewProviders` hence it can't see it.\n *     expect(myService.value).toEqual('providers');\n *   }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nfunction setIncludeViewProviders(v: boolean): boolean {\n  const oldValue = includeViewProviders;\n  includeViewProviders = v;\n  return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n    injectorIndex: number, tView: TView, type: Type<any>| InjectionToken<any>| string): void {\n  ngDevMode && assertEqual(tView.firstTemplatePass, true, 'expected firstTemplatePass to be true');\n  let id: number|undefined =\n      typeof type !== 'string' ? (type as any)[NG_ELEMENT_ID] : type.charCodeAt(0) || 0;\n\n  // Set a unique ID on the directive type, so if something tries to inject the directive,\n  // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n  if (id == null) {\n    id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n  }\n\n  // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n  // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n  const bloomBit = id & BLOOM_MASK;\n\n  // Create a mask that targets the specific bit associated with the directive.\n  // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n  // to bit positions 0 - 31 in a 32 bit integer.\n  const mask = 1 << bloomBit;\n\n  // Use the raw bloomBit number to determine which bloom filter bucket we should check\n  // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n  const b7 = bloomBit & 0x80;\n  const b6 = bloomBit & 0x40;\n  const b5 = bloomBit & 0x20;\n  const tData = tView.data as number[];\n\n  if (b7) {\n    b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :\n         (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));\n  } else {\n    b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :\n         (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));\n  }\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param hostView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n    tNode: TElementNode | TContainerNode | TElementContainerNode, hostView: LView): number {\n  const existingInjectorIndex = getInjectorIndex(tNode, hostView);\n  if (existingInjectorIndex !== -1) {\n    return existingInjectorIndex;\n  }\n\n  const tView = hostView[TVIEW];\n  if (tView.firstTemplatePass) {\n    tNode.injectorIndex = hostView.length;\n    insertBloom(tView.data, tNode);  // foundation for node bloom\n    insertBloom(hostView, null);     // foundation for cumulative bloom\n    insertBloom(tView.blueprint, null);\n\n    ngDevMode && assertEqual(\n                     tNode.flags === 0 || tNode.flags === TNodeFlags.isComponent, true,\n                     'expected tNode.flags to not be initialized');\n  }\n\n  const parentLoc = getParentInjectorLocation(tNode, hostView);\n  const parentIndex = getParentInjectorIndex(parentLoc);\n  const parentLView = getParentInjectorView(parentLoc, hostView);\n\n  const injectorIndex = tNode.injectorIndex;\n\n  // If a parent injector can't be found, its location is set to -1.\n  // In that case, we don't need to set up a cumulative bloom\n  if (hasParentInjector(parentLoc)) {\n    const parentData = parentLView[TVIEW].data as any;\n    // Creates a cumulative bloom filter that merges the parent's bloom filter\n    // and its own cumulative bloom (which contains tokens for all ancestors)\n    for (let i = 0; i < 8; i++) {\n      hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n    }\n  }\n\n  hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;\n  return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode | null): void {\n  arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\n\nexport function getInjectorIndex(tNode: TNode, hostView: LView): number {\n  if (tNode.injectorIndex === -1 ||\n      // If the injector index is the same as its parent's injector index, then the index has been\n      // copied down from the parent node. No injector has been created yet on this node.\n      (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n      // After the first template pass, the injector index might exist but the parent values\n      // might not have been calculated yet for this instance\n      hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {\n    return -1;\n  } else {\n    return tNode.injectorIndex;\n  }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`\n */\nexport function getParentInjectorLocation(tNode: TNode, view: LView): RelativeInjectorLocation {\n  if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n    return tNode.parent.injectorIndex as any;  // ViewOffset is 0\n  }\n\n  // For most cases, the parent injector index can be found on the host node (e.g. for component\n  // or container), so this loop will be skipped, but we must keep the loop here to support\n  // the rarer case of deeply nested <ng-template> tags or inline views.\n  let hostTNode = view[T_HOST];\n  let viewOffset = 1;\n  while (hostTNode && hostTNode.injectorIndex === -1) {\n    view = view[DECLARATION_VIEW] !;\n    hostTNode = view ? view[T_HOST] : null;\n    viewOffset++;\n  }\n\n  return hostTNode ?\n      hostTNode.injectorIndex | (viewOffset << RelativeInjectorLocationFlags.ViewOffsetShift) :\n      -1 as any;\n}\n\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n    injectorIndex: number, tView: TView, token: InjectionToken<any>| Type<any>): void {\n  bloomAdd(injectorIndex, tView, token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n *  at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n *   constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n *   factory: () => new MyComponent(injectAttribute('title'))\n *   ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string|null {\n  ngDevMode && assertNodeOfPossibleTypes(\n                   tNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n  ngDevMode && assertDefined(tNode, 'expecting tNode');\n  if (attrNameToInject === 'class') {\n    return getInitialStylingValue(tNode.classes);\n  }\n  if (attrNameToInject === 'style') {\n    return getInitialStylingValue(tNode.styles);\n  }\n\n  const attrs = tNode.attrs;\n  if (attrs) {\n    const attrsLength = attrs.length;\n    let i = 0;\n    while (i < attrsLength) {\n      const value = attrs[i];\n\n      // If we hit a `Bindings` or `Template` marker then we are done.\n      if (isNameOnlyAttributeMarker(value)) break;\n\n      // Skip namespaced attributes\n      if (value === AttributeMarker.NamespaceURI) {\n        // we skip the next two values\n        // as namespaced attributes looks like\n        // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n        // 'existValue', ...]\n        i = i + 2;\n      } else if (typeof value === 'number') {\n        // Skip to the first value of the marked attribute.\n        i++;\n        while (i < attrsLength && typeof attrs[i] === 'string') {\n          i++;\n        }\n      } else if (value === attrNameToInject) {\n        return attrs[i + 1] as string;\n      } else {\n        i = i + 2;\n      }\n    }\n  }\n  return null;\n}\n\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. Negative values are reserved for special objects.\n *   - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n    tNode: TElementNode | TContainerNode | TElementContainerNode | null, lView: LView,\n    token: Type<T>| InjectionToken<T>, flags: InjectFlags = InjectFlags.Default,\n    notFoundValue?: any): T|null {\n  if (tNode) {\n    const bloomHash = bloomHashBitOrFactory(token);\n    // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n    // so just call the factory function to create it.\n    if (typeof bloomHash === 'function') {\n      const savePreviousOrParentTNode = getPreviousOrParentTNode();\n      const saveLView = getLView();\n      setTNodeAndViewData(tNode, lView);\n      try {\n        const value = bloomHash();\n        if (value == null && !(flags & InjectFlags.Optional)) {\n          throw new Error(`No provider for ${stringifyForError(token)}!`);\n        } else {\n          return value;\n        }\n      } finally {\n        setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n      }\n    } else if (typeof bloomHash == 'number') {\n      if (bloomHash === -1) {\n        // `-1` is a special value used to identify `Injector` types.\n        return new NodeInjector(tNode, lView) as any;\n      }\n      // If the token has a bloom hash, then it is a token which could be in NodeInjector.\n\n      // A reference to the previous injector TView that was found while climbing the element\n      // injector tree. This is used to know if viewProviders can be accessed on the current\n      // injector.\n      let previousTView: TView|null = null;\n      let injectorIndex = getInjectorIndex(tNode, lView);\n      let parentLocation: RelativeInjectorLocation = NO_PARENT_INJECTOR;\n      let hostTElementNode: TNode|null =\n          flags & InjectFlags.Host ? findComponentView(lView)[T_HOST] : null;\n\n      // If we should skip this injector, or if there is no injector on this node, start by\n      // searching\n      // the parent injector.\n      if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n        parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n                                                lView[injectorIndex + PARENT_INJECTOR];\n\n        if (!shouldSearchParent(flags, false)) {\n          injectorIndex = -1;\n        } else {\n          previousTView = lView[TVIEW];\n          injectorIndex = getParentInjectorIndex(parentLocation);\n          lView = getParentInjectorView(parentLocation, lView);\n        }\n      }\n\n      // Traverse up the injector tree until we find a potential match or until we know there\n      // *isn't* a match.\n      while (injectorIndex !== -1) {\n        parentLocation = lView[injectorIndex + PARENT_INJECTOR];\n\n        // Check the current injector. If it matches, see if it contains token.\n        const tView = lView[TVIEW];\n        if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n          // At this point, we have an injector which *may* contain the token, so we step through\n          // the providers and directives associated with the injector's corresponding node to get\n          // the instance.\n          const instance: T|null = searchTokensOnInjector<T>(\n              injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n          if (instance !== NOT_FOUND) {\n            return instance;\n          }\n        }\n        if (shouldSearchParent(\n                flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&\n            bloomHasToken(bloomHash, injectorIndex, lView)) {\n          // The def wasn't found anywhere on this node, so it was a false positive.\n          // Traverse up the tree and continue searching.\n          previousTView = tView;\n          injectorIndex = getParentInjectorIndex(parentLocation);\n          lView = getParentInjectorView(parentLocation, lView);\n        } else {\n          // If we should not search parent OR If the ancestor bloom filter value does not have the\n          // bit corresponding to the directive we can give up on traversing up to find the specific\n          // injector.\n          injectorIndex = -1;\n        }\n      }\n    }\n  }\n\n  if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n    // This must be set or the NullInjector will throw for optional deps\n    notFoundValue = null;\n  }\n\n  if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n    const moduleInjector = lView[INJECTOR];\n    // switch to `injectInjectorOnly` implementation for module injector, since module injector\n    // should not have access to Component/Directive DI scope (that may happen through\n    // `directiveInject` implementation)\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      if (moduleInjector) {\n        return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n      } else {\n        return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n      }\n    } finally {\n      setInjectImplementation(previousInjectImplementation);\n    }\n  }\n  if (flags & InjectFlags.Optional) {\n    return notFoundValue;\n  } else {\n    throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);\n  }\n}\n\nconst NOT_FOUND = {};\n\nfunction searchTokensOnInjector<T>(\n    injectorIndex: number, lView: LView, token: Type<T>| InjectionToken<T>,\n    previousTView: TView | null, flags: InjectFlags, hostTElementNode: TNode | null) {\n  const currentTView = lView[TVIEW];\n  const tNode = currentTView.data[injectorIndex + TNODE] as TNode;\n  // First, we need to determine if view providers can be accessed by the starting element.\n  // There are two possibities\n  const canAccessViewProviders = previousTView == null ?\n      // 1) This is the first invocation `previousTView == null` which means that we are at the\n      // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n      // to look into the ViewProviders is if:\n      // - we are on a component\n      // - AND the injector set `includeViewProviders` to true (implying that the token can see\n      // ViewProviders because it is the Component or a Service which itself was declared in\n      // ViewProviders)\n      (isComponent(tNode) && includeViewProviders) :\n      // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n      // In such a case we are only allowed to look into the ViewProviders if:\n      // - We just crossed from child View to Parent View `previousTView != currentTView`\n      // - AND the parent TNode is an Element.\n      // This means that we just came from the Component's View and therefore are allowed to see\n      // into the ViewProviders.\n      (previousTView != currentTView && (tNode.type === TNodeType.Element));\n\n  // This special case happens when there is a @host on the inject and when we are searching\n  // on the host element node.\n  const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n\n  const injectableIdx = locateDirectiveOrProvider(\n      tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n  if (injectableIdx !== null) {\n    return getNodeInjectable(currentTView.data, lView, injectableIdx, tNode as TElementNode);\n  } else {\n    return NOT_FOUND;\n  }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n    tNode: TNode, tView: TView, token: Type<T>| InjectionToken<T>, canAccessViewProviders: boolean,\n    isHostSpecialCase: boolean | number): number|null {\n  const nodeProviderIndexes = tNode.providerIndexes;\n  const tInjectables = tView.data;\n\n  const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n  const directivesStart = tNode.directiveStart;\n  const directiveEnd = tNode.directiveEnd;\n  const cptViewProvidersCount =\n      nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n  const startingIndex =\n      canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n  // When the host special case applies, only the viewProviders and the component are visible\n  const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n  for (let i = startingIndex; i < endIndex; i++) {\n    const providerTokenOrDef = tInjectables[i] as InjectionToken<any>| Type<any>| DirectiveDef<any>;\n    if (i < directivesStart && token === providerTokenOrDef ||\n        i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {\n      return i;\n    }\n  }\n  if (isHostSpecialCase) {\n    const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n    if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n      return directivesStart;\n    }\n  }\n  return null;\n}\n\n/**\n* Retrieve or instantiate the injectable from the `lData` at particular `index`.\n*\n* This function checks to see if the value has already been instantiated and if so returns the\n* cached `injectable`. Otherwise if it detects that the value is still a factory it\n* instantiates the `injectable` and caches the value.\n*/\nexport function getNodeInjectable(\n    tData: TData, lData: LView, index: number, tNode: TElementNode): any {\n  let value = lData[index];\n  if (isFactory(value)) {\n    const factory: NodeInjectorFactory = value;\n    if (factory.resolving) {\n      throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);\n    }\n    const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n    factory.resolving = true;\n    let previousInjectImplementation;\n    if (factory.injectImpl) {\n      previousInjectImplementation = setInjectImplementation(factory.injectImpl);\n    }\n    const savePreviousOrParentTNode = getPreviousOrParentTNode();\n    const saveLView = getLView();\n    setTNodeAndViewData(tNode, lData);\n    try {\n      value = lData[index] = factory.factory(undefined, tData, lData, tNode);\n    } finally {\n      if (factory.injectImpl) setInjectImplementation(previousInjectImplementation);\n      setIncludeViewProviders(previousIncludeViewProviders);\n      factory.resolving = false;\n      setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n    }\n  }\n  return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n *   When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(token: Type<any>| InjectionToken<any>| string): number|\n    Function|undefined {\n  ngDevMode && assertDefined(token, 'token must be defined');\n  if (typeof token === 'string') {\n    return token.charCodeAt(0) || 0;\n  }\n  const tokenId: number|undefined = (token as any)[NG_ELEMENT_ID];\n  // Negative token IDs are used for special objects such as `Injector`\n  return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId;\n}\n\nexport function bloomHasToken(\n    bloomHash: number, injectorIndex: number, injectorView: LView | TData) {\n  // Create a mask that targets the specific bit associated with the directive we're looking for.\n  // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n  // to bit positions 0 - 31 in a 32 bit integer.\n  const mask = 1 << bloomHash;\n  const b7 = bloomHash & 0x80;\n  const b6 = bloomHash & 0x40;\n  const b5 = bloomHash & 0x20;\n\n  // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n  // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n  // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n  let value: number;\n\n  if (b7) {\n    value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :\n                 (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);\n  } else {\n    value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :\n                 (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);\n  }\n\n  // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n  // this injector is a potential match.\n  return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean|number {\n  return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport class NodeInjector implements Injector {\n  constructor(\n      private _tNode: TElementNode|TContainerNode|TElementContainerNode|null,\n      private _lView: LView) {}\n\n  get(token: any, notFoundValue?: any): any {\n    return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n  }\n}\n\n/**\n * @codeGenApi\n */\nexport function ÉµÉµgetFactoryOf<T>(type: Type<any>): FactoryFn<T>|null {\n  const typeAny = type as any;\n  const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||\n      getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n  if (!def || def.factory === undefined) {\n    return null;\n  }\n  return def.factory;\n}\n\n/**\n * @codeGenApi\n */\nexport function ÉµÉµgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n  const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;\n  const factory = ÉµÉµgetFactoryOf<T>(proto);\n  if (factory !== null) {\n    return factory;\n  } else {\n    // There is no factory defined. Either this was improper usage of inheritance\n    // (no Angular decorator on the superclass) or there is no constructor at all\n    // in the inheritance chain. Since the two cases cannot be distinguished, the\n    // latter has to be assumed.\n    return (t) => new t();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER, ERROR_ORIGINAL_ERROR, ERROR_TYPE} from './util/errors';\nimport {DebugContext} from './view';\n\nexport function getType(error: Error): Function {\n  return (error as any)[ERROR_TYPE];\n}\n\nexport function getDebugContext(error: Error): DebugContext {\n  return (error as any)[ERROR_DEBUG_CONTEXT];\n}\n\nexport function getOriginalError(error: Error): Error {\n  return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n\nexport function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void {\n  return (error as any)[ERROR_LOGGER] || defaultErrorLogger;\n}\n\n\nfunction defaultErrorLogger(console: Console, ...values: any[]) {\n  (<any>console.error)(...values);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getDebugContext, getErrorLogger, getOriginalError} from './errors';\n\n\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n  /**\n   * @internal\n   */\n  _console: Console = console;\n\n  handleError(error: any): void {\n    const originalError = this._findOriginalError(error);\n    const context = this._findContext(error);\n    // Note: Browser consoles show the place from where console.error was called.\n    // We can use this to give users additional information about the error.\n    const errorLogger = getErrorLogger(error);\n\n    errorLogger(this._console, `ERROR`, error);\n    if (originalError) {\n      errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n    }\n    if (context) {\n      errorLogger(this._console, 'ERROR CONTEXT', context);\n    }\n  }\n\n  /** @internal */\n  _findContext(error: any): any {\n    if (error) {\n      return getDebugContext(error) ? getDebugContext(error) :\n                                      this._findContext(getOriginalError(error));\n    }\n\n    return null;\n  }\n\n  /** @internal */\n  _findOriginalError(error: Error): any {\n    let e = getOriginalError(error);\n    while (e && getOriginalError(e)) {\n      e = getOriginalError(e);\n    }\n\n    return e;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A schema definition associated with an NgModule.\n *\n * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata { name: string; }\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n  name: 'custom-elements'\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n  name: 'no-errors-schema'\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst BRAND = '__SANITIZER_TRUSTED_BRAND__';\n\nexport const enum BypassType {\n  Url = 'Url',\n  Html = 'Html',\n  ResourceUrl = 'ResourceUrl',\n  Script = 'Script',\n  Style = 'Style',\n}\n\n/**\n * A branded trusted string used with sanitization.\n *\n * See: {@link TrustedHtmlString}, {@link TrustedResourceUrlString}, {@link TrustedScriptString},\n * {@link TrustedStyleString}, {@link TrustedUrlString}\n */\nexport interface TrustedString extends String { [BRAND]: BypassType; }\n\n/**\n * A branded trusted string used with sanitization of `html` strings.\n *\n * See: {@link bypassSanitizationTrustHtml} and {@link htmlSanitizer}.\n */\nexport interface TrustedHtmlString extends TrustedString { [BRAND]: BypassType.Html; }\n\n/**\n * A branded trusted string used with sanitization of `style` strings.\n *\n * See: {@link bypassSanitizationTrustStyle} and {@link styleSanitizer}.\n */\nexport interface TrustedStyleString extends TrustedString { [BRAND]: BypassType.Style; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustScript} and {@link scriptSanitizer}.\n */\nexport interface TrustedScriptString extends TrustedString { [BRAND]: BypassType.Script; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustUrl} and {@link urlSanitizer}.\n */\nexport interface TrustedUrlString extends TrustedString { [BRAND]: BypassType.Url; }\n\n/**\n * A branded trusted string used with sanitization of `resourceUrl` strings.\n *\n * See: {@link bypassSanitizationTrustResourceUrl} and {@link resourceUrlSanitizer}.\n */\nexport interface TrustedResourceUrlString extends TrustedString { [BRAND]: BypassType.ResourceUrl; }\n\nexport function allowSanitizationBypass(value: any, type: BypassType): boolean {\n  return (value instanceof String && (value as TrustedStyleString)[BRAND] === type);\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): TrustedHtmlString {\n  return bypassSanitizationTrustString(trustedHtml, BypassType.Html);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): TrustedStyleString {\n  return bypassSanitizationTrustString(trustedStyle, BypassType.Style);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): TrustedScriptString {\n  return bypassSanitizationTrustString(trustedScript, BypassType.Script);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): TrustedUrlString {\n  return bypassSanitizationTrustString(trustedUrl, BypassType.Url);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string):\n    TrustedResourceUrlString {\n  return bypassSanitizationTrustString(trustedResourceUrl, BypassType.ResourceUrl);\n}\n\n\nfunction bypassSanitizationTrustString(\n    trustedString: string, mode: BypassType.Html): TrustedHtmlString;\nfunction bypassSanitizationTrustString(\n    trustedString: string, mode: BypassType.Style): TrustedStyleString;\nfunction bypassSanitizationTrustString(\n    trustedString: string, mode: BypassType.Script): TrustedScriptString;\nfunction bypassSanitizationTrustString(\n    trustedString: string, mode: BypassType.Url): TrustedUrlString;\nfunction bypassSanitizationTrustString(\n    trustedString: string, mode: BypassType.ResourceUrl): TrustedResourceUrlString;\nfunction bypassSanitizationTrustString(trustedString: string, mode: BypassType): TrustedString {\n  // tslint:disable-next-line\n  const trusted = new String(trustedString) as TrustedString;\n  trusted[BRAND] = mode;\n  return trusted;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n\nlet _devMode: boolean = true;\nlet _runModeLocked: boolean = false;\n\n\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n  _runModeLocked = true;\n  return _devMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n  if (_runModeLocked) {\n    throw new Error('Cannot enable prod mode after platform setup.');\n  }\n  _devMode = false;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nexport class InertBodyHelper {\n  private inertBodyElement: HTMLElement;\n  private inertDocument: Document;\n\n  constructor(private defaultDoc: Document) {\n    this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n    this.inertBodyElement = this.inertDocument.body;\n\n    if (this.inertBodyElement == null) {\n      // usually there should be only one body element in the document, but IE doesn't have any, so\n      // we need to create one.\n      const inertHtml = this.inertDocument.createElement('html');\n      this.inertDocument.appendChild(inertHtml);\n      this.inertBodyElement = this.inertDocument.createElement('body');\n      inertHtml.appendChild(this.inertBodyElement);\n    }\n\n    this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n    if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n      // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n      // so use the XHR strategy.\n      this.getInertBodyElement = this.getInertBodyElement_XHR;\n      return;\n    }\n\n    this.inertBodyElement.innerHTML =\n        '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n    if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n      // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n      // so use the DOMParser strategy, if it is available.\n      // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n      // fall through to the default strategy below.\n      if (isDOMParserAvailable()) {\n        this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n        return;\n      }\n    }\n\n    // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n    this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n  }\n\n  /**\n   * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n   * The implementation of this is determined in the constructor, when the class is instantiated.\n   */\n  getInertBodyElement: (html: string) => HTMLElement | null;\n\n  /**\n   * Use XHR to create and fill an inert body element (on Safari 10.1)\n   * See\n   * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n   */\n  private getInertBodyElement_XHR(html: string) {\n    // We add these extra elements to ensure that the rest of the content is parsed as expected\n    // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n    // `<head>` tag.\n    html = '<body><remove></remove>' + html + '</body>';\n    try {\n      html = encodeURI(html);\n    } catch {\n      return null;\n    }\n    const xhr = new XMLHttpRequest();\n    xhr.responseType = 'document';\n    xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n    xhr.send(undefined);\n    const body: HTMLBodyElement = xhr.response.body;\n    body.removeChild(body.firstChild !);\n    return body;\n  }\n\n  /**\n   * Use DOMParser to create and fill an inert body element (on Firefox)\n   * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n   *\n   */\n  private getInertBodyElement_DOMParser(html: string) {\n    // We add these extra elements to ensure that the rest of the content is parsed as expected\n    // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n    // `<head>` tag.\n    html = '<body><remove></remove>' + html + '</body>';\n    try {\n      const body = new (window as any)\n                       .DOMParser()\n                       .parseFromString(html, 'text/html')\n                       .body as HTMLBodyElement;\n      body.removeChild(body.firstChild !);\n      return body;\n    } catch {\n      return null;\n    }\n  }\n\n  /**\n   * Use an HTML5 `template` element, if supported, or an inert body element created via\n   * `createHtmlDocument` to create and fill an inert DOM element.\n   * This is the default sane strategy to use if the browser does not require one of the specialised\n   * strategies above.\n   */\n  private getInertBodyElement_InertDocument(html: string) {\n    // Prefer using <template> element if supported.\n    const templateEl = this.inertDocument.createElement('template');\n    if ('content' in templateEl) {\n      templateEl.innerHTML = html;\n      return templateEl;\n    }\n\n    this.inertBodyElement.innerHTML = html;\n\n    // Support: IE 9-11 only\n    // strip custom-namespaced attributes on IE<=11\n    if ((this.defaultDoc as any).documentMode) {\n      this.stripCustomNsAttrs(this.inertBodyElement);\n    }\n\n    return this.inertBodyElement;\n  }\n\n  /**\n   * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n   * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n   * 'ns1:xlink:foo').\n   *\n   * This is undesirable since we don't want to allow any of these custom attributes. This method\n   * strips them all.\n   */\n  private stripCustomNsAttrs(el: Element) {\n    const elAttrs = el.attributes;\n    // loop backwards so that we can support removals.\n    for (let i = elAttrs.length - 1; 0 < i; i--) {\n      const attrib = elAttrs.item(i);\n      const attrName = attrib !.name;\n      if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n        el.removeAttribute(attrName);\n      }\n    }\n    let childNode = el.firstChild as Node | null;\n    while (childNode) {\n      if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode as Element);\n      childNode = childNode.nextSibling;\n    }\n  }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n  try {\n    return !!(window as any).DOMParser;\n  } catch {\n    return false;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol.  A protocol must be followed by a colon. The below\n *     allows that by allowing colons only after one of the characters [/?#].\n *     A colon after a hash (#) must be in the fragment.\n *     Otherwise, a colon after a (?) must be in a query.\n *     Otherwise, a colon after a single solidus (/) must be in a path.\n *     Otherwise, a colon after a double solidus (//) must be in the authority\n *     (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN =\n    /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function _sanitizeUrl(url: string): string {\n  url = String(url);\n  if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n  if (isDevMode()) {\n    console.warn(`WARNING: sanitizing unsafe URL value ${url} (see http://g.co/ng/security#xss)`);\n  }\n\n  return 'unsafe:' + url;\n}\n\nexport function sanitizeSrcset(srcset: string): string {\n  srcset = String(srcset);\n  return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\nimport {InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n  const res: {[k: string]: boolean} = {};\n  for (const t of tags.split(',')) res[t] = true;\n  return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n  const res: {[k: string]: boolean} = {};\n  for (const s of sets) {\n    for (const v in s) {\n      if (s.hasOwnProperty(v)) res[v] = true;\n    }\n  }\n  return res;\n}\n\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS =\n    merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n    OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n    tagSet(\n        'address,article,' +\n        'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n        'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n    OPTIONAL_END_TAG_INLINE_ELEMENTS,\n    tagSet(\n        'a,abbr,acronym,audio,b,' +\n        'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n        'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n\nexport const VALID_ELEMENTS =\n    merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\n// Attributes that have special href set hence need to be sanitized\nexport const SRCSET_ATTRS = tagSet('srcset');\n\nconst HTML_ATTRS = tagSet(\n    'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n    'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n    'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n    'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n    'valign,value,vspace,width');\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n    'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n    'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n    'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n    'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n    'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n    'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n    'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n  // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n  // because characters were re-encoded.\n  public sanitizedSomething = false;\n  private buf: string[] = [];\n\n  sanitizeChildren(el: Element): string {\n    // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n    // However this code never accesses properties off of `document` before deleting its contents\n    // again, so it shouldn't be vulnerable to DOM clobbering.\n    let current: Node = el.firstChild !;\n    let traverseContent = true;\n    while (current) {\n      if (current.nodeType === Node.ELEMENT_NODE) {\n        traverseContent = this.startElement(current as Element);\n      } else if (current.nodeType === Node.TEXT_NODE) {\n        this.chars(current.nodeValue !);\n      } else {\n        // Strip non-element, non-text nodes.\n        this.sanitizedSomething = true;\n      }\n      if (traverseContent && current.firstChild) {\n        current = current.firstChild !;\n        continue;\n      }\n      while (current) {\n        // Leaving the element. Walk up and to the right, closing tags as we go.\n        if (current.nodeType === Node.ELEMENT_NODE) {\n          this.endElement(current as Element);\n        }\n\n        let next = this.checkClobberedElement(current, current.nextSibling !);\n\n        if (next) {\n          current = next;\n          break;\n        }\n\n        current = this.checkClobberedElement(current, current.parentNode !);\n      }\n    }\n    return this.buf.join('');\n  }\n\n  /**\n   * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n   * be traversed. Element content must always be traversed (even if the element itself is not\n   * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n   *\n   * @param element The element to sanitize.\n   * @return True if the element's contents should be traversed.\n   */\n  private startElement(element: Element): boolean {\n    const tagName = element.nodeName.toLowerCase();\n    if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n      this.sanitizedSomething = true;\n      return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n    }\n    this.buf.push('<');\n    this.buf.push(tagName);\n    const elAttrs = element.attributes;\n    for (let i = 0; i < elAttrs.length; i++) {\n      const elAttr = elAttrs.item(i);\n      const attrName = elAttr !.name;\n      const lower = attrName.toLowerCase();\n      if (!VALID_ATTRS.hasOwnProperty(lower)) {\n        this.sanitizedSomething = true;\n        continue;\n      }\n      let value = elAttr !.value;\n      // TODO(martinprobst): Special case image URIs for data:image/...\n      if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n      if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);\n      this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n    }\n    this.buf.push('>');\n    return true;\n  }\n\n  private endElement(current: Element) {\n    const tagName = current.nodeName.toLowerCase();\n    if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n      this.buf.push('</');\n      this.buf.push(tagName);\n      this.buf.push('>');\n    }\n  }\n\n  private chars(chars: string) { this.buf.push(encodeEntities(chars)); }\n\n  checkClobberedElement(node: Node, nextNode: Node): Node {\n    if (nextNode &&\n        (node.compareDocumentPosition(nextNode) &\n         Node.DOCUMENT_POSITION_CONTAINED_BY) ===Â Node.DOCUMENT_POSITION_CONTAINED_BY) {\n      throw new Error(\n          `Failed to sanitize html because the element is clobbered: ${(node as Element).outerHTML}`);\n    }\n    return nextNode;\n  }\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n  return value.replace(/&/g, '&amp;')\n      .replace(\n          SURROGATE_PAIR_REGEXP,\n          function(match: string) {\n            const hi = match.charCodeAt(0);\n            const low = match.charCodeAt(1);\n            return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n          })\n      .replace(\n          NON_ALPHANUMERIC_REGEXP,\n          function(match: string) { return '&#' + match.charCodeAt(0) + ';'; })\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): string {\n  let inertBodyElement: HTMLElement|null = null;\n  try {\n    inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n    // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n    let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n    inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n    // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n    // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n    let mXSSAttempts = 5;\n    let parsedHtml = unsafeHtml;\n\n    do {\n      if (mXSSAttempts === 0) {\n        throw new Error('Failed to sanitize html because the input is unstable');\n      }\n      mXSSAttempts--;\n\n      unsafeHtml = parsedHtml;\n      parsedHtml = inertBodyElement !.innerHTML;\n      inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n    } while (unsafeHtml !== parsedHtml);\n\n    const sanitizer = new SanitizingHtmlSerializer();\n    const safeHtml = sanitizer.sanitizeChildren(\n        getTemplateContent(inertBodyElement !) as Element || inertBodyElement);\n    if (isDevMode() && sanitizer.sanitizedSomething) {\n      console.warn(\n          'WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');\n    }\n\n    return safeHtml;\n  } finally {\n    // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n    if (inertBodyElement) {\n      const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n      while (parent.firstChild) {\n        parent.removeChild(parent.firstChild);\n      }\n    }\n  }\n}\n\nexport function getTemplateContent(el: Node): Node|null {\n  return 'content' in (el as any /** Microsoft/TypeScript#21517 */) && isTemplateElement(el) ?\n      el.content :\n      null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n  return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n  NONE = 0,\n  HTML = 1,\n  STYLE = 2,\n  SCRIPT = 3,\n  URL = 4,\n  RESOURCE_URL = 5,\n}\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n  abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\nimport {_sanitizeUrl} from './url_sanitizer';\n\n\n/**\n * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nconst VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nconst TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?';\nconst COLOR_FNS = '(?:rgb|hsl)a?';\nconst GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nconst CSS3_FNS = '(?:calc|attr)';\nconst FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nconst SAFE_STYLE_VALUE = new RegExp(\n    `^(${VALUES}|` +\n        `(?:${TRANSFORMATION_FNS}|${COLOR_FNS}|${GRADIENTS}|${CSS3_FNS})` +\n        `${FN_ARGS})$`,\n    'g');\n\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nconst URL_RE = /^url\\(([^)]+)\\)$/;\n\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value: string) {\n  let outsideSingle = true;\n  let outsideDouble = true;\n  for (let i = 0; i < value.length; i++) {\n    const c = value.charAt(i);\n    if (c === '\\'' && outsideDouble) {\n      outsideSingle = !outsideSingle;\n    } else if (c === '\"' && outsideSingle) {\n      outsideDouble = !outsideDouble;\n    }\n  }\n  return outsideSingle && outsideDouble;\n}\n\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nexport function _sanitizeStyle(value: string): string {\n  value = String(value).trim();  // Make sure it's actually a string.\n  if (!value) return '';\n\n  // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n  // reasoning behind this.\n  const urlMatch = value.match(URL_RE);\n  if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n      value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n    return value;  // Safe style values.\n  }\n\n  if (isDevMode()) {\n    console.warn(\n        `WARNING: sanitizing unsafe style value ${value} (see http://g.co/ng/security#xss).`);\n  }\n\n  return 'unsafe';\n}\n\n\n/**\n * A series of flags to instruct a style sanitizer to either validate\n * or sanitize a value.\n *\n * Because sanitization is dependent on the style property (i.e. style\n * sanitization for `width` is much different than for `background-image`)\n * the sanitization function (e.g. `StyleSanitizerFn`) needs to check a\n * property value first before it actually sanitizes any values.\n *\n * This enum exist to allow a style sanitization function to either only\n * do validation (check the property to see whether a value will be\n * sanitized or not) or to sanitize the value (or both).\n *\n * @publicApi\n */\nexport const enum StyleSanitizeMode {\n  /** Just check to see if the property is required to be sanitized or not */\n  ValidateProperty = 0b01,\n  /** Skip checking the property; just sanitize the value */\n  SanitizeOnly = 0b10,\n  /** Check the property and (if true) then sanitize the value */\n  ValidateAndSanitize = 0b11,\n}\n\n/**\n * Used to intercept and sanitize style values before they are written to the renderer.\n *\n * This function is designed to be called in two modes. When a value is not provided\n * then the function will return a boolean whether a property will be sanitized later.\n * If a value is provided then the sanitized version of that will be returned.\n */\nexport interface StyleSanitizeFn {\n  (prop: string, value: string|null, mode?: StyleSanitizeMode): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/misc_utils';\n\nimport {BypassType, allowSanitizationBypass} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer, SecurityContext} from './security';\nimport {StyleSanitizeFn, StyleSanitizeMode, _sanitizeStyle as _sanitizeStyle} from './style_sanitizer';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeHtml(unsafeHtml: any): string {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n  }\n  if (allowSanitizationBypass(unsafeHtml, BypassType.Html)) {\n    return unsafeHtml.toString();\n  }\n  return _sanitizeHtml(document, renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeStyle(unsafeStyle: any): string {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n  }\n  if (allowSanitizationBypass(unsafeStyle, BypassType.Style)) {\n    return unsafeStyle.toString();\n  }\n  return _sanitizeStyle(renderStringify(unsafeStyle));\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeUrl(unsafeUrl: any): string {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n  }\n  if (allowSanitizationBypass(unsafeUrl, BypassType.Url)) {\n    return unsafeUrl.toString();\n  }\n  return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeResourceUrl(unsafeResourceUrl: any): string {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n  }\n  if (allowSanitizationBypass(unsafeResourceUrl, BypassType.ResourceUrl)) {\n    return unsafeResourceUrl.toString();\n  }\n  throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeScript(unsafeScript: any): string {\n  const sanitizer = getSanitizer();\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';\n  }\n  if (allowSanitizationBypass(unsafeScript, BypassType.Script)) {\n    return unsafeScript.toString();\n  }\n  throw new Error('unsafe value used in a script context');\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n  if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||\n                          tag === 'media' || tag === 'script')) ||\n      (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n    return ÉµÉµsanitizeResourceUrl;\n  }\n  return ÉµÉµsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @publicApi\n */\nexport function ÉµÉµsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n  return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\n/**\n * The default style sanitizer will handle sanitization for style properties by\n * sanitizing any CSS property that can include a `url` value (usually image-based properties)\n *\n * @publicApi\n */\nexport const ÉµÉµdefaultStyleSanitizer =\n    (function(prop: string, value: string|null, mode?: StyleSanitizeMode): string | boolean | null {\n      mode = mode || StyleSanitizeMode.ValidateAndSanitize;\n      let doSanitizeValue = true;\n      if (mode & StyleSanitizeMode.ValidateProperty) {\n        doSanitizeValue = prop === 'background-image' || prop === 'background' ||\n            prop === 'border-image' || prop === 'filter' || prop === 'list-style' ||\n            prop === 'list-style-image' || prop === 'clip-path';\n      }\n\n      if (mode & StyleSanitizeMode.SanitizeOnly) {\n        return doSanitizeValue ? ÉµÉµsanitizeStyle(value) : value;\n      } else {\n        return doSanitizeValue;\n      }\n    } as StyleSanitizeFn);\n\nexport function validateAgainstEventProperties(name: string) {\n  if (name.toLowerCase().startsWith('on')) {\n    const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n        `please use (${name.slice(2)})=...` +\n        `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n        ` current module.`;\n    throw new Error(msg);\n  }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n  if (name.toLowerCase().startsWith('on')) {\n    const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n        `please use (${name.slice(2)})=...`;\n    throw new Error(msg);\n  }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n  const lView = getLView();\n  return lView && lView[SANITIZER];\n}\n","\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport './ng_dev_mode';\nimport {global} from './global';\n\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n\n\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n *          environments which support `class` construct.\n */\nexport function createNamedArrayType(name: string): typeof Array {\n  // This should never be called in prod mode, so let's verify that is the case.\n  if (ngDevMode) {\n    try {\n      // We need to do it this way so that TypeScript does not down-level the below code.\n      const FunctionConstructor: any = createNamedArrayType.constructor;\n      return (new FunctionConstructor('Array', `return class ABC extends Array{}`))(Array);\n    } catch (e) {\n      // If it does not work just give up and fall back to regular Array.\n      return Array;\n    }\n  } else {\n    throw new Error(\n        'Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n  }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function normalizeDebugBindingName(name: string) {\n  // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n  name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n  return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n  return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\n  try {\n    // Limit the size of the value as otherwise the DOM just gets polluted.\n    return value != null ? value.toString().slice(0, 30) : value;\n  } catch (e) {\n    return '[ERROR] Exception while trying to serialize the value';\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../util/ng_dev_mode';\n\nimport {assertDomNode} from '../util/assert';\n\nimport {EMPTY_ARRAY} from './empty';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from './interfaces/context';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer';\nimport {CONTEXT, HEADER_OFFSET, HOST, LView, TVIEW} from './interfaces/view';\nimport {getComponentViewByIndex, getNativeByTNodeOrNull, readPatchedData, unwrapRNode} from './util/view_utils';\n\n\n\n/** Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext|null {\n  let mpValue = readPatchedData(target);\n  if (mpValue) {\n    // only when it's an array is it considered an LView instance\n    // ... otherwise it's an already constructed LContext instance\n    if (Array.isArray(mpValue)) {\n      const lView: LView = mpValue !;\n      let nodeIndex: number;\n      let component: any = undefined;\n      let directives: any[]|null|undefined = undefined;\n\n      if (isComponentInstance(target)) {\n        nodeIndex = findViaComponent(lView, target);\n        if (nodeIndex == -1) {\n          throw new Error('The provided component was not found in the application');\n        }\n        component = target;\n      } else if (isDirectiveInstance(target)) {\n        nodeIndex = findViaDirective(lView, target);\n        if (nodeIndex == -1) {\n          throw new Error('The provided directive was not found in the application');\n        }\n        directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n      } else {\n        nodeIndex = findViaNativeElement(lView, target as RElement);\n        if (nodeIndex == -1) {\n          return null;\n        }\n      }\n\n      // the goal is not to fill the entire context full of data because the lookups\n      // are expensive. Instead, only the target data (the element, component, container, ICU\n      // expression or directive details) are filled into the context. If called multiple times\n      // with different target values then the missing target data will be filled in.\n      const native = unwrapRNode(lView[nodeIndex]);\n      const existingCtx = readPatchedData(native);\n      const context: LContext = (existingCtx && !Array.isArray(existingCtx)) ?\n          existingCtx :\n          createLContext(lView, nodeIndex, native);\n\n      // only when the component has been discovered then update the monkey-patch\n      if (component && context.component === undefined) {\n        context.component = component;\n        attachPatchData(context.component, context);\n      }\n\n      // only when the directives have been discovered then update the monkey-patch\n      if (directives && context.directives === undefined) {\n        context.directives = directives;\n        for (let i = 0; i < directives.length; i++) {\n          attachPatchData(directives[i], context);\n        }\n      }\n\n      attachPatchData(context.native, context);\n      mpValue = context;\n    }\n  } else {\n    const rElement = target as RElement;\n    ngDevMode && assertDomNode(rElement);\n\n    // if the context is not found then we need to traverse upwards up the DOM\n    // to find the nearest element that has already been monkey patched with data\n    let parent = rElement as any;\n    while (parent = parent.parentNode) {\n      const parentContext = readPatchedData(parent);\n      if (parentContext) {\n        let lView: LView|null;\n        if (Array.isArray(parentContext)) {\n          lView = parentContext as LView;\n        } else {\n          lView = parentContext.lView;\n        }\n\n        // the edge of the app was also reached here through another means\n        // (maybe because the DOM was changed manually).\n        if (!lView) {\n          return null;\n        }\n\n        const index = findViaNativeElement(lView, rElement);\n        if (index >= 0) {\n          const native = unwrapRNode(lView[index]);\n          const context = createLContext(lView, index, native);\n          attachPatchData(native, context);\n          mpValue = context;\n          break;\n        }\n      }\n    }\n  }\n  return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n  return {\n    lView,\n    nodeIndex,\n    native,\n    component: undefined,\n    directives: undefined,\n    localRefs: undefined,\n  };\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n  let lView = readPatchedData(componentInstance);\n  let view: LView;\n\n  if (Array.isArray(lView)) {\n    const nodeIndex = findViaComponent(lView, componentInstance);\n    view = getComponentViewByIndex(nodeIndex, lView);\n    const context = createLContext(lView, nodeIndex, view[HOST] as RElement);\n    context.component = componentInstance;\n    attachPatchData(componentInstance, context);\n    attachPatchData(context.native, context);\n  } else {\n    const context = lView as any as LContext;\n    view = getComponentViewByIndex(context.nodeIndex, context.lView);\n  }\n  return view;\n}\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView | LContext) {\n  target[MONKEY_PATCH_KEY_NAME] = data;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n  return instance && instance.constructor && instance.constructor.ngComponentDef;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n  return instance && instance.constructor && instance.constructor.ngDirectiveDef;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n  let tNode = lView[TVIEW].firstChild;\n  while (tNode) {\n    const native = getNativeByTNodeOrNull(tNode, lView) !;\n    if (native === target) {\n      return tNode.index;\n    }\n    tNode = traverseNextElement(tNode);\n  }\n\n  return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode|null {\n  if (tNode.child) {\n    return tNode.child;\n  } else if (tNode.next) {\n    return tNode.next;\n  } else {\n    // Let's take the following template: <div><span>text</span></div><component/>\n    // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n    // in this case the parent `div`, so that we can find the component.\n    while (tNode.parent && !tNode.parent.next) {\n      tNode = tNode.parent;\n    }\n    return tNode.parent && tNode.parent.next;\n  }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n  const componentIndices = lView[TVIEW].components;\n  if (componentIndices) {\n    for (let i = 0; i < componentIndices.length; i++) {\n      const elementComponentIndex = componentIndices[i];\n      const componentView = getComponentViewByIndex(elementComponentIndex, lView);\n      if (componentView[CONTEXT] === componentInstance) {\n        return elementComponentIndex;\n      }\n    }\n  } else {\n    const rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lView);\n    const rootComponent = rootComponentView[CONTEXT];\n    if (rootComponent === componentInstance) {\n      // we are dealing with the root element here therefore we know that the\n      // element is the very first element after the HEADER data in the lView\n      return HEADER_OFFSET;\n    }\n  }\n  return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n  // if a directive is monkey patched then it will (by default)\n  // have a reference to the LView of the current view. The\n  // element bound to the directive being search lives somewhere\n  // in the view data. We loop through the nodes and check their\n  // list of directives for the instance.\n  let tNode = lView[TVIEW].firstChild;\n  while (tNode) {\n    const directiveIndexStart = tNode.directiveStart;\n    const directiveIndexEnd = tNode.directiveEnd;\n    for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n      if (lView[i] === directiveInstance) {\n        return tNode.index;\n      }\n    }\n    tNode = traverseNextElement(tNode);\n  }\n  return -1;\n}\n\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nexport function getDirectivesAtNodeIndex(\n    nodeIndex: number, lView: LView, includeComponents: boolean): any[]|null {\n  const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n  let directiveStartIndex = tNode.directiveStart;\n  if (directiveStartIndex == 0) return EMPTY_ARRAY;\n  const directiveEndIndex = tNode.directiveEnd;\n  if (!includeComponents && tNode.flags & TNodeFlags.isComponent) directiveStartIndex++;\n  return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n  const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n  let directiveStartIndex = tNode.directiveStart;\n  return tNode.flags & TNodeFlags.isComponent ? lView[directiveStartIndex] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any}|null {\n  const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n  if (tNode && tNode.localNames) {\n    const result: {[key: string]: any} = {};\n    let localIndex = tNode.index + 1;\n    for (let i = 0; i < tNode.localNames.length; i += 2) {\n      result[tNode.localNames[i]] = lView[localIndex];\n      localIndex++;\n    }\n    return result;\n  }\n\n  return null;\n}\n","\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectorType} from '../di/interface/defs';\nimport {stringify} from '../util/stringify';\n\nimport {TNode} from './interfaces/node';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: any): never {\n  throw new Error(`Cannot instantiate cyclic dependency! ${token}`);\n}\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(tNode: TNode): never {\n  throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n    creationMode: boolean, oldValue: any, currValue: any): never|void {\n  let msg =\n      `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n  if (creationMode) {\n    msg +=\n        ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n        ` Has it been created in a change detection hook ?`;\n  }\n  // TODO: include debug context\n  throw new Error(msg);\n}\n\nexport function throwMixedMultiProviderError() {\n  throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n    ngModuleType?: InjectorType<any>, providers?: any[], provider?: any) {\n  let ngModuleDetail = '';\n  if (ngModuleType && providers) {\n    const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n    ngModuleDetail =\n        ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n  }\n\n  throw new Error(\n      `Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';\nimport {getInitialStylingValue} from './styling_next/util';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2;\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\nfunction isCssClassMatching(nodeClassAttrVal: string, cssClassToMatch: string): boolean {\n  const nodeClassesLen = nodeClassAttrVal.length;\n  const matchIndex = nodeClassAttrVal !.indexOf(cssClassToMatch);\n  const matchEndIdx = matchIndex + cssClassToMatch.length;\n  if (matchIndex === -1                                                  // no match\n      || (matchIndex > 0 && nodeClassAttrVal ![matchIndex - 1] !== ' ')  // no space before\n      ||\n      (matchEndIdx < nodeClassesLen && nodeClassAttrVal ![matchEndIdx] !== ' '))  // no space after\n  {\n    return false;\n  }\n  return true;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n    tNode: TNode, currentSelector: string, isProjectionMode: boolean): boolean {\n  const tagNameToCompare = tNode.type === TNodeType.Container && !isProjectionMode ?\n      NG_TEMPLATE_SELECTOR :\n      tNode.tagName;\n  return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n    tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean {\n  ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n  let mode: SelectorFlags = SelectorFlags.ELEMENT;\n  const nodeAttrs = tNode.attrs || [];\n\n  // Find the index of first attribute that has no value, only a name.\n  const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n\n  // When processing \":not\" selectors, we skip to the next \":not\" if the\n  // current one doesn't match\n  let skipToNextSelector = false;\n\n  for (let i = 0; i < selector.length; i++) {\n    const current = selector[i];\n    if (typeof current === 'number') {\n      // If we finish processing a :not selector and it hasn't failed, return false\n      if (!skipToNextSelector && !isPositive(mode) && !isPositive(current as number)) {\n        return false;\n      }\n      // If we are skipping to the next :not() and this mode flag is positive,\n      // it's a part of the current :not() selector, and we should keep skipping\n      if (skipToNextSelector && isPositive(current)) continue;\n      skipToNextSelector = false;\n      mode = (current as number) | (mode & SelectorFlags.NOT);\n      continue;\n    }\n\n    if (skipToNextSelector) continue;\n\n    if (mode & SelectorFlags.ELEMENT) {\n      mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;\n      if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n          current === '' && selector.length === 1) {\n        if (isPositive(mode)) return false;\n        skipToNextSelector = true;\n      }\n    } else {\n      const selectorAttrValue = mode & SelectorFlags.CLASS ? current : selector[++i];\n\n      // special case for matching against classes when a tNode has been instantiated with\n      // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n      if ((mode & SelectorFlags.CLASS) && tNode.classes) {\n        if (!isCssClassMatching(\n                getInitialStylingValue(tNode.classes), selectorAttrValue as string)) {\n          if (isPositive(mode)) return false;\n          skipToNextSelector = true;\n        }\n        continue;\n      }\n\n      const isInlineTemplate =\n          tNode.type == TNodeType.Container && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n      const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n      const attrIndexInNode =\n          findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate, isProjectionMode);\n\n      if (attrIndexInNode === -1) {\n        if (isPositive(mode)) return false;\n        skipToNextSelector = true;\n        continue;\n      }\n\n      if (selectorAttrValue !== '') {\n        let nodeAttrValue: string;\n        if (attrIndexInNode > nameOnlyMarkerIdx) {\n          nodeAttrValue = '';\n        } else {\n          ngDevMode && assertNotEqual(\n                           nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n                           'We do not match directives on namespaced attributes');\n          nodeAttrValue = nodeAttrs[attrIndexInNode + 1] as string;\n        }\n\n        const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n        if (compareAgainstClassName &&\n                !isCssClassMatching(compareAgainstClassName, selectorAttrValue as string) ||\n            mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n          if (isPositive(mode)) return false;\n          skipToNextSelector = true;\n        }\n      }\n    }\n  }\n\n  return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n  return (mode & SelectorFlags.NOT) === 0;\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes                   | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection     | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive      | NO                | NO                  | YES                 | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive  | YES               | YES                 | NO                  | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n    name: string, attrs: TAttributes | null, isInlineTemplate: boolean,\n    isProjectionMode: boolean): number {\n  if (attrs === null) return -1;\n\n  let i = 0;\n\n  if (isProjectionMode || !isInlineTemplate) {\n    let bindingsMode = false;\n    while (i < attrs.length) {\n      const maybeAttrName = attrs[i];\n      if (maybeAttrName === name) {\n        return i;\n      } else if (\n          maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {\n        bindingsMode = true;\n      } else if (maybeAttrName === AttributeMarker.Classes) {\n        let value = attrs[++i];\n        // We should skip classes here because we have a separate mechanism for\n        // matching classes in projection mode.\n        while (typeof value === 'string') {\n          value = attrs[++i];\n        }\n        continue;\n      } else if (maybeAttrName === AttributeMarker.Template) {\n        // We do not care about Template attributes in this scenario.\n        break;\n      } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n        // Skip the whole namespaced attribute and value. This is by design.\n        i += 4;\n        continue;\n      }\n      // In binding mode there are only names, rather than name-value pairs.\n      i += bindingsMode ? 1 : 2;\n    }\n    // We did not match the attribute\n    return -1;\n  } else {\n    return matchTemplateAttribute(attrs, name);\n  }\n}\n\nexport function isNodeMatchingSelectorList(\n    tNode: TNode, selector: CssSelectorList, isProjectionMode: boolean = false): boolean {\n  for (let i = 0; i < selector.length; i++) {\n    if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector|null {\n  const nodeAttrs = tNode.attrs;\n  if (nodeAttrs != null) {\n    const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n    // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n    // (attribute names are stored at even indexes)\n    if ((ngProjectAsAttrIdx & 1) === 0) {\n      return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n    }\n  }\n  return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n  for (let i = 0; i < nodeAttrs.length; i++) {\n    const nodeAttr = nodeAttrs[i];\n    if (isNameOnlyAttributeMarker(nodeAttr)) {\n      return i;\n    }\n  }\n  return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n  let i = attrs.indexOf(AttributeMarker.Template);\n  if (i > -1) {\n    i++;\n    while (i < attrs.length) {\n      if (attrs[i] === name) return i;\n      i++;\n    }\n  }\n  return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n  selectorListLoop: for (let i = 0; i < list.length; i++) {\n    const currentSelectorInList = list[i];\n    if (selector.length !== currentSelectorInList.length) {\n      continue;\n    }\n    for (let j = 0; j < selector.length; j++) {\n      if (selector[j] !== currentSelectorInList[j]) {\n        continue selectorListLoop;\n      }\n    }\n    return true;\n  }\n  return false;\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3, RendererStyleFlags3, isProceduralRenderer} from '../interfaces/renderer';\n\nimport {ApplyStylingFn, LStylingData, StylingMapArray, StylingMapArrayIndex, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\nimport {BIT_MASK_START_VALUE, deleteStylingStateFromStorage, getStylingState, resetStylingState, storeStylingState} from './state';\nimport {allowStylingFlush, getBindingValue, getGuardMask, getMapProp, getMapValue, getProp, getPropValuesStartPosition, getStylingMapArray, getValuesCount, hasValueChanged, isContextLocked, isSanitizationRequired, isStylingValueDefined, lockContext, setGuardMask, stateIsPersisted} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core logic for styling in Angular.\n *\n * All styling bindings (i.e. `[style]`, `[style.prop]`, `[class]` and `[class.name]`)\n * will have their values be applied through the logic in this file.\n *\n * When a binding is encountered (e.g. `<div [style.width]=\"w\">`) then\n * the binding data will be populated into a `TStylingContext` data-structure.\n * There is only one `TStylingContext` per `TNode` and each element instance\n * will update its style/class binding values in concert with the styling\n * context.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n// The first bit value reflects a map-based binding value's bit.\n// The reason why it's always activated for every entry in the map\n// is so that if any map-binding values update then all other prop\n// based bindings will pass the guard check automatically without\n// any extra code or flags.\nexport const DEFAULT_GUARD_MASK_VALUE = 0b1;\n\n/**\n * The guard/update mask bit index location for map-based bindings.\n *\n * All map-based bindings (i.e. `[style]` and `[class]` )\n */\nconst STYLING_INDEX_FOR_MAP_BINDING = 0;\n\n/**\n * Default fallback value for a styling binding.\n *\n * A value of `null` is used here which signals to the styling algorithm that\n * the styling value is not present. This way if there are no other values\n * detected then it will be removed once the style/class property is dirty and\n * diffed within the styling algorithm present in `flushStyling`.\n */\nconst DEFAULT_BINDING_VALUE = null;\n\n/**\n * Default size count value for a new entry in a context.\n *\n * A value of `1` is used here because each entry in the context has a default\n * property.\n */\nconst DEFAULT_SIZE_VALUE = 1;\n\nlet deferredBindingQueue: (TStylingContext | number | string | null | boolean)[] = [];\n\n/**\n * Visits a class-based binding and updates the new value (if changed).\n *\n * This function is called each time a class-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateClassBinding(\n    context: TStylingContext, data: LStylingData, element: RElement, prop: string | null,\n    bindingIndex: number, value: boolean | string | null | undefined | StylingMapArray,\n    deferRegistration: boolean, forceUpdate: boolean): boolean {\n  const isMapBased = !prop;\n  const state = getStylingState(element, stateIsPersisted(context));\n  const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.classesIndex++;\n  const updated = updateBindingData(\n      context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, false);\n  if (updated || forceUpdate) {\n    // We flip the bit in the bitMask to reflect that the binding\n    // at the `index` slot has changed. This identifies to the flushing\n    // phase that the bindings for this particular CSS class need to be\n    // applied again because on or more of the bindings for the CSS\n    // class have changed.\n    state.classesBitMask |= 1 << index;\n    return true;\n  }\n  return false;\n}\n\n/**\n * Visits a style-based binding and updates the new value (if changed).\n *\n * This function is called each time a style-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateStyleBinding(\n    context: TStylingContext, data: LStylingData, element: RElement, prop: string | null,\n    bindingIndex: number, value: String | string | number | null | undefined | StylingMapArray,\n    sanitizer: StyleSanitizeFn | null, deferRegistration: boolean, forceUpdate: boolean): boolean {\n  const isMapBased = !prop;\n  const state = getStylingState(element, stateIsPersisted(context));\n  const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.stylesIndex++;\n  const sanitizationRequired = isMapBased ?\n      true :\n      (sanitizer ? sanitizer(prop !, null, StyleSanitizeMode.ValidateProperty) : false);\n  const updated = updateBindingData(\n      context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate,\n      sanitizationRequired);\n  if (updated || forceUpdate) {\n    // We flip the bit in the bitMask to reflect that the binding\n    // at the `index` slot has changed. This identifies to the flushing\n    // phase that the bindings for this particular property need to be\n    // applied again because on or more of the bindings for the CSS\n    // property have changed.\n    state.stylesBitMask |= 1 << index;\n    return true;\n  }\n  return false;\n}\n\n/**\n * Called each time a binding value has changed within the provided `TStylingContext`.\n *\n * This function is designed to be called from `updateStyleBinding` and `updateClassBinding`.\n * If called during the first update pass, the binding will be registered in the context.\n * If the binding does get registered and the `deferRegistration` flag is true then the\n * binding data will be queued up until the context is later flushed in `applyStyling`.\n *\n * This function will also update binding slot in the provided `LStylingData` with the\n * new binding entry (if it has changed).\n *\n * @returns whether or not the binding value was updated in the `LStylingData`.\n */\nfunction updateBindingData(\n    context: TStylingContext, data: LStylingData, counterIndex: number, prop: string | null,\n    bindingIndex: number,\n    value: string | String | number | boolean | null | undefined | StylingMapArray,\n    deferRegistration: boolean, forceUpdate: boolean, sanitizationRequired: boolean): boolean {\n  if (!isContextLocked(context)) {\n    if (deferRegistration) {\n      deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n    } else {\n      deferredBindingQueue.length && flushDeferredBindings();\n\n      // this will only happen during the first update pass of the\n      // context. The reason why we can't use `tNode.firstTemplatePass`\n      // here is because its not guaranteed to be true when the first\n      // update pass is executed (remember that all styling instructions\n      // are run in the update phase, and, as a result, are no more\n      // styling instructions that are run in the creation phase).\n      registerBinding(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n    }\n  }\n\n  const changed = forceUpdate || hasValueChanged(data[bindingIndex], value);\n  if (changed) {\n    data[bindingIndex] = value;\n  }\n  return changed;\n}\n\n/**\n * Schedules a binding registration to be run at a later point.\n *\n * The reasoning for this feature is to ensure that styling\n * bindings are registered in the correct order for when\n * directives/components have a super/sub class inheritance\n * chains. Each directive's styling bindings must be\n * registered into the context in reverse order. Therefore all\n * bindings will be buffered in reverse order and then applied\n * after the inheritance chain exits.\n */\nfunction deferBindingRegistration(\n    context: TStylingContext, counterIndex: number, prop: string | null, bindingIndex: number,\n    sanitizationRequired: boolean) {\n  deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n}\n\n/**\n * Flushes the collection of deferred bindings and causes each entry\n * to be registered into the context.\n */\nfunction flushDeferredBindings() {\n  let i = 0;\n  while (i < deferredBindingQueue.length) {\n    const context = deferredBindingQueue[i++] as TStylingContext;\n    const count = deferredBindingQueue[i++] as number;\n    const prop = deferredBindingQueue[i++] as string;\n    const bindingIndex = deferredBindingQueue[i++] as number | null;\n    const sanitizationRequired = deferredBindingQueue[i++] as boolean;\n    registerBinding(context, count, prop, bindingIndex, sanitizationRequired);\n  }\n  deferredBindingQueue.length = 0;\n}\n\n/**\n * Registers the provided binding (prop + bindingIndex) into the context.\n *\n * This function is shared between bindings that are assigned immediately\n * (via `updateBindingData`) and at a deferred stage. When called, it will\n * figure out exactly where to place the binding data in the context.\n *\n * It is needed because it will either update or insert a styling property\n * into the context at the correct spot.\n *\n * When called, one of two things will happen:\n *\n * 1) If the property already exists in the context then it will just add\n *    the provided `bindingValue` to the end of the binding sources region\n *    for that particular property.\n *\n *    - If the binding value is a number then it will be added as a new\n *      binding index source next to the other binding sources for the property.\n *\n *    - Otherwise, if the binding value is a string/boolean/null type then it will\n *      replace the default value for the property if the default value is `null`.\n *\n * 2) If the property does not exist then it will be inserted into the context.\n *    The styling context relies on all properties being stored in alphabetical\n *    order, so it knows exactly where to store it.\n *\n *    When inserted, a default `null` value is created for the property which exists\n *    as the default value for the binding. If the bindingValue property is inserted\n *    and it is either a string, number or null value then that will replace the default\n *    value.\n *\n * Note that this function is also used for map-based styling bindings. They are treated\n * much the same as prop-based bindings, but, because they do not have a property value\n * (since it's a map), all map-based entries are stored in an already populated area of\n * the context at the top (which is reserved for map-based entries).\n */\nexport function registerBinding(\n    context: TStylingContext, countId: number, prop: string | null,\n    bindingValue: number | null | string | boolean, sanitizationRequired?: boolean): boolean {\n  let registered = false;\n  if (prop) {\n    // prop-based bindings (e.g `<div [style.width]=\"w\" [class.foo]=\"f\">`)\n    let found = false;\n    let i = getPropValuesStartPosition(context);\n    while (i < context.length) {\n      const valuesCount = getValuesCount(context, i);\n      const p = getProp(context, i);\n      found = prop <= p;\n      if (found) {\n        // all style/class bindings are sorted by property name\n        if (prop < p) {\n          allocateNewContextEntry(context, i, prop, sanitizationRequired);\n        }\n        addBindingIntoContext(context, false, i, bindingValue, countId);\n        break;\n      }\n      i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n    }\n\n    if (!found) {\n      allocateNewContextEntry(context, context.length, prop, sanitizationRequired);\n      addBindingIntoContext(context, false, i, bindingValue, countId);\n      registered = true;\n    }\n  } else {\n    // map-based bindings (e.g `<div [style]=\"s\" [class]=\"{className:true}\">`)\n    // there is no need to allocate the map-based binding region into the context\n    // since it is already there when the context is first created.\n    addBindingIntoContext(\n        context, true, TStylingContextIndex.MapBindingsPosition, bindingValue, countId);\n    registered = true;\n  }\n  return registered;\n}\n\nfunction allocateNewContextEntry(\n    context: TStylingContext, index: number, prop: string, sanitizationRequired?: boolean) {\n  // 1,2: splice index locations\n  // 3: each entry gets a config value (guard mask + flags)\n  // 4. each entry gets a size value (which is always one because there is always a default binding\n  // value)\n  // 5. the property that is getting allocated into the context\n  // 6. the default binding value (usually `null`)\n  const config = sanitizationRequired ? TStylingContextPropConfigFlags.SanitizationRequired :\n                                        TStylingContextPropConfigFlags.Default;\n  context.splice(index, 0, config, DEFAULT_SIZE_VALUE, prop, DEFAULT_BINDING_VALUE);\n  setGuardMask(context, index, DEFAULT_GUARD_MASK_VALUE);\n}\n\n/**\n * Inserts a new binding value into a styling property tuple in the `TStylingContext`.\n *\n * A bindingValue is inserted into a context during the first update pass\n * of a template or host bindings function. When this occurs, two things\n * happen:\n *\n * - If the bindingValue value is a number then it is treated as a bindingIndex\n *   value (a index in the `LView`) and it will be inserted next to the other\n *   binding index entries.\n *\n * - Otherwise the binding value will update the default value for the property\n *   and this will only happen if the default value is `null`.\n *\n * Note that this function also handles map-based bindings and will insert them\n * at the top of the context.\n */\nfunction addBindingIntoContext(\n    context: TStylingContext, isMapBased: boolean, index: number,\n    bindingValue: number | string | boolean | null, countId: number) {\n  const valuesCount = getValuesCount(context, index);\n\n  const firstValueIndex = index + TStylingContextIndex.BindingsStartOffset;\n  let lastValueIndex = firstValueIndex + valuesCount;\n  if (!isMapBased) {\n    // prop-based values all have default values, but map-based entries do not.\n    // we want to access the index for the default value in this case and not just\n    // the bindings...\n    lastValueIndex--;\n  }\n\n  if (typeof bindingValue === 'number') {\n    // the loop here will check to see if the binding already exists\n    // for the property in the context. Why? The reason for this is\n    // because the styling context is not \"locked\" until the first\n    // flush has occurred. This means that if a repeated element\n    // registers its styling bindings then it will register each\n    // binding more than once (since its duplicated). This check\n    // will prevent that from happening. Note that this only happens\n    // when a binding is first encountered and not each time it is\n    // updated.\n    for (let i = firstValueIndex; i <= lastValueIndex; i++) {\n      const indexAtPosition = context[i];\n      if (indexAtPosition === bindingValue) return;\n    }\n\n    context.splice(lastValueIndex, 0, bindingValue);\n    (context[index + TStylingContextIndex.ValuesCountOffset] as number)++;\n\n    // now that a new binding index has been added to the property\n    // the guard mask bit value (at the `countId` position) needs\n    // to be included into the existing mask value.\n    const guardMask = getGuardMask(context, index) | (1 << countId);\n    setGuardMask(context, index, guardMask);\n  } else if (bindingValue !== null && context[lastValueIndex] == null) {\n    context[lastValueIndex] = bindingValue;\n  }\n}\n\n/**\n * Applies all pending style and class bindings to the provided element.\n *\n * This function will attempt to flush styling via the provided `classesContext`\n * and `stylesContext` context values. This function is designed to be run from\n * the `stylingApply()` instruction (which is run at the very end of styling\n * change detection) and will rely on any state values that are set from when\n * any styling bindings update.\n *\n * This function may be called multiple times on the same element because it can\n * be called from the template code as well as from host bindings. In order for\n * styling to be successfully flushed to the element (which will only happen once\n * despite this being called multiple times), the following criteria must be met:\n *\n * - `flushStyling` is called from the very last directive that has styling for\n *    the element (see `allowStylingFlush()`).\n * - one or more bindings for classes or styles has updated (this is checked by\n *   examining the classes or styles bit mask).\n *\n * If the style and class values are successfully applied to the element then\n * the temporary state values for the element will be cleared. Otherwise, if\n * this did not occur then the styling state is persisted (see `state.ts` for\n * more information on how this works).\n */\nexport function flushStyling(\n    renderer: Renderer3 | ProceduralRenderer3 | null, data: LStylingData,\n    classesContext: TStylingContext | null, stylesContext: TStylingContext | null,\n    element: RElement, directiveIndex: number, styleSanitizer: StyleSanitizeFn | null): void {\n  ngDevMode && ngDevMode.flushStyling++;\n\n  const persistState = classesContext ? stateIsPersisted(classesContext) :\n                                        (stylesContext ? stateIsPersisted(stylesContext) : false);\n  const allowFlushClasses = allowStylingFlush(classesContext, directiveIndex);\n  const allowFlushStyles = allowStylingFlush(stylesContext, directiveIndex);\n\n  // deferred bindings are bindings which are scheduled to register with\n  // the context at a later point. These bindings can only registered when\n  // the context will be 100% flushed to the element.\n  if (deferredBindingQueue.length && (allowFlushClasses || allowFlushStyles)) {\n    flushDeferredBindings();\n  }\n\n  const state = getStylingState(element, persistState);\n  const classesFlushed = maybeApplyStyling(\n      renderer, element, data, classesContext, allowFlushClasses, state.classesBitMask, setClass,\n      null);\n  const stylesFlushed = maybeApplyStyling(\n      renderer, element, data, stylesContext, allowFlushStyles, state.stylesBitMask, setStyle,\n      styleSanitizer);\n\n  if (classesFlushed && stylesFlushed) {\n    resetStylingState();\n    if (persistState) {\n      deleteStylingStateFromStorage(element);\n    }\n  } else if (persistState) {\n    storeStylingState(element, state);\n  }\n}\n\nfunction maybeApplyStyling(\n    renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement, data: LStylingData,\n    context: TStylingContext | null, allowFlush: boolean, bitMask: number,\n    styleSetter: ApplyStylingFn, styleSanitizer: any | null): boolean {\n  if (allowFlush && context) {\n    lockAndFinalizeContext(context);\n    if (contextHasUpdates(context, bitMask)) {\n      ngDevMode && (styleSanitizer ? ngDevMode.stylesApplied++ : ngDevMode.classesApplied++);\n      applyStyling(context !, renderer, element, data, bitMask, styleSetter, styleSanitizer);\n      return true;\n    }\n  }\n  return allowFlush;\n}\n\nfunction contextHasUpdates(context: TStylingContext | null, bitMask: number) {\n  return context && bitMask > BIT_MASK_START_VALUE;\n}\n\n/**\n * Locks the context (so no more bindings can be added) and also copies over initial class/style\n * values into their binding areas.\n *\n * There are two main actions that take place in this function:\n *\n * - Locking the context:\n *   Locking the context is required so that the style/class instructions know NOT to\n *   register a binding again after the first update pass has run. If a locking bit was\n *   not used then it would need to scan over the context each time an instruction is run\n *   (which is expensive).\n *\n * - Patching initial values:\n *   Directives and component host bindings may include static class/style values which are\n *   bound to the host element. When this happens, the styling context will need to be informed\n *   so it can use these static styling values as defaults when a matching binding is falsy.\n *   These initial styling values are read from the initial styling values slot within the\n *   provided `TStylingContext` (which is an instance of a `StylingMapArray`). This inner map will\n *   be updated each time a host binding applies its static styling values (via `elementHostAttrs`)\n *   so these values are only read at this point because this is the very last point before the\n *   first style/class values are flushed to the element.\n */\nfunction lockAndFinalizeContext(context: TStylingContext): void {\n  if (!isContextLocked(context)) {\n    const initialValues = getStylingMapArray(context);\n    if (initialValues) {\n      updateInitialStylingOnContext(context, initialValues);\n    }\n    lockContext(context);\n  }\n}\n\n/**\n * Runs through the provided styling context and applies each value to\n * the provided element (via the renderer) if one or more values are present.\n *\n * This function will iterate over all entries present in the provided\n * `TStylingContext` array (both prop-based and map-based bindings).-\n *\n * Each entry, within the `TStylingContext` array, is stored alphabetically\n * and this means that each prop/value entry will be applied in order\n * (so long as it is marked dirty in the provided `bitMask` value).\n *\n * If there are any map-based entries present (which are applied to the\n * element via the `[style]` and `[class]` bindings) then those entries\n * will be applied as well. However, the code for that is not a part of\n * this function. Instead, each time a property is visited, then the\n * code below will call an external function called `stylingMapsSyncFn`\n * and, if present, it will keep the application of styling values in\n * map-based bindings up to sync with the application of prop-based\n * bindings.\n *\n * Visit `styling_next/map_based_bindings.ts` to learn more about how the\n * algorithm works for map-based styling bindings.\n *\n * Note that this function is not designed to be called in isolation (use\n * `applyClasses` and `applyStyles` to actually apply styling values).\n */\nexport function applyStyling(\n    context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n    bindingData: LStylingData, bitMaskValue: number | boolean, applyStylingFn: ApplyStylingFn,\n    sanitizer: StyleSanitizeFn | null) {\n  const bitMask = normalizeBitMaskValue(bitMaskValue);\n  const stylingMapsSyncFn = getStylingMapsSyncFn();\n  const mapsGuardMask = getGuardMask(context, TStylingContextIndex.MapBindingsPosition);\n  const applyAllValues = (bitMask & mapsGuardMask) > 0;\n  const mapsMode =\n      applyAllValues ? StylingMapsSyncMode.ApplyAllValues : StylingMapsSyncMode.TraverseValues;\n\n  let i = getPropValuesStartPosition(context);\n  while (i < context.length) {\n    const valuesCount = getValuesCount(context, i);\n    const guardMask = getGuardMask(context, i);\n    if (bitMask & guardMask) {\n      let valueApplied = false;\n      const prop = getProp(context, i);\n      const valuesCountUpToDefault = valuesCount - 1;\n      const defaultValue = getBindingValue(context, i, valuesCountUpToDefault) as string | null;\n\n      // case 1: apply prop-based values\n      // try to apply the binding values and see if a non-null\n      // value gets set for the styling binding\n      for (let j = 0; j < valuesCountUpToDefault; j++) {\n        const bindingIndex = getBindingValue(context, i, j) as number;\n        const value = bindingData[bindingIndex];\n        if (isStylingValueDefined(value)) {\n          const finalValue = sanitizer && isSanitizationRequired(context, i) ?\n              sanitizer(prop, value, StyleSanitizeMode.SanitizeOnly) :\n              value;\n          applyStylingFn(renderer, element, prop, finalValue, bindingIndex);\n          valueApplied = true;\n          break;\n        }\n      }\n\n      // case 2: apply map-based values\n      // traverse through each map-based styling binding and update all values up to\n      // the provided `prop` value. If the property was not applied in the loop above\n      // then it will be attempted to be applied in the maps sync code below.\n      if (stylingMapsSyncFn) {\n        // determine whether or not to apply the target property or to skip it\n        const mode = mapsMode | (valueApplied ? StylingMapsSyncMode.SkipTargetProp :\n                                                StylingMapsSyncMode.ApplyTargetProp);\n        const valueAppliedWithinMap = stylingMapsSyncFn(\n            context, renderer, element, bindingData, applyStylingFn, sanitizer, mode, prop,\n            defaultValue);\n        valueApplied = valueApplied || valueAppliedWithinMap;\n      }\n\n      // case 3: apply the default value\n      // if the value has not yet been applied then a truthy value does not exist in the\n      // prop-based or map-based bindings code. If and when this happens, just apply the\n      // default value (even if the default value is `null`).\n      if (!valueApplied) {\n        applyStylingFn(renderer, element, prop, defaultValue);\n      }\n    }\n\n    i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n  }\n\n  // the map-based styling entries may have not applied all their\n  // values. For this reason, one more call to the sync function\n  // needs to be issued at the end.\n  if (stylingMapsSyncFn) {\n    stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mapsMode);\n  }\n}\n\nfunction normalizeBitMaskValue(value: number | boolean): number {\n  // if pass => apply all values (-1 implies that all bits are flipped to true)\n  if (value === true) return -1;\n\n  // if pass => skip all values\n  if (value === false) return 0;\n\n  // return the bit mask value as is\n  return value;\n}\n\nlet _activeStylingMapApplyFn: SyncStylingMapsFn|null = null;\nexport function getStylingMapsSyncFn() {\n  return _activeStylingMapApplyFn;\n}\n\nexport function setStylingMapsSyncFn(fn: SyncStylingMapsFn) {\n  _activeStylingMapApplyFn = fn;\n}\n\n/**\n * Assigns a style value to a style property for the given element.\n */\nconst setStyle: ApplyStylingFn =\n    (renderer: Renderer3 | null, native: RElement, prop: string, value: string | null) => {\n      // the reason why this may be `null` is either because\n      // it's a container element or it's a part of a test\n      // environment that doesn't have styling. In either\n      // case it's safe not to apply styling to the element.\n      const nativeStyle = native.style;\n      if (value) {\n        // opacity, z-index and flexbox all have number values\n        // and these need to be converted into strings so that\n        // they can be assigned properly.\n        value = value.toString();\n        ngDevMode && ngDevMode.rendererSetStyle++;\n        renderer && isProceduralRenderer(renderer) ?\n            renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n            (nativeStyle && nativeStyle.setProperty(prop, value));\n      } else {\n        ngDevMode && ngDevMode.rendererRemoveStyle++;\n        renderer && isProceduralRenderer(renderer) ?\n            renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n            (nativeStyle && nativeStyle.removeProperty(prop));\n      }\n    };\n\n/**\n * Adds/removes the provided className value to the provided element.\n */\nconst setClass: ApplyStylingFn =\n    (renderer: Renderer3 | null, native: RElement, className: string, value: any) => {\n      if (className !== '') {\n        // the reason why this may be `null` is either because\n        // it's a container element or it's a part of a test\n        // environment that doesn't have styling. In either\n        // case it's safe not to apply styling to the element.\n        const classList = native.classList;\n        if (value) {\n          ngDevMode && ngDevMode.rendererAddClass++;\n          renderer && isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n                                                       (classList && classList.add(className));\n        } else {\n          ngDevMode && ngDevMode.rendererRemoveClass++;\n          renderer && isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n                                                       (classList && classList.remove(className));\n        }\n      }\n    };\n\n/**\n * Iterates over all provided styling entries and renders them on the element.\n *\n * This function is used alongside a `StylingMapArray` entry. This entry is not\n * the same as the `TStylingContext` and is only really used when an element contains\n * initial styling values (e.g. `<div style=\"width:200px\">`), but no style/class bindings\n * are present. If and when that happens then this function will be called to render all\n * initial styling values on an element.\n */\nexport function renderStylingMap(\n    renderer: Renderer3, element: RElement, stylingValues: TStylingContext | StylingMapArray | null,\n    isClassBased: boolean): void {\n  const stylingMapArr = getStylingMapArray(stylingValues);\n  if (stylingMapArr) {\n    for (let i = StylingMapArrayIndex.ValuesStartPosition; i < stylingMapArr.length;\n         i += StylingMapArrayIndex.TupleSize) {\n      const prop = getMapProp(stylingMapArr, i);\n      const value = getMapValue(stylingMapArr, i);\n      if (isClassBased) {\n        setClass(renderer, element, prop, value, null);\n      } else {\n        setStyle(renderer, element, prop, value, null);\n      }\n    }\n  }\n}\n\n/**\n * Registers all initial styling entries into the provided context.\n *\n * This function will iterate over all entries in the provided `initialStyling` ar}ray and register\n * them as default (initial) values in the provided context. Initial styling values in a context are\n * the default values that are to be applied unless overwritten by a binding.\n *\n * The reason why this function exists and isn't a part of the context construction is because\n * host binding is evaluated at a later stage after the element is created. This means that\n * if a directive or component contains any initial styling code (i.e. `<div class=\"foo\">`)\n * then that initial styling data can only be applied once the styling for that element\n * is first applied (at the end of the update phase). Once that happens then the context will\n * update itself with the complete initial styling for the element.\n */\nfunction updateInitialStylingOnContext(\n    context: TStylingContext, initialStyling: StylingMapArray): void {\n  // `-1` is used here because all initial styling data is not a spart\n  // of a binding (since it's static)\n  const INITIAL_STYLING_COUNT_ID = -1;\n\n  for (let i = StylingMapArrayIndex.ValuesStartPosition; i < initialStyling.length;\n       i += StylingMapArrayIndex.TupleSize) {\n    const value = getMapValue(initialStyling, i);\n    if (value) {\n      const prop = getMapProp(initialStyling, i);\n      registerBinding(context, INITIAL_STYLING_COUNT_ID, prop, value, false);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface NO_CHANGE {\n  // This is a brand that ensures that this type can never match anything else\n  brand: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE = {} as NO_CHANGE;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes contain three parts:\n *  1) Parent node index offset.\n *  2) Reference node index offset.\n *  3) The OpCode to execute.\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nimport {SanitizerFn} from './sanitization';\n\nexport const enum I18nMutateOpCode {\n  /**\n   * Stores shift amount for bits 17-3 that contain reference index.\n   */\n  SHIFT_REF = 3,\n  /**\n   * Stores shift amount for bits 31-17 that contain parent index.\n   */\n  SHIFT_PARENT = 17,\n  /**\n   * Mask for OpCode\n   */\n  MASK_OPCODE = 0b111,\n\n  /**\n   * OpCode to select a node. (next OpCode will contain the operation.)\n   */\n  Select = 0b000,\n  /**\n   * OpCode to append the current node to `PARENT`.\n   */\n  AppendChild = 0b001,\n  /**\n   * OpCode to remove the `REF` node from `PARENT`.\n   */\n  Remove = 0b011,\n  /**\n   * OpCode to set the attribute of a node.\n   */\n  Attr = 0b100,\n  /**\n   * OpCode to simulate elementEnd()\n   */\n  ElementEnd = 0b101,\n  /**\n   * OpCode to read the remove OpCodes for the nested ICU\n   */\n  RemoveNestedIcu = 0b110,\n}\n\n/**\n * Marks that the next string is for element.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n  marker: 'element'\n};\nexport interface ELEMENT_MARKER { marker: 'element'; }\n\n/**\n * Marks that the next string is for comment.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const COMMENT_MARKER: COMMENT_MARKER = {\n  marker: 'comment'\n};\n\nexport interface COMMENT_MARKER { marker: 'comment'; }\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n *   // For adding text nodes\n *   // ---------------------\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createTextNode('abc');\n *   //   lView[1].insertBefore(node, lView[2]);\n *   'abc', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createTextNode('xyz');\n *   //   lView[1].appendChild(node);\n *   'xyz', 1 << SHIFT_PARENT | AppendChild,\n *\n *   // For adding element nodes\n *   // ---------------------\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createElement('div');\n *   //   lView[1].insertBefore(node, lView[2]);\n *   ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createElement('div');\n *   //   lView[1].appendChild(node);\n *   ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | AppendChild,\n *\n *   // For adding comment nodes\n *   // ---------------------\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createComment('');\n *   //   lView[1].insertBefore(node, lView[2]);\n *   COMMENT_MARKER, '', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n *   // Equivalent to:\n *   //   const node = lView[index++] = document.createComment('');\n *   //   lView[1].appendChild(node);\n *   COMMENT_MARKER, '', 1 << SHIFT_PARENT | AppendChild,\n *\n *   // For moving existing nodes to a different location\n *   // --------------------------------------------------\n *   // Equivalent to:\n *   //   const node = lView[1];\n *   //   lView[2].insertBefore(node, lView[3]);\n *   1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 3 << SHIFT_REF | InsertBefore,\n *\n *   // Equivalent to:\n *   //   const node = lView[1];\n *   //   lView[2].appendChild(node);\n *   1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | AppendChild,\n *\n *   // For removing existing nodes\n *   // --------------------------------------------------\n *   //   const node = lView[1];\n *   //   removeChild(tView.data(1), node, lView);\n *   1 << SHIFT_REF | Remove,\n *\n *   // For writing attributes\n *   // --------------------------------------------------\n *   //   const node = lView[1];\n *   //   node.setAttribute('attr', 'value');\n *   1 << SHIFT_REF | Select, 'attr', 'value'\n *            // NOTE: Select followed by two string (vs select followed by OpCode)\n * ];\n * ```\n * NOTE:\n *   - `index` is initial location where the extra nodes should be stored in the EXPANDO section of\n * `LVIewData`.\n *\n * See: `applyI18nCreateOpCodes`;\n */\nexport interface I18nMutateOpCodes extends Array<number|string|ELEMENT_MARKER|COMMENT_MARKER|null> {\n}\n\nexport const enum I18nUpdateOpCode {\n  /**\n   * Stores shift amount for bits 17-2 that contain reference index.\n   */\n  SHIFT_REF = 2,\n  /**\n   * Mask for OpCode\n   */\n  MASK_OPCODE = 0b11,\n\n  /**\n   * OpCode to update a text node.\n   */\n  Text = 0b00,\n  /**\n   * OpCode to update a attribute of a node.\n   */\n  Attr = 0b01,\n  /**\n   * OpCode to switch the current ICU case.\n   */\n  IcuSwitch = 0b10,\n  /**\n   * OpCode to update the current ICU case.\n   */\n  IcuUpdate = 0b11,\n}\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n *   if (rf & RenderFlags.Update) {\n *    i18nExp(bind(ctx.exp1)); // If changed set mask bit 1\n *    i18nExp(bind(ctx.exp2)); // If changed set mask bit 2\n *    i18nExp(bind(ctx.exp3)); // If changed set mask bit 3\n *    i18nExp(bind(ctx.exp4)); // If changed set mask bit 4\n *    i18nApply(0);            // Apply all changes by executing the OpCodes.\n *  }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n *   // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n *   // If `changeMask & 0b11`\n *   //        has changed then execute update OpCodes.\n *   //        has NOT changed then skip `7` values and start processing next OpCodes.\n *   0b11, 7,\n *   // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n *   'pre', -4, 'in', -3, 'post',\n *   // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n *   1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n *   // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n *   // If `changeMask & 0b100`\n *   //        has changed then execute update OpCodes.\n *   //        has NOT changed then skip `4` values and start processing next OpCodes.\n *   0b100, 4,\n *   // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n *   'Hello ', -2, '!',\n *   // Update text: `lView[1].textContent = newValue;`\n *   1 << SHIFT_REF | Text,\n *\n *   // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n *   // If `changeMask & 0b1000`\n *   //        has changed then execute update OpCodes.\n *   //        has NOT changed then skip `4` values and start processing next OpCodes.\n *   0b1000, 4,\n *   // Concatenate `newValue = lView[bindIndex -1];`.\n *   -1,\n *   // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n *   0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n *   // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n *   -1, 1,\n *   // Update ICU: `icuUpdateCase(lView[1], 0);`\n *   0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string|number|SanitizerFn|null> {}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n  /**\n   * Number of slots to allocate in expando.\n   *\n   * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n   * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n   * write into them.\n   */\n  vars: number;\n\n  /**\n   * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n   *\n   * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n   */\n  create: I18nMutateOpCodes;\n\n  /**\n   * A set of OpCodes which will be executed on each change detection to determine if any changes to\n   * DOM are required.\n   */\n  update: I18nUpdateOpCodes;\n\n  /**\n   * A list of ICUs in a translation block (or `null` if block has no ICUs).\n   *\n   * Example:\n   * Given: `<div i18n>You have {count, plural, ...} and {state, switch, ...}</div>`\n   * There would be 2 ICUs in this array.\n   *   1. `{count, plural, ...}`\n   *   2. `{state, switch, ...}`\n   */\n  icus: TIcu[]|null;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n  select = 0,\n  plural = 1,\n}\n\nexport interface TIcu {\n  /**\n   * Defines the ICU type of `select` or `plural`\n   */\n  type: IcuType;\n\n  /**\n   * Number of slots to allocate in expando for each case.\n   *\n   * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n   * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n   * write into them.\n   */\n  vars: number[];\n\n  /**\n   * An optional array of child/sub ICUs.\n   *\n   * In case of nested ICUs such as:\n   * ```\n   * {ï¿½0ï¿½, plural,\n   *   =0 {zero}\n   *   other {ï¿½0ï¿½ {ï¿½1ï¿½, select,\n   *                     cat {cats}\n   *                     dog {dogs}\n   *                     other {animals}\n   *                   }!\n   *   }\n   * }\n   * ```\n   * When the parent ICU is changing it must clean up child ICUs as well. For this reason it needs\n   * to know which child ICUs to run clean up for as well.\n   *\n   * In the above example this would be:\n   * ```ts\n   * [\n   *   [],   // `=0` has no sub ICUs\n   *   [1],  // `other` has one subICU at `1`st index.\n   * ]\n   * ```\n   *\n   * The reason why it is Array of Arrays is because first array represents the case, and second\n   * represents the child ICUs to clean up. There may be more than one child ICUs per case.\n   */\n  childIcus: number[][];\n\n  /**\n   * A list of case values which the current ICU will try to match.\n   *\n   * The last value is `other`\n   */\n  cases: any[];\n\n  /**\n   * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n   */\n  create: I18nMutateOpCodes[];\n\n  /**\n   * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n   */\n  remove: I18nMutateOpCodes[];\n\n  /**\n   * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n   */\n  update: I18nUpdateOpCodes[];\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport function attachDebugObject(obj: any, debug: any) {\n  Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3} from '../interfaces/renderer';\n\nimport {setStylingMapsSyncFn} from './bindings';\nimport {ApplyStylingFn, LStylingData, StylingMapArray, StylingMapArrayIndex, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {concatString, getBindingValue, getMapProp, getMapValue, getValuesCount, hyphenate, isStylingValueDefined, setMapValue} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the algorithm logic for applying map-based bindings\n * such as `[style]` and `[class]`.\n *\n * --------\n */\n\n/**\n * Used to apply styling values presently within any map-based bindings on an element.\n *\n * Angular supports map-based styling bindings which can be applied via the\n * `[style]` and `[class]` bindings which can be placed on any HTML element.\n * These bindings can work independently, together or alongside prop-based\n * styling bindings (e.g. `<div [style]=\"x\" [style.width]=\"w\">`).\n *\n * If a map-based styling binding is detected by the compiler, the following\n * AOT code is produced:\n *\n * ```typescript\n * styleMap(ctx.styles); // styles = {key:value}\n * classMap(ctx.classes); // classes = {key:value}|string\n * ```\n *\n * If and when either of the instructions above are evaluated, then the code\n * present in this file is included into the bundle. The mechanism used, to\n * activate support for map-based bindings at runtime is possible via the\n * `activeStylingMapFeature` function (which is also present in this file).\n *\n * # The Algorithm\n * Whenever a map-based binding updates (which is when the identity of the\n * map-value changes) then the map is iterated over and a `StylingMapArray` array\n * is produced. The `StylingMapArray` instance is stored in the binding location\n * where the `BINDING_INDEX` is situated when the `styleMap()` or `classMap()`\n * instruction were called. Once the binding changes, then the internal `bitMask`\n * value is marked as dirty.\n *\n * Styling values are applied once CD exits the element (which happens when\n * the `select(n)` instruction is called or the template function exits). When\n * this occurs, all prop-based bindings are applied. If a map-based binding is\n * present then a special flushing function (called a sync function) is made\n * available and it will be called each time a styling property is flushed.\n *\n * The flushing algorithm is designed to apply styling for a property (which is\n * a CSS property or a className value) one by one. If map-based bindings\n * are present, then the flushing algorithm will keep calling the maps styling\n * sync function each time a property is visited. This way, the flushing\n * behavior of map-based bindings will always be at the same property level\n * as the current prop-based property being iterated over (because everything\n * is alphabetically sorted).\n *\n * Let's imagine we have the following HTML template code:\n *\n * ```html\n * <div [style]=\"{width:'100px', height:'200px', 'z-index':'10'}\"\n *      [style.width.px]=\"200\">...</div>\n * ```\n *\n * When CD occurs, both the `[style]` and `[style.width]` bindings\n * are evaluated. Then when the styles are flushed on screen, the\n * following operations happen:\n *\n * 1. `[style.width]` is attempted to be written to the element.\n *\n * 2.  Once that happens, the algorithm instructs the map-based\n *     entries (`[style]` in this case) to \"catch up\" and apply\n *     all values up to the `width` value. When this happens the\n *     `height` value is applied to the element (since it is\n *     alphabetically situated before the `width` property).\n *\n * 3. Since there are no more prop-based entries anymore, the\n *    loop exits and then, just before the flushing ends, it\n *    instructs all map-based bindings to \"finish up\" applying\n *    their values.\n *\n * 4. The only remaining value within the map-based entries is\n *    the `z-index` value (`width` got skipped because it was\n *    successfully applied via the prop-based `[style.width]`\n *    binding). Since all map-based entries are told to \"finish up\",\n *    the `z-index` value is iterated over and it is then applied\n *    to the element.\n *\n * The most important thing to take note of here is that prop-based\n * bindings are evaluated in order alongside map-based bindings.\n * This allows all styling across an element to be applied in O(n)\n * time (a similar algorithm is that of the array merge algorithm\n * in merge sort).\n */\nexport const syncStylingMap: SyncStylingMapsFn =\n    (context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n     data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n     mode: StylingMapsSyncMode, targetProp?: string | null,\n     defaultValue?: string | null): boolean => {\n      let targetPropValueWasApplied = false;\n\n      // once the map-based styling code is activate it is never deactivated. For this reason a\n      // check to see if the current styling context has any map based bindings is required.\n      const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n      if (totalMaps) {\n        let runTheSyncAlgorithm = true;\n        const loopUntilEnd = !targetProp;\n\n        // If the code is told to finish up (run until the end), but the mode\n        // hasn't been flagged to apply values (it only traverses values) then\n        // there is no point in iterating over the array because nothing will\n        // be applied to the element.\n        if (loopUntilEnd && (mode & ~StylingMapsSyncMode.ApplyAllValues)) {\n          runTheSyncAlgorithm = false;\n          targetPropValueWasApplied = true;\n        }\n\n        if (runTheSyncAlgorithm) {\n          targetPropValueWasApplied = innerSyncStylingMap(\n              context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp || null,\n              0, defaultValue || null);\n        }\n\n        if (loopUntilEnd) {\n          resetSyncCursors();\n        }\n      }\n\n      return targetPropValueWasApplied;\n    };\n\n/**\n * Recursive function designed to apply map-based styling to an element one map at a time.\n *\n * This function is designed to be called from the `syncStylingMap` function and will\n * apply map-based styling data one map at a time to the provided `element`.\n *\n * This function is recursive and it will call itself if a follow-up map value is to be\n * processed. To learn more about how the algorithm works, see `syncStylingMap`.\n */\nfunction innerSyncStylingMap(\n    context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n    data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n    mode: StylingMapsSyncMode, targetProp: string | null, currentMapIndex: number,\n    defaultValue: string | null): boolean {\n  let targetPropValueWasApplied = false;\n  const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n  if (currentMapIndex < totalMaps) {\n    const bindingIndex = getBindingValue(\n        context, TStylingContextIndex.MapBindingsPosition, currentMapIndex) as number;\n    const stylingMapArr = data[bindingIndex] as StylingMapArray;\n\n    let cursor = getCurrentSyncCursor(currentMapIndex);\n    while (cursor < stylingMapArr.length) {\n      const prop = getMapProp(stylingMapArr, cursor);\n      const iteratedTooFar = targetProp && prop > targetProp;\n      const isTargetPropMatched = !iteratedTooFar && prop === targetProp;\n      const value = getMapValue(stylingMapArr, cursor);\n      const valueIsDefined = isStylingValueDefined(value);\n\n      // the recursive code is designed to keep applying until\n      // it reaches or goes past the target prop. If and when\n      // this happens then it will stop processing values, but\n      // all other map values must also catch up to the same\n      // point. This is why a recursive call is still issued\n      // even if the code has iterated too far.\n      const innerMode =\n          iteratedTooFar ? mode : resolveInnerMapMode(mode, valueIsDefined, isTargetPropMatched);\n      const innerProp = iteratedTooFar ? targetProp : prop;\n      let valueApplied = innerSyncStylingMap(\n          context, renderer, element, data, applyStylingFn, sanitizer, innerMode, innerProp,\n          currentMapIndex + 1, defaultValue);\n\n      if (iteratedTooFar) {\n        if (!targetPropValueWasApplied) {\n          targetPropValueWasApplied = valueApplied;\n        }\n        break;\n      }\n\n      if (!valueApplied && isValueAllowedToBeApplied(mode, isTargetPropMatched)) {\n        const useDefault = isTargetPropMatched && !valueIsDefined;\n        const valueToApply = useDefault ? defaultValue : value;\n        const bindingIndexToApply = useDefault ? bindingIndex : null;\n        const finalValue = sanitizer ?\n            sanitizer(prop, valueToApply, StyleSanitizeMode.ValidateAndSanitize) :\n            valueToApply;\n        applyStylingFn(renderer, element, prop, finalValue, bindingIndexToApply);\n        valueApplied = true;\n      }\n\n      targetPropValueWasApplied = valueApplied && isTargetPropMatched;\n      cursor += StylingMapArrayIndex.TupleSize;\n    }\n    setCurrentSyncCursor(currentMapIndex, cursor);\n\n    // this is a fallback case in the event that the styling map is `null` for this\n    // binding but there are other map-based bindings that need to be evaluated\n    // afterwards. If the `prop` value is falsy then the intention is to cycle\n    // through all of the properties in the remaining maps as well. If the current\n    // styling map is too short then there are no values to iterate over. In either\n    // case the follow-up maps need to be iterated over.\n    if (stylingMapArr.length === StylingMapArrayIndex.ValuesStartPosition || !targetProp) {\n      return innerSyncStylingMap(\n          context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp,\n          currentMapIndex + 1, defaultValue);\n    }\n  }\n\n\n  return targetPropValueWasApplied;\n}\n\n\n/**\n * Enables support for map-based styling bindings (e.g. `[style]` and `[class]` bindings).\n */\nexport function activateStylingMapFeature() {\n  setStylingMapsSyncFn(syncStylingMap);\n}\n\n/**\n * Used to determine the mode for the inner recursive call.\n *\n * If an inner map is iterated on then this is done so for one\n * of two reasons:\n *\n * - value is being applied:\n *   if the value is being applied from this current styling\n *   map then there is no need to apply it in a deeper map.\n *\n * - value is being not applied:\n *   apply the value if it is found in a deeper map.\n *\n * When these reasons are encountered the flags will for the\n * inner map mode will be configured.\n */\nfunction resolveInnerMapMode(\n    currentMode: number, valueIsDefined: boolean, isExactMatch: boolean): number {\n  let innerMode = currentMode;\n  if (!valueIsDefined && !(currentMode & StylingMapsSyncMode.SkipTargetProp) &&\n      (isExactMatch || (currentMode & StylingMapsSyncMode.ApplyAllValues))) {\n    // case 1: set the mode to apply the targeted prop value if it\n    // ends up being encountered in another map value\n    innerMode |= StylingMapsSyncMode.ApplyTargetProp;\n    innerMode &= ~StylingMapsSyncMode.SkipTargetProp;\n  } else {\n    // case 2: set the mode to skip the targeted prop value if it\n    // ends up being encountered in another map value\n    innerMode |= StylingMapsSyncMode.SkipTargetProp;\n    innerMode &= ~StylingMapsSyncMode.ApplyTargetProp;\n  }\n\n  return innerMode;\n}\n\n/**\n * Decides whether or not a prop/value entry will be applied to an element.\n *\n * To determine whether or not a value is to be applied,\n * the following procedure is evaluated:\n *\n * First check to see the current `mode` status:\n *  1. If the mode value permits all props to be applied then allow.\n *    - But do not allow if the current prop is set to be skipped.\n *  2. Otherwise if the current prop is permitted then allow.\n */\nfunction isValueAllowedToBeApplied(mode: number, isTargetPropMatched: boolean) {\n  let doApplyValue = (mode & StylingMapsSyncMode.ApplyAllValues) > 0;\n  if (!doApplyValue) {\n    if (mode & StylingMapsSyncMode.ApplyTargetProp) {\n      doApplyValue = isTargetPropMatched;\n    }\n  } else if ((mode & StylingMapsSyncMode.SkipTargetProp) && isTargetPropMatched) {\n    doApplyValue = false;\n  }\n  return doApplyValue;\n}\n\n/**\n * Used to keep track of concurrent cursor values for multiple map-based styling bindings present on\n * an element.\n */\nconst MAP_CURSORS: number[] = [];\n\n/**\n * Used to reset the state of each cursor value being used to iterate over map-based styling\n * bindings.\n */\nfunction resetSyncCursors() {\n  for (let i = 0; i < MAP_CURSORS.length; i++) {\n    MAP_CURSORS[i] = StylingMapArrayIndex.ValuesStartPosition;\n  }\n}\n\n/**\n * Returns an active cursor value at a given mapIndex location.\n */\nfunction getCurrentSyncCursor(mapIndex: number) {\n  if (mapIndex >= MAP_CURSORS.length) {\n    MAP_CURSORS.push(StylingMapArrayIndex.ValuesStartPosition);\n  }\n  return MAP_CURSORS[mapIndex];\n}\n\n/**\n * Sets a cursor value at a given mapIndex location.\n */\nfunction setCurrentSyncCursor(mapIndex: number, indexValue: number) {\n  MAP_CURSORS[mapIndex] = indexValue;\n}\n\n/**\n * Used to convert a {key:value} map into a `StylingMapArray` array.\n *\n * This function will either generate a new `StylingMapArray` instance\n * or it will patch the provided `newValues` map value into an\n * existing `StylingMapArray` value (this only happens if `bindingValue`\n * is an instance of `StylingMapArray`).\n *\n * If a new key/value map is provided with an old `StylingMapArray`\n * value then all properties will be overwritten with their new\n * values or with `null`. This means that the array will never\n * shrink in size (but it will also not be created and thrown\n * away whenever the {key:value} map entries change).\n */\nexport function normalizeIntoStylingMap(\n    bindingValue: null | StylingMapArray,\n    newValues: {[key: string]: any} | string | null | undefined,\n    normalizeProps?: boolean): StylingMapArray {\n  const stylingMapArr: StylingMapArray = Array.isArray(bindingValue) ? bindingValue : [null];\n  stylingMapArr[StylingMapArrayIndex.RawValuePosition] = newValues || null;\n\n  // because the new values may not include all the properties\n  // that the old ones had, all values are set to `null` before\n  // the new values are applied. This way, when flushed, the\n  // styling algorithm knows exactly what style/class values\n  // to remove from the element (since they are `null`).\n  for (let j = StylingMapArrayIndex.ValuesStartPosition; j < stylingMapArr.length;\n       j += StylingMapArrayIndex.TupleSize) {\n    setMapValue(stylingMapArr, j, null);\n  }\n\n  let props: string[]|null = null;\n  let map: {[key: string]: any}|undefined|null;\n  let allValuesTrue = false;\n  if (typeof newValues === 'string') {  // [class] bindings allow string values\n    if (newValues.length) {\n      props = newValues.split(/\\s+/);\n      allValuesTrue = true;\n    }\n  } else {\n    props = newValues ? Object.keys(newValues) : null;\n    map = newValues;\n  }\n\n  if (props) {\n    for (let i = 0; i < props.length; i++) {\n      const prop = props[i] as string;\n      const newProp = normalizeProps ? hyphenate(prop) : prop;\n      const value = allValuesTrue ? true : map ![prop];\n      addItemToStylingMap(stylingMapArr, newProp, value, true);\n    }\n  }\n\n  return stylingMapArr;\n}\n\n/**\n * Inserts the provided item into the provided styling array at the right spot.\n *\n * The `StylingMapArray` type is a sorted key/value array of entries. This means\n * that when a new entry is inserted it must be placed at the right spot in the\n * array. This function figures out exactly where to place it.\n */\nexport function addItemToStylingMap(\n    stylingMapArr: StylingMapArray, prop: string, value: string | boolean | null,\n    allowOverwrite?: boolean) {\n  for (let j = StylingMapArrayIndex.ValuesStartPosition; j < stylingMapArr.length;\n       j += StylingMapArrayIndex.TupleSize) {\n    const propAtIndex = getMapProp(stylingMapArr, j);\n    if (prop <= propAtIndex) {\n      let applied = false;\n      if (propAtIndex === prop) {\n        const valueAtIndex = stylingMapArr[j];\n        if (allowOverwrite || !isStylingValueDefined(valueAtIndex)) {\n          applied = true;\n          setMapValue(stylingMapArr, j, value);\n        }\n      } else {\n        applied = true;\n        stylingMapArr.splice(j, 0, prop, value);\n      }\n      return applied;\n    }\n  }\n\n  stylingMapArr.push(prop, value);\n  return true;\n}\n\n/**\n * Converts the provided styling map array into a string.\n *\n * Classes => `one two three`\n * Styles => `prop:value; prop2:value2`\n */\nexport function stylingMapToString(map: StylingMapArray, isClassBased: boolean): string {\n  let str = '';\n  for (let i = StylingMapArrayIndex.ValuesStartPosition; i < map.length;\n       i += StylingMapArrayIndex.TupleSize) {\n    const prop = getMapProp(map, i);\n    const value = getMapValue(map, i) as string;\n    const attrValue = concatString(prop, isClassBased ? '' : value, ':');\n    str = concatString(str, attrValue, isClassBased ? ' ' : '; ');\n  }\n  return str;\n}\n\n/**\n * Converts the provided styling map array into a key value map.\n */\nexport function stylingMapToStringMap(map: StylingMapArray | null): {[key: string]: any} {\n  let stringMap: {[key: string]: any} = {};\n  if (map) {\n    for (let i = StylingMapArrayIndex.ValuesStartPosition; i < map.length;\n         i += StylingMapArrayIndex.TupleSize) {\n      const prop = getMapProp(map, i);\n      const value = getMapValue(map, i) as string;\n      stringMap[prop] = value;\n    }\n  }\n  return stringMap;\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {RElement} from '../interfaces/renderer';\nimport {LView} from '../interfaces/view';\nimport {getCurrentStyleSanitizer} from '../state';\nimport {attachDebugObject} from '../util/debug_utils';\n\nimport {applyStyling} from './bindings';\nimport {ApplyStylingFn, LStylingData, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {activateStylingMapFeature} from './map_based_bindings';\nimport {getDefaultValue, getGuardMask, getProp, getValuesCount, isContextLocked, isMapBased, isSanitizationRequired} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core debug functionality for styling in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n\n/**\n * A debug/testing-oriented summary of a styling entry.\n *\n * A value such as this is generated as an artifact of the `DebugStyling`\n * summary.\n */\nexport interface LStylingSummary {\n  /** The style/class property that the summary is attached to */\n  prop: string;\n\n  /** The last applied value for the style/class property */\n  value: string|boolean|null;\n\n  /** The binding index of the last applied style/class property */\n  bindingIndex: number|null;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries for a `DebugNode` instance.\n */\nexport interface DebugStyling {\n  /** The associated TStylingContext instance */\n  context: TStylingContext;\n\n  /**\n   * A summarization of each style/class property\n   * present in the context.\n   */\n  summary: {[key: string]: LStylingSummary};\n\n  /**\n   * A key/value map of all styling properties and their\n   * runtime values.\n   */\n  values: {[key: string]: string | number | null | boolean};\n\n  /**\n   * Overrides the sanitizer used to process styles.\n   */\n  overrideSanitizer(sanitizer: StyleSanitizeFn|null): void;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries within a `TStylingContext`.\n */\nexport interface TStylingTupleSummary {\n  /** The property (style or class property) that this tuple represents */\n  prop: string;\n\n  /** The total amount of styling entries a part of this tuple */\n  valuesCount: number;\n\n  /**\n   * The bit guard mask that is used to compare and protect against\n   * styling changes when and styling bindings update\n   */\n  guardMask: number;\n\n  /**\n   * Whether or not the entry requires sanitization\n   */\n  sanitizationRequired: boolean;\n\n  /**\n   * The default value that will be applied if any bindings are falsy.\n   */\n  defaultValue: string|boolean|null;\n\n  /**\n   * All bindingIndex sources that have been registered for this style.\n   */\n  sources: (number|null|string)[];\n}\n\n/**\n * Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.\n */\nexport function attachStylingDebugObject(context: TStylingContext) {\n  const debug = new TStylingContextDebug(context);\n  attachDebugObject(context, debug);\n  return debug;\n}\n\n/**\n * A human-readable debug summary of the styling data present within `TStylingContext`.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nclass TStylingContextDebug {\n  constructor(public readonly context: TStylingContext) {}\n\n  get isLocked() { return isContextLocked(this.context); }\n\n  /**\n   * Returns a detailed summary of each styling entry in the context.\n   *\n   * See `TStylingTupleSummary`.\n   */\n  get entries(): {[prop: string]: TStylingTupleSummary} {\n    const context = this.context;\n    const entries: {[prop: string]: TStylingTupleSummary} = {};\n    const start = TStylingContextIndex.MapBindingsPosition;\n    let i = start;\n    while (i < context.length) {\n      const valuesCount = getValuesCount(context, i);\n      // the context may contain placeholder values which are populated ahead of time,\n      // but contain no actual binding values. In this situation there is no point in\n      // classifying this as an \"entry\" since no real data is stored here yet.\n      if (valuesCount) {\n        const prop = getProp(context, i);\n        const guardMask = getGuardMask(context, i);\n        const defaultValue = getDefaultValue(context, i);\n        const sanitizationRequired = isSanitizationRequired(context, i);\n        const bindingsStartPosition = i + TStylingContextIndex.BindingsStartOffset;\n\n        const sources: (number | string | null)[] = [];\n        for (let j = 0; j < valuesCount; j++) {\n          sources.push(context[bindingsStartPosition + j] as number | string | null);\n        }\n\n        entries[prop] = {prop, guardMask, sanitizationRequired, valuesCount, defaultValue, sources};\n      }\n\n      i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n    }\n    return entries;\n  }\n}\n\n/**\n * A human-readable debug summary of the styling data present for a `DebugNode` instance.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nexport class NodeStylingDebug implements DebugStyling {\n  private _sanitizer: StyleSanitizeFn|null = null;\n\n  constructor(\n      public context: TStylingContext, private _data: LStylingData,\n      private _isClassBased?: boolean) {}\n\n  /**\n   * Overrides the sanitizer used to process styles.\n   */\n  overrideSanitizer(sanitizer: StyleSanitizeFn|null) { this._sanitizer = sanitizer; }\n\n  /**\n   * Returns a detailed summary of each styling entry in the context and\n   * what their runtime representation is.\n   *\n   * See `LStylingSummary`.\n   */\n  get summary(): {[key: string]: LStylingSummary} {\n    const entries: {[key: string]: LStylingSummary} = {};\n    this._mapValues((prop: string, value: any, bindingIndex: number | null) => {\n      entries[prop] = {prop, value, bindingIndex};\n    });\n    return entries;\n  }\n\n  /**\n   * Returns a key/value map of all the styles/classes that were last applied to the element.\n   */\n  get values(): {[key: string]: any} {\n    const entries: {[key: string]: any} = {};\n    this._mapValues((prop: string, value: any) => { entries[prop] = value; });\n    return entries;\n  }\n\n  private _mapValues(fn: (prop: string, value: string|null, bindingIndex: number|null) => any) {\n    // there is no need to store/track an element instance. The\n    // element is only used when the styling algorithm attempts to\n    // style the value (and we mock out the stylingApplyFn anyway).\n    const mockElement = {} as any;\n    const hasMaps = getValuesCount(this.context, TStylingContextIndex.MapBindingsPosition) > 0;\n    if (hasMaps) {\n      activateStylingMapFeature();\n    }\n\n    const mapFn: ApplyStylingFn =\n        (renderer: any, element: RElement, prop: string, value: string | null,\n         bindingIndex?: number | null) => { fn(prop, value, bindingIndex || null); };\n\n    const sanitizer = this._isClassBased ? null : (this._sanitizer || getCurrentStyleSanitizer());\n    applyStyling(this.context, null, mockElement, this._data, true, mapFn, sanitizer);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AttributeMarker, ComponentTemplate} from '..';\nimport {SchemaMetadata} from '../../core';\nimport {assertDefined} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS, NATIVE} from '../interfaces/container';\nimport {DirectiveDefList, PipeDefList, ViewQueriesFunction} from '../interfaces/definition';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, TIcu} from '../interfaces/i18n';\nimport {PropertyAliases, TContainerNode, TElementNode, TNode as ITNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType, TViewNode} from '../interfaces/node';\nimport {SelectorFlags} from '../interfaces/projection';\nimport {TQueries} from '../interfaces/query';\nimport {RComment, RElement, RNode} from '../interfaces/renderer';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, TView, T_HOST} from '../interfaces/view';\nimport {TStylingContext} from '../styling_next/interfaces';\nimport {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling_next/styling_debug';\nimport {isStylingContext} from '../styling_next/util';\nimport {attachDebugObject} from '../util/debug_utils';\nimport {getTNode, unwrapRNode} from '../util/view_utils';\n\n\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, â¦]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n *   views: [...],\n *   flags: {attached: true, ...}\n *   nodes: [\n *     {html: '<div id=\"123\">', ..., nodes: [\n *       {html: '<span>', ..., nodes: null}\n *     ]}\n *   ]\n * }\n * ```\n */\n\n\nexport const LViewArray = ngDevMode && createNamedArrayType('LView');\nlet LVIEW_EMPTY: unknown[];  // can't initialize here or it will not be tree shaken, because `LView`\n                             // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nexport function cloneToLView(list: any[]): LView {\n  if (LVIEW_EMPTY === undefined) LVIEW_EMPTY = new LViewArray !();\n  return LVIEW_EMPTY.concat(list) as any;\n}\n\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up in\n * debug tools in ngDevMode.\n */\nexport const TViewConstructor = class TView implements ITView {\n  constructor(\n      public id: number,                                     //\n      public blueprint: LView,                               //\n      public template: ComponentTemplate<{}>|null,           //\n      public queries: TQueries|null,                         //\n      public viewQuery: ViewQueriesFunction<{}>|null,        //\n      public node: TViewNode|TElementNode|null,              //\n      public data: TData,                                    //\n      public bindingStartIndex: number,                      //\n      public expandoStartIndex: number,                      //\n      public expandoInstructions: ExpandoInstructions|null,  //\n      public firstTemplatePass: boolean,                     //\n      public staticViewQueries: boolean,                     //\n      public staticContentQueries: boolean,                  //\n      public preOrderHooks: HookData|null,                   //\n      public preOrderCheckHooks: HookData|null,              //\n      public contentHooks: HookData|null,                    //\n      public contentCheckHooks: HookData|null,               //\n      public viewHooks: HookData|null,                       //\n      public viewCheckHooks: HookData|null,                  //\n      public destroyHooks: HookData|null,                    //\n      public cleanup: any[]|null,                            //\n      public contentQueries: number[]|null,                  //\n      public components: number[]|null,                      //\n      public directiveRegistry: DirectiveDefList|null,       //\n      public pipeRegistry: PipeDefList|null,                 //\n      public firstChild: TNode|null,                         //\n      public schemas: SchemaMetadata[]|null,                 //\n      ) {}\n};\n\nexport const TNodeConstructor = class TNode implements ITNode {\n  constructor(\n      public tView_: TView,                                                    //\n      public type: TNodeType,                                                  //\n      public index: number,                                                    //\n      public injectorIndex: number,                                            //\n      public directiveStart: number,                                           //\n      public directiveEnd: number,                                             //\n      public propertyMetadataStartIndex: number,                               //\n      public propertyMetadataEndIndex: number,                                 //\n      public flags: TNodeFlags,                                                //\n      public providerIndexes: TNodeProviderIndexes,                            //\n      public tagName: string|null,                                             //\n      public attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null,  //\n      public localNames: (string|number)[]|null,                               //\n      public initialInputs: (string[]|null)[]|null|undefined,                  //\n      public inputs: PropertyAliases|null|undefined,                           //\n      public outputs: PropertyAliases|null|undefined,                          //\n      public tViews: ITView|ITView[]|null,                                     //\n      public next: ITNode|null,                                                //\n      public projectionNext: ITNode|null,                                      //\n      public child: ITNode|null,                                               //\n      public parent: TElementNode|TContainerNode|null,                         //\n      public projection: number|(ITNode|RNode[])[]|null,                       //\n      public styles: TStylingContext|null,                                     //\n      public classes: TStylingContext|null,                                    //\n      ) {}\n\n  get type_(): string {\n    switch (this.type) {\n      case TNodeType.Container:\n        return 'TNodeType.Container';\n      case TNodeType.Element:\n        return 'TNodeType.Element';\n      case TNodeType.ElementContainer:\n        return 'TNodeType.ElementContainer';\n      case TNodeType.IcuContainer:\n        return 'TNodeType.IcuContainer';\n      case TNodeType.Projection:\n        return 'TNodeType.Projection';\n      case TNodeType.View:\n        return 'TNodeType.View';\n      default:\n        return 'TNodeType.???';\n    }\n  }\n\n  get flags_(): string {\n    const flags: string[] = [];\n    if (this.flags & TNodeFlags.hasClassInput) flags.push('TNodeFlags.hasClassInput');\n    if (this.flags & TNodeFlags.hasContentQuery) flags.push('TNodeFlags.hasContentQuery');\n    if (this.flags & TNodeFlags.hasStyleInput) flags.push('TNodeFlags.hasStyleInput');\n    if (this.flags & TNodeFlags.isComponent) flags.push('TNodeFlags.isComponent');\n    if (this.flags & TNodeFlags.isDetached) flags.push('TNodeFlags.isDetached');\n    if (this.flags & TNodeFlags.isProjected) flags.push('TNodeFlags.isProjected');\n    return flags.join('|');\n  }\n};\n\nconst TViewData = ngDevMode && createNamedArrayType('TViewData');\nlet TVIEWDATA_EMPTY:\n    unknown[];  // can't initialize here or it will not be tree shaken, because `LView`\n                // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nexport function cloneToTViewData(list: any[]): TData {\n  if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData !();\n  return TVIEWDATA_EMPTY.concat(list) as any;\n}\n\nexport const LViewBlueprint = ngDevMode && createNamedArrayType('LViewBlueprint');\nexport const MatchesArray = ngDevMode && createNamedArrayType('MatchesArray');\nexport const TViewComponents = ngDevMode && createNamedArrayType('TViewComponents');\nexport const TNodeLocalNames = ngDevMode && createNamedArrayType('TNodeLocalNames');\nexport const TNodeInitialInputs = ngDevMode && createNamedArrayType('TNodeInitialInputs');\nexport const TNodeInitialData = ngDevMode && createNamedArrayType('TNodeInitialData');\nexport const LCleanup = ngDevMode && createNamedArrayType('LCleanup');\nexport const TCleanup = ngDevMode && createNamedArrayType('TCleanup');\n\n\n\nexport function attachLViewDebug(lView: LView) {\n  attachDebugObject(lView, new LViewDebug(lView));\n}\n\nexport function attachLContainerDebug(lContainer: LContainer) {\n  attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nexport function toDebug(obj: LView): LViewDebug;\nexport function toDebug(obj: LView | null): LViewDebug|null;\nexport function toDebug(obj: LView | LContainer | null): LViewDebug|LContainerDebug|null;\nexport function toDebug(obj: any): any {\n  if (obj) {\n    const debug = (obj as any).debug;\n    assertDefined(debug, 'Object does not have a debug representation.');\n    return debug;\n  } else {\n    return obj;\n  }\n}\n\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element itself\n * (will not serialize child elements).\n */\nfunction toHtml(value: any, includeChildren: boolean = false): string|null {\n  const node: HTMLElement|null = unwrapRNode(value) as any;\n  if (node) {\n    const isTextNode = node.nodeType === Node.TEXT_NODE;\n    const outerHTML = (isTextNode ? node.textContent : node.outerHTML) || '';\n    if (includeChildren || isTextNode) {\n      return outerHTML;\n    } else {\n      const innerHTML = node.innerHTML;\n      return outerHTML.split(innerHTML)[0] || null;\n    }\n  } else {\n    return null;\n  }\n}\n\nexport class LViewDebug {\n  constructor(private readonly _raw_lView: LView) {}\n\n  /**\n   * Flags associated with the `LView` unpacked into a more readable state.\n   */\n  get flags() {\n    const flags = this._raw_lView[FLAGS];\n    return {\n      __raw__flags__: flags,\n      initPhaseState: flags & LViewFlags.InitPhaseStateMask,\n      creationMode: !!(flags & LViewFlags.CreationMode),\n      firstViewPass: !!(flags & LViewFlags.FirstLViewPass),\n      checkAlways: !!(flags & LViewFlags.CheckAlways),\n      dirty: !!(flags & LViewFlags.Dirty),\n      attached: !!(flags & LViewFlags.Attached),\n      destroyed: !!(flags & LViewFlags.Destroyed),\n      isRoot: !!(flags & LViewFlags.IsRoot),\n      indexWithinInitPhase: flags >> LViewFlags.IndexWithinInitPhaseShift,\n    };\n  }\n  get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lView[PARENT]); }\n  get host(): string|null { return toHtml(this._raw_lView[HOST], true); }\n  get context(): {}|null { return this._raw_lView[CONTEXT]; }\n  /**\n   * The tree of nodes associated with the current `LView`. The nodes have been normalized into a\n   * tree structure with relevant details pulled out for readability.\n   */\n  get nodes(): DebugNode[]|null {\n    const lView = this._raw_lView;\n    const tNode = lView[TVIEW].firstChild;\n    return toDebugNodes(tNode, lView);\n  }\n  /**\n   * Additional information which is hidden behind a property. The extra level of indirection is\n   * done so that the debug view would not be cluttered with properties which are only rarely\n   * relevant to the developer.\n   */\n  get __other__() {\n    return {\n      tView: this._raw_lView[TVIEW],\n      cleanup: this._raw_lView[CLEANUP],\n      injector: this._raw_lView[INJECTOR],\n      rendererFactory: this._raw_lView[RENDERER_FACTORY],\n      renderer: this._raw_lView[RENDERER],\n      sanitizer: this._raw_lView[SANITIZER],\n      childHead: toDebug(this._raw_lView[CHILD_HEAD]),\n      next: toDebug(this._raw_lView[NEXT]),\n      childTail: toDebug(this._raw_lView[CHILD_TAIL]),\n      declarationView: toDebug(this._raw_lView[DECLARATION_VIEW]),\n      queries: null,\n      tHost: this._raw_lView[T_HOST],\n      bindingIndex: this._raw_lView[BINDING_INDEX],\n    };\n  }\n\n  /**\n   * Normalized view of child views (and containers) attached at this location.\n   */\n  get childViews(): Array<LViewDebug|LContainerDebug> {\n    const childViews: Array<LViewDebug|LContainerDebug> = [];\n    let child = this.__other__.childHead;\n    while (child) {\n      childViews.push(child);\n      child = child.__other__.next;\n    }\n    return childViews;\n  }\n}\n\nexport interface DebugNode {\n  html: string|null;\n  native: Node;\n  styles: DebugNewStyling|null;\n  classes: DebugNewStyling|null;\n  nodes: DebugNode[]|null;\n  component: LViewDebug|null;\n}\n\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nexport function toDebugNodes(tNode: TNode | null, lView: LView): DebugNode[]|null {\n  if (tNode) {\n    const debugNodes: DebugNode[] = [];\n    let tNodeCursor: TNode|null = tNode;\n    while (tNodeCursor) {\n      const rawValue = lView[tNode.index];\n      const native = unwrapRNode(rawValue);\n      const componentLViewDebug = toDebug(readLViewValue(rawValue));\n      const styles = isStylingContext(tNode.styles) ?\n          new NodeStylingDebug(tNode.styles as any as TStylingContext, lView) :\n          null;\n      const classes = isStylingContext(tNode.classes) ?\n          new NodeStylingDebug(tNode.classes as any as TStylingContext, lView, true) :\n          null;\n      debugNodes.push({\n        html: toHtml(native),\n        native: native as any, styles, classes,\n        nodes: toDebugNodes(tNode.child, lView),\n        component: componentLViewDebug,\n      });\n      tNodeCursor = tNodeCursor.next;\n    }\n    return debugNodes;\n  } else {\n    return null;\n  }\n}\n\nexport class LContainerDebug {\n  constructor(private readonly _raw_lContainer: LContainer) {}\n\n  get activeIndex(): number { return this._raw_lContainer[ACTIVE_INDEX]; }\n  get views(): LViewDebug[] {\n    return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n        .map(toDebug as(l: LView) => LViewDebug);\n  }\n  get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lContainer[PARENT]); }\n  get movedViews(): LView[]|null { return this._raw_lContainer[MOVED_VIEWS]; }\n  get host(): RElement|RComment|LView { return this._raw_lContainer[HOST]; }\n  get native(): RComment { return this._raw_lContainer[NATIVE]; }\n  get __other__() {\n    return {\n      next: toDebug(this._raw_lContainer[NEXT]),\n    };\n  }\n}\n\n/**\n * Return an `LView` value if found.\n *\n * @param value `LView` if any\n */\nexport function readLViewValue(value: any): LView|null {\n  while (Array.isArray(value)) {\n    // This check is not quite right, as it does not take into account `StylingContext`\n    // This is why it is in debug, not in util.ts\n    if (value.length >= HEADER_OFFSET - 1) return value as LView;\n    value = value[HOST];\n  }\n  return null;\n}\n\nexport class I18NDebugItem {\n  [key: string]: any;\n\n  get tNode() { return getTNode(this.nodeIndex, this._lView); }\n\n  constructor(\n      public __raw_opCode: any, private _lView: LView, public nodeIndex: number,\n      public type: string) {}\n}\n\n/**\n * Turns a list of \"Create\" & \"Update\" OpCodes into a human-readable list of operations for\n * debugging purposes.\n * @param mutateOpCodes mutation opCodes to read\n * @param updateOpCodes update opCodes to read\n * @param icus list of ICU expressions\n * @param lView The view the opCodes are acting on\n */\nexport function attachI18nOpCodesDebug(\n    mutateOpCodes: I18nMutateOpCodes, updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null,\n    lView: LView) {\n  attachDebugObject(mutateOpCodes, new I18nMutateOpCodesDebug(mutateOpCodes, lView));\n  attachDebugObject(updateOpCodes, new I18nUpdateOpCodesDebug(updateOpCodes, icus, lView));\n\n  if (icus) {\n    icus.forEach(icu => {\n      icu.create.forEach(\n          icuCase => { attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView)); });\n      icu.update.forEach(icuCase => {\n        attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));\n      });\n    });\n  }\n}\n\nexport class I18nMutateOpCodesDebug implements I18nOpCodesDebug {\n  constructor(private readonly __raw_opCodes: I18nMutateOpCodes, private readonly __lView: LView) {}\n\n  /**\n   * A list of operation information about how the OpCodes will act on the view.\n   */\n  get operations() {\n    const {__lView, __raw_opCodes} = this;\n    const results: any[] = [];\n\n    for (let i = 0; i < __raw_opCodes.length; i++) {\n      const opCode = __raw_opCodes[i];\n      let result: any;\n      if (typeof opCode === 'string') {\n        result = {\n          __raw_opCode: opCode,\n          type: 'Create Text Node',\n          nodeIndex: __raw_opCodes[++i],\n          text: opCode,\n        };\n      }\n\n      if (typeof opCode === 'number') {\n        switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n          case I18nMutateOpCode.AppendChild:\n            const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n            result = new I18NDebugItem(opCode, __lView, destinationNodeIndex, 'AppendChild');\n            break;\n          case I18nMutateOpCode.Select:\n            const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n            result = new I18NDebugItem(opCode, __lView, nodeIndex, 'Select');\n            break;\n          case I18nMutateOpCode.ElementEnd:\n            let elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n            result = new I18NDebugItem(opCode, __lView, elementIndex, 'ElementEnd');\n            break;\n          case I18nMutateOpCode.Attr:\n            elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n            result = new I18NDebugItem(opCode, __lView, elementIndex, 'Attr');\n            result['attrName'] = __raw_opCodes[++i];\n            result['attrValue'] = __raw_opCodes[++i];\n            break;\n        }\n      }\n\n      if (!result) {\n        switch (opCode) {\n          case COMMENT_MARKER:\n            result = {\n              __raw_opCode: opCode,\n              type: 'COMMENT_MARKER',\n              commentValue: __raw_opCodes[++i],\n              nodeIndex: __raw_opCodes[++i],\n            };\n            break;\n          case ELEMENT_MARKER:\n            result = {\n              __raw_opCode: opCode,\n              type: 'ELEMENT_MARKER',\n            };\n            break;\n        }\n      }\n\n      if (!result) {\n        result = {\n          __raw_opCode: opCode,\n          type: 'Unknown Op Code',\n          code: opCode,\n        };\n      }\n\n      results.push(result);\n    }\n\n    return results;\n  }\n}\n\nexport class I18nUpdateOpCodesDebug implements I18nOpCodesDebug {\n  constructor(\n      private readonly __raw_opCodes: I18nUpdateOpCodes, private readonly icus: TIcu[]|null,\n      private readonly __lView: LView) {}\n\n  /**\n   * A list of operation information about how the OpCodes will act on the view.\n   */\n  get operations() {\n    const {__lView, __raw_opCodes, icus} = this;\n    const results: any[] = [];\n\n    for (let i = 0; i < __raw_opCodes.length; i++) {\n      // bit code to check if we should apply the next update\n      const checkBit = __raw_opCodes[i] as number;\n      // Number of opCodes to skip until next set of update codes\n      const skipCodes = __raw_opCodes[++i] as number;\n      let value = '';\n      for (let j = i + 1; j <= (i + skipCodes); j++) {\n        const opCode = __raw_opCodes[j];\n        if (typeof opCode === 'string') {\n          value += opCode;\n        } else if (typeof opCode == 'number') {\n          if (opCode < 0) {\n            // It's a binding index whose value is negative\n            // We cannot know the value of the binding so we only show the index\n            value += `ï¿½${-opCode - 1}ï¿½`;\n          } else {\n            const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n            let tIcuIndex: number;\n            let tIcu: TIcu;\n            switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n              case I18nUpdateOpCode.Attr:\n                const attrName = __raw_opCodes[++j] as string;\n                const sanitizeFn = __raw_opCodes[++j];\n                results.push({\n                  __raw_opCode: opCode,\n                  checkBit,\n                  type: 'Attr',\n                  attrValue: value, attrName, sanitizeFn,\n                });\n                break;\n              case I18nUpdateOpCode.Text:\n                results.push({\n                  __raw_opCode: opCode,\n                  checkBit,\n                  type: 'Text', nodeIndex,\n                  text: value,\n                });\n                break;\n              case I18nUpdateOpCode.IcuSwitch:\n                tIcuIndex = __raw_opCodes[++j] as number;\n                tIcu = icus ![tIcuIndex];\n                let result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuSwitch');\n                result['tIcuIndex'] = tIcuIndex;\n                result['checkBit'] = checkBit;\n                result['mainBinding'] = value;\n                result['tIcu'] = tIcu;\n                results.push(result);\n                break;\n              case I18nUpdateOpCode.IcuUpdate:\n                tIcuIndex = __raw_opCodes[++j] as number;\n                tIcu = icus ![tIcuIndex];\n                result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuUpdate');\n                result['tIcuIndex'] = tIcuIndex;\n                result['checkBit'] = checkBit;\n                result['tIcu'] = tIcu;\n                results.push(result);\n                break;\n            }\n          }\n        }\n      }\n      i += skipCodes;\n    }\n    return results;\n  }\n}\n\nexport interface I18nOpCodesDebug { operations: any[]; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {executePreOrderHooks} from '../hooks';\nimport {HEADER_OFFSET, LView, TVIEW} from '../interfaces/view';\nimport {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state';\n\n\n/**\n * Selects an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n *   if (rf & 1) {\n *     element(0, 'div');\n *   }\n *   if (rf & 2) {\n *     select(0); // Select the <div/> created above.\n *     property('title', 'test');\n *   }\n *  }\n * ```\n * @param index the index of the item to act on with the following instructions\n *\n * @codeGenApi\n */\nexport function ÉµÉµselect(index: number): void {\n  ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n  ngDevMode &&\n      assertLessThan(\n          index, getLView().length - HEADER_OFFSET, 'Should be within range for the view data');\n  const lView = getLView();\n  selectInternal(lView, index);\n}\n\n\nexport function selectInternal(lView: LView, index: number) {\n  // Flush the initial hooks for elements in the view that have been added up to this point.\n  executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), index);\n\n  // We must set the selected index *after* running the hooks, because hooks may have side-effects\n  // that cause other template functions to run, thus updating the selected index, which is global\n  // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n  // will be altered by the time we leave the `ÉµÉµselect` instruction.\n  setSelectedIndex(index);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Injector} from '../../di';\nimport {ErrorHandler} from '../../error_handler';\nimport {Type} from '../../interface/type';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/security';\nimport {assertDataInRange, assertDefined, assertDomNode, assertEqual, assertGreaterThan, assertNotEqual, assertNotSame} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {assertLView, assertPreviousIsParent} from '../assert';\nimport {attachPatchData, getComponentViewByInstance} from '../context_discovery';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeHooks, executePreOrderHooks, registerPreOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, FactoryFn, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {INJECTOR_BLOOM_PARENT_SIZE, NodeInjectorFactory} from '../interfaces/injector';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliasValue, PropertyAliases, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType, TProjectionNode, TViewNode} from '../interfaces/node';\nimport {RComment, RElement, RText, Renderer3, RendererFactory3, isProceduralRenderer} from '../interfaces/renderer';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {isComponent, isComponentDef, isContentQueryHost, isLContainer, isRootView} from '../interfaces/type_checks';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';\nimport {isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, getSelectedIndex, incrementActiveDirectiveId, isCreationMode, leaveView, namespaceHTMLInternal, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex} from '../state';\nimport {renderStylingMap} from '../styling_next/bindings';\nimport {NO_CHANGE} from '../tokens';\nimport {ANIMATION_PROP_PREFIX, isAnimationProp} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER, renderStringify, stringifyForError} from '../util/misc_utils';\nimport {getLViewParent, getRootContext} from '../util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByIndex, getNativeByTNode, getTNode, readPatchedLView, resetPreOrderHookFlags, unwrapRNode, viewAttachedToChangeDetector} from '../util/view_utils';\n\nimport {LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeConstructor, TNodeInitialData, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor, attachLContainerDebug, attachLViewDebug, cloneToLView, cloneToTViewData} from './lview_debug';\nimport {selectInternal} from './select';\n\n\n\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\n\nexport const enum BindingDirection {\n  Input,\n  Output,\n}\n\n/**\n * Refreshes the view, executing the following steps in that order:\n * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host\n * bindings, refreshes child components.\n * Note: view hooks are triggered later when leaving the view.\n */\nexport function refreshDescendantViews(lView: LView) {\n  const tView = lView[TVIEW];\n  const creationMode = isCreationMode(lView);\n\n  // This needs to be set before children are processed to support recursive components\n  tView.firstTemplatePass = false;\n\n  // Resetting the bindingIndex of the current LView as the next steps may trigger change detection.\n  lView[BINDING_INDEX] = tView.bindingStartIndex;\n\n  // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.\n  // This will be done in the update pass.\n  if (!creationMode) {\n    const checkNoChangesMode = getCheckNoChangesMode();\n\n    executePreOrderHooks(lView, tView, checkNoChangesMode, undefined);\n\n    refreshDynamicEmbeddedViews(lView);\n\n    // Content query results must be refreshed before content hooks are called.\n    refreshContentQueries(tView, lView);\n\n    resetPreOrderHookFlags(lView);\n    executeHooks(\n        lView, tView.contentHooks, tView.contentCheckHooks, checkNoChangesMode,\n        InitPhaseState.AfterContentInitHooksToBeRun, undefined);\n\n    setHostBindings(tView, lView);\n  }\n\n  // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n  // content queries are resolved during change detection (i.e. update mode), after embedded\n  // views are refreshed (see block above).\n  if (creationMode && tView.staticContentQueries) {\n    refreshContentQueries(tView, lView);\n  }\n\n  // We must materialize query results before child components are processed\n  // in case a child component has projected a container. The LContainer needs\n  // to exist so the embedded views are properly attached by the container.\n  if (!creationMode || tView.staticViewQueries) {\n    executeViewQueryFn(RenderFlags.Update, tView, lView[CONTEXT]);\n  }\n\n  refreshChildComponents(lView, tView.components);\n}\n\n\n/** Sets the host bindings for the current view. */\nexport function setHostBindings(tView: TView, viewData: LView): void {\n  const selectedIndex = getSelectedIndex();\n  try {\n    if (tView.expandoInstructions) {\n      let bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;\n      setBindingRoot(bindingRootIndex);\n      let currentDirectiveIndex = -1;\n      let currentElementIndex = -1;\n      for (let i = 0; i < tView.expandoInstructions.length; i++) {\n        const instruction = tView.expandoInstructions[i];\n        if (typeof instruction === 'number') {\n          if (instruction <= 0) {\n            // Negative numbers mean that we are starting new EXPANDO block and need to update\n            // the current element and directive index.\n            currentElementIndex = -instruction;\n            setActiveHostElement(currentElementIndex);\n\n            // Injector block and providers are taken into account.\n            const providerCount = (tView.expandoInstructions[++i] as number);\n            bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;\n\n            currentDirectiveIndex = bindingRootIndex;\n          } else {\n            // This is either the injector size (so the binding root can skip over directives\n            // and get to the first set of host bindings on this node) or the host var count\n            // (to get to the next set of host bindings on this node).\n            bindingRootIndex += instruction;\n          }\n          setBindingRoot(bindingRootIndex);\n        } else {\n          // If it's not a number, it's a host binding function that needs to be executed.\n          if (instruction !== null) {\n            viewData[BINDING_INDEX] = bindingRootIndex;\n            const hostCtx = unwrapRNode(viewData[currentDirectiveIndex]);\n            instruction(RenderFlags.Update, hostCtx, currentElementIndex);\n\n            // Each directive gets a uniqueId value that is the same for both\n            // create and update calls when the hostBindings function is called. The\n            // directive uniqueId is not set anywhere--it is just incremented between\n            // each hostBindings call and is useful for helping instruction code\n            // uniquely determine which directive is currently active when executed.\n            incrementActiveDirectiveId();\n          }\n          currentDirectiveIndex++;\n        }\n      }\n    }\n  } finally {\n    setActiveHostElement(selectedIndex);\n  }\n}\n\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n  const contentQueries = tView.contentQueries;\n  if (contentQueries !== null) {\n    for (let i = 0; i < contentQueries.length; i += 2) {\n      const queryStartIdx = contentQueries[i];\n      const directiveDefIdx = contentQueries[i + 1];\n      if (directiveDefIdx !== -1) {\n        const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n        ngDevMode &&\n            assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n        setCurrentQueryIndex(queryStartIdx);\n        directiveDef.contentQueries !(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n      }\n    }\n  }\n}\n\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(hostLView: LView, components: number[] | null): void {\n  if (components != null) {\n    for (let i = 0; i < components.length; i++) {\n      componentRefresh(hostLView, components[i]);\n    }\n  }\n}\n\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param overriddenRenderer Optional A renderer to override the default one\n * @returns the element created\n */\nexport function elementCreate(name: string, overriddenRenderer?: Renderer3): RElement {\n  let native: RElement;\n  const rendererToUse = overriddenRenderer || getLView()[RENDERER];\n\n  const namespace = getNamespace();\n\n  if (isProceduralRenderer(rendererToUse)) {\n    native = rendererToUse.createElement(name, namespace);\n  } else {\n    if (namespace === null) {\n      native = rendererToUse.createElement(name);\n    } else {\n      native = rendererToUse.createElementNS(namespace, name);\n    }\n  }\n  return native;\n}\nexport function createLView<T>(\n    parentLView: LView | null, tView: TView, context: T | null, flags: LViewFlags,\n    host: RElement | null, tHostNode: TViewNode | TElementNode | null,\n    rendererFactory?: RendererFactory3 | null, renderer?: Renderer3 | null,\n    sanitizer?: Sanitizer | null, injector?: Injector | null): LView {\n  const lView = ngDevMode ? cloneToLView(tView.blueprint) : tView.blueprint.slice() as LView;\n  lView[HOST] = host;\n  lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n  resetPreOrderHookFlags(lView);\n  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n  lView[CONTEXT] = context;\n  lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]) !;\n  ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n  lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]) !;\n  ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n  lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null !;\n  lView[INJECTOR as any] = injector || parentLView && parentLView[INJECTOR] || null;\n  lView[T_HOST] = tHostNode;\n  ngDevMode && attachLViewDebug(lView);\n  return lView;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param tHostNode This is a hack and we should not have to pass this value in. It is only used to\n * determine if the parent belongs to a different tView. Instead we should not have parentTView\n * point to TView other the current one.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Element,\n    name: string | null, attrs: TAttributes | null): TElementNode;\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Container,\n    name: string | null, attrs: TAttributes | null): TContainerNode;\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Projection, name: null,\n    attrs: TAttributes | null): TProjectionNode;\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.ElementContainer,\n    name: string | null, attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.IcuContainer, name: null,\n    attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n    tView: TView, tHostNode: TNode | null, index: number, type: TNodeType, name: string | null,\n    attrs: TAttributes | null): TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&\n    TIcuContainerNode {\n  // Keep this function short, so that the VM will inline it.\n  const adjustedIndex = index + HEADER_OFFSET;\n  const tNode = tView.data[adjustedIndex] as TNode ||\n      createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index);\n  setPreviousOrParentTNode(tNode, true);\n  return tNode as TElementNode & TViewNode & TContainerNode & TElementContainerNode &\n      TProjectionNode & TIcuContainerNode;\n}\n\nfunction createTNodeAtIndex(\n    tView: TView, tHostNode: TNode | null, adjustedIndex: number, type: TNodeType,\n    name: string | null, attrs: TAttributes | null, index: number) {\n  const previousOrParentTNode = getPreviousOrParentTNode();\n  const isParent = getIsParent();\n  const parent =\n      isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n  // Parents cannot cross component boundaries because components will be used in multiple places,\n  // so it's only set if the view is the same.\n  const parentInSameView = parent && parent !== tHostNode;\n  const tParentNode = parentInSameView ? parent as TElementNode | TContainerNode : null;\n  const tNode = tView.data[adjustedIndex] =\n      createTNode(tView, tParentNode, type, adjustedIndex, name, attrs);\n  // The first node is not always the one at index 0, in case of i18n, index 0 can be the\n  // instruction `i18nStart` and the first node has the index 1 or more\n  if (index === 0 || !tView.firstChild) {\n    tView.firstChild = tNode;\n  }\n  // Now link ourselves into the tree.\n  if (previousOrParentTNode) {\n    if (isParent && previousOrParentTNode.child == null &&\n        (tNode.parent !== null || previousOrParentTNode.type === TNodeType.View)) {\n      // We are in the same view, which means we are adding content node to the parent view.\n      previousOrParentTNode.child = tNode;\n    } else if (!isParent) {\n      previousOrParentTNode.next = tNode;\n    }\n  }\n  return tNode;\n}\n\nexport function assignTViewNodeToLView(\n    tView: TView, tParentNode: TNode | null, index: number, lView: LView): TViewNode {\n  // View nodes are not stored in data because they can be added / removed at runtime (which\n  // would cause indices to change). Their TNodes are instead stored in tView.node.\n  let tNode = tView.node;\n  if (tNode == null) {\n    ngDevMode && tParentNode &&\n        assertNodeOfPossibleTypes(tParentNode, TNodeType.Element, TNodeType.Container);\n    tView.node = tNode = createTNode(\n        tView,\n        tParentNode as TElementNode | TContainerNode | null,  //\n        TNodeType.View, index, null, null) as TViewNode;\n  }\n\n  return lView[T_HOST] = tNode as TViewNode;\n}\n\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future\n * template passes.\n *\n * @param view The LView containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n */\nexport function allocExpando(view: LView, numSlotsToAlloc: number) {\n  ngDevMode && assertGreaterThan(\n                   numSlotsToAlloc, 0, 'The number of slots to alloc should be greater than 0');\n  if (numSlotsToAlloc > 0) {\n    const tView = view[TVIEW];\n    if (tView.firstTemplatePass) {\n      for (let i = 0; i < numSlotsToAlloc; i++) {\n        tView.blueprint.push(null);\n        tView.data.push(null);\n        view.push(null);\n      }\n\n      // We should only increment the expando start index if there aren't already directives\n      // and injectors saved in the \"expando\" section\n      if (!tView.expandoInstructions) {\n        tView.expandoStartIndex += numSlotsToAlloc;\n      } else {\n        // Since we're adding the dynamic nodes into the expando section, we need to let the host\n        // bindings know that they should skip x slots\n        tView.expandoInstructions.push(numSlotsToAlloc);\n      }\n    }\n  }\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Used for creating the LViewNode of a dynamic embedded view,\n * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().\n * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).\n */\nexport function createEmbeddedViewAndNode<T>(\n    tView: TView, context: T, declarationView: LView, injectorIndex: number): LView {\n  const _isParent = getIsParent();\n  const _previousOrParentTNode = getPreviousOrParentTNode();\n  setPreviousOrParentTNode(null !, true);\n\n  const lView = createLView(declarationView, tView, context, LViewFlags.CheckAlways, null, null);\n  lView[DECLARATION_VIEW] = declarationView;\n\n  assignTViewNodeToLView(tView, null, -1, lView);\n\n  if (tView.firstTemplatePass) {\n    tView.node !.injectorIndex = injectorIndex;\n  }\n\n  setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n  return lView;\n}\n\n/**\n * Used for rendering embedded views (e.g. dynamically created views)\n *\n * Dynamically created views must store/retrieve their TViews differently from component views\n * because their template functions are nested in the template functions of their hosts, creating\n * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor\n * inside\n * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we\n * can't store TViews in the template function itself (as we do for comps). Instead, we store the\n * TView for dynamically created views on their host TNode, which only has one instance.\n */\nexport function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, context: T) {\n  const _isParent = getIsParent();\n  const _previousOrParentTNode = getPreviousOrParentTNode();\n  let oldView: LView;\n  if (viewToRender[FLAGS] & LViewFlags.IsRoot) {\n    // This is a root view inside the view tree\n    tickRootContext(getRootContext(viewToRender));\n  } else {\n    // Will become true if the `try` block executes with no errors.\n    let safeToRunHooks = false;\n    try {\n      setPreviousOrParentTNode(null !, true);\n\n      oldView = enterView(viewToRender, viewToRender[T_HOST]);\n      resetPreOrderHookFlags(viewToRender);\n      executeTemplate(viewToRender, tView.template !, getRenderFlags(viewToRender), context);\n\n      // This must be set to false immediately after the first creation run because in an\n      // ngFor loop, all the views will be created together before update mode runs and turns\n      // off firstTemplatePass. If we don't set it here, instances will perform directive\n      // matching, etc again and again.\n      tView.firstTemplatePass = false;\n\n      refreshDescendantViews(viewToRender);\n      safeToRunHooks = true;\n    } finally {\n      leaveView(oldView !, safeToRunHooks);\n      setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n    }\n  }\n}\n\nexport function renderComponentOrTemplate<T>(\n    hostView: LView, context: T, templateFn?: ComponentTemplate<T>) {\n  const rendererFactory = hostView[RENDERER_FACTORY];\n  const oldView = enterView(hostView, hostView[T_HOST]);\n  const normalExecutionPath = !getCheckNoChangesMode();\n  const creationModeIsActive = isCreationMode(hostView);\n\n  // Will become true if the `try` block executes with no errors.\n  let safeToRunHooks = false;\n  try {\n    if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n      rendererFactory.begin();\n    }\n\n    if (creationModeIsActive) {\n      // creation mode pass\n      templateFn && executeTemplate(hostView, templateFn, RenderFlags.Create, context);\n\n      refreshDescendantViews(hostView);\n      hostView[FLAGS] &= ~LViewFlags.CreationMode;\n    }\n\n    // update mode pass\n    resetPreOrderHookFlags(hostView);\n    templateFn && executeTemplate(hostView, templateFn, RenderFlags.Update, context);\n    refreshDescendantViews(hostView);\n    safeToRunHooks = true;\n  } finally {\n    if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n      rendererFactory.end();\n    }\n    leaveView(oldView, safeToRunHooks);\n  }\n}\n\nfunction executeTemplate<T>(\n    lView: LView, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n  namespaceHTMLInternal();\n  const prevSelectedIndex = getSelectedIndex();\n  try {\n    setActiveHostElement(null);\n    if (rf & RenderFlags.Update) {\n      // When we're updating, have an inherent ÉµÉµselect(0) so we don't have to generate that\n      // instruction for most update blocks\n      selectInternal(lView, 0);\n    }\n    templateFn(rf, context);\n  } finally {\n    setSelectedIndex(prevSelectedIndex);\n  }\n}\n\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. Update block and create block are\n * always run separately.\n */\nfunction getRenderFlags(view: LView): RenderFlags {\n  return isCreationMode(view) ? RenderFlags.Create : RenderFlags.Update;\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n  if (isContentQueryHost(tNode)) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n      const def = tView.data[directiveIndex] as DirectiveDef<any>;\n      if (def.contentQueries) {\n        def.contentQueries(RenderFlags.Create, lView[directiveIndex], directiveIndex);\n      }\n    }\n  }\n}\n\n\n/**\n * Creates directive instances and populates local refs.\n *\n * @param localRefs Local refs of the node in question\n * @param localRefExtractor mapping function that extracts local ref value from TNode\n */\nexport function createDirectivesAndLocals(\n    tView: TView, lView: LView, tNode: TElementNode | TContainerNode | TElementContainerNode,\n    localRefExtractor: LocalRefExtractor = getNativeByTNode) {\n  if (!getBindingsEnabled()) return;\n  instantiateAllDirectives(tView, lView, tNode);\n  invokeDirectivesHostBindings(tView, lView, tNode);\n  saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n  setActiveHostElement(null);\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(\n    viewData: LView, tNode: TNode, localRefExtractor: LocalRefExtractor): void {\n  const localNames = tNode.localNames;\n  if (localNames) {\n    let localIndex = tNode.index + 1;\n    for (let i = 0; i < localNames.length; i += 2) {\n      const index = localNames[i + 1] as number;\n      const value = index === -1 ?\n          localRefExtractor(\n              tNode as TElementNode | TContainerNode | TElementContainerNode, viewData) :\n          viewData[index];\n      viewData[localIndex++] = value;\n    }\n  }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateTView(def: ComponentDef<any>): TView {\n  return def.tView || (def.tView = createTView(\n                           -1, def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs,\n                           def.viewQuery, def.schemas));\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param templateFn Template function\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n */\nexport function createTView(\n    viewIndex: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n    directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null,\n    viewQuery: ViewQueriesFunction<any>| null, schemas: SchemaMetadata[] | null): TView {\n  ngDevMode && ngDevMode.tView++;\n  const bindingStartIndex = HEADER_OFFSET + consts;\n  // This length does not yet contain host bindings from child directives because at this point,\n  // we don't know which directives are active on this template. As soon as a directive is matched\n  // that has a host binding, we will update the blueprint with that def's hostVars count.\n  const initialViewLength = bindingStartIndex + vars;\n  const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n  return blueprint[TVIEW as any] = ngDevMode ?\n      new TViewConstructor(\n             viewIndex,   // id: number,\n             blueprint,   // blueprint: LView,\n             templateFn,  // template: ComponentTemplate<{}>|null,\n             null,        // queries: TQueries|null\n             viewQuery,   // viewQuery: ViewQueriesFunction<{}>|null,\n             null !,      // node: TViewNode|TElementNode|null,\n             cloneToTViewData(blueprint).fill(null, bindingStartIndex),  // data: TData,\n             bindingStartIndex,  // bindingStartIndex: number,\n             initialViewLength,  // expandoStartIndex: number,\n             null,               // expandoInstructions: ExpandoInstructions|null,\n             true,               // firstTemplatePass: boolean,\n             false,              // staticViewQueries: boolean,\n             false,              // staticContentQueries: boolean,\n             null,               // preOrderHooks: HookData|null,\n             null,               // preOrderCheckHooks: HookData|null,\n             null,               // contentHooks: HookData|null,\n             null,               // contentCheckHooks: HookData|null,\n             null,               // viewHooks: HookData|null,\n             null,               // viewCheckHooks: HookData|null,\n             null,               // destroyHooks: HookData|null,\n             null,               // cleanup: any[]|null,\n             null,               // contentQueries: number[]|null,\n             null,               // components: number[]|null,\n             typeof directives === 'function' ?\n                 directives() :\n                 directives,  // directiveRegistry: DirectiveDefList|null,\n             typeof pipes === 'function' ? pipes() : pipes,  // pipeRegistry: PipeDefList|null,\n             null,                                           // firstChild: TNode|null,\n             schemas,                                        // schemas: SchemaMetadata[]|null,\n             ) :\n      {\n        id: viewIndex,\n        blueprint: blueprint,\n        template: templateFn,\n        queries: null,\n        viewQuery: viewQuery,\n        node: null !,\n        data: blueprint.slice().fill(null, bindingStartIndex),\n        bindingStartIndex: bindingStartIndex,\n        expandoStartIndex: initialViewLength,\n        expandoInstructions: null,\n        firstTemplatePass: true,\n        staticViewQueries: false,\n        staticContentQueries: false,\n        preOrderHooks: null,\n        preOrderCheckHooks: null,\n        contentHooks: null,\n        contentCheckHooks: null,\n        viewHooks: null,\n        viewCheckHooks: null,\n        destroyHooks: null,\n        cleanup: null,\n        contentQueries: null,\n        components: null,\n        directiveRegistry: typeof directives === 'function' ? directives() : directives,\n        pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n        firstChild: null,\n        schemas: schemas,\n      };\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n  const blueprint = new (ngDevMode ? LViewBlueprint ! : Array)(initialViewLength)\n                        .fill(null, 0, bindingStartIndex)\n                        .fill(NO_CHANGE, bindingStartIndex) as LView;\n  blueprint[BINDING_INDEX] = bindingStartIndex;\n  return blueprint;\n}\n\nexport function createError(text: string, token: any) {\n  return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\n\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nexport function locateHostElement(\n    factory: RendererFactory3, elementOrSelector: RElement | string): RElement|null {\n  const defaultRenderer = factory.createRenderer(null, null);\n  const rNode = typeof elementOrSelector === 'string' ?\n      (isProceduralRenderer(defaultRenderer) ?\n           defaultRenderer.selectRootElement(elementOrSelector) :\n           defaultRenderer.querySelector(elementOrSelector)) :\n      elementOrSelector;\n  if (ngDevMode && !rNode) {\n    if (typeof elementOrSelector === 'string') {\n      throw createError('Host node with selector not found:', elementOrSelector);\n    } else {\n      throw createError('Host node is required:', elementOrSelector);\n    }\n  }\n  return rNode;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nexport function storeCleanupWithContext(lView: LView, context: any, cleanupFn: Function): void {\n  const lCleanup = getCleanup(lView);\n  lCleanup.push(context);\n\n  if (lView[TVIEW].firstTemplatePass) {\n    getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);\n  }\n}\n\n/**\n * Saves the cleanup function itself in LView.cleanupInstances.\n *\n * This is necessary for functions that are wrapped with their contexts, like in renderer2\n * listeners.\n *\n * On the first template pass, the index of the cleanup function is saved in TView.\n */\nexport function storeCleanupFn(view: LView, cleanupFn: Function): void {\n  getCleanup(view).push(cleanupFn);\n\n  if (view[TVIEW].firstTemplatePass) {\n    getTViewCleanup(view).push(view[CLEANUP] !.length - 1, null);\n  }\n}\n\n// TODO: Remove this when the issue is resolved.\n/**\n * Tsickle has a bug where it creates an infinite loop for a function returning itself.\n * This is a temporary type that will be removed when the issue is resolved.\n * https://github.com/angular/tsickle/issues/1009)\n */\nexport type TsickleIssue1009 = any;\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\n * @param type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nexport function createTNode(\n    tView: TView, tParent: TElementNode | TContainerNode | null, type: TNodeType,\n    adjustedIndex: number, tagName: string | null, attrs: TAttributes | null): TNode {\n  ngDevMode && ngDevMode.tNode++;\n  let injectorIndex = tParent ? tParent.injectorIndex : -1;\n  return ngDevMode ? new TNodeConstructor(\n                         tView,          // tView_: TView\n                         type,           // type: TNodeType\n                         adjustedIndex,  // index: number\n                         injectorIndex,  // injectorIndex: number\n                         -1,             // directiveStart: number\n                         -1,             // directiveEnd: number\n                         -1,             // propertyMetadataStartIndex: number\n                         -1,             // propertyMetadataEndIndex: number\n                         0,              // flags: TNodeFlags\n                         0,              // providerIndexes: TNodeProviderIndexes\n                         tagName,        // tagName: string|null\n                         attrs,  // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n                         null,   // localNames: (string|number)[]|null\n                         undefined,  // initialInputs: (string[]|null)[]|null|undefined\n                         undefined,  // inputs: PropertyAliases|null|undefined\n                         undefined,  // outputs: PropertyAliases|null|undefined\n                         null,       // tViews: ITView|ITView[]|null\n                         null,       // next: ITNode|null\n                         null,       // projectionNext: ITNode|null\n                         null,       // child: ITNode|null\n                         tParent,    // parent: TElementNode|TContainerNode|null\n                         null,       // projection: number|(ITNode|RNode[])[]|null\n                         null,       // styles: TStylingContext|null\n                         null,       // classes: TStylingContext|null\n                         ) :\n                     {\n                       type: type,\n                       index: adjustedIndex,\n                       injectorIndex: injectorIndex,\n                       directiveStart: -1,\n                       directiveEnd: -1,\n                       propertyMetadataStartIndex: -1,\n                       propertyMetadataEndIndex: -1,\n                       flags: 0,\n                       providerIndexes: 0,\n                       tagName: tagName,\n                       attrs: attrs,\n                       localNames: null,\n                       initialInputs: undefined,\n                       inputs: undefined,\n                       outputs: undefined,\n                       tViews: null,\n                       next: null,\n                       projectionNext: null,\n                       child: null,\n                       parent: tParent,\n                       projection: null,\n                       styles: null,\n                       classes: null,\n                     };\n}\n\n\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param tNode\n * @param direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nexport function generatePropertyAliases(tNode: TNode, direction: BindingDirection): PropertyAliases|\n    null {\n  const tView = getLView()[TVIEW];\n  let propStore: PropertyAliases|null = null;\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n\n  if (end > start) {\n    const isInput = direction === BindingDirection.Input;\n    const defs = tView.data;\n\n    for (let i = start; i < end; i++) {\n      const directiveDef = defs[i] as DirectiveDef<any>;\n      const propertyAliasMap: {[publicName: string]: string} =\n          isInput ? directiveDef.inputs : directiveDef.outputs;\n      for (let publicName in propertyAliasMap) {\n        if (propertyAliasMap.hasOwnProperty(publicName)) {\n          propStore = propStore || {};\n          const internalName = propertyAliasMap[publicName];\n          const hasProperty = propStore.hasOwnProperty(publicName);\n          hasProperty ? propStore[publicName].push(i, publicName, internalName) :\n                        (propStore[publicName] = [i, publicName, internalName]);\n        }\n      }\n    }\n  }\n  return propStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nconst ATTR_TO_PROP: {[name: string]: string} = {\n  'class': 'className',\n  'for': 'htmlFor',\n  'formaction': 'formAction',\n  'innerHtml': 'innerHTML',\n  'readonly': 'readOnly',\n  'tabindex': 'tabIndex',\n};\n\nexport function elementPropertyInternal<T>(\n    index: number, propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean,\n    loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n  ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n  const lView = getLView();\n  const element = getNativeByIndex(index, lView) as RElement | RComment;\n  const tNode = getTNode(index, lView);\n  let inputData: PropertyAliases|null|undefined;\n  let dataValue: PropertyAliasValue|undefined;\n  if (!nativeOnly && (inputData = initializeTNodeInputs(tNode)) &&\n      (dataValue = inputData[propName])) {\n    setInputsForProperty(lView, dataValue, value);\n    if (isComponent(tNode)) markDirtyIfOnPush(lView, index + HEADER_OFFSET);\n    if (ngDevMode) {\n      if (tNode.type === TNodeType.Element || tNode.type === TNodeType.Container) {\n        /**\n         * dataValue is an array containing runtime input or output names for the directives:\n         * i+0: directive instance index\n         * i+1: publicName\n         * i+2: privateName\n         *\n         * e.g. [0, 'change', 'change-minified']\n         * we want to set the reflected property with the privateName: dataValue[i+2]\n         */\n        for (let i = 0; i < dataValue.length; i += 3) {\n          setNgReflectProperty(lView, element, tNode.type, dataValue[i + 2] as string, value);\n        }\n      }\n    }\n  } else if (tNode.type === TNodeType.Element) {\n    propName = ATTR_TO_PROP[propName] || propName;\n\n    if (ngDevMode) {\n      validateAgainstEventProperties(propName);\n      validateAgainstUnknownProperties(lView, element, propName, tNode);\n      ngDevMode.rendererSetProperty++;\n    }\n\n    savePropertyDebugData(tNode, lView, propName, lView[TVIEW].data, nativeOnly);\n\n    const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n    // It is assumed that the sanitizer is only added when the compiler determines that the\n    // property\n    // is risky, so sanitization can be done without further checks.\n    value = sanitizer != null ? (sanitizer(value, tNode.tagName || '', propName) as any) : value;\n    if (isProceduralRenderer(renderer)) {\n      renderer.setProperty(element as RElement, propName, value);\n    } else if (!isAnimationProp(propName)) {\n      (element as RElement).setProperty ? (element as any).setProperty(propName, value) :\n                                          (element as any)[propName] = value;\n    }\n  } else if (tNode.type === TNodeType.Container) {\n    // If the node is a container and the property didn't\n    // match any of the inputs or schemas we should throw.\n    if (ngDevMode && !matchingSchemas(lView, tNode.tagName)) {\n      throw createUnknownPropertyError(propName, tNode);\n    }\n  }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n  ngDevMode && assertLView(lView);\n  const childComponentLView = getComponentViewByIndex(viewIndex, lView);\n  if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n    childComponentLView[FLAGS] |= LViewFlags.Dirty;\n  }\n}\n\nexport function setNgReflectProperty(\n    lView: LView, element: RElement | RComment, type: TNodeType, attrName: string, value: any) {\n  const renderer = lView[RENDERER];\n  attrName = normalizeDebugBindingName(attrName);\n  const debugValue = normalizeDebugBindingValue(value);\n  if (type === TNodeType.Element) {\n    if (value == null) {\n      isProceduralRenderer(renderer) ? renderer.removeAttribute((element as RElement), attrName) :\n                                       (element as RElement).removeAttribute(attrName);\n    } else {\n      isProceduralRenderer(renderer) ?\n          renderer.setAttribute((element as RElement), attrName, debugValue) :\n          (element as RElement).setAttribute(attrName, debugValue);\n    }\n  } else {\n    const textContent = `bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`;\n    if (isProceduralRenderer(renderer)) {\n      renderer.setValue((element as RComment), textContent);\n    } else {\n      (element as RComment).textContent = textContent;\n    }\n  }\n}\n\nfunction validateAgainstUnknownProperties(\n    hostView: LView, element: RElement | RComment, propName: string, tNode: TNode) {\n  // If the tag matches any of the schemas we shouldn't throw.\n  if (matchingSchemas(hostView, tNode.tagName)) {\n    return;\n  }\n\n  // If prop is not a known property of the HTML element...\n  if (!(propName in element) &&\n      // and we are in a browser context... (web worker nodes should be skipped)\n      typeof Node === 'function' && element instanceof Node &&\n      // and isn't a synthetic animation property...\n      propName[0] !== ANIMATION_PROP_PREFIX) {\n    // ... it is probably a user error and we should throw.\n    throw createUnknownPropertyError(propName, tNode);\n  }\n}\n\nfunction matchingSchemas(hostView: LView, tagName: string | null): boolean {\n  const schemas = hostView[TVIEW].schemas;\n\n  if (schemas !== null) {\n    for (let i = 0; i < schemas.length; i++) {\n      const schema = schemas[i];\n      if (schema === NO_ERRORS_SCHEMA ||\n          schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n}\n\n/**\n* Stores debugging data for this property binding on first template pass.\n* This enables features like DebugElement.properties.\n*/\nfunction savePropertyDebugData(\n    tNode: TNode, lView: LView, propName: string, tData: TData,\n    nativeOnly: boolean | undefined): void {\n  const lastBindingIndex = lView[BINDING_INDEX] - 1;\n\n  // Bind/interpolation functions save binding metadata in the last binding index,\n  // but leave the property name blank. If the interpolation delimiter is at the 0\n  // index, we know that this is our first pass and the property name still needs to\n  // be set.\n  const bindingMetadata = tData[lastBindingIndex] as string;\n  if (bindingMetadata[0] == INTERPOLATION_DELIMITER) {\n    tData[lastBindingIndex] = propName + bindingMetadata;\n\n    // We don't want to store indices for host bindings because they are stored in a\n    // different part of LView (the expando section).\n    if (!nativeOnly) {\n      if (tNode.propertyMetadataStartIndex == -1) {\n        tNode.propertyMetadataStartIndex = lastBindingIndex;\n      }\n      tNode.propertyMetadataEndIndex = lastBindingIndex + 1;\n    }\n  }\n}\n\n/**\n* Creates an error that should be thrown when encountering an unknown property on an element.\n* @param propName Name of the invalid property.\n* @param tNode Node on which we encountered the error.\n*/\nfunction createUnknownPropertyError(propName: string, tNode: TNode): Error {\n  return new Error(\n      `Template error: Can't bind to '${propName}' since it isn't a known property of '${tNode.tagName}'.`);\n}\n\n/**\n * Instantiate a root component.\n */\nexport function instantiateRootComponent<T>(\n    tView: TView, viewData: LView, def: ComponentDef<T>): T {\n  const rootTNode = getPreviousOrParentTNode();\n  if (tView.firstTemplatePass) {\n    if (def.providersResolver) def.providersResolver(def);\n    generateExpandoInstructionBlock(tView, rootTNode, 1);\n    baseResolveDirective(tView, viewData, def, def.factory);\n  }\n  const directive =\n      getNodeInjectable(tView.data, viewData, viewData.length - 1, rootTNode as TElementNode);\n  postProcessBaseDirective(viewData, rootTNode, directive);\n  return directive;\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n    tView: TView, lView: LView, tNode: TElementNode | TContainerNode | TElementContainerNode,\n    localRefs: string[] | null): void {\n  // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n  // tsickle.\n  ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n\n  if (!getBindingsEnabled()) return;\n\n  const directives: DirectiveDef<any>[]|null = findDirectiveMatches(tView, lView, tNode);\n  const exportsMap: ({[key: string]: number} | null) = localRefs ? {'': -1} : null;\n\n  if (directives) {\n    initNodeFlags(tNode, tView.data.length, directives.length);\n    // When the same token is provided by several directives on the same node, some rules apply in\n    // the viewEngine:\n    // - viewProviders have priority over providers\n    // - the last directive in NgModule.declarations has priority over the previous one\n    // So to match these rules, the order in which providers are added in the arrays is very\n    // important.\n    for (let i = 0; i < directives.length; i++) {\n      const def = directives[i] as DirectiveDef<any>;\n      if (def.providersResolver) def.providersResolver(def);\n    }\n    generateExpandoInstructionBlock(tView, tNode, directives.length);\n    const initialPreOrderHooksLength = (tView.preOrderHooks && tView.preOrderHooks.length) || 0;\n    const initialPreOrderCheckHooksLength =\n        (tView.preOrderCheckHooks && tView.preOrderCheckHooks.length) || 0;\n    const nodeIndex = tNode.index - HEADER_OFFSET;\n    for (let i = 0; i < directives.length; i++) {\n      const def = directives[i] as DirectiveDef<any>;\n\n      const directiveDefIdx = tView.data.length;\n      baseResolveDirective(tView, lView, def, def.factory);\n\n      saveNameToExportMap(tView.data !.length - 1, def, exportsMap);\n\n      // Init hooks are queued now so ngOnInit is called in host components before\n      // any projected components.\n      registerPreOrderHooks(\n          directiveDefIdx, def, tView, nodeIndex, initialPreOrderHooksLength,\n          initialPreOrderCheckHooksLength);\n    }\n  }\n  if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView: TView, lView: LView, tNode: TNode) {\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n  if (!tView.firstTemplatePass && start < end) {\n    getOrCreateNodeInjectorForNode(\n        tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n  }\n  for (let i = start; i < end; i++) {\n    const def = tView.data[i] as DirectiveDef<any>;\n    if (isComponentDef(def)) {\n      addComponentLogic(lView, tNode, def as ComponentDef<any>);\n    }\n    const directive = getNodeInjectable(tView.data, lView !, i, tNode as TElementNode);\n    postProcessDirective(lView, directive, def, i);\n  }\n}\n\nfunction invokeDirectivesHostBindings(tView: TView, viewData: LView, tNode: TNode) {\n  const start = tNode.directiveStart;\n  const end = tNode.directiveEnd;\n  const expando = tView.expandoInstructions !;\n  const firstTemplatePass = tView.firstTemplatePass;\n  const elementIndex = tNode.index - HEADER_OFFSET;\n  const selectedIndex = getSelectedIndex();\n  try {\n    setActiveHostElement(elementIndex);\n\n    for (let i = start; i < end; i++) {\n      const def = tView.data[i] as DirectiveDef<any>;\n      const directive = viewData[i];\n      if (def.hostBindings) {\n        invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass);\n\n        // Each directive gets a uniqueId value that is the same for both\n        // create and update calls when the hostBindings function is called. The\n        // directive uniqueId is not set anywhere--it is just incremented between\n        // each hostBindings call and is useful for helping instruction code\n        // uniquely determine which directive is currently active when executed.\n        incrementActiveDirectiveId();\n      } else if (firstTemplatePass) {\n        expando.push(null);\n      }\n    }\n  } finally {\n    setActiveHostElement(selectedIndex);\n  }\n}\n\nexport function invokeHostBindingsInCreationMode(\n    def: DirectiveDef<any>, expando: ExpandoInstructions, directive: any, tNode: TNode,\n    firstTemplatePass: boolean) {\n  const previousExpandoLength = expando.length;\n  setCurrentDirectiveDef(def);\n  const elementIndex = tNode.index - HEADER_OFFSET;\n  def.hostBindings !(RenderFlags.Create, directive, elementIndex);\n  setCurrentDirectiveDef(null);\n  // `hostBindings` function may or may not contain `allocHostVars` call\n  // (e.g. it may not if it only contains host listeners), so we need to check whether\n  // `expandoInstructions` has changed and if not - we still push `hostBindings` to\n  // expando block, to make sure we execute it for DI cycle\n  if (previousExpandoLength === expando.length && firstTemplatePass) {\n    expando.push(def.hostBindings);\n  }\n}\n\n/**\n* Generates a new block in TView.expandoInstructions for this node.\n*\n* Each expando block starts with the element index (turned negative so we can distinguish\n* it from the hostVar count) and the directive count. See more in VIEW_DATA.md.\n*/\nexport function generateExpandoInstructionBlock(\n    tView: TView, tNode: TNode, directiveCount: number): void {\n  ngDevMode && assertEqual(\n                   tView.firstTemplatePass, true,\n                   'Expando block should only be generated on first template pass.');\n\n  const elementIndex = -(tNode.index - HEADER_OFFSET);\n  const providerStartIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n  const providerCount = tView.data.length - providerStartIndex;\n  (tView.expandoInstructions || (tView.expandoInstructions = [\n   ])).push(elementIndex, providerCount, directiveCount);\n}\n\n/**\n * Process a directive on the current node after its creation.\n */\nfunction postProcessDirective<T>(\n    viewData: LView, directive: T, def: DirectiveDef<T>, directiveDefIdx: number): void {\n  const previousOrParentTNode = getPreviousOrParentTNode();\n  postProcessBaseDirective(viewData, previousOrParentTNode, directive);\n  ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');\n  if (previousOrParentTNode && previousOrParentTNode.attrs) {\n    setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);\n  }\n\n  if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {\n    previousOrParentTNode.flags |= TNodeFlags.hasContentQuery;\n  }\n\n  if (isComponentDef(def)) {\n    const componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);\n    componentView[CONTEXT] = directive;\n  }\n}\n\n/**\n * A lighter version of postProcessDirective() that is used for the root component.\n */\nfunction postProcessBaseDirective<T>(\n    lView: LView, previousOrParentTNode: TNode, directive: T): void {\n  const native = getNativeByTNode(previousOrParentTNode, lView);\n\n  ngDevMode && assertEqual(\n                   lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n                   'directives should be created before any bindings');\n  ngDevMode && assertPreviousIsParent(getIsParent());\n\n  attachPatchData(directive, lView);\n  if (native) {\n    attachPatchData(native, lView);\n  }\n}\n\n\n/**\n* Matches the current node against all available selectors.\n* If a component is matched (at most one), it is returned in first position in the array.\n*/\nfunction findDirectiveMatches(\n    tView: TView, viewData: LView,\n    tNode: TElementNode | TContainerNode | TElementContainerNode): DirectiveDef<any>[]|null {\n  ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n  const registry = tView.directiveRegistry;\n  let matches: any[]|null = null;\n  if (registry) {\n    for (let i = 0; i < registry.length; i++) {\n      const def = registry[i] as ComponentDef<any>| DirectiveDef<any>;\n      if (isNodeMatchingSelectorList(tNode, def.selectors !, /* isProjectionMode */ false)) {\n        matches || (matches = ngDevMode ? new MatchesArray !() : []);\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n\n        if (isComponentDef(def)) {\n          if (tNode.flags & TNodeFlags.isComponent) throwMultipleComponentError(tNode);\n          tNode.flags = TNodeFlags.isComponent;\n\n          // The component is always stored first with directives after.\n          matches.unshift(def);\n        } else {\n          matches.push(def);\n        }\n      }\n    }\n  }\n  return matches;\n}\n\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nexport function queueComponentIndexForCheck(previousOrParentTNode: TNode): void {\n  const tView = getLView()[TVIEW];\n  ngDevMode &&\n      assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n  (tView.components || (tView.components = ngDevMode ? new TViewComponents !() : [\n   ])).push(previousOrParentTNode.index);\n}\n\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n    tNode: TNode, localRefs: string[] | null, exportsMap: {[key: string]: number}): void {\n  if (localRefs) {\n    const localNames: (string | number)[] = tNode.localNames =\n        ngDevMode ? new TNodeLocalNames !() : [];\n\n    // Local names must be stored in tNode in the same order that localRefs are defined\n    // in the template to ensure the data is loaded in the same slots as their refs\n    // in the template (for template queries).\n    for (let i = 0; i < localRefs.length; i += 2) {\n      const index = exportsMap[localRefs[i + 1]];\n      if (index == null) throw new Error(`Export of name '${localRefs[i + 1]}' not found!`);\n      localNames.push(localRefs[i], index);\n    }\n  }\n}\n\n/**\n* Builds up an export map as directives are created, so local refs can be quickly mapped\n* to their directive instances.\n*/\nfunction saveNameToExportMap(\n    index: number, def: DirectiveDef<any>| ComponentDef<any>,\n    exportsMap: {[key: string]: number} | null) {\n  if (exportsMap) {\n    if (def.exportAs) {\n      for (let i = 0; i < def.exportAs.length; i++) {\n        exportsMap[def.exportAs[i]] = index;\n      }\n    }\n    if ((def as ComponentDef<any>).template) exportsMap[''] = index;\n  }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n  const flags = tNode.flags;\n  ngDevMode && assertEqual(\n                   flags === 0 || flags === TNodeFlags.isComponent, true,\n                   'expected node flags to not be initialized');\n\n  ngDevMode && assertNotEqual(\n                   numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n                   'Reached the max number of directives');\n  // When the first directive is created on a node, save the index\n  tNode.flags = flags & TNodeFlags.isComponent;\n  tNode.directiveStart = index;\n  tNode.directiveEnd = index + numberOfDirectives;\n  tNode.providerIndexes = index;\n}\n\nfunction baseResolveDirective<T>(\n    tView: TView, viewData: LView, def: DirectiveDef<T>, directiveFactory: FactoryFn<T>) {\n  tView.data.push(def);\n  const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n  tView.blueprint.push(nodeInjectorFactory);\n  viewData.push(nodeInjectorFactory);\n}\n\nfunction addComponentLogic<T>(\n    lView: LView, previousOrParentTNode: TNode, def: ComponentDef<T>): void {\n  const native = getNativeByTNode(previousOrParentTNode, lView);\n\n  const tView = getOrCreateTView(def);\n\n  // Only component views should be added to the view tree directly. Embedded views are\n  // accessed through their containers because they may be removed / re-added later.\n  const rendererFactory = lView[RENDERER_FACTORY];\n  const componentView = addToViewTree(\n      lView, createLView(\n                 lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n                 lView[previousOrParentTNode.index], previousOrParentTNode as TElementNode,\n                 rendererFactory, rendererFactory.createRenderer(native as RElement, def)));\n\n  componentView[T_HOST] = previousOrParentTNode as TElementNode;\n\n  // Component view will always be created before any injected LContainers,\n  // so this is a regular element, wrap it with the component view\n  lView[previousOrParentTNode.index] = componentView;\n\n  if (lView[TVIEW].firstTemplatePass) {\n    queueComponentIndexForCheck(previousOrParentTNode);\n  }\n}\n\nexport function elementAttributeInternal(\n    index: number, name: string, value: any, lView: LView, sanitizer?: SanitizerFn | null,\n    namespace?: string) {\n  ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n  ngDevMode && validateAgainstEventAttributes(name);\n  const element = getNativeByIndex(index, lView) as RElement;\n  const renderer = lView[RENDERER];\n  if (value == null) {\n    ngDevMode && ngDevMode.rendererRemoveAttribute++;\n    isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n                                     element.removeAttribute(name);\n  } else {\n    ngDevMode && ngDevMode.rendererSetAttribute++;\n    const tNode = getTNode(index, lView);\n    const strValue =\n        sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.tagName || '', name);\n\n\n    if (isProceduralRenderer(renderer)) {\n      renderer.setAttribute(element, name, strValue, namespace);\n    } else {\n      namespace ? element.setAttributeNS(namespace, name, strValue) :\n                  element.setAttribute(name, strValue);\n    }\n  }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n    directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode): void {\n  let initialInputData = tNode.initialInputs as InitialInputData | undefined;\n  if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n    initialInputData = generateInitialInputs(directiveIndex, def.inputs, tNode);\n  }\n\n  const initialInputs: InitialInputs|null = initialInputData[directiveIndex];\n  if (initialInputs) {\n    const setInput = def.setInput;\n    for (let i = 0; i < initialInputs.length;) {\n      const publicName = initialInputs[i++];\n      const privateName = initialInputs[i++];\n      const value = initialInputs[i++];\n      if (setInput) {\n        def.setInput !(instance, value, publicName, privateName);\n      } else {\n        (instance as any)[privateName] = value;\n      }\n      if (ngDevMode) {\n        const lView = getLView();\n        const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n        setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n      }\n    }\n  }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(\n    directiveIndex: number, inputs: {[key: string]: string}, tNode: TNode): InitialInputData {\n  const initialInputData: InitialInputData =\n      tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new TNodeInitialInputs !() : []);\n  // Ensure that we don't create sparse arrays\n  for (let i = initialInputData.length; i <= directiveIndex; i++) {\n    initialInputData.push(null);\n  }\n\n  const attrs = tNode.attrs !;\n  let i = 0;\n  while (i < attrs.length) {\n    const attrName = attrs[i];\n    if (attrName === AttributeMarker.NamespaceURI) {\n      // We do not allow inputs on namespaced attributes.\n      i += 4;\n      continue;\n    } else if (attrName === AttributeMarker.ProjectAs) {\n      // Skip over the `ngProjectAs` value.\n      i += 2;\n      continue;\n    }\n\n    // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n    if (typeof attrName === 'number') break;\n\n    const minifiedInputName = inputs[attrName as string];\n    const attrValue = attrs[i + 1];\n\n    if (minifiedInputName !== undefined) {\n      const inputsToStore: InitialInputs = initialInputData[directiveIndex] ||\n          (initialInputData[directiveIndex] = ngDevMode ? new TNodeInitialData !() : []);\n      inputsToStore.push(attrName as string, minifiedInputName, attrValue as string);\n    }\n\n    i += 2;\n  }\n  return initialInputData;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray: any = ngDevMode && createNamedArrayType('LContainer');\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n    hostNative: RElement | RComment | LView, currentView: LView, native: RComment, tNode: TNode,\n    isForViewContainerRef?: boolean): LContainer {\n  ngDevMode && assertDomNode(native);\n  ngDevMode && assertLView(currentView);\n  // https://jsperf.com/array-literal-vs-new-array-really\n  const lContainer: LContainer = new (ngDevMode ? LContainerArray : Array)(\n      hostNative,  // host native\n      true,        // Boolean `true` in this position signifies that this is an `LContainer`\n      isForViewContainerRef ? -1 : 0,  // active index\n      currentView,                     // parent\n      null,                            // next\n      null,                            // queries\n      tNode,                           // t_host\n      native,                          // native,\n      null,                            // view refs\n      );\n  ngDevMode && attachLContainerDebug(lContainer);\n  return lContainer;\n}\n\n\n/**\n * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them\n * by executing an associated template function.\n */\nfunction refreshDynamicEmbeddedViews(lView: LView) {\n  for (let current = lView[CHILD_HEAD]; current !== null; current = current[NEXT]) {\n    // Note: current can be an LView or an LContainer instance, but here we are only interested\n    // in LContainer. We can tell it's an LContainer because its length is less than the LView\n    // header.\n    if (current[ACTIVE_INDEX] === -1 && isLContainer(current)) {\n      for (let i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {\n        const dynamicViewData = current[i];\n        // The directives and pipes are not needed here as an existing view is only being\n        // refreshed.\n        ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');\n        renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT] !);\n      }\n    }\n  }\n}\n\n\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param adjustedElementIndex  Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nexport function componentRefresh(hostLView: LView, adjustedElementIndex: number): void {\n  ngDevMode && assertDataInRange(hostLView, adjustedElementIndex);\n  const componentView = getComponentViewByIndex(adjustedElementIndex, hostLView);\n  ngDevMode &&\n      assertNodeType(hostLView[TVIEW].data[adjustedElementIndex] as TNode, TNodeType.Element);\n\n  // Only components in creation mode, attached CheckAlways\n  // components or attached, dirty OnPush components should be checked\n  if ((viewAttachedToChangeDetector(componentView) || isCreationMode(hostLView)) &&\n      componentView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n    syncViewWithBlueprint(componentView);\n    checkView(componentView, componentView[CONTEXT]);\n  }\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param componentView The view to sync\n */\nfunction syncViewWithBlueprint(componentView: LView) {\n  const componentTView = componentView[TVIEW];\n  for (let i = componentView.length; i < componentTView.blueprint.length; i++) {\n    componentView[i] = componentTView.blueprint[i];\n  }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T {\n  // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n  // to\n  // the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n  // of\n  // order, the change detection will run out of order, as the act of retrieving the the\n  // LContainer\n  // from the RNode is what adds it to the queue.\n  if (lView[CHILD_HEAD]) {\n    lView[CHILD_TAIL] ![NEXT] = lViewOrLContainer;\n  } else {\n    lView[CHILD_HEAD] = lViewOrLContainer;\n  }\n  lView[CHILD_TAIL] = lViewOrLContainer;\n  return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView): LView|null {\n  while (lView) {\n    lView[FLAGS] |= LViewFlags.Dirty;\n    const parent = getLViewParent(lView);\n    // Stop traversing up as soon as you find a root view that wasn't attached to any container\n    if (isRootView(lView) && !parent) {\n      return lView;\n    }\n    // continue otherwise\n    lView = parent !;\n  }\n  return null;\n}\n\n\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nexport function scheduleTick(rootContext: RootContext, flags: RootContextFlags) {\n  const nothingScheduled = rootContext.flags === RootContextFlags.Empty;\n  rootContext.flags |= flags;\n\n  if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n    let res: null|((val: null) => void);\n    rootContext.clean = new Promise<null>((r) => res = r);\n    rootContext.scheduler(() => {\n      if (rootContext.flags & RootContextFlags.DetectChanges) {\n        rootContext.flags &= ~RootContextFlags.DetectChanges;\n        tickRootContext(rootContext);\n      }\n\n      if (rootContext.flags & RootContextFlags.FlushPlayers) {\n        rootContext.flags &= ~RootContextFlags.FlushPlayers;\n        const playerHandler = rootContext.playerHandler;\n        if (playerHandler) {\n          playerHandler.flushPlayers();\n        }\n      }\n\n      rootContext.clean = _CLEAN_PROMISE;\n      res !(null);\n    });\n  }\n}\n\nexport function tickRootContext(rootContext: RootContext) {\n  for (let i = 0; i < rootContext.components.length; i++) {\n    const rootComponent = rootContext.components[i];\n    renderComponentOrTemplate(readPatchedLView(rootComponent) !, rootComponent);\n  }\n}\n\nexport function detectChangesInternal<T>(view: LView, context: T) {\n  const rendererFactory = view[RENDERER_FACTORY];\n\n  if (rendererFactory.begin) rendererFactory.begin();\n\n  try {\n    if (isCreationMode(view)) {\n      checkView(view, context);  // creation mode pass\n    }\n    checkView(view, context);  // update mode pass\n  } catch (error) {\n    handleError(view, error);\n    throw error;\n  } finally {\n    if (rendererFactory.end) rendererFactory.end();\n  }\n}\n\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nexport function detectChangesInRootView(lView: LView): void {\n  tickRootContext(lView[CONTEXT] as RootContext);\n}\n\n\n/**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\nexport function checkNoChanges<T>(component: T): void {\n  const view = getComponentViewByInstance(component);\n  checkNoChangesInternal<T>(view, component);\n}\n\nexport function checkNoChangesInternal<T>(view: LView, context: T) {\n  setCheckNoChangesMode(true);\n  try {\n    detectChangesInternal(view, context);\n  } finally {\n    setCheckNoChangesMode(false);\n  }\n}\n\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nexport function checkNoChangesInRootView(lView: LView): void {\n  setCheckNoChangesMode(true);\n  try {\n    detectChangesInRootView(lView);\n  } finally {\n    setCheckNoChangesMode(false);\n  }\n}\n\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.\n */\nexport function checkView<T>(hostView: LView, component: T) {\n  const hostTView = hostView[TVIEW];\n  const oldView = enterView(hostView, hostView[T_HOST]);\n  const templateFn = hostTView.template !;\n  const creationMode = isCreationMode(hostView);\n\n  // Will become true if the `try` block executes with no errors.\n  let safeToRunHooks = false;\n  try {\n    resetPreOrderHookFlags(hostView);\n    creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);\n    executeTemplate(hostView, templateFn, getRenderFlags(hostView), component);\n    refreshDescendantViews(hostView);\n    safeToRunHooks = true;\n  } finally {\n    leaveView(oldView, safeToRunHooks);\n  }\n}\n\nfunction executeViewQueryFn<T>(flags: RenderFlags, tView: TView, component: T): void {\n  const viewQuery = tView.viewQuery;\n  if (viewQuery !== null) {\n    setCurrentQueryIndex(0);\n    viewQuery(flags, component);\n  }\n}\n\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Creates binding metadata for a particular binding and stores it in\n * TView.data. These are generated in order to support DebugElement.properties.\n *\n * Each binding / interpolation will have one (including attribute bindings)\n * because at the time of binding, we don't know to which instruction the binding\n * belongs. It is always stored in TView.data at the index of the last binding\n * value in LView (e.g. for interpolation8, it would be stored at the index of\n * the 8th value).\n *\n * @param lView The LView that contains the current binding index.\n * @param prefix The static prefix string\n * @param suffix The static suffix string\n *\n * @returns Newly created binding metadata string for this binding or null\n */\nexport function storeBindingMetadata(lView: LView, prefix = '', suffix = ''): string|null {\n  const tData = lView[TVIEW].data;\n  const lastBindingIndex = lView[BINDING_INDEX] - 1;\n  const value = INTERPOLATION_DELIMITER + prefix + INTERPOLATION_DELIMITER + suffix;\n\n  return tData[lastBindingIndex] == null ? (tData[lastBindingIndex] = value) : null;\n}\n\nexport const CLEAN_PROMISE = _CLEAN_PROMISE;\n\nexport function initializeTNodeInputs(tNode: TNode): PropertyAliases|null {\n  // If tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n  // yet been checked.\n  if (tNode.inputs === undefined) {\n    // mark inputs as checked\n    tNode.inputs = generatePropertyAliases(tNode, BindingDirection.Input);\n  }\n  return tNode.inputs;\n}\n\nexport function getCleanup(view: LView): any[] {\n  // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n  return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup !() : []);\n}\n\nfunction getTViewCleanup(view: LView): any[] {\n  return view[TVIEW].cleanup || (view[TVIEW].cleanup = ngDevMode ? new TCleanup !() : []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(tNode: TNode, lView: LView): Renderer3 {\n  const componentLView = lView[tNode.index] as LView;\n  return componentLView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n  const injector = lView[INJECTOR];\n  const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n  errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(lView: LView, inputs: PropertyAliasValue, value: any): void {\n  const tView = lView[TVIEW];\n  for (let i = 0; i < inputs.length;) {\n    const index = inputs[i++] as number;\n    const publicName = inputs[i++] as string;\n    const privateName = inputs[i++] as string;\n    const instance = lView[index];\n    ngDevMode && assertDataInRange(lView, index);\n    const def = tView.data[index] as DirectiveDef<any>;\n    const setInput = def.setInput;\n    if (setInput) {\n      def.setInput !(instance, value, publicName, privateName);\n    } else {\n      instance[privateName] = value;\n    }\n  }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n  ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n  const element = getNativeByIndex(index, lView) as any as RText;\n  ngDevMode && assertDefined(element, 'native element should exist');\n  ngDevMode && ngDevMode.rendererSetText++;\n  const renderer = lView[RENDERER];\n  isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;\n}\n\n/**\n * Renders all initial styling (class and style values) on to the element from the tNode.\n *\n * All initial styling data (i.e. any values extracted from the `style` or `class` attributes\n * on an element) are collected into the `tNode.styles` and `tNode.classes` data structures.\n * These values are populated during the creation phase of an element and are then later\n * applied once the element is instantiated. This function applies each of the static\n * style and class entries to the element.\n */\nexport function renderInitialStyling(renderer: Renderer3, native: RElement, tNode: TNode) {\n  renderStylingMap(renderer, native, tNode.classes, true);\n  renderStylingMap(renderer, native, tNode.styles, false);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertDomNode} from '../util/assert';\nimport {assertLContainer, assertLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS, NATIVE, unusedValueExportToPlacateAjd as unused1} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode, TViewNode, unusedValueExportToPlacateAjd as unused2} from './interfaces/node';\nimport {unusedValueExportToPlacateAjd as unused3} from './interfaces/projection';\nimport {ProceduralRenderer3, RElement, RNode, RText, Renderer3, isProceduralRenderer, unusedValueExportToPlacateAjd as unused4} from './interfaces/renderer';\nimport {isLContainer, isLView, isRootView} from './interfaces/type_checks';\nimport {CHILD_HEAD, CLEANUP, DECLARATION_LCONTAINER, FLAGS, HOST, HookData, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, TVIEW, T_HOST, unusedValueExportToPlacateAjd as unused5} from './interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from './node_assert';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, getNativeByTNodeOrNull, unwrapRNode} from './util/view_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4 + unused5;\n\nexport function getLContainer(tNode: TViewNode, embeddedView: LView): LContainer|null {\n  ngDevMode && assertLView(embeddedView);\n  const container = embeddedView[PARENT] as LContainer;\n  if (tNode.index === -1) {\n    // This is a dynamically created view inside a dynamic container.\n    // The parent isn't an LContainer if the embedded view hasn't been attached yet.\n    return isLContainer(container) ? container : null;\n  } else {\n    ngDevMode && assertLContainer(container);\n    // This is a inline view node (e.g. embeddedViewStart)\n    return container;\n  }\n}\n\n\n/**\n * Retrieves render parent for a given view.\n * Might be null if a view is not yet attached to any container.\n */\nfunction getContainerRenderParent(tViewNode: TViewNode, view: LView): RElement|null {\n  const container = getLContainer(tViewNode, view);\n  return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;\n}\n\nconst enum WalkTNodeTreeAction {\n  /** node insert in the native environment */\n  Insert = 0,\n\n  /** node detach from the native environment */\n  Detach = 1,\n\n  /** node destruction using the renderer's API */\n  Destroy = 2,\n}\n\n\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction executeActionOnElementOrContainer(\n    action: WalkTNodeTreeAction, renderer: Renderer3, parent: RElement | null,\n    lNodeToHandle: RNode | LContainer | LView, beforeNode?: RNode | null) {\n  // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n  // won't be created until i18nApply() in the update block, so this node should be skipped.\n  // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n  // in `i18n_spec.ts`.\n  if (lNodeToHandle != null) {\n    let lContainer: LContainer|undefined;\n    let isComponent = false;\n    // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n    // wrapped\n    // in an array which needs to be unwrapped. We need to know if it is a component and if\n    // it has LContainer so that we can process all of those cases appropriately.\n    if (isLContainer(lNodeToHandle)) {\n      lContainer = lNodeToHandle;\n    } else if (isLView(lNodeToHandle)) {\n      isComponent = true;\n      ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n      lNodeToHandle = lNodeToHandle[HOST] !;\n    }\n    const rNode: RNode = unwrapRNode(lNodeToHandle);\n    ngDevMode && assertDomNode(rNode);\n\n    if (action === WalkTNodeTreeAction.Insert) {\n      nativeInsertBefore(renderer, parent !, rNode, beforeNode || null);\n    } else if (action === WalkTNodeTreeAction.Detach) {\n      nativeRemoveNode(renderer, rNode, isComponent);\n    } else if (action === WalkTNodeTreeAction.Destroy) {\n      ngDevMode && ngDevMode.rendererDestroyNode++;\n      (renderer as ProceduralRenderer3).destroyNode !(rNode);\n    }\n    if (lContainer != null) {\n      executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);\n    }\n  }\n}\n\nexport function createTextNode(value: any, renderer: Renderer3): RText {\n  return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) :\n                                          renderer.createTextNode(renderStringify(value));\n}\n\n/**\n * Adds or removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param lView The view from which elements should be added or removed\n * @param insertMode Whether or not elements should be added (if false, removing)\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addRemoveViewFromContainer(\n    lView: LView, insertMode: true, beforeNode: RNode | null): void;\nexport function addRemoveViewFromContainer(lView: LView, insertMode: false): void;\nexport function addRemoveViewFromContainer(\n    lView: LView, insertMode: boolean, beforeNode?: RNode | null): void {\n  const renderParent = getContainerRenderParent(lView[TVIEW].node as TViewNode, lView);\n  ngDevMode && assertNodeType(lView[TVIEW].node as TNode, TNodeType.View);\n  if (renderParent) {\n    const renderer = lView[RENDERER];\n    const action = insertMode ? WalkTNodeTreeAction.Insert : WalkTNodeTreeAction.Detach;\n    executeActionOnView(renderer, action, lView, renderParent, beforeNode);\n  }\n}\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(lView: LView) {\n  executeActionOnView(lView[RENDERER], WalkTNodeTreeAction.Detach, lView, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n *  - Because it's used for onDestroy calls, it needs to be bottom-up.\n *  - Must process containers instead of their views to avoid splicing\n *  when views are destroyed and re-added.\n *  - Using a while loop because it's faster than recursion\n *  - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n *  @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n  // If the view has no children, we can clean it up and return early.\n  let lViewOrLContainer = rootView[CHILD_HEAD];\n  if (!lViewOrLContainer) {\n    return cleanUpView(rootView);\n  }\n\n  while (lViewOrLContainer) {\n    let next: LView|LContainer|null = null;\n\n    if (isLView(lViewOrLContainer)) {\n      // If LView, traverse down to child.\n      next = lViewOrLContainer[CHILD_HEAD];\n    } else {\n      ngDevMode && assertLContainer(lViewOrLContainer);\n      // If container, traverse down to its first LView.\n      const firstView: LView|undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n      if (firstView) next = firstView;\n    }\n\n    if (!next) {\n      // Only clean up view when moving to the side or up, as destroy hooks\n      // should be called in order from the bottom up.\n      while (lViewOrLContainer && !lViewOrLContainer ![NEXT] && lViewOrLContainer !== rootView) {\n        cleanUpView(lViewOrLContainer);\n        lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n      }\n      cleanUpView(lViewOrLContainer || rootView);\n      next = lViewOrLContainer && lViewOrLContainer ![NEXT];\n    }\n    lViewOrLContainer = next;\n  }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(lView: LView, lContainer: LContainer, index: number) {\n  ngDevMode && assertLView(lView);\n  ngDevMode && assertLContainer(lContainer);\n  const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n  const containerLength = lContainer.length;\n\n  if (index > 0) {\n    // This is a new view, we need to add it to the children.\n    lContainer[indexInContainer - 1][NEXT] = lView;\n  }\n  if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n    lView[NEXT] = lContainer[indexInContainer];\n    addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n  } else {\n    lContainer.push(lView);\n    lView[NEXT] = null;\n  }\n\n  lView[PARENT] = lContainer;\n\n  // track views where declaration and insertion points are different\n  const declarationLContainer = lView[DECLARATION_LCONTAINER];\n  if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n    trackMovedView(declarationLContainer, lView);\n  }\n\n  // notify query that a new view has been added\n  const lQueries = lView[QUERIES];\n  if (lQueries !== null) {\n    lQueries.insertView(lView[TVIEW]);\n  }\n\n  // Sets the attached flag\n  lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer: LContainer, lView: LView) {\n  ngDevMode && assertLContainer(declarationContainer);\n  const declaredViews = declarationContainer[MOVED_VIEWS];\n  if (declaredViews === null) {\n    declarationContainer[MOVED_VIEWS] = [lView];\n  } else {\n    declaredViews.push(lView);\n  }\n}\n\nfunction detachMovedView(declarationContainer: LContainer, lView: LView) {\n  ngDevMode && assertLContainer(declarationContainer);\n  ngDevMode && assertDefined(\n                   declarationContainer[MOVED_VIEWS],\n                   'A projected view should belong to a non-empty projected views collection');\n  const projectedViews = declarationContainer[MOVED_VIEWS] !;\n  const declaredViewIndex = projectedViews.indexOf(lView);\n  projectedViews.splice(declaredViewIndex, 1);\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView|undefined {\n  if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n  const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n  const viewToDetach = lContainer[indexInContainer];\n\n  if (viewToDetach) {\n    const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n    if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n      detachMovedView(declarationLContainer, viewToDetach);\n    }\n\n\n    if (removeIndex > 0) {\n      lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n    }\n    const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n    addRemoveViewFromContainer(viewToDetach, false);\n\n    // notify query that a view has been removed\n    const lQueries = removedLView[QUERIES];\n    if (lQueries !== null) {\n      lQueries.detachView(removedLView[TVIEW]);\n    }\n\n    viewToDetach[PARENT] = null;\n    viewToDetach[NEXT] = null;\n    // Unsets the attached flag\n    viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n  }\n  return viewToDetach;\n}\n\n/**\n * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.\n *\n * @param lContainer The container from which to remove a view\n * @param removeIndex The index of the view to remove\n */\nexport function removeView(lContainer: LContainer, removeIndex: number) {\n  const detachedView = detachView(lContainer, removeIndex);\n  detachedView && destroyLView(detachedView);\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting cleanup (e.g. removing listeners, calling onDestroys).\n *\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(lView: LView) {\n  if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n    const renderer = lView[RENDERER];\n    if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n      executeActionOnView(renderer, WalkTNodeTreeAction.Destroy, lView, null, null);\n    }\n\n    destroyViewTree(lView);\n  }\n}\n\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param lViewOrLContainer The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nexport function getParentState(lViewOrLContainer: LView | LContainer, rootView: LView): LView|\n    LContainer|null {\n  let tNode;\n  if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n      tNode.type === TNodeType.View) {\n    // if it's an embedded view, the state needs to go up to the container, in case the\n    // container has a next\n    return getLContainer(tNode as TViewNode, lViewOrLContainer);\n  } else {\n    // otherwise, use parent view for containers or component views\n    return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];\n  }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view: LView | LContainer): void {\n  if (isLView(view) && !(view[FLAGS] & LViewFlags.Destroyed)) {\n    // Usually the Attached flag is removed when the view is detached from its parent, however\n    // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n    view[FLAGS] &= ~LViewFlags.Attached;\n\n    // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n    // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n    // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n    // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n    // really more of an \"afterDestroy\" hook if you think about it.\n    view[FLAGS] |= LViewFlags.Destroyed;\n\n    executeOnDestroys(view);\n    removeListeners(view);\n    const hostTNode = view[T_HOST];\n    // For component views only, the local renderer is destroyed as clean up time.\n    if (hostTNode && hostTNode.type === TNodeType.Element && isProceduralRenderer(view[RENDERER])) {\n      ngDevMode && ngDevMode.rendererDestroy++;\n      (view[RENDERER] as ProceduralRenderer3).destroy();\n    }\n\n    const declarationContainer = view[DECLARATION_LCONTAINER];\n    // we are dealing with an embedded view that is still inserted into a container\n    if (declarationContainer !== null && isLContainer(view[PARENT])) {\n      // and this is a projected view\n      if (declarationContainer !== view[PARENT]) {\n        detachMovedView(declarationContainer, view);\n      }\n\n      // For embedded views still attached to a container: remove query result from this view.\n      const lQueries = view[QUERIES];\n      if (lQueries !== null) {\n        lQueries.detachView(view[TVIEW]);\n      }\n    }\n  }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(lView: LView): void {\n  const tCleanup = lView[TVIEW].cleanup;\n  if (tCleanup !== null) {\n    const lCleanup = lView[CLEANUP] !;\n    for (let i = 0; i < tCleanup.length - 1; i += 2) {\n      if (typeof tCleanup[i] === 'string') {\n        // This is a native DOM listener\n        const idxOrTargetGetter = tCleanup[i + 1];\n        const target = typeof idxOrTargetGetter === 'function' ?\n            idxOrTargetGetter(lView) :\n            unwrapRNode(lView[idxOrTargetGetter]);\n        const listener = lCleanup[tCleanup[i + 2]];\n        const useCaptureOrSubIdx = tCleanup[i + 3];\n        if (typeof useCaptureOrSubIdx === 'boolean') {\n          // native DOM listener registered with Renderer3\n          target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n        } else {\n          if (useCaptureOrSubIdx >= 0) {\n            // unregister\n            lCleanup[useCaptureOrSubIdx]();\n          } else {\n            // Subscription\n            lCleanup[-useCaptureOrSubIdx].unsubscribe();\n          }\n        }\n        i += 2;\n      } else {\n        // This is a cleanup function that is grouped with the index of its context\n        const context = lCleanup[tCleanup[i + 1]];\n        tCleanup[i].call(context);\n      }\n    }\n    lView[CLEANUP] = null;\n  }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view: LView): void {\n  const tView = view[TVIEW];\n  let destroyHooks: HookData|null;\n\n  if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n    for (let i = 0; i < destroyHooks.length; i += 2) {\n      const context = view[destroyHooks[i] as number];\n\n      // Only call the destroy hook if the context has been requested.\n      if (!(context instanceof NodeInjectorFactory)) {\n        (destroyHooks[i + 1] as() => void).call(context);\n      }\n    }\n  }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n *   insertion because the content of a component will be projected.\n *   `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n *   parent container, which itself is disconnected. For example the parent container is part\n *   of a View which has not be inserted or is made for projection but has not been inserted\n *   into destination.\n */\nfunction getRenderParent(tNode: TNode, currentView: LView): RElement|null {\n  // Nodes of the top-most view can be inserted eagerly.\n  if (isRootView(currentView)) {\n    return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView));\n  }\n\n  // Skip over element and ICU containers as those are represented by a comment node and\n  // can't be used as a render parent.\n  const parent = getHighestElementOrICUContainer(tNode);\n  const renderParent = parent.parent;\n\n  // If the parent is null, then we are inserting across views: either into an embedded view or a\n  // component view.\n  if (renderParent == null) {\n    const hostTNode = currentView[T_HOST] !;\n    if (hostTNode.type === TNodeType.View) {\n      // We are inserting a root element of an embedded view We might delay insertion of children\n      // for a given view if it is disconnected. This might happen for 2 main reasons:\n      // - view is not inserted into any container(view was created but not inserted yet)\n      // - view is inserted into a container but the container itself is not inserted into the DOM\n      // (container might be part of projection or child of a view that is not inserted yet).\n      // In other words we can insert children of a given view if this view was inserted into a\n      // container and the container itself has its render parent determined.\n      return getContainerRenderParent(hostTNode as TViewNode, currentView);\n    } else {\n      // We are inserting a root element of the component view into the component host element and\n      // it should always be eager.\n      return getHostNative(currentView);\n    }\n  } else {\n    const isIcuCase = parent && parent.type === TNodeType.IcuContainer;\n    // If the parent of this node is an ICU container, then it is represented by comment node and we\n    // need to use it as an anchor. If it is projected then its direct parent node is the renderer.\n    if (isIcuCase && parent.flags & TNodeFlags.isProjected) {\n      return getNativeByTNode(parent, currentView).parentNode as RElement;\n    }\n\n    ngDevMode && assertNodeType(renderParent, TNodeType.Element);\n    if (renderParent.flags & TNodeFlags.isComponent && !isIcuCase) {\n      const tData = currentView[TVIEW].data;\n      const tNode = tData[renderParent.index] as TNode;\n      const encapsulation = (tData[tNode.directiveStart] as ComponentDef<any>).encapsulation;\n\n      // We've got a parent which is an element in the current view. We just need to verify if the\n      // parent element is not a component. Component's content nodes are not inserted immediately\n      // because they will be projected, and so doing insert at this point would be wasteful.\n      // Since the projection would then move it to its final destination. Note that we can't\n      // make this assumption when using the Shadow DOM, because the native projection placeholders\n      // (<content> or <slot>) have to be in place as elements are being inserted.\n      if (encapsulation !== ViewEncapsulation.ShadowDom &&\n          encapsulation !== ViewEncapsulation.Native) {\n        return null;\n      }\n    }\n\n    return getNativeByTNode(renderParent, currentView) as RElement;\n  }\n}\n\n/**\n * Gets the native host element for a given view. Will return null if the current view does not have\n * a host element.\n */\nfunction getHostNative(currentView: LView): RElement|null {\n  ngDevMode && assertLView(currentView);\n  const hostTNode = currentView[T_HOST];\n  return hostTNode && hostTNode.type === TNodeType.Element ?\n      (getNativeByTNode(hostTNode, getLViewParent(currentView) !) as RElement) :\n      null;\n}\n\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nexport function nativeInsertBefore(\n    renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null): void {\n  ngDevMode && ngDevMode.rendererInsertBefore++;\n  if (isProceduralRenderer(renderer)) {\n    renderer.insertBefore(parent, child, beforeNode);\n  } else {\n    parent.insertBefore(child, beforeNode, true);\n  }\n}\n\nfunction nativeAppendChild(renderer: Renderer3, parent: RElement, child: RNode): void {\n  ngDevMode && ngDevMode.rendererAppendChild++;\n  if (isProceduralRenderer(renderer)) {\n    renderer.appendChild(parent, child);\n  } else {\n    parent.appendChild(child);\n  }\n}\n\nfunction nativeAppendOrInsertBefore(\n    renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null) {\n  if (beforeNode !== null) {\n    nativeInsertBefore(renderer, parent, child, beforeNode);\n  } else {\n    nativeAppendChild(renderer, parent, child);\n  }\n}\n\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(\n    renderer: Renderer3, parent: RElement, child: RNode, isHostElement?: boolean): void {\n  if (isProceduralRenderer(renderer)) {\n    renderer.removeChild(parent, child, isHostElement);\n  } else {\n    parent.removeChild(child);\n  }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer3, node: RNode): RElement|null {\n  return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode) as RElement;\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer3, node: RNode): RNode|null {\n  return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n\n/**\n * Finds a native \"anchor\" node for cases where we can't append a native child directly\n * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.\n * @param parentTNode\n * @param lView\n */\nfunction getNativeAnchorNode(parentTNode: TNode, lView: LView): RNode|null {\n  if (parentTNode.type === TNodeType.View) {\n    const lContainer = getLContainer(parentTNode as TViewNode, lView) !;\n    const index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;\n    return getBeforeNodeForView(index, lContainer);\n  } else if (\n      parentTNode.type === TNodeType.ElementContainer ||\n      parentTNode.type === TNodeType.IcuContainer) {\n    return getNativeByTNode(parentTNode, lView);\n  }\n  return null;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}.\n *\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nexport function appendChild(childEl: RNode | RNode[], childTNode: TNode, currentView: LView): void {\n  const renderParent = getRenderParent(childTNode, currentView);\n  if (renderParent != null) {\n    const renderer = currentView[RENDERER];\n    const parentTNode: TNode = childTNode.parent || currentView[T_HOST] !;\n    const anchorNode = getNativeAnchorNode(parentTNode, currentView);\n    if (Array.isArray(childEl)) {\n      for (let nativeNode of childEl) {\n        nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);\n      }\n    } else {\n      nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n    }\n  }\n}\n\n/**\n * Gets the top-level element or an ICU container if those containers are nested.\n *\n * @param tNode The starting TNode for which we should skip element and ICU containers\n * @returns The TNode of the highest level ICU container or element container\n */\nfunction getHighestElementOrICUContainer(tNode: TNode): TNode {\n  while (tNode.parent != null && (tNode.parent.type === TNodeType.ElementContainer ||\n                                  tNode.parent.type === TNodeType.IcuContainer)) {\n    tNode = tNode.parent;\n  }\n  return tNode;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode|\n    null {\n  const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n  if (nextViewIndex < lContainer.length) {\n    const lView = lContainer[nextViewIndex] as LView;\n    ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');\n    const tViewNodeChild = (lView[T_HOST] as TViewNode).child;\n    return tViewNodeChild !== null ? getNativeByTNodeOrNull(tViewNodeChild, lView) :\n                                     lContainer[NATIVE];\n  } else {\n    return lContainer[NATIVE];\n  }\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer3, rNode: RNode, isHostElement?: boolean): void {\n  const nativeParent = nativeParentNode(renderer, rNode);\n  if (nativeParent) {\n    nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n  }\n}\n\n/**\n * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and\n * stored on a component host level.\n * @param lView A LView where nodes are inserted (target LView)\n * @param tProjectionNode A projection node where previously re-distribution should be appended\n * (target insertion place)\n * @param selectorIndex A bucket from where nodes to project should be taken\n * @param componentView A where projectable nodes were initially created (source view)\n */\nexport function appendProjectedNodes(\n    lView: LView, tProjectionNode: TProjectionNode, selectorIndex: number,\n    componentView: LView): void {\n  const projectedView = componentView[PARENT] !as LView;\n  const componentNode = componentView[T_HOST] as TElementNode;\n  let nodeToProject = (componentNode.projection as(TNode | null)[])[selectorIndex];\n\n  if (Array.isArray(nodeToProject)) {\n    appendChild(nodeToProject, tProjectionNode, lView);\n  } else {\n    while (nodeToProject) {\n      if (!(nodeToProject.flags & TNodeFlags.isDetached)) {\n        if (nodeToProject.type === TNodeType.Projection) {\n          appendProjectedNodes(\n              lView, tProjectionNode, (nodeToProject as TProjectionNode).projection,\n              findComponentView(projectedView));\n        } else {\n          // This flag must be set now or we won't know that this node is projected\n          // if the nodes are inserted into a container later.\n          nodeToProject.flags |= TNodeFlags.isProjected;\n          appendProjectedNode(nodeToProject, tProjectionNode, lView, projectedView);\n        }\n      }\n      nodeToProject = nodeToProject.projectionNext;\n    }\n  }\n}\n\n/**\n * Loops over all children of a TNode container and appends them to the DOM\n *\n * @param ngContainerChildTNode The first child of the TNode container\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedChildren(\n    ngContainerChildTNode: TNode | null, tProjectionNode: TNode, currentView: LView,\n    projectionView: LView) {\n  while (ngContainerChildTNode) {\n    appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);\n    ngContainerChildTNode = ngContainerChildTNode.next;\n  }\n}\n\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param projectedTNode The TNode to be projected\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedNode(\n    projectedTNode: TNode, tProjectionNode: TNode, currentView: LView,\n    projectionView: LView): void {\n  const native = getNativeByTNode(projectedTNode, projectionView);\n  appendChild(native, tProjectionNode, currentView);\n\n  // the projected contents are processed while in the shadow view (which is the currentView)\n  // therefore we need to extract the view where the host element lives since it's the\n  // logical container of the content projected views\n  attachPatchData(native, projectionView);\n\n  const nodeOrContainer = projectionView[projectedTNode.index];\n  if (projectedTNode.type === TNodeType.Container) {\n    // The node we are adding is a container and we are adding it to an element which\n    // is not a component (no more re-projection).\n    // Alternatively a container is projected at the root of a component's template\n    // and can't be re-projected (as not content of any component).\n    // Assign the final projection location in those cases.\n    for (let i = CONTAINER_HEADER_OFFSET; i < nodeOrContainer.length; i++) {\n      addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);\n    }\n  } else if (projectedTNode.type === TNodeType.IcuContainer) {\n    // The node we are adding is an ICU container which is why we also need to project all the\n    // children nodes that might have been created previously and are linked to this anchor\n    let ngContainerChildTNode: TNode|null = projectedTNode.child as TNode;\n    appendProjectedChildren(\n        ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);\n  } else {\n    if (projectedTNode.type === TNodeType.ElementContainer) {\n      appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);\n    }\n\n    if (isLContainer(nodeOrContainer)) {\n      appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);\n    }\n  }\n}\n\n\n/**\n * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,\n * destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n *              which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n *               complication is that the nodes we are projecting can themselves have Containers\n *               or other Projections.\n *\n * As you can see this is a very recursive problem. While the recursive implementation is not the\n * most efficient one, trying to unroll the nodes non-recursively results in very complex code that\n * is very hard (to maintain). We are sacrificing a bit of performance for readability using a\n * recursive implementation.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnView(\n    renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, renderParent: RElement | null,\n    beforeNode: RNode | null | undefined) {\n  const tView = lView[TVIEW];\n  ngDevMode && assertNodeType(tView.node !, TNodeType.View);\n  let viewRootTNode: TNode|null = tView.node !.child;\n  while (viewRootTNode !== null) {\n    executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);\n    viewRootTNode = viewRootTNode.next;\n  }\n}\n\n/**\n * `executeActionOnProjection` performs an operation on the projection specified by `action`\n * (insert, detach, destroy).\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode projection TNode to process\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnProjection(\n    renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n    tProjectionNode: TProjectionNode, renderParent: RElement | null,\n    beforeNode: RNode | null | undefined) {\n  const componentLView = findComponentView(lView);\n  const componentNode = componentLView[T_HOST] as TElementNode;\n  ngDevMode && assertDefined(\n                   componentNode.projection,\n                   'Element nodes for which projection is processed must have projection defined.');\n  const nodeToProject = componentNode.projection ![tProjectionNode.projection];\n  if (nodeToProject !== undefined) {\n    if (Array.isArray(nodeToProject)) {\n      for (let i = 0; i < nodeToProject.length; i++) {\n        const rNode = nodeToProject[i];\n        ngDevMode && assertDomNode(rNode);\n        executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n      }\n    } else {\n      let projectionTNode: TNode|null = nodeToProject;\n      const projectedComponentLView = componentLView[PARENT] as LView;\n      while (projectionTNode !== null) {\n        executeActionOnNode(\n            renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);\n        projectionTNode = projectionTNode.projectionNext;\n      }\n    }\n  }\n}\n\n\n/**\n * `executeActionOnContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnContainer(\n    renderer: Renderer3, action: WalkTNodeTreeAction, lContainer: LContainer,\n    renderParent: RElement | null, beforeNode: RNode | null | undefined) {\n  ngDevMode && assertLContainer(lContainer);\n  const anchor = lContainer[NATIVE];  // LContainer has its own before node.\n  const native = unwrapRNode(lContainer);\n  // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n  // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node\n  // (comment in the DOM) that will be different from the LContainer's host node. In this particular\n  // case we need to execute action on 2 nodes:\n  // - container's host node (this is done in the executeNodeAction)\n  // - container's host node (this is done here)\n  if (anchor !== native) {\n    executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n  }\n  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    const lView = lContainer[i] as LView;\n    executeActionOnView(renderer, action, lView, renderParent, anchor);\n  }\n}\n\n\n/**\n * `executeActionOnElementContainerOrIcuContainer` performs an operation on the ng-container node\n * and its child nodes as specified by the `action` (insert, detach, destroy).\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tNode The TNode associated with the `ElementContainer` or `IcuContainer`.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnElementContainerOrIcuContainer(\n    renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n    tNode: TElementContainerNode | TIcuContainerNode, renderParent: RElement | null,\n    beforeNode: RNode | null | undefined) {\n  const node = lView[tNode.index];\n  executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);\n  let childTNode: TNode|null = tNode.child;\n  while (childTNode) {\n    executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);\n    childTNode = childTNode.next;\n  }\n}\n\nfunction executeActionOnNode(\n    renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, tNode: TNode,\n    renderParent: RElement | null, beforeNode: RNode | null | undefined): void {\n  const nodeType = tNode.type;\n  if (!(tNode.flags & TNodeFlags.isDetached)) {\n    if (nodeType === TNodeType.ElementContainer || nodeType === TNodeType.IcuContainer) {\n      executeActionOnElementContainerOrIcuContainer(\n          renderer, action, lView, tNode as TElementContainerNode | TIcuContainerNode, renderParent,\n          beforeNode);\n    } else if (nodeType === TNodeType.Projection) {\n      executeActionOnProjection(\n          renderer, action, lView, tNode as TProjectionNode, renderParent, beforeNode);\n    } else {\n      ngDevMode && assertNodeOfPossibleTypes(tNode, TNodeType.Element, TNodeType.Container);\n      executeActionOnElementOrContainer(\n          action, renderer, renderParent, lView[tNode.index], beforeNode);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {ViewContainerRef as viewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef} from '../linker/view_ref';\n\nimport {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn} from './instructions/shared';\nimport {TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {FLAGS, HOST, LView, LViewFlags, T_HOST} from './interfaces/view';\nimport {destroyLView, renderDetachView} from './node_manipulation';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, getNativeByTNodeOrNull} from './util/view_utils';\n\n\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\nexport interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {}\n\nexport class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_InternalViewRef,\n    viewEngine_ChangeDetectorRef_interface {\n  private _appRef: ApplicationRef|null = null;\n  private _viewContainerRef: viewEngine_ViewContainerRef|null = null;\n\n  /**\n   * @internal\n   */\n  public _tViewNode: TViewNode|null = null;\n\n  /**\n   * @internal\n   */\n  public _lView: LView;\n\n  get rootNodes(): any[] {\n    if (this._lView[HOST] == null) {\n      const tView = this._lView[T_HOST] as TViewNode;\n      return collectNativeNodes(this._lView, tView, []);\n    }\n    return [];\n  }\n\n  constructor(_lView: LView, private _context: T|null, private _componentIndex: number) {\n    this._lView = _lView;\n  }\n\n  get context(): T { return this._context ? this._context : this._lookUpContext(); }\n\n  get destroyed(): boolean {\n    return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n  }\n\n  destroy(): void {\n    if (this._appRef) {\n      this._appRef.detachView(this);\n    } else if (this._viewContainerRef) {\n      const index = this._viewContainerRef.indexOf(this);\n\n      if (index > -1) {\n        this._viewContainerRef.detach(index);\n      }\n\n      this._viewContainerRef = null;\n    }\n    destroyLView(this._lView);\n  }\n\n  onDestroy(callback: Function) { storeCleanupFn(this._lView, callback); }\n\n  /**\n   * Marks a view and all of its ancestors dirty.\n   *\n   * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n   * multiple `markForCheck` calls to into one change detection run.\n   *\n   * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n   * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n   * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n   *\n   * <!-- TODO: Add a link to a chapter on OnPush components -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Component({\n   *   selector: 'my-app',\n   *   template: `Number of ticks: {{numberOfTicks}}`\n   *   changeDetection: ChangeDetectionStrategy.OnPush,\n   * })\n   * class AppComponent {\n   *   numberOfTicks = 0;\n   *\n   *   constructor(private ref: ChangeDetectorRef) {\n   *     setInterval(() => {\n   *       this.numberOfTicks++;\n   *       // the following is required, otherwise the view will not be updated\n   *       this.ref.markForCheck();\n   *     }, 1000);\n   *   }\n   * }\n   * ```\n   */\n  markForCheck(): void { markViewDirty(this._lView); }\n\n  /**\n   * Detaches the view from the change detection tree.\n   *\n   * Detached views will not be checked during change detection runs until they are\n   * re-attached, even if they are dirty. `detach` can be used in combination with\n   * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n   * detection checks.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example defines a component with a large list of readonly data.\n   * Imagine the data changes constantly, many times per second. For performance reasons,\n   * we want to check and update the list every five seconds. We can do that by detaching\n   * the component's change detector and doing a local check every five seconds.\n   *\n   * ```typescript\n   * class DataProvider {\n   *   // in a real application the returned data will be different every time\n   *   get data() {\n   *     return [1,2,3,4,5];\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'giant-list',\n   *   template: `\n   *     <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n   *   `,\n   * })\n   * class GiantList {\n   *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n   *     ref.detach();\n   *     setInterval(() => {\n   *       this.ref.detectChanges();\n   *     }, 5000);\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'app',\n   *   providers: [DataProvider],\n   *   template: `\n   *     <giant-list><giant-list>\n   *   `,\n   * })\n   * class App {\n   * }\n   * ```\n   */\n  detach(): void { this._lView[FLAGS] &= ~LViewFlags.Attached; }\n\n  /**\n   * Re-attaches a view to the change detection tree.\n   *\n   * This can be used to re-attach views that were previously detached from the tree\n   * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example creates a component displaying `live` data. The component will detach\n   * its change detector from the main change detector tree when the component's live property\n   * is set to false.\n   *\n   * ```typescript\n   * class DataProvider {\n   *   data = 1;\n   *\n   *   constructor() {\n   *     setInterval(() => {\n   *       this.data = this.data * 2;\n   *     }, 500);\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'live-data',\n   *   inputs: ['live'],\n   *   template: 'Data: {{dataProvider.data}}'\n   * })\n   * class LiveData {\n   *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n   *\n   *   set live(value) {\n   *     if (value) {\n   *       this.ref.reattach();\n   *     } else {\n   *       this.ref.detach();\n   *     }\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'my-app',\n   *   providers: [DataProvider],\n   *   template: `\n   *     Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n   *     <live-data [live]=\"live\"><live-data>\n   *   `,\n   * })\n   * class AppComponent {\n   *   live = true;\n   * }\n   * ```\n   */\n  reattach(): void { this._lView[FLAGS] |= LViewFlags.Attached; }\n\n  /**\n   * Checks the view and its children.\n   *\n   * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n   * local change detection checks.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example defines a component with a large list of readonly data.\n   * Imagine, the data changes constantly, many times per second. For performance reasons,\n   * we want to check and update the list every five seconds.\n   *\n   * We can do that by detaching the component's change detector and doing a local change detection\n   * check every five seconds.\n   *\n   * See {@link ChangeDetectorRef#detach detach} for more information.\n   */\n  detectChanges(): void { detectChangesInternal(this._lView, this.context); }\n\n  /**\n   * Checks the change detector and its children, and throws if any changes are detected.\n   *\n   * This is used in development mode to verify that running change detection doesn't\n   * introduce other changes.\n   */\n  checkNoChanges(): void { checkNoChangesInternal(this._lView, this.context); }\n\n  attachToViewContainerRef(vcRef: viewEngine_ViewContainerRef) {\n    if (this._appRef) {\n      throw new Error('This view is already attached directly to the ApplicationRef!');\n    }\n    this._viewContainerRef = vcRef;\n  }\n\n  detachFromAppRef() {\n    this._appRef = null;\n    renderDetachView(this._lView);\n  }\n\n  attachToAppRef(appRef: ApplicationRef) {\n    if (this._viewContainerRef) {\n      throw new Error('This view is already attached to a ViewContainer!');\n    }\n    this._appRef = appRef;\n  }\n\n  private _lookUpContext(): T {\n    return this._context = getLViewParent(this._lView) ![this._componentIndex] as T;\n  }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n  constructor(public _view: LView) { super(_view, null, -1); }\n\n  detectChanges(): void { detectChangesInRootView(this._view); }\n\n  checkNoChanges(): void { checkNoChangesInRootView(this._view); }\n\n  get context(): T { return null !; }\n}\n\nfunction collectNativeNodes(lView: LView, parentTNode: TNode, result: any[]): any[] {\n  let tNodeChild = parentTNode.child;\n\n  while (tNodeChild) {\n    const nativeNode = getNativeByTNodeOrNull(tNodeChild, lView);\n    nativeNode && result.push(nativeNode);\n    if (tNodeChild.type === TNodeType.ElementContainer) {\n      collectNativeNodes(lView, tNodeChild, result);\n    } else if (tNodeChild.type === TNodeType.Projection) {\n      const componentView = findComponentView(lView);\n      const componentHost = componentView[T_HOST] as TElementNode;\n      const parentView = getLViewParent(componentView);\n      let currentProjectedNode: TNode|null =\n          (componentHost.projection as(TNode | null)[])[tNodeChild.projection as number];\n\n      while (currentProjectedNode && parentView) {\n        result.push(getNativeByTNode(currentProjectedNode, parentView));\n        currentProjectedNode = currentProjectedNode.next;\n      }\n    }\n    tNodeChild = tNodeChild.next;\n  }\n\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {Injector} from '../di/injector';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef as ViewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, ViewRef as viewEngine_ViewRef} from '../linker/view_ref';\nimport {Renderer2} from '../render/api';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertGreaterThan, assertLessThan} from '../util/assert';\nimport {assertLContainer} from './assert';\nimport {NodeInjector, getParentInjectorLocation} from './di';\nimport {addToViewTree, createEmbeddedViewAndNode, createLContainer, renderEmbeddedTemplate} from './instructions/shared';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, VIEW_REFS} from './interfaces/container';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {RComment, RElement, isProceduralRenderer} from './interfaces/renderer';\n\nimport {isComponent, isLContainer, isLView, isRootView} from './interfaces/type_checks';\nimport {CONTEXT, DECLARATION_LCONTAINER, LView, QUERIES, RENDERER, TView, T_HOST} from './interfaces/view';\n\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {addRemoveViewFromContainer, appendChild, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode, removeView} from './node_manipulation';\nimport {getParentInjectorTNode} from './node_util';\nimport {getLView, getPreviousOrParentTNode} from './state';\nimport {getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNode, unwrapRNode, viewAttachedToContainer} from './util/view_utils';\nimport {ViewRef} from './view_ref';\n\n\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(ElementRefToken: typeof ViewEngine_ElementRef):\n    ViewEngine_ElementRef {\n  return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\nlet R3ElementRef: {new (native: RElement | RComment): ViewEngine_ElementRef};\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param ElementRefToken The ElementRef type\n * @param tNode The node for which you'd like an ElementRef\n * @param view The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(\n    ElementRefToken: typeof ViewEngine_ElementRef, tNode: TNode,\n    view: LView): ViewEngine_ElementRef {\n  if (!R3ElementRef) {\n    // TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug\n    R3ElementRef = class ElementRef_ extends ElementRefToken {};\n  }\n  return new R3ElementRef(getNativeByTNode(tNode, view) as RElement);\n}\n\nlet R3TemplateRef: {\n  new (_declarationParentView: LView, hostTNode: TContainerNode, elementRef: ViewEngine_ElementRef):\n      ViewEngine_TemplateRef<any>\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(\n    TemplateRefToken: typeof ViewEngine_TemplateRef,\n    ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_TemplateRef<T>|null {\n  return createTemplateRef<T>(\n      TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param TemplateRefToken The TemplateRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(\n    TemplateRefToken: typeof ViewEngine_TemplateRef, ElementRefToken: typeof ViewEngine_ElementRef,\n    hostTNode: TNode, hostView: LView): ViewEngine_TemplateRef<T>|null {\n  if (!R3TemplateRef) {\n    // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug\n    R3TemplateRef = class TemplateRef_<T> extends TemplateRefToken<T> {\n      constructor(\n          private _declarationView: LView, private _declarationTContainer: TContainerNode,\n          readonly elementRef: ViewEngine_ElementRef) {\n        super();\n      }\n\n      createEmbeddedView(context: T): viewEngine_EmbeddedViewRef<T> {\n        const embeddedTView = this._declarationTContainer.tViews as TView;\n        const lView = createEmbeddedViewAndNode(\n            embeddedTView, context, this._declarationView,\n            this._declarationTContainer.injectorIndex);\n\n        const declarationLContainer = this._declarationView[this._declarationTContainer.index];\n        ngDevMode && assertLContainer(declarationLContainer);\n        lView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n        const declarationViewLQueries = this._declarationView[QUERIES];\n        if (declarationViewLQueries !== null) {\n          lView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n        }\n\n        renderEmbeddedTemplate(lView, embeddedTView, context);\n        const viewRef = new ViewRef(lView, context, -1);\n        viewRef._tViewNode = lView[T_HOST] as TViewNode;\n        return viewRef;\n      }\n    };\n  }\n\n  if (hostTNode.type === TNodeType.Container) {\n    ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n    return new R3TemplateRef(\n        hostView, hostTNode as TContainerNode,\n        createElementRef(ElementRefToken, hostTNode, hostView));\n  } else {\n    return null;\n  }\n}\n\nlet R3ViewContainerRef: {\n  new (\n      lContainer: LContainer, hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n      hostView: LView): ViewEngine_ViewContainerRef\n};\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(\n    ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n    ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_ViewContainerRef {\n  const previousTNode =\n      getPreviousOrParentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n  return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n    ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n    ElementRefToken: typeof ViewEngine_ElementRef,\n    hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n    hostView: LView): ViewEngine_ViewContainerRef {\n  if (!R3ViewContainerRef) {\n    // TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug\n    R3ViewContainerRef = class ViewContainerRef_ extends ViewContainerRefToken {\n      constructor(\n          private _lContainer: LContainer,\n          private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n          private _hostView: LView) {\n        super();\n      }\n\n      get element(): ViewEngine_ElementRef {\n        return createElementRef(ElementRefToken, this._hostTNode, this._hostView);\n      }\n\n      get injector(): Injector { return new NodeInjector(this._hostTNode, this._hostView); }\n\n      /** @deprecated No replacement */\n      get parentInjector(): Injector {\n        const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);\n        const parentView = getParentInjectorView(parentLocation, this._hostView);\n        const parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);\n\n        return !hasParentInjector(parentLocation) || parentTNode == null ?\n            new NodeInjector(null, this._hostView) :\n            new NodeInjector(parentTNode, parentView);\n      }\n\n      clear(): void {\n        while (this.length > 0) {\n          this.remove(this.length - 1);\n        }\n      }\n\n      get(index: number): viewEngine_ViewRef|null {\n        return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS] ![index] || null;\n      }\n\n      get length(): number { return this._lContainer.length - CONTAINER_HEADER_OFFSET; }\n\n      createEmbeddedView<C>(templateRef: ViewEngine_TemplateRef<C>, context?: C, index?: number):\n          viewEngine_EmbeddedViewRef<C> {\n        const viewRef = templateRef.createEmbeddedView(context || <any>{});\n        this.insert(viewRef, index);\n        return viewRef;\n      }\n\n      createComponent<C>(\n          componentFactory: viewEngine_ComponentFactory<C>, index?: number|undefined,\n          injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n          ngModuleRef?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<C> {\n        const contextInjector = injector || this.parentInjector;\n        if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {\n          ngModuleRef = contextInjector.get(viewEngine_NgModuleRef, null);\n        }\n\n        const componentRef =\n            componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n        this.insert(componentRef.hostView, index);\n        return componentRef;\n      }\n\n      insert(viewRef: viewEngine_ViewRef, index?: number): viewEngine_ViewRef {\n        if (viewRef.destroyed) {\n          throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n        }\n        this.allocateContainerIfNeeded();\n        const lView = (viewRef as ViewRef<any>)._lView !;\n        const adjustedIdx = this._adjustIndex(index);\n\n        if (viewAttachedToContainer(lView)) {\n          // If view is already attached, fall back to move() so we clean up\n          // references appropriately.\n          return this.move(viewRef, adjustedIdx);\n        }\n\n        insertView(lView, this._lContainer, adjustedIdx);\n\n        const beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n        addRemoveViewFromContainer(lView, true, beforeNode);\n\n        (viewRef as ViewRef<any>).attachToViewContainerRef(this);\n        addToArray(this._lContainer[VIEW_REFS] !, adjustedIdx, viewRef);\n\n        return viewRef;\n      }\n\n      move(viewRef: viewEngine_ViewRef, newIndex: number): viewEngine_ViewRef {\n        if (viewRef.destroyed) {\n          throw new Error('Cannot move a destroyed View in a ViewContainer!');\n        }\n        const index = this.indexOf(viewRef);\n        if (index !== -1) this.detach(index);\n        this.insert(viewRef, newIndex);\n        return viewRef;\n      }\n\n      indexOf(viewRef: viewEngine_ViewRef): number {\n        return this._lContainer[VIEW_REFS] !== null ?\n            this._lContainer[VIEW_REFS] !.indexOf(viewRef) :\n            0;\n      }\n\n      remove(index?: number): void {\n        this.allocateContainerIfNeeded();\n        const adjustedIdx = this._adjustIndex(index, -1);\n        removeView(this._lContainer, adjustedIdx);\n        removeFromArray(this._lContainer[VIEW_REFS] !, adjustedIdx);\n      }\n\n      detach(index?: number): viewEngine_ViewRef|null {\n        this.allocateContainerIfNeeded();\n        const adjustedIdx = this._adjustIndex(index, -1);\n        const view = detachView(this._lContainer, adjustedIdx);\n\n        const wasDetached =\n            view && removeFromArray(this._lContainer[VIEW_REFS] !, adjustedIdx) != null;\n        return wasDetached ? new ViewRef(view !, view ![CONTEXT], -1) : null;\n      }\n\n      private _adjustIndex(index?: number, shift: number = 0) {\n        if (index == null) {\n          return this.length + shift;\n        }\n        if (ngDevMode) {\n          assertGreaterThan(index, -1, 'index must be positive');\n          // +1 because it's legal to insert at the end.\n          assertLessThan(index, this.length + 1 + shift, 'index');\n        }\n        return index;\n      }\n\n      private allocateContainerIfNeeded(): void {\n        if (this._lContainer[VIEW_REFS] === null) {\n          this._lContainer[VIEW_REFS] = [];\n        }\n      }\n    };\n  }\n\n  ngDevMode && assertNodeOfPossibleTypes(\n                   hostTNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n\n  let lContainer: LContainer;\n  const slotValue = hostView[hostTNode.index];\n  if (isLContainer(slotValue)) {\n    // If the host is a container, we don't need to create a new LContainer\n    lContainer = slotValue;\n    lContainer[ACTIVE_INDEX] = -1;\n  } else {\n    let commentNode: RComment;\n    // If the host is an element container, the native host element is guaranteed to be a\n    // comment and we can reuse that comment as anchor element for the new LContainer.\n    if (hostTNode.type === TNodeType.ElementContainer) {\n      commentNode = unwrapRNode(slotValue) as RComment;\n    } else {\n      ngDevMode && ngDevMode.rendererCreateComment++;\n      commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');\n    }\n\n    // A container can be created on the root (topmost / bootstrapped) component and in this case we\n    // can't use LTree to insert container's marker node (both parent of a comment node and the\n    // commend node itself is located outside of elements hold by LTree). In this specific case we\n    // use low-level DOM manipulation to insert container's marker (comment) node.\n    if (isRootView(hostView)) {\n      const renderer = hostView[RENDERER];\n      const hostNative = getNativeByTNode(hostTNode, hostView) !;\n      const parentOfHostNative = nativeParentNode(renderer, hostNative);\n      nativeInsertBefore(\n          renderer, parentOfHostNative !, commentNode, nativeNextSibling(renderer, hostNative));\n    } else {\n      appendChild(commentNode, hostTNode, hostView);\n    }\n\n    hostView[hostTNode.index] = lContainer =\n        createLContainer(slotValue, hostView, commentNode, hostTNode, true);\n\n    addToViewTree(hostView, lContainer);\n  }\n\n  return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n}\n\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(isPipe = false): ViewEngine_ChangeDetectorRef {\n  return createViewRef(getPreviousOrParentTNode(), getLView(), isPipe);\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param hostTNode The node that is requesting a ChangeDetectorRef\n * @param hostView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(\n    hostTNode: TNode, hostView: LView, isPipe: boolean): ViewEngine_ChangeDetectorRef {\n  if (isComponent(hostTNode) && !isPipe) {\n    const componentIndex = hostTNode.directiveStart;\n    const componentView = getComponentViewByIndex(hostTNode.index, hostView);\n    return new ViewRef(componentView, null, componentIndex);\n  } else if (\n      hostTNode.type === TNodeType.Element || hostTNode.type === TNodeType.Container ||\n      hostTNode.type === TNodeType.ElementContainer) {\n    const hostComponentView = findComponentView(hostView);\n    return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);\n  }\n  return null !;\n}\n\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(view: LView): Renderer2 {\n  const renderer = view[RENDERER];\n  if (isProceduralRenderer(renderer)) {\n    return renderer as Renderer2;\n  } else {\n    throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n  }\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n  // We need the Renderer to be based on the component that it's being injected into, however since\n  // DI happens before we've entered its view, `getLView` will return the parent view instead.\n  const lView = getLView();\n  const tNode = getPreviousOrParentTNode();\n  const nodeAtIndex = getComponentViewByIndex(tNode.index, lView);\n  return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RelativeInjectorLocation} from './interfaces/injector';\nimport {TContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {DECLARATION_VIEW, LView, T_HOST} from './interfaces/view';\nimport {getParentInjectorViewOffset} from './util/injector_utils';\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the TNode of the parent injector is found.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @param startTNode The TNode instance of the starting element\n * @returns The TNode of the parent injector\n */\nexport function getParentInjectorTNode(\n    location: RelativeInjectorLocation, startView: LView, startTNode: TNode): TElementNode|\n    TContainerNode|null {\n  if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n    // view offset is 0\n    const injectorIndex = startTNode.parent.injectorIndex;\n    let parentTNode = startTNode.parent;\n    while (parentTNode.parent != null && injectorIndex == parentTNode.injectorIndex) {\n      parentTNode = parentTNode.parent;\n    }\n    return parentTNode;\n  }\n  let viewOffset = getParentInjectorViewOffset(location);\n  // view offset is 1\n  let parentView = startView;\n  let parentTNode = startView[T_HOST] as TElementNode;\n  // view offset is superior to 1\n  while (viewOffset > 1) {\n    parentView = parentView[DECLARATION_VIEW] !;\n    parentTNode = parentView[T_HOST] as TElementNode;\n    viewOffset--;\n  }\n  return parentTNode;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../render3/view_engine_compatibility';\n\n/**\n * Base class for Angular Views, provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n  /**\n   * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)\n   * change detection strategy, explicitly marks the view as changed so that\n   * it can be checked again.\n   *\n   * Components are normally marked as dirty (in need of rerendering) when inputs\n   * have changed or events have fired in the view. Call this method to ensure that\n   * a component is checked even if these triggers have not occured.\n   *\n   * <!-- TODO: Add a link to a chapter on OnPush components -->\n   *\n   */\n  abstract markForCheck(): void;\n\n  /**\n   * Detaches this view from the change-detection tree.\n   * A detached view is  not checked until it is reattached.\n   * Use in combination with `detectChanges()` to implement local change detection checks.\n   *\n   * Detached views are not checked during change detection runs until they are\n   * re-attached, even if they are marked as dirty.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   */\n  abstract detach(): void;\n\n  /**\n   * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach\n   * detach}\n   * to implement local change detection checks.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n   *\n   */\n  abstract detectChanges(): void;\n\n  /**\n   * Checks the change detector and its children, and throws if any changes are detected.\n   *\n   * Use in development mode to verify that running change detection doesn't introduce\n   * other changes.\n   */\n  abstract checkNoChanges(): void;\n\n  /**\n   * Re-attaches the previously detached view to the change detection tree.\n   * Views are attached to the tree by default.\n   *\n   * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n   *\n   */\n  abstract reattach(): void;\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();\n}\n\n\n\nexport const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = render3InjectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = (...args: any[]): any => {};\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY: typeof render3InjectChangeDetectorRef =\n    SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n  return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiatable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function { prototype: T; }\n\nexport interface Type<T> extends Function { new (...args: any[]): T; }\n\nexport type Mutable<T extends{[x: string]: any}, K extends string> = {\n  [P in K]: T[P];\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, isType} from '../interface/type';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\nimport {stringify} from '../util/stringify';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\n\n\n/**\n * Attention: These regex has to hold even if the code is minified!\n */\nexport const DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nexport const INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\nexport const INHERITED_CLASS_WITH_CTOR =\n    /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\nexport const INHERITED_CLASS_WITH_DELEGATE_CTOR =\n    /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s+super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n  return DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n      (INHERITED_CLASS.test(typeStr) && !INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n  private _reflect: any;\n\n  constructor(reflect?: any) { this._reflect = reflect || global['Reflect']; }\n\n  isReflectionEnabled(): boolean { return true; }\n\n  factory<T>(t: Type<T>): (args: any[]) => T { return (...args: any[]) => new t(...args); }\n\n  /** @internal */\n  _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n    let result: any[][];\n\n    if (typeof paramTypes === 'undefined') {\n      result = new Array(paramAnnotations.length);\n    } else {\n      result = new Array(paramTypes.length);\n    }\n\n    for (let i = 0; i < result.length; i++) {\n      // TS outputs Object for parameters without types, while Traceur omits\n      // the annotations. For now we preserve the Traceur behavior to aid\n      // migration, but this can be revisited.\n      if (typeof paramTypes === 'undefined') {\n        result[i] = [];\n      } else if (paramTypes[i] && paramTypes[i] != Object) {\n        result[i] = [paramTypes[i]];\n      } else {\n        result[i] = [];\n      }\n      if (paramAnnotations && paramAnnotations[i] != null) {\n        result[i] = result[i].concat(paramAnnotations[i]);\n      }\n    }\n    return result;\n  }\n\n  private _ownParameters(type: Type<any>, parentCtor: any): any[][]|null {\n    const typeStr = type.toString();\n    // If we have no decorators, we only have function.length as metadata.\n    // In that case, to detect whether a child class declared an own constructor or not,\n    // we need to look inside of that constructor to check whether it is\n    // just calling the parent.\n    // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n    // that sets 'design:paramtypes' to []\n    // if a class inherits from another class but has no ctor declared itself.\n    if (isDelegateCtor(typeStr)) {\n      return null;\n    }\n\n    // Prefer the direct API.\n    if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n      return (<any>type).parameters;\n    }\n\n    // API of tsickle for lowering decorators to properties on the class.\n    const tsickleCtorParams = (<any>type).ctorParameters;\n    if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n      // Newer tsickle uses a function closure\n      // Retain the non-function case for compatibility with older tsickle\n      const ctorParameters =\n          typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n      const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n      const paramAnnotations = ctorParameters.map(\n          (ctorParam: any) =>\n              ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n      return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n    }\n\n    // API for metadata created by invoking the decorators.\n    const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n    const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n        this._reflect.getOwnMetadata('design:paramtypes', type);\n    if (paramTypes || paramAnnotations) {\n      return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n    }\n\n    // If a class has no decorators, at least create metadata\n    // based on function.length.\n    // Note: We know that this is a real constructor as we checked\n    // the content of the constructor above.\n    return new Array((<any>type.length)).fill(undefined);\n  }\n\n  parameters(type: Type<any>): any[][] {\n    // Note: only report metadata if we have at least one class decorator\n    // to stay in sync with the static reflector.\n    if (!isType(type)) {\n      return [];\n    }\n    const parentCtor = getParentCtor(type);\n    let parameters = this._ownParameters(type, parentCtor);\n    if (!parameters && parentCtor !== Object) {\n      parameters = this.parameters(parentCtor);\n    }\n    return parameters || [];\n  }\n\n  private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[]|null {\n    // Prefer the direct API.\n    if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n      let annotations = (<any>typeOrFunc).annotations;\n      if (typeof annotations === 'function' && annotations.annotations) {\n        annotations = annotations.annotations;\n      }\n      return annotations;\n    }\n\n    // API of tsickle for lowering decorators to properties on the class.\n    if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n      return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n    }\n\n    // API for metadata created by invoking the decorators.\n    if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n      return (typeOrFunc as any)[ANNOTATIONS];\n    }\n    return null;\n  }\n\n  annotations(typeOrFunc: Type<any>): any[] {\n    if (!isType(typeOrFunc)) {\n      return [];\n    }\n    const parentCtor = getParentCtor(typeOrFunc);\n    const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n    const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n    return parentAnnotations.concat(ownAnnotations);\n  }\n\n  private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]}|null {\n    // Prefer the direct API.\n    if ((<any>typeOrFunc).propMetadata &&\n        (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata) {\n      let propMetadata = (<any>typeOrFunc).propMetadata;\n      if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n        propMetadata = propMetadata.propMetadata;\n      }\n      return propMetadata;\n    }\n\n    // API of tsickle for lowering decorators to properties on the class.\n    if ((<any>typeOrFunc).propDecorators &&\n        (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators) {\n      const propDecorators = (<any>typeOrFunc).propDecorators;\n      const propMetadata = <{[key: string]: any[]}>{};\n      Object.keys(propDecorators).forEach(prop => {\n        propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n      });\n      return propMetadata;\n    }\n\n    // API for metadata created by invoking the decorators.\n    if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n      return (typeOrFunc as any)[PROP_METADATA];\n    }\n    return null;\n  }\n\n  propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n    if (!isType(typeOrFunc)) {\n      return {};\n    }\n    const parentCtor = getParentCtor(typeOrFunc);\n    const propMetadata: {[key: string]: any[]} = {};\n    if (parentCtor !== Object) {\n      const parentPropMetadata = this.propMetadata(parentCtor);\n      Object.keys(parentPropMetadata).forEach((propName) => {\n        propMetadata[propName] = parentPropMetadata[propName];\n      });\n    }\n    const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n    if (ownPropMetadata) {\n      Object.keys(ownPropMetadata).forEach((propName) => {\n        const decorators: any[] = [];\n        if (propMetadata.hasOwnProperty(propName)) {\n          decorators.push(...propMetadata[propName]);\n        }\n        decorators.push(...ownPropMetadata[propName]);\n        propMetadata[propName] = decorators;\n      });\n    }\n    return propMetadata;\n  }\n\n  ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n    if (!isType(typeOrFunc)) {\n      return {};\n    }\n    return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n  }\n\n  hasLifecycleHook(type: any, lcProperty: string): boolean {\n    return type instanceof Type && lcProperty in type.prototype;\n  }\n\n  guards(type: any): {[key: string]: any} { return {}; }\n\n  getter(name: string): GetterFn { return <GetterFn>new Function('o', 'return o.' + name + ';'); }\n\n  setter(name: string): SetterFn {\n    return <SetterFn>new Function('o', 'v', 'return o.' + name + ' = v;');\n  }\n\n  method(name: string): MethodFn {\n    const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n        return o.${name}.apply(o, args);`;\n    return <MethodFn>new Function('o', 'args', functionBody);\n  }\n\n  // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n  importUri(type: any): string {\n    // StaticSymbol\n    if (typeof type === 'object' && type['filePath']) {\n      return type['filePath'];\n    }\n    // Runtime type\n    return `./${stringify(type)}`;\n  }\n\n  resourceUri(type: any): string { return `./${stringify(type)}`; }\n\n  resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n    return runtime;\n  }\n  resolveEnum(enumIdentifier: any, name: string): any { return enumIdentifier[name]; }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n  if (!decoratorInvocations) {\n    return [];\n  }\n  return decoratorInvocations.map(decoratorInvocation => {\n    const decoratorType = decoratorInvocation.type;\n    const annotationCls = decoratorType.annotationCls;\n    const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n    return new annotationCls(...annotationArgs);\n  });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n  const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n  const parentCtor = parentProto ? parentProto.constructor : null;\n  // Note: We always use `Object` as the null value\n  // to simplify checking later on.\n  return parentCtor || Object;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../../change_detection/change_detector_ref';\nimport {CompilerFacade, R3DependencyMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Attribute, Host, Inject, Optional, Self, SkipSelf} from '../metadata';\n\nlet _reflect: ReflectionCapabilities|null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n  return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n  return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n  const compiler = getCompilerFacade();\n  return deps.map(dep => reflectDependency(compiler, dep));\n}\n\nfunction reflectDependency(compiler: CompilerFacade, dep: any | any[]): R3DependencyMetadataFacade {\n  const meta: R3DependencyMetadataFacade = {\n    token: null,\n    host: false,\n    optional: false,\n    resolved: compiler.R3ResolvedDependencyType.Token,\n    self: false,\n    skipSelf: false,\n  };\n\n  function setTokenAndResolvedType(token: any): void {\n    meta.resolved = compiler.R3ResolvedDependencyType.Token;\n    meta.token = token;\n  }\n\n  if (Array.isArray(dep)) {\n    if (dep.length === 0) {\n      throw new Error('Dependency array must have arguments.');\n    }\n    for (let j = 0; j < dep.length; j++) {\n      const param = dep[j];\n      if (param === undefined) {\n        // param may be undefined if type of dep is not set by ngtsc\n        continue;\n      } else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {\n        meta.optional = true;\n      } else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {\n        meta.skipSelf = true;\n      } else if (param instanceof Self || param.__proto__.ngMetadataName === 'Self') {\n        meta.self = true;\n      } else if (param instanceof Host || param.__proto__.ngMetadataName === 'Host') {\n        meta.host = true;\n      } else if (param instanceof Inject) {\n        meta.token = param.token;\n      } else if (param instanceof Attribute) {\n        if (param.attributeName === undefined) {\n          throw new Error(`Attribute name must be defined.`);\n        }\n        meta.token = param.attributeName;\n        meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n      } else if (param === ChangeDetectorRef) {\n        meta.token = param;\n        meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;\n      } else {\n        setTokenAndResolvedType(param);\n      }\n    }\n  } else {\n    setTokenAndResolvedType(dep);\n  }\n  return meta;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3InjectableMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {Injectable} from '../injectable';\nimport {NG_INJECTABLE_DEF} from '../interface/defs';\nimport {ClassSansProvider, ExistingSansProvider, FactorySansProvider, ValueProvider, ValueSansProvider} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * `ngInjectableDef` onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, srcMeta?: Injectable): void {\n  let def: any = null;\n\n  // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it\n  if (type.hasOwnProperty(NG_INJECTABLE_DEF)) return;\n\n  Object.defineProperty(type, NG_INJECTABLE_DEF, {\n    get: () => {\n      if (def === null) {\n        // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n        const meta: Injectable = srcMeta || {providedIn: null};\n        const hasAProvider = isUseClassProvider(meta) || isUseFactoryProvider(meta) ||\n            isUseValueProvider(meta) || isUseExistingProvider(meta);\n\n\n        const compilerMeta: R3InjectableMetadataFacade = {\n          name: type.name,\n          type: type,\n          typeArgumentCount: 0,\n          providedIn: meta.providedIn,\n          ctorDeps: reflectDependencies(type),\n          userDeps: undefined,\n        };\n        if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n          compilerMeta.userDeps = convertDependencies(meta.deps);\n        }\n        if (!hasAProvider) {\n          // In the case the user specifies a type provider, treat it as {provide: X, useClass: X}.\n          // The deps will have been reflected above, causing the factory to create the class by\n          // calling\n          // its constructor with injected deps.\n          compilerMeta.useClass = type;\n        } else if (isUseClassProvider(meta)) {\n          // The user explicitly specified useClass, and may or may not have provided deps.\n          compilerMeta.useClass = meta.useClass;\n        } else if (isUseValueProvider(meta)) {\n          // The user explicitly specified useValue.\n          compilerMeta.useValue = meta.useValue;\n        } else if (isUseFactoryProvider(meta)) {\n          // The user explicitly specified useFactory.\n          compilerMeta.useFactory = meta.useFactory;\n        } else if (isUseExistingProvider(meta)) {\n          // The user explicitly specified useExisting.\n          compilerMeta.useExisting = meta.useExisting;\n        } else {\n          // Can't happen - either hasAProvider will be false, or one of the providers will be set.\n          throw new Error(`Unreachable state.`);\n        }\n        def = getCompilerFacade().compileInjectable(\n            angularCoreDiEnv, `ng:///${type.name}/ngInjectableDef.js`, compilerMeta);\n      }\n      return def;\n    },\n  });\n}\n\ntype UseClassProvider = Injectable & ClassSansProvider & {deps?: any[]};\n\nconst USE_VALUE =\n    getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n  return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable&ValueSansProvider {\n  return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable&FactorySansProvider {\n  return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable&ExistingSansProvider {\n  return (meta as ExistingSansProvider).useExisting !== undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ReflectionCapabilities} from '../reflection/reflection_capabilities';\nimport {getClosureSafeProperty} from '../util/property';\n\nimport {injectArgs, ÉµÉµinject} from './injector_compatibility';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';\n\nconst USE_VALUE =\n    getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\nconst EMPTY_ARRAY: any[] = [];\n\nexport function convertInjectableProviderToFactory(\n    type: Type<any>, provider?: ValueSansProvider | ExistingSansProvider | StaticClassSansProvider |\n        ConstructorSansProvider | FactorySansProvider | ClassSansProvider): () => any {\n  if (!provider) {\n    const reflectionCapabilities = new ReflectionCapabilities();\n    const deps = reflectionCapabilities.parameters(type);\n    // TODO - convert to flags.\n    return () => new type(...injectArgs(deps as any[]));\n  }\n\n  if (USE_VALUE in provider) {\n    const valueProvider = (provider as ValueSansProvider);\n    return () => valueProvider.useValue;\n  } else if ((provider as ExistingSansProvider).useExisting) {\n    const existingProvider = (provider as ExistingSansProvider);\n    return () => ÉµÉµinject(existingProvider.useExisting);\n  } else if ((provider as FactorySansProvider).useFactory) {\n    const factoryProvider = (provider as FactorySansProvider);\n    return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n  } else if ((provider as StaticClassSansProvider | ClassSansProvider).useClass) {\n    const classProvider = (provider as StaticClassSansProvider | ClassSansProvider);\n    let deps = (provider as StaticClassSansProvider).deps;\n    if (!deps) {\n      const reflectionCapabilities = new ReflectionCapabilities();\n      deps = reflectionCapabilities.parameters(type);\n    }\n    return () => new classProvider.useClass(...injectArgs(deps));\n  } else {\n    let deps = (provider as ConstructorSansProvider).deps;\n    if (!deps) {\n      const reflectionCapabilities = new ReflectionCapabilities();\n      deps = reflectionCapabilities.parameters(type);\n    }\n    return () => new type(...injectArgs(deps !));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\nimport {InjectableType, getInjectableDef, ÉµÉµInjectableDef, ÉµÉµdefineInjectable} from './interface/defs';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable as render3CompileInjectable} from './jit/injectable';\nimport {convertInjectableProviderToFactory} from './util';\n\n\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider | ExistingSansProvider |\n    StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n  /**\n   * Decorator that marks a class as available to be\n   * provided and injected as a dependency.\n   *\n   * @see [Introduction to Services and DI](guide/architecture-services)\n   * @see [Dependency Injection Guide](guide/dependency-injection)\n   *\n   * @usageNotes\n   *\n   * Marking a class with `@Injectable` ensures that the compiler\n   * will generate the necessary metadata to create the class's\n   * dependencies when the class is injected.\n   *\n   * The following example shows how a service class is properly\n   *  marked so that a supporting service can be injected upon creation.\n   *\n   * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"></code-example>\n   *\n   */\n  (): TypeDecorator;\n  (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): TypeDecorator;\n  new (): Injectable;\n  new (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n  /**\n   * Determines which injectors will provide the injectable,\n   * by either associating it with an @NgModule or other `InjectorType`,\n   * or by specifying that this injectable should be provided in the\n   * 'root' injector, which will be the application-level injector in most apps.\n   */\n  providedIn?: Type<any>|'root'|null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n    'Injectable', undefined, undefined, undefined,\n    (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));\n\n/**\n * Type representing injectable service.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> { ngInjectableDef: ÉµÉµInjectableDef<T>; }\n\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(\n    injectableType: Type<any>,\n    options?: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {\n  if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n    (injectableType as InjectableType<any>).ngInjectableDef = ÉµÉµdefineInjectable({\n      token: injectableType,\n      providedIn: options.providedIn,\n      factory: convertInjectableProviderToFactory(injectableType, options),\n    });\n  }\n}\n\nexport const SWITCH_COMPILE_INJECTABLE__POST_R3__ = render3CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE: typeof render3CompileInjectable =\n    SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const APP_ROOT = new InjectionToken<boolean>(\n    'The presence of this token marks an injector as being the root injector.');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors';\nimport {deepForEach} from '../util/array_utils';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, injectArgs, setCurrentInjector, ÉµÉµinject} from './injector_compatibility';\nimport {InjectorType, InjectorTypeWithProviders, getInheritedInjectableDef, getInjectableDef, getInjectorDef, ÉµÉµInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {APP_ROOT} from './scope';\n\n\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\ntype SingleProvider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider |\n    ExistingProvider | FactoryProvider | StaticClassProvider;\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\nconst EMPTY_ARRAY = [] as any[];\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nfunction getNullInjector(): Injector {\n  if (NULL_INJECTOR === undefined) {\n    NULL_INJECTOR = new NullInjector();\n  }\n  return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n  factory: (() => T)|undefined;\n  value: T|{};\n  multi: any[]|undefined;\n}\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nexport function createInjector(\n    defType: /* InjectorType<any> */ any, parent: Injector | null = null,\n    additionalProviders: StaticProvider[] | null = null, name?: string): Injector {\n  parent = parent || getNullInjector();\n  return new R3Injector(defType, additionalProviders, parent, name);\n}\n\nexport class R3Injector {\n  /**\n   * Map of tokens to records which contain the instances of those tokens.\n   */\n  private records = new Map<Type<any>|InjectionToken<any>, Record<any>>();\n\n  /**\n   * The transitive set of `InjectorType`s which define this injector.\n   */\n  private injectorDefTypes = new Set<InjectorType<any>>();\n\n  /**\n   * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n   */\n  private onDestroy = new Set<OnDestroy>();\n\n  /**\n   * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the\n   * root scope.\n   */\n  private readonly isRootInjector: boolean;\n\n  readonly source: string|null;\n\n  /**\n   * Flag indicating that this injector was previously destroyed.\n   */\n  get destroyed(): boolean { return this._destroyed; }\n  private _destroyed = false;\n\n  constructor(\n      def: InjectorType<any>, additionalProviders: StaticProvider[]|null, readonly parent: Injector,\n      source: string|null = null) {\n    // Start off by creating Records for every provider declared in every InjectorType\n    // included transitively in `def`.\n    const dedupStack: InjectorType<any>[] = [];\n    deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n\n    additionalProviders && deepForEach(\n                               additionalProviders, provider => this.processProvider(\n                                                        provider, def, additionalProviders));\n\n\n    // Make sure the INJECTOR token provides this injector.\n    this.records.set(INJECTOR, makeRecord(undefined, this));\n\n    // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n    // any injectable scoped to APP_ROOT_SCOPE.\n    this.isRootInjector = this.records.has(APP_ROOT);\n\n    // Eagerly instantiate the InjectorType classes themselves.\n    this.injectorDefTypes.forEach(defType => this.get(defType));\n\n    // Source name, used for debugging\n    this.source = source || (typeof def === 'object' ? null : stringify(def));\n  }\n\n  /**\n   * Destroy the injector and release references to every instance or provider associated with it.\n   *\n   * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n   * hook was found.\n   */\n  destroy(): void {\n    this.assertNotDestroyed();\n\n    // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n    this._destroyed = true;\n    try {\n      // Call all the lifecycle hooks.\n      this.onDestroy.forEach(service => service.ngOnDestroy());\n    } finally {\n      // Release all references.\n      this.records.clear();\n      this.onDestroy.clear();\n      this.injectorDefTypes.clear();\n    }\n  }\n\n  get<T>(\n      token: Type<T>|InjectionToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n      flags = InjectFlags.Default): T {\n    this.assertNotDestroyed();\n    // Set the injection context.\n    const previousInjector = setCurrentInjector(this);\n    try {\n      // Check for the SkipSelf flag.\n      if (!(flags & InjectFlags.SkipSelf)) {\n        // SkipSelf isn't set, check if the record belongs to this injector.\n        let record: Record<T>|undefined = this.records.get(token);\n        if (record === undefined) {\n          // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n          // with a scope matching this injector.\n          const def = couldBeInjectableType(token) && getInjectableDef(token);\n          if (def && this.injectableDefInScope(def)) {\n            // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n            // all along.\n            record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n            this.records.set(token, record);\n          }\n        }\n        // If a record was found, get the instance for it and return it.\n        if (record !== undefined) {\n          return this.hydrate(token, record);\n        }\n      }\n\n      // Select the next injector based on the Self flag - if self is set, the next injector is\n      // the NullInjector, otherwise it's the parent.\n      const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n      return nextInjector.get(token, flags & InjectFlags.Optional ? null : notFoundValue);\n    } catch (e) {\n      if (e.name === 'NullInjectorError') {\n        const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n        path.unshift(stringify(token));\n        if (previousInjector) {\n          // We still have a parent injector, keep throwing\n          throw e;\n        } else {\n          // Format & throw the final error message when we don't have any previous injector\n          return catchInjectorError(e, token, 'R3InjectorError', this.source);\n        }\n      } else {\n        throw e;\n      }\n    } finally {\n      // Lastly, clean up the state by restoring the previous injector.\n      setCurrentInjector(previousInjector);\n    }\n  }\n\n  toString() {\n    const tokens = <string[]>[], records = this.records;\n    records.forEach((v, token) => tokens.push(stringify(token)));\n    return `R3Injector[${tokens.join(', ')}]`;\n  }\n\n  private assertNotDestroyed(): void {\n    if (this._destroyed) {\n      throw new Error('Injector has already been destroyed.');\n    }\n  }\n\n  /**\n   * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n   * to this injector.\n   *\n   * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n   * the function will return \"true\" to indicate that the providers of the type definition need\n   * to be processed. This allows us to process providers of injector types after all imports of\n   * an injector definition are processed. (following View Engine semantics: see FW-1349)\n   */\n  private processInjectorType(\n      defOrWrappedDef: InjectorType<any>|InjectorTypeWithProviders<any>,\n      parents: InjectorType<any>[],\n      dedupStack: InjectorType<any>[]): defOrWrappedDef is InjectorTypeWithProviders<any> {\n    defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n    if (!defOrWrappedDef) return false;\n\n    // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n    // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n    // read, so care is taken to only do the read once.\n\n    // First attempt to read the ngInjectorDef.\n    let def = getInjectorDef(defOrWrappedDef);\n\n    // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n    const ngModule =\n        (def == null) && (defOrWrappedDef as InjectorTypeWithProviders<any>).ngModule || undefined;\n\n    // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n    // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n    // is the `ngModule`.\n    const defType: InjectorType<any> =\n        (ngModule === undefined) ? (defOrWrappedDef as InjectorType<any>) : ngModule;\n\n    // Check for circular dependencies.\n    if (ngDevMode && parents.indexOf(defType) !== -1) {\n      const defName = stringify(defType);\n      throw new Error(\n          `Circular dependency in DI detected for type ${defName}. Dependency path: ${parents.map(defType => stringify(defType)).join(' > ')} > ${defName}.`);\n    }\n\n    // Check for multiple imports of the same module\n    const isDuplicate = dedupStack.indexOf(defType) !== -1;\n\n    // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n    // `InjectorDef` is on its `ngModule`.\n    if (ngModule !== undefined) {\n      def = getInjectorDef(ngModule);\n    }\n\n    // If no definition was found, it might be from exports. Remove it.\n    if (def == null) {\n      return false;\n    }\n\n    // Track the InjectorType and add a provider for it.\n    this.injectorDefTypes.add(defType);\n    this.records.set(defType, makeRecord(def.factory, NOT_YET));\n\n    // Add providers in the same way that @NgModule resolution did:\n\n    // First, include providers from any imports.\n    if (def.imports != null && !isDuplicate) {\n      // Before processing defType's imports, add it to the set of parents. This way, if it ends\n      // up deeply importing itself, this can be detected.\n      ngDevMode && parents.push(defType);\n      // Add it to the set of dedups. This way we can detect multiple imports of the same module\n      dedupStack.push(defType);\n\n      let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n      try {\n        deepForEach(def.imports, imported => {\n          if (this.processInjectorType(imported, parents, dedupStack)) {\n            if (importTypesWithProviders === undefined) importTypesWithProviders = [];\n            // If the processed import is an injector type with providers, we store it in the\n            // list of import types with providers, so that we can process those afterwards.\n            importTypesWithProviders.push(imported);\n          }\n        });\n      } finally {\n        // Remove it from the parents set when finished.\n        ngDevMode && parents.pop();\n      }\n\n      // Imports which are declared with providers (TypeWithProviders) need to be processed\n      // after all imported modules are processed. This is similar to how View Engine\n      // processes/merges module imports in the metadata resolver. See: FW-1349.\n      if (importTypesWithProviders !== undefined) {\n        for (let i = 0; i < importTypesWithProviders.length; i++) {\n          const {ngModule, providers} = importTypesWithProviders[i];\n          deepForEach(\n              providers !,\n              provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n        }\n      }\n    }\n\n    // Next, include providers listed on the definition itself.\n    const defProviders = def.providers;\n    if (defProviders != null && !isDuplicate) {\n      const injectorType = defOrWrappedDef as InjectorType<any>;\n      deepForEach(\n          defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n    }\n\n    return (\n        ngModule !== undefined &&\n        (defOrWrappedDef as InjectorTypeWithProviders<any>).providers !== undefined);\n  }\n\n  /**\n   * Process a `SingleProvider` and add it.\n   */\n  private processProvider(\n      provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): void {\n    // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n    // property.\n    provider = resolveForwardRef(provider);\n    let token: any =\n        isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n    // Construct a `Record` for the provider.\n    const record = providerToRecord(provider, ngModuleType, providers);\n\n    if (!isTypeProvider(provider) && provider.multi === true) {\n      // If the provider indicates that it's a multi-provider, process it specially.\n      // First check whether it's been defined already.\n      let multiRecord = this.records.get(token);\n      if (multiRecord) {\n        // It has. Throw a nice error if\n        if (multiRecord.multi === undefined) {\n          throwMixedMultiProviderError();\n        }\n      } else {\n        multiRecord = makeRecord(undefined, NOT_YET, true);\n        multiRecord.factory = () => injectArgs(multiRecord !.multi !);\n        this.records.set(token, multiRecord);\n      }\n      token = provider;\n      multiRecord.multi !.push(provider);\n    } else {\n      const existing = this.records.get(token);\n      if (existing && existing.multi !== undefined) {\n        throwMixedMultiProviderError();\n      }\n    }\n    this.records.set(token, record);\n  }\n\n  private hydrate<T>(token: Type<T>|InjectionToken<T>, record: Record<T>): T {\n    if (record.value === CIRCULAR) {\n      throwCyclicDependencyError(stringify(token));\n    } else if (record.value === NOT_YET) {\n      record.value = CIRCULAR;\n      record.value = record.factory !();\n    }\n    if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n      this.onDestroy.add(record.value);\n    }\n    return record.value as T;\n  }\n\n  private injectableDefInScope(def: ÉµÉµInjectableDef<any>): boolean {\n    if (!def.providedIn) {\n      return false;\n    } else if (typeof def.providedIn === 'string') {\n      return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n    } else {\n      return this.injectorDefTypes.has(def.providedIn);\n    }\n  }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: Type<any>| InjectionToken<any>): () => any {\n  // Most tokens will have an ngInjectableDef directly on them, which specifies a factory directly.\n  const injectableDef = getInjectableDef(token);\n  if (injectableDef !== null) {\n    return injectableDef.factory;\n  }\n\n  // If the token is an NgModule, it's also injectable but the factory is on its ngInjectorDef.\n  const injectorDef = getInjectorDef(token);\n  if (injectorDef !== null) {\n    return injectorDef.factory;\n  }\n\n  // InjectionTokens should have an ngInjectableDef and thus should be handled above.\n  // If it's missing that, it's an error.\n  if (token instanceof InjectionToken) {\n    throw new Error(`Token ${stringify(token)} is missing an ngInjectableDef definition.`);\n  }\n\n  // Undecorated types can sometimes be created if they have no constructor arguments.\n  if (token instanceof Function) {\n    return getUndecoratedInjectableFactory(token);\n  }\n\n  // There was no way to resolve a factory for this token.\n  throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n  // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n  const paramLength = token.length;\n  if (paramLength > 0) {\n    const args: string[] = new Array(paramLength).fill('?');\n    throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n  }\n\n  // The constructor function appears to have no parameters.\n  // This might be because it inherits from a super-class. In which case, use an ngInjectableDef\n  // from an ancestor if there is one.\n  // Otherwise this really is a simple class with no dependencies, so return a factory that\n  // just instantiates the zero-arg constructor.\n  const inheritedInjectableDef = getInheritedInjectableDef(token);\n  if (inheritedInjectableDef !== null) {\n    return () => inheritedInjectableDef.factory(token as Type<any>);\n  } else {\n    return () => new (token as Type<any>)();\n  }\n}\n\nfunction providerToRecord(\n    provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): Record<any> {\n  let factory: (() => any)|undefined = providerToFactory(provider, ngModuleType, providers);\n  if (isValueProvider(provider)) {\n    return makeRecord(undefined, provider.useValue);\n  } else {\n    return makeRecord(factory, NOT_YET);\n  }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n    provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any {\n  let factory: (() => any)|undefined = undefined;\n  if (isTypeProvider(provider)) {\n    return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n  } else {\n    if (isValueProvider(provider)) {\n      factory = () => resolveForwardRef(provider.useValue);\n    } else if (isExistingProvider(provider)) {\n      factory = () => ÉµÉµinject(resolveForwardRef(provider.useExisting));\n    } else if (isFactoryProvider(provider)) {\n      factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n    } else {\n      const classRef = resolveForwardRef(\n          provider &&\n          ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n      if (!classRef) {\n        throwInvalidProviderError(ngModuleType, providers, provider);\n      }\n      if (hasDeps(provider)) {\n        factory = () => new (classRef)(...injectArgs(provider.deps));\n      } else {\n        return injectableDefOrInjectorDefFactory(classRef);\n      }\n    }\n  }\n  return factory;\n}\n\nfunction makeRecord<T>(\n    factory: (() => T) | undefined, value: T | {}, multi: boolean = false): Record<T> {\n  return {\n    factory: factory,\n    value: value,\n    multi: multi ? [] : undefined,\n  };\n}\n\nfunction isValueProvider(value: SingleProvider): value is ValueProvider {\n  return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value: SingleProvider): value is ExistingProvider {\n  return !!(value && (value as ExistingProvider).useExisting);\n}\n\nfunction isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n  return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n  return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n  return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n\nfunction hasDeps(value: ClassProvider | ConstructorProvider | StaticClassProvider):\n    value is ClassProvider&{deps: any[]} {\n  return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n  return value !== null && typeof value === 'object' &&\n      typeof(value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is Type<any>|InjectionToken<any> {\n  return (typeof value === 'function') ||\n      (typeof value === 'object' && value instanceof InjectionToken);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, formatError, ÉµÉµinject} from './injector_compatibility';\nimport {ÉµÉµdefineInjectable} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {createInjector} from './r3_injector';\n\nexport function INJECTOR_IMPL__PRE_R3__(\n    providers: StaticProvider[], parent: Injector | undefined, name: string) {\n  return new StaticInjector(providers, parent, name);\n}\n\nexport function INJECTOR_IMPL__POST_R3__(\n    providers: StaticProvider[], parent: Injector | undefined, name: string) {\n  return createInjector({name: name}, parent, providers, name);\n}\n\nexport const INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n\n/**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n  static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n  static NULL: Injector = new NullInjector();\n\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n  /**\n   * @deprecated from v4.0.0 use Type<T> or InjectionToken<T>\n   * @suppress {duplicate}\n   */\n  abstract get(token: any, notFoundValue?: any): any;\n\n  /**\n   * @deprecated from v5 use the new signature Injector.create(options)\n   */\n  static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n  static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n  /**\n   * Create a new Injector which is configure using `StaticProvider`s.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n   */\n  static create(\n      options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n      parent?: Injector): Injector {\n    if (Array.isArray(options)) {\n      return INJECTOR_IMPL(options, parent, '');\n    } else {\n      return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n    }\n  }\n\n  /** @nocollapse */\n  static ngInjectableDef = ÉµÉµdefineInjectable({\n    token: Injector,\n    providedIn: 'any' as any,\n    factory: () => ÉµÉµinject(INJECTOR),\n  });\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__ = -1;\n}\n\n\n\nconst IDENT = function<T>(value: T): T {\n  return value;\n};\nconst EMPTY = <any[]>[];\nconst CIRCULAR = IDENT;\nconst MULTI_PROVIDER_FN = function(): any[] {\n  return Array.prototype.slice.call(arguments);\n};\n\nconst enum OptionFlags {\n  Optional = 1 << 0,\n  CheckSelf = 1 << 1,\n  CheckParent = 1 << 2,\n  Default = CheckSelf | CheckParent\n}\nconst NO_NEW_LINE = 'Éµ';\n\nexport class StaticInjector implements Injector {\n  readonly parent: Injector;\n  readonly source: string|null;\n\n  private _records: Map<any, Record>;\n\n  constructor(\n      providers: StaticProvider[], parent: Injector = Injector.NULL, source: string|null = null) {\n    this.parent = parent;\n    this.source = source;\n    const records = this._records = new Map<any, Record>();\n    records.set(\n        Injector, <Record>{token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n    records.set(\n        INJECTOR, <Record>{token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n    recursivelyProcessProviders(records, providers);\n  }\n\n  get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n  get(token: any, notFoundValue?: any): any;\n  get(token: any, notFoundValue?: any, flags: InjectFlags = InjectFlags.Default): any {\n    const record = this._records.get(token);\n    try {\n      return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n    } catch (e) {\n      return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n    }\n  }\n\n  toString() {\n    const tokens = <string[]>[], records = this._records;\n    records.forEach((v, token) => tokens.push(stringify(token)));\n    return `StaticInjector[${tokens.join(', ')}]`;\n  }\n}\n\ntype SupportedProvider =\n    ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider;\n\ninterface Record {\n  fn: Function;\n  useNew: boolean;\n  deps: DependencyRecord[];\n  value: any;\n}\n\ninterface DependencyRecord {\n  token: any;\n  options: number;\n}\n\nfunction resolveProvider(provider: SupportedProvider): Record {\n  const deps = computeDeps(provider);\n  let fn: Function = IDENT;\n  let value: any = EMPTY;\n  let useNew: boolean = false;\n  let provide = resolveForwardRef(provider.provide);\n  if (USE_VALUE in provider) {\n    // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n    value = (provider as ValueProvider).useValue;\n  } else if ((provider as FactoryProvider).useFactory) {\n    fn = (provider as FactoryProvider).useFactory;\n  } else if ((provider as ExistingProvider).useExisting) {\n    // Just use IDENT\n  } else if ((provider as StaticClassProvider).useClass) {\n    useNew = true;\n    fn = resolveForwardRef((provider as StaticClassProvider).useClass);\n  } else if (typeof provide == 'function') {\n    useNew = true;\n    fn = provide;\n  } else {\n    throw staticError(\n        'StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable',\n        provider);\n  }\n  return {deps, fn, useNew, value};\n}\n\nfunction multiProviderMixError(token: any) {\n  return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records: Map<any, Record>, provider: StaticProvider) {\n  if (provider) {\n    provider = resolveForwardRef(provider);\n    if (provider instanceof Array) {\n      // if we have an array recurse into the array\n      for (let i = 0; i < provider.length; i++) {\n        recursivelyProcessProviders(records, provider[i]);\n      }\n    } else if (typeof provider === 'function') {\n      // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n      // error messages\n      throw staticError('Function/Class not supported', provider);\n    } else if (provider && typeof provider === 'object' && provider.provide) {\n      // At this point we have what looks like a provider: {provide: ?, ....}\n      let token = resolveForwardRef(provider.provide);\n      const resolvedProvider = resolveProvider(provider);\n      if (provider.multi === true) {\n        // This is a multi provider.\n        let multiProvider: Record|undefined = records.get(token);\n        if (multiProvider) {\n          if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n            throw multiProviderMixError(token);\n          }\n        } else {\n          // Create a placeholder factory which will look up the constituents of the multi provider.\n          records.set(token, multiProvider = <Record>{\n            token: provider.provide,\n            deps: [],\n            useNew: false,\n            fn: MULTI_PROVIDER_FN,\n            value: EMPTY\n          });\n        }\n        // Treat the provider as the token.\n        token = provider;\n        multiProvider.deps.push({token, options: OptionFlags.Default});\n      }\n      const record = records.get(token);\n      if (record && record.fn == MULTI_PROVIDER_FN) {\n        throw multiProviderMixError(token);\n      }\n      records.set(token, resolvedProvider);\n    } else {\n      throw staticError('Unexpected provider', provider);\n    }\n  }\n}\n\nfunction tryResolveToken(\n    token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n    notFoundValue: any, flags: InjectFlags): any {\n  try {\n    return resolveToken(token, record, records, parent, notFoundValue, flags);\n  } catch (e) {\n    // ensure that 'e' is of type Error.\n    if (!(e instanceof Error)) {\n      e = new Error(e);\n    }\n    const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n    path.unshift(token);\n    if (record && record.value == CIRCULAR) {\n      // Reset the Circular flag.\n      record.value = EMPTY;\n    }\n    throw e;\n  }\n}\n\nfunction resolveToken(\n    token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n    notFoundValue: any, flags: InjectFlags): any {\n  let value;\n  if (record && !(flags & InjectFlags.SkipSelf)) {\n    // If we don't have a record, this implies that we don't own the provider hence don't know how\n    // to resolve it.\n    value = record.value;\n    if (value == CIRCULAR) {\n      throw Error(NO_NEW_LINE + 'Circular dependency');\n    } else if (value === EMPTY) {\n      record.value = CIRCULAR;\n      let obj = undefined;\n      let useNew = record.useNew;\n      let fn = record.fn;\n      let depRecords = record.deps;\n      let deps = EMPTY;\n      if (depRecords.length) {\n        deps = [];\n        for (let i = 0; i < depRecords.length; i++) {\n          const depRecord: DependencyRecord = depRecords[i];\n          const options = depRecord.options;\n          const childRecord =\n              options & OptionFlags.CheckSelf ? records.get(depRecord.token) : undefined;\n          deps.push(tryResolveToken(\n              // Current Token to resolve\n              depRecord.token,\n              // A record which describes how to resolve the token.\n              // If undefined, this means we don't have such a record\n              childRecord,\n              // Other records we know about.\n              records,\n              // If we don't know how to resolve dependency and we should not check parent for it,\n              // than pass in Null injector.\n              !childRecord && !(options & OptionFlags.CheckParent) ? Injector.NULL : parent,\n              options & OptionFlags.Optional ? null : Injector.THROW_IF_NOT_FOUND,\n              InjectFlags.Default));\n        }\n      }\n      record.value = value = useNew ? new (fn as any)(...deps) : fn.apply(obj, deps);\n    }\n  } else if (!(flags & InjectFlags.Self)) {\n    value = parent.get(token, notFoundValue, InjectFlags.Default);\n  }\n  return value;\n}\n\nfunction computeDeps(provider: StaticProvider): DependencyRecord[] {\n  let deps: DependencyRecord[] = EMPTY;\n  const providerDeps: any[] =\n      (provider as ExistingProvider & StaticClassProvider & ConstructorProvider).deps;\n  if (providerDeps && providerDeps.length) {\n    deps = [];\n    for (let i = 0; i < providerDeps.length; i++) {\n      let options = OptionFlags.Default;\n      let token = resolveForwardRef(providerDeps[i]);\n      if (token instanceof Array) {\n        for (let j = 0, annotations = token; j < annotations.length; j++) {\n          const annotation = annotations[j];\n          if (annotation instanceof Optional || annotation == Optional) {\n            options = options | OptionFlags.Optional;\n          } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n            options = options & ~OptionFlags.CheckSelf;\n          } else if (annotation instanceof Self || annotation == Self) {\n            options = options & ~OptionFlags.CheckParent;\n          } else if (annotation instanceof Inject) {\n            token = (annotation as Inject).token;\n          } else {\n            token = resolveForwardRef(annotation);\n          }\n        }\n      }\n      deps.push({token, options});\n    }\n  } else if ((provider as ExistingProvider).useExisting) {\n    const token = resolveForwardRef((provider as ExistingProvider).useExisting);\n    deps = [{token, options: OptionFlags.Default}];\n  } else if (!providerDeps && !(USE_VALUE in provider)) {\n    // useValue & useExisting are the only ones which are exempt from deps all others need it.\n    throw staticError('\\'deps\\' required', provider);\n  }\n  return deps;\n}\n\nfunction staticError(text: string, obj: any): Error {\n  return new Error(formatError(text, obj, 'StaticInjectorError'));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ERROR_ORIGINAL_ERROR, wrappedError} from '../util/errors';\nimport {stringify} from '../util/stringify';\n\nimport {ReflectiveInjector} from './reflective_injector';\nimport {ReflectiveKey} from './reflective_key';\n\nfunction findFirstClosedCycle(keys: any[]): any[] {\n  const res: any[] = [];\n  for (let i = 0; i < keys.length; ++i) {\n    if (res.indexOf(keys[i]) > -1) {\n      res.push(keys[i]);\n      return res;\n    }\n    res.push(keys[i]);\n  }\n  return res;\n}\n\nfunction constructResolvingPath(keys: any[]): string {\n  if (keys.length > 1) {\n    const reversed = findFirstClosedCycle(keys.slice().reverse());\n    const tokenStrs = reversed.map(k => stringify(k.token));\n    return ' (' + tokenStrs.join(' -> ') + ')';\n  }\n\n  return '';\n}\n\nexport interface InjectionError extends Error {\n  keys: ReflectiveKey[];\n  injectors: ReflectiveInjector[];\n  constructResolvingMessage: (keys: ReflectiveKey[]) => string;\n  addKey(injector: ReflectiveInjector, key: ReflectiveKey): void;\n}\n\nfunction injectionError(\n    injector: ReflectiveInjector, key: ReflectiveKey,\n    constructResolvingMessage: (keys: ReflectiveKey[]) => string,\n    originalError?: Error): InjectionError {\n  const keys = [key];\n  const errMsg = constructResolvingMessage(keys);\n  const error =\n      (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError;\n  error.addKey = addKey;\n  error.keys = keys;\n  error.injectors = [injector];\n  error.constructResolvingMessage = constructResolvingMessage;\n  (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n  return error;\n}\n\nfunction addKey(this: InjectionError, injector: ReflectiveInjector, key: ReflectiveKey): void {\n  this.injectors.push(injector);\n  this.keys.push(key);\n  // Note: This updated message won't be reflected in the `.stack` property\n  this.message = this.constructResolvingMessage(this.keys);\n}\n\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nexport function noProviderError(injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n  return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n    const first = stringify(keys[0].token);\n    return `No provider for ${first}!${constructResolvingPath(keys)}`;\n  });\n}\n\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n *   {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n *   {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nexport function cyclicDependencyError(\n    injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n  return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n    return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n  });\n}\n\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor() {\n *     throw new Error('message');\n *   }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n *   injector.get(A);\n * } catch (e) {\n *   expect(e instanceof InstantiationError).toBe(true);\n *   expect(e.originalException.message).toEqual(\"message\");\n *   expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nexport function instantiationError(\n    injector: ReflectiveInjector, originalException: any, originalStack: any,\n    key: ReflectiveKey): InjectionError {\n  return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n    const first = stringify(keys[0].token);\n    return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n  }, originalException);\n}\n\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nexport function invalidProviderError(provider: any) {\n  return Error(\n      `Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nexport function noAnnotationError(typeOrFunc: Type<any>| Function, params: any[][]): Error {\n  const signature: string[] = [];\n  for (let i = 0, ii = params.length; i < ii; i++) {\n    const parameter = params[i];\n    if (!parameter || parameter.length == 0) {\n      signature.push('?');\n    } else {\n      signature.push(parameter.map(stringify).join(' '));\n    }\n  }\n  return Error(\n      'Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n      signature.join(', ') + '). ' +\n      'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n      stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nexport function outOfBoundsError(index: number) {\n  return Error(`Index ${index} is out-of-bounds.`);\n}\n\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n *   { provide: \"Strings\", useValue: \"string1\", multi: true},\n *   { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nexport function mixingMultiProvidersWithRegularProvidersError(\n    provider1: any, provider2: any): Error {\n  return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const ERROR_TYPE = 'ngType';\nexport const ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nexport const ERROR_LOGGER = 'ngErrorLogger';\n\n\nexport function wrappedError(message: string, originalError: any): Error {\n  const msg =\n      `${message} caused by: ${originalError instanceof Error ? originalError.message: originalError }`;\n  const error = Error(msg);\n  (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n  return error;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {stringify} from '../util/stringify';\nimport {resolveForwardRef} from './forward_ref';\n\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nexport class ReflectiveKey {\n  public readonly displayName: string;\n  /**\n   * Private\n   */\n  constructor(public token: Object, public id: number) {\n    if (!token) {\n      throw new Error('Token must be defined!');\n    }\n    this.displayName = stringify(this.token);\n  }\n\n  /**\n   * Retrieves a `Key` for a token.\n   */\n  static get(token: Object): ReflectiveKey {\n    return _globalKeyRegistry.get(resolveForwardRef(token));\n  }\n\n  /**\n   * @returns the number of keys registered in the system.\n   */\n  static get numberOfKeys(): number { return _globalKeyRegistry.numberOfKeys; }\n}\n\nexport class KeyRegistry {\n  private _allKeys = new Map<Object, ReflectiveKey>();\n\n  get(token: Object): ReflectiveKey {\n    if (token instanceof ReflectiveKey) return token;\n\n    if (this._allKeys.has(token)) {\n      return this._allKeys.get(token) !;\n    }\n\n    const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n    this._allKeys.set(token, newKey);\n    return newKey;\n  }\n\n  get numberOfKeys(): number { return this._allKeys.size; }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ReflectionCapabilities} from './reflection_capabilities';\nimport {Reflector} from './reflector';\n\nexport {Reflector} from './reflector';\n\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nexport const reflector = new Reflector(new ReflectionCapabilities());\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\nexport {PlatformReflectionCapabilities};\nexport {GetterFn, MethodFn, SetterFn};\n\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nexport class Reflector {\n  constructor(public reflectionCapabilities: PlatformReflectionCapabilities) {}\n\n  updateCapabilities(caps: PlatformReflectionCapabilities) { this.reflectionCapabilities = caps; }\n\n  factory(type: Type<any>): Function { return this.reflectionCapabilities.factory(type); }\n\n  parameters(typeOrFunc: Type<any>): any[][] {\n    return this.reflectionCapabilities.parameters(typeOrFunc);\n  }\n\n  annotations(typeOrFunc: Type<any>): any[] {\n    return this.reflectionCapabilities.annotations(typeOrFunc);\n  }\n\n  propMetadata(typeOrFunc: Type<any>): {[key: string]: any[]} {\n    return this.reflectionCapabilities.propMetadata(typeOrFunc);\n  }\n\n  hasLifecycleHook(type: any, lcProperty: string): boolean {\n    return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n  }\n\n  getter(name: string): GetterFn { return this.reflectionCapabilities.getter(name); }\n\n  setter(name: string): SetterFn { return this.reflectionCapabilities.setter(name); }\n\n  method(name: string): MethodFn { return this.reflectionCapabilities.method(name); }\n\n  importUri(type: any): string { return this.reflectionCapabilities.importUri(type); }\n\n  resourceUri(type: any): string { return this.reflectionCapabilities.resourceUri(type); }\n\n  resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n    return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n  }\n\n  resolveEnum(identifier: any, name: string): any {\n    return this.reflectionCapabilities.resolveEnum(identifier, name);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {reflector} from '../reflection/reflection';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {invalidProviderError, mixingMultiProvidersWithRegularProvidersError, noAnnotationError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\n\n\ninterface NormalizedProvider extends TypeProvider, ValueProvider, ClassProvider, ExistingProvider,\n    FactoryProvider {}\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nexport class ReflectiveDependency {\n  constructor(\n      public key: ReflectiveKey, public optional: boolean, public visibility: Self|SkipSelf|null) {}\n\n  static fromKey(key: ReflectiveKey): ReflectiveDependency {\n    return new ReflectiveDependency(key, false, null);\n  }\n}\n\nconst _EMPTY_LIST: any[] = [];\n\n/**\n * An internal resolved representation of a `Provider` used by the `Injector`.\n *\n * @usageNotes\n * This is usually created automatically by `Injector.resolveAndCreate`.\n *\n * It can be created manually, as follows:\n *\n * ### Example\n *\n * ```typescript\n * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);\n * var injector = Injector.fromResolvedProviders(resolvedProviders);\n *\n * expect(injector.get('message')).toEqual('Hello');\n * ```\n *\n * @publicApi\n */\nexport interface ResolvedReflectiveProvider {\n  /**\n   * A key, usually a `Type<any>`.\n   */\n  key: ReflectiveKey;\n\n  /**\n   * Factory function which can return an instance of an object represented by a key.\n   */\n  resolvedFactories: ResolvedReflectiveFactory[];\n\n  /**\n   * Indicates if the provider is a multi-provider or a regular provider.\n   */\n  multiProvider: boolean;\n}\n\nexport class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {\n  readonly resolvedFactory: ResolvedReflectiveFactory;\n\n  constructor(\n      public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],\n      public multiProvider: boolean) {\n    this.resolvedFactory = this.resolvedFactories[0];\n  }\n}\n\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nexport class ResolvedReflectiveFactory {\n  constructor(\n      /**\n       * Factory function which can return an instance of an object represented by a key.\n       */\n      public factory: Function,\n\n      /**\n       * Arguments (dependencies) to the `factory` function.\n       */\n      public dependencies: ReflectiveDependency[]) {}\n}\n\n\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider: NormalizedProvider): ResolvedReflectiveFactory {\n  let factoryFn: Function;\n  let resolvedDeps: ReflectiveDependency[];\n  if (provider.useClass) {\n    const useClass = resolveForwardRef(provider.useClass);\n    factoryFn = reflector.factory(useClass);\n    resolvedDeps = _dependenciesFor(useClass);\n  } else if (provider.useExisting) {\n    factoryFn = (aliasInstance: any) => aliasInstance;\n    resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n  } else if (provider.useFactory) {\n    factoryFn = provider.useFactory;\n    resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n  } else {\n    factoryFn = () => provider.useValue;\n    resolvedDeps = _EMPTY_LIST;\n  }\n  return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider: NormalizedProvider): ResolvedReflectiveProvider {\n  return new ResolvedReflectiveProvider_(\n      ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)],\n      provider.multi || false);\n}\n\n/**\n * Resolve a list of Providers.\n */\nexport function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[] {\n  const normalized = _normalizeProviders(providers, []);\n  const resolved = normalized.map(resolveReflectiveProvider);\n  const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n  return Array.from(resolvedProviderMap.values());\n}\n\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nexport function mergeResolvedReflectiveProviders(\n    providers: ResolvedReflectiveProvider[],\n    normalizedProvidersMap: Map<number, ResolvedReflectiveProvider>):\n    Map<number, ResolvedReflectiveProvider> {\n  for (let i = 0; i < providers.length; i++) {\n    const provider = providers[i];\n    const existing = normalizedProvidersMap.get(provider.key.id);\n    if (existing) {\n      if (provider.multiProvider !== existing.multiProvider) {\n        throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n      }\n      if (provider.multiProvider) {\n        for (let j = 0; j < provider.resolvedFactories.length; j++) {\n          existing.resolvedFactories.push(provider.resolvedFactories[j]);\n        }\n      } else {\n        normalizedProvidersMap.set(provider.key.id, provider);\n      }\n    } else {\n      let resolvedProvider: ResolvedReflectiveProvider;\n      if (provider.multiProvider) {\n        resolvedProvider = new ResolvedReflectiveProvider_(\n            provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n      } else {\n        resolvedProvider = provider;\n      }\n      normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n    }\n  }\n  return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(\n    providers: Provider[], res: NormalizedProvider[]): NormalizedProvider[] {\n  providers.forEach(b => {\n    if (b instanceof Type) {\n      res.push({ provide: b, useClass: b } as NormalizedProvider);\n\n    } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n      res.push(b as NormalizedProvider);\n\n    } else if (b instanceof Array) {\n      _normalizeProviders(b, res);\n\n    } else {\n      throw invalidProviderError(b);\n    }\n  });\n\n  return res;\n}\n\nexport function constructDependencies(\n    typeOrFunc: any, dependencies?: any[]): ReflectiveDependency[] {\n  if (!dependencies) {\n    return _dependenciesFor(typeOrFunc);\n  } else {\n    const params: any[][] = dependencies.map(t => [t]);\n    return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n  }\n}\n\nfunction _dependenciesFor(typeOrFunc: any): ReflectiveDependency[] {\n  const params = reflector.parameters(typeOrFunc);\n\n  if (!params) return [];\n  if (params.some(p => p == null)) {\n    throw noAnnotationError(typeOrFunc, params);\n  }\n  return params.map(p => _extractToken(typeOrFunc, p, params));\n}\n\nfunction _extractToken(\n    typeOrFunc: any, metadata: any[] | any, params: any[][]): ReflectiveDependency {\n  let token: any = null;\n  let optional = false;\n\n  if (!Array.isArray(metadata)) {\n    if (metadata instanceof Inject) {\n      return _createDependency(metadata.token, optional, null);\n    } else {\n      return _createDependency(metadata, optional, null);\n    }\n  }\n\n  let visibility: Self|SkipSelf|null = null;\n\n  for (let i = 0; i < metadata.length; ++i) {\n    const paramMetadata = metadata[i];\n\n    if (paramMetadata instanceof Type) {\n      token = paramMetadata;\n\n    } else if (paramMetadata instanceof Inject) {\n      token = paramMetadata.token;\n\n    } else if (paramMetadata instanceof Optional) {\n      optional = true;\n\n    } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n      visibility = paramMetadata;\n    } else if (paramMetadata instanceof InjectionToken) {\n      token = paramMetadata;\n    }\n  }\n\n  token = resolveForwardRef(token);\n\n  if (token != null) {\n    return _createDependency(token, optional, visibility);\n  } else {\n    throw noAnnotationError(typeOrFunc, params);\n  }\n}\n\nfunction _createDependency(\n    token: any, optional: boolean, visibility: Self | SkipSelf | null): ReflectiveDependency {\n  return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\nimport {Provider} from './interface/provider';\nimport {Self, SkipSelf} from './metadata';\nimport {cyclicDependencyError, instantiationError, noProviderError, outOfBoundsError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\nimport {ReflectiveDependency, ResolvedReflectiveFactory, ResolvedReflectiveProvider, resolveReflectiveProviders} from './reflective_provider';\n\n\n// Threshold for the dynamic version\nconst UNDEFINED = new Object();\n\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n *   constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nexport abstract class ReflectiveInjector implements Injector {\n  /**\n   * Turns an array of provider definitions into an array of resolved providers.\n   *\n   * A resolution is a process of flattening multiple nested arrays and converting individual\n   * providers into an array of `ResolvedReflectiveProvider`s.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n   *\n   * expect(providers.length).toEqual(2);\n   *\n   * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n   * expect(providers[0].key.displayName).toBe(\"Car\");\n   * expect(providers[0].dependencies.length).toEqual(1);\n   * expect(providers[0].factory).toBeDefined();\n   *\n   * expect(providers[1].key.displayName).toBe(\"Engine\");\n   * });\n   * ```\n   *\n   */\n  static resolve(providers: Provider[]): ResolvedReflectiveProvider[] {\n    return resolveReflectiveProviders(providers);\n  }\n\n  /**\n   * Resolves an array of providers and creates an injector from those providers.\n   *\n   * The passed-in providers can be an array of `Type`, `Provider`,\n   * or a recursive array of more providers.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n   * expect(injector.get(Car) instanceof Car).toBe(true);\n   * ```\n   */\n  static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector {\n    const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n    return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n  }\n\n  /**\n   * Creates an injector from previously resolved providers.\n   *\n   * This API is the recommended way to construct injectors in performance-sensitive parts.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var providers = ReflectiveInjector.resolve([Car, Engine]);\n   * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n   * expect(injector.get(Car) instanceof Car).toBe(true);\n   * ```\n   */\n  static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):\n      ReflectiveInjector {\n    return new ReflectiveInjector_(providers, parent);\n  }\n\n\n  /**\n   * Parent of this injector.\n   *\n   * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n   * -->\n   */\n  abstract get parent(): Injector|null;\n\n  /**\n   * Resolves an array of providers and creates a child injector from those providers.\n   *\n   * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n   * -->\n   *\n   * The passed-in providers can be an array of `Type`, `Provider`,\n   * or a recursive array of more providers.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * class ParentProvider {}\n   * class ChildProvider {}\n   *\n   * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);\n   * var child = parent.resolveAndCreateChild([ChildProvider]);\n   *\n   * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n   * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n   * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n   * ```\n   */\n  abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;\n\n  /**\n   * Creates a child injector from previously resolved providers.\n   *\n   * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n   * -->\n   *\n   * This API is the recommended way to construct injectors in performance-sensitive parts.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * class ParentProvider {}\n   * class ChildProvider {}\n   *\n   * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);\n   * var childProviders = ReflectiveInjector.resolve([ChildProvider]);\n   *\n   * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);\n   * var child = parent.createChildFromResolved(childProviders);\n   *\n   * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n   * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n   * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n   * ```\n   */\n  abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;\n\n  /**\n   * Resolves a provider and instantiates an object in the context of the injector.\n   *\n   * The created object does not get cached by the injector.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n   *\n   * var car = injector.resolveAndInstantiate(Car);\n   * expect(car.engine).toBe(injector.get(Engine));\n   * expect(car).not.toBe(injector.resolveAndInstantiate(Car));\n   * ```\n   */\n  abstract resolveAndInstantiate(provider: Provider): any;\n\n  /**\n   * Instantiates an object using a resolved provider in the context of the injector.\n   *\n   * The created object does not get cached by the injector.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * ```typescript\n   * @Injectable()\n   * class Engine {\n   * }\n   *\n   * @Injectable()\n   * class Car {\n   *   constructor(public engine:Engine) {}\n   * }\n   *\n   * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n   * var carProvider = ReflectiveInjector.resolve([Car])[0];\n   * var car = injector.instantiateResolved(carProvider);\n   * expect(car.engine).toBe(injector.get(Engine));\n   * expect(car).not.toBe(injector.instantiateResolved(carProvider));\n   * ```\n   */\n  abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;\n\n  abstract get(token: any, notFoundValue?: any): any;\n}\n\nexport class ReflectiveInjector_ implements ReflectiveInjector {\n  private static INJECTOR_KEY = ReflectiveKey.get(Injector);\n  /** @internal */\n  _constructionCounter: number = 0;\n  /** @internal */\n  public _providers: ResolvedReflectiveProvider[];\n  public readonly parent: Injector|null;\n\n  keyIds: number[];\n  objs: any[];\n  /**\n   * Private\n   */\n  constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector) {\n    this._providers = _providers;\n    this.parent = _parent || null;\n\n    const len = _providers.length;\n\n    this.keyIds = new Array(len);\n    this.objs = new Array(len);\n\n    for (let i = 0; i < len; i++) {\n      this.keyIds[i] = _providers[i].key.id;\n      this.objs[i] = UNDEFINED;\n    }\n  }\n\n  get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n    return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n  }\n\n  resolveAndCreateChild(providers: Provider[]): ReflectiveInjector {\n    const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n    return this.createChildFromResolved(ResolvedReflectiveProviders);\n  }\n\n  createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {\n    const inj = new ReflectiveInjector_(providers);\n    (inj as{parent: Injector | null}).parent = this;\n    return inj;\n  }\n\n  resolveAndInstantiate(provider: Provider): any {\n    return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n  }\n\n  instantiateResolved(provider: ResolvedReflectiveProvider): any {\n    return this._instantiateProvider(provider);\n  }\n\n  getProviderAtIndex(index: number): ResolvedReflectiveProvider {\n    if (index < 0 || index >= this._providers.length) {\n      throw outOfBoundsError(index);\n    }\n    return this._providers[index];\n  }\n\n  /** @internal */\n  _new(provider: ResolvedReflectiveProvider): any {\n    if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n      throw cyclicDependencyError(this, provider.key);\n    }\n    return this._instantiateProvider(provider);\n  }\n\n  private _getMaxNumberOfObjects(): number { return this.objs.length; }\n\n  private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n    if (provider.multiProvider) {\n      const res = new Array(provider.resolvedFactories.length);\n      for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n        res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n      }\n      return res;\n    } else {\n      return this._instantiate(provider, provider.resolvedFactories[0]);\n    }\n  }\n\n  private _instantiate(\n      provider: ResolvedReflectiveProvider,\n      ResolvedReflectiveFactory: ResolvedReflectiveFactory): any {\n    const factory = ResolvedReflectiveFactory.factory;\n\n    let deps: any[];\n    try {\n      deps =\n          ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n    } catch (e) {\n      if (e.addKey) {\n        e.addKey(this, provider.key);\n      }\n      throw e;\n    }\n\n    let obj: any;\n    try {\n      obj = factory(...deps);\n    } catch (e) {\n      throw instantiationError(this, e, e.stack, provider.key);\n    }\n\n    return obj;\n  }\n\n  private _getByReflectiveDependency(dep: ReflectiveDependency): any {\n    return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n  }\n\n  private _getByKey(key: ReflectiveKey, visibility: Self|SkipSelf|null, notFoundValue: any): any {\n    if (key === ReflectiveInjector_.INJECTOR_KEY) {\n      return this;\n    }\n\n    if (visibility instanceof Self) {\n      return this._getByKeySelf(key, notFoundValue);\n\n    } else {\n      return this._getByKeyDefault(key, notFoundValue, visibility);\n    }\n  }\n\n  private _getObjByKeyId(keyId: number): any {\n    for (let i = 0; i < this.keyIds.length; i++) {\n      if (this.keyIds[i] === keyId) {\n        if (this.objs[i] === UNDEFINED) {\n          this.objs[i] = this._new(this._providers[i]);\n        }\n\n        return this.objs[i];\n      }\n    }\n\n    return UNDEFINED;\n  }\n\n  /** @internal */\n  _throwOrNull(key: ReflectiveKey, notFoundValue: any): any {\n    if (notFoundValue !== THROW_IF_NOT_FOUND) {\n      return notFoundValue;\n    } else {\n      throw noProviderError(this, key);\n    }\n  }\n\n  /** @internal */\n  _getByKeySelf(key: ReflectiveKey, notFoundValue: any): any {\n    const obj = this._getObjByKeyId(key.id);\n    return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n  }\n\n  /** @internal */\n  _getByKeyDefault(key: ReflectiveKey, notFoundValue: any, visibility: Self|SkipSelf|null): any {\n    let inj: Injector|null;\n\n    if (visibility instanceof SkipSelf) {\n      inj = this.parent;\n    } else {\n      inj = this;\n    }\n\n    while (inj instanceof ReflectiveInjector_) {\n      const inj_ = <ReflectiveInjector_>inj;\n      const obj = inj_._getObjByKeyId(key.id);\n      if (obj !== UNDEFINED) return obj;\n      inj = inj_.parent;\n    }\n    if (inj !== null) {\n      return inj.get(key.token, notFoundValue);\n    } else {\n      return this._throwOrNull(key, notFoundValue);\n    }\n  }\n\n  get displayName(): string {\n    const providers =\n        _mapProviders(this, (b: ResolvedReflectiveProvider) => ' \"' + b.key.displayName + '\" ')\n            .join(', ');\n    return `ReflectiveInjector(providers: [${providers}])`;\n  }\n\n  toString(): string { return this.displayName; }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n  const res: any[] = new Array(injector._providers.length);\n  for (let i = 0; i < injector._providers.length; ++i) {\n    res[i] = fn(injector.getProviderAtIndex(i));\n  }\n  return res;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {Type} from '../interface/type';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n *   return [\n *     {provide: ROUTES, useValue: routes},\n *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n *   ];\n * }\n *\n * // user code\n * let routes = [\n *   {path: '/root', component: RootComp},\n *   {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n *   providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n */\nexport const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n  /**\n   * Specifies that a constant attribute value should be injected.\n   *\n   * The directive can inject constant string literals of host element attributes.\n   *\n   * @usageNotes\n   *\n   * Suppose we have an `<input>` element and want to know its `type`.\n   *\n   * ```html\n   * <input type=\"text\">\n   * ```\n   *\n   * A decorator can inject string literal `text` as in the following example.\n   *\n   * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n   *\n   * @publicApi\n   */\n  (name: string): any;\n  new (name: string): Attribute;\n}\n\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n  /**\n   * The name of the attribute to be injected into the constructor.\n   */\n  attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n  descendants: boolean;\n  first: boolean;\n  read: any;\n  isViewQuery: boolean;\n  selector: any;\n  static: boolean;\n}\n\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see `ContentChildren`.\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n  /**\n   * Parameter decorator that configures a content query.\n   *\n   * Use to get the `QueryList` of elements or directives from the content DOM.\n   * Any time a child element is added, removed, or moved, the query list will be\n   * updated, and the changes observable of the query list will emit a new value.\n   *\n   * Content queries are set before the `ngAfterContentInit` callback is called.\n   *\n   * Does not retrieve elements or directives that are in other components' templates,\n   * since a component's template is always a black box to its ancestors.\n   *\n   * **Metadata Properties**:\n   *\n   * * **selector** - The directive type or the name used for querying.\n   * * **descendants** - True to include all descendants, otherwise include only direct children.\n   * * **read** - True to read a different token from the queried elements.\n   *\n   * @usageNotes\n   *\n   * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n   *\n   * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}\n   *\n   * ### Tab-pane example\n   *\n   * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n   * can be used to implement a tab pane component.\n   *\n   * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}\n   *\n   * @Annotation\n   */\n  (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): any;\n  new (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n    'ContentChildren',\n    (selector?: any, data: any = {}) =>\n        ({selector, first: false, isViewQuery: false, descendants: false, ...data}),\n    Query);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n  /**\n   * Parameter decorator that configures a content query.\n   *\n   * Use to get the first element or the directive matching the selector from the content DOM.\n   * If the content DOM changes, and a new child matches the selector,\n   * the property will be updated.\n   *\n   * Content queries are set before the `ngAfterContentInit` callback is called.\n   *\n   * Does not retrieve elements or directives that are in other components' templates,\n   * since a component's template is always a black box to its ancestors.\n   *\n   * **Metadata Properties**:\n   *\n   * * **selector** - The directive type or the name used for querying.\n   * * **read** - True to read a different token from the queried element.\n   * * **static** - True to resolve query results before change detection runs,\n   * false to resolve after change detection.\n   *\n   * When `static` is not provided, uses the query results to determine the timing of query\n   * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n   * resolved after change detection runs. Otherwise, it is resolved before change detection\n   * runs.\n   *\n   * @usageNotes\n   *\n   * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}\n   *\n   * ### Example\n   *\n   * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}\n   *\n   * @Annotation\n   */\n  (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n  new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n    'ContentChild', (selector?: any, data: any = {}) =>\n                        ({selector, first: true, isViewQuery: false, descendants: true, ...data}),\n    Query);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see `ViewChildren`.\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n  /**\n   * Parameter decorator that configures a view query.\n   *\n   * Use to get the `QueryList` of elements or directives from the view DOM.\n   * Any time a child element is added, removed, or moved, the query list will be updated,\n   * and the changes observable of the query list will emit a new value.\n   *\n   * View queries are set before the `ngAfterViewInit` callback is called.\n   *\n   * **Metadata Properties**:\n   *\n   * * **selector** - The directive type or the name used for querying.\n   * * **read** - True to read a different token from the queried elements.\n   *\n   * @usageNotes\n   *\n   * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}\n   *\n   * ### Another example\n   *\n   * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}\n   *\n   * @Annotation\n   */\n  (selector: Type<any>|Function|string, opts?: {read?: any}): any;\n  new (selector: Type<any>|Function|string, opts?: {read?: any}): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n    'ViewChildren', (selector?: any, data: any = {}) =>\n                        ({selector, first: false, isViewQuery: true, descendants: true, ...data}),\n    Query);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see `ViewChild`.\n * @publicApi\n */\nexport interface ViewChildDecorator {\n  /**\n   * @description\n   * Property decorator that configures a view query.\n   * The change detector looks for the first element or the directive matching the selector\n   * in the view DOM. If the view DOM changes, and a new child matches the selector,\n   * the property is updated.\n   *\n   * View queries are set before the `ngAfterViewInit` callback is called.\n   *\n   * **Metadata Properties**:\n   *\n   * * **selector** - The directive type or the name used for querying.\n   * * **read** - True to read a different token from the queried elements.\n   * * **static** - True to resolve query results before change detection runs\n   *\n   * When `static` is not provided, uses query results to determine the timing of query\n   * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n   * resolved after change detection runs. Otherwise, it is resolved before change detection\n   * runs.\n   *\n   * The following selectors are supported.\n   *   * Any class with the `@Component` or `@Directive` decorator\n   *   * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n   * with `@ViewChild('cmp')`)\n   *   * Any provider defined in the child component tree of the current component (e.g.\n   * `@ViewChild(SomeService) someService: SomeService`)\n   *   * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n   * any`)\n   *   * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n   * template;`)\n   *\n   * @usageNotes\n   *\n   * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}\n   *\n   * ### Example 2\n   *\n   * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}\n   *\n   * @Annotation\n   */\n  (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n  new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n    'ViewChild', (selector: any, data: any) =>\n                     ({selector, first: true, isViewQuery: true, descendants: true, ...data}),\n    Query);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n *   selector: 'my-comp',\n *   templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n *   // After resolution all URLs have been converted into `template` strings.\n *   renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n    resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n  // Store all promises which are fetching the resources.\n  const componentResolved: Promise<void>[] = [];\n\n  // Cache so that we don't fetch the same resource more than once.\n  const urlMap = new Map<string, Promise<string>>();\n  function cachedResourceResolve(url: string): Promise<string> {\n    let promise = urlMap.get(url);\n    if (!promise) {\n      const resp = resourceResolver(url);\n      urlMap.set(url, promise = resp.then(unwrapResponse));\n    }\n    return promise;\n  }\n\n  componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n    const promises: Promise<void>[] = [];\n    if (component.templateUrl) {\n      promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n        component.template = template;\n      }));\n    }\n    const styleUrls = component.styleUrls;\n    const styles = component.styles || (component.styles = []);\n    const styleOffset = component.styles.length;\n    styleUrls && styleUrls.forEach((styleUrl, index) => {\n      styles.push('');  // pre-allocate array.\n      promises.push(cachedResourceResolve(styleUrl).then((style) => {\n        styles[styleOffset + index] = style;\n        styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n        if (styleUrls.length == 0) {\n          component.styleUrls = undefined;\n        }\n      }));\n    });\n    const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n    componentResolved.push(fullyResolved);\n  });\n  clearResolutionOfComponentResourcesQueue();\n  return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ngComponentDef for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n  if (componentNeedsResolution(metadata)) {\n    componentResourceResolutionQueue.set(type, metadata);\n    componentDefPendingResolution.add(type);\n  }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n  return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n  return !!(\n      (component.templateUrl && !component.hasOwnProperty('template')) ||\n      component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n  const old = componentResourceResolutionQueue;\n  componentResourceResolutionQueue = new Map();\n  return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n  componentDefPendingResolution.clear();\n  queue.forEach((_, type) => componentDefPendingResolution.add(type));\n  componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n  return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string | {text(): Promise<string>}): string|Promise<string> {\n  return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n  componentDefPendingResolution.delete(type);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {LView, TVIEW, TView} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Allocates the necessary amount of slots for host vars.\n *\n * @param count Amount of vars to be allocated\n *\n * @codeGenApi\n */\nexport function ÉµÉµallocHostVars(count: number): void {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  if (!tView.firstTemplatePass) return;\n  queueHostBindingForCheck(tView, getCurrentDirectiveDef() !, count);\n  prefillHostVars(tView, lView, count);\n}\n\n/**\n * Stores host binding fn and number of host vars so it will be queued for binding refresh during\n * CD.\n */\nfunction queueHostBindingForCheck(\n    tView: TView, def: DirectiveDef<any>| ComponentDef<any>, hostVars: number): void {\n  ngDevMode &&\n      assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n  const expando = tView.expandoInstructions !;\n  const length = expando.length;\n  // Check whether a given `hostBindings` function already exists in expandoInstructions,\n  // which can happen in case directive definition was extended from base definition (as a part of\n  // the `InheritDefinitionFeature` logic). If we found the same `hostBindings` function in the\n  // list, we just increase the number of host vars associated with that function, but do not add it\n  // into the list again.\n  if (length >= 2 && expando[length - 2] === def.hostBindings) {\n    expando[length - 1] = (expando[length - 1] as number) + hostVars;\n  } else {\n    expando.push(def.hostBindings !, hostVars);\n  }\n}\n\n/**\n * On the first template pass, we need to reserve space for host binding values\n * after directives are matched (so all directives are saved, then bindings).\n * Because we are updating the blueprint, we only need to do this once.\n */\nfunction prefillHostVars(tView: TView, lView: LView, totalHostVars: number): void {\n  ngDevMode &&\n      assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n  for (let i = 0; i < totalHostVars; i++) {\n    lView.push(NO_CHANGE);\n    tView.blueprint.push(NO_CHANGE);\n    tView.data.push(null);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global as _global} from './global';\n\n// When Symbol.iterator doesn't exist, retrieves the key used in es6-shim\ndeclare const Symbol: any;\nlet _symbolIterator: any = null;\nexport function getSymbolIterator(): string|symbol {\n  if (!_symbolIterator) {\n    const Symbol = _global['Symbol'];\n    if (Symbol && Symbol.iterator) {\n      _symbolIterator = Symbol.iterator;\n    } else {\n      // es6-shim specific logic\n      const keys = Object.getOwnPropertyNames(Map.prototype);\n      for (let i = 0; i < keys.length; ++i) {\n        const key = keys[i];\n        if (key !== 'entries' && key !== 'size' &&\n            (Map as any).prototype[key] === Map.prototype['entries']) {\n          _symbolIterator = key;\n        }\n      }\n    }\n  }\n  return _symbolIterator;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {areIterablesEqual, isListLikeIterable} from './iterable';\n\n\n// JS has NaN !== NaN\nexport function looseIdentical(a: any, b: any): boolean {\n  return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\n\nexport function devModeEqual(a: any, b: any): boolean {\n  const isListLikeIterableA = isListLikeIterable(a);\n  const isListLikeIterableB = isListLikeIterable(b);\n  if (isListLikeIterableA && isListLikeIterableB) {\n    return areIterablesEqual(a, b, devModeEqual);\n  } else {\n    const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n    const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n    if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n      return true;\n    } else {\n      return looseIdentical(a, b);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../util/comparison';\nimport {getSymbolIterator} from '../util/symbol';\n\nexport function devModeEqual(a: any, b: any): boolean {\n  const isListLikeIterableA = isListLikeIterable(a);\n  const isListLikeIterableB = isListLikeIterable(b);\n  if (isListLikeIterableA && isListLikeIterableB) {\n    return areIterablesEqual(a, b, devModeEqual);\n  } else {\n    const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n    const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n    if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n      return true;\n    } else {\n      return looseIdentical(a, b);\n    }\n  }\n}\n\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n *    return this._latestReturnedValue;\n *  } else {\n *    this._latestReturnedValue = this._latestValue;\n *    return WrappedValue.wrap(this._latestValue); // this will force update\n *  }\n * ```\n *\n * @publicApi\n */\nexport class WrappedValue {\n  /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */\n  wrapped: any;\n\n  constructor(value: any) { this.wrapped = value; }\n\n  /** Creates a wrapped value. */\n  static wrap(value: any): WrappedValue { return new WrappedValue(value); }\n\n  /**\n   * Returns the underlying value of a wrapped value.\n   * Returns the given `value` when it is not wrapped.\n   **/\n  static unwrap(value: any): any { return WrappedValue.isWrapped(value) ? value.wrapped : value; }\n\n  /** Returns true if `value` is a wrapped value. */\n  static isWrapped(value: any): value is WrappedValue { return value instanceof WrappedValue; }\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n  if (!isJsObject(obj)) return false;\n  return Array.isArray(obj) ||\n      (!(obj instanceof Map) &&      // JS Map are iterables but return entries as [k, v]\n       getSymbolIterator() in obj);  // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n    a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n  const iterator1 = a[getSymbolIterator()]();\n  const iterator2 = b[getSymbolIterator()]();\n\n  while (true) {\n    const item1 = iterator1.next();\n    const item2 = iterator2.next();\n    if (item1.done && item2.done) return true;\n    if (item1.done || item2.done) return false;\n    if (!comparator(item1.value, item2.value)) return false;\n  }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n  if (Array.isArray(obj)) {\n    for (let i = 0; i < obj.length; i++) {\n      fn(obj[i]);\n    }\n  } else {\n    const iterator = obj[getSymbolIterator()]();\n    let item: any;\n    while (!((item = iterator.next()).done)) {\n      fn(item.value);\n    }\n  }\n}\n\nexport function isJsObject(o: any): boolean {\n  return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {devModeEqual} from '../change_detection/change_detection_util';\nimport {assertDataInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {getCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {isDifferent} from './util/misc_utils';\n\n\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n  return lView[bindingIndex] = value;\n}\n\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n  ngDevMode && assertDataInRange(lView, bindingIndex);\n  ngDevMode &&\n      assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n  return lView[bindingIndex];\n}\n\n/** Updates binding if changed, then returns whether it was updated. */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n  ngDevMode &&\n      assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n\n  const oldValue = lView[bindingIndex];\n  if (isDifferent(oldValue, value)) {\n    if (ngDevMode && getCheckNoChangesMode()) {\n      // View engine didn't report undefined values as changed on the first checkNoChanges pass\n      // (before the change detection was run).\n      const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n      if (!devModeEqual(oldValueToCompare, value)) {\n        throwErrorIfNoChangesMode(oldValue === NO_CHANGE, oldValueToCompare, value);\n      }\n    }\n    lView[bindingIndex] = value;\n    return true;\n  }\n\n  return false;\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n  const different = bindingUpdated(lView, bindingIndex, exp1);\n  return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n    lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean {\n  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n  return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n    lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean {\n  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n  return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertNotEqual} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {BINDING_INDEX, LView} from '../interfaces/view';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {TsickleIssue1009, elementPropertyInternal, storeBindingMetadata} from './shared';\n\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ÉµÉµproperty<T>(\n    propName: string, value: T, sanitizer?: SanitizerFn | null): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');\n  const lView = getLView();\n  const bindReconciledValue = bind(lView, value);\n  if (bindReconciledValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, bindReconciledValue, sanitizer);\n  }\n  return ÉµÉµproperty;\n}\n\n/**\n * Creates a single value binding.\n *\n * @param lView Current view\n * @param value Value to diff\n */\nexport function bind<T>(lView: LView, value: T): T|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX]++;\n  storeBindingMetadata(lView);\n  return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {bind} from './property';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n *                  Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ÉµÉµattribute(\n    name: string, value: any, sanitizer?: SanitizerFn | null,\n    namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const bound = bind(lView, value);\n  if (bound !== NO_CHANGE) {\n    elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattribute;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {BINDING_INDEX, LView, TVIEW} from '../interfaces/view';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {storeBindingMetadata} from './shared';\n\n\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nexport function interpolationV(lView: LView, values: any[]): string|NO_CHANGE {\n  ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n  ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n  let isBindingUpdated = false;\n  const tData = lView[TVIEW].data;\n  let bindingIndex = lView[BINDING_INDEX];\n\n  if (tData[bindingIndex] == null) {\n    // 2 is the index of the first static interstitial value (ie. not prefix)\n    for (let i = 2; i < values.length; i += 2) {\n      tData[bindingIndex++] = values[i];\n    }\n    bindingIndex = lView[BINDING_INDEX];\n  }\n\n  for (let i = 1; i < values.length; i += 2) {\n    // Check if bindings (odd indexes) have changed\n    isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n  }\n  lView[BINDING_INDEX] = bindingIndex;\n  storeBindingMetadata(lView, values[0], values[values.length - 1]);\n\n  if (!isBindingUpdated) {\n    return NO_CHANGE;\n  }\n\n  // Build the updated content\n  let content = values[0];\n  for (let i = 1; i < values.length; i += 2) {\n    content += renderStringify(values[i]) + values[i + 1];\n  }\n\n  return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nexport function interpolation1(lView: LView, prefix: string, v0: any, suffix: string): string|\n    NO_CHANGE {\n  const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);\n  storeBindingMetadata(lView, prefix, suffix);\n  return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n  lView[BINDING_INDEX] += 2;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    lView[TVIEW].data[bindingIndex] = i0;\n  }\n\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nexport function interpolation3(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n    suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n  lView[BINDING_INDEX] += 3;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n      NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n */\nexport function interpolation4(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  lView[BINDING_INDEX] += 4;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n    tData[bindingIndex + 2] = i2;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n          renderStringify(v3) + suffix :\n      NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n  lView[BINDING_INDEX] += 5;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n    tData[bindingIndex + 2] = i2;\n    tData[bindingIndex + 3] = i3;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n          renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n      NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n  lView[BINDING_INDEX] += 6;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n    tData[bindingIndex + 2] = i2;\n    tData[bindingIndex + 3] = i3;\n    tData[bindingIndex + 4] = i4;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n          renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n      NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nexport function interpolation7(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|\n    NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n  lView[BINDING_INDEX] += 7;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n    tData[bindingIndex + 2] = i2;\n    tData[bindingIndex + 3] = i3;\n    tData[bindingIndex + 4] = i4;\n    tData[bindingIndex + 5] = i5;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n          renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n          renderStringify(v6) + suffix :\n      NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n    lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string): string|NO_CHANGE {\n  const bindingIndex = lView[BINDING_INDEX];\n  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n  lView[BINDING_INDEX] += 8;\n\n  // Only set static strings the first time (data will be null subsequent runs).\n  const data = storeBindingMetadata(lView, prefix, suffix);\n  if (data) {\n    const tData = lView[TVIEW].data;\n    tData[bindingIndex] = i0;\n    tData[bindingIndex + 1] = i1;\n    tData[bindingIndex + 2] = i2;\n    tData[bindingIndex + 3] = i3;\n    tData[bindingIndex + 4] = i4;\n    tData[bindingIndex + 5] = i5;\n    tData[bindingIndex + 6] = i6;\n  }\n\n  return different ?\n      prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n          renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n          renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n      NO_CHANGE;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate1(\n    attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn,\n    namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate2(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n    sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate3(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n    suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate4(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate5(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn,\n    namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate6(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn,\n    namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate7(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n    sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolate8(\n    attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolatedValue = interpolation8(\n      lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµattributeInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµattributeInterpolateV(\n    attrName: string, values: any[], sanitizer?: SanitizerFn,\n    namespace?: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolationV(lView, values);\n  if (interpolated !== NO_CHANGE) {\n    elementAttributeInternal(index, attrName, interpolated, lView, sanitizer, namespace);\n  }\n  return ÉµÉµattributeInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {CONTEXT, RootContext, RootContextFlags} from '../interfaces/view';\nimport {getRootView} from '../util/view_traversal_utils';\nimport {detectChangesInternal, markViewDirty, scheduleTick, tickRootContext} from './shared';\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges<T>(component: T): void {\n  const view = getComponentViewByInstance(component);\n  detectChangesInternal<T>(view, component);\n}\n\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n *\n * @publicApi\n */\nexport function markDirty<T>(component: T) {\n  ngDevMode && assertDefined(component, 'component');\n  const rootView = markViewDirty(getComponentViewByInstance(component)) !;\n\n  ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n  scheduleTick(rootView[CONTEXT] as RootContext, RootContextFlags.DetectChanges);\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nexport function tick<T>(component: T): void {\n  const rootView = getRootView(component);\n  const rootContext = rootView[CONTEXT] as RootContext;\n  tickRootContext(rootContext);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {executePreOrderHooks, registerPostOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild, removeView} from '../node_manipulation';\nimport {getCheckNoChangesMode, getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {getNativeByTNode, loadInternal} from '../util/view_utils';\n\nimport {addToViewTree, createDirectivesAndLocals, createLContainer, createTView, getOrCreateTNode, resolveDirectives} from './shared';\n\n\n\n/**\n * Creates an LContainer for inline views, e.g.\n *\n * % if (showing) {\n *   <div></div>\n * % }\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ÉµÉµcontainer(index: number): void {\n  const lView = getLView();\n  const tNode = containerInternal(lView, index, null, null);\n\n  if (lView[TVIEW].firstTemplatePass) {\n    tNode.tViews = [];\n  }\n  setIsNotParent();\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n *    <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param consts The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n *        Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ÉµÉµtemplate(\n    index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n    tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,\n    localRefExtractor?: LocalRefExtractor) {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n\n  // TODO: consider a separate node type for templates\n  const tContainerNode = containerInternal(lView, index, tagName || null, attrs || null);\n  if (tView.firstTemplatePass) {\n    ngDevMode && ngDevMode.firstTemplatePass++;\n    resolveDirectives(tView, lView, tContainerNode, localRefs || null);\n\n    const embeddedTView = tContainerNode.tViews = createTView(\n        -1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n    if (tView.queries !== null) {\n      tView.queries.template(tView, tContainerNode);\n      embeddedTView.queries = tView.queries.embeddedTView(tContainerNode);\n    }\n  }\n\n  createDirectivesAndLocals(tView, lView, tContainerNode, localRefExtractor);\n  attachPatchData(getNativeByTNode(tContainerNode, lView), lView);\n  registerPostOrderHooks(tView, tContainerNode);\n  setIsNotParent();\n}\n\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ÉµÉµcontainerRefreshStart(index: number): void {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  let previousOrParentTNode = loadInternal(tView.data, index) as TNode;\n  ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n  setPreviousOrParentTNode(previousOrParentTNode, true);\n\n  lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;\n\n  // We need to execute init hooks here so ngOnInit hooks are called in top level views\n  // before they are called in embedded views (for backwards compatibility).\n  executePreOrderHooks(lView, tView, getCheckNoChangesMode(), undefined);\n}\n\n/**\n * Marks the end of the LContainer.\n *\n * Marking the end of LContainer is the time when to child views get inserted or removed.\n *\n * @codeGenApi\n */\nexport function ÉµÉµcontainerRefreshEnd(): void {\n  let previousOrParentTNode = getPreviousOrParentTNode();\n  if (getIsParent()) {\n    setIsNotParent();\n  } else {\n    ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.View);\n    ngDevMode && assertHasParent(previousOrParentTNode);\n    previousOrParentTNode = previousOrParentTNode.parent !;\n    setPreviousOrParentTNode(previousOrParentTNode, false);\n  }\n\n  ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n\n  const lContainer: LContainer = getLView()[previousOrParentTNode.index];\n  const nextIndex = lContainer[ACTIVE_INDEX];\n\n  // remove extra views at the end of the container\n  while (nextIndex < lContainer.length - CONTAINER_HEADER_OFFSET) {\n    removeView(lContainer, nextIndex);\n  }\n}\n\nfunction containerInternal(\n    lView: LView, nodeIndex: number, tagName: string | null,\n    attrs: TAttributes | null): TContainerNode {\n  ngDevMode && assertEqual(\n                   lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n                   'container nodes should be created before any bindings');\n\n  const adjustedIndex = nodeIndex + HEADER_OFFSET;\n  ngDevMode && assertDataInRange(lView, nodeIndex + HEADER_OFFSET);\n  ngDevMode && ngDevMode.rendererCreateComment++;\n  const comment = lView[adjustedIndex] =\n      lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n  const tNode =\n      getOrCreateTNode(lView[TVIEW], lView[T_HOST], nodeIndex, TNodeType.Container, tagName, attrs);\n  const lContainer = lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode);\n\n  appendChild(comment, tNode, lView);\n\n  // Containers are added to the current view tree instead of their embedded views\n  // because views can be removed and re-inserted.\n  addToViewTree(lView, lContainer);\n\n  ngDevMode && assertNodeType(getPreviousOrParentTNode(), TNodeType.Container);\n  return tNode;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {HEADER_OFFSET, TVIEW} from '../interfaces/view';\nimport {getContextLView, getLView} from '../state';\nimport {loadInternal} from '../util/view_utils';\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(index: number, value: T): void {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  // We don't store any static data for local variables, so the first time\n  // we see the template, we should store as null to avoid a sparse array\n  const adjustedIndex = index + HEADER_OFFSET;\n  if (adjustedIndex >= tView.data.length) {\n    tView.data[adjustedIndex] = null;\n    tView.blueprint[adjustedIndex] = null;\n  }\n  lView[adjustedIndex] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ÉµÉµreference<T>(index: number) {\n  const contextLView = getContextLView();\n  return loadInternal<T>(contextLView, index);\n}\n\n/**\n * Retrieves a value from current `viewData`.\n *\n * @codeGenApi\n */\nexport function ÉµÉµload<T>(index: number): T {\n  return loadInternal<T>(getLView(), index);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectFlags, InjectionToken, resolveForwardRef} from '../../di';\nimport {ÉµÉµinject} from '../../di/injector_compatibility';\nimport {Type} from '../../interface/type';\nimport {getOrCreateInjectable, injectAttributeImpl} from '../di';\nimport {TContainerNode, TElementContainerNode, TElementNode} from '../interfaces/node';\nimport {getLView, getPreviousOrParentTNode} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n *  All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n *   constructor(directive: DirectiveA) {}\n *\n *   static ngDirectiveDef = ÉµÉµdefineDirective({\n *     type: SomeDirective,\n *     factory: () => new SomeDirective(ÉµÉµdirectiveInject(DirectiveA))\n *   });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ÉµÉµdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ÉµÉµdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;\nexport function ÉµÉµdirectiveInject<T>(\n    token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n  token = resolveForwardRef(token);\n  const lView = getLView();\n  // Fall back to inject() if view hasn't been created. This situation can happen in tests\n  // if inject utilities are used before bootstrapping.\n  if (lView == null) return ÉµÉµinject(token, flags);\n\n  return getOrCreateInjectable<T>(\n      getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode, lView,\n      token, flags);\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ÉµÉµinjectAttribute(attrNameToInject: string): string|null {\n  return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {setInputsForProperty} from '../instructions/shared';\nimport {AttributeMarker, TAttributes, TNode, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {BINDING_INDEX, LView, RENDERER, TVIEW} from '../interfaces/view';\nimport {getActiveDirectiveId, getActiveDirectiveSuperClassDepth, getActiveDirectiveSuperClassHeight, getCurrentStyleSanitizer, getLView, getPreviousOrParentTNode, getSelectedIndex, setCurrentStyleSanitizer} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getNativeByTNode, getTNode} from '../util/view_utils';\n\nimport {flushStyling, updateClassBinding, updateStyleBinding} from './bindings';\nimport {StylingMapArray, StylingMapArrayIndex, TStylingContext} from './interfaces';\nimport {activateStylingMapFeature, addItemToStylingMap, normalizeIntoStylingMap, stylingMapToString} from './map_based_bindings';\nimport {attachStylingDebugObject} from './styling_debug';\nimport {allocTStylingContext, concatString, forceClassesAsString, forceStylesAsString, getInitialStylingValue, getStylingMapArray, hasClassInput, hasStyleInput, hasValueChanged, isContextLocked, isStylingContext, updateLastDirectiveIndex as _updateLastDirectiveIndex} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core logic for how styling instructions are processed in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * This function is executed during the creation block of an element.\n * Because the existing styling implementation issues a call to the\n * `styling()` instruction, this instruction will also get run. The\n * central idea here is that the directive index values are bound\n * into the context. The directive index is temporary and is only\n * required until the `select(n)` instruction is fully functional.\n *\n * @codeGenApi\n */\nexport function ÉµÉµstyling() {\n  const tView = getLView()[TVIEW];\n  if (tView.firstTemplatePass) {\n    updateLastDirectiveIndex(getPreviousOrParentTNode(), getActiveDirectiveStylingIndex());\n  }\n}\n\n/**\n * Sets the current style sanitizer function which will then be used\n * within all follow-up prop and map-based style binding instructions\n * for the given element.\n *\n * Note that once styling has been applied to the element (i.e. once\n * `select(n)` is executed or the hostBindings/template function exits)\n * then the active `sanitizerFn` will be set to `null`. This means that\n * once styling is applied to another element then a another call to\n * `styleSanitizer` will need to be made.\n *\n * @param sanitizerFn The sanitization function that will be used to\n *       process style prop/value entries.\n *\n * @codeGenApi\n */\nexport function ÉµÉµstyleSanitizer(sanitizer: StyleSanitizeFn | null): void {\n  setCurrentStyleSanitizer(sanitizer);\n}\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *        Note that when a suffix is provided then the underlying sanitizer will\n *        be ignored.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding.\n *\n * @codeGenApi\n */\nexport function ÉµÉµstyleProp(\n    prop: string, value: string | number | String | null, suffix?: string | null): void {\n  stylePropInternal(getSelectedIndex(), prop, value, suffix);\n}\n\nexport function stylePropInternal(\n    elementIndex: number, prop: string, value: string | number | String | null,\n    suffix?: string | null | undefined) {\n  const lView = getLView();\n\n  // if a value is interpolated then it may render a `NO_CHANGE` value.\n  // in this case we do not need to do anything, but the binding index\n  // still needs to be incremented because all styling binding values\n  // are stored inside of the lView.\n  const bindingIndex = lView[BINDING_INDEX]++;\n\n  const updated = _stylingProp(\n      elementIndex, bindingIndex, prop, resolveStylePropValue(value, suffix), false,\n      deferStylingUpdate());\n  if (ngDevMode) {\n    ngDevMode.styleProp++;\n    if (updated) {\n      ngDevMode.stylePropCacheMiss++;\n    }\n  }\n}\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ÉµÉµclassProp(className: string, value: boolean | null): void {\n  const lView = getLView();\n\n  // if a value is interpolated then it may render a `NO_CHANGE` value.\n  // in this case we do not need to do anything, but the binding index\n  // still needs to be incremented because all styling binding values\n  // are stored inside of the lView.\n  const bindingIndex = lView[BINDING_INDEX]++;\n\n  const updated =\n      _stylingProp(getSelectedIndex(), bindingIndex, className, value, true, deferStylingUpdate());\n  if (ngDevMode) {\n    ngDevMode.classProp++;\n    if (updated) {\n      ngDevMode.classPropCacheMiss++;\n    }\n  }\n}\n\n/**\n * Shared function used to update a prop-based styling binding for an element.\n */\nfunction _stylingProp(\n    elementIndex: number, bindingIndex: number, prop: string,\n    value: boolean | number | String | string | null | undefined | NO_CHANGE, isClassBased: boolean,\n    defer: boolean): boolean {\n  const lView = getLView();\n  const tNode = getTNode(elementIndex, lView);\n  const native = getNativeByTNode(tNode, lView) as RElement;\n\n  let updated = false;\n  if (value !== NO_CHANGE) {\n    if (isClassBased) {\n      updated = updateClassBinding(\n          getClassesContext(tNode), lView, native, prop, bindingIndex,\n          value as string | boolean | null, defer, false);\n    } else {\n      const sanitizer = getCurrentStyleSanitizer();\n      updated = updateStyleBinding(\n          getStylesContext(tNode), lView, native, prop, bindingIndex, value as string | null,\n          sanitizer, defer, false);\n    }\n  }\n\n  return updated;\n}\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n *        Any missing styles (that have already been applied to the element beforehand) will be\n *        removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ÉµÉµstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const tNode = getTNode(index, lView);\n  const context = getStylesContext(tNode);\n  const directiveIndex = getActiveDirectiveStylingIndex();\n\n  // if a value is interpolated then it may render a `NO_CHANGE` value.\n  // in this case we do not need to do anything, but the binding index\n  // still needs to be incremented because all styling binding values\n  // are stored inside of the lView.\n  const bindingIndex = lView[BINDING_INDEX]++;\n\n  // inputs are only evaluated from a template binding into a directive, therefore,\n  // there should not be a situation where a directive host bindings function\n  // evaluates the inputs (this should only happen in the template function)\n  if (!directiveIndex && hasStyleInput(tNode) && styles !== NO_CHANGE) {\n    updateDirectiveInputValue(context, lView, tNode, bindingIndex, styles, false);\n    styles = NO_CHANGE;\n  }\n\n  const updated = _stylingMap(index, context, bindingIndex, styles, false, deferStylingUpdate());\n  if (ngDevMode) {\n    ngDevMode.styleMap++;\n    if (updated) {\n      ngDevMode.styleMapCacheMiss++;\n    }\n  }\n}\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n *        given element. Any missing classes (that have already been applied to the element\n *        beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ÉµÉµclassMap(classes: {[className: string]: any} | NO_CHANGE | string | null): void {\n  classMapInternal(getSelectedIndex(), classes);\n}\n\nexport function classMapInternal(\n    elementIndex: number, classes: {[className: string]: any} | NO_CHANGE | string | null) {\n  const lView = getLView();\n  const tNode = getTNode(elementIndex, lView);\n  const context = getClassesContext(tNode);\n  const directiveIndex = getActiveDirectiveStylingIndex();\n\n  // if a value is interpolated then it may render a `NO_CHANGE` value.\n  // in this case we do not need to do anything, but the binding index\n  // still needs to be incremented because all styling binding values\n  // are stored inside of the lView.\n  const bindingIndex = lView[BINDING_INDEX]++;\n\n  // inputs are only evaluated from a template binding into a directive, therefore,\n  // there should not be a situation where a directive host bindings function\n  // evaluates the inputs (this should only happen in the template function)\n  if (!directiveIndex && hasClassInput(tNode) && classes !== NO_CHANGE) {\n    updateDirectiveInputValue(context, lView, tNode, bindingIndex, classes, true);\n    classes = NO_CHANGE;\n  }\n\n  const updated =\n      _stylingMap(elementIndex, context, bindingIndex, classes, true, deferStylingUpdate());\n  if (ngDevMode) {\n    ngDevMode.classMap++;\n    if (updated) {\n      ngDevMode.classMapCacheMiss++;\n    }\n  }\n}\n\n/**\n * Shared function used to update a map-based styling binding for an element.\n *\n * When this function is called it will activate support for `[style]` and\n * `[class]` bindings in Angular.\n */\nfunction _stylingMap(\n    elementIndex: number, context: TStylingContext, bindingIndex: number,\n    value: {[key: string]: any} | string | null, isClassBased: boolean, defer: boolean) {\n  activateStylingMapFeature();\n  const lView = getLView();\n\n  let valueHasChanged = false;\n  if (value !== NO_CHANGE) {\n    const tNode = getTNode(elementIndex, lView);\n    const native = getNativeByTNode(tNode, lView) as RElement;\n    const oldValue = lView[bindingIndex];\n    valueHasChanged = hasValueChanged(oldValue, value);\n    const stylingMapArr = normalizeIntoStylingMap(oldValue, value, !isClassBased);\n    if (isClassBased) {\n      updateClassBinding(\n          context, lView, native, null, bindingIndex, stylingMapArr, defer, valueHasChanged);\n    } else {\n      const sanitizer = getCurrentStyleSanitizer();\n      updateStyleBinding(\n          context, lView, native, null, bindingIndex, stylingMapArr, sanitizer, defer,\n          valueHasChanged);\n    }\n  }\n\n  return valueHasChanged;\n}\n\n/**\n * Writes a value to a directive's `style` or `class` input binding (if it has changed).\n *\n * If a directive has a `@Input` binding that is set on `style` or `class` then that value\n * will take priority over the underlying style/class styling bindings. This value will\n * be updated for the binding each time during change detection.\n *\n * When this occurs this function will attempt to write the value to the input binding\n * depending on the following situations:\n *\n * - If `oldValue !== newValue`\n * - If `newValue` is `null` (but this is skipped if it is during the first update pass--\n *    which is when the context is not locked yet)\n */\nfunction updateDirectiveInputValue(\n    context: TStylingContext, lView: LView, tNode: TNode, bindingIndex: number, newValue: any,\n    isClassBased: boolean): void {\n  const oldValue = lView[bindingIndex];\n  if (oldValue !== newValue) {\n    // even if the value has changed we may not want to emit it to the\n    // directive input(s) in the event that it is falsy during the\n    // first update pass.\n    if (newValue || isContextLocked(context)) {\n      const inputs = tNode.inputs ![isClassBased ? 'class' : 'style'] !;\n      const initialValue = getInitialStylingValue(context);\n      const value = normalizeStylingDirectiveInputValue(initialValue, newValue, isClassBased);\n      setInputsForProperty(lView, inputs, value);\n    }\n    lView[bindingIndex] = newValue;\n  }\n}\n\n/**\n * Returns the appropriate directive input value for `style` or `class`.\n *\n * Earlier versions of Angular expect a binding value to be passed into directive code\n * exactly as it is unless there is a static value present (in which case both values\n * will be stringified and concatenated).\n */\nfunction normalizeStylingDirectiveInputValue(\n    initialValue: string, bindingValue: string | {[key: string]: any} | null,\n    isClassBased: boolean) {\n  let value = bindingValue;\n\n  // we only concat values if there is an initial value, otherwise we return the value as is.\n  // Note that this is to satisfy backwards-compatibility in Angular.\n  if (initialValue.length > 0) {\n    if (isClassBased) {\n      value = concatString(initialValue, forceClassesAsString(bindingValue));\n    } else {\n      value = concatString(\n          initialValue, forceStylesAsString(bindingValue as{[key: string]: any} | null | undefined),\n          ';');\n    }\n  }\n  return value;\n}\n\n/**\n * Flushes all styling code to the element.\n *\n * This function is designed to be called from the template and hostBindings\n * functions and may be called multiple times depending whether multiple\n * sources of styling exist. If called multiple times, only the last call\n * to `stlyingApply()` will render styling to the element.\n *\n * @codeGenApi\n */\nexport function ÉµÉµstylingApply() {\n  const elementIndex = getSelectedIndex();\n  const lView = getLView();\n  const tNode = getTNode(elementIndex, lView);\n  const renderer = getRenderer(tNode, lView);\n  const native = getNativeByTNode(tNode, lView) as RElement;\n  const directiveIndex = getActiveDirectiveStylingIndex();\n  const sanitizer = getCurrentStyleSanitizer();\n  flushStyling(\n      renderer, lView, getClassesContext(tNode), getStylesContext(tNode), native, directiveIndex,\n      sanitizer);\n  setCurrentStyleSanitizer(null);\n}\n\nfunction getRenderer(tNode: TNode, lView: LView) {\n  return tNode.type === TNodeType.Element ? lView[RENDERER] : null;\n}\n\n/**\n * Searches and assigns provided all static style/class entries (found in the `attrs` value)\n * and registers them in their respective styling contexts.\n */\nexport function registerInitialStylingOnTNode(\n    tNode: TNode, attrs: TAttributes, startIndex: number): boolean {\n  let hasAdditionalInitialStyling = false;\n  let styles = getStylingMapArray(tNode.styles);\n  let classes = getStylingMapArray(tNode.classes);\n  let mode = -1;\n  for (let i = startIndex; i < attrs.length; i++) {\n    const attr = attrs[i] as string;\n    if (typeof attr == 'number') {\n      mode = attr;\n    } else if (mode == AttributeMarker.Classes) {\n      classes = classes || [''];\n      addItemToStylingMap(classes, attr, true);\n      hasAdditionalInitialStyling = true;\n    } else if (mode == AttributeMarker.Styles) {\n      const value = attrs[++i] as string | null;\n      styles = styles || [''];\n      addItemToStylingMap(styles, attr, value);\n      hasAdditionalInitialStyling = true;\n    }\n  }\n\n  if (classes && classes.length > StylingMapArrayIndex.ValuesStartPosition) {\n    if (!tNode.classes) {\n      tNode.classes = classes;\n    }\n    updateRawValueOnContext(tNode.classes, stylingMapToString(classes, true));\n  }\n\n  if (styles && styles.length > StylingMapArrayIndex.ValuesStartPosition) {\n    if (!tNode.styles) {\n      tNode.styles = styles;\n    }\n    updateRawValueOnContext(tNode.styles, stylingMapToString(styles, false));\n  }\n\n  return hasAdditionalInitialStyling;\n}\n\nfunction updateRawValueOnContext(context: TStylingContext | StylingMapArray, value: string) {\n  const stylingMapArr = getStylingMapArray(context) !;\n  stylingMapArr[StylingMapArrayIndex.RawValuePosition] = value;\n}\n\nexport function getActiveDirectiveStylingIndex(): number {\n  // whenever a directive's hostBindings function is called a uniqueId value\n  // is assigned. Normally this is enough to help distinguish one directive\n  // from another for the styling context, but there are situations where a\n  // sub-class directive could inherit and assign styling in concert with a\n  // parent directive. To help the styling code distinguish between a parent\n  // sub-classed directive the inheritance depth is taken into account as well.\n  return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n}\n\n/**\n * Temporary function that will update the max directive index value in\n * both the classes and styles contexts present on the provided `tNode`.\n *\n * This code is only used because the `select(n)` code functionality is not\n * yet 100% functional. The `select(n)` instruction cannot yet evaluate host\n * bindings function code in sync with the associated template function code.\n * For this reason the styling algorithm needs to track the last directive index\n * value so that it knows exactly when to render styling to the element since\n * `stylingApply()` is called multiple times per CD (`stylingApply` will be\n * removed once `select(n)` is fixed).\n */\nfunction updateLastDirectiveIndex(tNode: TNode, directiveIndex: number) {\n  _updateLastDirectiveIndex(getClassesContext(tNode), directiveIndex);\n  _updateLastDirectiveIndex(getStylesContext(tNode), directiveIndex);\n}\n\nfunction getStylesContext(tNode: TNode): TStylingContext {\n  return getContext(tNode, false);\n}\n\nfunction getClassesContext(tNode: TNode): TStylingContext {\n  return getContext(tNode, true);\n}\n\n/**\n * Returns/instantiates a styling context from/to a `tNode` instance.\n */\nfunction getContext(tNode: TNode, isClassBased: boolean) {\n  let context = isClassBased ? tNode.classes : tNode.styles;\n  if (!isStylingContext(context)) {\n    context = allocTStylingContext(context);\n    if (ngDevMode) {\n      attachStylingDebugObject(context as TStylingContext);\n    }\n    if (isClassBased) {\n      tNode.classes = context;\n    } else {\n      tNode.styles = context;\n    }\n  }\n  return context as TStylingContext;\n}\n\nfunction resolveStylePropValue(\n    value: string | number | String | null | NO_CHANGE, suffix: string | null | undefined): string|\n    null|undefined|NO_CHANGE {\n  if (value === NO_CHANGE) return value;\n\n  let resolvedValue: string|null = null;\n  if (value !== null) {\n    if (suffix) {\n      // when a suffix is applied then it will bypass\n      // sanitization entirely (b/c a new string is created)\n      resolvedValue = renderStringify(value) + suffix;\n    } else {\n      // sanitization happens by dealing with a String value\n      // this means that the string value will be passed through\n      // into the style rendering later (which is where the value\n      // will be sanitized before it is applied)\n      resolvedValue = value as any as string;\n    }\n  }\n  return resolvedValue;\n}\n\n/**\n * Whether or not a style/class binding update should be applied later.\n *\n * This function will decide whether a binding should be applied immediately\n * or later (just before the styles/classes are flushed to the element). The\n * reason why this feature exists is because of super/sub directive inheritance.\n * Angular will evaluate host bindings on the super directive first and the sub\n * directive, but the styling bindings on the sub directive are of higher priority\n * than the super directive. For this reason all styling bindings that take place\n * in this circumstance will need to be deferred until later so that they can be\n * applied together and in a different order (the algorithm handles that part).\n */\nfunction deferStylingUpdate(): boolean {\n  return getActiveDirectiveSuperClassHeight() > 0;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {isContentQueryHost} from '../interfaces/type_checks';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {decreaseElementDepthCount, getElementDepthCount, getIsParent, getLView, getPreviousOrParentTNode, getSelectedIndex, increaseElementDepthCount, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {registerInitialStylingOnTNode} from '../styling_next/instructions';\nimport {StylingMapArray, TStylingContext} from '../styling_next/interfaces';\nimport {getInitialStylingValue, hasClassInput, hasStyleInput} from '../styling_next/util';\nimport {setUpAttributes} from '../util/attrs_utils';\nimport {getNativeByTNode, getTNode} from '../util/view_utils';\n\nimport {createDirectivesAndLocals, elementCreate, executeContentQueries, getOrCreateTNode, initializeTNodeInputs, renderInitialStyling, resolveDirectives, setInputsForProperty} from './shared';\n\n\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n *              element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementStart(\n    index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  ngDevMode && assertEqual(\n                   lView[BINDING_INDEX], tView.bindingStartIndex,\n                   'elements should be created before any bindings ');\n\n  ngDevMode && ngDevMode.rendererCreateElement++;\n  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n  const native = lView[index + HEADER_OFFSET] = elementCreate(name);\n  const renderer = lView[RENDERER];\n  const tNode =\n      getOrCreateTNode(tView, lView[T_HOST], index, TNodeType.Element, name, attrs || null);\n\n  if (attrs != null) {\n    const lastAttrIndex = setUpAttributes(native, attrs);\n    if (tView.firstTemplatePass) {\n      registerInitialStylingOnTNode(tNode, attrs, lastAttrIndex);\n    }\n  }\n\n  renderInitialStyling(renderer, native, tNode);\n\n  appendChild(native, tNode, lView);\n\n  // any immediate children of a component or template container must be pre-emptively\n  // monkey-patched with the component view data so that the element can be inspected\n  // later on using any element discovery utility methods (see `element_discovery.ts`)\n  if (getElementDepthCount() === 0) {\n    attachPatchData(native, lView);\n  }\n  increaseElementDepthCount();\n\n  // if a directive contains a host binding for \"class\" then all class-based data will\n  // flow through that (except for `[class.prop]` bindings). This also includes initial\n  // static class values as well. (Note that this will be fixed once map-based `[style]`\n  // and `[class]` bindings work for multiple directives.)\n  if (tView.firstTemplatePass) {\n    ngDevMode && ngDevMode.firstTemplatePass++;\n    resolveDirectives(tView, lView, tNode, localRefs || null);\n\n    const inputData = initializeTNodeInputs(tNode);\n    if (inputData && inputData.hasOwnProperty('class')) {\n      tNode.flags |= TNodeFlags.hasClassInput;\n    }\n\n    if (inputData && inputData.hasOwnProperty('style')) {\n      tNode.flags |= TNodeFlags.hasStyleInput;\n    }\n\n    if (tView.queries !== null) {\n      tView.queries.elementStart(tView, tNode);\n    }\n  }\n\n  createDirectivesAndLocals(tView, lView, tNode);\n  executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementEnd(): void {\n  let previousOrParentTNode = getPreviousOrParentTNode();\n  ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');\n  if (getIsParent()) {\n    setIsNotParent();\n  } else {\n    ngDevMode && assertHasParent(getPreviousOrParentTNode());\n    previousOrParentTNode = previousOrParentTNode.parent !;\n    setPreviousOrParentTNode(previousOrParentTNode, false);\n  }\n\n  const tNode = previousOrParentTNode;\n  ngDevMode && assertNodeType(tNode, TNodeType.Element);\n\n  const lView = getLView();\n  const tView = lView[TVIEW];\n\n  registerPostOrderHooks(tView, previousOrParentTNode);\n  decreaseElementDepthCount();\n\n  if (tView.firstTemplatePass && tView.queries !== null &&\n      isContentQueryHost(previousOrParentTNode)) {\n    tView.queries !.elementEnd(previousOrParentTNode);\n  }\n\n  if (hasClassInput(tNode) && tNode.classes) {\n    setDirectiveStylingInput(tNode.classes, lView, tNode.inputs !['class']);\n  }\n\n  if (hasStyleInput(tNode) && tNode.styles) {\n    setDirectiveStylingInput(tNode.styles, lView, tNode.inputs !['style']);\n  }\n}\n\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n *              element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelement(\n    index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n  ÉµÉµelementStart(index, name, attrs, localRefs);\n  ÉµÉµelementEnd();\n}\n\n/**\n * Assign static attribute values to a host element.\n *\n * This instruction will assign static attribute values as well as class and style\n * values to an element within the host bindings function. Since attribute values\n * can consist of different types of values, the `attrs` array must include the values in\n * the following format:\n *\n * attrs = [\n *   // static attributes (like `title`, `name`, `id`...)\n *   attr1, value1, attr2, value,\n *\n *   // a single namespace value (like `x:id`)\n *   NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n *   // another single namespace value (like `x:name`)\n *   NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n *   // a series of CSS classes that will be applied to the element (no spaces)\n *   CLASSES_MARKER, class1, class2, class3,\n *\n *   // a series of CSS styles (property + value) that will be applied to the element\n *   STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n *\n * NOTE: This instruction is meant to used from `hostBindings` function only.\n *\n * @param directive A directive instance the styling is associated with.\n * @param attrs An array of static values (attributes, classes and styles) with the correct marker\n * values.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementHostAttrs(attrs: TAttributes) {\n  const hostElementIndex = getSelectedIndex();\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  const tNode = getTNode(hostElementIndex, lView);\n\n  // non-element nodes (e.g. `<ng-container>`) are not rendered as actual\n  // element nodes and adding styles/classes on to them will cause runtime\n  // errors...\n  if (tNode.type === TNodeType.Element) {\n    const native = getNativeByTNode(tNode, lView) as RElement;\n    const lastAttrIndex = setUpAttributes(native, attrs);\n    if (tView.firstTemplatePass) {\n      const stylingNeedsToBeRendered = registerInitialStylingOnTNode(tNode, attrs, lastAttrIndex);\n\n      // this is only called during the first template pass in the\n      // event that this current directive assigned initial style/class\n      // host attribute values to the element. Because initial styling\n      // values are applied before directives are first rendered (within\n      // `createElement`) this means that initial styling for any directives\n      // still needs to be applied. Note that this will only happen during\n      // the first template pass and not each time a directive applies its\n      // attribute values to the element.\n      if (stylingNeedsToBeRendered) {\n        const renderer = lView[RENDERER];\n        renderInitialStyling(renderer, native, tNode);\n      }\n    }\n  }\n}\n\nfunction setDirectiveStylingInput(\n    context: TStylingContext | StylingMapArray, lView: LView, stylingInputs: (string | number)[]) {\n  // older versions of Angular treat the input as `null` in the\n  // event that the value does not exist at all. For this reason\n  // we can't have a styling value be an empty string.\n  const value = getInitialStylingValue(context) || null;\n\n  // Ivy does an extra `[class]` write with a falsy value since the value\n  // is applied during creation mode. This is a deviation from VE and should\n  // be (Jira Issue = FW-1467).\n  setInputsForProperty(lView, stylingInputs, value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeType} from '../interfaces/node';\nimport {isContentQueryHost} from '../interfaces/type_checks';\nimport {BINDING_INDEX, HEADER_OFFSET, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {registerInitialStylingOnTNode} from '../styling_next/instructions';\n\nimport {createDirectivesAndLocals, executeContentQueries, getOrCreateTNode, resolveDirectives} from './shared';\n\n\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrs Set of attributes to be used when matching directives.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementContainerStart(\n    index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  const renderer = lView[RENDERER];\n  const tagName = 'ng-container';\n  ngDevMode && assertEqual(\n                   lView[BINDING_INDEX], tView.bindingStartIndex,\n                   'element containers should be created before any bindings');\n\n  ngDevMode && ngDevMode.rendererCreateComment++;\n  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n  const native = lView[index + HEADER_OFFSET] = renderer.createComment(ngDevMode ? tagName : '');\n\n  ngDevMode && assertDataInRange(lView, index - 1);\n  const tNode = getOrCreateTNode(\n      tView, lView[T_HOST], index, TNodeType.ElementContainer, tagName, attrs || null);\n\n\n  if (attrs && tView.firstTemplatePass) {\n    // While ng-container doesn't necessarily support styling, we use the style context to identify\n    // and execute directives on the ng-container.\n    registerInitialStylingOnTNode(tNode, attrs as TAttributes, 0);\n  }\n\n  appendChild(native, tNode, lView);\n\n  if (tView.firstTemplatePass) {\n    ngDevMode && ngDevMode.firstTemplatePass++;\n    resolveDirectives(tView, lView, tNode, localRefs || null);\n    if (tView.queries) {\n      tView.queries.elementStart(tView, tNode);\n    }\n  }\n\n  createDirectivesAndLocals(tView, lView, tNode);\n  attachPatchData(native, lView);\n  executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementContainerEnd(): void {\n  let previousOrParentTNode = getPreviousOrParentTNode();\n  const lView = getLView();\n  const tView = lView[TVIEW];\n  if (getIsParent()) {\n    setIsNotParent();\n  } else {\n    ngDevMode && assertHasParent(previousOrParentTNode);\n    previousOrParentTNode = previousOrParentTNode.parent !;\n    setPreviousOrParentTNode(previousOrParentTNode, false);\n  }\n\n  ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.ElementContainer);\n\n  registerPostOrderHooks(tView, previousOrParentTNode);\n\n  if (tView.firstTemplatePass && tView.queries !== null &&\n      isContentQueryHost(previousOrParentTNode)) {\n    tView.queries.elementEnd(previousOrParentTNode);\n  }\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrs Set of attributes to be used when matching directives.\n * @param localRefs A set of local reference bindings on the element.\n *\n * @codeGenApi\n */\nexport function ÉµÉµelementContainer(\n    index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n  ÉµÉµelementContainerStart(index, attrs, localRefs);\n  ÉµÉµelementContainerEnd();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {assertLContainerOrUndefined} from '../assert';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {RenderFlags} from '../interfaces/definition';\nimport {TContainerNode, TNodeType} from '../interfaces/node';\nimport {FLAGS, LView, LViewFlags, PARENT, QUERIES, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {insertView, removeView} from '../node_manipulation';\nimport {enterView, getIsParent, getLView, getPreviousOrParentTNode, isCreationMode, leaveView, setIsParent, setPreviousOrParentTNode} from '../state';\nimport {resetPreOrderHookFlags} from '../util/view_utils';\nimport {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews} from './shared';\n\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n *\n * @codeGenApi\n */\nexport function ÉµÉµembeddedViewStart(\n    viewBlockId: number, consts: number, vars: number): RenderFlags {\n  const lView = getLView();\n  const previousOrParentTNode = getPreviousOrParentTNode();\n  // The previous node can be a view node if we are processing an inline for loop\n  const containerTNode = previousOrParentTNode.type === TNodeType.View ?\n      previousOrParentTNode.parent ! :\n      previousOrParentTNode;\n  const lContainer = lView[containerTNode.index] as LContainer;\n\n  ngDevMode && assertNodeType(containerTNode, TNodeType.Container);\n  let viewToRender = scanForView(lContainer, lContainer[ACTIVE_INDEX] !, viewBlockId);\n\n  if (viewToRender) {\n    setIsParent();\n    enterView(viewToRender, viewToRender[TVIEW].node);\n  } else {\n    // When we create a new LView, we always reset the state of the instructions.\n    viewToRender = createLView(\n        lView,\n        getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode as TContainerNode), null,\n        LViewFlags.CheckAlways, null, null);\n\n    const tParentNode = getIsParent() ? previousOrParentTNode :\n                                        previousOrParentTNode && previousOrParentTNode.parent;\n    assignTViewNodeToLView(viewToRender[TVIEW], tParentNode, viewBlockId, viewToRender);\n    enterView(viewToRender, viewToRender[TVIEW].node);\n  }\n  if (lContainer) {\n    if (isCreationMode(viewToRender)) {\n      // it is a new view, insert it into collection of views for a given container\n      insertView(viewToRender, lContainer, lContainer[ACTIVE_INDEX] !);\n    }\n    lContainer[ACTIVE_INDEX] !++;\n  }\n  return isCreationMode(viewToRender) ? RenderFlags.Create | RenderFlags.Update :\n                                        RenderFlags.Update;\n}\n\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view block must create or retrieve its own TView. Otherwise, the embedded view's\n * static data for a particular node would overwrite the static data for a node in the view above\n * it with the same index (since it's in the same template).\n *\n * @param viewIndex The index of the TView in TNode.tViews\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param vars The number of bindings and pure function bindings in this template\n * @param container The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(\n    viewIndex: number, consts: number, vars: number, parent: TContainerNode): TView {\n  const tView = getLView()[TVIEW];\n  ngDevMode && assertNodeType(parent, TNodeType.Container);\n  const containerTViews = parent.tViews as TView[];\n  ngDevMode && assertDefined(containerTViews, 'TView expected');\n  ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');\n  if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {\n    containerTViews[viewIndex] = createTView(\n        viewIndex, null, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n  }\n  return containerTViews[viewIndex];\n}\n\n\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param lContainer to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n */\nfunction scanForView(lContainer: LContainer, startIdx: number, viewBlockId: number): LView|null {\n  for (let i = startIdx + CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    const viewAtPositionId = lContainer[i][TVIEW].id;\n    if (viewAtPositionId === viewBlockId) {\n      return lContainer[i];\n    } else if (viewAtPositionId < viewBlockId) {\n      // found a view that should not be at this position - remove\n      removeView(lContainer, i - CONTAINER_HEADER_OFFSET);\n    } else {\n      // found a view with id greater than the one we are searching for\n      // which means that required view doesn't exist and can't be found at\n      // later positions in the views array - stop the searchdef.cont here\n      break;\n    }\n  }\n  return null;\n}\n\n/**\n * Marks the end of an embedded view.\n *\n * @codeGenApi\n */\nexport function ÉµÉµembeddedViewEnd(): void {\n  const lView = getLView();\n  const viewHost = lView[T_HOST];\n\n  if (isCreationMode(lView)) {\n    refreshDescendantViews(lView);  // creation mode pass\n    lView[FLAGS] &= ~LViewFlags.CreationMode;\n  }\n  resetPreOrderHookFlags(lView);\n  refreshDescendantViews(lView);  // update mode pass\n  const lContainer = lView[PARENT] as LContainer;\n  ngDevMode && assertLContainerOrUndefined(lContainer);\n  // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block\n  // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to\n  // an error being thrown.\n  leaveView(lContainer[PARENT] !, /* safeToRunHooks */ true);\n  setPreviousOrParentTNode(viewHost !, false);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ÉµÉµgetCurrentView(): OpaqueViewState {\n  return getLView() as any as OpaqueViewState;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise(obj: any): obj is Promise<any> {\n  // allow any Promise/A+ compliant thenable.\n  // It's up to the caller to ensure that obj.then conforms to the spec\n  return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n */\nexport function isObservable(obj: any | Observable<any>): obj is Observable<any> {\n  // TODO: use isObservable once we update pass rxjs 6.1\n  // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03\n  return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {assertDataInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {EMPTY_OBJ} from '../empty';\nimport {PropertyAliasValue, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, RElement, Renderer3, isProceduralRenderer} from '../interfaces/renderer';\nimport {CLEANUP, FLAGS, LView, LViewFlags, RENDERER, TVIEW} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes} from '../node_assert';\nimport {getLView, getPreviousOrParentTNode} from '../state';\nimport {getComponentViewByIndex, getNativeByTNode, hasDirectives, unwrapRNode} from '../util/view_utils';\nimport {BindingDirection, generatePropertyAliases, getCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ÉµÉµlistener(\n    eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n    eventTargetResolver?: GlobalTargetResolver): void {\n  listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);\n}\n\n/**\n* Registers a synthetic host listener (e.g. `(@foo.start)`) on a component.\n*\n* This instruction is for compatibility purposes and is designed to ensure that a\n* synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n* in the component's renderer. Normally all host listeners are evaluated with the\n* parent component's renderer, but, in the case of animation @triggers, they need\n* to be evaluated with the sub component's renderer (because that's where the\n* animation triggers are defined).\n*\n* Do not use this instruction as a replacement for `listener`. This instruction\n* only exists to ensure compatibility with the ViewEngine's host binding behavior.\n*\n* @param eventName Name of the event\n* @param listenerFn The function to be called when event emits\n* @param useCapture Whether or not to use capture in event listener\n* @param eventTargetResolver Function that returns global target information in case this listener\n* should be attached to a global object like window, document or body\n *\n * @codeGenApi\n*/\nexport function ÉµÉµcomponentHostSyntheticListener(\n    eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n    eventTargetResolver?: GlobalTargetResolver): void {\n  listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n    lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\n  const tView = lView[TVIEW];\n  const tCleanup = tView.cleanup;\n  if (tCleanup != null) {\n    for (let i = 0; i < tCleanup.length - 1; i += 2) {\n      const cleanupEventName = tCleanup[i];\n      if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n        // We have found a matching event name on the same node but it might not have been\n        // registered yet, so we must explicitly verify entries in the LView cleanup data\n        // structures.\n        const lCleanup = lView[CLEANUP] !;\n        const listenerIdxInLCleanup = tCleanup[i + 2];\n        return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n      }\n      // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n      // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n      // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n      // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n      // documentation of TView.cleanup for more details of this data structure layout.\n      if (typeof cleanupEventName === 'string') {\n        i += 2;\n      }\n    }\n  }\n  return null;\n}\n\nfunction listenerInternal(\n    eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n    eventTargetResolver?: GlobalTargetResolver,\n    loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n  const lView = getLView();\n  const tNode = getPreviousOrParentTNode();\n  const tView = lView[TVIEW];\n  const firstTemplatePass = tView.firstTemplatePass;\n  const tCleanup: false|any[] = firstTemplatePass && (tView.cleanup || (tView.cleanup = []));\n\n  ngDevMode && assertNodeOfPossibleTypes(\n                   tNode, TNodeType.Element, TNodeType.Container, TNodeType.ElementContainer);\n\n  let processOutputs = true;\n\n  // add native event listener - applicable to elements only\n  if (tNode.type === TNodeType.Element) {\n    const native = getNativeByTNode(tNode, lView) as RElement;\n    const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ as any;\n    const target = resolved.target || native;\n    const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n    const lCleanup = getCleanup(lView);\n    const lCleanupIndex = lCleanup.length;\n    const idxOrTargetGetter = eventTargetResolver ?\n        (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target :\n        tNode.index;\n\n    // In order to match current behavior, native DOM event listeners must be added for all\n    // events (including outputs).\n    if (isProceduralRenderer(renderer)) {\n      // There might be cases where multiple directives on the same element try to register an event\n      // handler function for the same event. In this situation we want to avoid registration of\n      // several native listeners as each registration would be intercepted by NgZone and\n      // trigger change detection. This would mean that a single user action would result in several\n      // change detections being invoked. To avoid this situation we want to have only one call to\n      // native handler registration (for the same element and same type of event).\n      //\n      // In order to have just one native event handler in presence of multiple handler functions,\n      // we just register a first handler function as a native event listener and then chain\n      // (coalesce) other handler functions on top of the first native handler function.\n      let existingListener = null;\n      // Please note that the coalescing described here doesn't happen for events specifying an\n      // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n      // view engine.\n      // Also, we don't have to search for existing listeners is there are no directives\n      // matching on a given node as we can't register multiple event handlers for the same event in\n      // a template (this would mean having duplicate attributes).\n      if (!eventTargetResolver && hasDirectives(tNode)) {\n        existingListener = findExistingListener(lView, eventName, tNode.index);\n      }\n      if (existingListener !== null) {\n        // Attach a new listener at the head of the coalesced listeners list.\n        (<any>listenerFn).__ngNextListenerFn__ = (<any>existingListener).__ngNextListenerFn__;\n        (<any>existingListener).__ngNextListenerFn__ = listenerFn;\n        processOutputs = false;\n      } else {\n        // The first argument of `listen` function in Procedural Renderer is:\n        // - either a target name (as a string) in case of global target (window, document, body)\n        // - or element reference (in all other cases)\n        listenerFn = wrapListener(tNode, lView, listenerFn, false /** preventDefault */);\n        const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n        ngDevMode && ngDevMode.rendererAddEventListener++;\n\n        lCleanup.push(listenerFn, cleanupFn);\n        tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n      }\n\n    } else {\n      listenerFn = wrapListener(tNode, lView, listenerFn, true /** preventDefault */);\n      target.addEventListener(eventName, listenerFn, useCapture);\n      ngDevMode && ngDevMode.rendererAddEventListener++;\n\n      lCleanup.push(listenerFn);\n      tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n    }\n  }\n\n  // subscribe to directive outputs\n  if (tNode.outputs === undefined) {\n    // if we create TNode here, inputs must be undefined so we know they still need to be\n    // checked\n    tNode.outputs = generatePropertyAliases(tNode, BindingDirection.Output);\n  }\n\n  const outputs = tNode.outputs;\n  let props: PropertyAliasValue|undefined;\n  if (processOutputs && outputs && (props = outputs[eventName])) {\n    const propsLength = props.length;\n    if (propsLength) {\n      const lCleanup = getCleanup(lView);\n      for (let i = 0; i < propsLength; i += 3) {\n        const index = props[i] as number;\n        ngDevMode && assertDataInRange(lView, index);\n        const minifiedName = props[i + 2];\n        const directiveInstance = lView[index];\n        const output = directiveInstance[minifiedName];\n\n        if (ngDevMode && !isObservable(output)) {\n          throw new Error(\n              `@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n        }\n\n        const subscription = output.subscribe(listenerFn);\n        const idx = lCleanup.length;\n        lCleanup.push(listenerFn, subscription);\n        tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n      }\n    }\n  }\n}\n\nfunction executeListenerWithErrorHandling(\n    lView: LView, listenerFn: (e?: any) => any, e: any): boolean {\n  try {\n    // Only explicitly returning false from a listener should preventDefault\n    return listenerFn(e) !== false;\n  } catch (error) {\n    handleError(lView, error);\n    return false;\n  }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n    tNode: TNode, lView: LView, listenerFn: (e?: any) => any,\n    wrapWithPreventDefault: boolean): EventListener {\n  // Note: we are performing most of the work in the listener function itself\n  // to optimize listener registration.\n  return function wrapListenerIn_markDirtyAndPreventDefault(e: Event) {\n    // In order to be backwards compatible with View Engine, events on component host nodes\n    // must also mark the component view itself dirty (i.e. the view that it owns).\n    const startView =\n        tNode.flags & TNodeFlags.isComponent ? getComponentViewByIndex(tNode.index, lView) : lView;\n\n    // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n    if ((lView[FLAGS] & LViewFlags.ManualOnPush) === 0) {\n      markViewDirty(startView);\n    }\n\n    let result = executeListenerWithErrorHandling(lView, listenerFn, e);\n    // A just-invoked listener function might have coalesced listeners so we need to check for\n    // their presence and invoke as needed.\n    let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n    while (nextListenerFn) {\n      // We should prevent default if any of the listeners explicitly return false\n      result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;\n      nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n    }\n\n    if (wrapWithPreventDefault && result === false) {\n      e.preventDefault();\n      // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n      e.returnValue = false;\n    }\n\n    return result;\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ÉµÉµnextContext<T = any>(level: number = 1): T {\n  return nextContextImpl(level);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {TAttributes, TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {TVIEW, T_HOST} from '../interfaces/view';\nimport {appendProjectedNodes} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, setIsNotParent} from '../state';\nimport {findComponentView} from '../util/view_traversal_utils';\nimport {getOrCreateTNode} from './shared';\n\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(tNode: TNode, projectionSlots: ProjectionSlots): number|\n    null {\n  let wildcardNgContentIndex = null;\n  const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n  for (let i = 0; i < projectionSlots.length; i++) {\n    const slotValue = projectionSlots[i];\n    // The last wildcard projection slot should match all nodes which aren't matching\n    // any selector. This is necessary to be backwards compatible with view engine.\n    if (slotValue === '*') {\n      wildcardNgContentIndex = i;\n      continue;\n    }\n    // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n    // to the list of selectors, otherwise we fall back to matching against the node.\n    if (ngProjectAsAttrVal === null ?\n            isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n            isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n      return i;  // first matching selector \"captures\" a given node\n    }\n  }\n  return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n *        on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n *        all nodes which do not match any selector. If not specified, a single wildcard\n *        selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ÉµÉµprojectionDef(projectionSlots?: ProjectionSlots): void {\n  const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;\n\n  if (!componentNode.projection) {\n    // If no explicit projection slots are defined, fall back to a single\n    // projection slot with the wildcard selector.\n    const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n    const projectionHeads: (TNode | null)[] = componentNode.projection =\n        new Array(numProjectionSlots).fill(null);\n    const tails: (TNode | null)[] = projectionHeads.slice();\n\n    let componentChild: TNode|null = componentNode.child;\n\n    while (componentChild !== null) {\n      const slotIndex =\n          projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n\n      if (slotIndex !== null) {\n        if (tails[slotIndex]) {\n          tails[slotIndex] !.projectionNext = componentChild;\n        } else {\n          projectionHeads[slotIndex] = componentChild;\n        }\n        tails[slotIndex] = componentChild;\n      }\n\n      componentChild = componentChild.next;\n    }\n  }\n}\n\nlet delayProjection = false;\nexport function setDelayProjection(value: boolean) {\n  delayProjection = value;\n}\n\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n *        - 0 when the selector is `*` (or unspecified as this is the default value),\n *        - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n*/\nexport function ÉµÉµprojection(\n    nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {\n  const lView = getLView();\n  const tProjectionNode = getOrCreateTNode(\n      lView[TVIEW], lView[T_HOST], nodeIndex, TNodeType.Projection, null, attrs || null);\n\n  // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n  if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n\n  // `<ng-content>` has no content\n  setIsNotParent();\n\n  // We might need to delay the projection of nodes if they are in the middle of an i18n block\n  if (!delayProjection) {\n    // re-distribution of projectable nodes is stored on a component's view level\n    appendProjectedNodes(lView, tProjectionNode, selectorIndex, findComponentView(lView));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {TsickleIssue1009, elementPropertyInternal} from './shared';\n\n\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate(\n    propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009 {\n  ÉµÉµpropertyInterpolate1(propName, '', v0, '', sanitizer);\n  return ÉµÉµpropertyInterpolate;\n}\n\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate1(\n    propName: string, prefix: string, v0: any, suffix: string,\n    sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation1(getLView(), prefix, v0, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate2(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n    sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation2(getLView(), prefix, v0, i0, v1, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate3(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n    suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation3(getLView(), prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate4(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation4(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate5(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue =\n      interpolation5(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate6(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n    sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue =\n      interpolation6(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate7(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n    sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation7(\n      getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolate8(\n    propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const interpolatedValue = interpolation8(\n      getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ÉµÉµpropertyInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The a collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµpropertyInterpolateV(\n    propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009 {\n  const index = getSelectedIndex();\n\n  const interpolatedValue = interpolationV(getLView(), values);\n  if (interpolatedValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n  }\n  return ÉµÉµpropertyInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {TNodeType} from '../interfaces/node';\nimport {RText, isProceduralRenderer} from '../interfaces/renderer';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getLView, getSelectedIndex, setIsNotParent} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {bind} from './property';\nimport {getOrCreateTNode, textBindingInternal} from './shared';\n\n\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Value to write. This value will be stringified.\n *\n * @codeGenApi\n */\nexport function ÉµÉµtext(index: number, value?: any): void {\n  const lView = getLView();\n  ngDevMode && assertEqual(\n                   lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n                   'text nodes should be created before any bindings');\n  ngDevMode && ngDevMode.rendererCreateTextNode++;\n  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n  const textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);\n  ngDevMode && ngDevMode.rendererSetText++;\n  const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, TNodeType.Element, null, null);\n\n  // Text nodes are self closing.\n  setIsNotParent();\n  appendChild(textNative, tNode, lView);\n}\n\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper interpolation(1-8) method\n *\n * @param value Stringified value to write.\n *\n * @codeGenApi\n */\nexport function ÉµÉµtextBinding<T>(value: T | NO_CHANGE): void {\n  const lView = getLView();\n  const index = getSelectedIndex();\n  const bound = bind(lView, value);\n  if (bound !== NO_CHANGE) {\n    textBindingInternal(lView, index, renderStringify(bound));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {TsickleIssue1009, textBindingInternal} from './shared';\n\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate(v0: any): TsickleIssue1009 {\n  ÉµÉµtextInterpolate1('', v0, '');\n  return ÉµÉµtextInterpolate;\n}\n\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate1(prefix: string, v0: any, suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation1(lView, prefix, v0, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate2(\n    prefix: string, v0: any, i0: string, v1: any, suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate3(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n    suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ÉµÉµtextInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate4(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate5(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate6(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated =\n      interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate7(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,\n    suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated =\n      interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolate8(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolation8(\n      lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµtextInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The a collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµtextInterpolateV(values: any[]): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  const interpolated = interpolationV(lView, values);\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, index, interpolated as string);\n  }\n  return ÉµÉµtextInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLView, getSelectedIndex} from '../state';\nimport {classMapInternal} from '../styling_next/instructions';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\n\n\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate2(\n    prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate3(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate4(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate5(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate6(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate7(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolate8(\n    prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n    i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string): void {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(\n      lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n\n/**\n * Update an interpolated class on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n *  class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµclassMapInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ÉµÉµclassMapInterpolateV(values: any[]): void {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  classMapInternal(getSelectedIndex(), interpolatedValue);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {getLView, getSelectedIndex} from '../state';\nimport {stylePropInternal} from '../styling_next/instructions';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {TsickleIssue1009} from './shared';\n\n\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate1(\n    prop: string, prefix: string, v0: any, suffix: string,\n    valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate1;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate2(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n    valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate2;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate3(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string,\n    valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate3;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate4(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, suffix: string, valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate4;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate5(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, suffix: string, valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate5;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate6(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n    valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate6;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate7(\n *    0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate7(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n    valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue =\n      interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate7;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolate8(\n    prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n    v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n    suffix: string, valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolation8(\n      lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolate8;\n}\n\n/**\n * Update an interpolated style property on an element with 8 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n *  style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ÉµÉµstylePropInterpolateV(\n *  0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`..\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ÉµÉµstylePropInterpolateV(\n    prop: string, values: any[], valueSuffix?: string | null): TsickleIssue1009 {\n  const lView = getLView();\n  const interpolatedValue = interpolationV(lView, values);\n  stylePropInternal(getSelectedIndex(), prop, interpolatedValue as string, valueSuffix);\n  return ÉµÉµstylePropInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertNotEqual} from '../../util/assert';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {bind} from './property';\nimport {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ÉµÉµhostProperty<T>(\n    propName: string, value: T, sanitizer?: SanitizerFn | null): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');\n  const lView = getLView();\n  const bindReconciledValue = bind(lView, value);\n  if (bindReconciledValue !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, true);\n  }\n  return ÉµÉµhostProperty;\n}\n\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nexport function ÉµÉµupdateSyntheticHostBinding<T>(\n    propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null): TsickleIssue1009 {\n  const index = getSelectedIndex();\n  const lView = getLView();\n  // TODO(benlesh): remove bind call here.\n  const bound = bind(lView, value);\n  if (bound !== NO_CHANGE) {\n    elementPropertyInternal(index, propName, bound, sanitizer, true, loadComponentRenderer);\n  }\n  return ÉµÉµupdateSyntheticHostBinding;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../../di/injector';\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext} from '../context_discovery';\nimport {NodeInjector} from '../di';\nimport {LContext} from '../interfaces/context';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {CLEANUP, CONTEXT, FLAGS, HOST, LView, LViewFlags, TVIEW} from '../interfaces/view';\n\nimport {stringifyForError} from './misc_utils';\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {unwrapRNode} from './view_utils';\n\n\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n *   #VIEW\n *     <div>\n *       <child-comp></child-comp>\n *     </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getComponent<T = {}>(element: Element): T|null {\n  const context = loadLContextFromNode(element);\n\n  if (context.component === undefined) {\n    context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n  }\n\n  return context.component as T;\n}\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n *   #VIEW\n *     <div>\n *       <child-comp></child-comp>\n *     </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getContext<T = {}>(element: Element): T|null {\n  const context = loadLContextFromNode(element) !;\n  return context.lView[CONTEXT] as T;\n}\n\n/**\n * Returns the component instance associated with view which owns the DOM element (`null`\n * otherwise).\n *\n * @param element DOM element which is owned by an existing component's view.\n *\n * ```\n * <my-app>\n *   #VIEW\n *     <div>\n *       <child-comp></child-comp>\n *     </div>\n * </mp-app>\n *\n * expect(getViewComponent(<child-comp>) instanceof MyApp).toBeTruthy();\n * expect(getViewComponent(<my-app>)).toEqual(null);\n * ```\n *\n * @publicApi\n */\nexport function getViewComponent<T = {}>(element: Element | {}): T|null {\n  const context = loadLContext(element) !;\n  let lView = context.lView;\n  let parent: LView|null;\n  ngDevMode && assertLView(lView);\n  while (lView[HOST] === null && (parent = getLViewParent(lView) !)) {\n    // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`\n    lView = parent;\n  }\n  return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieve all root components.\n *\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getRootComponents(target: {}): any[] {\n  return [...getRootContext(target).components];\n}\n\n/**\n * Retrieves an `Injector` associated with the element, component or directive.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getInjector(target: {}): Injector {\n  const context = loadLContext(target);\n  const tNode = context.lView[TVIEW].data[context.nodeIndex] as TElementNode;\n  return new NodeInjector(tNode, context.lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n * @publicApi\n */\nexport function getInjectionTokens(element: Element): any[] {\n  const context = loadLContext(element, false);\n  if (!context) return [];\n  const lView = context.lView;\n  const tView = lView[TVIEW];\n  const tNode = tView.data[context.nodeIndex] as TNode;\n  const providerTokens: any[] = [];\n  const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n  const endIndex = tNode.directiveEnd;\n  for (let i = startIndex; i < endIndex; i++) {\n    let value = tView.data[i];\n    if (isDirectiveDefHack(value)) {\n      // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n      // design flaw.  We should always store same type so that we can be monomorphic. The issue\n      // is that for Components/Directives we store the def instead the type. The correct behavior\n      // is that we should always be storing injectable type in this location.\n      value = value.type;\n    }\n    providerTokens.push(value);\n  }\n  return providerTokens;\n}\n\n/**\n * Retrieves directives associated with a given DOM host element.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getDirectives(target: {}): Array<{}> {\n  const context = loadLContext(target) !;\n\n  if (context.directives === undefined) {\n    context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n  }\n\n  return context.directives || [];\n}\n\n/**\n * Returns LContext associated with a target passed as an argument.\n * Throws if a given target doesn't have associated LContext.\n *\n */\nexport function loadLContext(target: {}): LContext;\nexport function loadLContext(target: {}, throwOnNotFound: false): LContext|null;\nexport function loadLContext(target: {}, throwOnNotFound: boolean = true): LContext|null {\n  const context = getLContext(target);\n  if (!context && throwOnNotFound) {\n    throw new Error(\n        ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` :\n                    'Invalid ng target');\n  }\n  return context;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n  const context = loadLContext(target) !;\n\n  if (context.localRefs === undefined) {\n    context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n  }\n\n  return context.localRefs || {};\n}\n\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param directive Component or Directive for which the host element should be retrieved.\n *\n * @publicApi\n */\nexport function getHostElement<T>(directive: T): Element {\n  return getLContext(directive) !.native as never as Element;\n}\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nexport function getRenderedText(component: any): string {\n  const hostElement = getHostElement(component);\n  return hostElement.textContent || '';\n}\n\nexport function loadLContextFromNode(node: Node): LContext {\n  if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Node');\n  return loadLContext(node) !;\n}\n\nexport interface Listener {\n  name: string;\n  element: Element;\n  callback: (value: any) => any;\n  useCapture: boolean|null;\n}\n\nexport function isBrowserEvents(listener: Listener): boolean {\n  // Browser events are those which don't have `useCapture` as boolean.\n  return typeof listener.useCapture === 'boolean';\n}\n\n\n/**\n * Retrieves a list of DOM listeners.\n *\n * ```\n * <my-app>\n *   #VIEW\n *     <div (click)=\"doSomething()\">\n *     </div>\n * </mp-app>\n *\n * expect(getListeners(<div>)).toEqual({\n *   name: 'click',\n *   element: <div>,\n *   callback: () => doSomething(),\n *   useCapture: false\n * });\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @publicApi\n */\nexport function getListeners(element: Element): Listener[] {\n  const lContext = loadLContextFromNode(element);\n  const lView = lContext.lView;\n  const tView = lView[TVIEW];\n  const lCleanup = lView[CLEANUP];\n  const tCleanup = tView.cleanup;\n  const listeners: Listener[] = [];\n  if (tCleanup && lCleanup) {\n    for (let i = 0; i < tCleanup.length;) {\n      const firstParam = tCleanup[i++];\n      const secondParam = tCleanup[i++];\n      if (typeof firstParam === 'string') {\n        const name: string = firstParam;\n        const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n        const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n        const useCaptureOrIndx = tCleanup[i++];\n        // if useCaptureOrIndx is boolean then report it as is.\n        // if useCaptureOrIndx is positive number then it in unsubscribe method\n        // if useCaptureOrIndx is negative number then it is a Subscription\n        const useCapture = typeof useCaptureOrIndx === 'boolean' ?\n            useCaptureOrIndx :\n            (useCaptureOrIndx >= 0 ? false : null);\n        if (element == listenerElement) {\n          listeners.push({element, name, callback, useCapture});\n        }\n      }\n    }\n  }\n  listeners.sort(sortListeners);\n  return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n  if (a.name == b.name) return 0;\n  return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n  return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\n\nimport {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getRootComponents, getViewComponent, markDirty} from '../global_utils_api';\n\n\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n *   bazel run --define=compile=aot\n *   //packages/core/test/bundling/todo:devserver\n *\n *  Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n  if (!_published) {\n    _published = true;\n    publishGlobalUtil('getComponent', getComponent);\n    publishGlobalUtil('getContext', getContext);\n    publishGlobalUtil('getListeners', getListeners);\n    publishGlobalUtil('getViewComponent', getViewComponent);\n    publishGlobalUtil('getHostElement', getHostElement);\n    publishGlobalUtil('getInjector', getInjector);\n    publishGlobalUtil('getRootComponents', getRootComponents);\n    publishGlobalUtil('getDirectives', getDirectives);\n    publishGlobalUtil('markDirty', markDirty);\n  }\n}\n\nexport declare type GlobalDevModeContainer = {\n  [GLOBAL_PUBLISH_EXPANDO_KEY]: {[fnName: string]: Function};\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil(name: string, fn: Function): void {\n  const w = global as any as GlobalDevModeContainer;\n  ngDevMode && assertDefined(fn, 'function not defined');\n  if (w) {\n    let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n    if (!container) {\n      container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n    }\n    container[name] = fn;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// We are temporarily importing the existing viewEngine from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\nimport {Type} from '../core';\nimport {Injector} from '../di/injector';\nimport {Sanitizer} from '../sanitization/security';\nimport {assertDataInRange} from '../util/assert';\n\nimport {assertComponentType} from './assert';\nimport {getComponentDef} from './definition';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';\nimport {registerPostOrderHooks, registerPreOrderHooks} from './hooks';\nimport {CLEAN_PROMISE, addToViewTree, createLView, createTView, getOrCreateTNode, getOrCreateTView, initNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, queueComponentIndexForCheck, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {PlayerHandler} from './interfaces/player';\nimport {RElement, Renderer3, RendererFactory3, domRendererFactory3} from './interfaces/renderer';\nimport {CONTEXT, FLAGS, HEADER_OFFSET, LView, LViewFlags, RootContext, RootContextFlags, TVIEW} from './interfaces/view';\nimport {enterView, getPreviousOrParentTNode, leaveView, resetComponentState, setActiveHostElement} from './state';\nimport {publishDefaultGlobalUtils} from './util/global_utils';\nimport {defaultScheduler, stringifyForError} from './util/misc_utils';\nimport {getRootContext} from './util/view_traversal_utils';\nimport {readPatchedLView, resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/** Options that control how the component should be bootstrapped. */\nexport interface CreateComponentOptions {\n  /** Which renderer factory to use. */\n  rendererFactory?: RendererFactory3;\n\n  /** A custom sanitizer instance */\n  sanitizer?: Sanitizer;\n\n  /** A custom animation player handler */\n  playerHandler?: PlayerHandler;\n\n  /**\n   * Host element on which the component will be bootstrapped. If not specified,\n   * the component definition's `tag` is used to query the existing DOM for the\n   * element to bootstrap.\n   */\n  host?: RElement|string;\n\n  /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */\n  injector?: Injector;\n\n  /**\n   * List of features to be applied to the created component. Features are simply\n   * functions that decorate a component with a certain behavior.\n   *\n   * Typically, the features in this list are features that cannot be added to the\n   * other features list in the component definition because they rely on other factors.\n   *\n   * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities\n   * to root components in a tree-shakable way. It cannot be added to the component\n   * features list because there's no way of knowing when the component will be used as\n   * a root component.\n   */\n  hostFeatures?: HostFeature[];\n\n  /**\n   * A function which is used to schedule change detection work in the future.\n   *\n   * When marking components as dirty, it is necessary to schedule the work of\n   * change detection in the future. This is done to coalesce multiple\n   * {@link markDirty} calls into a single changed detection processing.\n   *\n   * The default value of the scheduler is the `requestAnimationFrame` function.\n   *\n   * It is also useful to override this function for testing purposes.\n   */\n  scheduler?: (work: () => void) => void;\n}\n\n/** See CreateComponentOptions.hostFeatures */\ntype HostFeature = (<T>(component: T, componentDef: ComponentDef<T>) => void);\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nexport const NULL_INJECTOR: Injector = {\n  get: (token: any, notFoundValue?: any) => {\n    throw new Error('NullInjector: Not found: ' + stringifyForError(token));\n  }\n};\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nexport function renderComponent<T>(\n    componentType: ComponentType<T>|\n        Type<T>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n    ,\n    opts: CreateComponentOptions = {}): T {\n  ngDevMode && publishDefaultGlobalUtils();\n  ngDevMode && assertComponentType(componentType);\n\n  // this is preemptively set to avoid having test and debug code accidentally\n  // read data from a previous application state...\n  setActiveHostElement(null);\n\n  const rendererFactory = opts.rendererFactory || domRendererFactory3;\n  const sanitizer = opts.sanitizer || null;\n  const componentDef = getComponentDef<T>(componentType) !;\n  if (componentDef.type != componentType) componentDef.type = componentType;\n\n  // The first index of the first selector is the tag name.\n  const componentTag = componentDef.selectors ![0] ![0] as string;\n  const hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);\n  const rootFlags = componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n                                          LViewFlags.CheckAlways | LViewFlags.IsRoot;\n  const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n\n  const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n  const rootView: LView = createLView(\n      null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null,\n      rendererFactory, renderer, undefined, opts.injector || null);\n\n  const oldView = enterView(rootView, null);\n  let component: T;\n\n  // Will become true if the `try` block executes with no errors.\n  let safeToRunHooks = false;\n  try {\n    if (rendererFactory.begin) rendererFactory.begin();\n    const componentView = createRootComponentView(\n        hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n    component = createRootComponent(\n        componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n\n    addToViewTree(rootView, componentView);\n\n    refreshDescendantViews(rootView);  // creation mode pass\n    rootView[FLAGS] &= ~LViewFlags.CreationMode;\n    resetPreOrderHookFlags(rootView);\n    refreshDescendantViews(rootView);  // update mode pass\n    safeToRunHooks = true;\n  } finally {\n    leaveView(oldView, safeToRunHooks);\n    if (rendererFactory.end) rendererFactory.end();\n  }\n\n  return component;\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param renderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nexport function createRootComponentView(\n    rNode: RElement | null, def: ComponentDef<any>, rootView: LView,\n    rendererFactory: RendererFactory3, renderer: Renderer3, sanitizer?: Sanitizer | null): LView {\n  resetComponentState();\n  const tView = rootView[TVIEW];\n  ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);\n  rootView[0 + HEADER_OFFSET] = rNode;\n  const tNode: TElementNode = getOrCreateTNode(tView, null, 0, TNodeType.Element, null, null);\n  const componentView = createLView(\n      rootView, getOrCreateTView(def), null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n      rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);\n\n  if (tView.firstTemplatePass) {\n    diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n    tNode.flags = TNodeFlags.isComponent;\n    initNodeFlags(tNode, rootView.length, 1);\n    queueComponentIndexForCheck(tNode);\n  }\n\n  // Store component view at node index, with node as the HOST\n  return rootView[HEADER_OFFSET] = componentView;\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nexport function createRootComponent<T>(\n    componentView: LView, componentDef: ComponentDef<T>, rootView: LView, rootContext: RootContext,\n    hostFeatures: HostFeature[] | null): any {\n  const tView = rootView[TVIEW];\n  // Create directive instance with factory() and store at next index in viewData\n  const component = instantiateRootComponent(tView, rootView, componentDef);\n\n  rootContext.components.push(component);\n  componentView[CONTEXT] = component;\n\n  hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n\n  // We want to generate an empty QueryList for root content queries for backwards\n  // compatibility with ViewEngine.\n  if (componentDef.contentQueries) {\n    componentDef.contentQueries(RenderFlags.Create, component, rootView.length - 1);\n  }\n\n  const rootTNode = getPreviousOrParentTNode();\n  if (tView.firstTemplatePass && componentDef.hostBindings) {\n    const elementIndex = rootTNode.index - HEADER_OFFSET;\n    setActiveHostElement(elementIndex);\n\n    const expando = tView.expandoInstructions !;\n    invokeHostBindingsInCreationMode(\n        componentDef, expando, component, rootTNode, tView.firstTemplatePass);\n\n    setActiveHostElement(null);\n  }\n\n  return component;\n}\n\n\nexport function createRootContext(\n    scheduler?: (workFn: () => void) => void, playerHandler?: PlayerHandler|null): RootContext {\n  return {\n    components: [],\n    scheduler: scheduler || defaultScheduler,\n    clean: CLEAN_PROMISE,\n    playerHandler: playerHandler || null,\n    flags: RootContextFlags.Empty\n  };\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\nexport function LifecycleHooksFeature(component: any, def: ComponentDef<any>): void {\n  const rootTView = readPatchedLView(component) ![TVIEW];\n  const dirIndex = rootTView.data.length - 1;\n\n  registerPreOrderHooks(dirIndex, def, rootTView, -1, -1, -1);\n  // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on\n  // LNode).\n  registerPostOrderHooks(\n      rootTView, { directiveStart: dirIndex, directiveEnd: dirIndex + 1 } as TNode);\n}\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nexport function whenRendered(component: any): Promise<null> {\n  return getRootContext(component).clean;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport class SimpleChange {\n  constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}\n  /**\n   * Check whether the new value is the first value assigned.\n   */\n  isFirstChange(): boolean { return this.firstChange; }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport interface SimpleChanges { [propName: string]: SimpleChange; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {EMPTY_OBJ} from '../empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\nconst PRIVATE_PREFIX = '__ngOnChanges_';\n\ntype OnChangesExpando = OnChanges & {\n  __ngOnChanges_: SimpleChanges|null|undefined;\n  // tslint:disable-next-line:no-any Can hold any value\n  [key: string]: any;\n};\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n *   ...\n *   inputs: {name: 'publicName'},\n *   features: [NgOnChangesFeature()]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ÉµÉµNgOnChangesFeature<T>(): DirectiveDefFeature {\n  // This option ensures that the ngOnChanges lifecycle hook will be inherited\n  // from superclasses (in InheritDefinitionFeature).\n  (NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;\n  return NgOnChangesFeatureImpl;\n}\n\nfunction NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>): void {\n  if (definition.type.prototype.ngOnChanges) {\n    definition.setInput = ngOnChangesSetInput;\n    definition.onChanges = wrapOnChanges();\n  }\n}\n\nfunction wrapOnChanges() {\n  return function wrapOnChangesHook_inPreviousChangesStorage(this: OnChanges) {\n    const simpleChangesStore = getSimpleChangesStore(this);\n    const current = simpleChangesStore && simpleChangesStore.current;\n\n    if (current) {\n      const previous = simpleChangesStore !.previous;\n      if (previous === EMPTY_OBJ) {\n        simpleChangesStore !.previous = current;\n      } else {\n        // New changes are copied to the previous store, so that we don't lose history for inputs\n        // which were not changed this time\n        for (let key in current) {\n          previous[key] = current[key];\n        }\n      }\n      simpleChangesStore !.current = null;\n      this.ngOnChanges(current);\n    }\n  };\n}\n\nfunction ngOnChangesSetInput<T>(\n    this: DirectiveDef<T>, instance: T, value: any, publicName: string, privateName: string): void {\n  const simpleChangesStore = getSimpleChangesStore(instance) ||\n      setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n  const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n  const previous = simpleChangesStore.previous;\n\n  const declaredName = (this.declaredInputs as{[key: string]: string})[publicName];\n  const previousChange = previous[declaredName];\n  current[declaredName] = new SimpleChange(\n      previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n\n  (instance as any)[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null|NgSimpleChangesStore {\n  return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n  return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\ninterface NgSimpleChangesStore {\n  previous: SimpleChanges;\n  current: SimpleChanges|null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {fillProperties} from '../../util/property';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {adjustActiveDirectiveSuperClassDepthPosition} from '../state';\n\nimport {ÉµÉµNgOnChangesFeature} from './ng_onchanges_feature';\n\nfunction getSuperType(type: Type<any>): Type<any>&\n    {ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {\n  return Object.getPrototypeOf(type.prototype).constructor;\n}\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ÉµÉµInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {\n  let superType = getSuperType(definition.type);\n\n  while (superType) {\n    let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n    if (isComponentDef(definition)) {\n      // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n      superDef = superType.ngComponentDef || superType.ngDirectiveDef;\n    } else {\n      if (superType.ngComponentDef) {\n        throw new Error('Directives cannot inherit Components');\n      }\n      // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n      superDef = superType.ngDirectiveDef;\n    }\n\n    const baseDef = (superType as any).ngBaseDef;\n\n    // Some fields in the definition may be empty, if there were no values to put in them that\n    // would've justified object creation. Unwrap them if necessary.\n    if (baseDef || superDef) {\n      const writeableDef = definition as any;\n      writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n      writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n      writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n    }\n\n    if (baseDef) {\n      const baseViewQuery = baseDef.viewQuery;\n      const baseContentQueries = baseDef.contentQueries;\n      const baseHostBindings = baseDef.hostBindings;\n      baseHostBindings && inheritHostBindings(definition, baseHostBindings);\n      baseViewQuery && inheritViewQuery(definition, baseViewQuery);\n      baseContentQueries && inheritContentQueries(definition, baseContentQueries);\n      fillProperties(definition.inputs, baseDef.inputs);\n      fillProperties(definition.declaredInputs, baseDef.declaredInputs);\n      fillProperties(definition.outputs, baseDef.outputs);\n    }\n\n    if (superDef) {\n      // Merge hostBindings\n      const superHostBindings = superDef.hostBindings;\n      superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n      // Merge queries\n      const superViewQuery = superDef.viewQuery;\n      const superContentQueries = superDef.contentQueries;\n      superViewQuery && inheritViewQuery(definition, superViewQuery);\n      superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n      // Merge inputs and outputs\n      fillProperties(definition.inputs, superDef.inputs);\n      fillProperties(definition.declaredInputs, superDef.declaredInputs);\n      fillProperties(definition.outputs, superDef.outputs);\n\n      // Inherit hooks\n      // Assume super class inheritance feature has already run.\n      definition.afterContentChecked =\n          definition.afterContentChecked || superDef.afterContentChecked;\n      definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n      definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n      definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n      definition.doCheck = definition.doCheck || superDef.doCheck;\n      definition.onDestroy = definition.onDestroy || superDef.onDestroy;\n      definition.onInit = definition.onInit || superDef.onInit;\n\n      // Run parent features\n      const features = superDef.features;\n      if (features) {\n        for (const feature of features) {\n          if (feature && feature.ngInherit) {\n            (feature as DirectiveDefFeature)(definition);\n          }\n        }\n      }\n    } else {\n      // Even if we don't have a definition, check the type for the hooks and use those if need be\n      const superPrototype = superType.prototype;\n      if (superPrototype) {\n        definition.afterContentChecked =\n            definition.afterContentChecked || superPrototype.ngAfterContentChecked;\n        definition.afterContentInit =\n            definition.afterContentInit || superPrototype.ngAfterContentInit;\n        definition.afterViewChecked =\n            definition.afterViewChecked || superPrototype.ngAfterViewChecked;\n        definition.afterViewInit = definition.afterViewInit || superPrototype.ngAfterViewInit;\n        definition.doCheck = definition.doCheck || superPrototype.ngDoCheck;\n        definition.onDestroy = definition.onDestroy || superPrototype.ngOnDestroy;\n        definition.onInit = definition.onInit || superPrototype.ngOnInit;\n\n        if (superPrototype.ngOnChanges) {\n          ÉµÉµNgOnChangesFeature()(definition);\n        }\n      }\n    }\n\n    superType = Object.getPrototypeOf(superType);\n  }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n  if (value === EMPTY_OBJ) {\n    return {};\n  } else if (value === EMPTY_ARRAY) {\n    return [];\n  } else {\n    return value;\n  }\n}\n\nfunction inheritViewQuery(\n    definition: DirectiveDef<any>| ComponentDef<any>, superViewQuery: ViewQueriesFunction<any>) {\n  const prevViewQuery = definition.viewQuery;\n\n  if (prevViewQuery) {\n    definition.viewQuery = (rf, ctx) => {\n      superViewQuery(rf, ctx);\n      prevViewQuery(rf, ctx);\n    };\n  } else {\n    definition.viewQuery = superViewQuery;\n  }\n}\n\nfunction inheritContentQueries(\n    definition: DirectiveDef<any>| ComponentDef<any>,\n    superContentQueries: ContentQueriesFunction<any>) {\n  const prevContentQueries = definition.contentQueries;\n\n  if (prevContentQueries) {\n    definition.contentQueries = (rf, ctx, directiveIndex) => {\n      superContentQueries(rf, ctx, directiveIndex);\n      prevContentQueries(rf, ctx, directiveIndex);\n    };\n  } else {\n    definition.contentQueries = superContentQueries;\n  }\n}\n\nfunction inheritHostBindings(\n    definition: DirectiveDef<any>| ComponentDef<any>,\n    superHostBindings: HostBindingsFunction<any>) {\n  const prevHostBindings = definition.hostBindings;\n  // If the subclass does not have a host bindings function, we set the subclass host binding\n  // function to be the superclass's (in this feature). We should check if they're the same here\n  // to ensure we don't inherit it twice.\n  if (superHostBindings !== prevHostBindings) {\n    if (prevHostBindings) {\n      // because inheritance is unknown during compile time, the runtime code\n      // needs to be informed of the super-class depth so that instruction code\n      // can distinguish one host bindings function from another. The reason why\n      // relying on the directive uniqueId exclusively is not enough is because the\n      // uniqueId value and the directive instance stay the same between hostBindings\n      // calls throughout the directive inheritance chain. This means that without\n      // a super-class depth value, there is no way to know whether a parent or\n      // sub-class host bindings function is currently being executed.\n      definition.hostBindings = (rf: RenderFlags, ctx: any, elementIndex: number) => {\n        // The reason why we increment first and then decrement is so that parent\n        // hostBindings calls have a higher id value compared to sub-class hostBindings\n        // calls (this way the leaf directive is always at a super-class depth of 0).\n        adjustActiveDirectiveSuperClassDepthPosition(1);\n        try {\n          superHostBindings(rf, ctx, elementIndex);\n        } finally {\n          adjustActiveDirectiveSuperClassDepthPosition(-1);\n        }\n        prevHostBindings(rf, ctx, elementIndex);\n      };\n    } else {\n      definition.hostBindings = superHostBindings;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ÉµÉµdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getLView, getPreviousOrParentTNode} from './state';\n\n\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n    def: DirectiveDef<T>, providers: Provider[], viewProviders: Provider[]): void {\n  const lView = getLView();\n  const tView: TView = lView[TVIEW];\n  if (tView.firstTemplatePass) {\n    const isComponent = isComponentDef(def);\n\n    // The list of view providers is processed first, and the flags are updated\n    resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n    // Then, the list of providers is processed, and the flags are updated\n    resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n  }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n    provider: Provider, tInjectables: TData, lInjectablesBlueprint: NodeInjectorFactory[],\n    isComponent: boolean, isViewProvider: boolean): void {\n  provider = resolveForwardRef(provider);\n  if (Array.isArray(provider)) {\n    // Recursively call `resolveProvider`\n    // Recursion is OK in this case because this code will not be in hot-path once we implement\n    // cloning of the initial state.\n    for (let i = 0; i < provider.length; i++) {\n      resolveProvider(\n          provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n    }\n  } else {\n    const lView = getLView();\n    const tView = lView[TVIEW];\n    let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n    let providerFactory: () => any = providerToFactory(provider);\n\n    const tNode = getPreviousOrParentTNode();\n    const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n    const endIndex = tNode.directiveStart;\n    const cptViewProvidersCount =\n        tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n    if (isClassProvider(provider) || isTypeProvider(provider)) {\n      const prototype = ((provider as ClassProvider).useClass || provider).prototype;\n      const ngOnDestroy = prototype.ngOnDestroy;\n\n      if (ngOnDestroy) {\n        (tView.destroyHooks || (tView.destroyHooks = [])).push(tInjectables.length, ngOnDestroy);\n      }\n    }\n\n    if (isTypeProvider(provider) || !provider.multi) {\n      // Single provider case: the factory is created and pushed immediately\n      const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ÉµÉµdirectiveInject);\n      const existingFactoryIndex = indexOf(\n          token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n          endIndex);\n      if (existingFactoryIndex == -1) {\n        diPublicInInjector(\n            getOrCreateNodeInjectorForNode(\n                tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n            tView, token);\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n        if (isViewProvider) {\n          tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n        }\n        lInjectablesBlueprint.push(factory);\n        lView.push(factory);\n      } else {\n        lInjectablesBlueprint[existingFactoryIndex] = factory;\n        lView[existingFactoryIndex] = factory;\n      }\n    } else {\n      // Multi provider case:\n      // We create a multi factory which is going to aggregate all the values.\n      // Since the output of such a factory depends on content or view injection,\n      // we create two of them, which are linked together.\n      //\n      // The first one (for view providers) is always in the first block of the injectables array,\n      // and the second one (for providers) is always in the second block.\n      // This is important because view providers have higher priority. When a multi token\n      // is being looked up, the view providers should be found first.\n      // Note that it is not possible to have a multi factory in the third block (directive block).\n      //\n      // The algorithm to process multi providers is as follows:\n      // 1) If the multi provider comes from the `viewProviders` of the component:\n      //   a) If the special view providers factory doesn't exist, it is created and pushed.\n      //   b) Else, the multi provider is added to the existing multi factory.\n      // 2) If the multi provider comes from the `providers` of the component or of another\n      // directive:\n      //   a) If the multi factory doesn't exist, it is created and provider pushed into it.\n      //      It is also linked to the multi factory for view providers, if it exists.\n      //   b) Else, the multi provider is added to the existing multi factory.\n\n      const existingProvidersFactoryIndex =\n          indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n      const existingViewProvidersFactoryIndex =\n          indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n      const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n          lInjectablesBlueprint[existingProvidersFactoryIndex];\n      const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n          lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n      if (isViewProvider && !doesViewProvidersFactoryExist ||\n          !isViewProvider && !doesProvidersFactoryExist) {\n        // Cases 1.a and 2.a\n        diPublicInInjector(\n            getOrCreateNodeInjectorForNode(\n                tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n            tView, token);\n        const factory = multiFactory(\n            isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n            lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n        if (!isViewProvider && doesViewProvidersFactoryExist) {\n          lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n        }\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n        if (isViewProvider) {\n          tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n        }\n        lInjectablesBlueprint.push(factory);\n        lView.push(factory);\n      } else {\n        // Cases 1.b and 2.b\n        multiFactoryAdd(\n            lInjectablesBlueprint ![isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex],\n            providerFactory, !isViewProvider && isComponent);\n      }\n      if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n        lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders !++;\n      }\n    }\n  }\n}\n\n/**\n * Add a factory in a multi factory.\n */\nfunction multiFactoryAdd(\n    multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): void {\n  multiFactory.multi !.push(factory);\n  if (isComponentProvider) {\n    multiFactory.componentProviders !++;\n  }\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n  for (let i = begin; i < end; i++) {\n    if (arr[i] === item) return i;\n  }\n  return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n    this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n    tNode: TElementNode): any[] {\n  return multiResolve(this.multi !, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n    this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n    tNode: TElementNode): any[] {\n  const factories = this.multi !;\n  let result: any[];\n  if (this.providerFactory) {\n    const componentCount = this.providerFactory.componentProviders !;\n    const multiProviders = getNodeInjectable(tData, lData, this.providerFactory !.index !, tNode);\n    // Copy the section of the array which contains `multi` `providers` from the component\n    result = multiProviders.slice(0, componentCount);\n    // Insert the `viewProvider` instances.\n    multiResolve(factories, result);\n    // Copy the section of the array which contains `multi` `providers` from other directives\n    for (let i = componentCount; i < multiProviders.length; i++) {\n      result.push(multiProviders[i]);\n    }\n  } else {\n    result = [];\n    // Insert the `viewProvider` instances.\n    multiResolve(factories, result);\n  }\n  return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n  for (let i = 0; i < factories.length; i++) {\n    const factory = factories[i] !as() => null;\n    result.push(factory());\n  }\n  return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n    factoryFn: (\n        this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView, tNode: TElementNode) =>\n        any,\n    index: number, isViewProvider: boolean, isComponent: boolean,\n    f: () => any): NodeInjectorFactory {\n  const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ÉµÉµdirectiveInject);\n  factory.multi = [];\n  factory.index = index;\n  factory.componentProviders = 0;\n  multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n  return factory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n *   constructor(private greeter: GreeterDE) {}\n *\n *   static ngComponentDef = defineComponent({\n *     type: ComponentWithProviders,\n *     selectors: [['component-with-providers']],\n *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n *    consts: 1,\n *    vars: 1,\n *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n *      if (fs & RenderFlags.Create) {\n *        ÉµÉµtext(0);\n *      }\n *      if (fs & RenderFlags.Update) {\n *        ÉµÉµselect(0);\n *        ÉµÉµtextBinding(ctx.greeter.greet());\n *      }\n *    },\n *    features: [ProvidersFeature([GreeterDE])]\n *  });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ÉµÉµProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n  return (definition: DirectiveDef<T>) => {\n    definition.providersResolver =\n        (def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {\n          return providersResolver(\n              def,                                                             //\n              processProvidersFn ? processProvidersFn(providers) : providers,  //\n              viewProviders);\n        };\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n  /**\n   * The host or anchor [element](guide/glossary#element) for this component instance.\n   */\n  abstract get location(): ElementRef;\n\n  /**\n   * The [dependency injector](guide/glossary#injector) for this component instance.\n   */\n  abstract get injector(): Injector;\n\n  /**\n   * This component instance.\n   */\n  abstract get instance(): C;\n\n  /**\n   * The [host view](guide/glossary#view-tree) defined by the template\n   * for this component instance.\n   */\n  abstract get hostView(): ViewRef;\n\n  /**\n   * The change detector for this component instance.\n   */\n  abstract get changeDetectorRef(): ChangeDetectorRef;\n\n  /**\n   * The type of this component (as created by a `ComponentFactory` class).\n   */\n  abstract get componentType(): Type<any>;\n\n  /**\n   * Destroys the component instance and all of the data structures associated with it.\n   */\n  abstract destroy(): void;\n\n  /**\n   * A lifecycle hook that provides additional developer-defined cleanup\n   * functionality for the component.\n   * @param callback A handler function that cleans up developer-defined data\n   * associated with this component. Called when the `destroy()` method is invoked.\n   */\n  abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nexport abstract class ComponentFactory<C> {\n  /**\n   * The component's HTML selector.\n   */\n  abstract get selector(): string;\n  /**\n   * The type of component the factory will create.\n   */\n  abstract get componentType(): Type<any>;\n  /**\n   * Selector for all <ng-content> elements in the component.\n   */\n  abstract get ngContentSelectors(): string[];\n  /**\n   * The inputs of the component.\n   */\n  abstract get inputs(): {propName: string, templateName: string}[];\n  /**\n   * The outputs of the component.\n   */\n  abstract get outputs(): {propName: string, templateName: string}[];\n  /**\n   * Creates a new component.\n   */\n  abstract create(\n      injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n      ngModule?: NgModuleRef<any>): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {NgModuleRef} from './ng_module_factory';\n\nexport function noComponentFactoryError(component: Function) {\n  const error = Error(\n      `No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n  (error as any)[ERROR_COMPONENT] = component;\n  return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n  return (error as any)[ERROR_COMPONENT];\n}\n\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n  resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n    throw noComponentFactoryError(component);\n  }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\nexport abstract class ComponentFactoryResolver {\n  static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver();\n  /**\n   * Retrieves the factory object that creates a component of the given type.\n   * @param component The component type.\n   */\n  abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n\nexport class CodegenComponentFactoryResolver implements ComponentFactoryResolver {\n  private _factories = new Map<any, ComponentFactory<any>>();\n\n  constructor(\n      factories: ComponentFactory<any>[], private _parent: ComponentFactoryResolver,\n      private _ngModule: NgModuleRef<any>) {\n    for (let i = 0; i < factories.length; i++) {\n      const factory = factories[i];\n      this._factories.set(factory.componentType, factory);\n    }\n  }\n\n  resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n    let factory = this._factories.get(component);\n    if (!factory && this._parent) {\n      factory = this._parent.resolveComponentFactory(component);\n    }\n    if (!factory) {\n      throw noComponentFactoryError(component);\n    }\n    return new ComponentFactoryBoundToModule(factory, this._ngModule);\n  }\n}\n\nexport class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {\n  readonly selector: string;\n  readonly componentType: Type<any>;\n  readonly ngContentSelectors: string[];\n  readonly inputs: {propName: string, templateName: string}[];\n  readonly outputs: {propName: string, templateName: string}[];\n\n  constructor(private factory: ComponentFactory<C>, private ngModule: NgModuleRef<any>) {\n    super();\n    this.selector = factory.selector;\n    this.componentType = factory.componentType;\n    this.ngContentSelectors = factory.ngContentSelectors;\n    this.inputs = factory.inputs;\n    this.outputs = factory.outputs;\n  }\n\n  create(\n      injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n      ngModule?: NgModuleRef<any>): ComponentRef<C> {\n    return this.factory.create(\n        injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function noop(...args: any[]): any {\n  // Do nothing.\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectElementRef as render3InjectElementRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T extends any = any> {\n  /**\n   * The underlying native element or `null` if direct access to native elements is not supported\n   * (e.g. when the application runs in a web worker).\n   *\n   * <div class=\"callout is-critical\">\n   *   <header>Use with caution</header>\n   *   <p>\n   *    Use this API as the last resort when direct access to DOM is needed. Use templating and\n   *    data-binding provided by Angular instead. Alternatively you can take a look at {@link\n   * Renderer2}\n   *    which provides API that can safely be used even when direct access to native elements is not\n   *    supported.\n   *   </p>\n   *   <p>\n   *    Relying on direct DOM access creates tight coupling between your application and rendering\n   *    layers which will make it impossible to separate the two and deploy your application into a\n   *    web worker.\n   *   </p>\n   * </div>\n   *\n   */\n  public nativeElement: T;\n\n  constructor(nativeElement: T) { this.nativeElement = nativeElement; }\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);\n}\n\nexport const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = render3InjectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY: typeof render3InjectElementRef =\n    SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {injectRenderer2 as render3InjectRenderer2} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n\n\n/**\n * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n * @publicApi\n */\nexport class RenderComponentType {\n  constructor(\n      public id: string, public templateUrl: string, public slotCount: number,\n      public encapsulation: ViewEncapsulation, public styles: Array<string|any[]>,\n      public animations: any) {}\n}\n\n/**\n * @deprecated Debug info is handled internally in the view engine now.\n */\nexport abstract class RenderDebugInfo {\n  abstract get injector(): Injector;\n  abstract get component(): any;\n  abstract get providerTokens(): any[];\n  abstract get references(): {[key: string]: any};\n  abstract get context(): any;\n  abstract get source(): string;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nexport interface DirectRenderer {\n  remove(node: any): void;\n  appendChild(node: any, parent: any): void;\n  insertBefore(node: any, refNode: any): void;\n  nextSibling(node: any): any;\n  parentElement(node: any): any;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n * @publicApi\n */\nexport abstract class Renderer {\n  abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any;\n\n  abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any;\n\n  abstract createViewRoot(hostElement: any): any;\n\n  abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any;\n\n  abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any;\n\n  abstract projectNodes(parentElement: any, nodes: any[]): void;\n\n  abstract attachViewAfter(node: any, viewRootNodes: any[]): void;\n\n  abstract detachView(viewRootNodes: any[]): void;\n\n  abstract destroyView(hostElement: any, viewAllNodes: any[]): void;\n\n  abstract listen(renderElement: any, name: string, callback: Function): Function;\n\n  abstract listenGlobal(target: string, name: string, callback: Function): Function;\n\n  abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;\n\n  abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue?: string):\n      void;\n\n  /**\n   * Used only in debug mode to serialize property changes to dom nodes as attributes.\n   */\n  abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string):\n      void;\n\n  abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;\n\n  abstract setElementStyle(renderElement: any, styleName: string, styleValue?: string): void;\n\n  abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;\n\n  abstract setText(renderNode: any, text: string): void;\n\n  abstract animate(\n      element: any, startingStyles: any, keyframes: any[], duration: number, delay: number,\n      easing: string, previousPlayers?: any[]): any;\n}\n\nexport const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2Interceptor');\n\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n * @publicApi\n */\nexport abstract class RootRenderer {\n  abstract renderComponent(componentType: RenderComponentType): Renderer;\n}\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n *  @publicApi\n */\nexport interface RendererType2 {\n  /**\n   * A unique identifying string for the new renderer, used when creating\n   * unique styles for encapsulation.\n   */\n  id: string;\n  /**\n   * The view encapsulation type, which determines how styles are applied to\n   * DOM elements. One of\n   * - `Emulated` (default): Emulate native scoping of styles.\n   * - `Native`: Use the native encapsulation mechanism of the renderer.\n   * - `ShadowDom`: Use modern [Shadow\n   * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n   * create a ShadowRoot for component's host element.\n   * - `None`: Do not provide any template or style encapsulation.\n   */\n  encapsulation: ViewEncapsulation;\n  /**\n   * Defines CSS styles to be stored on a renderer instance.\n   */\n  styles: (string|any[])[];\n  /**\n   * Defines arbitrary developer-defined data to be stored on a renderer instance.\n   * This is useful for renderers that delegate to other renderers.\n   */\n  data: {[kind: string]: any};\n}\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n  /**\n   * Creates and initializes a custom renderer for a host DOM element.\n   * @param hostElement The element to render.\n   * @param type The base class to implement.\n   * @returns The new custom renderer instance.\n   */\n  abstract createRenderer(hostElement: any, type: RendererType2|null): Renderer2;\n  /**\n   * A callback invoked when rendering has begun.\n   */\n  abstract begin?(): void;\n  /**\n   * A callback invoked when rendering has completed.\n   */\n  abstract end?(): void;\n  /**\n   * Use with animations test-only mode. Notifies the test when rendering has completed.\n   * @returns The asynchronous result of the developer-defined function.\n   */\n  abstract whenRenderingDone?(): Promise<any>;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n  /**\n   * Marks a style as important.\n   */\n  Important = 1 << 0,\n  /**\n   * Marks a style as using dash case naming (this-is-dash-case).\n   */\n  DashCase = 1 << 1\n}\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n  /**\n   * Use to store arbitrary developer-defined data on a renderer instance,\n   * as an object containing key-value pairs.\n   * This is useful for renderers that delegate to other renderers.\n   */\n  abstract get data(): {[key: string]: any};\n\n  /**\n   * Implement this callback to destroy the renderer or the host element.\n   */\n  abstract destroy(): void;\n  /**\n   * Implement this callback to create an instance of the host element.\n   * @param name An identifying name for the new element, unique within the namespace.\n   * @param namespace The namespace for the new element.\n   * @returns The new element.\n   */\n  abstract createElement(name: string, namespace?: string|null): any;\n  /**\n   * Implement this callback to add a comment to the DOM of the host element.\n   * @param value The comment text.\n   * @returns The modified element.\n   */\n  abstract createComment(value: string): any;\n\n  /**\n   * Implement this callback to add text to the DOM of the host element.\n   * @param value The text string.\n   * @returns The modified element.\n   */\n  abstract createText(value: string): any;\n  /**\n   * If null or undefined, the view engine won't call it.\n   * This is used as a performance optimization for production mode.\n   */\n  // TODO(issue/24571): remove '!'.\n  destroyNode !: ((node: any) => void) | null;\n  /**\n   * Appends a child to a given parent node in the host element DOM.\n   * @param parent The parent node.\n   * @param newChild The new child node.\n   */\n  abstract appendChild(parent: any, newChild: any): void;\n  /**\n   * Implement this callback to insert a child node at a given position in a parent node\n   * in the host element DOM.\n   * @param parent The parent node.\n   * @param newChild The new child nodes.\n   * @param refChild The existing child node that should precede the new node.\n   */\n  abstract insertBefore(parent: any, newChild: any, refChild: any): void;\n  /**\n   * Implement this callback to remove a child node from the host element's DOM.\n   * @param parent The parent node.\n   * @param oldChild The child node to remove.\n   * @param isHostElement Optionally signal to the renderer whether this element is a host element\n   * or not\n   */\n  abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n  /**\n   * Implement this callback to prepare an element to be bootstrapped\n   * as a root element, and return the element instance.\n   * @param selectorOrNode The DOM element.\n   * @param preserveContent Whether the contents of the root element\n   * should be preserved, or cleared upon bootstrap (default behavior).\n   * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n   * content projection via `<slot>` elements.\n   * @returns The root element.\n   */\n  abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;\n  /**\n   * Implement this callback to get the parent of a given node\n   * in the host element's DOM.\n   * @param node The child node to query.\n   * @returns The parent node, or null if there is no parent.\n   * For WebWorkers, always returns true.\n   * This is because the check is synchronous,\n   * and the caller can't rely on checking for null.\n   */\n  abstract parentNode(node: any): any;\n  /**\n   * Implement this callback to get the next sibling node of a given node\n   * in the host element's DOM.\n   * @returns The sibling node, or null if there is no sibling.\n   * For WebWorkers, always returns a value.\n   * This is because the check is synchronous,\n   * and the caller can't rely on checking for null.\n   */\n  abstract nextSibling(node: any): any;\n  /**\n   * Implement this callback to set an attribute value for an element in the DOM.\n   * @param el The element.\n   * @param name The attribute name.\n   * @param value The new value.\n   * @param namespace The namespace.\n   */\n  abstract setAttribute(el: any, name: string, value: string, namespace?: string|null): void;\n\n  /**\n   * Implement this callback to remove an attribute from an element in the DOM.\n   * @param el The element.\n   * @param name The attribute name.\n   * @param namespace The namespace.\n   */\n  abstract removeAttribute(el: any, name: string, namespace?: string|null): void;\n  /**\n   * Implement this callback to add a class to an element in the DOM.\n   * @param el The element.\n   * @param name The class name.\n   */\n  abstract addClass(el: any, name: string): void;\n\n  /**\n   * Implement this callback to remove a class from an element in the DOM.\n   * @param el The element.\n   * @param name The class name.\n   */\n  abstract removeClass(el: any, name: string): void;\n\n  /**\n   * Implement this callback to set a CSS style for an element in the DOM.\n   * @param el The element.\n   * @param style The name of the style.\n   * @param value The new value.\n   * @param flags Flags for style variations. No flags are set by default.\n   */\n  abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n  /**\n   * Implement this callback to remove the value from a CSS style for an element in the DOM.\n   * @param el The element.\n   * @param style The name of the style.\n   * @param flags Flags for style variations to remove, if set. ???\n   */\n  abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n  /**\n   * Implement this callback to set the value of a property of an element in the DOM.\n   * @param el The element.\n   * @param name The property name.\n   * @param value The new value.\n   */\n  abstract setProperty(el: any, name: string, value: any): void;\n\n  /**\n   * Implement this callback to set the value of a node in the host element.\n   * @param node The node.\n   * @param value The new value.\n   */\n  abstract setValue(node: any, value: string): void;\n\n  /**\n   * Implement this callback to start an event listener.\n   * @param target The context in which to listen for events. Can be\n   * the entire window or document, the body of the document, or a specific\n   * DOM element.\n   * @param eventName The event to listen for.\n   * @param callback A handler function to invoke when the event occurs.\n   * @returns An \"unlisten\" function for disposing of this handler.\n   */\n  abstract listen(\n      target: 'window'|'document'|'body'|any, eventName: string,\n      callback: (event: any) => boolean | void): () => void;\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();\n}\n\n\nexport const SWITCH_RENDERER2_FACTORY__POST_R3__ = render3InjectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY: typeof render3InjectRenderer2 = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n  public readonly major: string;\n  public readonly minor: string;\n  public readonly patch: string;\n\n  constructor(public full: string) {\n    this.major = full.split('.')[0];\n    this.minor = full.split('.')[1];\n    this.patch = full.split('.').slice(2).join('.');\n  }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isListLikeIterable, iterateListLike} from '../change_detection_util';\n\nimport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, NgIterable, TrackByFunction} from './iterable_differs';\n\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n  constructor() {}\n  supports(obj: Object|null|undefined): boolean { return isListLikeIterable(obj); }\n\n  create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n    return new DefaultIterableDiffer<V>(trackByFn);\n  }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n  public readonly length: number = 0;\n  // TODO(issue/24571): remove '!'.\n  public readonly collection !: V[] | Iterable<V>| null;\n  // Keeps track of the used records at any point in time (during & across `_check()` calls)\n  private _linkedRecords: _DuplicateMap<V>|null = null;\n  // Keeps track of the removed records at any point in time during `_check()` calls.\n  private _unlinkedRecords: _DuplicateMap<V>|null = null;\n  private _previousItHead: IterableChangeRecord_<V>|null = null;\n  private _itHead: IterableChangeRecord_<V>|null = null;\n  private _itTail: IterableChangeRecord_<V>|null = null;\n  private _additionsHead: IterableChangeRecord_<V>|null = null;\n  private _additionsTail: IterableChangeRecord_<V>|null = null;\n  private _movesHead: IterableChangeRecord_<V>|null = null;\n  private _movesTail: IterableChangeRecord_<V>|null = null;\n  private _removalsHead: IterableChangeRecord_<V>|null = null;\n  private _removalsTail: IterableChangeRecord_<V>|null = null;\n  // Keeps track of records where custom track by is the same, but item identity has changed\n  private _identityChangesHead: IterableChangeRecord_<V>|null = null;\n  private _identityChangesTail: IterableChangeRecord_<V>|null = null;\n  private _trackByFn: TrackByFunction<V>;\n\n  constructor(trackByFn?: TrackByFunction<V>) { this._trackByFn = trackByFn || trackByIdentity; }\n\n  forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._itHead; record !== null; record = record._next) {\n      fn(record);\n    }\n  }\n\n  forEachOperation(\n      fn: (item: IterableChangeRecord<V>, previousIndex: number|null, currentIndex: number|null) =>\n          void) {\n    let nextIt = this._itHead;\n    let nextRemove = this._removalsHead;\n    let addRemoveOffset = 0;\n    let moveOffsets: number[]|null = null;\n    while (nextIt || nextRemove) {\n      // Figure out which is the next record to process\n      // Order: remove, add, move\n      const record: IterableChangeRecord<V> = !nextRemove ||\n              nextIt &&\n                  nextIt.currentIndex ! <\n                      getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n          nextIt ! :\n          nextRemove;\n      const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n      const currentIndex = record.currentIndex;\n\n      // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n      if (record === nextRemove) {\n        addRemoveOffset--;\n        nextRemove = nextRemove._nextRemoved;\n      } else {\n        nextIt = nextIt !._next;\n        if (record.previousIndex == null) {\n          addRemoveOffset++;\n        } else {\n          // INVARIANT:  currentIndex < previousIndex\n          if (!moveOffsets) moveOffsets = [];\n          const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n          const localCurrentIndex = currentIndex ! - addRemoveOffset;\n          if (localMovePreviousIndex != localCurrentIndex) {\n            for (let i = 0; i < localMovePreviousIndex; i++) {\n              const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n              const index = offset + i;\n              if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                moveOffsets[i] = offset + 1;\n              }\n            }\n            const previousIndex = record.previousIndex;\n            moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n          }\n        }\n      }\n\n      if (adjPreviousIndex !== currentIndex) {\n        fn(record, adjPreviousIndex, currentIndex);\n      }\n    }\n  }\n\n  forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n      fn(record);\n    }\n  }\n\n  forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n      fn(record);\n    }\n  }\n\n  forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._movesHead; record !== null; record = record._nextMoved) {\n      fn(record);\n    }\n  }\n\n  forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n      fn(record);\n    }\n  }\n\n  forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n      fn(record);\n    }\n  }\n\n  diff(collection: NgIterable<V>): DefaultIterableDiffer<V>|null {\n    if (collection == null) collection = [];\n    if (!isListLikeIterable(collection)) {\n      throw new Error(\n          `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n    }\n\n    if (this.check(collection)) {\n      return this;\n    } else {\n      return null;\n    }\n  }\n\n  onDestroy() {}\n\n  check(collection: NgIterable<V>): boolean {\n    this._reset();\n\n    let record: IterableChangeRecord_<V>|null = this._itHead;\n    let mayBeDirty: boolean = false;\n    let index: number;\n    let item: V;\n    let itemTrackBy: any;\n    if (Array.isArray(collection)) {\n      (this as{length: number}).length = collection.length;\n\n      for (let index = 0; index < this.length; index++) {\n        item = collection[index];\n        itemTrackBy = this._trackByFn(index, item);\n        if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n          record = this._mismatch(record, item, itemTrackBy, index);\n          mayBeDirty = true;\n        } else {\n          if (mayBeDirty) {\n            // TODO(misko): can we limit this to duplicates only?\n            record = this._verifyReinsertion(record, item, itemTrackBy, index);\n          }\n          if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n        }\n\n        record = record._next;\n      }\n    } else {\n      index = 0;\n      iterateListLike(collection, (item: V) => {\n        itemTrackBy = this._trackByFn(index, item);\n        if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n          record = this._mismatch(record, item, itemTrackBy, index);\n          mayBeDirty = true;\n        } else {\n          if (mayBeDirty) {\n            // TODO(misko): can we limit this to duplicates only?\n            record = this._verifyReinsertion(record, item, itemTrackBy, index);\n          }\n          if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n        }\n        record = record._next;\n        index++;\n      });\n      (this as{length: number}).length = index;\n    }\n\n    this._truncate(record);\n    (this as{collection: V[] | Iterable<V>}).collection = collection;\n    return this.isDirty;\n  }\n\n  /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n   * changes.\n   */\n  get isDirty(): boolean {\n    return this._additionsHead !== null || this._movesHead !== null ||\n        this._removalsHead !== null || this._identityChangesHead !== null;\n  }\n\n  /**\n   * Reset the state of the change objects to show no changes. This means set previousKey to\n   * currentKey, and clear all of the queues (additions, moves, removals).\n   * Set the previousIndexes of moved and added items to their currentIndexes\n   * Reset the list of additions, moves and removals\n   *\n   * @internal\n   */\n  _reset() {\n    if (this.isDirty) {\n      let record: IterableChangeRecord_<V>|null;\n      let nextRecord: IterableChangeRecord_<V>|null;\n\n      for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n        record._nextPrevious = record._next;\n      }\n\n      for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n        record.previousIndex = record.currentIndex;\n      }\n      this._additionsHead = this._additionsTail = null;\n\n      for (record = this._movesHead; record !== null; record = nextRecord) {\n        record.previousIndex = record.currentIndex;\n        nextRecord = record._nextMoved;\n      }\n      this._movesHead = this._movesTail = null;\n      this._removalsHead = this._removalsTail = null;\n      this._identityChangesHead = this._identityChangesTail = null;\n\n      // TODO(vicb): when assert gets supported\n      // assert(!this.isDirty);\n    }\n  }\n\n  /**\n   * This is the core function which handles differences between collections.\n   *\n   * - `record` is the record which we saw at this position last time. If null then it is a new\n   *   item.\n   * - `item` is the current item in the collection\n   * - `index` is the position of the item in the collection\n   *\n   * @internal\n   */\n  _mismatch(record: IterableChangeRecord_<V>|null, item: V, itemTrackBy: any, index: number):\n      IterableChangeRecord_<V> {\n    // The previous record after which we will append the current one.\n    let previousRecord: IterableChangeRecord_<V>|null;\n\n    if (record === null) {\n      previousRecord = this._itTail;\n    } else {\n      previousRecord = record._prev;\n      // Remove the record from the collection since we know it does not match the item.\n      this._remove(record);\n    }\n\n    // Attempt to see if we have seen the item before.\n    record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n    if (record !== null) {\n      // We have seen this before, we need to move it forward in the collection.\n      // But first we need to check if identity changed, so we can update in view if necessary\n      if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n      this._moveAfter(record, previousRecord, index);\n    } else {\n      // Never seen it, check evicted list.\n      record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n      if (record !== null) {\n        // It is an item which we have evicted earlier: reinsert it back into the list.\n        // But first we need to check if identity changed, so we can update in view if necessary\n        if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n        this._reinsertAfter(record, previousRecord, index);\n      } else {\n        // It is a new item: add it.\n        record =\n            this._addAfter(new IterableChangeRecord_<V>(item, itemTrackBy), previousRecord, index);\n      }\n    }\n    return record;\n  }\n\n  /**\n   * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n   *\n   * Use case: `[a, a]` => `[b, a, a]`\n   *\n   * If we did not have this check then the insertion of `b` would:\n   *   1) evict first `a`\n   *   2) insert `b` at `0` index.\n   *   3) leave `a` at index `1` as is. <-- this is wrong!\n   *   3) reinsert `a` at index 2. <-- this is wrong!\n   *\n   * The correct behavior is:\n   *   1) evict first `a`\n   *   2) insert `b` at `0` index.\n   *   3) reinsert `a` at index 1.\n   *   3) move `a` at from `1` to `2`.\n   *\n   *\n   * Double check that we have not evicted a duplicate item. We need to check if the item type may\n   * have already been removed:\n   * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n   * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n   * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n   * at the end.\n   *\n   * @internal\n   */\n  _verifyReinsertion(record: IterableChangeRecord_<V>, item: V, itemTrackBy: any, index: number):\n      IterableChangeRecord_<V> {\n    let reinsertRecord: IterableChangeRecord_<V>|null =\n        this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n    if (reinsertRecord !== null) {\n      record = this._reinsertAfter(reinsertRecord, record._prev !, index);\n    } else if (record.currentIndex != index) {\n      record.currentIndex = index;\n      this._addToMoves(record, index);\n    }\n    return record;\n  }\n\n  /**\n   * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n   *\n   * - `record` The first excess {@link IterableChangeRecord_}.\n   *\n   * @internal\n   */\n  _truncate(record: IterableChangeRecord_<V>|null) {\n    // Anything after that needs to be removed;\n    while (record !== null) {\n      const nextRecord: IterableChangeRecord_<V>|null = record._next;\n      this._addToRemovals(this._unlink(record));\n      record = nextRecord;\n    }\n    if (this._unlinkedRecords !== null) {\n      this._unlinkedRecords.clear();\n    }\n\n    if (this._additionsTail !== null) {\n      this._additionsTail._nextAdded = null;\n    }\n    if (this._movesTail !== null) {\n      this._movesTail._nextMoved = null;\n    }\n    if (this._itTail !== null) {\n      this._itTail._next = null;\n    }\n    if (this._removalsTail !== null) {\n      this._removalsTail._nextRemoved = null;\n    }\n    if (this._identityChangesTail !== null) {\n      this._identityChangesTail._nextIdentityChange = null;\n    }\n  }\n\n  /** @internal */\n  _reinsertAfter(\n      record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n      index: number): IterableChangeRecord_<V> {\n    if (this._unlinkedRecords !== null) {\n      this._unlinkedRecords.remove(record);\n    }\n    const prev = record._prevRemoved;\n    const next = record._nextRemoved;\n\n    if (prev === null) {\n      this._removalsHead = next;\n    } else {\n      prev._nextRemoved = next;\n    }\n    if (next === null) {\n      this._removalsTail = prev;\n    } else {\n      next._prevRemoved = prev;\n    }\n\n    this._insertAfter(record, prevRecord, index);\n    this._addToMoves(record, index);\n    return record;\n  }\n\n  /** @internal */\n  _moveAfter(\n      record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n      index: number): IterableChangeRecord_<V> {\n    this._unlink(record);\n    this._insertAfter(record, prevRecord, index);\n    this._addToMoves(record, index);\n    return record;\n  }\n\n  /** @internal */\n  _addAfter(\n      record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n      index: number): IterableChangeRecord_<V> {\n    this._insertAfter(record, prevRecord, index);\n\n    if (this._additionsTail === null) {\n      // TODO(vicb):\n      // assert(this._additionsHead === null);\n      this._additionsTail = this._additionsHead = record;\n    } else {\n      // TODO(vicb):\n      // assert(_additionsTail._nextAdded === null);\n      // assert(record._nextAdded === null);\n      this._additionsTail = this._additionsTail._nextAdded = record;\n    }\n    return record;\n  }\n\n  /** @internal */\n  _insertAfter(\n      record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n      index: number): IterableChangeRecord_<V> {\n    // TODO(vicb):\n    // assert(record != prevRecord);\n    // assert(record._next === null);\n    // assert(record._prev === null);\n\n    const next: IterableChangeRecord_<V>|null =\n        prevRecord === null ? this._itHead : prevRecord._next;\n    // TODO(vicb):\n    // assert(next != record);\n    // assert(prevRecord != record);\n    record._next = next;\n    record._prev = prevRecord;\n    if (next === null) {\n      this._itTail = record;\n    } else {\n      next._prev = record;\n    }\n    if (prevRecord === null) {\n      this._itHead = record;\n    } else {\n      prevRecord._next = record;\n    }\n\n    if (this._linkedRecords === null) {\n      this._linkedRecords = new _DuplicateMap<V>();\n    }\n    this._linkedRecords.put(record);\n\n    record.currentIndex = index;\n    return record;\n  }\n\n  /** @internal */\n  _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n    return this._addToRemovals(this._unlink(record));\n  }\n\n  /** @internal */\n  _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n    if (this._linkedRecords !== null) {\n      this._linkedRecords.remove(record);\n    }\n\n    const prev = record._prev;\n    const next = record._next;\n\n    // TODO(vicb):\n    // assert((record._prev = null) === null);\n    // assert((record._next = null) === null);\n\n    if (prev === null) {\n      this._itHead = next;\n    } else {\n      prev._next = next;\n    }\n    if (next === null) {\n      this._itTail = prev;\n    } else {\n      next._prev = prev;\n    }\n\n    return record;\n  }\n\n  /** @internal */\n  _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n    // TODO(vicb):\n    // assert(record._nextMoved === null);\n\n    if (record.previousIndex === toIndex) {\n      return record;\n    }\n\n    if (this._movesTail === null) {\n      // TODO(vicb):\n      // assert(_movesHead === null);\n      this._movesTail = this._movesHead = record;\n    } else {\n      // TODO(vicb):\n      // assert(_movesTail._nextMoved === null);\n      this._movesTail = this._movesTail._nextMoved = record;\n    }\n\n    return record;\n  }\n\n  private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n    if (this._unlinkedRecords === null) {\n      this._unlinkedRecords = new _DuplicateMap<V>();\n    }\n    this._unlinkedRecords.put(record);\n    record.currentIndex = null;\n    record._nextRemoved = null;\n\n    if (this._removalsTail === null) {\n      // TODO(vicb):\n      // assert(_removalsHead === null);\n      this._removalsTail = this._removalsHead = record;\n      record._prevRemoved = null;\n    } else {\n      // TODO(vicb):\n      // assert(_removalsTail._nextRemoved === null);\n      // assert(record._nextRemoved === null);\n      record._prevRemoved = this._removalsTail;\n      this._removalsTail = this._removalsTail._nextRemoved = record;\n    }\n    return record;\n  }\n\n  /** @internal */\n  _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n    record.item = item;\n    if (this._identityChangesTail === null) {\n      this._identityChangesTail = this._identityChangesHead = record;\n    } else {\n      this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n    }\n    return record;\n  }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n  currentIndex: number|null = null;\n  previousIndex: number|null = null;\n\n  /** @internal */\n  _nextPrevious: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _prev: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _next: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _prevDup: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _nextDup: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _prevRemoved: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _nextRemoved: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _nextAdded: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _nextMoved: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _nextIdentityChange: IterableChangeRecord_<V>|null = null;\n\n\n  constructor(public item: V, public trackById: any) {}\n}\n\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n  /** @internal */\n  _head: IterableChangeRecord_<V>|null = null;\n  /** @internal */\n  _tail: IterableChangeRecord_<V>|null = null;\n\n  /**\n   * Append the record to the list of duplicates.\n   *\n   * Note: by design all records in the list of duplicates hold the same value in record.item.\n   */\n  add(record: IterableChangeRecord_<V>): void {\n    if (this._head === null) {\n      this._head = this._tail = record;\n      record._nextDup = null;\n      record._prevDup = null;\n    } else {\n      // TODO(vicb):\n      // assert(record.item ==  _head.item ||\n      //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n      this._tail !._nextDup = record;\n      record._prevDup = this._tail;\n      record._nextDup = null;\n      this._tail = record;\n    }\n  }\n\n  // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n  // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n  get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n    let record: IterableChangeRecord_<V>|null;\n    for (record = this._head; record !== null; record = record._nextDup) {\n      if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex !) &&\n          looseIdentical(record.trackById, trackById)) {\n        return record;\n      }\n    }\n    return null;\n  }\n\n  /**\n   * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n   *\n   * Returns whether the list of duplicates is empty.\n   */\n  remove(record: IterableChangeRecord_<V>): boolean {\n    // TODO(vicb):\n    // assert(() {\n    //  // verify that the record being removed is in the list.\n    //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n    //    if (identical(cursor, record)) return true;\n    //  }\n    //  return false;\n    //});\n\n    const prev: IterableChangeRecord_<V>|null = record._prevDup;\n    const next: IterableChangeRecord_<V>|null = record._nextDup;\n    if (prev === null) {\n      this._head = next;\n    } else {\n      prev._nextDup = next;\n    }\n    if (next === null) {\n      this._tail = prev;\n    } else {\n      next._prevDup = prev;\n    }\n    return this._head === null;\n  }\n}\n\nclass _DuplicateMap<V> {\n  map = new Map<any, _DuplicateItemRecordList<V>>();\n\n  put(record: IterableChangeRecord_<V>) {\n    const key = record.trackById;\n\n    let duplicates = this.map.get(key);\n    if (!duplicates) {\n      duplicates = new _DuplicateItemRecordList<V>();\n      this.map.set(key, duplicates);\n    }\n    duplicates.add(record);\n  }\n\n  /**\n   * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n   * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n   *\n   * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n   * have any more `a`s needs to return the second `a`.\n   */\n  get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n    const key = trackById;\n    const recordList = this.map.get(key);\n    return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n  }\n\n  /**\n   * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n   *\n   * The list of duplicates also is removed from the map if it gets empty.\n   */\n  remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n    const key = record.trackById;\n    const recordList: _DuplicateItemRecordList<V> = this.map.get(key) !;\n    // Remove the list of duplicates when it gets empty\n    if (recordList.remove(record)) {\n      this.map.delete(key);\n    }\n    return record;\n  }\n\n  get isEmpty(): boolean { return this.map.size === 0; }\n\n  clear() { this.map.clear(); }\n}\n\nfunction getPreviousIndex(\n    item: any, addRemoveOffset: number, moveOffsets: number[] | null): number {\n  const previousIndex = item.previousIndex;\n  if (previousIndex === null) return previousIndex;\n  let moveOffset = 0;\n  if (moveOffsets && previousIndex < moveOffsets.length) {\n    moveOffset = moveOffsets[previousIndex];\n  }\n  return previousIndex + addRemoveOffset + moveOffset;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isJsObject} from '../change_detection_util';\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory} from './keyvalue_differs';\n\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n  constructor() {}\n  supports(obj: any): boolean { return obj instanceof Map || isJsObject(obj); }\n\n  create<K, V>(): KeyValueDiffer<K, V> { return new DefaultKeyValueDiffer<K, V>(); }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n  private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n  private _mapHead: KeyValueChangeRecord_<K, V>|null = null;\n  // _appendAfter is used in the check loop\n  private _appendAfter: KeyValueChangeRecord_<K, V>|null = null;\n  private _previousMapHead: KeyValueChangeRecord_<K, V>|null = null;\n  private _changesHead: KeyValueChangeRecord_<K, V>|null = null;\n  private _changesTail: KeyValueChangeRecord_<K, V>|null = null;\n  private _additionsHead: KeyValueChangeRecord_<K, V>|null = null;\n  private _additionsTail: KeyValueChangeRecord_<K, V>|null = null;\n  private _removalsHead: KeyValueChangeRecord_<K, V>|null = null;\n  private _removalsTail: KeyValueChangeRecord_<K, V>|null = null;\n\n  get isDirty(): boolean {\n    return this._additionsHead !== null || this._changesHead !== null ||\n        this._removalsHead !== null;\n  }\n\n  forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n    let record: KeyValueChangeRecord_<K, V>|null;\n    for (record = this._mapHead; record !== null; record = record._next) {\n      fn(record);\n    }\n  }\n\n  forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n    let record: KeyValueChangeRecord_<K, V>|null;\n    for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n      fn(record);\n    }\n  }\n\n  forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n    let record: KeyValueChangeRecord_<K, V>|null;\n    for (record = this._changesHead; record !== null; record = record._nextChanged) {\n      fn(record);\n    }\n  }\n\n  forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n    let record: KeyValueChangeRecord_<K, V>|null;\n    for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n      fn(record);\n    }\n  }\n\n  forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n    let record: KeyValueChangeRecord_<K, V>|null;\n    for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n      fn(record);\n    }\n  }\n\n  diff(map?: Map<any, any>|{[k: string]: any}|null): any {\n    if (!map) {\n      map = new Map();\n    } else if (!(map instanceof Map || isJsObject(map))) {\n      throw new Error(\n          `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n    }\n\n    return this.check(map) ? this : null;\n  }\n\n  onDestroy() {}\n\n  /**\n   * Check the current state of the map vs the previous.\n   * The algorithm is optimised for when the keys do no change.\n   */\n  check(map: Map<any, any>|{[k: string]: any}): boolean {\n    this._reset();\n\n    let insertBefore = this._mapHead;\n    this._appendAfter = null;\n\n    this._forEach(map, (value: any, key: any) => {\n      if (insertBefore && insertBefore.key === key) {\n        this._maybeAddToChanges(insertBefore, value);\n        this._appendAfter = insertBefore;\n        insertBefore = insertBefore._next;\n      } else {\n        const record = this._getOrCreateRecordForKey(key, value);\n        insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n      }\n    });\n\n    // Items remaining at the end of the list have been deleted\n    if (insertBefore) {\n      if (insertBefore._prev) {\n        insertBefore._prev._next = null;\n      }\n\n      this._removalsHead = insertBefore;\n\n      for (let record: KeyValueChangeRecord_<K, V>|null = insertBefore; record !== null;\n           record = record._nextRemoved) {\n        if (record === this._mapHead) {\n          this._mapHead = null;\n        }\n        this._records.delete(record.key);\n        record._nextRemoved = record._next;\n        record.previousValue = record.currentValue;\n        record.currentValue = null;\n        record._prev = null;\n        record._next = null;\n      }\n    }\n\n    // Make sure tails have no next records from previous runs\n    if (this._changesTail) this._changesTail._nextChanged = null;\n    if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n    return this.isDirty;\n  }\n\n  /**\n   * Inserts a record before `before` or append at the end of the list when `before` is null.\n   *\n   * Notes:\n   * - This method appends at `this._appendAfter`,\n   * - This method updates `this._appendAfter`,\n   * - The return value is the new value for the insertion pointer.\n   */\n  private _insertBeforeOrAppend(\n      before: KeyValueChangeRecord_<K, V>|null,\n      record: KeyValueChangeRecord_<K, V>): KeyValueChangeRecord_<K, V>|null {\n    if (before) {\n      const prev = before._prev;\n      record._next = before;\n      record._prev = prev;\n      before._prev = record;\n      if (prev) {\n        prev._next = record;\n      }\n      if (before === this._mapHead) {\n        this._mapHead = record;\n      }\n\n      this._appendAfter = before;\n      return before;\n    }\n\n    if (this._appendAfter) {\n      this._appendAfter._next = record;\n      record._prev = this._appendAfter;\n    } else {\n      this._mapHead = record;\n    }\n\n    this._appendAfter = record;\n    return null;\n  }\n\n  private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n    if (this._records.has(key)) {\n      const record = this._records.get(key) !;\n      this._maybeAddToChanges(record, value);\n      const prev = record._prev;\n      const next = record._next;\n      if (prev) {\n        prev._next = next;\n      }\n      if (next) {\n        next._prev = prev;\n      }\n      record._next = null;\n      record._prev = null;\n\n      return record;\n    }\n\n    const record = new KeyValueChangeRecord_<K, V>(key);\n    this._records.set(key, record);\n    record.currentValue = value;\n    this._addToAdditions(record);\n    return record;\n  }\n\n  /** @internal */\n  _reset() {\n    if (this.isDirty) {\n      let record: KeyValueChangeRecord_<K, V>|null;\n      // let `_previousMapHead` contain the state of the map before the changes\n      this._previousMapHead = this._mapHead;\n      for (record = this._previousMapHead; record !== null; record = record._next) {\n        record._nextPrevious = record._next;\n      }\n\n      // Update `record.previousValue` with the value of the item before the changes\n      // We need to update all changed items (that's those which have been added and changed)\n      for (record = this._changesHead; record !== null; record = record._nextChanged) {\n        record.previousValue = record.currentValue;\n      }\n      for (record = this._additionsHead; record != null; record = record._nextAdded) {\n        record.previousValue = record.currentValue;\n      }\n\n      this._changesHead = this._changesTail = null;\n      this._additionsHead = this._additionsTail = null;\n      this._removalsHead = null;\n    }\n  }\n\n  // Add the record or a given key to the list of changes only when the value has actually changed\n  private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n    if (!looseIdentical(newValue, record.currentValue)) {\n      record.previousValue = record.currentValue;\n      record.currentValue = newValue;\n      this._addToChanges(record);\n    }\n  }\n\n  private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n    if (this._additionsHead === null) {\n      this._additionsHead = this._additionsTail = record;\n    } else {\n      this._additionsTail !._nextAdded = record;\n      this._additionsTail = record;\n    }\n  }\n\n  private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n    if (this._changesHead === null) {\n      this._changesHead = this._changesTail = record;\n    } else {\n      this._changesTail !._nextChanged = record;\n      this._changesTail = record;\n    }\n  }\n\n  /** @internal */\n  private _forEach<K, V>(obj: Map<K, V>|{[k: string]: V}, fn: (v: V, k: any) => void) {\n    if (obj instanceof Map) {\n      obj.forEach(fn);\n    } else {\n      Object.keys(obj).forEach(k => fn(obj[k], k));\n    }\n  }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n  previousValue: V|null = null;\n  currentValue: V|null = null;\n\n  /** @internal */\n  _nextPrevious: KeyValueChangeRecord_<K, V>|null = null;\n  /** @internal */\n  _next: KeyValueChangeRecord_<K, V>|null = null;\n  /** @internal */\n  _prev: KeyValueChangeRecord_<K, V>|null = null;\n  /** @internal */\n  _nextAdded: KeyValueChangeRecord_<K, V>|null = null;\n  /** @internal */\n  _nextRemoved: KeyValueChangeRecord_<K, V>|null = null;\n  /** @internal */\n  _nextChanged: KeyValueChangeRecord_<K, V>|null = null;\n\n  constructor(public key: K) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµÉµdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T>| Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n  /**\n   * Compute a difference between the previous state and the new `object` state.\n   *\n   * @param object containing the new value.\n   * @returns an object describing the difference. The return value is only valid until the next\n   * `diff()` invocation.\n   */\n  diff(object: NgIterable<V>): IterableChanges<V>|null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n  /**\n   * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n   * to each item.\n   */\n  forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n  /**\n   * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n   * new `Iterable`.\n   *\n   * NOTE: These are not necessarily the actual operations which were applied to the original\n   * `Iterable`, rather these are a set of computed operations which may not be the same as the\n   * ones applied.\n   *\n   * @param record A change which needs to be applied\n   * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n   *        original `Iterable` location, where as `previousIndex` refers to the transient location\n   *        of the item, after applying the operations up to this point.\n   * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n   *        original `Iterable` location, where as `currentIndex` refers to the transient location\n   *        of the item, after applying the operations up to this point.\n   */\n  forEachOperation(\n      fn:\n          (record: IterableChangeRecord<V>, previousIndex: number|null,\n           currentIndex: number|null) => void): void;\n\n  /**\n   * Iterate over changes in the order of original `Iterable` showing where the original items\n   * have moved.\n   */\n  forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n  /** Iterate over all added items. */\n  forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n  /** Iterate over all moved items. */\n  forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n  /** Iterate over all removed items. */\n  forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n  /** Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n   * changed. */\n  forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n  /** Current index of the item in `Iterable` or null if removed. */\n  readonly currentIndex: number|null;\n\n  /** Previous index of the item in `Iterable` or null if added. */\n  readonly previousIndex: number|null;\n\n  /** The item. */\n  readonly item: V;\n\n  /** Track by identity as computed by the `TrackByFunction`. */\n  readonly trackById: any;\n}\n\n/**\n * @deprecated v4.0.0 - Use IterableChangeRecord instead.\n * @publicApi\n */\nexport interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}\n\n/**\n * An optional function passed into the `NgForOf` directive that defines how to track\n * changes for items in an iterable.\n * The function takes the iteration index and item ID.\n * When supplied, Angular tracks changes by the return value of the function.\n *\n * @publicApi\n */\nexport interface TrackByFunction<T> { (index: number, item: T): any; }\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n  supports(objects: any): boolean;\n  create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n  /** @nocollapse */\n  static ngInjectableDef = ÉµÉµdefineInjectable({\n    token: IterableDiffers,\n    providedIn: 'root',\n    factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])\n  });\n\n  /**\n   * @deprecated v4.0.0 - Should be private\n   */\n  factories: IterableDifferFactory[];\n  constructor(factories: IterableDifferFactory[]) { this.factories = factories; }\n\n  static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n    if (parent != null) {\n      const copied = parent.factories.slice();\n      factories = factories.concat(copied);\n    }\n\n    return new IterableDiffers(factories);\n  }\n\n  /**\n   * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n   * inherited {@link IterableDiffers} instance with the provided factories and return a new\n   * {@link IterableDiffers} instance.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example shows how to extend an existing list of factories,\n   * which will only be applied to the injector for this component and its children.\n   * This step is all that's required to make a new {@link IterableDiffer} available.\n   *\n   * ```\n   * @Component({\n   *   viewProviders: [\n   *     IterableDiffers.extend([new ImmutableListDiffer()])\n   *   ]\n   * })\n   * ```\n   */\n  static extend(factories: IterableDifferFactory[]): StaticProvider {\n    return {\n      provide: IterableDiffers,\n      useFactory: (parent: IterableDiffers) => {\n        if (!parent) {\n          // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n          // to\n          // bootstrap(), which would override default pipes instead of extending them.\n          throw new Error('Cannot extend IterableDiffers without a parent injector');\n        }\n        return IterableDiffers.create(factories, parent);\n      },\n      // Dependency technically isn't optional, but we can provide a better error message this way.\n      deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n    };\n  }\n\n  find(iterable: any): IterableDifferFactory {\n    const factory = this.factories.find(f => f.supports(iterable));\n    if (factory != null) {\n      return factory;\n    } else {\n      throw new Error(\n          `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n    }\n  }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n  return type['name'] || typeof type;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Optional, SkipSelf, StaticProvider, ÉµÉµdefineInjectable} from '../../di';\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n  /**\n   * Compute a difference between the previous state and the new `object` state.\n   *\n   * @param object containing the new value.\n   * @returns an object describing the difference. The return value is only valid until the next\n   * `diff()` invocation.\n   */\n  diff(object: Map<K, V>): KeyValueChanges<K, V>|null;\n\n  /**\n   * Compute a difference between the previous state and the new `object` state.\n   *\n   * @param object containing the new value.\n   * @returns an object describing the difference. The return value is only valid until the next\n   * `diff()` invocation.\n   */\n  diff(object: {[key: string]: V}): KeyValueChanges<string, V>|null;\n  // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n  // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n  /**\n   * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n   * to each item.\n   */\n  forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n  /**\n   * Iterate over changes in the order of original Map showing where the original items\n   * have moved.\n   */\n  forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n  /**\n   * Iterate over all keys for which values have changed.\n   */\n  forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n  /**\n   * Iterate over all added items.\n   */\n  forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n  /**\n   * Iterate over all removed items.\n   */\n  forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n  /**\n   * Current key in the Map.\n   */\n  readonly key: K;\n\n  /**\n   * Current value for the key or `null` if removed.\n   */\n  readonly currentValue: V|null;\n\n  /**\n   * Previous value for the key or `null` if added.\n   */\n  readonly previousValue: V|null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n  /**\n   * Test to see if the differ knows how to diff this kind of object.\n   */\n  supports(objects: any): boolean;\n\n  /**\n   * Create a `KeyValueDiffer`.\n   */\n  create<K, V>(): KeyValueDiffer<K, V>;\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n  /** @nocollapse */\n  static ngInjectableDef = ÉµÉµdefineInjectable({\n    token: KeyValueDiffers,\n    providedIn: 'root',\n    factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])\n  });\n\n  /**\n   * @deprecated v4.0.0 - Should be private.\n   */\n  factories: KeyValueDifferFactory[];\n\n  constructor(factories: KeyValueDifferFactory[]) { this.factories = factories; }\n\n  static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n    if (parent) {\n      const copied = parent.factories.slice();\n      factories = factories.concat(copied);\n    }\n    return new KeyValueDiffers(factories);\n  }\n\n  /**\n   * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n   * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n   * {@link KeyValueDiffers} instance.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * The following example shows how to extend an existing list of factories,\n   * which will only be applied to the injector for this component and its children.\n   * This step is all that's required to make a new {@link KeyValueDiffer} available.\n   *\n   * ```\n   * @Component({\n   *   viewProviders: [\n   *     KeyValueDiffers.extend([new ImmutableMapDiffer()])\n   *   ]\n   * })\n   * ```\n   */\n  static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n    return {\n      provide: KeyValueDiffers,\n      useFactory: (parent: KeyValueDiffers) => {\n        if (!parent) {\n          // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n          // to bootstrap(), which would override default pipes instead of extending them.\n          throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n        }\n        return KeyValueDiffers.create(factories, parent);\n      },\n      // Dependency technically isn't optional, but we can provide a better error message this way.\n      deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n    };\n  }\n\n  find(kv: any): KeyValueDifferFactory {\n    const factory = this.factories.find(f => f.supports(kv));\n    if (factory) {\n      return factory;\n    }\n    throw new Error(`Cannot find a differ supporting object '${kv}'`);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {WrappedValue, devModeEqual} from './change_detection_util';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy} from './constants';\nexport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nexport {DefaultIterableDiffer} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {\n  CollectionChangeRecord,\n  IterableChangeRecord,\n  IterableChanges,\n  IterableDiffer,\n  IterableDifferFactory,\n  IterableDiffers,\n  NgIterable,\n  TrackByFunction\n} from\n'./differs/iterable_differs';\nexport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\n\n\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectTemplateRef as render3InjectTemplateRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n  /**\n   * The anchor element in the parent view for this embedded view.\n   *\n   * The data-binding and injection contexts of embedded views created from this `TemplateRef`\n   * inherit from the contexts of this location.\n   *\n   * Typically new embedded views are attached to the view container of this location, but in\n   * advanced use-cases, the view can be attached to a different container while keeping the\n   * data-binding and injection context from the original location.\n   *\n   */\n  // TODO(i): rename to anchor or location\n  abstract get elementRef(): ElementRef;\n\n  /**\n   * Instantiates an embedded view based on this template,\n   * and attaches it to the view container.\n   * @param context The data-binding context of the embedded view, as declared\n   * in the `<ng-template>` usage.\n   * @returns The new embedded view object.\n   */\n  abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__:\n      () => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)\n}\n\nexport const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = render3InjectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY: typeof render3InjectTemplateRef =\n    SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {injectViewContainerRef as render3InjectViewContainerRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n  /**\n   * Anchor element that specifies the location of this container in the containing view.\n   * Each view container can have only one anchor element, and each anchor element\n   * can have only a single view container.\n   *\n   * Root elements of views attached to this container become siblings of the anchor element in\n   * the rendered view.\n   *\n   * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n   * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n   *\n   * <!-- TODO: rename to anchorElement -->\n   */\n  abstract get element(): ElementRef;\n\n  /**\n   * The [dependency injector](guide/glossary#injector) for this view container.\n   */\n  abstract get injector(): Injector;\n\n  /** @deprecated No replacement */\n  abstract get parentInjector(): Injector;\n\n  /**\n   * Destroys all views in this container.\n   */\n  abstract clear(): void;\n\n  /**\n   * Retrieves a view from this container.\n   * @param index The 0-based index of the view to retrieve.\n   * @returns The `ViewRef` instance, or null if the index is out of range.\n   */\n  abstract get(index: number): ViewRef|null;\n\n  /**\n   * Reports how many views are currently attached to this container.\n   * @returns The number of views.\n   */\n  abstract get length(): number;\n\n  /**\n   * Instantiates an embedded view and inserts it\n   * into this container.\n   * @param templateRef The HTML template that defines the view.\n   * @param index The 0-based index at which to insert the new view into this container.\n   * If not specified, appends the new view as the last entry.\n   *\n   * @returns The `ViewRef` instance for the newly created view.\n   */\n  abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n      EmbeddedViewRef<C>;\n\n  /**\n   * Instantiates a single component and inserts its host view into this container.\n   *\n   * @param componentFactory The factory to use.\n   * @param index The index at which to insert the new component's host view into this container.\n   * If not specified, appends the new view as the last entry.\n   * @param injector The injector to use as the parent for the new component.\n   * @param projectableNodes\n   * @param ngModule\n   *\n   * @returns The new component instance, containing the host view.\n   *\n   */\n  abstract createComponent<C>(\n      componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n      projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;\n\n  /**\n   * Inserts a view into this container.\n   * @param viewRef The view to insert.\n   * @param index The 0-based index at which to insert the view.\n   * If not specified, appends the new view as the last entry.\n   * @returns The inserted `ViewRef` instance.\n   *\n   */\n  abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n  /**\n   * Moves a view to a new location in this container.\n   * @param viewRef The view to move.\n   * @param index The 0-based index of the new location.\n   * @returns The moved `ViewRef` instance.\n   */\n  abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n  /**\n   * Returns the index of a view within the current container.\n   * @param viewRef The view to query.\n   * @returns The 0-based index of the view's position in this container,\n   * or `-1` if this container doesn't contain the view.\n   */\n  abstract indexOf(viewRef: ViewRef): number;\n\n  /**\n   * Destroys a view attached to this container\n   * @param index The 0-based index of the view to destroy.\n   * If not specified, the last view in the container is removed.\n   */\n  abstract remove(index?: number): void;\n\n  /**\n   * Detaches a view from this container without destroying it.\n   * Use along with `insert()` to move a view within the current container.\n   * @param index The 0-based index of the view to detach.\n   * If not specified, the last view in the container is detached.\n   */\n  abstract detach(index?: number): ViewRef|null;\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__:\n      () => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef)\n}\n\nexport const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = render3InjectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY: typeof render3InjectViewContainerRef =\n    SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getDebugContext} from '../errors';\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER} from '../util/errors';\n\nimport {DebugContext} from './types';\n\nexport function expressionChangedAfterItHasBeenCheckedError(\n    context: DebugContext, oldValue: any, currValue: any, isFirstCheck: boolean): Error {\n  let msg =\n      `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n  if (isFirstCheck) {\n    msg +=\n        ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n        ` Has it been created in a change detection hook ?`;\n  }\n  return viewDebugError(msg, context);\n}\n\nexport function viewWrappedDebugError(err: any, context: DebugContext): Error {\n  if (!(err instanceof Error)) {\n    // errors that are not Error instances don't have a stack,\n    // so it is ok to wrap them into a new Error object...\n    err = new Error(err.toString());\n  }\n  _addDebugContext(err, context);\n  return err;\n}\n\nexport function viewDebugError(msg: string, context: DebugContext): Error {\n  const err = new Error(msg);\n  _addDebugContext(err, context);\n  return err;\n}\n\nfunction _addDebugContext(err: Error, context: DebugContext) {\n  (err as any)[ERROR_DEBUG_CONTEXT] = context;\n  (err as any)[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nexport function isViewDebugError(err: Error): boolean {\n  return !!getDebugContext(err);\n}\n\nexport function viewDestroyedError(action: string): Error {\n  return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2, RendererFactory2, RendererType2} from '../render/api';\nimport {Sanitizer, SecurityContext} from '../sanitization/security';\n\n\n\n// -------------------------------------\n// Defs\n// -------------------------------------\n\n/**\n * Factory for ViewDefinitions/NgModuleDefinitions.\n * We use a function so we can reexeute it in case an error happens and use the given logger\n * function to log the error from the definition of the node, which is shown in all browser\n * logs.\n */\nexport interface DefinitionFactory<D extends Definition<any>> { (logger: NodeLogger): D; }\n\n/**\n * Function to call console.error at the right source location. This is an indirection\n * via another function as browser will log the location that actually called\n * `console.error`.\n */\nexport interface NodeLogger { (): () => void; }\n\nexport interface Definition<DF extends DefinitionFactory<any>> { factory: DF|null; }\n\nexport interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {\n  providers: NgModuleProviderDef[];\n  providersByKey: {[tokenKey: string]: NgModuleProviderDef};\n  modules: any[];\n  isRoot: boolean;\n}\n\nexport interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}\n\nexport interface ViewDefinition extends Definition<ViewDefinitionFactory> {\n  flags: ViewFlags;\n  updateDirectives: ViewUpdateFn;\n  updateRenderer: ViewUpdateFn;\n  handleEvent: ViewHandleEventFn;\n  /**\n   * Order: Depth first.\n   * Especially providers are before elements / anchors.\n   */\n  nodes: NodeDef[];\n  /** aggregated NodeFlags for all nodes **/\n  nodeFlags: NodeFlags;\n  rootNodeFlags: NodeFlags;\n  lastRenderRootNode: NodeDef|null;\n  bindingCount: number;\n  outputCount: number;\n  /**\n   * Binary or of all query ids that are matched by one of the nodes.\n   * This includes query ids from templates as well.\n   * Used as a bloom filter.\n   */\n  nodeMatchedQueries: number;\n}\n\nexport interface ViewDefinitionFactory extends DefinitionFactory<ViewDefinition> {}\n\n\nexport interface ViewUpdateFn { (check: NodeCheckFn, view: ViewData): void; }\n\n// helper functions to create an overloaded function type.\nexport interface NodeCheckFn {\n  (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;\n\n  (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,\n   v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;\n}\n\nexport const enum ArgumentType {Inline = 0, Dynamic = 1}\n\nexport interface ViewHandleEventFn {\n  (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;\n}\n\n/**\n * Bitmask for ViewDefinition.flags.\n */\nexport const enum ViewFlags {\n  None = 0,\n  OnPush = 1 << 1,\n}\n\n/**\n * A node definition in the view.\n *\n * Note: We use one type for all nodes so that loops that loop over all nodes\n * of a ViewDefinition stay monomorphic!\n */\nexport interface NodeDef {\n  flags: NodeFlags;\n  // Index of the node in view data and view definition (those are the same)\n  nodeIndex: number;\n  // Index of the node in the check functions\n  // Differ from nodeIndex when nodes are added or removed at runtime (ie after compilation)\n  checkIndex: number;\n  parent: NodeDef|null;\n  renderParent: NodeDef|null;\n  /** this is checked against NgContentDef.index to find matched nodes */\n  ngContentIndex: number|null;\n  /** number of transitive children */\n  childCount: number;\n  /** aggregated NodeFlags for all transitive children (does not include self) **/\n  childFlags: NodeFlags;\n  /** aggregated NodeFlags for all direct children (does not include self) **/\n  directChildFlags: NodeFlags;\n\n  bindingIndex: number;\n  bindings: BindingDef[];\n  bindingFlags: BindingFlags;\n  outputIndex: number;\n  outputs: OutputDef[];\n  /**\n   * references that the user placed on the element\n   */\n  references: {[refId: string]: QueryValueType};\n  /**\n   * ids and value types of all queries that are matched by this node.\n   */\n  matchedQueries: {[queryId: number]: QueryValueType};\n  /** Binary or of all matched query ids of this node. */\n  matchedQueryIds: number;\n  /**\n   * Binary or of all query ids that are matched by one of the children.\n   * This includes query ids from templates as well.\n   * Used as a bloom filter.\n   */\n  childMatchedQueries: number;\n  element: ElementDef|null;\n  provider: ProviderDef|null;\n  text: TextDef|null;\n  query: QueryDef|null;\n  ngContent: NgContentDef|null;\n}\n\n/**\n * Bitmask for NodeDef.flags.\n * Naming convention:\n * - `Type...`: flags that are mutually exclusive\n * - `Cat...`: union of multiple `Type...` (short for category).\n */\nexport const enum NodeFlags {\n  None = 0,\n  TypeElement = 1 << 0,\n  TypeText = 1 << 1,\n  ProjectedTemplate = 1 << 2,\n  CatRenderNode = TypeElement | TypeText,\n  TypeNgContent = 1 << 3,\n  TypePipe = 1 << 4,\n  TypePureArray = 1 << 5,\n  TypePureObject = 1 << 6,\n  TypePurePipe = 1 << 7,\n  CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n  TypeValueProvider = 1 << 8,\n  TypeClassProvider = 1 << 9,\n  TypeFactoryProvider = 1 << 10,\n  TypeUseExistingProvider = 1 << 11,\n  LazyProvider = 1 << 12,\n  PrivateProvider = 1 << 13,\n  TypeDirective = 1 << 14,\n  Component = 1 << 15,\n  CatProviderNoDirective =\n      TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n  CatProvider = CatProviderNoDirective | TypeDirective,\n  OnInit = 1 << 16,\n  OnDestroy = 1 << 17,\n  DoCheck = 1 << 18,\n  OnChanges = 1 << 19,\n  AfterContentInit = 1 << 20,\n  AfterContentChecked = 1 << 21,\n  AfterViewInit = 1 << 22,\n  AfterViewChecked = 1 << 23,\n  EmbeddedViews = 1 << 24,\n  ComponentView = 1 << 25,\n  TypeContentQuery = 1 << 26,\n  TypeViewQuery = 1 << 27,\n  StaticQuery = 1 << 28,\n  DynamicQuery = 1 << 29,\n  TypeNgModule = 1 << 30,\n  CatQuery = TypeContentQuery | TypeViewQuery,\n\n  // mutually exclusive values...\n  Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport interface BindingDef {\n  flags: BindingFlags;\n  ns: string|null;\n  name: string|null;\n  nonMinifiedName: string|null;\n  securityContext: SecurityContext|null;\n  suffix: string|null;\n}\n\nexport const enum BindingFlags {\n  TypeElementAttribute = 1 << 0,\n  TypeElementClass = 1 << 1,\n  TypeElementStyle = 1 << 2,\n  TypeProperty = 1 << 3,\n  SyntheticProperty = 1 << 4,\n  SyntheticHostProperty = 1 << 5,\n  CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n  // mutually exclusive values...\n  Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport interface OutputDef {\n  type: OutputType;\n  target: 'window'|'document'|'body'|'component'|null;\n  eventName: string;\n  propName: string|null;\n}\n\nexport const enum OutputType {ElementOutput, DirectiveOutput}\n\nexport const enum QueryValueType {\n  ElementRef = 0,\n  RenderElement = 1,\n  TemplateRef = 2,\n  ViewContainerRef = 3,\n  Provider = 4\n}\n\nexport interface ElementDef {\n  // set to null for `<ng-container>`\n  name: string|null;\n  ns: string|null;\n  /** ns, name, value */\n  attrs: [string, string, string][]|null;\n  template: ViewDefinition|null;\n  componentProvider: NodeDef|null;\n  componentRendererType: RendererType2|null;\n  // closure to allow recursive components\n  componentView: ViewDefinitionFactory|null;\n  /**\n   * visible public providers for DI in the view,\n   * as see from this element. This does not include private providers.\n   */\n  publicProviders: {[tokenKey: string]: NodeDef}|null;\n  /**\n   * same as visiblePublicProviders, but also includes private providers\n   * that are located on this element.\n   */\n  allProviders: {[tokenKey: string]: NodeDef}|null;\n  handleEvent: ElementHandleEventFn|null;\n}\n\nexport interface ElementHandleEventFn { (view: ViewData, eventName: string, event: any): boolean; }\n\nexport interface ProviderDef {\n  token: any;\n  value: any;\n  deps: DepDef[];\n}\n\nexport interface NgModuleProviderDef {\n  flags: NodeFlags;\n  index: number;\n  token: any;\n  value: any;\n  deps: DepDef[];\n}\n\nexport interface DepDef {\n  flags: DepFlags;\n  token: any;\n  tokenKey: string;\n}\n\n/**\n * Bitmask for DI flags\n */\nexport const enum DepFlags {\n  None = 0,\n  SkipSelf = 1 << 0,\n  Optional = 1 << 1,\n  Self = 1 << 2,\n  Value = 1 << 3,\n}\n\nexport interface TextDef { prefix: string; }\n\nexport interface QueryDef {\n  id: number;\n  // variant of the id that can be used to check against NodeDef.matchedQueryIds, ...\n  filterId: number;\n  bindings: QueryBindingDef[];\n}\n\nexport interface QueryBindingDef {\n  propName: string;\n  bindingType: QueryBindingType;\n}\n\nexport const enum QueryBindingType {First = 0, All = 1}\n\nexport interface NgContentDef {\n  /**\n   * this index is checked against NodeDef.ngContentIndex to find the nodes\n   * that are matched by this ng-content.\n   * Note that a NodeDef with an ng-content can be reprojected, i.e.\n   * have a ngContentIndex on its own.\n   */\n  index: number;\n}\n\n// -------------------------------------\n// Data\n// -------------------------------------\n\nexport interface NgModuleData extends Injector, NgModuleRef<any> {\n  // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n  // exposed to the user.\n  _def: NgModuleDefinition;\n  _parent: Injector;\n  _providers: any[];\n}\n\n/**\n * View instance data.\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ViewData {\n  def: ViewDefinition;\n  root: RootData;\n  renderer: Renderer2;\n  // index of component provider / anchor.\n  parentNodeDef: NodeDef|null;\n  parent: ViewData|null;\n  viewContainerParent: ViewData|null;\n  component: any;\n  context: any;\n  // Attention: Never loop over this, as this will\n  // create a polymorphic usage site.\n  // Instead: Always loop over ViewDefinition.nodes,\n  // and call the right accessor (e.g. `elementData`) based on\n  // the NodeType.\n  nodes: {[key: number]: NodeData};\n  state: ViewState;\n  oldValues: any[];\n  disposables: DisposableFn[]|null;\n  initIndex: number;\n}\n\n/**\n * Bitmask of states\n */\nexport const enum ViewState {\n  BeforeFirstCheck = 1 << 0,\n  FirstCheck = 1 << 1,\n  Attached = 1 << 2,\n  ChecksEnabled = 1 << 3,\n  IsProjectedView = 1 << 4,\n  CheckProjectedView = 1 << 5,\n  CheckProjectedViews = 1 << 6,\n  Destroyed = 1 << 7,\n\n  // InitState Uses 3 bits\n  InitState_Mask = 7 << 8,\n  InitState_BeforeInit = 0 << 8,\n  InitState_CallingOnInit = 1 << 8,\n  InitState_CallingAfterContentInit = 2 << 8,\n  InitState_CallingAfterViewInit = 3 << 8,\n  InitState_AfterInit = 4 << 8,\n\n  CatDetectChanges = Attached | ChecksEnabled,\n  CatInit = BeforeFirstCheck | CatDetectChanges | InitState_BeforeInit\n}\n\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nexport function shiftInitState(\n    view: ViewData, priorInitState: ViewState, newInitState: ViewState): boolean {\n  // Only update the InitState if we are currently in the prior state.\n  // For example, only move into CallingInit if we are in BeforeInit. Only\n  // move into CallingContentInit if we are in CallingInit. Normally this will\n  // always be true because of how checkCycle is called in checkAndUpdateView.\n  // However, if checkAndUpdateView is called recursively or if an exception is\n  // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n  // from the beginning. This ensures the state is monotonically increasing,\n  // terminating in the AfterInit state, which ensures the Init methods are called\n  // at least once and only once.\n  const state = view.state;\n  const initState = state & ViewState.InitState_Mask;\n  if (initState === priorInitState) {\n    view.state = (state & ~ViewState.InitState_Mask) | newInitState;\n    view.initIndex = -1;\n    return true;\n  }\n  return initState === newInitState;\n}\n\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nexport function shouldCallLifecycleInitHook(\n    view: ViewData, initState: ViewState, index: number): boolean {\n  if ((view.state & ViewState.InitState_Mask) === initState && view.initIndex <= index) {\n    view.initIndex = index + 1;\n    return true;\n  }\n  return false;\n}\n\nexport interface DisposableFn { (): void; }\n\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nexport class NodeData { private __brand: any; }\n\n/**\n * Data for an instantiated NodeType.Text.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface TextData { renderText: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asTextData(view: ViewData, index: number): TextData {\n  return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Element.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ElementData {\n  renderElement: any;\n  componentView: ViewData;\n  viewContainer: ViewContainerData|null;\n  template: TemplateData;\n}\n\nexport interface ViewContainerData extends ViewContainerRef {\n  // Note: we are using the prefix _ as ViewContainerData is a ViewContainerRef and therefore\n  // directly\n  // exposed to the user.\n  _embeddedViews: ViewData[];\n}\n\nexport interface TemplateData extends TemplateRef<any> {\n  // views that have been created from the template\n  // of this element,\n  // but inserted into the embeddedViews of another element.\n  // By default, this is undefined.\n  // Note: we are using the prefix _ as TemplateData is a TemplateRef and therefore directly\n  // exposed to the user.\n  _projectedViews: ViewData[];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asElementData(view: ViewData, index: number): ElementData {\n  return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Provider.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ProviderData { instance: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asProviderData(view: ViewData, index: number): ProviderData {\n  return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.PureExpression.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface PureExpressionData { value: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asPureExpressionData(view: ViewData, index: number): PureExpressionData {\n  return <any>view.nodes[index];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asQueryList(view: ViewData, index: number): QueryList<any> {\n  return <any>view.nodes[index];\n}\n\nexport interface RootData {\n  injector: Injector;\n  ngModule: NgModuleRef<any>;\n  projectableNodes: any[][];\n  selectorOrNode: any;\n  renderer: Renderer2;\n  rendererFactory: RendererFactory2;\n  errorHandler: ErrorHandler;\n  sanitizer: Sanitizer;\n}\n\nexport abstract class DebugContext {\n  abstract get view(): ViewData;\n  abstract get nodeIndex(): number|null;\n  abstract get injector(): Injector;\n  abstract get component(): any;\n  abstract get providerTokens(): any[];\n  abstract get references(): {[key: string]: any};\n  abstract get context(): any;\n  abstract get componentRenderElement(): any;\n  abstract get renderNode(): any;\n  abstract logError(console: Console, ...values: any[]): void;\n}\n\n// -------------------------------------\n// Other\n// -------------------------------------\n\nexport const enum CheckType {CheckAndUpdate, CheckNoChanges}\n\nexport interface ProviderOverride {\n  token: any;\n  flags: NodeFlags;\n  value: any;\n  deps: ([DepFlags, any]|any)[];\n  deprecatedBehavior: boolean;\n}\n\nexport interface Services {\n  setCurrentNode(view: ViewData, nodeIndex: number): void;\n  createRootView(\n      injector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n      def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData;\n  createEmbeddedView(parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any):\n      ViewData;\n  createComponentView(\n      parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData;\n  createNgModuleRef(\n      moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n      def: NgModuleDefinition): NgModuleRef<any>;\n  overrideProvider(override: ProviderOverride): void;\n  overrideComponentView(compType: Type<any>, compFactory: ComponentFactory<any>): void;\n  clearOverrides(): void;\n  checkAndUpdateView(view: ViewData): void;\n  checkNoChangesView(view: ViewData): void;\n  destroyView(view: ViewData): void;\n  resolveDep(\n      view: ViewData, elDef: NodeDef|null, allowPrivateServices: boolean, depDef: DepDef,\n      notFoundValue?: any): any;\n  createDebugContext(view: ViewData, nodeIndex: number): DebugContext;\n  handleEvent: ViewHandleEventFn;\n  updateDirectives: (view: ViewData, checkType: CheckType) => void;\n  updateRenderer: (view: ViewData, checkType: CheckType) => void;\n  dirtyParentQueries: (view: ViewData) => void;\n}\n\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nexport const Services: Services = {\n  setCurrentNode: undefined !,\n  createRootView: undefined !,\n  createEmbeddedView: undefined !,\n  createComponentView: undefined !,\n  createNgModuleRef: undefined !,\n  overrideProvider: undefined !,\n  overrideComponentView: undefined !,\n  clearOverrides: undefined !,\n  checkAndUpdateView: undefined !,\n  checkNoChangesView: undefined !,\n  destroyView: undefined !,\n  resolveDep: undefined !,\n  createDebugContext: undefined !,\n  handleEvent: undefined !,\n  updateDirectives: undefined !,\n  updateRenderer: undefined !,\n  dirtyParentQueries: undefined !,\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WrappedValue, devModeEqual} from '../change_detection/change_detection';\nimport {SOURCE} from '../di/injector_compatibility';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {looseIdentical} from '../util/comparison';\nimport {stringify} from '../util/stringify';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {BindingDef, BindingFlags, Definition, DefinitionFactory, DepDef, DepFlags, ElementData, NodeDef, NodeFlags, QueryValueType, Services, ViewData, ViewDefinition, ViewDefinitionFactory, ViewFlags, ViewState, asElementData, asTextData} from './types';\n\nexport const NOOP: any = () => {};\n\nconst _tokenKeyCache = new Map<any, string>();\n\nexport function tokenKey(token: any): string {\n  let key = _tokenKeyCache.get(token);\n  if (!key) {\n    key = stringify(token) + '_' + _tokenKeyCache.size;\n    _tokenKeyCache.set(token, key);\n  }\n  return key;\n}\n\nexport function unwrapValue(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any {\n  if (WrappedValue.isWrapped(value)) {\n    value = WrappedValue.unwrap(value);\n    const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n    const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n    view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n  }\n  return value;\n}\n\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createRendererType2(values: {\n  styles: (string | any[])[],\n  encapsulation: ViewEncapsulation,\n  data: {[kind: string]: any[]}\n}): RendererType2 {\n  return {\n    id: UNDEFINED_RENDERER_TYPE_ID,\n    styles: values.styles,\n    encapsulation: values.encapsulation,\n    data: values.data\n  };\n}\n\nlet _renderCompCount = 0;\n\nexport function resolveRendererType2(type?: RendererType2 | null): RendererType2|null {\n  if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n    // first time we see this RendererType2. Initialize it...\n    const isFilled =\n        ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n         type.styles.length || Object.keys(type.data).length);\n    if (isFilled) {\n      type.id = `c${_renderCompCount++}`;\n    } else {\n      type.id = EMPTY_RENDERER_TYPE_ID;\n    }\n  }\n  if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n    type = null;\n  }\n  return type || null;\n}\n\nexport function checkBinding(\n    view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n  const oldValues = view.oldValues;\n  if ((view.state & ViewState.FirstCheck) ||\n      !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n    return true;\n  }\n  return false;\n}\n\nexport function checkAndUpdateBinding(\n    view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n  if (checkBinding(view, def, bindingIdx, value)) {\n    view.oldValues[def.bindingIndex + bindingIdx] = value;\n    return true;\n  }\n  return false;\n}\n\nexport function checkBindingNoChanges(\n    view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n  const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n  if ((view.state & ViewState.BeforeFirstCheck) || !devModeEqual(oldValue, value)) {\n    const bindingName = def.bindings[bindingIdx].name;\n    throw expressionChangedAfterItHasBeenCheckedError(\n        Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`,\n        `${bindingName}: ${value}`, (view.state & ViewState.BeforeFirstCheck) !== 0);\n  }\n}\n\nexport function markParentViewsForCheck(view: ViewData) {\n  let currView: ViewData|null = view;\n  while (currView) {\n    if (currView.def.flags & ViewFlags.OnPush) {\n      currView.state |= ViewState.ChecksEnabled;\n    }\n    currView = currView.viewContainerParent || currView.parent;\n  }\n}\n\nexport function markParentViewsForCheckProjectedViews(view: ViewData, endView: ViewData) {\n  let currView: ViewData|null = view;\n  while (currView && currView !== endView) {\n    currView.state |= ViewState.CheckProjectedViews;\n    currView = currView.viewContainerParent || currView.parent;\n  }\n}\n\nexport function dispatchEvent(\n    view: ViewData, nodeIndex: number, eventName: string, event: any): boolean|undefined {\n  try {\n    const nodeDef = view.def.nodes[nodeIndex];\n    const startView = nodeDef.flags & NodeFlags.ComponentView ?\n        asElementData(view, nodeIndex).componentView :\n        view;\n    markParentViewsForCheck(startView);\n    return Services.handleEvent(view, nodeIndex, eventName, event);\n  } catch (e) {\n    // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n    view.root.errorHandler.handleError(e);\n  }\n}\n\nexport function declaredViewContainer(view: ViewData): ElementData|null {\n  if (view.parent) {\n    const parentView = view.parent;\n    return asElementData(parentView, view.parentNodeDef !.nodeIndex);\n  }\n  return null;\n}\n\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nexport function viewParentEl(view: ViewData): NodeDef|null {\n  const parentView = view.parent;\n  if (parentView) {\n    return view.parentNodeDef !.parent;\n  } else {\n    return null;\n  }\n}\n\nexport function renderNode(view: ViewData, def: NodeDef): any {\n  switch (def.flags & NodeFlags.Types) {\n    case NodeFlags.TypeElement:\n      return asElementData(view, def.nodeIndex).renderElement;\n    case NodeFlags.TypeText:\n      return asTextData(view, def.nodeIndex).renderText;\n  }\n}\n\nexport function elementEventFullName(target: string | null, name: string): string {\n  return target ? `${target}:${name}` : name;\n}\n\nexport function isComponentView(view: ViewData): boolean {\n  return !!view.parent && !!(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function isEmbeddedView(view: ViewData): boolean {\n  return !!view.parent && !(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function filterQueryId(queryId: number): number {\n  return 1 << (queryId % 32);\n}\n\nexport function splitMatchedQueriesDsl(\n    matchedQueriesDsl: [string | number, QueryValueType][] | null): {\n  matchedQueries: {[queryId: string]: QueryValueType},\n  references: {[refId: string]: QueryValueType},\n  matchedQueryIds: number\n} {\n  const matchedQueries: {[queryId: string]: QueryValueType} = {};\n  let matchedQueryIds = 0;\n  const references: {[refId: string]: QueryValueType} = {};\n  if (matchedQueriesDsl) {\n    matchedQueriesDsl.forEach(([queryId, valueType]) => {\n      if (typeof queryId === 'number') {\n        matchedQueries[queryId] = valueType;\n        matchedQueryIds |= filterQueryId(queryId);\n      } else {\n        references[queryId] = valueType;\n      }\n    });\n  }\n  return {matchedQueries, references, matchedQueryIds};\n}\n\nexport function splitDepsDsl(deps: ([DepFlags, any] | any)[], sourceName?: string): DepDef[] {\n  return deps.map(value => {\n    let token: any;\n    let flags: DepFlags;\n    if (Array.isArray(value)) {\n      [flags, token] = value;\n    } else {\n      flags = DepFlags.None;\n      token = value;\n    }\n    if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n      Object.defineProperty(token, SOURCE, {value: sourceName, configurable: true});\n    }\n    return {flags, token, tokenKey: tokenKey(token)};\n  });\n}\n\nexport function getParentRenderElement(view: ViewData, renderHost: any, def: NodeDef): any {\n  let renderParent = def.renderParent;\n  if (renderParent) {\n    if ((renderParent.flags & NodeFlags.TypeElement) === 0 ||\n        (renderParent.flags & NodeFlags.ComponentView) === 0 ||\n        (renderParent.element !.componentRendererType &&\n         renderParent.element !.componentRendererType !.encapsulation ===\n             ViewEncapsulation.Native)) {\n      // only children of non components, or children of components with native encapsulation should\n      // be attached.\n      return asElementData(view, def.renderParent !.nodeIndex).renderElement;\n    }\n  } else {\n    return renderHost;\n  }\n}\n\nconst DEFINITION_CACHE = new WeakMap<any, Definition<any>>();\n\nexport function resolveDefinition<D extends Definition<any>>(factory: DefinitionFactory<D>): D {\n  let value = DEFINITION_CACHE.get(factory) !as D;\n  if (!value) {\n    value = factory(() => NOOP);\n    value.factory = factory;\n    DEFINITION_CACHE.set(factory, value);\n  }\n  return value;\n}\n\nexport function rootRenderNodes(view: ViewData): any[] {\n  const renderNodes: any[] = [];\n  visitRootRenderNodes(view, RenderNodeAction.Collect, undefined, undefined, renderNodes);\n  return renderNodes;\n}\n\nexport const enum RenderNodeAction {Collect, AppendChild, InsertBefore, RemoveChild}\n\nexport function visitRootRenderNodes(\n    view: ViewData, action: RenderNodeAction, parentNode: any, nextSibling: any, target?: any[]) {\n  // We need to re-compute the parent node in case the nodes have been moved around manually\n  if (action === RenderNodeAction.RemoveChild) {\n    parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode !));\n  }\n  visitSiblingRenderNodes(\n      view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nexport function visitSiblingRenderNodes(\n    view: ViewData, action: RenderNodeAction, startIndex: number, endIndex: number, parentNode: any,\n    nextSibling: any, target?: any[]) {\n  for (let i = startIndex; i <= endIndex; i++) {\n    const nodeDef = view.def.nodes[i];\n    if (nodeDef.flags & (NodeFlags.TypeElement | NodeFlags.TypeText | NodeFlags.TypeNgContent)) {\n      visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n    }\n    // jump to next sibling\n    i += nodeDef.childCount;\n  }\n}\n\nexport function visitProjectedRenderNodes(\n    view: ViewData, ngContentIndex: number, action: RenderNodeAction, parentNode: any,\n    nextSibling: any, target?: any[]) {\n  let compView: ViewData|null = view;\n  while (compView && !isComponentView(compView)) {\n    compView = compView.parent;\n  }\n  const hostView = compView !.parent;\n  const hostElDef = viewParentEl(compView !);\n  const startIndex = hostElDef !.nodeIndex + 1;\n  const endIndex = hostElDef !.nodeIndex + hostElDef !.childCount;\n  for (let i = startIndex; i <= endIndex; i++) {\n    const nodeDef = hostView !.def.nodes[i];\n    if (nodeDef.ngContentIndex === ngContentIndex) {\n      visitRenderNode(hostView !, nodeDef, action, parentNode, nextSibling, target);\n    }\n    // jump to next sibling\n    i += nodeDef.childCount;\n  }\n  if (!hostView !.parent) {\n    // a root view\n    const projectedNodes = view.root.projectableNodes[ngContentIndex];\n    if (projectedNodes) {\n      for (let i = 0; i < projectedNodes.length; i++) {\n        execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n      }\n    }\n  }\n}\n\nfunction visitRenderNode(\n    view: ViewData, nodeDef: NodeDef, action: RenderNodeAction, parentNode: any, nextSibling: any,\n    target?: any[]) {\n  if (nodeDef.flags & NodeFlags.TypeNgContent) {\n    visitProjectedRenderNodes(\n        view, nodeDef.ngContent !.index, action, parentNode, nextSibling, target);\n  } else {\n    const rn = renderNode(view, nodeDef);\n    if (action === RenderNodeAction.RemoveChild && (nodeDef.flags & NodeFlags.ComponentView) &&\n        (nodeDef.bindingFlags & BindingFlags.CatSyntheticProperty)) {\n      // Note: we might need to do both actions.\n      if (nodeDef.bindingFlags & (BindingFlags.SyntheticProperty)) {\n        execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n      }\n      if (nodeDef.bindingFlags & (BindingFlags.SyntheticHostProperty)) {\n        const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n        execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n      }\n    } else {\n      execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n    }\n    if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n      const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer !._embeddedViews;\n      for (let k = 0; k < embeddedViews.length; k++) {\n        visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n      }\n    }\n    if (nodeDef.flags & NodeFlags.TypeElement && !nodeDef.element !.name) {\n      visitSiblingRenderNodes(\n          view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode,\n          nextSibling, target);\n    }\n  }\n}\n\nfunction execRenderNodeAction(\n    view: ViewData, renderNode: any, action: RenderNodeAction, parentNode: any, nextSibling: any,\n    target?: any[]) {\n  const renderer = view.renderer;\n  switch (action) {\n    case RenderNodeAction.AppendChild:\n      renderer.appendChild(parentNode, renderNode);\n      break;\n    case RenderNodeAction.InsertBefore:\n      renderer.insertBefore(parentNode, renderNode, nextSibling);\n      break;\n    case RenderNodeAction.RemoveChild:\n      renderer.removeChild(parentNode, renderNode);\n      break;\n    case RenderNodeAction.Collect:\n      target !.push(renderNode);\n      break;\n  }\n}\n\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nexport function splitNamespace(name: string): string[] {\n  if (name[0] === ':') {\n    const match = name.match(NS_PREFIX_RE) !;\n    return [match[1], match[2]];\n  }\n  return ['', name];\n}\n\nexport function calcBindingFlags(bindings: BindingDef[]): BindingFlags {\n  let flags = 0;\n  for (let i = 0; i < bindings.length; i++) {\n    flags |= bindings[i].flags;\n  }\n  return flags;\n}\n\nexport function interpolate(valueCount: number, constAndInterp: string[]): string {\n  let result = '';\n  for (let i = 0; i < valueCount * 2; i = i + 2) {\n    result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n  }\n  return result + constAndInterp[valueCount * 2];\n}\n\nexport function inlineInterpolate(\n    valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any,\n    c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any,\n    c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string {\n  switch (valueCount) {\n    case 1:\n      return c0 + _toStringWithNull(a1) + c1;\n    case 2:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n    case 3:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3;\n    case 4:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4;\n    case 5:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n    case 6:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n    case 7:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n          c6 + _toStringWithNull(a7) + c7;\n    case 8:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n          c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n    case 9:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n          c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n          c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n    default:\n      throw new Error(`Does not support more than 9 expressions`);\n  }\n}\n\nfunction _toStringWithNull(v: any): string {\n  return v != null ? v.toString() : '';\n}\n\nexport const EMPTY_ARRAY: any[] = [];\nexport const EMPTY_MAP: {[key: string]: any} = {};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {Injector} from '../di/injector';\nimport {INJECTOR, setCurrentInjector} from '../di/injector_compatibility';\nimport {getInjectableDef, ÉµÉµInjectableDef} from '../di/interface/defs';\nimport {APP_ROOT} from '../di/scope';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {stringify} from '../util/stringify';\n\nimport {DepDef, DepFlags, NgModuleData, NgModuleDefinition, NgModuleProviderDef, NodeFlags} from './types';\nimport {splitDepsDsl, tokenKey} from './util';\n\nconst UNDEFINED_VALUE = new Object();\n\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\n\nexport function moduleProvideDef(\n    flags: NodeFlags, token: any, value: any,\n    deps: ([DepFlags, any] | any)[]): NgModuleProviderDef {\n  // Need to resolve forwardRefs as e.g. for `useValue` we\n  // lowered the expression and then stopped evaluating it,\n  // i.e. also didn't unwrap it.\n  value = resolveForwardRef(value);\n  const depDefs = splitDepsDsl(deps, stringify(token));\n  return {\n    // will bet set by the module definition\n    index: -1,\n    deps: depDefs, flags, token, value\n  };\n}\n\nexport function moduleDef(providers: NgModuleProviderDef[]): NgModuleDefinition {\n  const providersByKey: {[key: string]: NgModuleProviderDef} = {};\n  const modules = [];\n  let isRoot: boolean = false;\n  for (let i = 0; i < providers.length; i++) {\n    const provider = providers[i];\n    if (provider.token === APP_ROOT && provider.value === true) {\n      isRoot = true;\n    }\n    if (provider.flags & NodeFlags.TypeNgModule) {\n      modules.push(provider.token);\n    }\n    provider.index = i;\n    providersByKey[tokenKey(provider.token)] = provider;\n  }\n  return {\n    // Will be filled later...\n    factory: null,\n    providersByKey,\n    providers,\n    modules,\n    isRoot,\n  };\n}\n\nexport function initNgModule(data: NgModuleData) {\n  const def = data._def;\n  const providers = data._providers = new Array(def.providers.length);\n  for (let i = 0; i < def.providers.length; i++) {\n    const provDef = def.providers[i];\n    if (!(provDef.flags & NodeFlags.LazyProvider)) {\n      // Make sure the provider has not been already initialized outside this loop.\n      if (providers[i] === undefined) {\n        providers[i] = _createProviderInstance(data, provDef);\n      }\n    }\n  }\n}\n\nexport function resolveNgModuleDep(\n    data: NgModuleData, depDef: DepDef, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n  const former = setCurrentInjector(data);\n  try {\n    if (depDef.flags & DepFlags.Value) {\n      return depDef.token;\n    }\n    if (depDef.flags & DepFlags.Optional) {\n      notFoundValue = null;\n    }\n    if (depDef.flags & DepFlags.SkipSelf) {\n      return data._parent.get(depDef.token, notFoundValue);\n    }\n    const tokenKey = depDef.tokenKey;\n    switch (tokenKey) {\n      case InjectorRefTokenKey:\n      case INJECTORRefTokenKey:\n      case NgModuleRefTokenKey:\n        return data;\n    }\n    const providerDef = data._def.providersByKey[tokenKey];\n    let injectableDef: ÉµÉµInjectableDef<any>|null;\n    if (providerDef) {\n      let providerInstance = data._providers[providerDef.index];\n      if (providerInstance === undefined) {\n        providerInstance = data._providers[providerDef.index] =\n            _createProviderInstance(data, providerDef);\n      }\n      return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n    } else if (\n        (injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n      const index = data._providers.length;\n      data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n        flags: NodeFlags.TypeFactoryProvider | NodeFlags.LazyProvider,\n        value: injectableDef.factory,\n        deps: [], index,\n        token: depDef.token,\n      };\n      data._providers[index] = UNDEFINED_VALUE;\n      return (\n          data._providers[index] =\n              _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n    } else if (depDef.flags & DepFlags.Self) {\n      return notFoundValue;\n    }\n    return data._parent.get(depDef.token, notFoundValue);\n  } finally {\n    setCurrentInjector(former);\n  }\n}\n\nfunction moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean {\n  return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule: NgModuleData, def: ÉµÉµInjectableDef<any>): boolean {\n  return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n                                    def.providedIn === 'root' && ngModule._def.isRoot);\n}\n\nfunction _createProviderInstance(ngModule: NgModuleData, providerDef: NgModuleProviderDef): any {\n  let injectable: any;\n  switch (providerDef.flags & NodeFlags.Types) {\n    case NodeFlags.TypeClassProvider:\n      injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n      break;\n    case NodeFlags.TypeFactoryProvider:\n      injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n      break;\n    case NodeFlags.TypeUseExistingProvider:\n      injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n      break;\n    case NodeFlags.TypeValueProvider:\n      injectable = providerDef.value;\n      break;\n  }\n\n  // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n  // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n  // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n  // set (ngOnDestroy was detected statically).\n  if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n      !(providerDef.flags & NodeFlags.OnDestroy) && typeof injectable.ngOnDestroy === 'function') {\n    providerDef.flags |= NodeFlags.OnDestroy;\n  }\n  return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule: NgModuleData, ctor: any, deps: DepDef[]): any {\n  const len = deps.length;\n  switch (len) {\n    case 0:\n      return new ctor();\n    case 1:\n      return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n    case 2:\n      return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n    case 3:\n      return new ctor(\n          resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n          resolveNgModuleDep(ngModule, deps[2]));\n    default:\n      const depValues = new Array(len);\n      for (let i = 0; i < len; i++) {\n        depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n      }\n      return new ctor(...depValues);\n  }\n}\n\nfunction _callFactory(ngModule: NgModuleData, factory: any, deps: DepDef[]): any {\n  const len = deps.length;\n  switch (len) {\n    case 0:\n      return factory();\n    case 1:\n      return factory(resolveNgModuleDep(ngModule, deps[0]));\n    case 2:\n      return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n    case 3:\n      return factory(\n          resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n          resolveNgModuleDep(ngModule, deps[2]));\n    default:\n      const depValues = Array(len);\n      for (let i = 0; i < len; i++) {\n        depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n      }\n      return factory(...depValues);\n  }\n}\n\nexport function callNgModuleLifecycle(ngModule: NgModuleData, lifecycles: NodeFlags) {\n  const def = ngModule._def;\n  const destroyed = new Set<any>();\n  for (let i = 0; i < def.providers.length; i++) {\n    const provDef = def.providers[i];\n    if (provDef.flags & NodeFlags.OnDestroy) {\n      const instance = ngModule._providers[i];\n      if (instance && instance !== UNDEFINED_VALUE) {\n        const onDestroy: Function|undefined = instance.ngOnDestroy;\n        if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n          onDestroy.apply(instance);\n          destroyed.add(instance);\n        }\n      }\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {ElementData, NodeDef, NodeFlags, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {RenderNodeAction, declaredViewContainer, renderNode, visitRootRenderNodes} from './util';\n\nexport function attachEmbeddedView(\n    parentView: ViewData, elementData: ElementData, viewIndex: number | undefined | null,\n    view: ViewData) {\n  let embeddedViews = elementData.viewContainer !._embeddedViews;\n  if (viewIndex === null || viewIndex === undefined) {\n    viewIndex = embeddedViews.length;\n  }\n  view.viewContainerParent = parentView;\n  addToArray(embeddedViews, viewIndex !, view);\n  attachProjectedView(elementData, view);\n\n  Services.dirtyParentQueries(view);\n\n  const prevView = viewIndex ! > 0 ? embeddedViews[viewIndex ! - 1] : null;\n  renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData: ElementData, view: ViewData) {\n  const dvcElementData = declaredViewContainer(view);\n  if (!dvcElementData || dvcElementData === vcElementData ||\n      view.state & ViewState.IsProjectedView) {\n    return;\n  }\n  // Note: For performance reasons, we\n  // - add a view to template._projectedViews only 1x throughout its lifetime,\n  //   and remove it not until the view is destroyed.\n  //   (hard, as when a parent view is attached/detached we would need to attach/detach all\n  //    nested projected views as well, even across component boundaries).\n  // - don't track the insertion order of views in the projected views array\n  //   (hard, as when the views of the same template are inserted different view containers)\n  view.state |= ViewState.IsProjectedView;\n  let projectedViews = dvcElementData.template._projectedViews;\n  if (!projectedViews) {\n    projectedViews = dvcElementData.template._projectedViews = [];\n  }\n  projectedViews.push(view);\n  // Note: we are changing the NodeDef here as we cannot calculate\n  // the fact whether a template is used for projection during compilation.\n  markNodeAsProjectedTemplate(view.parent !.def, view.parentNodeDef !);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef: ViewDefinition, nodeDef: NodeDef) {\n  if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n    return;\n  }\n  viewDef.nodeFlags |= NodeFlags.ProjectedTemplate;\n  nodeDef.flags |= NodeFlags.ProjectedTemplate;\n  let parentNodeDef = nodeDef.parent;\n  while (parentNodeDef) {\n    parentNodeDef.childFlags |= NodeFlags.ProjectedTemplate;\n    parentNodeDef = parentNodeDef.parent;\n  }\n}\n\nexport function detachEmbeddedView(elementData: ElementData, viewIndex?: number): ViewData|null {\n  const embeddedViews = elementData.viewContainer !._embeddedViews;\n  if (viewIndex == null || viewIndex >= embeddedViews.length) {\n    viewIndex = embeddedViews.length - 1;\n  }\n  if (viewIndex < 0) {\n    return null;\n  }\n  const view = embeddedViews[viewIndex];\n  view.viewContainerParent = null;\n  removeFromArray(embeddedViews, viewIndex);\n\n  // See attachProjectedView for why we don't update projectedViews here.\n  Services.dirtyParentQueries(view);\n\n  renderDetachView(view);\n\n  return view;\n}\n\nexport function detachProjectedView(view: ViewData) {\n  if (!(view.state & ViewState.IsProjectedView)) {\n    return;\n  }\n  const dvcElementData = declaredViewContainer(view);\n  if (dvcElementData) {\n    const projectedViews = dvcElementData.template._projectedViews;\n    if (projectedViews) {\n      removeFromArray(projectedViews, projectedViews.indexOf(view));\n      Services.dirtyParentQueries(view);\n    }\n  }\n}\n\nexport function moveEmbeddedView(\n    elementData: ElementData, oldViewIndex: number, newViewIndex: number): ViewData {\n  const embeddedViews = elementData.viewContainer !._embeddedViews;\n  const view = embeddedViews[oldViewIndex];\n  removeFromArray(embeddedViews, oldViewIndex);\n  if (newViewIndex == null) {\n    newViewIndex = embeddedViews.length;\n  }\n  addToArray(embeddedViews, newViewIndex, view);\n\n  // Note: Don't need to change projectedViews as the order in there\n  // as always invalid...\n\n  Services.dirtyParentQueries(view);\n\n  renderDetachView(view);\n  const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n  renderAttachEmbeddedView(elementData, prevView, view);\n\n  return view;\n}\n\nfunction renderAttachEmbeddedView(\n    elementData: ElementData, prevView: ViewData | null, view: ViewData) {\n  const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode !) :\n                                    elementData.renderElement;\n  const parentNode = view.renderer.parentNode(prevRenderNode);\n  const nextSibling = view.renderer.nextSibling(prevRenderNode);\n  // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n  // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n  visitRootRenderNodes(view, RenderNodeAction.InsertBefore, parentNode, nextSibling, undefined);\n}\n\nexport function renderDetachView(view: ViewData) {\n  visitRootRenderNodes(view, RenderNodeAction.RemoveChild, null, null, undefined);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef} from '../linker/element_ref';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef, InternalViewRef, ViewRef} from '../linker/view_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {stringify} from '../util/stringify';\nimport {VERSION} from '../version';\n\nimport {callNgModuleLifecycle, initNgModule, resolveNgModuleDep} from './ng_module';\nimport {DepFlags, ElementData, NgModuleData, NgModuleDefinition, NodeDef, NodeFlags, Services, TemplateData, ViewContainerData, ViewData, ViewDefinitionFactory, ViewState, asElementData, asProviderData, asTextData} from './types';\nimport {markParentViewsForCheck, resolveDefinition, rootRenderNodes, splitNamespace, tokenKey, viewParentEl} from './util';\nimport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView, renderDetachView} from './view_attach';\n\nconst EMPTY_CONTEXT = new Object();\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createComponentFactory(\n    selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory,\n    inputs: {[propName: string]: string} | null, outputs: {[propName: string]: string},\n    ngContentSelectors: string[]): ComponentFactory<any> {\n  return new ComponentFactory_(\n      selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nexport function getComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>):\n    ViewDefinitionFactory {\n  return (componentFactory as ComponentFactory_).viewDefFactory;\n}\n\nclass ComponentFactory_ extends ComponentFactory<any> {\n  /**\n   * @internal\n   */\n  viewDefFactory: ViewDefinitionFactory;\n\n  constructor(\n      public selector: string, public componentType: Type<any>,\n      viewDefFactory: ViewDefinitionFactory, private _inputs: {[propName: string]: string}|null,\n      private _outputs: {[propName: string]: string}, public ngContentSelectors: string[]) {\n    // Attention: this ctor is called as top level function.\n    // Putting any logic in here will destroy closure tree shaking!\n    super();\n    this.viewDefFactory = viewDefFactory;\n  }\n\n  get inputs() {\n    const inputsArr: {propName: string, templateName: string}[] = [];\n    const inputs = this._inputs !;\n    for (let propName in inputs) {\n      const templateName = inputs[propName];\n      inputsArr.push({propName, templateName});\n    }\n    return inputsArr;\n  }\n\n  get outputs() {\n    const outputsArr: {propName: string, templateName: string}[] = [];\n    for (let propName in this._outputs) {\n      const templateName = this._outputs[propName];\n      outputsArr.push({propName, templateName});\n    }\n    return outputsArr;\n  }\n\n  /**\n   * Creates a new component.\n   */\n  create(\n      injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n      ngModule?: NgModuleRef<any>): ComponentRef<any> {\n    if (!ngModule) {\n      throw new Error('ngModule should be provided');\n    }\n    const viewDef = resolveDefinition(this.viewDefFactory);\n    const componentNodeIndex = viewDef.nodes[0].element !.componentProvider !.nodeIndex;\n    const view = Services.createRootView(\n        injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n    const component = asProviderData(view, componentNodeIndex).instance;\n    if (rootSelectorOrNode) {\n      view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n    }\n\n    return new ComponentRef_(view, new ViewRef_(view), component);\n  }\n}\n\nclass ComponentRef_ extends ComponentRef<any> {\n  public readonly hostView: ViewRef;\n  public readonly instance: any;\n  public readonly changeDetectorRef: ChangeDetectorRef;\n  private _elDef: NodeDef;\n  constructor(private _view: ViewData, private _viewRef: ViewRef, private _component: any) {\n    super();\n    this._elDef = this._view.def.nodes[0];\n    this.hostView = _viewRef;\n    this.changeDetectorRef = _viewRef;\n    this.instance = _component;\n  }\n  get location(): ElementRef {\n    return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n  }\n  get injector(): Injector { return new Injector_(this._view, this._elDef); }\n  get componentType(): Type<any> { return <any>this._component.constructor; }\n\n  destroy(): void { this._viewRef.destroy(); }\n  onDestroy(callback: Function): void { this._viewRef.onDestroy(callback); }\n}\n\nexport function createViewContainerData(\n    view: ViewData, elDef: NodeDef, elData: ElementData): ViewContainerData {\n  return new ViewContainerRef_(view, elDef, elData);\n}\n\nclass ViewContainerRef_ implements ViewContainerData {\n  /**\n   * @internal\n   */\n  _embeddedViews: ViewData[] = [];\n  constructor(private _view: ViewData, private _elDef: NodeDef, private _data: ElementData) {}\n\n  get element(): ElementRef { return new ElementRef(this._data.renderElement); }\n\n  get injector(): Injector { return new Injector_(this._view, this._elDef); }\n\n  /** @deprecated No replacement */\n  get parentInjector(): Injector {\n    let view = this._view;\n    let elDef = this._elDef.parent;\n    while (!elDef && view) {\n      elDef = viewParentEl(view);\n      view = view.parent !;\n    }\n\n    return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n  }\n\n  clear(): void {\n    const len = this._embeddedViews.length;\n    for (let i = len - 1; i >= 0; i--) {\n      const view = detachEmbeddedView(this._data, i) !;\n      Services.destroyView(view);\n    }\n  }\n\n  get(index: number): ViewRef|null {\n    const view = this._embeddedViews[index];\n    if (view) {\n      const ref = new ViewRef_(view);\n      ref.attachToViewContainerRef(this);\n      return ref;\n    }\n    return null;\n  }\n\n  get length(): number { return this._embeddedViews.length; }\n\n  createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n      EmbeddedViewRef<C> {\n    const viewRef = templateRef.createEmbeddedView(context || <any>{});\n    this.insert(viewRef, index);\n    return viewRef;\n  }\n\n  createComponent<C>(\n      componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n      projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C> {\n    const contextInjector = injector || this.parentInjector;\n    if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n      ngModuleRef = contextInjector.get(NgModuleRef);\n    }\n    const componentRef =\n        componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n    this.insert(componentRef.hostView, index);\n    return componentRef;\n  }\n\n  insert(viewRef: ViewRef, index?: number): ViewRef {\n    if (viewRef.destroyed) {\n      throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n    }\n    const viewRef_ = <ViewRef_>viewRef;\n    const viewData = viewRef_._view;\n    attachEmbeddedView(this._view, this._data, index, viewData);\n    viewRef_.attachToViewContainerRef(this);\n    return viewRef;\n  }\n\n  move(viewRef: ViewRef_, currentIndex: number): ViewRef {\n    if (viewRef.destroyed) {\n      throw new Error('Cannot move a destroyed View in a ViewContainer!');\n    }\n    const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n    moveEmbeddedView(this._data, previousIndex, currentIndex);\n    return viewRef;\n  }\n\n  indexOf(viewRef: ViewRef): number {\n    return this._embeddedViews.indexOf((<ViewRef_>viewRef)._view);\n  }\n\n  remove(index?: number): void {\n    const viewData = detachEmbeddedView(this._data, index);\n    if (viewData) {\n      Services.destroyView(viewData);\n    }\n  }\n\n  detach(index?: number): ViewRef|null {\n    const view = detachEmbeddedView(this._data, index);\n    return view ? new ViewRef_(view) : null;\n  }\n}\n\nexport function createChangeDetectorRef(view: ViewData): ChangeDetectorRef {\n  return new ViewRef_(view);\n}\n\nexport class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {\n  /** @internal */\n  _view: ViewData;\n  private _viewContainerRef: ViewContainerRef|null;\n  private _appRef: ApplicationRef|null;\n\n  constructor(_view: ViewData) {\n    this._view = _view;\n    this._viewContainerRef = null;\n    this._appRef = null;\n  }\n\n  get rootNodes(): any[] { return rootRenderNodes(this._view); }\n\n  get context() { return this._view.context; }\n\n  get destroyed(): boolean { return (this._view.state & ViewState.Destroyed) !== 0; }\n\n  markForCheck(): void { markParentViewsForCheck(this._view); }\n  detach(): void { this._view.state &= ~ViewState.Attached; }\n  detectChanges(): void {\n    const fs = this._view.root.rendererFactory;\n    if (fs.begin) {\n      fs.begin();\n    }\n    try {\n      Services.checkAndUpdateView(this._view);\n    } finally {\n      if (fs.end) {\n        fs.end();\n      }\n    }\n  }\n  checkNoChanges(): void { Services.checkNoChangesView(this._view); }\n\n  reattach(): void { this._view.state |= ViewState.Attached; }\n  onDestroy(callback: Function) {\n    if (!this._view.disposables) {\n      this._view.disposables = [];\n    }\n    this._view.disposables.push(<any>callback);\n  }\n\n  destroy() {\n    if (this._appRef) {\n      this._appRef.detachView(this);\n    } else if (this._viewContainerRef) {\n      this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n    }\n    Services.destroyView(this._view);\n  }\n\n  detachFromAppRef() {\n    this._appRef = null;\n    renderDetachView(this._view);\n    Services.dirtyParentQueries(this._view);\n  }\n\n  attachToAppRef(appRef: ApplicationRef) {\n    if (this._viewContainerRef) {\n      throw new Error('This view is already attached to a ViewContainer!');\n    }\n    this._appRef = appRef;\n  }\n\n  attachToViewContainerRef(vcRef: ViewContainerRef) {\n    if (this._appRef) {\n      throw new Error('This view is already attached directly to the ApplicationRef!');\n    }\n    this._viewContainerRef = vcRef;\n  }\n}\n\nexport function createTemplateData(view: ViewData, def: NodeDef): TemplateData {\n  return new TemplateRef_(view, def);\n}\n\nclass TemplateRef_ extends TemplateRef<any> implements TemplateData {\n  /**\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _projectedViews !: ViewData[];\n\n  constructor(private _parentView: ViewData, private _def: NodeDef) { super(); }\n\n  createEmbeddedView(context: any): EmbeddedViewRef<any> {\n    return new ViewRef_(Services.createEmbeddedView(\n        this._parentView, this._def, this._def.element !.template !, context));\n  }\n\n  get elementRef(): ElementRef {\n    return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n  }\n}\n\nexport function createInjector(view: ViewData, elDef: NodeDef): Injector {\n  return new Injector_(view, elDef);\n}\n\nclass Injector_ implements Injector {\n  constructor(private view: ViewData, private elDef: NodeDef|null) {}\n  get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n    const allowPrivateServices =\n        this.elDef ? (this.elDef.flags & NodeFlags.ComponentView) !== 0 : false;\n    return Services.resolveDep(\n        this.view, this.elDef, allowPrivateServices,\n        {flags: DepFlags.None, token, tokenKey: tokenKey(token)}, notFoundValue);\n  }\n}\n\nexport function nodeValue(view: ViewData, index: number): any {\n  const def = view.def.nodes[index];\n  if (def.flags & NodeFlags.TypeElement) {\n    const elData = asElementData(view, def.nodeIndex);\n    return def.element !.template ? elData.template : elData.renderElement;\n  } else if (def.flags & NodeFlags.TypeText) {\n    return asTextData(view, def.nodeIndex).renderText;\n  } else if (def.flags & (NodeFlags.CatProvider | NodeFlags.TypePipe)) {\n    return asProviderData(view, def.nodeIndex).instance;\n  }\n  throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\n\nexport function createRendererV1(view: ViewData): RendererV1 {\n  return new RendererAdapter(view.renderer);\n}\n\nclass RendererAdapter implements RendererV1 {\n  constructor(private delegate: Renderer2) {}\n  selectRootElement(selectorOrNode: string|Element): Element {\n    return this.delegate.selectRootElement(selectorOrNode);\n  }\n\n  createElement(parent: Element|DocumentFragment, namespaceAndName: string): Element {\n    const [ns, name] = splitNamespace(namespaceAndName);\n    const el = this.delegate.createElement(name, ns);\n    if (parent) {\n      this.delegate.appendChild(parent, el);\n    }\n    return el;\n  }\n\n  createViewRoot(hostElement: Element): Element|DocumentFragment { return hostElement; }\n\n  createTemplateAnchor(parentElement: Element|DocumentFragment): Comment {\n    const comment = this.delegate.createComment('');\n    if (parentElement) {\n      this.delegate.appendChild(parentElement, comment);\n    }\n    return comment;\n  }\n\n  createText(parentElement: Element|DocumentFragment, value: string): any {\n    const node = this.delegate.createText(value);\n    if (parentElement) {\n      this.delegate.appendChild(parentElement, node);\n    }\n    return node;\n  }\n\n  projectNodes(parentElement: Element|DocumentFragment, nodes: Node[]) {\n    for (let i = 0; i < nodes.length; i++) {\n      this.delegate.appendChild(parentElement, nodes[i]);\n    }\n  }\n\n  attachViewAfter(node: Node, viewRootNodes: Node[]) {\n    const parentElement = this.delegate.parentNode(node);\n    const nextSibling = this.delegate.nextSibling(node);\n    for (let i = 0; i < viewRootNodes.length; i++) {\n      this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n    }\n  }\n\n  detachView(viewRootNodes: (Element|Text|Comment)[]) {\n    for (let i = 0; i < viewRootNodes.length; i++) {\n      const node = viewRootNodes[i];\n      const parentElement = this.delegate.parentNode(node);\n      this.delegate.removeChild(parentElement, node);\n    }\n  }\n\n  destroyView(hostElement: Element|DocumentFragment, viewAllNodes: Node[]) {\n    for (let i = 0; i < viewAllNodes.length; i++) {\n      this.delegate.destroyNode !(viewAllNodes[i]);\n    }\n  }\n\n  listen(renderElement: any, name: string, callback: Function): Function {\n    return this.delegate.listen(renderElement, name, <any>callback);\n  }\n\n  listenGlobal(target: string, name: string, callback: Function): Function {\n    return this.delegate.listen(target, name, <any>callback);\n  }\n\n  setElementProperty(\n      renderElement: Element|DocumentFragment, propertyName: string, propertyValue: any): void {\n    this.delegate.setProperty(renderElement, propertyName, propertyValue);\n  }\n\n  setElementAttribute(renderElement: Element, namespaceAndName: string, attributeValue?: string):\n      void {\n    const [ns, name] = splitNamespace(namespaceAndName);\n    if (attributeValue != null) {\n      this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n    } else {\n      this.delegate.removeAttribute(renderElement, name, ns);\n    }\n  }\n\n  setBindingDebugInfo(renderElement: Element, propertyName: string, propertyValue: string): void {}\n\n  setElementClass(renderElement: Element, className: string, isAdd: boolean): void {\n    if (isAdd) {\n      this.delegate.addClass(renderElement, className);\n    } else {\n      this.delegate.removeClass(renderElement, className);\n    }\n  }\n\n  setElementStyle(renderElement: HTMLElement, styleName: string, styleValue?: string): void {\n    if (styleValue != null) {\n      this.delegate.setStyle(renderElement, styleName, styleValue);\n    } else {\n      this.delegate.removeStyle(renderElement, styleName);\n    }\n  }\n\n  invokeElementMethod(renderElement: Element, methodName: string, args: any[]): void {\n    (renderElement as any)[methodName].apply(renderElement, args);\n  }\n\n  setText(renderNode: Text, text: string): void { this.delegate.setValue(renderNode, text); }\n\n  animate(): any { throw new Error('Renderer.animate is no longer supported!'); }\n}\n\n\nexport function createNgModuleRef(\n    moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n    def: NgModuleDefinition): NgModuleRef<any> {\n  return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nclass NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {\n  private _destroyListeners: (() => void)[] = [];\n  private _destroyed: boolean = false;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _providers !: any[];\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _modules !: any[];\n\n  readonly injector: Injector = this;\n\n  constructor(\n      private _moduleType: Type<any>, public _parent: Injector,\n      public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {\n    initNgModule(this);\n  }\n\n  get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n      injectFlags: InjectFlags = InjectFlags.Default): any {\n    let flags = DepFlags.None;\n    if (injectFlags & InjectFlags.SkipSelf) {\n      flags |= DepFlags.SkipSelf;\n    } else if (injectFlags & InjectFlags.Self) {\n      flags |= DepFlags.Self;\n    }\n    return resolveNgModuleDep(\n        this, {token: token, tokenKey: tokenKey(token), flags: flags}, notFoundValue);\n  }\n\n  get instance() { return this.get(this._moduleType); }\n\n  get componentFactoryResolver() { return this.get(ComponentFactoryResolver); }\n\n  destroy(): void {\n    if (this._destroyed) {\n      throw new Error(\n          `The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n    }\n    this._destroyed = true;\n    callNgModuleLifecycle(this, NodeFlags.OnDestroy);\n    this._destroyListeners.forEach((listener) => listener());\n  }\n\n  onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, SimpleChange, SimpleChanges, WrappedValue} from '../change_detection/change_detection';\nimport {INJECTOR, Injector, resolveForwardRef} from '../di';\nimport {ElementRef} from '../linker/element_ref';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {isObservable} from '../util/lang';\nimport {stringify} from '../util/stringify';\n\nimport {createChangeDetectorRef, createInjector, createRendererV1} from './refs';\nimport {BindingDef, BindingFlags, DepDef, DepFlags, NodeDef, NodeFlags, OutputDef, OutputType, ProviderData, QueryValueType, Services, ViewData, ViewFlags, ViewState, asElementData, asProviderData, shouldCallLifecycleInitHook} from './types';\nimport {calcBindingFlags, checkBinding, dispatchEvent, isComponentView, splitDepsDsl, splitMatchedQueriesDsl, tokenKey, viewParentEl} from './util';\n\nconst RendererV1TokenKey = tokenKey(RendererV1);\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\n\nexport function directiveDef(\n    checkIndex: number, flags: NodeFlags,\n    matchedQueries: null | [string | number, QueryValueType][], childCount: number, ctor: any,\n    deps: ([DepFlags, any] | any)[], props?: null | {[name: string]: [number, string]},\n    outputs?: null | {[name: string]: string}): NodeDef {\n  const bindings: BindingDef[] = [];\n  if (props) {\n    for (let prop in props) {\n      const [bindingIndex, nonMinifiedName] = props[prop];\n      bindings[bindingIndex] = {\n        flags: BindingFlags.TypeProperty,\n        name: prop, nonMinifiedName,\n        ns: null,\n        securityContext: null,\n        suffix: null\n      };\n    }\n  }\n  const outputDefs: OutputDef[] = [];\n  if (outputs) {\n    for (let propName in outputs) {\n      outputDefs.push(\n          {type: OutputType.DirectiveOutput, propName, target: null, eventName: outputs[propName]});\n    }\n  }\n  flags |= NodeFlags.TypeDirective;\n  return _def(\n      checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nexport function pipeDef(flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n  flags |= NodeFlags.TypePipe;\n  return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nexport function providerDef(\n    flags: NodeFlags, matchedQueries: null | [string | number, QueryValueType][], token: any,\n    value: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n  return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nexport function _def(\n    checkIndex: number, flags: NodeFlags,\n    matchedQueriesDsl: [string | number, QueryValueType][] | null, childCount: number, token: any,\n    value: any, deps: ([DepFlags, any] | any)[], bindings?: BindingDef[],\n    outputs?: OutputDef[]): NodeDef {\n  const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n  if (!outputs) {\n    outputs = [];\n  }\n  if (!bindings) {\n    bindings = [];\n  }\n  // Need to resolve forwardRefs as e.g. for `useValue` we\n  // lowered the expression and then stopped evaluating it,\n  // i.e. also didn't unwrap it.\n  value = resolveForwardRef(value);\n\n  const depDefs = splitDepsDsl(deps, stringify(token));\n\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    checkIndex,\n    flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0, matchedQueries, matchedQueryIds, references,\n    ngContentIndex: -1, childCount, bindings,\n    bindingFlags: calcBindingFlags(bindings), outputs,\n    element: null,\n    provider: {token, value, deps: depDefs},\n    text: null,\n    query: null,\n    ngContent: null\n  };\n}\n\nexport function createProviderInstance(view: ViewData, def: NodeDef): any {\n  return _createProviderInstance(view, def);\n}\n\nexport function createPipeInstance(view: ViewData, def: NodeDef): any {\n  // deps are looked up from component.\n  let compView = view;\n  while (compView.parent && !isComponentView(compView)) {\n    compView = compView.parent;\n  }\n  // pipes can see the private services of the component\n  const allowPrivateServices = true;\n  // pipes are always eager and classes!\n  return createClass(\n      compView.parent !, viewParentEl(compView) !, allowPrivateServices, def.provider !.value,\n      def.provider !.deps);\n}\n\nexport function createDirectiveInstance(view: ViewData, def: NodeDef): any {\n  // components can see other private services, other directives can't.\n  const allowPrivateServices = (def.flags & NodeFlags.Component) > 0;\n  // directives are always eager and classes!\n  const instance = createClass(\n      view, def.parent !, allowPrivateServices, def.provider !.value, def.provider !.deps);\n  if (def.outputs.length) {\n    for (let i = 0; i < def.outputs.length; i++) {\n      const output = def.outputs[i];\n      const outputObservable = instance[output.propName !];\n      if (isObservable(outputObservable)) {\n        const subscription = outputObservable.subscribe(\n            eventHandlerClosure(view, def.parent !.nodeIndex, output.eventName));\n        view.disposables ![def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n      } else {\n        throw new Error(\n            `@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n      }\n    }\n  }\n  return instance;\n}\n\nfunction eventHandlerClosure(view: ViewData, index: number, eventName: string) {\n  return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\nexport function checkAndUpdateDirectiveInline(\n    view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n    v7: any, v8: any, v9: any): boolean {\n  const providerData = asProviderData(view, def.nodeIndex);\n  const directive = providerData.instance;\n  let changed = false;\n  let changes: SimpleChanges = undefined !;\n  const bindLen = def.bindings.length;\n  if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 0, v0, changes);\n  }\n  if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 1, v1, changes);\n  }\n  if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 2, v2, changes);\n  }\n  if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 3, v3, changes);\n  }\n  if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 4, v4, changes);\n  }\n  if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 5, v5, changes);\n  }\n  if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 6, v6, changes);\n  }\n  if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 7, v7, changes);\n  }\n  if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 8, v8, changes);\n  }\n  if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 9, v9, changes);\n  }\n  if (changes) {\n    directive.ngOnChanges(changes);\n  }\n  if ((def.flags & NodeFlags.OnInit) &&\n      shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n    directive.ngOnInit();\n  }\n  if (def.flags & NodeFlags.DoCheck) {\n    directive.ngDoCheck();\n  }\n  return changed;\n}\n\nexport function checkAndUpdateDirectiveDynamic(\n    view: ViewData, def: NodeDef, values: any[]): boolean {\n  const providerData = asProviderData(view, def.nodeIndex);\n  const directive = providerData.instance;\n  let changed = false;\n  let changes: SimpleChanges = undefined !;\n  for (let i = 0; i < values.length; i++) {\n    if (checkBinding(view, def, i, values[i])) {\n      changed = true;\n      changes = updateProp(view, providerData, def, i, values[i], changes);\n    }\n  }\n  if (changes) {\n    directive.ngOnChanges(changes);\n  }\n  if ((def.flags & NodeFlags.OnInit) &&\n      shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n    directive.ngOnInit();\n  }\n  if (def.flags & NodeFlags.DoCheck) {\n    directive.ngDoCheck();\n  }\n  return changed;\n}\n\nfunction _createProviderInstance(view: ViewData, def: NodeDef): any {\n  // private services can see other private services\n  const allowPrivateServices = (def.flags & NodeFlags.PrivateProvider) > 0;\n  const providerDef = def.provider;\n  switch (def.flags & NodeFlags.Types) {\n    case NodeFlags.TypeClassProvider:\n      return createClass(\n          view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n    case NodeFlags.TypeFactoryProvider:\n      return callFactory(\n          view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n    case NodeFlags.TypeUseExistingProvider:\n      return resolveDep(view, def.parent !, allowPrivateServices, providerDef !.deps[0]);\n    case NodeFlags.TypeValueProvider:\n      return providerDef !.value;\n  }\n}\n\nfunction createClass(\n    view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, ctor: any, deps: DepDef[]): any {\n  const len = deps.length;\n  switch (len) {\n    case 0:\n      return new ctor();\n    case 1:\n      return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n    case 2:\n      return new ctor(\n          resolveDep(view, elDef, allowPrivateServices, deps[0]),\n          resolveDep(view, elDef, allowPrivateServices, deps[1]));\n    case 3:\n      return new ctor(\n          resolveDep(view, elDef, allowPrivateServices, deps[0]),\n          resolveDep(view, elDef, allowPrivateServices, deps[1]),\n          resolveDep(view, elDef, allowPrivateServices, deps[2]));\n    default:\n      const depValues = new Array(len);\n      for (let i = 0; i < len; i++) {\n        depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n      }\n      return new ctor(...depValues);\n  }\n}\n\nfunction callFactory(\n    view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, factory: any,\n    deps: DepDef[]): any {\n  const len = deps.length;\n  switch (len) {\n    case 0:\n      return factory();\n    case 1:\n      return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n    case 2:\n      return factory(\n          resolveDep(view, elDef, allowPrivateServices, deps[0]),\n          resolveDep(view, elDef, allowPrivateServices, deps[1]));\n    case 3:\n      return factory(\n          resolveDep(view, elDef, allowPrivateServices, deps[0]),\n          resolveDep(view, elDef, allowPrivateServices, deps[1]),\n          resolveDep(view, elDef, allowPrivateServices, deps[2]));\n    default:\n      const depValues = Array(len);\n      for (let i = 0; i < len; i++) {\n        depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n      }\n      return factory(...depValues);\n  }\n}\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n//          mod1\n//         /\n//       el1   mod2\n//         \\  /\n//         el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nexport function resolveDep(\n    view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, depDef: DepDef,\n    notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n  if (depDef.flags & DepFlags.Value) {\n    return depDef.token;\n  }\n  const startView = view;\n  if (depDef.flags & DepFlags.Optional) {\n    notFoundValue = null;\n  }\n  const tokenKey = depDef.tokenKey;\n\n  if (tokenKey === ChangeDetectorRefTokenKey) {\n    // directives on the same element as a component should be able to control the change detector\n    // of that component as well.\n    allowPrivateServices = !!(elDef && elDef.element !.componentView);\n  }\n\n  if (elDef && (depDef.flags & DepFlags.SkipSelf)) {\n    allowPrivateServices = false;\n    elDef = elDef.parent !;\n  }\n\n  let searchView: ViewData|null = view;\n  while (searchView) {\n    if (elDef) {\n      switch (tokenKey) {\n        case RendererV1TokenKey: {\n          const compView = findCompView(searchView, elDef, allowPrivateServices);\n          return createRendererV1(compView);\n        }\n        case Renderer2TokenKey: {\n          const compView = findCompView(searchView, elDef, allowPrivateServices);\n          return compView.renderer;\n        }\n        case ElementRefTokenKey:\n          return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n        case ViewContainerRefTokenKey:\n          return asElementData(searchView, elDef.nodeIndex).viewContainer;\n        case TemplateRefTokenKey: {\n          if (elDef.element !.template) {\n            return asElementData(searchView, elDef.nodeIndex).template;\n          }\n          break;\n        }\n        case ChangeDetectorRefTokenKey: {\n          let cdView = findCompView(searchView, elDef, allowPrivateServices);\n          return createChangeDetectorRef(cdView);\n        }\n        case InjectorRefTokenKey:\n        case INJECTORRefTokenKey:\n          return createInjector(searchView, elDef);\n        default:\n          const providerDef =\n              (allowPrivateServices ? elDef.element !.allProviders :\n                                      elDef.element !.publicProviders) ![tokenKey];\n          if (providerDef) {\n            let providerData = asProviderData(searchView, providerDef.nodeIndex);\n            if (!providerData) {\n              providerData = {instance: _createProviderInstance(searchView, providerDef)};\n              searchView.nodes[providerDef.nodeIndex] = providerData as any;\n            }\n            return providerData.instance;\n          }\n      }\n    }\n\n    allowPrivateServices = isComponentView(searchView);\n    elDef = viewParentEl(searchView) !;\n    searchView = searchView.parent !;\n\n    if (depDef.flags & DepFlags.Self) {\n      searchView = null;\n    }\n  }\n\n  const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n  if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n      notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n    // Return the value from the root element injector when\n    // - it provides it\n    //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n    // - the module injector should not be checked\n    //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n    return value;\n  }\n\n  return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\n\nfunction findCompView(view: ViewData, elDef: NodeDef, allowPrivateServices: boolean) {\n  let compView: ViewData;\n  if (allowPrivateServices) {\n    compView = asElementData(view, elDef.nodeIndex).componentView;\n  } else {\n    compView = view;\n    while (compView.parent && !isComponentView(compView)) {\n      compView = compView.parent;\n    }\n  }\n  return compView;\n}\n\nfunction updateProp(\n    view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,\n    changes: SimpleChanges): SimpleChanges {\n  if (def.flags & NodeFlags.Component) {\n    const compView = asElementData(view, def.parent !.nodeIndex).componentView;\n    if (compView.def.flags & ViewFlags.OnPush) {\n      compView.state |= ViewState.ChecksEnabled;\n    }\n  }\n  const binding = def.bindings[bindingIdx];\n  const propName = binding.name !;\n  // Note: This is still safe with Closure Compiler as\n  // the user passed in the property name as an object has to `providerDef`,\n  // so Closure Compiler will have renamed the property correctly already.\n  providerData.instance[propName] = value;\n  if (def.flags & NodeFlags.OnChanges) {\n    changes = changes || {};\n    const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n    const binding = def.bindings[bindingIdx];\n    changes[binding.nonMinifiedName !] =\n        new SimpleChange(oldValue, value, (view.state & ViewState.FirstCheck) !== 0);\n  }\n  view.oldValues[def.bindingIndex + bindingIdx] = value;\n  return changes;\n}\n\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n//  Tree:       pre-order index  post-order index\n//    E1        0                6\n//      E2      1                1\n//       D3     2                0\n//      E4      3                5\n//       E5     4                4\n//        E6    5                2\n//        E7    6                3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nexport function callLifecycleHooksChildrenFirst(view: ViewData, lifecycles: NodeFlags) {\n  if (!(view.def.nodeFlags & lifecycles)) {\n    return;\n  }\n  const nodes = view.def.nodes;\n  let initIndex = 0;\n  for (let i = 0; i < nodes.length; i++) {\n    const nodeDef = nodes[i];\n    let parent = nodeDef.parent;\n    if (!parent && nodeDef.flags & lifecycles) {\n      // matching root node (e.g. a pipe)\n      callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n    }\n    if ((nodeDef.childFlags & lifecycles) === 0) {\n      // no child matches one of the lifecycles\n      i += nodeDef.childCount;\n    }\n    while (parent && (parent.flags & NodeFlags.TypeElement) &&\n           i === parent.nodeIndex + parent.childCount) {\n      // last child of an element\n      if (parent.directChildFlags & lifecycles) {\n        initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n      }\n      parent = parent.parent;\n    }\n  }\n}\n\nfunction callElementProvidersLifecycles(\n    view: ViewData, elDef: NodeDef, lifecycles: NodeFlags, initIndex: number): number {\n  for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n    const nodeDef = view.def.nodes[i];\n    if (nodeDef.flags & lifecycles) {\n      callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n    }\n    // only visit direct children\n    i += nodeDef.childCount;\n  }\n  return initIndex;\n}\n\nfunction callProviderLifecycles(\n    view: ViewData, index: number, lifecycles: NodeFlags, initIndex: number) {\n  const providerData = asProviderData(view, index);\n  if (!providerData) {\n    return;\n  }\n  const provider = providerData.instance;\n  if (!provider) {\n    return;\n  }\n  Services.setCurrentNode(view, index);\n  if (lifecycles & NodeFlags.AfterContentInit &&\n      shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterContentInit, initIndex)) {\n    provider.ngAfterContentInit();\n  }\n  if (lifecycles & NodeFlags.AfterContentChecked) {\n    provider.ngAfterContentChecked();\n  }\n  if (lifecycles & NodeFlags.AfterViewInit &&\n      shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterViewInit, initIndex)) {\n    provider.ngAfterViewInit();\n  }\n  if (lifecycles & NodeFlags.AfterViewChecked) {\n    provider.ngAfterViewChecked();\n  }\n  if (lifecycles & NodeFlags.OnDestroy) {\n    provider.ngOnDestroy();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef as viewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider';\n\nimport {assertComponentType} from './assert';\nimport {LifecycleHooksFeature, createRootComponent, createRootComponentView, createRootContext} from './component';\nimport {getComponentDef} from './definition';\nimport {NodeInjector} from './di';\nimport {addToViewTree, assignTViewNodeToLView, createLView, createTView, elementCreate, locateHostElement, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef} from './interfaces/definition';\nimport {TContainerNode, TElementContainerNode, TElementNode} from './interfaces/node';\nimport {RNode, RendererFactory3, domRendererFactory3, isProceduralRenderer} from './interfaces/renderer';\nimport {LView, LViewFlags, TVIEW} from './interfaces/view';\nimport {enterView, leaveView, namespaceHTMLInternal} from './state';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getTNode} from './util/view_utils';\nimport {createElementRef} from './view_engine_compatibility';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends viewEngine_ComponentFactoryResolver {\n  /**\n   * @param ngModule The NgModuleRef to which all resolved factories are bound.\n   */\n  constructor(private ngModule?: viewEngine_NgModuleRef<any>) { super(); }\n\n  resolveComponentFactory<T>(component: Type<T>): viewEngine_ComponentFactory<T> {\n    ngDevMode && assertComponentType(component);\n    const componentDef = getComponentDef(component) !;\n    return new ComponentFactory(componentDef, this.ngModule);\n  }\n}\n\nfunction toRefArray(map: {[key: string]: string}): {propName: string; templateName: string;}[] {\n  const array: {propName: string; templateName: string;}[] = [];\n  for (let nonMinified in map) {\n    if (map.hasOwnProperty(nonMinified)) {\n      const minified = map[nonMinified];\n      array.push({propName: minified, templateName: nonMinified});\n    }\n  }\n  return array;\n}\n\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nexport const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDULER_TOKEN', {\n  providedIn: 'root',\n  factory: () => defaultScheduler,\n});\n\nfunction createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector {\n  return {\n    get: <T>(token: Type<T>| InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T => {\n      const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags);\n\n      if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n          notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n        // Return the value from the root element injector when\n        // - it provides it\n        //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        // - the module injector should not be checked\n        //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        return value;\n      }\n\n      return moduleInjector.get(token, notFoundValue, flags);\n    }\n  };\n}\n\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nexport class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {\n  selector: string;\n  componentType: Type<any>;\n  ngContentSelectors: string[];\n  isBoundToModule: boolean;\n\n  get inputs(): {propName: string; templateName: string;}[] {\n    return toRefArray(this.componentDef.inputs);\n  }\n\n  get outputs(): {propName: string; templateName: string;}[] {\n    return toRefArray(this.componentDef.outputs);\n  }\n\n  /**\n   * @param componentDef The component definition.\n   * @param ngModule The NgModuleRef to which the factory is bound.\n   */\n  constructor(\n      private componentDef: ComponentDef<any>, private ngModule?: viewEngine_NgModuleRef<any>) {\n    super();\n    this.componentType = componentDef.type;\n\n    // default to 'div' in case this component has an attribute selector\n    this.selector = componentDef.selectors[0][0] as string || 'div';\n    this.ngContentSelectors =\n        componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n    this.isBoundToModule = !!ngModule;\n  }\n\n  create(\n      injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n      ngModule?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<T> {\n    ngModule = ngModule || this.ngModule;\n\n    const rootViewInjector =\n        ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n\n    const rendererFactory =\n        rootViewInjector.get(RendererFactory2, domRendererFactory3) as RendererFactory3;\n    const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n    // Ensure that the namespace for the root node is correct,\n    // otherwise the browser might not render out the element properly.\n    namespaceHTMLInternal();\n    const hostRNode = rootSelectorOrNode ?\n        locateHostElement(rendererFactory, rootSelectorOrNode) :\n        elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef));\n\n    const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n                                                 LViewFlags.CheckAlways | LViewFlags.IsRoot;\n\n    // Check whether this Component needs to be isolated from other components, i.e. whether it\n    // should be placed into its own (empty) root context or existing root context should be used.\n    // Note: this is internal-only convention and might change in the future, so it should not be\n    // relied upon externally.\n    const isIsolated = typeof rootSelectorOrNode === 'string' &&\n        /^#root-ng-internal-isolated-\\d+/.test(rootSelectorOrNode);\n\n    const rootContext = createRootContext();\n    const renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);\n\n    if (rootSelectorOrNode && hostRNode) {\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      isProceduralRenderer(renderer) ?\n          renderer.setAttribute(hostRNode, 'ng-version', VERSION.full) :\n          hostRNode.setAttribute('ng-version', VERSION.full);\n    }\n\n    // Create the root view. Uses empty TView and ContentTemplate.\n    const rootLView = createLView(\n        null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null,\n        null, rendererFactory, renderer, sanitizer, rootViewInjector);\n\n    // rootView is the parent when bootstrapping\n    const oldLView = enterView(rootLView, null);\n\n    let component: T;\n    let tElementNode: TElementNode;\n\n    // Will become true if the `try` block executes with no errors.\n    let safeToRunHooks = false;\n    try {\n      const componentView = createRootComponentView(\n          hostRNode, this.componentDef, rootLView, rendererFactory, renderer);\n\n      tElementNode = getTNode(0, rootLView) as TElementNode;\n\n      if (projectableNodes) {\n        // projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n        // case). Here we do normalize passed data structure to be an array of arrays to avoid\n        // complex checks down the line.\n        tElementNode.projection =\n            projectableNodes.map((nodesforSlot: RNode[]) => { return Array.from(nodesforSlot); });\n      }\n\n      // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n      // executed here?\n      // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n      component = createRootComponent(\n          componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n\n      addToViewTree(rootLView, componentView);\n      refreshDescendantViews(rootLView);\n      safeToRunHooks = true;\n    } finally {\n      leaveView(oldLView, safeToRunHooks);\n    }\n\n    const componentRef = new ComponentRef(\n        this.componentType, component,\n        createElementRef(viewEngine_ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n\n    if (!rootSelectorOrNode || isIsolated) {\n      // The host element of the internal or isolated root view is attached to the component's host\n      // view node.\n      componentRef.hostView._tViewNode !.child = tElementNode;\n    }\n    return componentRef;\n  }\n}\n\nconst componentFactoryResolver: ComponentFactoryResolver = new ComponentFactoryResolver();\n\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nexport function injectComponentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n  return componentFactoryResolver;\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends viewEngine_ComponentRef<T> {\n  destroyCbs: (() => void)[]|null = [];\n  instance: T;\n  hostView: ViewRef<T>;\n  changeDetectorRef: ViewEngine_ChangeDetectorRef;\n  componentType: Type<T>;\n\n  constructor(\n      componentType: Type<T>, instance: T, public location: viewEngine_ElementRef,\n      private _rootLView: LView,\n      private _tNode: TElementNode|TContainerNode|TElementContainerNode) {\n    super();\n    this.instance = instance;\n    this.hostView = this.changeDetectorRef = new RootViewRef<T>(_rootLView);\n    this.hostView._tViewNode = assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n    this.componentType = componentType;\n  }\n\n  get injector(): Injector { return new NodeInjector(this._tNode, this._rootLView); }\n\n  destroy(): void {\n    if (this.destroyCbs) {\n      this.destroyCbs.forEach(fn => fn());\n      this.destroyCbs = null;\n      !this.hostView.destroyed && this.hostView.destroy();\n    }\n  }\n\n  onDestroy(callback: () => void): void {\n    if (this.destroyCbs) {\n      this.destroyCbs.push(callback);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n  const ngI18nClosureMode: boolean;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n  // These property accesses can be ignored because ngI18nClosureMode will be set to false\n  // when optimizing code and the whole if statement will be dropped.\n  // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n  // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n  (function() {\n    // tslint:disable-next-line:no-toplevel-property-access\n    global['ngI18nClosureMode'] =\n        // TODO(FW-1250): validate that this actually, you know, works.\n        // tslint:disable-next-line:no-toplevel-property-access\n        typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n  })();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nexport const LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n  LocaleId = 0,\n  DayPeriodsFormat,\n  DayPeriodsStandalone,\n  DaysFormat,\n  DaysStandalone,\n  MonthsFormat,\n  MonthsStandalone,\n  Eras,\n  FirstDayOfWeek,\n  WeekendRange,\n  DateFormat,\n  TimeFormat,\n  DateTimeFormat,\n  NumberSymbols,\n  NumberFormats,\n  CurrencySymbol,\n  CurrencyName,\n  Currencies,\n  PluralCase,\n  ExtraData\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\n\nconst u = undefined;\n\nfunction plural(n: number): number {\n  let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n  if (i === 1 && v === 0) return 1;\n  return 5;\n}\n\nexport default [\n  'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],\n  [\n    ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n    ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n    ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n  ],\n  u,\n  [\n    ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n    ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n    [\n      'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n      'October', 'November', 'December'\n    ]\n  ],\n  u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],\n  ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n  ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n  ['.', ',', ';', '%', '+', '-', 'E', 'Ã', 'â°', 'â', 'NaN', ':'],\n  ['#,##0.###', '#,##0%', 'Â¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LOCALE_DATA, LocaleDataIndex} from './locale_data';\nimport localeEn from './locale_en';\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.PluralCase];\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function findLocaleData(locale: string): any {\n  const normalizedLocale = locale.toLowerCase().replace(/_/g, '-');\n\n  let match = LOCALE_DATA[normalizedLocale];\n  if (match) {\n    return match;\n  }\n\n  // let's try to find a parent locale\n  const parentLocale = normalizedLocale.split('-')[0];\n  match = LOCALE_DATA[parentLocale];\n\n  if (match) {\n    return match;\n  }\n\n  if (parentLocale === 'en') {\n    return localeEn;\n  }\n\n  throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLocalePluralCase} from './locale_data_api';\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: any, locale: string): string {\n  const plural = getLocalePluralCase(locale)(value);\n\n  switch (plural) {\n    case 0:\n      return 'zero';\n    case 1:\n      return 'one';\n    case 2:\n      return 'two';\n    case 3:\n      return 'few';\n    case 4:\n      return 'many';\n    default:\n      return 'other';\n  }\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_i18n_closure_mode';\nimport {DEFAULT_LOCALE_ID, getPluralCase} from '../i18n/localization';\nimport {SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS, getTemplateContent} from '../sanitization/html_sanitizer';\nimport {InertBodyHelper} from '../sanitization/inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from '../sanitization/url_sanitizer';\nimport {addAllToArray} from '../util/array_utils';\nimport {assertDataInRange, assertDefined, assertEqual, assertGreaterThan} from '../util/assert';\nimport {attachPatchData} from './context_discovery';\nimport {bind, setDelayProjection, ÉµÉµload} from './instructions/all';\nimport {attachI18nOpCodesDebug} from './instructions/lview_debug';\nimport {TsickleIssue1009, allocExpando, elementAttributeInternal, elementPropertyInternal, getOrCreateTNode, setInputsForProperty, textBindingInternal} from './instructions/shared';\nimport {LContainer, NATIVE} from './interfaces/container';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from './interfaces/node';\nimport {RComment, RElement, RText} from './interfaces/renderer';\nimport {SanitizerFn} from './interfaces/sanitization';\nimport {isLContainer} from './interfaces/type_checks';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {appendChild, appendProjectedNodes, createTextNode, nativeRemoveNode} from './node_manipulation';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getNativeByIndex, getNativeByTNode, getTNode} from './util/view_utils';\n\n\nconst MARKER = `ï¿½`;\nconst ICU_BLOCK_REGEXP = /^\\s*(ï¿½\\d+:?\\d*ï¿½)\\s*,\\s*(select|plural)\\s*,/;\nconst SUBTEMPLATE_REGEXP = /ï¿½\\/?\\*(\\d+:\\d+)ï¿½/gi;\nconst PH_REGEXP = /ï¿½(\\/?[#*!]\\d+):?\\d*ï¿½/gi;\nconst BINDING_REGEXP = /ï¿½(\\d+):?\\d*ï¿½/gi;\nconst ICU_REGEXP = /({\\s*ï¿½\\d+:?\\d*ï¿½\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst enum TagType {\n  ELEMENT = '#',\n  TEMPLATE = '*',\n  PROJECTION = '!',\n}\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(ï¿½.+?ï¿½?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(ï¿½.+?ï¿½?)\\]|(ï¿½\\/?\\*\\d+:\\d+ï¿½)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /ï¿½I18N_EXP_(ICU(_\\d+)?)ï¿½/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\ninterface IcuExpression {\n  type: IcuType;\n  mainBinding: number;\n  cases: string[];\n  values: (string|IcuExpression)[][];\n}\n\ninterface IcuCase {\n  /**\n   * Number of slots to allocate in expando for this case.\n   *\n   * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n   * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n   * write into them.\n   */\n  vars: number;\n\n  /**\n   * An optional array of child/sub ICUs.\n   */\n  childIcus: number[];\n\n  /**\n   * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n   */\n  create: I18nMutateOpCodes;\n\n  /**\n   * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n   */\n  remove: I18nMutateOpCodes;\n\n  /**\n   * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n   */\n  update: I18nUpdateOpCodes;\n}\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression into\n * keys and cases.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n *\n */\nfunction extractParts(pattern: string): (string | IcuExpression)[] {\n  if (!pattern) {\n    return [];\n  }\n\n  let prevPos = 0;\n  const braceStack = [];\n  const results: (string | IcuExpression)[] = [];\n  const braces = /[{}]/g;\n  // lastIndex doesn't get set to 0 so we have to.\n  braces.lastIndex = 0;\n\n  let match;\n  while (match = braces.exec(pattern)) {\n    const pos = match.index;\n    if (match[0] == '}') {\n      braceStack.pop();\n\n      if (braceStack.length == 0) {\n        // End of the block.\n        const block = pattern.substring(prevPos, pos);\n        if (ICU_BLOCK_REGEXP.test(block)) {\n          results.push(parseICUBlock(block));\n        } else {\n          results.push(block);\n        }\n\n        prevPos = pos + 1;\n      }\n    } else {\n      if (braceStack.length == 0) {\n        const substring = pattern.substring(prevPos, pos);\n        results.push(substring);\n        prevPos = pos + 1;\n      }\n      braceStack.push('{');\n    }\n  }\n\n  const substring = pattern.substring(prevPos);\n  results.push(substring);\n  return results;\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern: string): IcuExpression {\n  const cases = [];\n  const values: (string | IcuExpression)[][] = [];\n  let icuType = IcuType.plural;\n  let mainBinding = 0;\n  pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str: string, binding: string, type: string) {\n    if (type === 'select') {\n      icuType = IcuType.select;\n    } else {\n      icuType = IcuType.plural;\n    }\n    mainBinding = parseInt(binding.substr(1), 10);\n    return '';\n  });\n\n  const parts = extractParts(pattern) as string[];\n  // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n  for (let pos = 0; pos < parts.length;) {\n    let key = parts[pos++].trim();\n    if (icuType === IcuType.plural) {\n      // Key can be \"=x\", we just want \"x\"\n      key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n    }\n    if (key.length) {\n      cases.push(key);\n    }\n\n    const blocks = extractParts(parts[pos++]) as string[];\n    if (cases.length > values.length) {\n      values.push(blocks);\n    }\n  }\n\n  assertGreaterThan(cases.indexOf('other'), -1, 'Missing key \"other\" in ICU statement.');\n  // TODO(ocombe): support ICU expressions in attributes, see #21615\n  return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n  let match;\n  let res = '';\n  let index = 0;\n  let inTemplate = false;\n  let tagMatched;\n\n  while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n    if (!inTemplate) {\n      res += message.substring(index, match.index + match[0].length);\n      tagMatched = match[1];\n      inTemplate = true;\n    } else {\n      if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n        index = match.index;\n        inTemplate = false;\n      }\n    }\n  }\n\n  ngDevMode &&\n      assertEqual(\n          inTemplate, false,\n          `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n\n  res += message.substr(index);\n  return res;\n}\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A translated\n * message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex?: number) {\n  if (typeof subTemplateIndex !== 'number') {\n    // We want the root template message, ignore all sub-templates\n    return removeInnerTemplateTranslation(message);\n  } else {\n    // We want a specific sub-template\n    const start =\n        message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n    const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n    return removeInnerTemplateTranslation(message.substring(start, end));\n  }\n}\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n */\nfunction generateBindingUpdateOpCodes(\n    str: string, destinationNode: number, attrName?: string,\n    sanitizeFn: SanitizerFn | null = null): I18nUpdateOpCodes {\n  const updateOpCodes: I18nUpdateOpCodes = [null, null];  // Alloc space for mask and size\n  const textParts = str.split(BINDING_REGEXP);\n  let mask = 0;\n\n  for (let j = 0; j < textParts.length; j++) {\n    const textValue = textParts[j];\n\n    if (j & 1) {\n      // Odd indexes are bindings\n      const bindingIndex = parseInt(textValue, 10);\n      updateOpCodes.push(-1 - bindingIndex);\n      mask = mask | toMaskBit(bindingIndex);\n    } else if (textValue !== '') {\n      // Even indexes are text\n      updateOpCodes.push(textValue);\n    }\n  }\n\n  updateOpCodes.push(\n      destinationNode << I18nUpdateOpCode.SHIFT_REF |\n      (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text));\n  if (attrName) {\n    updateOpCodes.push(attrName, sanitizeFn);\n  }\n  updateOpCodes[0] = mask;\n  updateOpCodes[1] = updateOpCodes.length - 2;\n  return updateOpCodes;\n}\n\nfunction getBindingMask(icuExpression: IcuExpression, mask = 0): number {\n  mask = mask | toMaskBit(icuExpression.mainBinding);\n  let match;\n  for (let i = 0; i < icuExpression.values.length; i++) {\n    const valueArr = icuExpression.values[i];\n    for (let j = 0; j < valueArr.length; j++) {\n      const value = valueArr[j];\n      if (typeof value === 'string') {\n        while (match = BINDING_REGEXP.exec(value)) {\n          mask = mask | toMaskBit(parseInt(match[1], 10));\n        }\n      } else {\n        mask = getBindingMask(value as IcuExpression, mask);\n      }\n    }\n  }\n  return mask;\n}\n\nconst i18nIndexStack: number[] = [];\nlet i18nIndexStackPointer = -1;\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have\n * more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is\n * that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n  return 1 << Math.min(bindingIndex, 31);\n}\n\nconst parentIndexStack: number[] = [];\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `ï¿½{index}(:{block})ï¿½`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `ï¿½#{index}(:{block})ï¿½`/`ï¿½/#{index}(:{block})ï¿½`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `ï¿½!{index}(:{block})ï¿½`/`ï¿½/!{index}(:{block})ï¿½`: *Projection Placeholder*:  Marks the\n *   beginning and end of <ng-content> that was embedded in the original translation block.\n *   The placeholder `index` points to the element index in the template instructions set.\n *   An optional `block` that matches the sub-template in which it was declared.\n * - `ï¿½*{index}:{block}ï¿½`/`ï¿½/*{index}:{block}ï¿½`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nStart(index: number, message: string, subTemplateIndex?: number): void {\n  const tView = getLView()[TVIEW];\n  ngDevMode && assertDefined(tView, `tView should be defined`);\n  i18nIndexStack[++i18nIndexStackPointer] = index;\n  // We need to delay projections until `i18nEnd`\n  setDelayProjection(true);\n  if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n    i18nStartFirstPass(tView, index, message, subTemplateIndex);\n  }\n}\n\n// Count for the number of vars that will be allocated for each i18n block.\n// It is global because this is used in multiple functions that include loops and recursive calls.\n// This is reset to 0 when `i18nStartFirstPass` is called.\nlet i18nVarsCount: number;\n\n/**\n * See `i18nStart` above.\n */\nfunction i18nStartFirstPass(\n    tView: TView, index: number, message: string, subTemplateIndex?: number) {\n  const viewData = getLView();\n  const startIndex = tView.blueprint.length - HEADER_OFFSET;\n  i18nVarsCount = 0;\n  const previousOrParentTNode = getPreviousOrParentTNode();\n  const parentTNode = getIsParent() ? getPreviousOrParentTNode() :\n                                      previousOrParentTNode && previousOrParentTNode.parent;\n  let parentIndex =\n      parentTNode && parentTNode !== viewData[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;\n  let parentIndexPointer = 0;\n  parentIndexStack[parentIndexPointer] = parentIndex;\n  const createOpCodes: I18nMutateOpCodes = [];\n  // If the previous node wasn't the direct parent then we have a translation without top level\n  // element and we need to keep a reference of the previous element if there is one\n  if (index > 0 && previousOrParentTNode !== parentTNode) {\n    // Create an OpCode to select the previous TNode\n    createOpCodes.push(\n        previousOrParentTNode.index << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select);\n  }\n  const updateOpCodes: I18nUpdateOpCodes = [];\n  const icuExpressions: TIcu[] = [];\n\n  const templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n  const msgParts = replaceNgsp(templateTranslation).split(PH_REGEXP);\n  for (let i = 0; i < msgParts.length; i++) {\n    let value = msgParts[i];\n    if (i & 1) {\n      // Odd indexes are placeholders (elements and sub-templates)\n      if (value.charAt(0) === '/') {\n        // It is a closing tag\n        if (value.charAt(1) === TagType.ELEMENT) {\n          const phIndex = parseInt(value.substr(2), 10);\n          parentIndex = parentIndexStack[--parentIndexPointer];\n          createOpCodes.push(phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.ElementEnd);\n        }\n      } else {\n        const phIndex = parseInt(value.substr(1), 10);\n        // The value represents a placeholder that we move to the designated index\n        createOpCodes.push(\n            phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select,\n            parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n        if (value.charAt(0) === TagType.ELEMENT) {\n          parentIndexStack[++parentIndexPointer] = parentIndex = phIndex;\n        }\n      }\n    } else {\n      // Even indexes are text (including bindings & ICU expressions)\n      const parts = extractParts(value);\n      for (let j = 0; j < parts.length; j++) {\n        if (j & 1) {\n          // Odd indexes are ICU expressions\n          // Create the comment node that will anchor the ICU expression\n          const icuNodeIndex = startIndex + i18nVarsCount++;\n          createOpCodes.push(\n              COMMENT_MARKER, ngDevMode ? `ICU ${icuNodeIndex}` : '', icuNodeIndex,\n              parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n          // Update codes for the ICU expression\n          const icuExpression = parts[j] as IcuExpression;\n          const mask = getBindingMask(icuExpression);\n          icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex);\n          // Since this is recursive, the last TIcu that was pushed is the one we want\n          const tIcuIndex = icuExpressions.length - 1;\n          updateOpCodes.push(\n              toMaskBit(icuExpression.mainBinding),  // mask of the main binding\n              3,                                     // skip 3 opCodes if not changed\n              -1 - icuExpression.mainBinding,\n              icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch, tIcuIndex,\n              mask,  // mask of all the bindings of this ICU expression\n              2,     // skip 2 opCodes if not changed\n              icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate, tIcuIndex);\n        } else if (parts[j] !== '') {\n          const text = parts[j] as string;\n          // Even indexes are text (including bindings)\n          const hasBinding = text.match(BINDING_REGEXP);\n          // Create text nodes\n          const textNodeIndex = startIndex + i18nVarsCount++;\n          createOpCodes.push(\n              // If there is a binding, the value will be set during update\n              hasBinding ? '' : text, textNodeIndex,\n              parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n          if (hasBinding) {\n            addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);\n          }\n        }\n      }\n    }\n  }\n\n  if (i18nVarsCount > 0) {\n    allocExpando(viewData, i18nVarsCount);\n  }\n\n  ngDevMode &&\n      attachI18nOpCodesDebug(\n          createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, viewData);\n\n  // NOTE: local var needed to properly assert the type of `TI18n`.\n  const tI18n: TI18n = {\n    vars: i18nVarsCount,\n    create: createOpCodes,\n    update: updateOpCodes,\n    icus: icuExpressions.length ? icuExpressions : null,\n  };\n\n  tView.data[index + HEADER_OFFSET] = tI18n;\n}\n\nfunction appendI18nNode(\n    tNode: TNode, parentTNode: TNode, previousTNode: TNode | null, viewData: LView): TNode {\n  ngDevMode && ngDevMode.rendererMoveNode++;\n  const nextNode = tNode.next;\n  if (!previousTNode) {\n    previousTNode = parentTNode;\n  }\n\n  // Re-organize node tree to put this node in the correct position.\n  if (previousTNode === parentTNode && tNode !== parentTNode.child) {\n    tNode.next = parentTNode.child;\n    parentTNode.child = tNode;\n  } else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {\n    tNode.next = previousTNode.next;\n    previousTNode.next = tNode;\n  } else {\n    tNode.next = null;\n  }\n\n  if (parentTNode !== viewData[T_HOST]) {\n    tNode.parent = parentTNode as TElementNode;\n  }\n\n  // If tNode was moved around, we might need to fix a broken link.\n  let cursor: TNode|null = tNode.next;\n  while (cursor) {\n    if (cursor.next === tNode) {\n      cursor.next = nextNode;\n    }\n    cursor = cursor.next;\n  }\n\n  // If the placeholder to append is a projection, we need to move the projected nodes instead\n  if (tNode.type === TNodeType.Projection) {\n    const tProjectionNode = tNode as TProjectionNode;\n    appendProjectedNodes(\n        viewData, tProjectionNode, tProjectionNode.projection, findComponentView(viewData));\n    return tNode;\n  }\n\n  appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);\n\n  const slotValue = viewData[tNode.index];\n  if (tNode.type !== TNodeType.Container && isLContainer(slotValue)) {\n    // Nodes that inject ViewContainerRef also have a comment node that should be moved\n    appendChild(slotValue[NATIVE], tNode, viewData);\n  }\n  return tNode;\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [ï¿½*1:1ï¿½ï¿½#2:1ï¿½|ï¿½#4:1ï¿½|ï¿½5ï¿½])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like ï¿½ICU_EXP_ICU_1ï¿½)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nPostprocess(\n    message: string, replacements: {[key: string]: (string | string[])} = {}): string {\n  /**\n   * Step 1: resolve all multi-value placeholders like [ï¿½#5ï¿½|ï¿½*1:1ï¿½ï¿½#2:1ï¿½|ï¿½#4:1ï¿½]\n   *\n   * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n   * grouped by templates, for example: [ï¿½#5ï¿½|ï¿½#6ï¿½|ï¿½#1:1ï¿½|ï¿½#3:2ï¿½] where ï¿½#5ï¿½ and ï¿½#6ï¿½ belong to root\n   * template, ï¿½#1:1ï¿½ belong to nested template with index 1 and ï¿½#1:2ï¿½ - nested template with index\n   * 3. However in real templates the order might be different: i.e. ï¿½#1:1ï¿½ and/or ï¿½#3:2ï¿½ may go in\n   * front of ï¿½#6ï¿½. The post processing step restores the right order by keeping track of the\n   * template id stack and looks for placeholders that belong to the currently active template.\n   */\n  let result: string = message;\n  if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n    const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n    const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n    result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n      const content = phs || tmpl;\n      const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n      if (!placeholders.length) {\n        content.split('|').forEach((placeholder: string) => {\n          const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n          const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n          const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n          placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n        });\n        matches[content] = placeholders;\n      }\n\n      if (!placeholders.length) {\n        throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n      }\n\n      const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n      let idx = 0;\n      // find placeholder index that matches current template id\n      for (let i = 0; i < placeholders.length; i++) {\n        if (placeholders[i][0] === currentTemplateId) {\n          idx = i;\n          break;\n        }\n      }\n      // update template id stack based on the current tag extracted\n      const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n      if (isCloseTemplateTag) {\n        templateIdsStack.pop();\n      } else if (currentTemplateId !== templateId) {\n        templateIdsStack.push(templateId);\n      }\n      // remove processed tag from the list\n      placeholders.splice(idx, 1);\n      return placeholder;\n    });\n  }\n\n  // return current result if no replacements specified\n  if (!Object.keys(replacements).length) {\n    return result;\n  }\n\n  /**\n   * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n   */\n  result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n    return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n  });\n\n  /**\n   * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n   */\n  result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key): string => {\n    return replacements.hasOwnProperty(key) ? replacements[key] as string : match;\n  });\n\n  /**\n   * Step 4: replace all ICU references with corresponding values (like ï¿½ICU_EXP_ICU_1ï¿½) in case\n   * multiple ICUs have the same placeholder name\n   */\n  result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n    if (replacements.hasOwnProperty(key)) {\n      const list = replacements[key] as string[];\n      if (!list.length) {\n        throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n      }\n      return list.shift() !;\n    }\n    return match;\n  });\n\n  return result;\n}\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nEnd(): void {\n  const tView = getLView()[TVIEW];\n  ngDevMode && assertDefined(tView, `tView should be defined`);\n  i18nEndFirstPass(tView);\n  // Stop delaying projections\n  setDelayProjection(false);\n}\n\n/**\n * See `i18nEnd` above.\n */\nfunction i18nEndFirstPass(tView: TView) {\n  const viewData = getLView();\n  ngDevMode && assertEqual(\n                   viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex,\n                   'i18nEnd should be called before any binding');\n\n  const rootIndex = i18nIndexStack[i18nIndexStackPointer--];\n  const tI18n = tView.data[rootIndex + HEADER_OFFSET] as TI18n;\n  ngDevMode && assertDefined(tI18n, `You should call i18nStart before i18nEnd`);\n\n  // Find the last node that was added before `i18nEnd`\n  let lastCreatedNode = getPreviousOrParentTNode();\n\n  // Read the instructions to insert/move/remove DOM elements\n  const visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData);\n\n  // Remove deleted nodes\n  for (let i = rootIndex + 1; i <= lastCreatedNode.index - HEADER_OFFSET; i++) {\n    if (visitedNodes.indexOf(i) === -1) {\n      removeNode(i, viewData);\n    }\n  }\n}\n\n/**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\nfunction createDynamicNodeAtIndex(\n    lView: LView, index: number, type: TNodeType, native: RElement | RText | null,\n    name: string | null): TElementNode|TIcuContainerNode {\n  const previousOrParentTNode = getPreviousOrParentTNode();\n  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n  lView[index + HEADER_OFFSET] = native;\n  const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, type as any, name, null);\n\n  // We are creating a dynamic node, the previous tNode might not be pointing at this node.\n  // We will link ourselves into the tree later with `appendI18nNode`.\n  if (previousOrParentTNode.next === tNode) {\n    previousOrParentTNode.next = null;\n  }\n\n  return tNode;\n}\n\nfunction readCreateOpCodes(\n    index: number, createOpCodes: I18nMutateOpCodes, icus: TIcu[] | null,\n    viewData: LView): number[] {\n  const renderer = getLView()[RENDERER];\n  let currentTNode: TNode|null = null;\n  let previousTNode: TNode|null = null;\n  const visitedNodes: number[] = [];\n  for (let i = 0; i < createOpCodes.length; i++) {\n    const opCode = createOpCodes[i];\n    if (typeof opCode == 'string') {\n      const textRNode = createTextNode(opCode, renderer);\n      const textNodeIndex = createOpCodes[++i] as number;\n      ngDevMode && ngDevMode.rendererCreateTextNode++;\n      previousTNode = currentTNode;\n      currentTNode =\n          createDynamicNodeAtIndex(viewData, textNodeIndex, TNodeType.Element, textRNode, null);\n      visitedNodes.push(textNodeIndex);\n      setIsNotParent();\n    } else if (typeof opCode == 'number') {\n      switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n        case I18nMutateOpCode.AppendChild:\n          const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n          let destinationTNode: TNode;\n          if (destinationNodeIndex === index) {\n            // If the destination node is `i18nStart`, we don't have a\n            // top-level node and we should use the host node instead\n            destinationTNode = viewData[T_HOST] !;\n          } else {\n            destinationTNode = getTNode(destinationNodeIndex, viewData);\n          }\n          ngDevMode &&\n              assertDefined(\n                  currentTNode !,\n                  `You need to create or select a node before you can insert it into the DOM`);\n          previousTNode = appendI18nNode(currentTNode !, destinationTNode, previousTNode, viewData);\n          break;\n        case I18nMutateOpCode.Select:\n          const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n          visitedNodes.push(nodeIndex);\n          previousTNode = currentTNode;\n          currentTNode = getTNode(nodeIndex, viewData);\n          if (currentTNode) {\n            setPreviousOrParentTNode(currentTNode, currentTNode.type === TNodeType.Element);\n          }\n          break;\n        case I18nMutateOpCode.ElementEnd:\n          const elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n          previousTNode = currentTNode = getTNode(elementIndex, viewData);\n          setPreviousOrParentTNode(currentTNode, false);\n          break;\n        case I18nMutateOpCode.Attr:\n          const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n          const attrName = createOpCodes[++i] as string;\n          const attrValue = createOpCodes[++i] as string;\n          // This code is used for ICU expressions only, since we don't support\n          // directives/components in ICUs, we don't need to worry about inputs here\n          elementAttributeInternal(elementNodeIndex, attrName, attrValue, viewData);\n          break;\n        default:\n          throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n      }\n    } else {\n      switch (opCode) {\n        case COMMENT_MARKER:\n          const commentValue = createOpCodes[++i] as string;\n          const commentNodeIndex = createOpCodes[++i] as number;\n          ngDevMode && assertEqual(\n                           typeof commentValue, 'string',\n                           `Expected \"${commentValue}\" to be a comment node value`);\n          const commentRNode = renderer.createComment(commentValue);\n          ngDevMode && ngDevMode.rendererCreateComment++;\n          previousTNode = currentTNode;\n          currentTNode = createDynamicNodeAtIndex(\n              viewData, commentNodeIndex, TNodeType.IcuContainer, commentRNode, null);\n          visitedNodes.push(commentNodeIndex);\n          attachPatchData(commentRNode, viewData);\n          (currentTNode as TIcuContainerNode).activeCaseIndex = null;\n          // We will add the case nodes later, during the update phase\n          setIsNotParent();\n          break;\n        case ELEMENT_MARKER:\n          const tagNameValue = createOpCodes[++i] as string;\n          const elementNodeIndex = createOpCodes[++i] as number;\n          ngDevMode && assertEqual(\n                           typeof tagNameValue, 'string',\n                           `Expected \"${tagNameValue}\" to be an element node tag name`);\n          const elementRNode = renderer.createElement(tagNameValue);\n          ngDevMode && ngDevMode.rendererCreateElement++;\n          previousTNode = currentTNode;\n          currentTNode = createDynamicNodeAtIndex(\n              viewData, elementNodeIndex, TNodeType.Element, elementRNode, tagNameValue);\n          visitedNodes.push(elementNodeIndex);\n          break;\n        default:\n          throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n      }\n    }\n  }\n\n  setIsNotParent();\n\n  return visitedNodes;\n}\n\nfunction readUpdateOpCodes(\n    updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null, bindingsStartIndex: number,\n    changeMask: number, viewData: LView, bypassCheckBit = false) {\n  let caseCreated = false;\n  for (let i = 0; i < updateOpCodes.length; i++) {\n    // bit code to check if we should apply the next update\n    const checkBit = updateOpCodes[i] as number;\n    // Number of opCodes to skip until next set of update codes\n    const skipCodes = updateOpCodes[++i] as number;\n    if (bypassCheckBit || (checkBit & changeMask)) {\n      // The value has been updated since last checked\n      let value = '';\n      for (let j = i + 1; j <= (i + skipCodes); j++) {\n        const opCode = updateOpCodes[j];\n        if (typeof opCode == 'string') {\n          value += opCode;\n        } else if (typeof opCode == 'number') {\n          if (opCode < 0) {\n            // It's a binding index whose value is negative\n            value += renderStringify(viewData[bindingsStartIndex - opCode]);\n          } else {\n            const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n            let tIcuIndex: number;\n            let tIcu: TIcu;\n            let icuTNode: TIcuContainerNode;\n            switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n              case I18nUpdateOpCode.Attr:\n                const propName = updateOpCodes[++j] as string;\n                const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n                elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);\n                break;\n              case I18nUpdateOpCode.Text:\n                textBindingInternal(viewData, nodeIndex, value);\n                break;\n              case I18nUpdateOpCode.IcuSwitch:\n                tIcuIndex = updateOpCodes[++j] as number;\n                tIcu = icus ![tIcuIndex];\n                icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n                // If there is an active case, delete the old nodes\n                if (icuTNode.activeCaseIndex !== null) {\n                  const removeCodes = tIcu.remove[icuTNode.activeCaseIndex];\n                  for (let k = 0; k < removeCodes.length; k++) {\n                    const removeOpCode = removeCodes[k] as number;\n                    switch (removeOpCode & I18nMutateOpCode.MASK_OPCODE) {\n                      case I18nMutateOpCode.Remove:\n                        const nodeIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n                        removeNode(nodeIndex, viewData);\n                        break;\n                      case I18nMutateOpCode.RemoveNestedIcu:\n                        const nestedIcuNodeIndex =\n                            removeCodes[k + 1] as number >>> I18nMutateOpCode.SHIFT_REF;\n                        const nestedIcuTNode =\n                            getTNode(nestedIcuNodeIndex, viewData) as TIcuContainerNode;\n                        const activeIndex = nestedIcuTNode.activeCaseIndex;\n                        if (activeIndex !== null) {\n                          const nestedIcuTIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n                          const nestedTIcu = icus ![nestedIcuTIndex];\n                          addAllToArray(nestedTIcu.remove[activeIndex], removeCodes);\n                        }\n                        break;\n                    }\n                  }\n                }\n\n                // Update the active caseIndex\n                const caseIndex = getCaseIndex(tIcu, value);\n                icuTNode.activeCaseIndex = caseIndex !== -1 ? caseIndex : null;\n\n                // Add the nodes for the new case\n                readCreateOpCodes(-1, tIcu.create[caseIndex], icus, viewData);\n                caseCreated = true;\n                break;\n              case I18nUpdateOpCode.IcuUpdate:\n                tIcuIndex = updateOpCodes[++j] as number;\n                tIcu = icus ![tIcuIndex];\n                icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n                readUpdateOpCodes(\n                    tIcu.update[icuTNode.activeCaseIndex !], icus, bindingsStartIndex, changeMask,\n                    viewData, caseCreated);\n                break;\n            }\n          }\n        }\n      }\n    }\n    i += skipCodes;\n  }\n}\n\nfunction removeNode(index: number, viewData: LView) {\n  const removedPhTNode = getTNode(index, viewData);\n  const removedPhRNode = getNativeByIndex(index, viewData);\n  if (removedPhRNode) {\n    nativeRemoveNode(viewData[RENDERER], removedPhRNode);\n  }\n\n  const slotValue = ÉµÉµload(index) as RElement | RComment | LContainer;\n  if (isLContainer(slotValue)) {\n    const lContainer = slotValue as LContainer;\n    if (removedPhTNode.type !== TNodeType.Container) {\n      nativeRemoveNode(viewData[RENDERER], lContainer[NATIVE]);\n    }\n  }\n\n  // Define this node as detached so that we don't risk projecting it\n  removedPhTNode.flags |= TNodeFlags.isDetached;\n  ngDevMode && ngDevMode.rendererRemoveNode++;\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `ï¿½{index}(:{block})ï¿½`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `ï¿½#{index}(:{block})ï¿½`/`ï¿½/#{index}(:{block})ï¿½`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `ï¿½*{index}:{block}ï¿½`/`ï¿½/*{index}:{block}ï¿½`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18n(index: number, message: string, subTemplateIndex?: number): void {\n  ÉµÉµi18nStart(index, message, subTemplateIndex);\n  ÉµÉµi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nAttributes(index: number, values: string[]): void {\n  const tView = getLView()[TVIEW];\n  ngDevMode && assertDefined(tView, `tView should be defined`);\n  i18nAttributesFirstPass(tView, index, values);\n}\n\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n  const previousElement = getPreviousOrParentTNode();\n  const previousElementIndex = previousElement.index - HEADER_OFFSET;\n  const updateOpCodes: I18nUpdateOpCodes = [];\n  for (let i = 0; i < values.length; i += 2) {\n    const attrName = values[i];\n    const message = values[i + 1];\n    const parts = message.split(ICU_REGEXP);\n    for (let j = 0; j < parts.length; j++) {\n      const value = parts[j];\n\n      if (j & 1) {\n        // Odd indexes are ICU expressions\n        // TODO(ocombe): support ICU expressions in attributes\n        throw new Error('ICU expressions are not yet supported in attributes');\n      } else if (value !== '') {\n        // Even indexes are text (including bindings)\n        const hasBinding = !!value.match(BINDING_REGEXP);\n        if (hasBinding) {\n          if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n            addAllToArray(\n                generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n          }\n        } else {\n          const lView = getLView();\n          elementAttributeInternal(previousElementIndex, attrName, value, lView);\n          // Check if that attribute is a directive input\n          const tNode = getTNode(previousElementIndex, lView);\n          const dataValue = tNode.inputs && tNode.inputs[attrName];\n          if (dataValue) {\n            setInputsForProperty(lView, dataValue, value);\n          }\n        }\n      }\n    }\n  }\n\n  if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n    tView.data[index + HEADER_OFFSET] = updateOpCodes;\n  }\n}\n\nlet changeMask = 0b0;\nlet shiftsCounter = 0;\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nExp<T>(value: T): TsickleIssue1009 {\n  const lView = getLView();\n  const expression = bind(lView, value);\n  if (expression !== NO_CHANGE) {\n    changeMask = changeMask | (1 << shiftsCounter);\n  }\n  shiftsCounter++;\n  return ÉµÉµi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ÉµÉµi18nApply(index: number) {\n  if (shiftsCounter) {\n    const lView = getLView();\n    const tView = lView[TVIEW];\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const tI18n = tView.data[index + HEADER_OFFSET];\n    let updateOpCodes: I18nUpdateOpCodes;\n    let icus: TIcu[]|null = null;\n    if (Array.isArray(tI18n)) {\n      updateOpCodes = tI18n as I18nUpdateOpCodes;\n    } else {\n      updateOpCodes = (tI18n as TI18n).update;\n      icus = (tI18n as TI18n).icus;\n    }\n    const bindingsStartIndex = lView[BINDING_INDEX] - shiftsCounter - 1;\n    readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, lView);\n\n    // Reset changeMask & maskBit to default for the next update cycle\n    changeMask = 0b0;\n    shiftsCounter = 0;\n  }\n}\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number {\n  let index = icuExpression.cases.indexOf(bindingValue);\n  if (index === -1) {\n    switch (icuExpression.type) {\n      case IcuType.plural: {\n        const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n        index = icuExpression.cases.indexOf(resolvedCase);\n        if (index === -1 && resolvedCase !== 'other') {\n          index = icuExpression.cases.indexOf('other');\n        }\n        break;\n      }\n      case IcuType.select: {\n        index = icuExpression.cases.indexOf('other');\n        break;\n      }\n    }\n  }\n  return index;\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param tIcus\n * @param icuExpression\n * @param startIndex\n * @param expandoStartIndex\n */\nfunction icuStart(\n    tIcus: TIcu[], icuExpression: IcuExpression, startIndex: number,\n    expandoStartIndex: number): void {\n  const createCodes = [];\n  const removeCodes = [];\n  const updateCodes = [];\n  const vars = [];\n  const childIcus: number[][] = [];\n  for (let i = 0; i < icuExpression.values.length; i++) {\n    // Each value is an array of strings & other ICU expressions\n    const valueArr = icuExpression.values[i];\n    const nestedIcus: IcuExpression[] = [];\n    for (let j = 0; j < valueArr.length; j++) {\n      const value = valueArr[j];\n      if (typeof value !== 'string') {\n        // It is an nested ICU expression\n        const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n        // Replace nested ICU expression by a comment node\n        valueArr[j] = `<!--ï¿½${icuIndex}ï¿½-->`;\n      }\n    }\n    const icuCase: IcuCase =\n        parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);\n    createCodes.push(icuCase.create);\n    removeCodes.push(icuCase.remove);\n    updateCodes.push(icuCase.update);\n    vars.push(icuCase.vars);\n    childIcus.push(icuCase.childIcus);\n  }\n  const tIcu: TIcu = {\n    type: icuExpression.type,\n    vars,\n    childIcus,\n    cases: icuExpression.cases,\n    create: createCodes,\n    remove: removeCodes,\n    update: updateCodes\n  };\n  tIcus.push(tIcu);\n  // Adding the maximum possible of vars needed (based on the cases with the most vars)\n  i18nVarsCount += Math.max(...vars);\n}\n\n/**\n * Transforms a string template into an HTML template and a list of instructions used to update\n * attributes or nodes that contain bindings.\n *\n * @param unsafeHtml The string to parse\n * @param parentIndex\n * @param nestedIcus\n * @param tIcus\n * @param expandoStartIndex\n */\nfunction parseIcuCase(\n    unsafeHtml: string, parentIndex: number, nestedIcus: IcuExpression[], tIcus: TIcu[],\n    expandoStartIndex: number): IcuCase {\n  const inertBodyHelper = new InertBodyHelper(document);\n  const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n  if (!inertBodyElement) {\n    throw new Error('Unable to generate inert body element');\n  }\n  const wrapper = getTemplateContent(inertBodyElement !) as Element || inertBodyElement;\n  const opCodes: IcuCase = {vars: 0, childIcus: [], create: [], remove: [], update: []};\n  parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);\n  return opCodes;\n}\n\nconst NESTED_ICU = /ï¿½(\\d+)ï¿½/;\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n * @param currentNode The first node to parse\n * @param icuCase The data for the ICU expression case that contains those nodes\n * @param parentIndex Index of the current node's parent\n * @param nestedIcus Data for the nested ICU expressions that this case contains\n * @param tIcus Data for all ICU expressions of the current message\n * @param expandoStartIndex Expando start index for the current ICU expression\n */\nfunction parseNodes(\n    currentNode: Node | null, icuCase: IcuCase, parentIndex: number, nestedIcus: IcuExpression[],\n    tIcus: TIcu[], expandoStartIndex: number) {\n  if (currentNode) {\n    const nestedIcusToCreate: [IcuExpression, number][] = [];\n    while (currentNode) {\n      const nextNode: Node|null = currentNode.nextSibling;\n      const newIndex = expandoStartIndex + ++icuCase.vars;\n      switch (currentNode.nodeType) {\n        case Node.ELEMENT_NODE:\n          const element = currentNode as Element;\n          const tagName = element.tagName.toLowerCase();\n          if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n            // This isn't a valid element, we won't create an element for it\n            icuCase.vars--;\n          } else {\n            icuCase.create.push(\n                ELEMENT_MARKER, tagName, newIndex,\n                parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n            const elAttrs = element.attributes;\n            for (let i = 0; i < elAttrs.length; i++) {\n              const attr = elAttrs.item(i) !;\n              const lowerAttrName = attr.name.toLowerCase();\n              const hasBinding = !!attr.value.match(BINDING_REGEXP);\n              // we assume the input string is safe, unless it's using a binding\n              if (hasBinding) {\n                if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                  if (URI_ATTRS[lowerAttrName]) {\n                    addAllToArray(\n                        generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl),\n                        icuCase.update);\n                  } else if (SRCSET_ATTRS[lowerAttrName]) {\n                    addAllToArray(\n                        generateBindingUpdateOpCodes(\n                            attr.value, newIndex, attr.name, sanitizeSrcset),\n                        icuCase.update);\n                  } else {\n                    addAllToArray(\n                        generateBindingUpdateOpCodes(attr.value, newIndex, attr.name),\n                        icuCase.update);\n                  }\n                } else {\n                  ngDevMode &&\n                      console.warn(\n                          `WARNING: ignoring unsafe attribute value ${lowerAttrName} on element ${tagName} (see http://g.co/ng/security#xss)`);\n                }\n              } else {\n                icuCase.create.push(\n                    newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Attr, attr.name,\n                    attr.value);\n              }\n            }\n            // Parse the children of this node (if any)\n            parseNodes(\n                currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex);\n            // Remove the parent node after the children\n            icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n          }\n          break;\n        case Node.TEXT_NODE:\n          const value = currentNode.textContent || '';\n          const hasBinding = value.match(BINDING_REGEXP);\n          icuCase.create.push(\n              hasBinding ? '' : value, newIndex,\n              parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n          icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n          if (hasBinding) {\n            addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);\n          }\n          break;\n        case Node.COMMENT_NODE:\n          // Check if the comment node is a placeholder for a nested ICU\n          const match = NESTED_ICU.exec(currentNode.textContent || '');\n          if (match) {\n            const nestedIcuIndex = parseInt(match[1], 10);\n            const newLocal = ngDevMode ? `nested ICU ${nestedIcuIndex}` : '';\n            // Create the comment node that will anchor the ICU expression\n            icuCase.create.push(\n                COMMENT_MARKER, newLocal, newIndex,\n                parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n            const nestedIcu = nestedIcus[nestedIcuIndex];\n            nestedIcusToCreate.push([nestedIcu, newIndex]);\n          } else {\n            // We do not handle any other type of comment\n            icuCase.vars--;\n          }\n          break;\n        default:\n          // We do not handle any other type of element\n          icuCase.vars--;\n      }\n      currentNode = nextNode !;\n    }\n\n    for (let i = 0; i < nestedIcusToCreate.length; i++) {\n      const nestedIcu = nestedIcusToCreate[i][0];\n      const nestedIcuNodeIndex = nestedIcusToCreate[i][1];\n      icuStart(tIcus, nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars);\n      // Since this is recursive, the last TIcu that was pushed is the one we want\n      const nestTIcuIndex = tIcus.length - 1;\n      icuCase.vars += Math.max(...tIcus[nestTIcuIndex].vars);\n      icuCase.childIcus.push(nestTIcuIndex);\n      const mask = getBindingMask(nestedIcu);\n      icuCase.update.push(\n          toMaskBit(nestedIcu.mainBinding),  // mask of the main binding\n          3,                                 // skip 3 opCodes if not changed\n          -1 - nestedIcu.mainBinding,\n          nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch,\n          nestTIcuIndex,\n          mask,  // mask of all the bindings of this ICU expression\n          2,     // skip 2 opCodes if not changed\n          nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate,\n          nestTIcuIndex);\n      icuCase.remove.push(\n          nestTIcuIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.RemoveNestedIcu,\n          nestedIcuNodeIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n    }\n  }\n}\n\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value: string): string {\n  return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n\nlet TRANSLATIONS: {[key: string]: string} = {};\nexport interface I18nLocalizeOptions { translations: {[key: string]: string}; }\n\n/**\n * Set the configuration for `i18nLocalize`.\n *\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function i18nConfigureLocalize(options: I18nLocalizeOptions = {\n  translations: {}\n}) {\n  TRANSLATIONS = options.translations;\n}\n\nconst LOCALIZE_PH_REGEXP = /\\{\\$(.*?)\\}/g;\n\n/**\n * A goog.getMsg-like function for users that do not use Closure.\n *\n * This method is required as a *temporary* measure to prevent i18n tests from being blocked while\n * running outside of Closure Compiler. This method will not be needed once runtime translation\n * service support is introduced.\n *\n * @codeGenApi\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function ÉµÉµi18nLocalize(input: string, placeholders?: {[key: string]: string}) {\n  if (typeof TRANSLATIONS[input] !== 'undefined') {  // to account for empty string\n    input = TRANSLATIONS[input];\n  }\n  if (placeholders !== undefined && Object.keys(placeholders).length) {\n    return input.replace(LOCALIZE_PH_REGEXP, (_, key) => placeholders[key] || '');\n  }\n  return input;\n}\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n  assertDefined(localeId, `Expected localeId to be defined`);\n  if (typeof localeId === 'string') {\n    LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n  }\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n  return LOCALE_ID;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../render3/ng_module_ref';\nimport {stringify} from '../util/stringify';\n\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map<string, NgModuleFactory<any>|NgModuleType>();\n\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nexport function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {\n  const existing = modules.get(id) as NgModuleFactory<any>;\n  assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n  modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>| null, incoming: Type<any>): void {\n  if (type && type !== incoming) {\n    throw new Error(\n        `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n  }\n}\n\nexport function registerNgModuleType(ngModuleType: NgModuleType) {\n  if (ngModuleType.ngModuleDef.id !== null) {\n    const id = ngModuleType.ngModuleDef.id;\n    const existing = modules.get(id) as NgModuleType | null;\n    assertSameOrNotExisting(id, existing, ngModuleType);\n    modules.set(id, ngModuleType);\n  }\n\n  let imports = ngModuleType.ngModuleDef.imports;\n  if (imports instanceof Function) {\n    imports = imports();\n  }\n  if (imports) {\n    imports.forEach(i => registerNgModuleType(i as NgModuleType));\n  }\n}\n\nexport function clearModulesForTest(): void {\n  modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string) {\n  return modules.get(id);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {INJECTOR} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\nimport {StaticProvider} from '../di/interface/provider';\nimport {R3Injector, createInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {registerNgModuleType} from '../linker/ng_module_factory_registration';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgLocaleIdDef, getNgModuleDef} from './definition';\nimport {setLocaleId} from './i18n';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\nexport interface NgModuleType<T = any> extends Type<T> { ngModuleDef: NgModuleDef<T>; }\n\nconst COMPONENT_FACTORY_RESOLVER: StaticProvider = {\n  provide: viewEngine_ComponentFactoryResolver,\n  useClass: ComponentFactoryResolver,\n  deps: [viewEngine_NgModuleRef],\n};\n\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n  // tslint:disable-next-line:require-internal-with-underscore\n  _bootstrapComponents: Type<any>[] = [];\n  // tslint:disable-next-line:require-internal-with-underscore\n  _r3Injector: R3Injector;\n  injector: Injector = this;\n  instance: T;\n  destroyCbs: (() => void)[]|null = [];\n\n  constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n    super();\n    const ngModuleDef = getNgModuleDef(ngModuleType);\n    ngDevMode && assertDefined(\n                     ngModuleDef,\n                     `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n    const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n    if (ngLocaleIdDef) {\n      setLocaleId(ngLocaleIdDef);\n    }\n\n    this._bootstrapComponents = maybeUnwrapFn(ngModuleDef !.bootstrap);\n    const additionalProviders: StaticProvider[] = [\n      {\n        provide: viewEngine_NgModuleRef,\n        useValue: this,\n      },\n      COMPONENT_FACTORY_RESOLVER\n    ];\n    this._r3Injector = createInjector(\n        ngModuleType, _parent, additionalProviders, stringify(ngModuleType)) as R3Injector;\n    this.instance = this.get(ngModuleType);\n  }\n\n  get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n      injectFlags: InjectFlags = InjectFlags.Default): any {\n    if (token === Injector || token === viewEngine_NgModuleRef || token === INJECTOR) {\n      return this;\n    }\n    return this._r3Injector.get(token, notFoundValue, injectFlags);\n  }\n\n  get componentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n    return this.get(viewEngine_ComponentFactoryResolver);\n  }\n\n  destroy(): void {\n    ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n    const injector = this._r3Injector;\n    !injector.destroyed && injector.destroy();\n    this.destroyCbs !.forEach(fn => fn());\n    this.destroyCbs = null;\n  }\n  onDestroy(callback: () => void): void {\n    ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n    this.destroyCbs !.push(callback);\n  }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n  constructor(public moduleType: Type<T>) {\n    super();\n\n    const ngModuleDef = getNgModuleDef(moduleType);\n    if (ngModuleDef !== null) {\n      // Register the NgModule with Angular's module registry. The location (and hence timing) of\n      // this call is critical to ensure this works correctly (modules get registered when expected)\n      // without bloating bundles (modules are registered when otherwise not referenced).\n      //\n      // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n      // several practical consequences:\n      //\n      // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n      //   tree shaken).\n      // - If an .ngfactory file is imported from, the module will be registered even if an instance\n      //   is not actually created (via `create` below).\n      // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n      //   imports,\n      //\n      // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n      // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n      // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n      // the side effect of registration is added here, in the constructor of NgModuleFactory,\n      // ensuring no matter how a factory is created, the module is registered correctly.\n      //\n      // An alternative would be to include the registration side effect inline following the actual\n      // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n      // will be registered and retained even if they're otherwise never referenced.\n      registerNgModuleType(moduleType as NgModuleType);\n    }\n  }\n\n  create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n    return new NgModuleRef(this.moduleType, parentInjector);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n  decorators?: any[];\n  ctorParameters?: () => any[];\n  propDecorators?: {[field: string]: any};\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being\n * tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n    type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null,\n    propDecorators: {[field: string]: any} | null): void {\n  return noSideEffects(() => {\n    const clazz = type as TypeWithMetadata;\n\n    // We determine whether a class has its own metadata by taking the metadata from the parent\n    // constructor and checking whether it's the same as the subclass metadata below. We can't use\n    // `hasOwnProperty` here because it doesn't work correctly in IE10 for static fields that are\n    // defined by TS. See https://github.com/angular/angular/pull/28439#issuecomment-459349218.\n    const parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;\n    const parentConstructor: TypeWithMetadata|null = parentPrototype && parentPrototype.constructor;\n\n    if (decorators !== null) {\n      if (clazz.decorators !== undefined &&\n          (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {\n        clazz.decorators.push(...decorators);\n      } else {\n        clazz.decorators = decorators;\n      }\n    }\n    if (ctorParameters !== null) {\n      // Rather than merging, clobber the existing parameters. If other projects exist which use\n      // tsickle-style annotations and reflect over them in the same way, this could cause issues,\n      // but that is vanishingly unlikely.\n      clazz.ctorParameters = ctorParameters;\n    }\n    if (propDecorators !== null) {\n      // The property decorator objects are merged as it is possible different fields have different\n      // decorator types. Decorators on individual fields are not merged, as it's also incredibly\n      // unlikely that a field will be decorated both with an Angular decorator and a non-Angular\n      // decorator that's also been downleveled.\n      if (clazz.propDecorators !== undefined &&\n          (!parentConstructor || parentConstructor.propDecorators !== clazz.propDecorators)) {\n        clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n      } else {\n        clazz.propDecorators = propDecorators;\n      }\n    }\n  }) as never;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {getBindingRoot, getLView, isCreationMode} from './state';\n\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |------consts------|---------vars---------|                 |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots  | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n *                    ^                      ^\n *      TView.bindingStartIndex      TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  return isCreationMode() ?\n      updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n      getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction1(\n    slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const lView = getLView();\n  const bindingIndex = getBindingRoot() + slotOffset;\n  return bindingUpdated(lView, bindingIndex, exp) ?\n      updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n      getBinding(lView, bindingIndex + 1);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction2(\n    slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,\n    thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n      updateBinding(\n          lView, bindingIndex + 2,\n          thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n      getBinding(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction3(\n    slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n    thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n      updateBinding(\n          lView, bindingIndex + 3,\n          thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n      getBinding(lView, bindingIndex + 3);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction4(\n    slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,\n    exp3: any, exp4: any, thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n      updateBinding(\n          lView, bindingIndex + 4,\n          thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n      getBinding(lView, bindingIndex + 4);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction5(\n    slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,\n    exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n      updateBinding(\n          lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n                                             pureFn(exp1, exp2, exp3, exp4, exp5)) :\n      getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction6(\n    slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n    exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n      updateBinding(\n          lView, bindingIndex + 6, thisArg ?\n              pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n              pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n      getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction7(\n    slotOffset: number,\n    pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,\n    exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n      updateBinding(\n          lView, bindingIndex + 7, thisArg ?\n              pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n              pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n      getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunction8(\n    slotOffset: number,\n    pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n    exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,\n    thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  const bindingIndex = getBindingRoot() + slotOffset;\n  const lView = getLView();\n  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n      updateBinding(\n          lView, bindingIndex + 8, thisArg ?\n              pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n              pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n      getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ÉµÉµpureFunctionV(\n    slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {\n  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n  let bindingIndex = getBindingRoot() + slotOffset;\n  let different = false;\n  const lView = getLView();\n  for (let i = 0; i < exps.length; i++) {\n    bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n  }\n  return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n                     getBinding(lView, bindingIndex);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WrappedValue} from '../change_detection/change_detection_util';\nimport {PipeTransform} from '../change_detection/pipe_transform';\n\nimport {store, ÉµÉµload} from './instructions/all';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';\nimport {ÉµÉµpureFunction1, ÉµÉµpureFunction2, ÉµÉµpureFunction3, ÉµÉµpureFunction4, ÉµÉµpureFunctionV} from './pure_function';\nimport {getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipe(index: number, pipeName: string): any {\n  const tView = getLView()[TVIEW];\n  let pipeDef: PipeDef<any>;\n  const adjustedIndex = index + HEADER_OFFSET;\n\n  if (tView.firstTemplatePass) {\n    pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n    tView.data[adjustedIndex] = pipeDef;\n    if (pipeDef.onDestroy) {\n      (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n    }\n  } else {\n    pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n  }\n\n  const pipeInstance = pipeDef.factory();\n  store(index, pipeInstance);\n  return pipeInstance;\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n *\n * @publicApi\n */\nfunction getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> {\n  if (registry) {\n    for (let i = registry.length - 1; i >= 0; i--) {\n      const pipeDef = registry[i];\n      if (name === pipeDef.name) {\n        return pipeDef;\n      }\n    }\n  }\n  throw new Error(`The pipe '${name}' could not be found!`);\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipeBind1(index: number, slotOffset: number, v1: any): any {\n  const pipeInstance = ÉµÉµload<PipeTransform>(index);\n  return unwrapValue(\n      isPure(index) ? ÉµÉµpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :\n                      pipeInstance.transform(v1));\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n  const pipeInstance = ÉµÉµload<PipeTransform>(index);\n  return unwrapValue(\n      isPure(index) ? ÉµÉµpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n                      pipeInstance.transform(v1, v2));\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n  const pipeInstance = ÉµÉµload<PipeTransform>(index);\n  return unwrapValue(\n      isPure(index) ?\n          ÉµÉµpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n          pipeInstance.transform(v1, v2, v3));\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipeBind4(\n    index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {\n  const pipeInstance = ÉµÉµload<PipeTransform>(index);\n  return unwrapValue(\n      isPure(index) ?\n          ÉµÉµpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n          pipeInstance.transform(v1, v2, v3, v4));\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ÉµÉµpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any {\n  const pipeInstance = ÉµÉµload<PipeTransform>(index);\n  return unwrapValue(\n      isPure(index) ? ÉµÉµpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :\n                      pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(index: number): boolean {\n  return (<PipeDef<any>>getLView()[TVIEW].data[index + HEADER_OFFSET]).pure;\n}\n\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue(newValue: any): any {\n  if (WrappedValue.isWrapped(newValue)) {\n    newValue = WrappedValue.unwrap(newValue);\n    const lView = getLView();\n    // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n    // stored\n    const bindingToInvalidateIdx = lView[BINDING_INDEX];\n    lView[bindingToInvalidateIdx] = NO_CHANGE;\n  }\n  return newValue;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <reference types=\"rxjs\" />\n\nimport {Subject, Subscription} from 'rxjs';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n *   selector: 'zippy',\n *   template: `\n *   <div class=\"zippy\">\n *     <div (click)=\"toggle()\">Toggle</div>\n *     <div [hidden]=\"!visible\">\n *       <ng-content></ng-content>\n *     </div>\n *  </div>`})\n * export class Zippy {\n *   visible: boolean = true;\n *   @Output() open: EventEmitter<any> = new EventEmitter();\n *   @Output() close: EventEmitter<any> = new EventEmitter();\n *\n *   toggle() {\n *     this.visible = !this.visible;\n *     if (this.visible) {\n *       this.open.emit(null);\n *     } else {\n *       this.close.emit(null);\n *     }\n *   }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @see [Observables in Angular](guide/observables-in-angular)\n * @publicApi\n */\nexport class EventEmitter<T extends any> extends Subject<T> {\n  /**\n   * @internal\n   */\n  __isAsync: boolean;  // tslint:disable-line\n\n  /**\n   * Creates an instance of this class that can\n   * deliver events synchronously or asynchronously.\n   *\n   * @param isAsync When true, deliver events asynchronously.\n   *\n   */\n  constructor(isAsync: boolean = false) {\n    super();\n    this.__isAsync = isAsync;\n  }\n\n  /**\n   * Emits an event containing a given value.\n   * @param value The value to emit.\n   */\n  emit(value?: T) { super.next(value); }\n\n  /**\n   * Registers handlers for events emitted by this instance.\n   * @param generatorOrNext When supplied, a custom handler for emitted events.\n   * @param error When supplied, a custom handler for an error notification\n   * from this emitter.\n   * @param complete When supplied, a custom handler for a completion\n   * notification from this emitter.\n   */\n  subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription {\n    let schedulerFn: (t: any) => any;\n    let errorFn = (err: any): any => null;\n    let completeFn = (): any => null;\n\n    if (generatorOrNext && typeof generatorOrNext === 'object') {\n      schedulerFn = this.__isAsync ? (value: any) => {\n        setTimeout(() => generatorOrNext.next(value));\n      } : (value: any) => { generatorOrNext.next(value); };\n\n      if (generatorOrNext.error) {\n        errorFn = this.__isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :\n                                   (err) => { generatorOrNext.error(err); };\n      }\n\n      if (generatorOrNext.complete) {\n        completeFn = this.__isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :\n                                      () => { generatorOrNext.complete(); };\n      }\n    } else {\n      schedulerFn = this.__isAsync ? (value: any) => { setTimeout(() => generatorOrNext(value)); } :\n                                     (value: any) => { generatorOrNext(value); };\n\n      if (error) {\n        errorFn =\n            this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };\n      }\n\n      if (complete) {\n        completeFn =\n            this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };\n      }\n    }\n\n    const sink = super.subscribe(schedulerFn, errorFn, completeFn);\n\n    if (generatorOrNext instanceof Subscription) {\n      generatorOrNext.add(sink);\n    }\n\n    return sink;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {flatten} from '../util/array_utils';\nimport {getSymbolIterator} from '../util/symbol';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n  return ((this as any as{_results: Array<T>})._results as any)[getSymbolIterator()]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n *   @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T>/* implements Iterable<T> */ {\n  public readonly dirty = true;\n  private _results: Array<T> = [];\n  public readonly changes: Observable<any> = new EventEmitter();\n\n  readonly length: number = 0;\n  // TODO(issue/24571): remove '!'.\n  readonly first !: T;\n  // TODO(issue/24571): remove '!'.\n  readonly last !: T;\n\n  constructor() {\n    // This function should be declared on the prototype, but doing so there will cause the class\n    // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n    // the constructor.\n    // [getSymbolIterator()](): Iterator<T> { ... }\n    const symbol = getSymbolIterator();\n    const proto = QueryList.prototype as any;\n    if (!proto[symbol]) proto[symbol] = symbolIterator;\n  }\n\n  /**\n   * See\n   * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n   */\n  map<U>(fn: (item: T, index: number, array: T[]) => U): U[] { return this._results.map(fn); }\n\n  /**\n   * See\n   * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n   */\n  filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n    return this._results.filter(fn);\n  }\n\n  /**\n   * See\n   * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n   */\n  find(fn: (item: T, index: number, array: T[]) => boolean): T|undefined {\n    return this._results.find(fn);\n  }\n\n  /**\n   * See\n   * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n   */\n  reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n    return this._results.reduce(fn, init);\n  }\n\n  /**\n   * See\n   * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n   */\n  forEach(fn: (item: T, index: number, array: T[]) => void): void { this._results.forEach(fn); }\n\n  /**\n   * See\n   * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n   */\n  some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n    return this._results.some(fn);\n  }\n\n  /**\n   * Returns a copy of the internal results list as an Array.\n   */\n  toArray(): T[] { return this._results.slice(); }\n\n  toString(): string { return this._results.toString(); }\n\n  /**\n   * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n   * on change detection, it will not notify of changes to the queries, unless a new change\n   * occurs.\n   *\n   * @param resultsTree The query results to store\n   */\n  reset(resultsTree: Array<T|any[]>): void {\n    this._results = flatten(resultsTree);\n    (this as{dirty: boolean}).dirty = false;\n    (this as{length: number}).length = this._results.length;\n    (this as{last: T}).last = this._results[this.length - 1];\n    (this as{first: T}).first = this._results[0];\n  }\n\n  /**\n   * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n   */\n  notifyOnChanges(): void { (this.changes as EventEmitter<any>).emit(this); }\n\n  /** internal */\n  setDirty() { (this as{dirty: boolean}).dirty = true; }\n\n  /** internal */\n  destroy(): void {\n    (this.changes as EventEmitter<any>).complete();\n    (this.changes as EventEmitter<any>).unsubscribe();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {Type} from '../interface/type';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {assertDataInRange, assertDefined, throwError} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {assertFirstTemplatePass, assertLContainer} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from './interfaces/container';\nimport {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';\nimport {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';\nimport {LQueries, LQuery, TQueries, TQuery, TQueryMetadata, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {getCurrentQueryIndex, getLView, getPreviousOrParentTNode, isCreationMode, setCurrentQueryIndex} from './state';\nimport {createContainerRef, createElementRef, createTemplateRef} from './view_engine_compatibility';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;\n\nclass LQuery_<T> implements LQuery<T> {\n  matches: (T|null)[]|null = null;\n  constructor(public queryList: QueryList<T>) {}\n  clone(): LQuery<T> { return new LQuery_(this.queryList); }\n  setDirty(): void { this.queryList.setDirty(); }\n}\n\nclass LQueries_ implements LQueries {\n  constructor(public queries: LQuery<any>[] = []) {}\n\n  createEmbeddedView(tView: TView): LQueries|null {\n    const tQueries = tView.queries;\n    if (tQueries !== null) {\n      const noOfInheritedQueries =\n          tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n      const viewLQueries: LQuery<any>[] = new Array(noOfInheritedQueries);\n\n      // An embedded view has queries propagated from a declaration view at the beginning of the\n      // TQueries collection and up until a first content query declared in the embedded view. Only\n      // propagated LQueries are created at this point (LQuery corresponding to declared content\n      // queries will be instantiated from the content query instructions for each directive).\n      for (let i = 0; i < noOfInheritedQueries; i++) {\n        const tQuery = tQueries.getByIndex(i);\n        const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n        viewLQueries[i] = parentLQuery.clone();\n      }\n\n      return new LQueries_(viewLQueries);\n    }\n\n    return null;\n  }\n\n  insertView(tView: TView): void { this.dirtyQueriesWithMatches(tView); }\n\n  detachView(tView: TView): void { this.dirtyQueriesWithMatches(tView); }\n\n  private dirtyQueriesWithMatches(tView: TView) {\n    for (let i = 0; i < this.queries.length; i++) {\n      if (getTQuery(tView, i).matches !== null) {\n        this.queries[i].setDirty();\n      }\n    }\n  }\n}\n\nclass TQueryMetadata_ implements TQueryMetadata {\n  constructor(\n      public predicate: Type<any>|string[], public descendants: boolean, public isStatic: boolean,\n      public read: any = null) {}\n}\n\nclass TQueries_ implements TQueries {\n  constructor(private queries: TQuery[] = []) {}\n\n  elementStart(tView: TView, tNode: TNode): void {\n    ngDevMode && assertFirstTemplatePass(\n                     tView, 'Queries should collect results on the first template pass only');\n    for (let query of this.queries) {\n      query.elementStart(tView, tNode);\n    }\n  }\n  elementEnd(tNode: TNode): void {\n    for (let query of this.queries) {\n      query.elementEnd(tNode);\n    }\n  }\n  embeddedTView(tNode: TNode): TQueries|null {\n    let queriesForTemplateRef: TQuery[]|null = null;\n\n    for (let i = 0; i < this.length; i++) {\n      const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n      const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n      if (tqueryClone) {\n        tqueryClone.indexInDeclarationView = i;\n        if (queriesForTemplateRef !== null) {\n          queriesForTemplateRef.push(tqueryClone);\n        } else {\n          queriesForTemplateRef = [tqueryClone];\n        }\n      }\n    }\n\n    return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n  }\n\n  template(tView: TView, tNode: TNode): void {\n    ngDevMode && assertFirstTemplatePass(\n                     tView, 'Queries should collect results on the first template pass only');\n    for (let query of this.queries) {\n      query.template(tView, tNode);\n    }\n  }\n\n  getByIndex(index: number): TQuery {\n    ngDevMode && assertDataInRange(this.queries, index);\n    return this.queries[index];\n  }\n\n  get length(): number { return this.queries.length; }\n\n  track(tquery: TQuery): void { this.queries.push(tquery); }\n}\n\nclass TQuery_ implements TQuery {\n  matches: number[]|null = null;\n  indexInDeclarationView = -1;\n  crossesNgTemplate = false;\n\n  /**\n   * A node index on which a query was declared (-1 for view queries and ones inherited from the\n   * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n   * when to apply content queries to elements in a template.\n   */\n  private _declarationNodeIndex: number;\n\n  /**\n   * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n   * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n   * elements in a template.\n   */\n  private _appliesToNextNode = true;\n\n  constructor(public metadata: TQueryMetadata, nodeIndex: number = -1) {\n    this._declarationNodeIndex = nodeIndex;\n  }\n\n  elementStart(tView: TView, tNode: TNode): void {\n    if (this.isApplyingToNode(tNode)) {\n      this.matchTNode(tView, tNode);\n    }\n  }\n\n  elementEnd(tNode: TNode): void {\n    if (this._declarationNodeIndex === tNode.index) {\n      this._appliesToNextNode = false;\n    }\n  }\n\n  template(tView: TView, tNode: TNode): void { this.elementStart(tView, tNode); }\n\n  embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null {\n    if (this.isApplyingToNode(tNode)) {\n      this.crossesNgTemplate = true;\n      // A marker indicating a `<ng-template>` element (a placeholder for query results from\n      // embedded views created based on this `<ng-template>`).\n      this.addMatch(-tNode.index, childQueryIndex);\n      return new TQuery_(this.metadata);\n    }\n    return null;\n  }\n\n  private isApplyingToNode(tNode: TNode): boolean {\n    if (this._appliesToNextNode && this.metadata.descendants === false) {\n      return this._declarationNodeIndex === (tNode.parent ? tNode.parent.index : -1);\n    }\n    return this._appliesToNextNode;\n  }\n\n  private matchTNode(tView: TView, tNode: TNode): void {\n    if (Array.isArray(this.metadata.predicate)) {\n      const localNames = this.metadata.predicate as string[];\n      for (let i = 0; i < localNames.length; i++) {\n        this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, localNames[i]));\n      }\n    } else {\n      const typePredicate = this.metadata.predicate as any;\n      if (typePredicate === ViewEngine_TemplateRef) {\n        if (tNode.type === TNodeType.Container) {\n          this.matchTNodeWithReadOption(tView, tNode, -1);\n        }\n      } else {\n        this.matchTNodeWithReadOption(\n            tView, tNode, locateDirectiveOrProvider(tNode, tView, typePredicate, false, false));\n      }\n    }\n  }\n\n  private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number|null): void {\n    if (nodeMatchIdx !== null) {\n      const read = this.metadata.read;\n      if (read !== null) {\n        if (read === ViewEngine_ElementRef || read === ViewContainerRef ||\n            read === ViewEngine_TemplateRef && tNode.type === TNodeType.Container) {\n          this.addMatch(tNode.index, -2);\n        } else {\n          const directiveOrProviderIdx =\n              locateDirectiveOrProvider(tNode, tView, read, false, false);\n          if (directiveOrProviderIdx !== null) {\n            this.addMatch(tNode.index, directiveOrProviderIdx);\n          }\n        }\n      } else {\n        this.addMatch(tNode.index, nodeMatchIdx);\n      }\n    }\n  }\n\n  private addMatch(tNodeIdx: number, matchIdx: number) {\n    if (this.matches === null) {\n      this.matches = [tNodeIdx, matchIdx];\n    } else {\n      this.matches.push(tNodeIdx, matchIdx);\n    }\n  }\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number|null {\n  const localNames = tNode.localNames;\n  if (localNames !== null) {\n    for (let i = 0; i < localNames.length; i += 2) {\n      if (localNames[i] === selector) {\n        return localNames[i + 1] as number;\n      }\n    }\n  }\n  return null;\n}\n\n\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n  if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n    return createElementRef(ViewEngine_ElementRef, tNode, currentView);\n  } else if (tNode.type === TNodeType.Container) {\n    return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\n  }\n  return null;\n}\n\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n  if (matchingIdx === -1) {\n    // if read token and / or strategy is not specified, detect it using appropriate tNode type\n    return createResultByTNodeType(tNode, lView);\n  } else if (matchingIdx === -2) {\n    // read a special token from a node injector\n    return createSpecialToken(lView, tNode, read);\n  } else {\n    // read a token\n    return getNodeInjectable(lView[TVIEW].data, lView, matchingIdx, tNode as TElementNode);\n  }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n  if (read === ViewEngine_ElementRef) {\n    return createElementRef(ViewEngine_ElementRef, tNode, lView);\n  } else if (read === ViewEngine_TemplateRef) {\n    return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, lView);\n  } else if (read === ViewContainerRef) {\n    ngDevMode && assertNodeOfPossibleTypes(\n                     tNode, TNodeType.Element, TNodeType.Container, TNodeType.ElementContainer);\n    return createContainerRef(\n        ViewContainerRef, ViewEngine_ElementRef,\n        tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n  } else {\n    ngDevMode &&\n        throwError(\n            `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);\n  }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(lView: LView, tQuery: TQuery, queryIndex: number): (T | null)[] {\n  const lQuery = lView[QUERIES] !.queries ![queryIndex];\n  if (lQuery.matches === null) {\n    const tViewData = lView[TVIEW].data;\n    const tQueryMatches = tQuery.matches !;\n    const result: T|null[] = new Array(tQueryMatches.length / 2);\n    for (let i = 0; i < tQueryMatches.length; i += 2) {\n      const matchedNodeIdx = tQueryMatches[i];\n      if (matchedNodeIdx < 0) {\n        // we at the <ng-template> marker which might have results in views created based on this\n        // <ng-template> - those results will be in separate views though, so here we just leave\n        // null as a placeholder\n        result[i / 2] = null;\n      } else {\n        ngDevMode && assertDataInRange(tViewData, matchedNodeIdx);\n        const tNode = tViewData[matchedNodeIdx] as TNode;\n        result[i / 2] =\n            createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read);\n      }\n    }\n    lQuery.matches = result;\n  }\n\n  return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(lView: LView, queryIndex: number, result: T[]): T[] {\n  const tQuery = lView[TVIEW].queries !.getByIndex(queryIndex);\n  const tQueryMatches = tQuery.matches;\n  if (tQueryMatches !== null) {\n    const lViewResults = materializeViewResults<T>(lView, tQuery, queryIndex);\n\n    for (let i = 0; i < tQueryMatches.length; i += 2) {\n      const tNodeIdx = tQueryMatches[i];\n      if (tNodeIdx > 0) {\n        const viewResult = lViewResults[i / 2];\n        ngDevMode && assertDefined(viewResult, 'materialized query result should be defined');\n        result.push(viewResult as T);\n      } else {\n        const childQueryIndex = tQueryMatches[i + 1];\n\n        const declarationLContainer = lView[-tNodeIdx] as LContainer;\n        ngDevMode && assertLContainer(declarationLContainer);\n\n        // collect matches for views inserted in this container\n        for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n          const embeddedLView = declarationLContainer[i];\n          if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n            collectQueryResults(embeddedLView, childQueryIndex, result);\n          }\n        }\n\n        // collect matches for views created from this declaration container and inserted into\n        // different containers\n        if (declarationLContainer[MOVED_VIEWS] !== null) {\n          for (let embeddedLView of declarationLContainer[MOVED_VIEWS] !) {\n            collectQueryResults(embeddedLView, childQueryIndex, result);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ÉµÉµqueryRefresh(queryList: QueryList<any>): boolean {\n  const lView = getLView();\n  const queryIndex = getCurrentQueryIndex();\n\n  setCurrentQueryIndex(queryIndex + 1);\n\n  const tQuery = getTQuery(lView[TVIEW], queryIndex);\n  if (queryList.dirty && (isCreationMode() === tQuery.metadata.isStatic)) {\n    if (tQuery.matches === null) {\n      queryList.reset([]);\n    } else {\n      const result = tQuery.crossesNgTemplate ? collectQueryResults(lView, queryIndex, []) :\n                                                materializeViewResults(lView, tQuery, queryIndex);\n      queryList.reset(result);\n      queryList.notifyOnChanges();\n    }\n    return true;\n  }\n\n  return false;\n}\n\n/**\n * Creates new QueryList for a static view query.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ÉµÉµstaticViewQuery<T>(\n    predicate: Type<any>| string[], descend: boolean, read?: any): void {\n  viewQueryInternal(getLView(), predicate, descend, read, true);\n}\n\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ÉµÉµviewQuery<T>(predicate: Type<any>| string[], descend: boolean, read?: any): void {\n  viewQueryInternal(getLView(), predicate, descend, read, false);\n}\n\nfunction viewQueryInternal<T>(\n    lView: LView, predicate: Type<any>| string[], descend: boolean, read: any,\n    isStatic: boolean): void {\n  const tView = lView[TVIEW];\n  if (tView.firstTemplatePass) {\n    createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), -1);\n    if (isStatic) {\n      tView.staticViewQueries = true;\n    }\n  }\n  createLQuery<T>(lView);\n}\n\n/**\n * Loads a QueryList corresponding to the current view query.\n *\n * @codeGenApi\n */\nexport function ÉµÉµloadViewQuery<T>(): QueryList<T> {\n  return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ÉµÉµcontentQuery<T>(\n    directiveIndex: number, predicate: Type<any>| string[], descend: boolean, read?: any): void {\n  contentQueryInternal(\n      getLView(), predicate, descend, read, false, getPreviousOrParentTNode(), directiveIndex);\n}\n\n/**\n * Registers a QueryList, associated with a static content query, for later refresh\n * (part of a view refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ÉµÉµstaticContentQuery<T>(\n    directiveIndex: number, predicate: Type<any>| string[], descend: boolean, read?: any): void {\n  contentQueryInternal(\n      getLView(), predicate, descend, read, true, getPreviousOrParentTNode(), directiveIndex);\n}\n\nfunction contentQueryInternal<T>(\n    lView: LView, predicate: Type<any>| string[], descend: boolean, read: any, isStatic: boolean,\n    tNode: TNode, directiveIndex: number): void {\n  const tView = lView[TVIEW];\n  if (tView.firstTemplatePass) {\n    createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), tNode.index);\n    saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n    if (isStatic) {\n      tView.staticContentQueries = true;\n    }\n  }\n\n  createLQuery<T>(lView);\n}\n\n/**\n * Loads a QueryList corresponding to the current content query.\n *\n * @codeGenApi\n */\nexport function ÉµÉµloadContentQuery<T>(): QueryList<T> {\n  return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n\nfunction loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n  ngDevMode &&\n      assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n  ngDevMode && assertDataInRange(lView[QUERIES] !.queries, queryIndex);\n  return lView[QUERIES] !.queries[queryIndex].queryList;\n}\n\nfunction createLQuery<T>(lView: LView) {\n  const queryList = new QueryList<T>();\n  storeCleanupWithContext(lView, queryList, queryList.destroy);\n\n  if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n  lView[QUERIES] !.queries.push(new LQuery_(queryList));\n}\n\nfunction createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n  if (tView.queries === null) tView.queries = new TQueries_();\n  tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nfunction saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n  const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n  const lastSavedDirectiveIndex =\n      tView.contentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n  if (directiveIndex !== lastSavedDirectiveIndex) {\n    tViewContentQueries.push(tView.queries !.length - 1, directiveIndex);\n  }\n}\n\nfunction getTQuery(tView: TView, index: number): TQuery {\n  ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n  return tView.queries !.getByIndex(index);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectFlags} from '../di/interface/injector';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\n\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\nimport {createTemplateRef, injectChangeDetectorRef} from './view_engine_compatibility';\n\n\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ÉµÉµtemplateRefExtractor(tNode: TNode, currentView: LView) {\n  return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\n}\n\n\n/**\n * Returns the appropriate `ChangeDetectorRef` for a pipe.\n *\n * @codeGenApi\n */\nexport function ÉµÉµinjectPipeChangeDetectorRef(flags = InjectFlags.Default): ChangeDetectorRef|null {\n  const value = injectChangeDetectorRef(true);\n  if (value == null && !(flags & InjectFlags.Optional)) {\n    throw new Error(`No provider for ChangeDetectorRef!`);\n  } else {\n    return value;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµÉµinject} from '../../di/injector_compatibility';\nimport {ÉµÉµdefineInjectable, ÉµÉµdefineInjector} from '../../di/interface/defs';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: Function} =\n    (() => ({\n       'ÉµÉµattribute': r3.ÉµÉµattribute,\n       'ÉµÉµattributeInterpolate1': r3.ÉµÉµattributeInterpolate1,\n       'ÉµÉµattributeInterpolate2': r3.ÉµÉµattributeInterpolate2,\n       'ÉµÉµattributeInterpolate3': r3.ÉµÉµattributeInterpolate3,\n       'ÉµÉµattributeInterpolate4': r3.ÉµÉµattributeInterpolate4,\n       'ÉµÉµattributeInterpolate5': r3.ÉµÉµattributeInterpolate5,\n       'ÉµÉµattributeInterpolate6': r3.ÉµÉµattributeInterpolate6,\n       'ÉµÉµattributeInterpolate7': r3.ÉµÉµattributeInterpolate7,\n       'ÉµÉµattributeInterpolate8': r3.ÉµÉµattributeInterpolate8,\n       'ÉµÉµattributeInterpolateV': r3.ÉµÉµattributeInterpolateV,\n       'ÉµÉµdefineBase': r3.ÉµÉµdefineBase,\n       'ÉµÉµdefineComponent': r3.ÉµÉµdefineComponent,\n       'ÉµÉµdefineDirective': r3.ÉµÉµdefineDirective,\n       'ÉµÉµdefineInjectable': ÉµÉµdefineInjectable,\n       'ÉµÉµdefineInjector': ÉµÉµdefineInjector,\n       'ÉµÉµdefineNgModule': r3.ÉµÉµdefineNgModule,\n       'ÉµÉµdefinePipe': r3.ÉµÉµdefinePipe,\n       'ÉµÉµdirectiveInject': r3.ÉµÉµdirectiveInject,\n       'ÉµÉµgetFactoryOf': r3.ÉµÉµgetFactoryOf,\n       'ÉµÉµgetInheritedFactory': r3.ÉµÉµgetInheritedFactory,\n       'ÉµÉµinject': ÉµÉµinject,\n       'ÉµÉµinjectAttribute': r3.ÉµÉµinjectAttribute,\n       'ÉµÉµinjectPipeChangeDetectorRef': r3.ÉµÉµinjectPipeChangeDetectorRef,\n       'ÉµÉµtemplateRefExtractor': r3.ÉµÉµtemplateRefExtractor,\n       'ÉµÉµNgOnChangesFeature': r3.ÉµÉµNgOnChangesFeature,\n       'ÉµÉµProvidersFeature': r3.ÉµÉµProvidersFeature,\n       'ÉµÉµInheritDefinitionFeature': r3.ÉµÉµInheritDefinitionFeature,\n       'ÉµÉµcontainer': r3.ÉµÉµcontainer,\n       'ÉµÉµnextContext': r3.ÉµÉµnextContext,\n       'ÉµÉµcontainerRefreshStart': r3.ÉµÉµcontainerRefreshStart,\n       'ÉµÉµcontainerRefreshEnd': r3.ÉµÉµcontainerRefreshEnd,\n       'ÉµÉµnamespaceHTML': r3.ÉµÉµnamespaceHTML,\n       'ÉµÉµnamespaceMathML': r3.ÉµÉµnamespaceMathML,\n       'ÉµÉµnamespaceSVG': r3.ÉµÉµnamespaceSVG,\n       'ÉµÉµenableBindings': r3.ÉµÉµenableBindings,\n       'ÉµÉµdisableBindings': r3.ÉµÉµdisableBindings,\n       'ÉµÉµallocHostVars': r3.ÉµÉµallocHostVars,\n       'ÉµÉµelementStart': r3.ÉµÉµelementStart,\n       'ÉµÉµelementEnd': r3.ÉµÉµelementEnd,\n       'ÉµÉµelement': r3.ÉµÉµelement,\n       'ÉµÉµelementContainerStart': r3.ÉµÉµelementContainerStart,\n       'ÉµÉµelementContainerEnd': r3.ÉµÉµelementContainerEnd,\n       'ÉµÉµelementContainer': r3.ÉµÉµelementContainer,\n       'ÉµÉµpureFunction0': r3.ÉµÉµpureFunction0,\n       'ÉµÉµpureFunction1': r3.ÉµÉµpureFunction1,\n       'ÉµÉµpureFunction2': r3.ÉµÉµpureFunction2,\n       'ÉµÉµpureFunction3': r3.ÉµÉµpureFunction3,\n       'ÉµÉµpureFunction4': r3.ÉµÉµpureFunction4,\n       'ÉµÉµpureFunction5': r3.ÉµÉµpureFunction5,\n       'ÉµÉµpureFunction6': r3.ÉµÉµpureFunction6,\n       'ÉµÉµpureFunction7': r3.ÉµÉµpureFunction7,\n       'ÉµÉµpureFunction8': r3.ÉµÉµpureFunction8,\n       'ÉµÉµpureFunctionV': r3.ÉµÉµpureFunctionV,\n       'ÉµÉµgetCurrentView': r3.ÉµÉµgetCurrentView,\n       'ÉµÉµrestoreView': r3.ÉµÉµrestoreView,\n       'ÉµÉµlistener': r3.ÉµÉµlistener,\n       'ÉµÉµload': r3.ÉµÉµload,\n       'ÉµÉµprojection': r3.ÉµÉµprojection,\n       'ÉµÉµupdateSyntheticHostBinding': r3.ÉµÉµupdateSyntheticHostBinding,\n       'ÉµÉµcomponentHostSyntheticListener': r3.ÉµÉµcomponentHostSyntheticListener,\n       'ÉµÉµpipeBind1': r3.ÉµÉµpipeBind1,\n       'ÉµÉµpipeBind2': r3.ÉµÉµpipeBind2,\n       'ÉµÉµpipeBind3': r3.ÉµÉµpipeBind3,\n       'ÉµÉµpipeBind4': r3.ÉµÉµpipeBind4,\n       'ÉµÉµpipeBindV': r3.ÉµÉµpipeBindV,\n       'ÉµÉµprojectionDef': r3.ÉµÉµprojectionDef,\n       'ÉµÉµhostProperty': r3.ÉµÉµhostProperty,\n       'ÉµÉµproperty': r3.ÉµÉµproperty,\n       'ÉµÉµpropertyInterpolate': r3.ÉµÉµpropertyInterpolate,\n       'ÉµÉµpropertyInterpolate1': r3.ÉµÉµpropertyInterpolate1,\n       'ÉµÉµpropertyInterpolate2': r3.ÉµÉµpropertyInterpolate2,\n       'ÉµÉµpropertyInterpolate3': r3.ÉµÉµpropertyInterpolate3,\n       'ÉµÉµpropertyInterpolate4': r3.ÉµÉµpropertyInterpolate4,\n       'ÉµÉµpropertyInterpolate5': r3.ÉµÉµpropertyInterpolate5,\n       'ÉµÉµpropertyInterpolate6': r3.ÉµÉµpropertyInterpolate6,\n       'ÉµÉµpropertyInterpolate7': r3.ÉµÉµpropertyInterpolate7,\n       'ÉµÉµpropertyInterpolate8': r3.ÉµÉµpropertyInterpolate8,\n       'ÉµÉµpropertyInterpolateV': r3.ÉµÉµpropertyInterpolateV,\n       'ÉµÉµpipe': r3.ÉµÉµpipe,\n       'ÉµÉµqueryRefresh': r3.ÉµÉµqueryRefresh,\n       'ÉµÉµviewQuery': r3.ÉµÉµviewQuery,\n       'ÉµÉµstaticViewQuery': r3.ÉµÉµstaticViewQuery,\n       'ÉµÉµstaticContentQuery': r3.ÉµÉµstaticContentQuery,\n       'ÉµÉµloadViewQuery': r3.ÉµÉµloadViewQuery,\n       'ÉµÉµcontentQuery': r3.ÉµÉµcontentQuery,\n       'ÉµÉµloadContentQuery': r3.ÉµÉµloadContentQuery,\n       'ÉµÉµreference': r3.ÉµÉµreference,\n       'ÉµÉµelementHostAttrs': r3.ÉµÉµelementHostAttrs,\n       'ÉµÉµclassMap': r3.ÉµÉµclassMap,\n       'ÉµÉµclassMapInterpolate1': r3.ÉµÉµclassMapInterpolate1,\n       'ÉµÉµclassMapInterpolate2': r3.ÉµÉµclassMapInterpolate2,\n       'ÉµÉµclassMapInterpolate3': r3.ÉµÉµclassMapInterpolate3,\n       'ÉµÉµclassMapInterpolate4': r3.ÉµÉµclassMapInterpolate4,\n       'ÉµÉµclassMapInterpolate5': r3.ÉµÉµclassMapInterpolate5,\n       'ÉµÉµclassMapInterpolate6': r3.ÉµÉµclassMapInterpolate6,\n       'ÉµÉµclassMapInterpolate7': r3.ÉµÉµclassMapInterpolate7,\n       'ÉµÉµclassMapInterpolate8': r3.ÉµÉµclassMapInterpolate8,\n       'ÉµÉµclassMapInterpolateV': r3.ÉµÉµclassMapInterpolateV,\n       'ÉµÉµstyling': r3.ÉµÉµstyling,\n       'ÉµÉµstyleMap': r3.ÉµÉµstyleMap,\n       'ÉµÉµstyleProp': r3.ÉµÉµstyleProp,\n       'ÉµÉµstylePropInterpolate1': r3.ÉµÉµstylePropInterpolate1,\n       'ÉµÉµstylePropInterpolate2': r3.ÉµÉµstylePropInterpolate2,\n       'ÉµÉµstylePropInterpolate3': r3.ÉµÉµstylePropInterpolate3,\n       'ÉµÉµstylePropInterpolate4': r3.ÉµÉµstylePropInterpolate4,\n       'ÉµÉµstylePropInterpolate5': r3.ÉµÉµstylePropInterpolate5,\n       'ÉµÉµstylePropInterpolate6': r3.ÉµÉµstylePropInterpolate6,\n       'ÉµÉµstylePropInterpolate7': r3.ÉµÉµstylePropInterpolate7,\n       'ÉµÉµstylePropInterpolate8': r3.ÉµÉµstylePropInterpolate8,\n       'ÉµÉµstylePropInterpolateV': r3.ÉµÉµstylePropInterpolateV,\n       'ÉµÉµstyleSanitizer': r3.ÉµÉµstyleSanitizer,\n       'ÉµÉµstylingApply': r3.ÉµÉµstylingApply,\n       'ÉµÉµclassProp': r3.ÉµÉµclassProp,\n       'ÉµÉµselect': r3.ÉµÉµselect,\n       'ÉµÉµtemplate': r3.ÉµÉµtemplate,\n       'ÉµÉµtext': r3.ÉµÉµtext,\n       'ÉµÉµtextBinding': r3.ÉµÉµtextBinding,\n       'ÉµÉµtextInterpolate': r3.ÉµÉµtextInterpolate,\n       'ÉµÉµtextInterpolate1': r3.ÉµÉµtextInterpolate1,\n       'ÉµÉµtextInterpolate2': r3.ÉµÉµtextInterpolate2,\n       'ÉµÉµtextInterpolate3': r3.ÉµÉµtextInterpolate3,\n       'ÉµÉµtextInterpolate4': r3.ÉµÉµtextInterpolate4,\n       'ÉµÉµtextInterpolate5': r3.ÉµÉµtextInterpolate5,\n       'ÉµÉµtextInterpolate6': r3.ÉµÉµtextInterpolate6,\n       'ÉµÉµtextInterpolate7': r3.ÉµÉµtextInterpolate7,\n       'ÉµÉµtextInterpolate8': r3.ÉµÉµtextInterpolate8,\n       'ÉµÉµtextInterpolateV': r3.ÉµÉµtextInterpolateV,\n       'ÉµÉµembeddedViewStart': r3.ÉµÉµembeddedViewStart,\n       'ÉµÉµembeddedViewEnd': r3.ÉµÉµembeddedViewEnd,\n       'ÉµÉµi18n': r3.ÉµÉµi18n,\n       'ÉµÉµi18nAttributes': r3.ÉµÉµi18nAttributes,\n       'ÉµÉµi18nExp': r3.ÉµÉµi18nExp,\n       'ÉµÉµi18nStart': r3.ÉµÉµi18nStart,\n       'ÉµÉµi18nEnd': r3.ÉµÉµi18nEnd,\n       'ÉµÉµi18nApply': r3.ÉµÉµi18nApply,\n       'ÉµÉµi18nPostprocess': r3.ÉµÉµi18nPostprocess,\n       'ÉµÉµi18nLocalize': r3.ÉµÉµi18nLocalize,\n       'ÉµÉµresolveWindow': r3.ÉµÉµresolveWindow,\n       'ÉµÉµresolveDocument': r3.ÉµÉµresolveDocument,\n       'ÉµÉµresolveBody': r3.ÉµÉµresolveBody,\n       'ÉµÉµsetComponentScope': r3.ÉµÉµsetComponentScope,\n       'ÉµÉµsetNgModuleScope': r3.ÉµÉµsetNgModuleScope,\n\n       'ÉµÉµsanitizeHtml': sanitization.ÉµÉµsanitizeHtml,\n       'ÉµÉµsanitizeStyle': sanitization.ÉµÉµsanitizeStyle,\n       'ÉµÉµdefaultStyleSanitizer': sanitization.ÉµÉµdefaultStyleSanitizer,\n       'ÉµÉµsanitizeResourceUrl': sanitization.ÉµÉµsanitizeResourceUrl,\n       'ÉµÉµsanitizeScript': sanitization.ÉµÉµsanitizeScript,\n       'ÉµÉµsanitizeUrl': sanitization.ÉµÉµsanitizeUrl,\n       'ÉµÉµsanitizeUrlOrResourceUrl': sanitization.ÉµÉµsanitizeUrlOrResourceUrl,\n     }))();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3InjectorMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJECTOR_DEF} from '../../di/interface/defs';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Component} from '../../metadata';\nimport {ModuleWithProviders, NgModule, NgModuleDef, NgModuleTransitiveScopes} from '../../metadata/ng_module';\nimport {deepForEach, flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {NgModuleType} from '../ng_module_ref';\nimport {maybeUnwrapFn, stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\n\nconst EMPTY_ARRAY: Type<any>[] = [];\n\ninterface ModuleQueueItem {\n  moduleType: Type<any>;\n  ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n  moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n  if (!flushingModuleQueue) {\n    flushingModuleQueue = true;\n    try {\n      for (let i = moduleQueue.length - 1; i >= 0; i--) {\n        const {moduleType, ngModule} = moduleQueue[i];\n\n        if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n          // dequeue\n          moduleQueue.splice(i, 1);\n          setScopeOnDeclaredComponents(moduleType, ngModule);\n        }\n      }\n    } finally {\n      flushingModuleQueue = false;\n    }\n  }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[] | Type<any>): boolean {\n  if (Array.isArray(declaration)) {\n    return declaration.every(isResolvedDeclaration);\n  }\n  return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n  compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n\n  // Because we don't know if all declarations have resolved yet at the moment the\n  // NgModule decorator is executing, we're enqueueing the setting of module scope\n  // on its declarations to be run at a later time when all declarations for the module,\n  // including forward refs, have resolved.\n  enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n    moduleType: NgModuleType, ngModule: NgModule,\n    allowDuplicateDeclarationsInRoot: boolean = false): void {\n  ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n  ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n  const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n  let ngModuleDef: any = null;\n  Object.defineProperty(moduleType, NG_MODULE_DEF, {\n    configurable: true,\n    get: () => {\n      if (ngModuleDef === null) {\n        if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n          // We need to assert this immediately, because allowing it to continue will cause it to\n          // go into an infinite loop before we've reached the point where we throw all the errors.\n          throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n        }\n        ngModuleDef = getCompilerFacade().compileNgModule(\n            angularCoreEnv, `ng:///${moduleType.name}/ngModuleDef.js`, {\n              type: moduleType,\n              bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n              declarations: declarations.map(resolveForwardRef),\n              imports: flatten(ngModule.imports || EMPTY_ARRAY)\n                           .map(resolveForwardRef)\n                           .map(expandModuleWithProviders),\n              exports: flatten(ngModule.exports || EMPTY_ARRAY)\n                           .map(resolveForwardRef)\n                           .map(expandModuleWithProviders),\n              emitInline: true,\n              schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n              id: ngModule.id || null,\n            });\n      }\n      return ngModuleDef;\n    }\n  });\n\n  let ngInjectorDef: any = null;\n  Object.defineProperty(moduleType, NG_INJECTOR_DEF, {\n    get: () => {\n      if (ngInjectorDef === null) {\n        ngDevMode && verifySemanticsOfNgModuleDef(\n                         moduleType as any as NgModuleType, allowDuplicateDeclarationsInRoot);\n        const meta: R3InjectorMetadataFacade = {\n          name: moduleType.name,\n          type: moduleType,\n          deps: reflectDependencies(moduleType),\n          providers: ngModule.providers || EMPTY_ARRAY,\n          imports: [\n            (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n            (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n          ],\n        };\n        ngInjectorDef = getCompilerFacade().compileInjector(\n            angularCoreEnv, `ng:///${moduleType.name}/ngInjectorDef.js`, meta);\n      }\n      return ngInjectorDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode,\n  });\n}\n\nfunction verifySemanticsOfNgModuleDef(\n    moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean,\n    importingModule?: NgModuleType): void {\n  if (verifiedNgModule.get(moduleType)) return;\n  verifiedNgModule.set(moduleType, true);\n  moduleType = resolveForwardRef(moduleType);\n  let ngModuleDef: NgModuleDef<any>;\n  if (importingModule) {\n    ngModuleDef = getNgModuleDef(moduleType) !;\n    if (!ngModuleDef) {\n      throw new Error(\n          `Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n  } else {\n    ngModuleDef = getNgModuleDef(moduleType, true);\n  }\n  const errors: string[] = [];\n  const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n  const imports = maybeUnwrapFn(ngModuleDef.imports);\n  flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n    verifySemanticsOfNgModuleImport(mod, moduleType);\n    verifySemanticsOfNgModuleDef(mod, false, moduleType);\n  });\n  const exports = maybeUnwrapFn(ngModuleDef.exports);\n  declarations.forEach(verifyDeclarationsHaveDefinitions);\n  const combinedDeclarations: Type<any>[] = [\n    ...declarations.map(resolveForwardRef),\n    ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n  ];\n  exports.forEach(verifyExportsAreDeclaredOrReExported);\n  declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n  declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n\n  const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n  if (ngModule) {\n    ngModule.imports &&\n        flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n          verifySemanticsOfNgModuleImport(mod, moduleType);\n          verifySemanticsOfNgModuleDef(mod, false, moduleType);\n        });\n    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n    ngModule.entryComponents &&\n        deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n  }\n\n  // Throw Error if any errors were detected.\n  if (errors.length) {\n    throw new Error(errors.join('\\n'));\n  }\n  ////////////////////////////////////////////////////////////////////////////////////////////////\n  function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n    type = resolveForwardRef(type);\n    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n    if (!def) {\n      errors.push(\n          `Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n    }\n  }\n\n  function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n    type = resolveForwardRef(type);\n    const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n        getPipeDef(type) && 'pipe';\n    if (kind) {\n      // only checked if we are declared as Component, Directive, or Pipe\n      // Modules don't need to be declared or imported.\n      if (combinedDeclarations.lastIndexOf(type) === -1) {\n        // We are exporting something which we don't explicitly declare or import.\n        errors.push(\n            `Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n      }\n    }\n  }\n\n  function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n    type = resolveForwardRef(type);\n    const existingModule = ownerNgModule.get(type);\n    if (existingModule && existingModule !== moduleType) {\n      if (!suppressErrors) {\n        const modules = [existingModule, moduleType].map(stringifyForError).sort();\n        errors.push(\n            `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n            `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n            `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n      }\n    } else {\n      // Mark type as having owner.\n      ownerNgModule.set(type, moduleType);\n    }\n  }\n\n  function verifyComponentIsPartOfNgModule(type: Type<any>) {\n    type = resolveForwardRef(type);\n    const existingModule = ownerNgModule.get(type);\n    if (!existingModule) {\n      errors.push(\n          `Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n    }\n  }\n\n  function verifyCorrectBootstrapType(type: Type<any>) {\n    type = resolveForwardRef(type);\n    if (!getComponentDef(type)) {\n      errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n    }\n  }\n\n  function verifyComponentEntryComponentsIsPartOfNgModule(type: Type<any>) {\n    type = resolveForwardRef(type);\n    if (getComponentDef(type)) {\n      // We know we are component\n      const component = getAnnotation<Component>(type, 'Component');\n      if (component && component.entryComponents) {\n        deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n      }\n    }\n  }\n\n  function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) {\n    type = resolveForwardRef(type);\n\n    if (getComponentDef(type) || getDirectiveDef(type)) {\n      throw new Error(\n          `Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n\n    if (getPipeDef(type)) {\n      throw new Error(\n          `Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n    }\n  }\n}\n\nfunction unwrapModuleWithProvidersImports(\n    typeOrWithProviders: NgModuleType<any>| {ngModule: NgModuleType<any>}): NgModuleType<any> {\n  typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n  return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T|null {\n  let annotation: T|null = null;\n  collect(type.__annotations__);\n  collect(type.decorators);\n  return annotation;\n\n  function collect(annotations: any[] | null) {\n    if (annotations) {\n      annotations.forEach(readAnnotation);\n    }\n  }\n\n  function readAnnotation(\n      decorator: {type: {prototype: {ngMetadataName: string}, args: any[]}, args: any}): void {\n    if (!annotation) {\n      const proto = Object.getPrototypeOf(decorator);\n      if (proto.ngMetadataName == name) {\n        annotation = decorator as any;\n      } else if (decorator.type) {\n        const proto = Object.getPrototypeOf(decorator.type);\n        if (proto.ngMetadataName == name) {\n          annotation = decorator.args[0];\n        }\n      }\n    }\n  }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n  ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\n  verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n  moduleQueue.length = 0;\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n  type = resolveForwardRef(type);\n  const ngModuleDef = getNgModuleDef(type, true);\n  return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n    const ngModuleDef = getNgModuleDef(type);\n    if (ngModuleDef) {\n      verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n      return computeCombinedExports(type);\n    } else {\n      return type;\n    }\n  }))];\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ngComponentDef set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n  const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n  const transitiveScopes = transitiveScopesFor(moduleType);\n\n  declarations.forEach(declaration => {\n    if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n      // An `ngComponentDef` field exists - go ahead and patch the component directly.\n      const component = declaration as Type<any>& {ngComponentDef: ComponentDef<any>};\n      const componentDef = getComponentDef(component) !;\n      patchComponentDefWithScope(componentDef, transitiveScopes);\n    } else if (\n        !declaration.hasOwnProperty(NG_DIRECTIVE_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n      // Set `ngSelectorScope` for future reference when the component compilation finishes.\n      (declaration as Type<any>& {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n    }\n  });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n    componentDef: ComponentDef<C>, transitiveScopes: NgModuleTransitiveScopes) {\n  componentDef.directiveDefs = () =>\n      Array.from(transitiveScopes.compilation.directives)\n          .map(\n              dir => dir.hasOwnProperty(NG_COMPONENT_DEF) ? getComponentDef(dir) ! :\n                                                            getDirectiveDef(dir) !)\n          .filter(def => !!def);\n  componentDef.pipeDefs = () =>\n      Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe) !);\n  componentDef.schemas = transitiveScopes.schemas;\n\n  // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n  // may face a problem where previously compiled defs available to a given Component/Directive\n  // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n  // order to avoid this problem, we force fresh TView to be created.\n  componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be called\n * on modules with components that have not fully compiled yet, but the result should not be used\n * until they have.\n */\nexport function transitiveScopesFor<T>(\n    moduleType: Type<T>,\n    processNgModuleFn?: (ngModule: NgModuleType) => void): NgModuleTransitiveScopes {\n  if (!isNgModule(moduleType)) {\n    throw new Error(`${moduleType.name} does not have an ngModuleDef`);\n  }\n  const def = getNgModuleDef(moduleType) !;\n\n  if (def.transitiveCompileScopes !== null) {\n    return def.transitiveCompileScopes;\n  }\n\n  const scopes: NgModuleTransitiveScopes = {\n    schemas: def.schemas || null,\n    compilation: {\n      directives: new Set<any>(),\n      pipes: new Set<any>(),\n    },\n    exported: {\n      directives: new Set<any>(),\n      pipes: new Set<any>(),\n    },\n  };\n\n  maybeUnwrapFn(def.declarations).forEach(declared => {\n    const declaredWithDefs = declared as Type<any>& { ngPipeDef?: any; };\n\n    if (getPipeDef(declaredWithDefs)) {\n      scopes.compilation.pipes.add(declared);\n    } else {\n      // Either declared has an ngComponentDef or ngDirectiveDef, or it's a component which hasn't\n      // had its template compiled yet. In either case, it gets added to the compilation's\n      // directives.\n      scopes.compilation.directives.add(declared);\n    }\n  });\n\n  maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n    const importedType = imported as Type<I>& {\n      // If imported is an @NgModule:\n      ngModuleDef?: NgModuleDef<I>;\n    };\n\n    if (!isNgModule<I>(importedType)) {\n      throw new Error(`Importing ${importedType.name} which does not have an ngModuleDef`);\n    }\n\n    if (processNgModuleFn) {\n      processNgModuleFn(importedType as NgModuleType);\n    }\n\n    // When this module imports another, the imported module's exported directives and pipes are\n    // added to the compilation scope of this module.\n    const importedScope = transitiveScopesFor(importedType, processNgModuleFn);\n    importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n    importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n  });\n\n  maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n    const exportedType = exported as Type<E>& {\n      // Components, Directives, NgModules, and Pipes can all be exported.\n      ngComponentDef?: any;\n      ngDirectiveDef?: any;\n      ngModuleDef?: NgModuleDef<E>;\n      ngPipeDef?: any;\n    };\n\n    // Either the type is a module, a pipe, or a component/directive (which may not have an\n    // ngComponentDef as it might be compiled asynchronously).\n    if (isNgModule(exportedType)) {\n      // When this module exports another, the exported module's exported directives and pipes are\n      // added to both the compilation and exported scopes of this module.\n      const exportedScope = transitiveScopesFor(exportedType, processNgModuleFn);\n      exportedScope.exported.directives.forEach(entry => {\n        scopes.compilation.directives.add(entry);\n        scopes.exported.directives.add(entry);\n      });\n      exportedScope.exported.pipes.forEach(entry => {\n        scopes.compilation.pipes.add(entry);\n        scopes.exported.pipes.add(entry);\n      });\n    } else if (getPipeDef(exportedType)) {\n      scopes.exported.pipes.add(exportedType);\n    } else {\n      scopes.exported.directives.add(exportedType);\n    }\n  });\n\n  def.transitiveCompileScopes = scopes;\n  return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any>| ModuleWithProviders<{}>): Type<any> {\n  if (isModuleWithProviders(value)) {\n    return value.ngModule;\n  }\n  return value;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n  return (value as{ngModule?: any}).ngModule !== undefined;\n}\n\nfunction isNgModule<T>(value: Type<T>): value is Type<T>&{ngModuleDef: NgModuleDef<T>} {\n  return !!getNgModuleDef(value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3DirectiveMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {R3BaseMetadataFacade, R3ComponentMetadataFacade, R3QueryMetadataFacade} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {compileInjectable} from '../../di/jit/injectable';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Query} from '../../metadata/di';\nimport {Component, Directive, Input} from '../../metadata/directives';\nimport {componentNeedsResolution, maybeQueueResolutionOfComponentResources} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {getBaseDef, getComponentDef, getDirectiveDef} from '../definition';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF} from '../fields';\nimport {ComponentType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {flushModuleScopingQueueAsMuchAsPossible, patchComponentDefWithScope, transitiveScopesFor} from './module';\n\n\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * ngComponentDef onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ngComponentDef`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n  let ngComponentDef: any = null;\n  // Metadata may have resources which need to be resolved.\n  maybeQueueResolutionOfComponentResources(type, metadata);\n  Object.defineProperty(type, NG_COMPONENT_DEF, {\n    get: () => {\n      const compiler = getCompilerFacade();\n      if (ngComponentDef === null) {\n        if (componentNeedsResolution(metadata)) {\n          const error = [`Component '${type.name}' is not resolved:`];\n          if (metadata.templateUrl) {\n            error.push(` - templateUrl: ${metadata.templateUrl}`);\n          }\n          if (metadata.styleUrls && metadata.styleUrls.length) {\n            error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n          }\n          error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n          throw new Error(error.join('\\n'));\n        }\n\n        const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n        const meta: R3ComponentMetadataFacade = {\n          ...directiveMetadata(type, metadata),\n          typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n          template: metadata.template || '',\n          preserveWhitespaces: metadata.preserveWhitespaces || false,\n          styles: metadata.styles || EMPTY_ARRAY,\n          animations: metadata.animations,\n          directives: [],\n          changeDetection: metadata.changeDetection,\n          pipes: new Map(),\n          encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated,\n          interpolation: metadata.interpolation,\n          viewProviders: metadata.viewProviders || null,\n        };\n        if (meta.usesInheritance) {\n          addBaseDefToUndecoratedParents(type);\n        }\n        ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n\n        // When NgModule decorator executed, we enqueued the module definition such that\n        // it would only dequeue and add itself as module scope to all of its declarations,\n        // but only if  if all of its declarations had resolved. This call runs the check\n        // to see if any modules that are in the queue can be dequeued and add scope to\n        // their declarations.\n        flushModuleScopingQueueAsMuchAsPossible();\n\n        // If component compilation is async, then the @NgModule annotation which declares the\n        // component may execute and set an ngSelectorScope property on the component type. This\n        // allows the component to patch itself with directiveDefs from the module after it\n        // finishes compiling.\n        if (hasSelectorScope(type)) {\n          const scopes = transitiveScopesFor(type.ngSelectorScope);\n          patchComponentDefWithScope(ngComponentDef, scopes);\n        }\n      }\n      return ngComponentDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode,\n  });\n\n\n  // Add ngInjectableDef so components are reachable through the module injector by default\n  // This is mostly to support injecting components in tests. In real application code,\n  // components should be retrieved through the node injector, so this isn't a problem.\n  compileInjectable(type);\n}\n\nfunction hasSelectorScope<T>(component: Type<T>): component is Type<T>&\n    {ngSelectorScope: Type<any>} {\n  return (component as{ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * ngDirectiveDef onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive): void {\n  let ngDirectiveDef: any = null;\n  Object.defineProperty(type, NG_DIRECTIVE_DEF, {\n    get: () => {\n      if (ngDirectiveDef === null) {\n        const name = type && type.name;\n        const sourceMapUrl = `ng:///${name}/ngDirectiveDef.js`;\n        const compiler = getCompilerFacade();\n        const facade = directiveMetadata(type as ComponentType<any>, directive);\n        facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n        if (facade.usesInheritance) {\n          addBaseDefToUndecoratedParents(type);\n        }\n        ngDirectiveDef = compiler.compileDirective(angularCoreEnv, sourceMapUrl, facade);\n      }\n      return ngDirectiveDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode,\n  });\n\n  // Add ngInjectableDef so directives are reachable through the module injector by default\n  // This is mostly to support injecting directives in tests. In real application code,\n  // directives should be retrieved through the node injector, so this isn't a problem.\n  compileInjectable(type);\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n  return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n  // Reflect inputs and outputs.\n  const propMetadata = getReflect().ownPropMetadata(type);\n\n  return {\n    name: type.name,\n    type: type,\n    typeArgumentCount: 0,\n    selector: metadata.selector !,\n    deps: reflectDependencies(type),\n    host: metadata.host || EMPTY_OBJ,\n    propMetadata: propMetadata,\n    inputs: metadata.inputs || EMPTY_ARRAY,\n    outputs: metadata.outputs || EMPTY_ARRAY,\n    queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n    lifecycle: {usesOnChanges: type.prototype.hasOwnProperty('ngOnChanges')},\n    typeSourceSpan: null !,\n    usesInheritance: !extendsDirectlyFromObject(type),\n    exportAs: extractExportAs(metadata.exportAs),\n    providers: metadata.providers || null,\n    viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n  };\n}\n\n/**\n * Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addBaseDefToUndecoratedParents(type: Type<any>) {\n  const objPrototype = Object.prototype;\n  let parent = Object.getPrototypeOf(type);\n\n  // Go up the prototype until we hit `Object`.\n  while (parent && parent !== objPrototype) {\n    // Since inheritance works if the class was annotated already, we only need to add\n    // the base def if there are no annotations and the base def hasn't been created already.\n    if (!getDirectiveDef(parent) && !getComponentDef(parent) && !getBaseDef(parent)) {\n      const facade = extractBaseDefMetadata(parent);\n      facade && compileBase(parent, facade);\n    }\n    parent = Object.getPrototypeOf(parent);\n  }\n}\n\n/** Compiles the base metadata into a base definition. */\nfunction compileBase(type: Type<any>, facade: R3BaseMetadataFacade): void {\n  let ngBaseDef: any = null;\n  Object.defineProperty(type, NG_BASE_DEF, {\n    get: () => {\n      if (ngBaseDef === null) {\n        const name = type && type.name;\n        const sourceMapUrl = `ng://${name}/ngBaseDef.js`;\n        const compiler = getCompilerFacade();\n        ngBaseDef = compiler.compileBase(angularCoreEnv, sourceMapUrl, facade);\n      }\n      return ngBaseDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode,\n  });\n}\n\n/** Extracts the metadata necessary to construct an `ngBaseDef` from a class. */\nfunction extractBaseDefMetadata(type: Type<any>): R3BaseMetadataFacade|null {\n  const propMetadata = getReflect().ownPropMetadata(type);\n  const viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery);\n  const queries = extractQueriesMetadata(type, propMetadata, isContentQuery);\n  let inputs: {[key: string]: string | [string, string]}|undefined;\n  let outputs: {[key: string]: string}|undefined;\n  // We only need to know whether there are any HostListener or HostBinding\n  // decorators present, the parsing logic is in the compiler already.\n  let hasHostDecorators = false;\n\n  for (const field in propMetadata) {\n    propMetadata[field].forEach(ann => {\n      const metadataName = ann.ngMetadataName;\n      if (metadataName === 'Input') {\n        inputs = inputs || {};\n        inputs[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n      } else if (metadataName === 'Output') {\n        outputs = outputs || {};\n        outputs[field] = ann.bindingPropertyName || field;\n      } else if (metadataName === 'HostBinding' || metadataName === 'HostListener') {\n        hasHostDecorators = true;\n      }\n    });\n  }\n\n  // Only generate the base def if there's any info inside it.\n  if (inputs || outputs || viewQueries.length || queries.length || hasHostDecorators) {\n    return {name: type.name, type, inputs, outputs, viewQueries, queries, propMetadata};\n  }\n\n  return null;\n}\n\nfunction convertToR3QueryPredicate(selector: any): any|string[] {\n  return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n  return {\n    propertyName: propertyName,\n    predicate: convertToR3QueryPredicate(ann.selector),\n    descendants: ann.descendants,\n    first: ann.first,\n    read: ann.read ? ann.read : null,\n    static: !!ann.static\n  };\n}\nfunction extractQueriesMetadata(\n    type: Type<any>, propMetadata: {[key: string]: any[]},\n    isQueryAnn: (ann: any) => ann is Query): R3QueryMetadataFacade[] {\n  const queriesMeta: R3QueryMetadataFacade[] = [];\n  for (const field in propMetadata) {\n    if (propMetadata.hasOwnProperty(field)) {\n      const annotations = propMetadata[field];\n      annotations.forEach(ann => {\n        if (isQueryAnn(ann)) {\n          if (!ann.selector) {\n            throw new Error(\n                `Can't construct a query for the property \"${field}\" of ` +\n                `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n          }\n          if (annotations.some(isInputAnn)) {\n            throw new Error(`Cannot combine @Input decorators with query decorators`);\n          }\n          queriesMeta.push(convertToR3QueryMetadata(field, ann));\n        }\n      });\n    }\n  }\n  return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string | undefined): string[]|null {\n  if (exportAs === undefined) {\n    return null;\n  }\n\n  return exportAs.split(',').map(part => part.trim());\n}\n\nfunction isContentQuery(value: any): value is Query {\n  const name = value.ngMetadataName;\n  return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n  const name = value.ngMetadataName;\n  return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnn(value: any): value is Input {\n  return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n  return value.split(',').map(piece => piece.trim());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Pipe} from '../../metadata/directives';\nimport {NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n  let ngPipeDef: any = null;\n  Object.defineProperty(type, NG_PIPE_DEF, {\n    get: () => {\n      if (ngPipeDef === null) {\n        const typeName = type.name;\n        ngPipeDef =\n            getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${typeName}/ngPipeDef.js`, {\n              type: type,\n              typeArgumentCount: 0,\n              name: typeName,\n              deps: reflectDependencies(type),\n              pipeName: meta.name,\n              pure: meta.pure !== undefined ? meta.pure : true\n            });\n      }\n      return ngPipeDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode,\n  });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di';\nimport {Type} from '../interface/type';\nimport {compileComponent as render3CompileComponent, compileDirective as render3CompileDirective} from '../render3/jit/directive';\nimport {compilePipe as render3CompilePipe} from '../render3/jit/pipe';\nimport {TypeDecorator, makeDecorator, makePropDecorator} from '../util/decorators';\nimport {noop} from '../util/noop';\n\nimport {ViewEncapsulation} from './view';\n\n\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n  /**\n   * Decorator that marks a class as an Angular directive.\n   * You can define your own directives to attach custom behavior to elements in the DOM.\n   *\n   * The options provide configuration metadata that determines\n   * how the directive should be processed, instantiated and used at\n   * runtime.\n   *\n   * Directive classes, like component classes, can implement\n   * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.\n   *\n   *\n   * @usageNotes\n   * To define a directive, mark the class with the decorator and provide metadata.\n   *\n   * ```ts\n   * import {Directive} from '@angular/core';\n   *\n   * @Directive({\n   *   selector: 'my-directive',\n   * })\n   * export class MyDirective {\n   * ...\n   * }\n   * ```\n   *\n   * ### Declaring directives\n   *\n   * Directives are [declarables](guide/glossary#declarable).\n   * They must be declared by an NgModule\n   * in order to be usable in an app.\n   *\n   * A directive must belong to exactly one NgModule. Do not re-declare\n   * a directive imported from another module.\n   * List the directive class in the `declarations` field of an NgModule.\n   *\n   * ```ts\n   * declarations: [\n   *  AppComponent,\n   *  MyDirective\n   * ],\n   * ```\n   *\n   * @Annotation\n   */\n  (obj: Directive): TypeDecorator;\n\n  /**\n   * See the `Directive` decorator.\n   */\n  new (obj: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n  /**\n   * The CSS selector that identifies this directive in a template\n   * and triggers instantiation of the directive.\n   *\n   * Declare as one of the following:\n   *\n   * - `element-name`: Select by element name.\n   * - `.class`: Select by class name.\n   * - `[attribute]`: Select by attribute name.\n   * - `[attribute=value]`: Select by attribute name and value.\n   * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n   * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n   *\n   * Angular only allows directives to apply on CSS selectors that do not cross\n   * element boundaries.\n   *\n   * For the following template HTML, a directive with an `input[type=text]` selector,\n   * would be instantiated only on the `<input type=\"text\">` element.\n   *\n   * ```html\n   * <form>\n   *   <input type=\"text\">\n   *   <input type=\"radio\">\n   * <form>\n   * ```\n   *\n   */\n  selector?: string;\n\n  /**\n   * Enumerates the set of data-bound input properties for a directive\n   *\n   * Angular automatically updates input properties during change detection.\n   * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n   * configuration:\n   *\n   * - `directiveProperty` specifies the component property where the value is written.\n   * - `bindingProperty` specifies the DOM property where the value is read from.\n   *\n   * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n   *\n   * @usageNotes\n   *\n   * The following example creates a component with two data-bound properties.\n   *\n   * ```typescript\n   * @Component({\n   *   selector: 'bank-account',\n   *   inputs: ['bankName', 'id: account-id'],\n   *   template: `\n   *     Bank Name: {{bankName}}\n   *     Account Id: {{id}}\n   *   `\n   * })\n   * class BankAccount {\n   *   bankName: string;\n   *   id: string;\n   *\n   * ```\n   *\n   */\n  inputs?: string[];\n\n  /**\n   * Enumerates the set of event-bound output properties.\n   *\n   * When an output property emits an event, an event handler attached to that event\n   * in the template is invoked.\n   *\n   * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n   * configuration:\n   *\n   * - `directiveProperty` specifies the component property that emits events.\n   * - `bindingProperty` specifies the DOM property the event handler is attached to.\n   *\n   * @usageNotes\n   *\n   * ```typescript\n   * @Component({\n   *   selector: 'child-dir',\n   *   outputs: [ 'bankNameChange' ]\n   *   template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n   * })\n   * class ChildDir {\n   *  bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n   * }\n   *\n   * @Component({\n   *   selector: 'main',\n   *   template: `\n   *     {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n   *   `\n   * })\n   * class MainComponent {\n   *  bankName: string;\n   *\n   *   onBankNameChange(bankName: string) {\n   *     this.bankName = bankName;\n   *   }\n   * }\n   * ```\n   *\n   */\n  outputs?: string[];\n\n  /**\n   * Configures the [injector](guide/glossary#injector) of this\n   * directive or component with a [token](guide/glossary#di-token)\n   * that maps to a [provider](guide/glossary#provider) of a dependency.\n   */\n  providers?: Provider[];\n\n  /**\n   * Defines the name that can be used in the template to assign this directive to a variable.\n   *\n   * @usageNotes\n   *\n   * ```ts\n   * @Directive({\n   *   selector: 'child-dir',\n   *   exportAs: 'child'\n   * })\n   * class ChildDir {\n   * }\n   *\n   * @Component({\n   *   selector: 'main',\n   *   template: `<child-dir #c=\"child\"></child-dir>`\n   * })\n   * class MainComponent {\n   * }\n   * ```\n   *\n   */\n  exportAs?: string;\n\n  /**\n   * Configures the queries that will be injected into the directive.\n   *\n   * Content queries are set before the `ngAfterContentInit` callback is called.\n   * View queries are set before the `ngAfterViewInit` callback is called.\n   *\n   * @usageNotes\n   *\n   * The following example shows how queries are defined\n   * and when their results are available in lifecycle hooks:\n   *\n   * ```ts\n   * @Component({\n   *   selector: 'someDir',\n   *   queries: {\n   *     contentChildren: new ContentChildren(ChildDirective),\n   *     viewChildren: new ViewChildren(ChildDirective)\n   *   },\n   *   template: '<child-directive></child-directive>'\n   * })\n   * class SomeDir {\n   *   contentChildren: QueryList<ChildDirective>,\n   *   viewChildren: QueryList<ChildDirective>\n   *\n   *   ngAfterContentInit() {\n   *     // contentChildren is set\n   *   }\n   *\n   *   ngAfterViewInit() {\n   *     // viewChildren is set\n   *   }\n   * }\n   * ```\n   *\n   * @Annotation\n   */\n  queries?: {[key: string]: any};\n\n  /**\n   * Maps class properties to host element bindings for properties,\n   * attributes, and events, using a set of key-value pairs.\n   *\n   * Angular automatically checks host property bindings during change detection.\n   * If a binding changes, Angular updates the directive's host element.\n   *\n   * When the key is a property of the host element, the property value is\n   * the propagated to the specified DOM property.\n   *\n   * When the key is a static attribute in the DOM, the attribute value\n   * is propagated to the specified property in the host element.\n   *\n   * For event handling:\n   * - The key is the DOM event that the directive listens to.\n   * To listen to global events, add the target to the event name.\n   * The target can be `window`, `document` or `body`.\n   * - The value is the statement to execute when the event occurs. If the\n   * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n   * event. A handler method can refer to the `$event` local variable.\n   *\n   */\n  host?: {[key: string]: string};\n\n  /**\n   * If true, this directive/component will be skipped by the AOT compiler and so will always be\n   * compiled using JIT.\n   *\n   * This exists to support future Ivy work and has no effect currently.\n   */\n  jit?: true;\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n    'Directive', (dir: Directive = {}) => dir, undefined, undefined,\n    (type: Type<any>, meta: Directive) => SWITCH_COMPILE_DIRECTIVE(type, meta));\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n  /**\n   * Decorator that marks a class as an Angular component and provides configuration\n   * metadata that determines how the component should be processed,\n   * instantiated, and used at runtime.\n   *\n   * Components are the most basic UI building block of an Angular app.\n   * An Angular app contains a tree of Angular components.\n   *\n   * Angular components are a subset of directives, always associated with a template.\n   * Unlike other directives, only one component can be instantiated per an element in a template.\n   *\n   * A component must belong to an NgModule in order for it to be available\n   * to another component or application. To make it a member of an NgModule,\n   * list it in the `declarations` field of the `NgModule` metadata.\n   *\n   * Note that, in addition to these options for configuring a directive,\n   * you can control a component's runtime behavior by implementing\n   * life-cycle hooks. For more information, see the\n   * [Lifecycle Hooks](guide/lifecycle-hooks) guide.\n   *\n   * @usageNotes\n   *\n   * ### Setting component inputs\n   *\n   * The following example creates a component with two data-bound properties,\n   * specified by the `inputs` value.\n   *\n   * <code-example path=\"core/ts/metadata/directives.ts\" region=\"component-input\"></code-example>\n   *\n   *\n   * ### Setting component outputs\n   *\n   * The following example shows two event emitters that emit on an interval. One\n   * emits an output every second, while the other emits every five seconds.\n   *\n   * {@example core/ts/metadata/directives.ts region='component-output-interval'}\n   *\n   * ### Injecting a class with a view provider\n   *\n   * The following simple example injects a class into a component\n   * using the view provider specified in component metadata:\n   *\n   * ```ts\n   * class Greeter {\n   *    greet(name:string) {\n   *      return 'Hello ' + name + '!';\n   *    }\n   * }\n   *\n   * @Directive({\n   *   selector: 'needs-greeter'\n   * })\n   * class NeedsGreeter {\n   *   greeter:Greeter;\n   *\n   *   constructor(greeter:Greeter) {\n   *     this.greeter = greeter;\n   *   }\n   * }\n   *\n   * @Component({\n   *   selector: 'greet',\n   *   viewProviders: [\n   *     Greeter\n   *   ],\n   *   template: `<needs-greeter></needs-greeter>`\n   * })\n   * class HelloWorld {\n   * }\n   *\n   * ```\n   *\n   * ### Preserving whitespace\n   *\n   * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.\n   * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).\n   * To change the default setting for all components in your application, set\n   * the `preserveWhitespaces` option of the AOT compiler.\n   *\n   * By default, the AOT compiler removes whitespace characters as follows:\n   * * Trims all whitespaces at the beginning and the end of a template.\n   * * Removes whitespace-only text nodes. For example,\n   *\n   * ```html\n   * <button>Action 1</button>  <button>Action 2</button>\n   * ```\n   *\n   * becomes:\n   *\n   * ```html\n   * <button>Action 1</button><button>Action 2</button>\n   * ```\n   *\n   * * Replaces a series of whitespace characters in text nodes with a single space.\n   * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n   * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n   * where whitespace characters are significant.\n   *\n   * Note that these transformations can influence DOM nodes layout, although impact\n   * should be minimal.\n   *\n   * You can override the default behavior to preserve whitespace characters\n   * in certain fragments of a template. For example, you can exclude an entire\n   * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n   *\n   * ```html\n   * <div ngPreserveWhitespaces>\n   *     whitespaces are preserved here\n   *     <span>    and here </span>\n   * </div>\n   * ```\n   *\n   * You can force a single space to be preserved in a text node by using `&ngsp;`,\n   * which is replaced with a space character by Angular's template\n   * compiler:\n   *\n   * ```html\n   * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n   * <!-->compiled to be equivalent to:</>\n   *  <a>Spaces</a> <a>between</a> <a>links.</a>\n   * ```\n   *\n   * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n   * the `preserveWhitespaces` option is set to `false`.\n   *\n   * ```html\n   * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n   * <!-->compiled to be equivalent to:</>\n   *  <a>Spaces</a> <a>between</a> <a>links.</a>\n   * ```\n   *\n   * To preserve sequences of whitespace characters, use the\n   * `ngPreserveWhitespaces` attribute.\n   *\n   * @Annotation\n   */\n  (obj: Component): TypeDecorator;\n  /**\n   * See the `Component` decorator.\n   */\n  new (obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n  /**\n   * The change-detection strategy to use for this component.\n   *\n   * When a component is instantiated, Angular creates a change detector,\n   * which is responsible for propagating the component's bindings.\n   * The strategy is one of:\n   * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n   * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n   */\n  changeDetection?: ChangeDetectionStrategy;\n\n  /**\n   * Defines the set of injectable objects that are visible to its view DOM children.\n   * See [example](#injecting-a-class-with-a-view-provider).\n   *\n   */\n  viewProviders?: Provider[];\n\n  /**\n   * The module ID of the module that contains the component.\n   * The component must be able to resolve relative URLs for templates and styles.\n   * SystemJS exposes the `__moduleName` variable within each module.\n   * In CommonJS, this can  be set to `module.id`.\n   *\n   */\n  moduleId?: string;\n\n  /**\n   * The relative path or absolute URL of a template file for an Angular component.\n   * If provided, do not supply an inline template using `template`.\n   *\n   */\n  templateUrl?: string;\n\n  /**\n   * An inline template for an Angular component. If provided,\n   * do not supply a template file using `templateUrl`.\n   *\n   */\n  template?: string;\n\n  /**\n   * One or more relative paths or absolute URLs for files containing CSS stylesheets to use\n   * in this component.\n   */\n  styleUrls?: string[];\n\n  /**\n   * One or more inline CSS stylesheets to use\n   * in this component.\n   */\n  styles?: string[];\n\n  /**\n   * One or more animation `trigger()` calls, containing\n   * `state()` and `transition()` definitions.\n   * See the [Animations guide](/guide/animations) and animations API documentation.\n   *\n   */\n  animations?: any[];\n\n  /**\n   * An encapsulation policy for the template and CSS styles. One of:\n   * - `ViewEncapsulation.Native`: Deprecated. Use `ViewEncapsulation.ShadowDom` instead.\n   * - `ViewEncapsulation.Emulated`: Use shimmed CSS that\n   * emulates the native behavior.\n   * - `ViewEncapsulation.None`: Use global CSS without any\n   * encapsulation.\n   * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.\n   *\n   * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is\n   * `ViewEncapsulation.Emulated`.\n   *\n   * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`\n   * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.\n   */\n  encapsulation?: ViewEncapsulation;\n\n  /**\n   * Overrides the default encapsulation start and end delimiters (`{{` and `}}`)\n   */\n  interpolation?: [string, string];\n\n  /**\n   * A set of components that should be compiled along with\n   * this component. For each component listed here,\n   * Angular creates a {@link ComponentFactory} and stores it in the\n   * {@link ComponentFactoryResolver}.\n   */\n  entryComponents?: Array<Type<any>|any[]>;\n\n  /**\n   * True to preserve or false to remove potentially superfluous whitespace characters\n   * from the compiled template. Whitespace characters are those matching the `\\s`\n   * character class in JavaScript regular expressions. Default is false, unless\n   * overridden in compiler options.\n   */\n  preserveWhitespaces?: boolean;\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n    'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n    Directive, undefined,\n    (type: Type<any>, meta: Component) => SWITCH_COMPILE_COMPONENT(type, meta));\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n  /**\n   *\n   * Decorator that marks a class as pipe and supplies configuration metadata.\n   *\n   * A pipe class must implement the `PipeTransform` interface.\n   * For example, if the name is \"myPipe\", use a template binding expression\n   * such as the following:\n   *\n   * ```\n   * {{ exp | myPipe }}\n   * ```\n   *\n   * The result of the expression is passed to the pipe's `transform()` method.\n   *\n   * A pipe must belong to an NgModule in order for it to be available\n   * to a template. To make it a member of an NgModule,\n   * list it in the `declarations` field of the `NgModule` metadata.\n   *\n   * @see [Style Guide: Pipe Names](guide/styleguide#02-09)\n   *\n   */\n  (obj: Pipe): TypeDecorator;\n\n  /**\n   * See the `Pipe` decorator.\n   */\n  new (obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n  /**\n   * The pipe name to use in template bindings.\n   * Typically uses [lowerCamelCase](guide/glossary#case-types)\n   * because the name cannot contain hyphens.\n   */\n  name: string;\n\n  /**\n   * When true, the pipe is pure, meaning that the\n   * `transform()` method is invoked only when its input arguments\n   * change. Pipes are pure by default.\n   *\n   * If the pipe has internal state (that is, the result\n   * depends on state other than its arguments), set `pure` to false.\n   * In this case, the pipe is invoked on each change-detection cycle,\n   * even if the arguments have not changed.\n   */\n  pure?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n    'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,\n    (type: Type<any>, meta: Pipe) => SWITCH_COMPILE_PIPE(type, meta));\n\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n  /**\n  * Decorator that marks a class field as an input property and supplies configuration metadata.\n  * The input property is bound to a DOM property in the template. During change detection,\n  * Angular automatically updates the data property with the DOM property's value.\n  *\n  * @usageNotes\n  *\n  * You can supply an optional name to use in templates when the\n  * component is instantiated, that maps to the\n  * name of the bound property. By default, the original\n  * name of the bound property is used for input binding.\n  *\n  * The following example creates a component with two input properties,\n  * one of which is given a special binding name.\n  *\n  * ```typescript\n  * @Component({\n  *   selector: 'bank-account',\n  *   template: `\n  *     Bank Name: {{bankName}}\n  *     Account Id: {{id}}\n  *   `\n  * })\n  * class BankAccount {\n  *   // This property is bound using its original name.\n  *   @Input() bankName: string;\n  *   // this property value is bound to a different property name\n  *   // when this component is instantiated in a template.\n  *   @Input('account-id') id: string;\n  *\n  *   // this property is not bound, and is not automatically updated by Angular\n  *   normalizedBankName: string;\n  * }\n  *\n  * @Component({\n  *   selector: 'app',\n  *   template: `\n  *     <bank-account bankName=\"RBC\" account-id=\"4747\"></bank-account>\n  *   `\n  * })\n  * class App {}\n  * ```\n  *\n  * @see [Input and Output properties](guide/template-syntax#input-and-output-properties)\n  */\n  (bindingPropertyName?: string): any;\n  new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n  /**\n   * The name of the DOM property to which the input property is bound.\n   */\n  bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator =\n    makePropDecorator('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n  /**\n  * Decorator that marks a class field as an output property and supplies configuration metadata.\n  * The DOM property bound to the output property is automatically updated during change detection.\n  *\n  * @usageNotes\n  *\n  * You can supply an optional name to use in templates when the\n  * component is instantiated, that maps to the\n  * name of the bound property. By default, the original\n  * name of the bound property is used for output binding.\n  *\n  * See `Input` decorator for an example of providing a binding name.\n  *\n  * @see [Input and Output properties](guide/template-syntax#input-and-output-properties)\n  *\n  */\n  (bindingPropertyName?: string): any;\n  new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n  /**\n  * The name of the DOM property to which the output property is bound.\n  */\n  bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator =\n    makePropDecorator('Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n  /**\n   * Decorator that marks a DOM property as a host-binding property and supplies configuration\n   * metadata.\n   * Angular automatically checks host property bindings during change detection, and\n   * if a binding changes it updates the host element of the directive.\n   *\n   * @usageNotes\n   *\n   * The following example creates a directive that sets the `valid` and `invalid`\n   * properties on the DOM element that has an `ngModel` directive on it.\n   *\n   * ```typescript\n   * @Directive({selector: '[ngModel]'})\n   * class NgModelStatus {\n   *   constructor(public control: NgModel) {}\n   *   @HostBinding('class.valid') get valid() { return this.control.valid; }\n   *   @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n   * }\n   *\n   * @Component({\n   *   selector: 'app',\n   *   template: `<input [(ngModel)]=\"prop\">`,\n   * })\n   * class App {\n   *   prop;\n   * }\n   * ```\n   *\n   */\n  (hostPropertyName?: string): any;\n  new (hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n  /**\n   * The DOM property that is bound to a data property.\n   */\n  hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator =\n    makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n  /**\n   * Decorator that declares a DOM event to listen for,\n   * and provides a handler method to run when that event occurs.\n   */\n  (eventName: string, args?: string[]): any;\n  new (eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n  /**\n   * The DOM event to listen for.\n   */\n  eventName?: string;\n  /**\n   * A set of arguments to pass to the handler method when the event occurs.\n   */\n  args?: string[];\n}\n\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n *   numberOfClicks = 0;\n *\n *   @HostListener('click', ['$event.target'])\n *   onClick(btn) {\n *     console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n *  }\n * }\n *\n * @Component({\n *   selector: 'app',\n *   template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator =\n    makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\n\n\nexport const SWITCH_COMPILE_COMPONENT__POST_R3__ = render3CompileComponent;\nexport const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = render3CompileDirective;\nexport const SWITCH_COMPILE_PIPE__POST_R3__ = render3CompilePipe;\n\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n\nconst SWITCH_COMPILE_COMPONENT: typeof render3CompileComponent = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE: typeof render3CompileDirective = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE: typeof render3CompilePipe = SWITCH_COMPILE_PIPE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {InjectorType, ÉµÉµdefineInjector} from '../di/interface/defs';\nimport {Provider} from '../di/interface/provider';\nimport {convertInjectableProviderToFactory} from '../di/util';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {NgModuleType} from '../render3';\nimport {compileNgModule as render3CompileNgModule} from '../render3/jit/module';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\n\n/**\n * Represents the expansion of an `NgModule` into its scopes.\n *\n * A scope is a set of directives and pipes that are visible in a particular context. Each\n * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will\n * be recognized in the templates of components declared by the module. The `exported` scope is the\n * set of directives and pipes exported by a module (that is, module B's exported scope gets added\n * to module A's compilation scope when module A imports B).\n */\nexport interface NgModuleTransitiveScopes {\n  compilation: {directives: Set<any>; pipes: Set<any>;};\n  exported: {directives: Set<any>; pipes: Set<any>;};\n  schemas: SchemaMetadata[]|null;\n}\n\n/**\n * @publicApi\n */\nexport type ÉµÉµNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;\n\n/**\n * Runtime link information for NgModules.\n *\n * This is the internal data structure used by the runtime to assemble components, directives,\n * pipes, and injectors.\n *\n * NOTE: Always use `ÉµÉµdefineNgModule` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n */\nexport interface NgModuleDef<T> {\n  /** Token representing the module. Used by DI. */\n  type: T;\n\n  /** List of components to bootstrap. */\n  bootstrap: Type<any>[]|(() => Type<any>[]);\n\n  /** List of components, directives, and pipes declared by this module. */\n  declarations: Type<any>[]|(() => Type<any>[]);\n\n  /** List of modules or `ModuleWithProviders` imported by this module. */\n  imports: Type<any>[]|(() => Type<any>[]);\n\n  /**\n   * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n   * module.\n   */\n  exports: Type<any>[]|(() => Type<any>[]);\n\n  /**\n   * Cached value of computed `transitiveCompileScopes` for this module.\n   *\n   * This should never be read directly, but accessed via `transitiveScopesFor`.\n   */\n  transitiveCompileScopes: NgModuleTransitiveScopes|null;\n\n  /** The set of schemas that declare elements to be allowed in the NgModule. */\n  schemas: SchemaMetadata[]|null;\n\n  /** Unique ID for the module with which it should be registered.  */\n  id: string|null;\n}\n\n/**\n * A wrapper around an NgModule that associates it with the providers.\n *\n * @param T the module type. In Ivy applications, this must be explicitly\n * provided.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<\n    T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {\n  ngModule: Type<T>;\n  providers?: Provider[];\n}\n\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n  /**\n   * Decorator that marks a class as an NgModule and supplies configuration metadata.\n   */\n  (obj?: NgModule): TypeDecorator;\n  new (obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n  /**\n   * The set of injectable objects that are available in the injector\n   * of this module.\n   *\n   * @see [Dependency Injection guide](guide/dependency-injection)\n   * @see [NgModule guide](guide/providers)\n   *\n   * @usageNotes\n   *\n   * Dependencies whose providers are listed here become available for injection\n   * into any component, directive, pipe or service that is a child of this injector.\n   * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n   * to any part of the app.\n   *\n   * A lazy-loaded module has its own injector, typically a child of the app root injector.\n   * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n   * If a lazy-loaded module also provides the `UserService`, any component created\n   * within that module's context (such as by router navigation) gets the local instance\n   * of the service, not the instance in the root injector.\n   * Components in external modules continue to receive the instance provided by their injectors.\n   *\n   * ### Example\n   *\n   * The following example defines a class that is injected in\n   * the HelloWorld NgModule:\n   *\n   * ```\n   * class Greeter {\n   *    greet(name:string) {\n   *      return 'Hello ' + name + '!';\n   *    }\n   * }\n   *\n   * @NgModule({\n   *   providers: [\n   *     Greeter\n   *   ]\n   * })\n   * class HelloWorld {\n   *   greeter:Greeter;\n   *\n   *   constructor(greeter:Greeter) {\n   *     this.greeter = greeter;\n   *   }\n   * }\n   * ```\n   */\n  providers?: Provider[];\n\n  /**\n   * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))\n   * that belong to this module.\n   *\n   * @usageNotes\n   *\n   * The set of selectors that are available to a template include those declared here, and\n   * those that are exported from imported NgModules.\n   *\n   * Declarables must belong to exactly one module.\n   * The compiler emits an error if you try to declare the same class in more than one module.\n   * Be careful not to declare a class that is imported from another module.\n   *\n   * ### Example\n   *\n   * The following example allows the CommonModule to use the `NgFor`\n   * directive.\n   *\n   * ```javascript\n   * @NgModule({\n   *   declarations: [NgFor]\n   * })\n   * class CommonModule {\n   * }\n   * ```\n   */\n  declarations?: Array<Type<any>|any[]>;\n\n  /**\n   * The set of NgModules whose exported [declarables](guide/glossary#declarable)\n   * are available to templates in this module.\n   *\n   * @usageNotes\n   *\n   * A template can use exported declarables from any\n   * imported module, including those from modules that are imported indirectly\n   * and re-exported.\n   * For example, `ModuleA` imports `ModuleB`, and also exports\n   * it, which makes the declarables from `ModuleB` available\n   * wherever `ModuleA` is imported.\n   *\n   * ### Example\n   *\n   * The following example allows MainModule to use anything exported by\n   * `CommonModule`:\n   *\n   * ```javascript\n   * @NgModule({\n   *   imports: [CommonModule]\n   * })\n   * class MainModule {\n   * }\n   * ```\n   *\n   */\n  imports?: Array<Type<any>|ModuleWithProviders<{}>|any[]>;\n\n  /**\n   * The set of components, directives, and pipes declared in this\n   * NgModule that can be used in the template of any component that is part of an\n   * NgModule that imports this NgModule. Exported declarations are the module's public API.\n   *\n   * A declarable belongs to one and only one NgModule.\n   * A module can list another module among its exports, in which case all of that module's\n   * public declaration are exported.\n   *\n   * @usageNotes\n   *\n   * Declarations are private by default.\n   * If this ModuleA does not export UserComponent, then only the components within this\n   * ModuleA can use UserComponent.\n   *\n   * ModuleA can import ModuleB and also export it, making exports from ModuleB\n   * available to an NgModule that imports ModuleA.\n   *\n   * ### Example\n   *\n   * The following example exports the `NgFor` directive from CommonModule.\n   *\n   * ```javascript\n   * @NgModule({\n   *   exports: [NgFor]\n   * })\n   * class CommonModule {\n   * }\n   * ```\n   */\n  exports?: Array<Type<any>|any[]>;\n\n  /**\n   * The set of components to compile when this NgModule is defined,\n   * so that they can be dynamically loaded into the view.\n   *\n   * For each component listed here, Angular creates a `ComponentFactory`\n   * and stores it in the `ComponentFactoryResolver`.\n   *\n   * Angular automatically adds components in the module's bootstrap\n   * and route definitions into the `entryComponents` list. Use this\n   * option to add components that are bootstrapped\n   * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.\n   *\n   * @see [Entry Components](guide/entry-components)\n   */\n  entryComponents?: Array<Type<any>|any[]>;\n\n  /**\n   * The set of components that are bootstrapped when\n   * this module is bootstrapped. The components listed here\n   * are automatically added to `entryComponents`.\n   */\n  bootstrap?: Array<Type<any>|any[]>;\n\n  /**\n   * The set of schemas that declare elements to be allowed in the NgModule.\n   * Elements and properties that are neither Angular components nor directives\n   * must be declared in a schema.\n   *\n   * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n   *\n   * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n   * you must ensure that allowed elements and properties securely escape inputs.\n   */\n  schemas?: Array<SchemaMetadata|any[]>;\n\n  /**\n   * A name or path that uniquely identifies this NgModule in `getModuleFactory`.\n   * If left `undefined`, the NgModule is not registered with\n   * `getModuleFactory`.\n   */\n  id?: string;\n\n  /**\n   * If true, this module will be skipped by the AOT compiler and so will always be compiled\n   * using JIT.\n   *\n   * This exists to support future Ivy work and has no effect currently.\n   */\n  jit?: true;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n    'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,\n    /**\n     * Decorator that marks the following class as an NgModule, and supplies\n     * configuration metadata for it.\n     *\n     * * The `declarations` and `entryComponents` options configure the compiler\n     * with information about what belongs to the NgModule.\n     * * The `providers` options configures the NgModule's injector to provide\n     * dependencies the NgModule members.\n     * * The `imports` and `exports` options bring in members from other modules, and make\n     * this module's members available to others.\n     */\n    (type: Type<any>, meta: NgModule) => SWITCH_COMPILE_NGMODULE(type, meta));\n\n/**\n * @description\n * Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule\n * annotation.\n *\n * Reference to the current application is provided as a parameter.\n *\n * See [\"Bootstrapping\"](guide/bootstrapping) and [\"Entry components\"](guide/entry-components).\n *\n * @usageNotes\n * ```typescript\n * class AppModule implements DoBootstrap {\n *   ngDoBootstrap(appRef: ApplicationRef) {\n *     appRef.bootstrap(AppComponent); // Or some other component\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; }\n\nfunction preR3NgModuleCompile(moduleType: Type<any>, metadata?: NgModule): void {\n  let imports = (metadata && metadata.imports) || [];\n  if (metadata && metadata.exports) {\n    imports = [...imports, metadata.exports];\n  }\n\n  (moduleType as InjectorType<any>).ngInjectorDef = ÉµÉµdefineInjector({\n    factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),\n    providers: metadata && metadata.providers,\n    imports: imports,\n  });\n}\n\n\nexport const SWITCH_COMPILE_NGMODULE__POST_R3__ = render3CompileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE: typeof render3CompileNgModule = SWITCH_COMPILE_NGMODULE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPromise} from '../src/util/lang';\n\nimport {Inject, Injectable, InjectionToken, Optional} from './di';\n\n\n/**\n * A function that will be executed when an application is initialized.\n *\n * @publicApi\n */\nexport const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationInitStatus {\n  // TODO(issue/24571): remove '!'.\n  private resolve !: Function;\n  // TODO(issue/24571): remove '!'.\n  private reject !: Function;\n  private initialized = false;\n  public readonly donePromise: Promise<any>;\n  public readonly done = false;\n\n  constructor(@Inject(APP_INITIALIZER) @Optional() private appInits: (() => any)[]) {\n    this.donePromise = new Promise((res, rej) => {\n      this.resolve = res;\n      this.reject = rej;\n    });\n  }\n\n  /** @internal */\n  runInitializers() {\n    if (this.initialized) {\n      return;\n    }\n\n    const asyncInitPromises: Promise<any>[] = [];\n\n    const complete = () => {\n      (this as{done: boolean}).done = true;\n      this.resolve();\n    };\n\n    if (this.appInits) {\n      for (let i = 0; i < this.appInits.length; i++) {\n        const initResult = this.appInits[i]();\n        if (isPromise(initResult)) {\n          asyncInitPromises.push(initResult);\n        }\n      }\n    }\n\n    Promise.all(asyncInitPromises).then(() => { complete(); }).catch(e => { this.reject(e); });\n\n    if (asyncInitPromises.length === 0) {\n      complete();\n    }\n    this.initialized = true;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './di';\nimport {ComponentRef} from './linker/component_factory';\n\n\n/**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>('AppId');\n\nexport function _appIdRandomProviderFactory() {\n  return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @publicApi\n */\nexport const APP_ID_RANDOM_PROVIDER = {\n  provide: APP_ID,\n  useFactory: _appIdRandomProviderFactory,\n  deps: <any[]>[],\n};\n\nfunction _randomChar(): string {\n  return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n\n/**\n * A function that will be executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');\n\n/**\n * A token that indicates an opaque platform id.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>('Platform ID');\n\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER =\n    new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');\n\n/**\n * A token which indicates the root directory of the application\n * @publicApi\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID = new InjectionToken<string>('LocaleId');\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>('Translations');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n  Error = 0,\n  Warning = 1,\n  Ignore = 2,\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from './di';\n\n@Injectable()\nexport class Console {\n  log(message: string): void {\n    // tslint:disable-next-line:no-console\n    console.log(message);\n  }\n  // Note: for reporting errors use `DOM.logError()` as it is platform specific\n  warn(message: string): void {\n    // tslint:disable-next-line:no-console\n    console.warn(message);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nexport const ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\nexport class ModuleWithComponentFactories<T> {\n  constructor(\n      public ngModuleFactory: NgModuleFactory<T>,\n      public componentFactories: ComponentFactory<any>[]) {}\n}\n\n\nfunction _throwError() {\n  throw new Error(`Runtime compiler is not loaded`);\n}\n\nconst Compiler_compileModuleSync__PRE_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T> =\n    _throwError as any;\nexport const Compiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) =>\n    NgModuleFactory<T> = function<T>(moduleType: Type<T>): NgModuleFactory<T> {\n  return new NgModuleFactoryR3(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n\nconst Compiler_compileModuleAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n    Promise<NgModuleFactory<T>> = _throwError as any;\nexport const Compiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n    Promise<NgModuleFactory<T>> = function<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n  return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__: <T>(moduleType: Type<T>) =>\n    ModuleWithComponentFactories<T> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) =>\n    ModuleWithComponentFactories<T> = function<T>(moduleType: Type<T>):\n        ModuleWithComponentFactories<T> {\n  const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n  const moduleDef = getNgModuleDef(moduleType) !;\n  const componentFactories =\n      maybeUnwrapFn(moduleDef.declarations)\n          .reduce((factories: ComponentFactory<any>[], declaration: Type<any>) => {\n            const componentDef = getComponentDef(declaration);\n            componentDef && factories.push(new ComponentFactoryR3(componentDef));\n            return factories;\n          }, [] as ComponentFactory<any>[]);\n  return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync =\n    Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n    Promise<ModuleWithComponentFactories<T>> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n    Promise<ModuleWithComponentFactories<T>> = function<T>(moduleType: Type<T>):\n        Promise<ModuleWithComponentFactories<T>> {\n  return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync =\n    Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n@Injectable()\nexport class Compiler {\n  /**\n   * Compiles the given NgModule and all of its components. All templates of the components listed\n   * in `entryComponents` have to be inlined.\n   */\n  compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T> = Compiler_compileModuleSync;\n\n  /**\n   * Compiles the given NgModule and all of its components\n   */\n  compileModuleAsync:\n      <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>> = Compiler_compileModuleAsync;\n\n  /**\n   * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n   */\n  compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T> =\n      Compiler_compileModuleAndAllComponentsSync;\n\n  /**\n   * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n   */\n  compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) =>\n      Promise<ModuleWithComponentFactories<T>> = Compiler_compileModuleAndAllComponentsAsync;\n\n  /**\n   * Clears all caches.\n   */\n  clearCache(): void {}\n\n  /**\n   * Clears the cache for the given component/ngModule.\n   */\n  clearCacheFor(type: Type<any>) {}\n\n  /**\n   * Returns the id for a given NgModule, if one is defined and known to the compiler.\n   */\n  getModuleId(moduleType: Type<any>): string|undefined { return undefined; }\n}\n\n/**\n * Options for creating a compiler\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n  useJit?: boolean,\n  defaultEncapsulation?: ViewEncapsulation,\n  providers?: StaticProvider[],\n  missingTranslation?: MissingTranslationStrategy,\n  preserveWhitespaces?: boolean,\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class CompilerFactory {\n  abstract createCompiler(options?: CompilerOptions[]): Compiler;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from '../util/global';\n\n/**\n * A scope function for the Web Tracing Framework (WTF).\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport interface WtfScopeFn { (arg0?: any, arg1?: any): any; }\n\ninterface WTF {\n  trace: Trace;\n}\n\ninterface Trace {\n  events: Events;\n  leaveScope(scope: Scope, returnValue: any): any /** TODO #9100 */;\n  beginTimeRange(rangeType: string, action: string): Range;\n  endTimeRange(range: Range): any /** TODO #9100 */;\n}\n\nexport interface Range {}\n\ninterface Events {\n  createScope(signature: string, flags: any): Scope;\n}\n\nexport interface Scope { (...args: any[] /** TODO #9100 */): any; }\n\nlet trace: Trace;\nlet events: Events;\n\nexport function detectWTF(): boolean {\n  const wtf: WTF = (global as any /** TODO #9100 */)['wtf'];\n  if (wtf) {\n    trace = wtf['trace'];\n    if (trace) {\n      events = trace['events'];\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function createScope(signature: string, flags: any = null): any {\n  return events.createScope(signature, flags);\n}\n\nexport function leave<T>(scope: Scope): void;\nexport function leave<T>(scope: Scope, returnValue?: T): T;\nexport function leave<T>(scope: Scope, returnValue?: any): any {\n  trace.leaveScope(scope, returnValue);\n  return returnValue;\n}\n\nexport function startTimeRange(rangeType: string, action: string): Range {\n  return trace.beginTimeRange(rangeType, action);\n}\n\nexport function endTimeRange(range: Range): void {\n  trace.endTimeRange(range);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WtfScopeFn, createScope, detectWTF, endTimeRange, leave, startTimeRange} from './wtf_impl';\n\nexport {WtfScopeFn} from './wtf_impl';\n\n\n/**\n * True if WTF is enabled.\n */\nexport const wtfEnabled = detectWTF();\n\nfunction noopScope(arg0?: any, arg1?: any): any {\n  return null;\n}\n\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n *     var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n *     someMethod() {\n *        var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n *        // DO SOME WORK HERE\n *        return wtfLeave(s, 123); // Return value 123\n *     }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =\n    wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope;\n\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfLeave: <T>(scope: any, returnValue?: T) => T =\n    wtfEnabled ? leave : (s: any, r?: any) => r;\n\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n *     someMethod() {\n *        var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n *        var future = new Future.delay(5).then((_) {\n *          wtfEndTimeRange(s);\n *        });\n *     }\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfStartTimeRange: (rangeType: string, action: string) => any =\n    wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null;\n\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst promise: Promise<any> = (() => Promise.resolve(0))();\n\ndeclare const Zone: any;\n\nexport function scheduleMicroTask(fn: Function) {\n  if (typeof Zone === 'undefined') {\n    // use promise to schedule microTask instead of use Zone\n    promise.then(() => { fn && fn.apply(null, null); });\n  } else {\n    Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter} from '../event_emitter';\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n *   - docs explaining zones and the use of zones in Angular and change-detection\n *   - link to runOutsideAngular/run (throughout this file!)\n *   -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n *   selector: 'ng-zone-demo',\n *   template: `\n *     <h2>Demo: NgZone</h2>\n *\n *     <p>Progress: {{progress}}%</p>\n *     <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n *     <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n *     <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n *   `,\n * })\n * export class NgZoneDemo {\n *   progress: number = 0;\n *   label: string;\n *\n *   constructor(private _ngZone: NgZone) {}\n *\n *   // Loop inside the Angular zone\n *   // so the UI DOES refresh after each setTimeout cycle\n *   processWithinAngularZone() {\n *     this.label = 'inside';\n *     this.progress = 0;\n *     this._increaseProgress(() => console.log('Inside Done!'));\n *   }\n *\n *   // Loop outside of the Angular zone\n *   // so the UI DOES NOT refresh after each setTimeout cycle\n *   processOutsideOfAngularZone() {\n *     this.label = 'outside';\n *     this.progress = 0;\n *     this._ngZone.runOutsideAngular(() => {\n *       this._increaseProgress(() => {\n *         // reenter the Angular zone and display done\n *         this._ngZone.run(() => { console.log('Outside Done!'); });\n *       });\n *     });\n *   }\n *\n *   _increaseProgress(doneCallback: () => void) {\n *     this.progress += 1;\n *     console.log(`Current progress: ${this.progress}%`);\n *\n *     if (this.progress < 100) {\n *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n *     } else {\n *       doneCallback();\n *     }\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n  readonly hasPendingMicrotasks: boolean = false;\n  readonly hasPendingMacrotasks: boolean = false;\n\n  /**\n   * Whether there are no outstanding microtasks or macrotasks.\n   */\n  readonly isStable: boolean = true;\n\n  /**\n   * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n   */\n  readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n  /**\n   * Notifies when there is no more microtasks enqueued in the current VM Turn.\n   * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n   * For this reason this event can fire multiple times per VM Turn.\n   */\n  readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n  /**\n   * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n   * implies we are about to relinquish VM turn.\n   * This event gets called just once.\n   */\n  readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n  /**\n   * Notifies that an error has been delivered.\n   */\n  readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n  constructor({enableLongStackTrace = false}) {\n    if (typeof Zone == 'undefined') {\n      throw new Error(`In this configuration Angular requires Zone.js`);\n    }\n\n    Zone.assertZonePatched();\n    const self = this as any as NgZonePrivate;\n    self._nesting = 0;\n\n    self._outer = self._inner = Zone.current;\n\n    if ((Zone as any)['wtfZoneSpec']) {\n      self._inner = self._inner.fork((Zone as any)['wtfZoneSpec']);\n    }\n\n    if ((Zone as any)['TaskTrackingZoneSpec']) {\n      self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));\n    }\n\n    if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n      self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n    }\n\n    forkInnerZoneWithAngularBehavior(self);\n  }\n\n  static isInAngularZone(): boolean { return Zone.current.get('isAngularZone') === true; }\n\n  static assertInAngularZone(): void {\n    if (!NgZone.isInAngularZone()) {\n      throw new Error('Expected to be in Angular Zone, but it is not!');\n    }\n  }\n\n  static assertNotInAngularZone(): void {\n    if (NgZone.isInAngularZone()) {\n      throw new Error('Expected to not be in Angular Zone, but it is!');\n    }\n  }\n\n  /**\n   * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n   * the function.\n   *\n   * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n   * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * within the Angular zone.\n   *\n   * If a synchronous error happens it will be rethrown and not reported via `onError`.\n   */\n  run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n    return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs) as T;\n  }\n\n  /**\n   * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n   * returned by the function.\n   *\n   * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n   * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * within the Angular zone.\n   *\n   * If a synchronous error happens it will be rethrown and not reported via `onError`.\n   */\n  runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n    const zone = (this as any as NgZonePrivate)._inner;\n    const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n    try {\n      return zone.runTask(task, applyThis, applyArgs) as T;\n    } finally {\n      zone.cancelTask(task);\n    }\n  }\n\n  /**\n   * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n   * rethrown.\n   */\n  runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n    return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs) as T;\n  }\n\n  /**\n   * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n   * the function.\n   *\n   * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n   * work that\n   * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n   *\n   * Any future tasks or microtasks scheduled from within this function will continue executing from\n   * outside of the Angular zone.\n   *\n   * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n   */\n  runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n    return (this as any as NgZonePrivate)._outer.run(fn) as T;\n  }\n}\n\nfunction noop() {}\nconst EMPTY_PAYLOAD = {};\n\n\ninterface NgZonePrivate extends NgZone {\n  _outer: Zone;\n  _inner: Zone;\n  _nesting: number;\n\n  hasPendingMicrotasks: boolean;\n  hasPendingMacrotasks: boolean;\n  isStable: boolean;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n  if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n    try {\n      zone._nesting++;\n      zone.onMicrotaskEmpty.emit(null);\n    } finally {\n      zone._nesting--;\n      if (!zone.hasPendingMicrotasks) {\n        try {\n          zone.runOutsideAngular(() => zone.onStable.emit(null));\n        } finally {\n          zone.isStable = true;\n        }\n      }\n    }\n  }\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n  zone._inner = zone._inner.fork({\n    name: 'angular',\n    properties: <any>{'isAngularZone': true},\n    onInvokeTask: (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task, applyThis: any,\n                   applyArgs: any): any => {\n      try {\n        onEnter(zone);\n        return delegate.invokeTask(target, task, applyThis, applyArgs);\n      } finally {\n        onLeave(zone);\n      }\n    },\n\n\n    onInvoke: (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function,\n               applyThis: any, applyArgs?: any[], source?: string): any => {\n      try {\n        onEnter(zone);\n        return delegate.invoke(target, callback, applyThis, applyArgs, source);\n      } finally {\n        onLeave(zone);\n      }\n    },\n\n    onHasTask:\n        (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n          delegate.hasTask(target, hasTaskState);\n          if (current === target) {\n            // We are only interested in hasTask events which originate from our zone\n            // (A child hasTask event is not interesting to us)\n            if (hasTaskState.change == 'microTask') {\n              zone.hasPendingMicrotasks = hasTaskState.microTask;\n              checkStable(zone);\n            } else if (hasTaskState.change == 'macroTask') {\n              zone.hasPendingMacrotasks = hasTaskState.macroTask;\n            }\n          }\n        },\n\n    onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n      delegate.handleError(target, error);\n      zone.runOutsideAngular(() => zone.onError.emit(error));\n      return false;\n    }\n  });\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n  zone._nesting++;\n  if (zone.isStable) {\n    zone.isStable = false;\n    zone.onUnstable.emit(null);\n  }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n  zone._nesting--;\n  checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n  readonly hasPendingMicrotasks: boolean = false;\n  readonly hasPendingMacrotasks: boolean = false;\n  readonly isStable: boolean = true;\n  readonly onUnstable: EventEmitter<any> = new EventEmitter();\n  readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter();\n  readonly onStable: EventEmitter<any> = new EventEmitter();\n  readonly onError: EventEmitter<any> = new EventEmitter();\n\n  run(fn: () => any): any { return fn(); }\n\n  runGuarded(fn: () => any): any { return fn(); }\n\n  runOutsideAngular(fn: () => any): any { return fn(); }\n\n  runTask<T>(fn: () => any): any { return fn(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '../di';\nimport {scheduleMicroTask} from '../util/microtask';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n  isStable(): boolean;\n  whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n  findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n  source: string;\n  creationLocation: Error;\n  runCount?: number;\n  data?: TaskData;\n}\n\nexport interface TaskData {\n  target?: XMLHttpRequest;\n  delay?: number;\n  isPeriodic?: boolean;\n}\n\n// Angular internal, not intended for public API.\nexport type DoneCallback = (didWork: boolean, tasks?: PendingMacrotask[]) => void;\nexport type UpdateCallback = (tasks: PendingMacrotask[]) => boolean;\n\ninterface WaitCallback {\n  // Needs to be 'any' - setTimeout returns a number according to ES6, but\n  // on NodeJS it returns a Timer.\n  timeoutId: any;\n  doneCb: DoneCallback;\n  updateCb?: UpdateCallback;\n}\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n  private _pendingCount: number = 0;\n  private _isZoneStable: boolean = true;\n  /**\n   * Whether any work was done since the last 'whenStable' callback. This is\n   * useful to detect if this could have potentially destabilized another\n   * component while it is stabilizing.\n   * @internal\n   */\n  private _didWork: boolean = false;\n  private _callbacks: WaitCallback[] = [];\n\n  private taskTrackingZone: {macroTasks: Task[]}|null = null;\n\n  constructor(private _ngZone: NgZone) {\n    this._watchAngularEvents();\n    _ngZone.run(() => {\n      this.taskTrackingZone =\n          typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n    });\n  }\n\n  private _watchAngularEvents(): void {\n    this._ngZone.onUnstable.subscribe({\n      next: () => {\n        this._didWork = true;\n        this._isZoneStable = false;\n      }\n    });\n\n    this._ngZone.runOutsideAngular(() => {\n      this._ngZone.onStable.subscribe({\n        next: () => {\n          NgZone.assertNotInAngularZone();\n          scheduleMicroTask(() => {\n            this._isZoneStable = true;\n            this._runCallbacksIfReady();\n          });\n        }\n      });\n    });\n  }\n\n  /**\n   * Increases the number of pending request\n   * @deprecated pending requests are now tracked with zones.\n   */\n  increasePendingRequestCount(): number {\n    this._pendingCount += 1;\n    this._didWork = true;\n    return this._pendingCount;\n  }\n\n  /**\n   * Decreases the number of pending request\n   * @deprecated pending requests are now tracked with zones\n   */\n  decreasePendingRequestCount(): number {\n    this._pendingCount -= 1;\n    if (this._pendingCount < 0) {\n      throw new Error('pending async requests below zero');\n    }\n    this._runCallbacksIfReady();\n    return this._pendingCount;\n  }\n\n  /**\n   * Whether an associated application is stable\n   */\n  isStable(): boolean {\n    return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n  }\n\n  private _runCallbacksIfReady(): void {\n    if (this.isStable()) {\n      // Schedules the call backs in a new frame so that it is always async.\n      scheduleMicroTask(() => {\n        while (this._callbacks.length !== 0) {\n          let cb = this._callbacks.pop() !;\n          clearTimeout(cb.timeoutId);\n          cb.doneCb(this._didWork);\n        }\n        this._didWork = false;\n      });\n    } else {\n      // Still not stable, send updates.\n      let pending = this.getPendingTasks();\n      this._callbacks = this._callbacks.filter((cb) => {\n        if (cb.updateCb && cb.updateCb(pending)) {\n          clearTimeout(cb.timeoutId);\n          return false;\n        }\n\n        return true;\n      });\n\n      this._didWork = true;\n    }\n  }\n\n  private getPendingTasks(): PendingMacrotask[] {\n    if (!this.taskTrackingZone) {\n      return [];\n    }\n\n    // Copy the tasks data so that we don't leak tasks.\n    return this.taskTrackingZone.macroTasks.map((t: Task) => {\n      return {\n        source: t.source,\n        // From TaskTrackingZone:\n        // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n        creationLocation: (t as any).creationLocation as Error,\n        data: t.data\n      };\n    });\n  }\n\n  private addCallback(cb: DoneCallback, timeout?: number, updateCb?: UpdateCallback) {\n    let timeoutId: any = -1;\n    if (timeout && timeout > 0) {\n      timeoutId = setTimeout(() => {\n        this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n        cb(this._didWork, this.getPendingTasks());\n      }, timeout);\n    }\n    this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n  }\n\n  /**\n   * Wait for the application to be stable with a timeout. If the timeout is reached before that\n   * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n   *\n   * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n   *    whichever comes first.\n   * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n   *    specified, whenStable() will wait forever.\n   * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n   *    pending macrotasks changes. If this callback returns true doneCb will not be invoked\n   *    and no further updates will be issued.\n   */\n  whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n    if (updateCb && !this.taskTrackingZone) {\n      throw new Error(\n          'Task tracking zone is required when passing an update callback to ' +\n          'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n    }\n    // These arguments are 'Function' above to keep the public API simple.\n    this.addCallback(doneCb as DoneCallback, timeout, updateCb as UpdateCallback);\n    this._runCallbacksIfReady();\n  }\n\n  /**\n   * Get the number of pending requests\n   * @deprecated pending requests are now tracked with zones\n   */\n  getPendingRequestCount(): number { return this._pendingCount; }\n\n  /**\n   * Find providers by name\n   * @param using The root element to search from\n   * @param provider The name of binding variable\n   * @param exactMatch Whether using exactMatch\n   */\n  findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n    // TODO(juliemr): implement.\n    return [];\n  }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable()\nexport class TestabilityRegistry {\n  /** @internal */\n  _applications = new Map<any, Testability>();\n\n  constructor() { _testabilityGetter.addToWindow(this); }\n\n  /**\n   * Registers an application with a testability hook so that it can be tracked\n   * @param token token of application, root element\n   * @param testability Testability hook\n   */\n  registerApplication(token: any, testability: Testability) {\n    this._applications.set(token, testability);\n  }\n\n  /**\n   * Unregisters an application.\n   * @param token token of application, root element\n   */\n  unregisterApplication(token: any) { this._applications.delete(token); }\n\n  /**\n   * Unregisters all applications\n   */\n  unregisterAllApplications() { this._applications.clear(); }\n\n  /**\n   * Get a testability hook associated with the application\n   * @param elem root element\n   */\n  getTestability(elem: any): Testability|null { return this._applications.get(elem) || null; }\n\n  /**\n   * Get all registered testabilities\n   */\n  getAllTestabilities(): Testability[] { return Array.from(this._applications.values()); }\n\n  /**\n   * Get all registered applications(root elements)\n   */\n  getAllRootElements(): any[] { return Array.from(this._applications.keys()); }\n\n  /**\n   * Find testability of a node in the Tree\n   * @param elem node\n   * @param findInAncestors whether finding testability in ancestors if testability was not found in\n   * current node\n   */\n  findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability|null {\n    return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n  }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n  addToWindow(registry: TestabilityRegistry): void;\n  findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n      Testability|null;\n}\n\nclass _NoopGetTestability implements GetTestability {\n  addToWindow(registry: TestabilityRegistry): void {}\n  findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n      Testability|null {\n    return null;\n  }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n  _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability = new _NoopGetTestability();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, Observer, Subscription, merge} from 'rxjs';\nimport {share} from 'rxjs/operators';\nimport {ApplicationInitStatus} from './application_init';\nimport {APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER} from './application_tokens';\nimport {getCompilerFacade} from './compiler/compiler_facade';\nimport {Console} from './console';\nimport {Injectable, InjectionToken, Injector, StaticProvider} from './di';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID} from './i18n/localization';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {Type} from './interface/type';\nimport {ivyEnabled} from './ivy_switch';\nimport {COMPILER_OPTIONS, CompilerFactory, CompilerOptions} from './linker/compiler';\nimport {ComponentFactory, ComponentRef} from './linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from './linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nimport {InternalViewRef, ViewRef} from './linker/view_ref';\nimport {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';\nimport {WtfScopeFn, wtfCreateScope, wtfLeave} from './profile/profile';\nimport {assertNgModuleType} from './render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n';\nimport {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';\nimport {Testability, TestabilityRegistry} from './testability/testability';\nimport {isDevMode} from './util/is_dev_mode';\nimport {isPromise} from './util/lang';\nimport {scheduleMicroTask} from './util/microtask';\nimport {stringify} from './util/stringify';\nimport {NgZone, NoopNgZone} from './zone/ng_zone';\n\nlet _platform: PlatformRef;\n\nlet compileNgModuleFactory:\n    <M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>) =>\n        Promise<NgModuleFactory<M>> = compileNgModuleFactory__PRE_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__<M>(\n    injector: Injector, options: CompilerOptions,\n    moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n  const compilerFactory: CompilerFactory = injector.get(CompilerFactory);\n  const compiler = compilerFactory.createCompiler([options]);\n  return compiler.compileModuleAsync(moduleType);\n}\n\nexport function compileNgModuleFactory__POST_R3__<M>(\n    injector: Injector, options: CompilerOptions,\n    moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n  ngDevMode && assertNgModuleType(moduleType);\n  const moduleFactory = new R3NgModuleFactory(moduleType);\n\n  if (isComponentResourceResolutionQueueEmpty()) {\n    return Promise.resolve(moduleFactory);\n  }\n\n  const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n  const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers !));\n\n  // In case there are no compiler providers, we just return the module factory as\n  // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n  // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n  // unnecessarily require the JIT compiler.\n  if (compilerProviders.length === 0) {\n    return Promise.resolve(moduleFactory);\n  }\n\n  const compiler = getCompilerFacade();\n  const compilerInjector = Injector.create({providers: compilerProviders});\n  const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n  // The resource loader can also return a string while the \"resolveComponentResources\"\n  // always expects a promise. Therefore we need to wrap the returned value in a promise.\n  return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n      .then(() => moduleFactory);\n}\n\nlet isBoundToModule: <C>(cf: ComponentFactory<C>) => boolean = isBoundToModule__PRE_R3__;\n\nexport function isBoundToModule__PRE_R3__<C>(cf: ComponentFactory<C>): boolean {\n  return cf instanceof ComponentFactoryBoundToModule;\n}\n\nexport function isBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean {\n  return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultipleToken');\n\n\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nexport class NgProbeToken {\n  constructor(public name: string, public token: any) {}\n}\n\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n  if (_platform && !_platform.destroyed &&\n      !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n    throw new Error(\n        'There can be only one platform. Destroy the previous one to create a new one.');\n  }\n  _platform = injector.get(PlatformRef);\n  const inits = injector.get(PLATFORM_INITIALIZER, null);\n  if (inits) inits.forEach((init: any) => init());\n  return _platform;\n}\n\n/**\n * Creates a factory for a platform\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n    parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,\n    name: string, providers: StaticProvider[] = []): (extraProviders?: StaticProvider[]) =>\n    PlatformRef {\n  const desc = `Platform: ${name}`;\n  const marker = new InjectionToken(desc);\n  return (extraProviders: StaticProvider[] = []) => {\n    let platform = getPlatform();\n    if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n      if (parentPlatformFactory) {\n        parentPlatformFactory(\n            providers.concat(extraProviders).concat({provide: marker, useValue: true}));\n      } else {\n        const injectedProviders: StaticProvider[] =\n            providers.concat(extraProviders).concat({provide: marker, useValue: true});\n        createPlatform(Injector.create({providers: injectedProviders, name: desc}));\n      }\n    }\n    return assertPlatform(marker);\n  };\n}\n\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n  const platform = getPlatform();\n\n  if (!platform) {\n    throw new Error('No platform exists!');\n  }\n\n  if (!platform.injector.get(requiredToken, null)) {\n    throw new Error(\n        'A platform with a different configuration has been created. Please destroy it first.');\n  }\n\n  return platform;\n}\n\n/**\n * Destroy the existing platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n  if (_platform && !_platform.destroyed) {\n    _platform.destroy();\n  }\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef|null {\n  return _platform && !_platform.destroyed ? _platform : null;\n}\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n  /**\n   * Optionally specify which `NgZone` should be used.\n   *\n   * - Provide your own `NgZone` instance.\n   * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n   * - `noop` - Use `NoopNgZone` which does nothing.\n   */\n  ngZone?: NgZone|'zone.js'|'noop';\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformRef {\n  private _modules: NgModuleRef<any>[] = [];\n  private _destroyListeners: Function[] = [];\n  private _destroyed: boolean = false;\n\n  /** @internal */\n  constructor(private _injector: Injector) {}\n\n  /**\n   * Creates an instance of an `@NgModule` for the given platform\n   * for offline compilation.\n   *\n   * @usageNotes\n   * ### Simple Example\n   *\n   * ```typescript\n   * my_module.ts:\n   *\n   * @NgModule({\n   *   imports: [BrowserModule]\n   * })\n   * class MyModule {}\n   *\n   * main.ts:\n   * import {MyModuleNgFactory} from './my_module.ngfactory';\n   * import {platformBrowser} from '@angular/platform-browser';\n   *\n   * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n   * ```\n   */\n  bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):\n      Promise<NgModuleRef<M>> {\n    // Note: We need to create the NgZone _before_ we instantiate the module,\n    // as instantiating the module creates some providers eagerly.\n    // So we create a mini parent injector that just contains the new NgZone and\n    // pass that as parent to the NgModuleFactory.\n    const ngZoneOption = options ? options.ngZone : undefined;\n    const ngZone = getNgZone(ngZoneOption);\n    const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n    // Attention: Don't use ApplicationRef.run here,\n    // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n    return ngZone.run(() => {\n      const ngZoneInjector = Injector.create(\n          {providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});\n      const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);\n      const exceptionHandler: ErrorHandler = moduleRef.injector.get(ErrorHandler, null);\n      if (!exceptionHandler) {\n        throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n      }\n      // If the `LOCALE_ID` provider is defined at bootstrap we set the value for runtime i18n (ivy)\n      if (ivyEnabled) {\n        const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n        setLocaleId(localeId || DEFAULT_LOCALE_ID);\n      }\n      moduleRef.onDestroy(() => remove(this._modules, moduleRef));\n      ngZone !.runOutsideAngular(\n          () => ngZone !.onError.subscribe(\n              {next: (error: any) => { exceptionHandler.handleError(error); }}));\n      return _callAndReportToErrorHandler(exceptionHandler, ngZone !, () => {\n        const initStatus: ApplicationInitStatus = moduleRef.injector.get(ApplicationInitStatus);\n        initStatus.runInitializers();\n        return initStatus.donePromise.then(() => {\n          this._moduleDoBootstrap(moduleRef);\n          return moduleRef;\n        });\n      });\n    });\n  }\n\n  /**\n   * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n   *\n   * @usageNotes\n   * ### Simple Example\n   *\n   * ```typescript\n   * @NgModule({\n   *   imports: [BrowserModule]\n   * })\n   * class MyModule {}\n   *\n   * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n   * ```\n   *\n   */\n  bootstrapModule<M>(\n      moduleType: Type<M>, compilerOptions: (CompilerOptions&BootstrapOptions)|\n      Array<CompilerOptions&BootstrapOptions> = []): Promise<NgModuleRef<M>> {\n    const options = optionsReducer({}, compilerOptions);\n    return compileNgModuleFactory(this.injector, options, moduleType)\n        .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n  }\n\n  private _moduleDoBootstrap(moduleRef: InternalNgModuleRef<any>): void {\n    const appRef = moduleRef.injector.get(ApplicationRef) as ApplicationRef;\n    if (moduleRef._bootstrapComponents.length > 0) {\n      moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n    } else if (moduleRef.instance.ngDoBootstrap) {\n      moduleRef.instance.ngDoBootstrap(appRef);\n    } else {\n      throw new Error(\n          `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n          `Please define one of these.`);\n    }\n    this._modules.push(moduleRef);\n  }\n\n  /**\n   * Register a listener to be called when the platform is disposed.\n   */\n  onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\n\n  /**\n   * Retrieve the platform {@link Injector}, which is the parent injector for\n   * every Angular application on the page and provides singleton providers.\n   */\n  get injector(): Injector { return this._injector; }\n\n  /**\n   * Destroy the Angular platform and all Angular applications on the page.\n   */\n  destroy() {\n    if (this._destroyed) {\n      throw new Error('The platform has already been destroyed!');\n    }\n    this._modules.slice().forEach(module => module.destroy());\n    this._destroyListeners.forEach(listener => listener());\n    this._destroyed = true;\n  }\n\n  get destroyed() { return this._destroyed; }\n}\n\nfunction getNgZone(ngZoneOption?: NgZone | 'zone.js' | 'noop'): NgZone {\n  let ngZone: NgZone;\n\n  if (ngZoneOption === 'noop') {\n    ngZone = new NoopNgZone();\n  } else {\n    ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n        new NgZone({enableLongStackTrace: isDevMode()});\n  }\n  return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(\n    errorHandler: ErrorHandler, ngZone: NgZone, callback: () => any): any {\n  try {\n    const result = callback();\n    if (isPromise(result)) {\n      return result.catch((e: any) => {\n        ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n        // rethrow as the exception handler might not do it\n        throw e;\n      });\n    }\n\n    return result;\n  } catch (e) {\n    ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n    // rethrow as the exception handler might not do it\n    throw e;\n  }\n}\n\nfunction optionsReducer<T extends Object>(dst: any, objs: T | T[]): T {\n  if (Array.isArray(objs)) {\n    dst = objs.reduce(optionsReducer, dst);\n  } else {\n    dst = {...dst, ...(objs as any)};\n  }\n  return dst;\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *      filter(stable => stable)\n *   ).subscribe(() => console.log('App is stable now');\n *   interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     tap(stable => console.log('App is stable now')),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => {\n *     this.value = counter;\n *     cd.detectChanges();\n *   });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationRef {\n  /** @internal */\n  static _tickScope: WtfScopeFn = wtfCreateScope('ApplicationRef#tick()');\n  private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n  private _views: InternalViewRef[] = [];\n  private _runningTick: boolean = false;\n  private _enforceNoNewChanges: boolean = false;\n  private _stable = true;\n\n  /**\n   * Get a list of component types registered to this application.\n   * This list is populated even before the component is created.\n   */\n  public readonly componentTypes: Type<any>[] = [];\n\n  /**\n   * Get a list of components registered to this application.\n   */\n  public readonly components: ComponentRef<any>[] = [];\n\n  /**\n   * Returns an Observable that indicates when the application is stable or unstable.\n   *\n   * @see  [Usage notes](#is-stable-examples) for examples and caveats when using this API.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly isStable !: Observable<boolean>;\n\n  /** @internal */\n  constructor(\n      private _zone: NgZone, private _console: Console, private _injector: Injector,\n      private _exceptionHandler: ErrorHandler,\n      private _componentFactoryResolver: ComponentFactoryResolver,\n      private _initStatus: ApplicationInitStatus) {\n    this._enforceNoNewChanges = isDevMode();\n\n    this._zone.onMicrotaskEmpty.subscribe(\n        {next: () => { this._zone.run(() => { this.tick(); }); }});\n\n    const isCurrentlyStable = new Observable<boolean>((observer: Observer<boolean>) => {\n      this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n          !this._zone.hasPendingMicrotasks;\n      this._zone.runOutsideAngular(() => {\n        observer.next(this._stable);\n        observer.complete();\n      });\n    });\n\n    const isStable = new Observable<boolean>((observer: Observer<boolean>) => {\n      // Create the subscription to onStable outside the Angular Zone so that\n      // the callback is run outside the Angular Zone.\n      let stableSub: Subscription;\n      this._zone.runOutsideAngular(() => {\n        stableSub = this._zone.onStable.subscribe(() => {\n          NgZone.assertNotInAngularZone();\n\n          // Check whether there are no pending macro/micro tasks in the next tick\n          // to allow for NgZone to update the state.\n          scheduleMicroTask(() => {\n            if (!this._stable && !this._zone.hasPendingMacrotasks &&\n                !this._zone.hasPendingMicrotasks) {\n              this._stable = true;\n              observer.next(true);\n            }\n          });\n        });\n      });\n\n      const unstableSub: Subscription = this._zone.onUnstable.subscribe(() => {\n        NgZone.assertInAngularZone();\n        if (this._stable) {\n          this._stable = false;\n          this._zone.runOutsideAngular(() => { observer.next(false); });\n        }\n      });\n\n      return () => {\n        stableSub.unsubscribe();\n        unstableSub.unsubscribe();\n      };\n    });\n\n    (this as{isStable: Observable<boolean>}).isStable =\n        merge(isCurrentlyStable, isStable.pipe(share()));\n  }\n\n  /**\n   * Bootstrap a new component at the root level of the application.\n   *\n   * @usageNotes\n   * ### Bootstrap process\n   *\n   * When bootstrapping a new root component into an application, Angular mounts the\n   * specified application component onto DOM elements identified by the componentType's\n   * selector and kicks off automatic change detection to finish initializing the component.\n   *\n   * Optionally, a component can be mounted onto a DOM element that does not match the\n   * componentType's selector.\n   *\n   * ### Example\n   * {@example core/ts/platform/platform.ts region='longform'}\n   */\n  bootstrap<C>(componentOrFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?: string|any):\n      ComponentRef<C> {\n    if (!this._initStatus.done) {\n      throw new Error(\n          'Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n    }\n    let componentFactory: ComponentFactory<C>;\n    if (componentOrFactory instanceof ComponentFactory) {\n      componentFactory = componentOrFactory;\n    } else {\n      componentFactory =\n          this._componentFactoryResolver.resolveComponentFactory(componentOrFactory) !;\n    }\n    this.componentTypes.push(componentFactory.componentType);\n\n    // Create a factory associated with the current module if it's not bound to some other\n    const ngModule = isBoundToModule(componentFactory) ? null : this._injector.get(NgModuleRef);\n    const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n    const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n\n    compRef.onDestroy(() => { this._unloadComponent(compRef); });\n    const testability = compRef.injector.get(Testability, null);\n    if (testability) {\n      compRef.injector.get(TestabilityRegistry)\n          .registerApplication(compRef.location.nativeElement, testability);\n    }\n\n    this._loadComponent(compRef);\n    if (isDevMode()) {\n      this._console.log(\n          `Angular is running in the development mode. Call enableProdMode() to enable the production mode.`);\n    }\n    return compRef;\n  }\n\n  /**\n   * Invoke this method to explicitly process change detection and its side-effects.\n   *\n   * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n   * further changes are detected. If additional changes are picked up during this second cycle,\n   * bindings in the app have side-effects that cannot be resolved in a single change detection\n   * pass.\n   * In this case, Angular throws an error, since an Angular application can only have one change\n   * detection pass during which all change detection must complete.\n   */\n  tick(): void {\n    if (this._runningTick) {\n      throw new Error('ApplicationRef.tick is called recursively');\n    }\n\n    const scope = ApplicationRef._tickScope();\n    try {\n      this._runningTick = true;\n      for (let view of this._views) {\n        view.detectChanges();\n      }\n      if (this._enforceNoNewChanges) {\n        for (let view of this._views) {\n          view.checkNoChanges();\n        }\n      }\n    } catch (e) {\n      // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n      this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n    } finally {\n      this._runningTick = false;\n      wtfLeave(scope);\n    }\n  }\n\n  /**\n   * Attaches a view so that it will be dirty checked.\n   * The view will be automatically detached when it is destroyed.\n   * This will throw if the view is already attached to a ViewContainer.\n   */\n  attachView(viewRef: ViewRef): void {\n    const view = (viewRef as InternalViewRef);\n    this._views.push(view);\n    view.attachToAppRef(this);\n  }\n\n  /**\n   * Detaches a view from dirty checking again.\n   */\n  detachView(viewRef: ViewRef): void {\n    const view = (viewRef as InternalViewRef);\n    remove(this._views, view);\n    view.detachFromAppRef();\n  }\n\n  private _loadComponent(componentRef: ComponentRef<any>): void {\n    this.attachView(componentRef.hostView);\n    this.tick();\n    this.components.push(componentRef);\n    // Get the listeners lazily to prevent DI cycles.\n    const listeners =\n        this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n    listeners.forEach((listener) => listener(componentRef));\n  }\n\n  private _unloadComponent(componentRef: ComponentRef<any>): void {\n    this.detachView(componentRef.hostView);\n    remove(this.components, componentRef);\n  }\n\n  /** @internal */\n  ngOnDestroy() {\n    // TODO(alxhub): Dispose of the NgZone.\n    this._views.slice().forEach((view) => view.destroy());\n  }\n\n  /**\n   * Returns the number of attached views.\n   */\n  get viewCount() { return this._views.length; }\n}\n\nfunction remove<T>(list: T[], el: T): void {\n  const index = list.indexOf(el);\n  if (index > -1) {\n    list.splice(index, 1);\n  }\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n  const result: any[] = [];\n  parts.forEach((part) => part && result.push(...part));\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory as R3NgModuleFactory, NgModuleType} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_factory_registration';\n\n\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class NgModuleFactoryLoader {\n  abstract load(path: string): Promise<NgModuleFactory<any>>;\n}\n\nexport function getModuleFactory__PRE_R3__(id: string): NgModuleFactory<any> {\n  const factory = getRegisteredNgModuleType(id) as NgModuleFactory<any>| null;\n  if (!factory) throw noModuleError(id);\n  return factory;\n}\n\nexport function getModuleFactory__POST_R3__(id: string): NgModuleFactory<any> {\n  const type = getRegisteredNgModuleType(id) as NgModuleType | null;\n  if (!type) throw noModuleError(id);\n  return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nexport const getModuleFactory: (id: string) => NgModuleFactory<any> = getModuleFactory__PRE_R3__;\n\nfunction noModuleError(id: string, ): Error {\n  return new Error(`No module with ID ${id} loaded`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Injectable, Optional} from '../di';\nimport {ivyEnabled} from '../ivy_switch';\n\nimport {Compiler} from './compiler';\nimport {NgModuleFactory} from './ng_module_factory';\nimport {NgModuleFactoryLoader} from './ng_module_factory_loader';\n\nconst _SEPARATOR = '#';\n\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\ndeclare var System: any;\n\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class SystemJsNgModuleLoaderConfig {\n  /**\n   * Prefix to add when computing the name of the factory module for a given module name.\n   */\n  // TODO(issue/24571): remove '!'.\n  factoryPathPrefix !: string;\n\n  /**\n   * Suffix to add when computing the name of the factory module for a given module name.\n   */\n  // TODO(issue/24571): remove '!'.\n  factoryPathSuffix !: string;\n}\n\nconst DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {\n  factoryPathPrefix: '',\n  factoryPathSuffix: '.ngfactory',\n};\n\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n@Injectable()\nexport class SystemJsNgModuleLoader implements NgModuleFactoryLoader {\n  private _config: SystemJsNgModuleLoaderConfig;\n\n  constructor(private _compiler: Compiler, @Optional() config?: SystemJsNgModuleLoaderConfig) {\n    this._config = config || DEFAULT_CONFIG;\n  }\n\n  load(path: string): Promise<NgModuleFactory<any>> {\n    const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n    return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n  }\n\n  private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {\n    let [module, exportName] = path.split(_SEPARATOR);\n    if (exportName === undefined) {\n      exportName = 'default';\n    }\n\n    return System.import(module)\n        .then((module: any) => module[exportName])\n        .then((type: any) => checkNotEmpty(type, module, exportName))\n        .then((type: any) => this._compiler.compileModuleAsync(type));\n  }\n\n  private loadFactory(path: string): Promise<NgModuleFactory<any>> {\n    let [module, exportName] = path.split(_SEPARATOR);\n    let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n    if (exportName === undefined) {\n      exportName = 'default';\n      factoryClassSuffix = '';\n    }\n\n    return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n        .then((module: any) => module[exportName + factoryClassSuffix])\n        .then((factory: any) => checkNotEmpty(factory, module, exportName));\n  }\n}\n\nfunction checkNotEmpty(value: any, modulePath: string, exportName: string): any {\n  if (!value) {\n    throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n  }\n  return value;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular [view](guide/glossary#view),\n * specifically the [host view](guide/glossary#view-tree) that is defined by a component.\n * Also serves as the base class\n * that adds destroy methods for [embedded views](guide/glossary#view-tree).\n *\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n  /**\n   * Destroys this view and all of the data structures associated with it.\n   */\n  abstract destroy(): void;\n\n  /**\n   * Reports whether this view has been destroyed.\n   * @returns True after the `destroy()` method has been called, false otherwise.\n   */\n  abstract get destroyed(): boolean;\n\n  /**\n   * A lifecycle hook that provides additional developer-defined cleanup\n   * functionality for views.\n   * @param callback A handler function that cleans up developer-defined data\n   * associated with a view. Called when the `destroy()` method is invoked.\n   */\n  abstract onDestroy(callback: Function): any /** TODO #9100 */;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <li *ngFor=\"let  item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n *   <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n *   <ng-template view-container-ref></ng-template>\n *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n  /**\n   * The context for this view, inherited from the anchor element.\n   */\n  abstract get context(): C;\n\n  /**\n   * The root nodes for this embedded view.\n   */\n  abstract get rootNodes(): any[];\n}\n\nexport interface InternalViewRef extends ViewRef {\n  detachFromAppRef(): void;\n  attachToAppRef(appRef: ApplicationRef): void;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di';\nimport {getViewComponent} from '../render3/global_utils_api';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {isComponent, isLContainer} from '../render3/interfaces/type_checks';\nimport {LView, PARENT, TData, TVIEW, T_HOST} from '../render3/interfaces/view';\nimport {TStylingContext} from '../render3/styling_next/interfaces';\nimport {stylingMapToStringMap} from '../render3/styling_next/map_based_bindings';\nimport {NodeStylingDebug} from '../render3/styling_next/styling_debug';\nimport {isStylingContext} from '../render3/styling_next/util';\nimport {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, isBrowserEvents, loadLContext, loadLContextFromNode} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER, isPropMetadataString, renderStringify} from '../render3/util/misc_utils';\nimport {findComponentView} from '../render3/util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNodeOrNull} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\nimport {DebugContext} from '../view/index';\n\n\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n  constructor(public name: string, public callback: Function) {}\n}\n\n/**\n * @publicApi\n */\nexport interface DebugNode {\n  readonly listeners: DebugEventListener[];\n  readonly parent: DebugElement|null;\n  readonly nativeNode: any;\n  readonly injector: Injector;\n  readonly componentInstance: any;\n  readonly context: any;\n  readonly references: {[key: string]: any};\n  readonly providerTokens: any[];\n}\nexport class DebugNode__PRE_R3__ {\n  readonly listeners: DebugEventListener[] = [];\n  readonly parent: DebugElement|null = null;\n  readonly nativeNode: any;\n  private readonly _debugContext: DebugContext;\n\n  constructor(nativeNode: any, parent: DebugNode|null, _debugContext: DebugContext) {\n    this._debugContext = _debugContext;\n    this.nativeNode = nativeNode;\n    if (parent && parent instanceof DebugElement__PRE_R3__) {\n      parent.addChild(this);\n    }\n  }\n\n  get injector(): Injector { return this._debugContext.injector; }\n\n  get componentInstance(): any { return this._debugContext.component; }\n\n  get context(): any { return this._debugContext.context; }\n\n  get references(): {[key: string]: any} { return this._debugContext.references; }\n\n  get providerTokens(): any[] { return this._debugContext.providerTokens; }\n}\n\n/**\n * @publicApi\n */\nexport interface DebugElement extends DebugNode {\n  readonly name: string;\n  readonly properties: {[key: string]: any};\n  readonly attributes: {[key: string]: string | null};\n  readonly classes: {[key: string]: boolean};\n  readonly styles: {[key: string]: string | null};\n  readonly childNodes: DebugNode[];\n  readonly nativeElement: any;\n  readonly children: DebugElement[];\n\n  query(predicate: Predicate<DebugElement>): DebugElement;\n  queryAll(predicate: Predicate<DebugElement>): DebugElement[];\n  queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];\n  triggerEventHandler(eventName: string, eventObj: any): void;\n}\nexport class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ implements DebugElement {\n  readonly name !: string;\n  readonly properties: {[key: string]: any} = {};\n  readonly attributes: {[key: string]: string | null} = {};\n  readonly classes: {[key: string]: boolean} = {};\n  readonly styles: {[key: string]: string | null} = {};\n  readonly childNodes: DebugNode[] = [];\n  readonly nativeElement: any;\n\n  constructor(nativeNode: any, parent: any, _debugContext: DebugContext) {\n    super(nativeNode, parent, _debugContext);\n    this.nativeElement = nativeNode;\n  }\n\n  addChild(child: DebugNode) {\n    if (child) {\n      this.childNodes.push(child);\n      (child as{parent: DebugNode}).parent = this;\n    }\n  }\n\n  removeChild(child: DebugNode) {\n    const childIndex = this.childNodes.indexOf(child);\n    if (childIndex !== -1) {\n      (child as{parent: DebugNode | null}).parent = null;\n      this.childNodes.splice(childIndex, 1);\n    }\n  }\n\n  insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {\n    const siblingIndex = this.childNodes.indexOf(child);\n    if (siblingIndex !== -1) {\n      this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n      newChildren.forEach(c => {\n        if (c.parent) {\n          (c.parent as DebugElement__PRE_R3__).removeChild(c);\n        }\n        (child as{parent: DebugNode}).parent = this;\n      });\n    }\n  }\n\n  insertBefore(refChild: DebugNode, newChild: DebugNode): void {\n    const refIndex = this.childNodes.indexOf(refChild);\n    if (refIndex === -1) {\n      this.addChild(newChild);\n    } else {\n      if (newChild.parent) {\n        (newChild.parent as DebugElement__PRE_R3__).removeChild(newChild);\n      }\n      (newChild as{parent: DebugNode}).parent = this;\n      this.childNodes.splice(refIndex, 0, newChild);\n    }\n  }\n\n  query(predicate: Predicate<DebugElement>): DebugElement {\n    const results = this.queryAll(predicate);\n    return results[0] || null;\n  }\n\n  queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n    const matches: DebugElement[] = [];\n    _queryElementChildren(this, predicate, matches);\n    return matches;\n  }\n\n  queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n    const matches: DebugNode[] = [];\n    _queryNodeChildren(this, predicate, matches);\n    return matches;\n  }\n\n  get children(): DebugElement[] {\n    return this\n        .childNodes  //\n        .filter((node) => node instanceof DebugElement__PRE_R3__) as DebugElement[];\n  }\n\n  triggerEventHandler(eventName: string, eventObj: any) {\n    this.listeners.forEach((listener) => {\n      if (listener.name == eventName) {\n        listener.callback(eventObj);\n      }\n    });\n  }\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n  return debugEls.map((el) => el.nativeElement);\n}\n\nfunction _queryElementChildren(\n    element: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[]) {\n  element.childNodes.forEach(node => {\n    if (node instanceof DebugElement__PRE_R3__) {\n      if (predicate(node)) {\n        matches.push(node);\n      }\n      _queryElementChildren(node, predicate, matches);\n    }\n  });\n}\n\nfunction _queryNodeChildren(\n    parentNode: DebugNode, predicate: Predicate<DebugNode>, matches: DebugNode[]) {\n  if (parentNode instanceof DebugElement__PRE_R3__) {\n    parentNode.childNodes.forEach(node => {\n      if (predicate(node)) {\n        matches.push(node);\n      }\n      if (node instanceof DebugElement__PRE_R3__) {\n        _queryNodeChildren(node, predicate, matches);\n      }\n    });\n  }\n}\nclass DebugNode__POST_R3__ implements DebugNode {\n  readonly nativeNode: Node;\n\n  constructor(nativeNode: Node) { this.nativeNode = nativeNode; }\n\n  get parent(): DebugElement|null {\n    const parent = this.nativeNode.parentNode as Element;\n    return parent ? new DebugElement__POST_R3__(parent) : null;\n  }\n\n  get injector(): Injector { return getInjector(this.nativeNode); }\n\n  get componentInstance(): any {\n    const nativeElement = this.nativeNode;\n    return nativeElement &&\n        (getComponent(nativeElement as Element) || getViewComponent(nativeElement));\n  }\n  get context(): any {\n    return getComponent(this.nativeNode as Element) || getContext(this.nativeNode as Element);\n  }\n\n  get listeners(): DebugEventListener[] {\n    return getListeners(this.nativeNode as Element).filter(isBrowserEvents);\n  }\n\n  get references(): {[key: string]: any;} { return getLocalRefs(this.nativeNode); }\n\n  get providerTokens(): any[] { return getInjectionTokens(this.nativeNode as Element); }\n}\n\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {\n  constructor(nativeNode: Element) {\n    ngDevMode && assertDomNode(nativeNode);\n    super(nativeNode);\n  }\n\n  get nativeElement(): Element|null {\n    return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode as Element : null;\n  }\n\n  get name(): string { return this.nativeElement !.nodeName; }\n\n  /**\n   *  Gets a map of property names to property values for an element.\n   *\n   *  This map includes:\n   *  - Regular property bindings (e.g. `[id]=\"id\"`)\n   *  - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n   *  - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n   *\n   *  It does not include:\n   *  - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n   *  - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n   */\n  get properties(): {[key: string]: any;} {\n    const context = loadLContext(this.nativeNode) !;\n    const lView = context.lView;\n    const tData = lView[TVIEW].data;\n    const tNode = tData[context.nodeIndex] as TNode;\n\n    const properties = collectPropertyBindings(tNode, lView, tData);\n    const hostProperties = collectHostPropertyBindings(tNode, lView, tData);\n    const className = collectClassNames(this);\n    const output = {...properties, ...hostProperties};\n\n    if (className) {\n      output['className'] = output['className'] ? output['className'] + ` ${className}` : className;\n    }\n\n    return output;\n  }\n\n  get attributes(): {[key: string]: string | null;} {\n    const attributes: {[key: string]: string | null;} = {};\n    const element = this.nativeElement;\n\n    if (!element) {\n      return attributes;\n    }\n\n    const context = loadLContext(element);\n    const lView = context.lView;\n    const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n    const lowercaseTNodeAttrs: string[] = [];\n\n    // For debug nodes we take the element's attribute directly from the DOM since it allows us\n    // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n    // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n    // however since we have the attributes already on the TNode, we can preserve the case by going\n    // through them once, adding them to the `attributes` map and putting their lower-cased name\n    // into an array. Afterwards when we're going through the native DOM attributes, we can check\n    // whether we haven't run into an attribute already through the TNode.\n    if (tNodeAttrs) {\n      let i = 0;\n      while (i < tNodeAttrs.length) {\n        const attrName = tNodeAttrs[i];\n\n        // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n        // else will be handled below when we read the final attributes off the DOM.\n        if (typeof attrName !== 'string') break;\n\n        const attrValue = tNodeAttrs[i + 1];\n        attributes[attrName] = attrValue as string;\n        lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n        i += 2;\n      }\n    }\n\n    const eAttrs = element.attributes;\n    for (let i = 0; i < eAttrs.length; i++) {\n      const attr = eAttrs[i];\n      // Make sure that we don't assign the same attribute both in its\n      // case-sensitive form and the lower-cased one from the browser.\n      if (lowercaseTNodeAttrs.indexOf(attr.name) === -1) {\n        attributes[attr.name] = attr.value;\n      }\n    }\n\n    return attributes;\n  }\n\n  get styles(): {[key: string]: string | null;} {\n    return _getStylingDebugInfo(this.nativeElement, false);\n  }\n\n  get classes(): {[key: string]: boolean;} {\n    return _getStylingDebugInfo(this.nativeElement, true);\n  }\n\n  get childNodes(): DebugNode[] {\n    const childNodes = this.nativeNode.childNodes;\n    const children: DebugNode[] = [];\n    for (let i = 0; i < childNodes.length; i++) {\n      const element = childNodes[i];\n      children.push(getDebugNode__POST_R3__(element));\n    }\n    return children;\n  }\n\n  get children(): DebugElement[] {\n    const nativeElement = this.nativeElement;\n    if (!nativeElement) return [];\n    const childNodes = nativeElement.children;\n    const children: DebugElement[] = [];\n    for (let i = 0; i < childNodes.length; i++) {\n      const element = childNodes[i];\n      children.push(getDebugNode__POST_R3__(element));\n    }\n    return children;\n  }\n\n  query(predicate: Predicate<DebugElement>): DebugElement {\n    const results = this.queryAll(predicate);\n    return results[0] || null;\n  }\n\n  queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n    const matches: DebugElement[] = [];\n    _queryAllR3(this, predicate, matches, true);\n    return matches;\n  }\n\n  queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n    const matches: DebugNode[] = [];\n    _queryAllR3(this, predicate, matches, false);\n    return matches;\n  }\n\n  triggerEventHandler(eventName: string, eventObj: any): void {\n    this.listeners.forEach((listener) => {\n      if (listener.name === eventName) {\n        listener.callback(eventObj);\n      }\n    });\n  }\n}\n\nfunction _getStylingDebugInfo(element: any, isClassBased: boolean) {\n  if (element) {\n    const context = loadLContextFromNode(element);\n    const lView = context.lView;\n    const tData = lView[TVIEW].data;\n    const tNode = tData[context.nodeIndex] as TNode;\n    if (isClassBased) {\n      return isStylingContext(tNode.classes) ?\n          new NodeStylingDebug(tNode.classes as TStylingContext, lView, true).values :\n          stylingMapToStringMap(tNode.classes);\n    } else {\n      return isStylingContext(tNode.styles) ?\n          new NodeStylingDebug(tNode.styles as TStylingContext, lView, false).values :\n          stylingMapToStringMap(tNode.styles);\n    }\n  }\n  return {};\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAllR3(\n    parentElement: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[],\n    elementsOnly: true): void;\nfunction _queryAllR3(\n    parentElement: DebugElement, predicate: Predicate<DebugNode>, matches: DebugNode[],\n    elementsOnly: false): void;\nfunction _queryAllR3(\n    parentElement: DebugElement, predicate: Predicate<DebugElement>| Predicate<DebugNode>,\n    matches: DebugElement[] | DebugNode[], elementsOnly: boolean) {\n  const context = loadLContext(parentElement.nativeNode) !;\n  const parentTNode = context.lView[TVIEW].data[context.nodeIndex] as TNode;\n  _queryNodeChildrenR3(\n      parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenR3(\n    tNode: TNode, lView: LView, predicate: Predicate<DebugElement>| Predicate<DebugNode>,\n    matches: DebugElement[] | DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n  const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n  // For each type of TNode, specific logic is executed.\n  if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n    // Case 1: the TNode is an element\n    // The native node has to be checked.\n    _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n    if (isComponent(tNode)) {\n      // If the element is the host of a component, then all nodes in its view have to be processed.\n      // Note: the component's content (tNode.child) will be processed from the insertion points.\n      const componentView = getComponentViewByIndex(tNode.index, lView);\n      if (componentView && componentView[TVIEW].firstChild) {\n        _queryNodeChildrenR3(\n            componentView[TVIEW].firstChild !, componentView, predicate, matches, elementsOnly,\n            rootNativeNode);\n      }\n    } else {\n      if (tNode.child) {\n        // Otherwise, its children have to be processed.\n        _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n      }\n\n      // We also have to query the DOM directly in order to catch elements inserted through\n      // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n      // times. ViewEngine could do it more efficiently, because all the insertions go through\n      // Renderer2, however that's not the case in Ivy. This approach is being used because:\n      // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n      //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n      // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n      // 3. It allows us to capture nodes that were inserted directly via the DOM.\n      nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n    }\n    // In all cases, if a dynamic container exists for this node, each view inside it has to be\n    // processed.\n    const nodeOrContainer = lView[tNode.index];\n    if (isLContainer(nodeOrContainer)) {\n      _queryNodeChildrenInContainerR3(\n          nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  } else if (tNode.type === TNodeType.Container) {\n    // Case 2: the TNode is a container\n    // The native node has to be checked.\n    const lContainer = lView[tNode.index];\n    _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n    // Each view inside the container has to be processed.\n    _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n  } else if (tNode.type === TNodeType.Projection) {\n    // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n    // The nodes projected at this location all need to be processed.\n    const componentView = findComponentView(lView !);\n    const componentHost = componentView[T_HOST] as TElementNode;\n    const head: TNode|null =\n        (componentHost.projection as(TNode | null)[])[tNode.projection as number];\n\n    if (Array.isArray(head)) {\n      for (let nativeNode of head) {\n        _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n      }\n    } else if (head) {\n      const nextLView = componentView[PARENT] !as LView;\n      const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n      _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  } else if (tNode.child) {\n    // Case 4: the TNode is a view.\n    _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n  }\n\n  // We don't want to go to the next sibling of the root node.\n  if (rootNativeNode !== nativeNode) {\n    // To determine the next node to be processed, we need to use the next or the projectionNext\n    // link, depending on whether the current node has been projected.\n    const nextTNode = (tNode.flags & TNodeFlags.isProjected) ? tNode.projectionNext : tNode.next;\n    if (nextTNode) {\n      _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainerR3(\n    lContainer: LContainer, predicate: Predicate<DebugElement>| Predicate<DebugNode>,\n    matches: DebugElement[] | DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    const childView = lContainer[i];\n    _queryNodeChildrenR3(\n        childView[TVIEW].node !, childView, predicate, matches, elementsOnly, rootNativeNode);\n  }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatchR3(\n    nativeNode: any, predicate: Predicate<DebugElement>| Predicate<DebugNode>,\n    matches: DebugElement[] | DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n  if (rootNativeNode !== nativeNode) {\n    const debugNode = getDebugNode(nativeNode);\n    if (!debugNode) {\n      return;\n    }\n    // Type of the \"predicate and \"matches\" array are set based on the value of\n    // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n    // types with generics, so we manually cast the parameters accordingly.\n    if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n        matches.indexOf(debugNode) === -1) {\n      matches.push(debugNode);\n    } else if (\n        !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n        (matches as DebugNode[]).indexOf(debugNode) === -1) {\n      (matches as DebugNode[]).push(debugNode);\n    }\n  }\n}\n\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(\n    parentNode: any, predicate: Predicate<DebugElement>| Predicate<DebugNode>,\n    matches: DebugElement[] | DebugNode[], elementsOnly: boolean) {\n  const nodes = parentNode.childNodes;\n  const length = nodes.length;\n\n  for (let i = 0; i < length; i++) {\n    const node = nodes[i];\n    const debugNode = getDebugNode(node);\n\n    if (debugNode) {\n      if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n          matches.indexOf(debugNode) === -1) {\n        matches.push(debugNode);\n      } else if (\n          !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n          (matches as DebugNode[]).indexOf(debugNode) === -1) {\n        (matches as DebugNode[]).push(debugNode);\n      }\n\n      _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n    }\n  }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n    tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n  const properties: {[key: string]: string} = {};\n  let bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData);\n\n  while (bindingIndex < tNode.propertyMetadataEndIndex) {\n    let value: any;\n    let propMetadata = tData[bindingIndex] as string;\n    while (!isPropMetadataString(propMetadata)) {\n      // This is the first value for an interpolation. We need to build up\n      // the full interpolation by combining runtime values in LView with\n      // the static interstitial values stored in TData.\n      value = (value || '') + renderStringify(lView[bindingIndex]) + tData[bindingIndex];\n      propMetadata = tData[++bindingIndex] as string;\n    }\n    value = value === undefined ? lView[bindingIndex] : value += lView[bindingIndex];\n    // Property metadata string has 3 parts: property name, prefix, and suffix\n    const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n    const propertyName = metadataParts[0];\n    // Attr bindings don't have property names and should be skipped\n    if (propertyName) {\n      // Wrap value with prefix and suffix (will be '' for normal bindings), if they're defined.\n      // Avoid wrapping for normal bindings so that the value doesn't get cast to a string.\n      properties[propertyName] = (metadataParts[1] && metadataParts[2]) ?\n          metadataParts[1] + value + metadataParts[2] :\n          value;\n    }\n    bindingIndex++;\n  }\n  return properties;\n}\n\n/**\n * Retrieves the first binding index that holds values for this property\n * binding.\n *\n * For normal bindings (e.g. `[id]=\"id\"`), the binding index is the\n * same as the metadata index. For interpolations (e.g. `id=\"{{id}}-{{name}}\"`),\n * there can be multiple binding values, so we might have to loop backwards\n * from the metadata index until we find the first one.\n *\n * @param metadataIndex The index of the first property metadata string for\n * this node.\n * @param tData The data array for the current TView\n * @returns The first binding index for this binding\n */\nfunction getFirstBindingIndex(metadataIndex: number, tData: TData): number {\n  let currentBindingIndex = metadataIndex - 1;\n\n  // If the slot before the metadata holds a string, we know that this\n  // metadata applies to an interpolation with at least 2 bindings, and\n  // we need to search further to access the first binding value.\n  let currentValue = tData[currentBindingIndex];\n\n  // We need to iterate until we hit either a:\n  // - TNode (it is an element slot marking the end of `consts` section), OR a\n  // - metadata string (slot is attribute metadata or a previous node's property metadata)\n  while (typeof currentValue === 'string' && !isPropMetadataString(currentValue)) {\n    currentValue = tData[--currentBindingIndex];\n  }\n  return currentBindingIndex + 1;\n}\n\nfunction collectHostPropertyBindings(\n    tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n  const properties: {[key: string]: string} = {};\n\n  // Host binding values for a node are stored after directives on that node\n  let hostPropIndex = tNode.directiveEnd;\n  let propMetadata = tData[hostPropIndex] as any;\n\n  // When we reach a value in TView.data that is not a string, we know we've\n  // hit the next node's providers and directives and should stop copying data.\n  while (typeof propMetadata === 'string') {\n    const propertyName = propMetadata.split(INTERPOLATION_DELIMITER)[0];\n    properties[propertyName] = lView[hostPropIndex];\n    propMetadata = tData[++hostPropIndex];\n  }\n  return properties;\n}\n\n\nfunction collectClassNames(debugElement: DebugElement__POST_R3__): string {\n  const classes = debugElement.classes;\n  let output = '';\n\n  for (const className of Object.keys(classes)) {\n    if (classes[className]) {\n      output = output ? output + ` ${className}` : className;\n    }\n  }\n\n  return output;\n}\n\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nfunction getDebugNode__PRE_R3__(nativeNode: any): DebugNode|null {\n  return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\nexport function getDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: null): null;\nexport function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null {\n  if (nativeNode instanceof Node) {\n    if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n      (nativeNode as any)[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n          new DebugElement__POST_R3__(nativeNode as Element) :\n          new DebugNode__POST_R3__(nativeNode);\n    }\n    return (nativeNode as any)[NG_DEBUG_PROPERTY];\n  }\n  return null;\n}\n\n/**\n * @publicApi\n */\nexport const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__;\n\nexport function getAllDebugNodes(): DebugNode[] {\n  return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n  _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n  _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport interface Predicate<T> { (value: T): boolean; }\n\n/**\n * @publicApi\n */\nexport const DebugNode: {new (...args: any[]): DebugNode} = DebugNode__PRE_R3__;\n\n/**\n * @publicApi\n */\nexport const DebugElement: {new (...args: any[]): DebugElement} = DebugElement__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformRef, createPlatformFactory} from './application_ref';\nimport {PLATFORM_ID} from './application_tokens';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {TestabilityRegistry} from './testability/testability';\n\nconst _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [\n  // Set a default platform name for platforms that don't set it explicitly.\n  {provide: PLATFORM_ID, useValue: 'unknown'},\n  {provide: PlatformRef, deps: [Injector]},\n  {provide: TestabilityRegistry, deps: []},\n  {provide: Console, deps: []},\n];\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nimport {ApplicationRef} from './application_ref';\nimport {APP_ID_RANDOM_PROVIDER} from './application_tokens';\nimport {IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers} from './change_detection/change_detection';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {Inject, Optional, SkipSelf} from './di/metadata';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID} from './i18n/localization';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {ivyEnabled} from './ivy_switch';\nimport {ComponentFactoryResolver} from './linker';\nimport {Compiler} from './linker/compiler';\nimport {NgModule} from './metadata';\nimport {SCHEDULER} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n';\nimport {NgZone} from './zone';\n\nexport function _iterableDiffersFactory() {\n  return defaultIterableDiffers;\n}\n\nexport function _keyValueDiffersFactory() {\n  return defaultKeyValueDiffers;\n}\n\nexport function _localeFactory(locale?: string): string {\n  if (locale) {\n    if (ivyEnabled) {\n      setLocaleId(locale);\n    }\n    return locale;\n  }\n  // Use `goog.LOCALE` as default value for `LOCALE_ID` token for Closure Compiler.\n  // Note: default `goog.LOCALE` value is `en`, when Angular used `en-US`. In order to preserve\n  // backwards compatibility, we use Angular default value over Closure Compiler's one.\n  if (ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n    if (ivyEnabled) {\n      setLocaleId(goog.LOCALE);\n    }\n    return goog.LOCALE;\n  }\n  return DEFAULT_LOCALE_ID;\n}\n\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nexport const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [\n  {\n    provide: ApplicationRef,\n    useClass: ApplicationRef,\n    deps:\n        [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n  },\n  {provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory},\n  {\n    provide: ApplicationInitStatus,\n    useClass: ApplicationInitStatus,\n    deps: [[new Optional(), APP_INITIALIZER]]\n  },\n  {provide: Compiler, useClass: Compiler, deps: []},\n  APP_ID_RANDOM_PROVIDER,\n  {provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: []},\n  {provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: []},\n  {\n    provide: LOCALE_ID,\n    useFactory: _localeFactory,\n    deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n  },\n];\n\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nexport function zoneSchedulerFactory(ngZone: NgZone): (fn: () => void) => void {\n  let queue: (() => void)[] = [];\n  ngZone.onStable.subscribe(() => {\n    while (queue.length) {\n      queue.pop() !();\n    }\n  });\n  return function(fn: () => void) { queue.push(fn); };\n}\n\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({providers: APPLICATION_MODULE_PROVIDERS})\nexport class ApplicationModule {\n  // Inject ApplicationRef to make it eager...\n  constructor(appRef: ApplicationRef) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Renderer2} from '../render/api';\n\nimport {checkAndUpdateElementDynamic, checkAndUpdateElementInline, createElement, listenToElementOutputs} from './element';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {appendNgContent} from './ng_content';\nimport {callLifecycleHooksChildrenFirst, checkAndUpdateDirectiveDynamic, checkAndUpdateDirectiveInline, createDirectiveInstance, createPipeInstance, createProviderInstance} from './provider';\nimport {checkAndUpdatePureExpressionDynamic, checkAndUpdatePureExpressionInline, createPureExpression} from './pure_expression';\nimport {checkAndUpdateQuery, createQuery} from './query';\nimport {createTemplateData, createViewContainerData} from './refs';\nimport {checkAndUpdateTextDynamic, checkAndUpdateTextInline, createText} from './text';\nimport {ArgumentType, CheckType, ElementData, NodeData, NodeDef, NodeFlags, ProviderData, RootData, Services, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn, asElementData, asQueryList, asTextData, shiftInitState} from './types';\nimport {NOOP, checkBindingNoChanges, isComponentView, markParentViewsForCheckProjectedViews, resolveDefinition, tokenKey} from './util';\nimport {detachProjectedView} from './view_attach';\n\nexport function viewDef(\n    flags: ViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn,\n    updateRenderer?: null | ViewUpdateFn): ViewDefinition {\n  // clone nodes and set auto calculated values\n  let viewBindingCount = 0;\n  let viewDisposableCount = 0;\n  let viewNodeFlags = 0;\n  let viewRootNodeFlags = 0;\n  let viewMatchedQueries = 0;\n  let currentParent: NodeDef|null = null;\n  let currentRenderParent: NodeDef|null = null;\n  let currentElementHasPublicProviders = false;\n  let currentElementHasPrivateProviders = false;\n  let lastRenderRootNode: NodeDef|null = null;\n  for (let i = 0; i < nodes.length; i++) {\n    const node = nodes[i];\n    node.nodeIndex = i;\n    node.parent = currentParent;\n    node.bindingIndex = viewBindingCount;\n    node.outputIndex = viewDisposableCount;\n    node.renderParent = currentRenderParent;\n\n    viewNodeFlags |= node.flags;\n    viewMatchedQueries |= node.matchedQueryIds;\n\n    if (node.element) {\n      const elDef = node.element;\n      elDef.publicProviders =\n          currentParent ? currentParent.element !.publicProviders : Object.create(null);\n      elDef.allProviders = elDef.publicProviders;\n      // Note: We assume that all providers of an element are before any child element!\n      currentElementHasPublicProviders = false;\n      currentElementHasPrivateProviders = false;\n\n      if (node.element.template) {\n        viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n      }\n    }\n    validateNode(currentParent, node, nodes.length);\n\n\n    viewBindingCount += node.bindings.length;\n    viewDisposableCount += node.outputs.length;\n\n    if (!currentRenderParent && (node.flags & NodeFlags.CatRenderNode)) {\n      lastRenderRootNode = node;\n    }\n\n    if (node.flags & NodeFlags.CatProvider) {\n      if (!currentElementHasPublicProviders) {\n        currentElementHasPublicProviders = true;\n        // Use prototypical inheritance to not get O(n^2) complexity...\n        currentParent !.element !.publicProviders =\n            Object.create(currentParent !.element !.publicProviders);\n        currentParent !.element !.allProviders = currentParent !.element !.publicProviders;\n      }\n      const isPrivateService = (node.flags & NodeFlags.PrivateProvider) !== 0;\n      const isComponent = (node.flags & NodeFlags.Component) !== 0;\n      if (!isPrivateService || isComponent) {\n        currentParent !.element !.publicProviders ![tokenKey(node.provider !.token)] = node;\n      } else {\n        if (!currentElementHasPrivateProviders) {\n          currentElementHasPrivateProviders = true;\n          // Use prototypical inheritance to not get O(n^2) complexity...\n          currentParent !.element !.allProviders =\n              Object.create(currentParent !.element !.publicProviders);\n        }\n        currentParent !.element !.allProviders ![tokenKey(node.provider !.token)] = node;\n      }\n      if (isComponent) {\n        currentParent !.element !.componentProvider = node;\n      }\n    }\n\n    if (currentParent) {\n      currentParent.childFlags |= node.flags;\n      currentParent.directChildFlags |= node.flags;\n      currentParent.childMatchedQueries |= node.matchedQueryIds;\n      if (node.element && node.element.template) {\n        currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n      }\n    } else {\n      viewRootNodeFlags |= node.flags;\n    }\n\n    if (node.childCount > 0) {\n      currentParent = node;\n\n      if (!isNgContainer(node)) {\n        currentRenderParent = node;\n      }\n    } else {\n      // When the current node has no children, check if it is the last children of its parent.\n      // When it is, propagate the flags up.\n      // The loop is required because an element could be the last transitive children of several\n      // elements. We loop to either the root or the highest opened element (= with remaining\n      // children)\n      while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n        const newParent: NodeDef|null = currentParent.parent;\n        if (newParent) {\n          newParent.childFlags |= currentParent.childFlags;\n          newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n        }\n        currentParent = newParent;\n        // We also need to update the render parent & account for ng-container\n        if (currentParent && isNgContainer(currentParent)) {\n          currentRenderParent = currentParent.renderParent;\n        } else {\n          currentRenderParent = currentParent;\n        }\n      }\n    }\n  }\n\n  const handleEvent: ViewHandleEventFn = (view, nodeIndex, eventName, event) =>\n      nodes[nodeIndex].element !.handleEvent !(view, eventName, event);\n\n  return {\n    // Will be filled later...\n    factory: null,\n    nodeFlags: viewNodeFlags,\n    rootNodeFlags: viewRootNodeFlags,\n    nodeMatchedQueries: viewMatchedQueries, flags,\n    nodes: nodes,\n    updateDirectives: updateDirectives || NOOP,\n    updateRenderer: updateRenderer || NOOP, handleEvent,\n    bindingCount: viewBindingCount,\n    outputCount: viewDisposableCount, lastRenderRootNode\n  };\n}\n\nfunction isNgContainer(node: NodeDef): boolean {\n  return (node.flags & NodeFlags.TypeElement) !== 0 && node.element !.name === null;\n}\n\nfunction validateNode(parent: NodeDef | null, node: NodeDef, nodeCount: number) {\n  const template = node.element && node.element.template;\n  if (template) {\n    if (!template.lastRenderRootNode) {\n      throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n    }\n    if (template.lastRenderRootNode &&\n        template.lastRenderRootNode.flags & NodeFlags.EmbeddedViews) {\n      throw new Error(\n          `Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`);\n    }\n  }\n  if (node.flags & NodeFlags.CatProvider) {\n    const parentFlags = parent ? parent.flags : 0;\n    if ((parentFlags & NodeFlags.TypeElement) === 0) {\n      throw new Error(\n          `Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`);\n    }\n  }\n  if (node.query) {\n    if (node.flags & NodeFlags.TypeContentQuery &&\n        (!parent || (parent.flags & NodeFlags.TypeDirective) === 0)) {\n      throw new Error(\n          `Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`);\n    }\n    if (node.flags & NodeFlags.TypeViewQuery && parent) {\n      throw new Error(\n          `Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`);\n    }\n  }\n  if (node.childCount) {\n    const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n    if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n      throw new Error(\n          `Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n    }\n  }\n}\n\nexport function createEmbeddedView(\n    parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n  // embedded views are seen as siblings to the anchor, so we need\n  // to get the parent of the anchor and use it as parentIndex.\n  const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n  initView(view, parent.component, context);\n  createViewNodes(view);\n  return view;\n}\n\nexport function createRootView(root: RootData, def: ViewDefinition, context?: any): ViewData {\n  const view = createView(root, root.renderer, null, null, def);\n  initView(view, context, context);\n  createViewNodes(view);\n  return view;\n}\n\nexport function createComponentView(\n    parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n  const rendererType = nodeDef.element !.componentRendererType;\n  let compRenderer: Renderer2;\n  if (!rendererType) {\n    compRenderer = parentView.root.renderer;\n  } else {\n    compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n  }\n  return createView(\n      parentView.root, compRenderer, parentView, nodeDef.element !.componentProvider, viewDef);\n}\n\nfunction createView(\n    root: RootData, renderer: Renderer2, parent: ViewData | null, parentNodeDef: NodeDef | null,\n    def: ViewDefinition): ViewData {\n  const nodes: NodeData[] = new Array(def.nodes.length);\n  const disposables = def.outputCount ? new Array(def.outputCount) : null;\n  const view: ViewData = {\n    def,\n    parent,\n    viewContainerParent: null, parentNodeDef,\n    context: null,\n    component: null, nodes,\n    state: ViewState.CatInit, root, renderer,\n    oldValues: new Array(def.bindingCount), disposables,\n    initIndex: -1\n  };\n  return view;\n}\n\nfunction initView(view: ViewData, component: any, context: any) {\n  view.component = component;\n  view.context = context;\n}\n\nfunction createViewNodes(view: ViewData) {\n  let renderHost: any;\n  if (isComponentView(view)) {\n    const hostDef = view.parentNodeDef;\n    renderHost = asElementData(view.parent !, hostDef !.parent !.nodeIndex).renderElement;\n  }\n  const def = view.def;\n  const nodes = view.nodes;\n  for (let i = 0; i < def.nodes.length; i++) {\n    const nodeDef = def.nodes[i];\n    Services.setCurrentNode(view, i);\n    let nodeData: any;\n    switch (nodeDef.flags & NodeFlags.Types) {\n      case NodeFlags.TypeElement:\n        const el = createElement(view, renderHost, nodeDef) as any;\n        let componentView: ViewData = undefined !;\n        if (nodeDef.flags & NodeFlags.ComponentView) {\n          const compViewDef = resolveDefinition(nodeDef.element !.componentView !);\n          componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n        }\n        listenToElementOutputs(view, componentView, nodeDef, el);\n        nodeData = <ElementData>{\n          renderElement: el,\n          componentView,\n          viewContainer: null,\n          template: nodeDef.element !.template ? createTemplateData(view, nodeDef) : undefined\n        };\n        if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n          nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n        }\n        break;\n      case NodeFlags.TypeText:\n        nodeData = createText(view, renderHost, nodeDef) as any;\n        break;\n      case NodeFlags.TypeClassProvider:\n      case NodeFlags.TypeFactoryProvider:\n      case NodeFlags.TypeUseExistingProvider:\n      case NodeFlags.TypeValueProvider: {\n        nodeData = nodes[i];\n        if (!nodeData && !(nodeDef.flags & NodeFlags.LazyProvider)) {\n          const instance = createProviderInstance(view, nodeDef);\n          nodeData = <ProviderData>{instance};\n        }\n        break;\n      }\n      case NodeFlags.TypePipe: {\n        const instance = createPipeInstance(view, nodeDef);\n        nodeData = <ProviderData>{instance};\n        break;\n      }\n      case NodeFlags.TypeDirective: {\n        nodeData = nodes[i];\n        if (!nodeData) {\n          const instance = createDirectiveInstance(view, nodeDef);\n          nodeData = <ProviderData>{instance};\n        }\n        if (nodeDef.flags & NodeFlags.Component) {\n          const compView = asElementData(view, nodeDef.parent !.nodeIndex).componentView;\n          initView(compView, nodeData.instance, nodeData.instance);\n        }\n        break;\n      }\n      case NodeFlags.TypePureArray:\n      case NodeFlags.TypePureObject:\n      case NodeFlags.TypePurePipe:\n        nodeData = createPureExpression(view, nodeDef) as any;\n        break;\n      case NodeFlags.TypeContentQuery:\n      case NodeFlags.TypeViewQuery:\n        nodeData = createQuery() as any;\n        break;\n      case NodeFlags.TypeNgContent:\n        appendNgContent(view, renderHost, nodeDef);\n        // no runtime data needed for NgContent...\n        nodeData = undefined;\n        break;\n    }\n    nodes[i] = nodeData;\n  }\n  // Create the ViewData.nodes of component views after we created everything else,\n  // so that e.g. ng-content works\n  execComponentViewsAction(view, ViewAction.CreateViewNodes);\n\n  // fill static content and view queries\n  execQueriesAction(\n      view, NodeFlags.TypeContentQuery | NodeFlags.TypeViewQuery, NodeFlags.StaticQuery,\n      CheckType.CheckAndUpdate);\n}\n\nexport function checkNoChangesView(view: ViewData) {\n  markProjectedViewsForCheck(view);\n  Services.updateDirectives(view, CheckType.CheckNoChanges);\n  execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n  Services.updateRenderer(view, CheckType.CheckNoChanges);\n  execComponentViewsAction(view, ViewAction.CheckNoChanges);\n  // Note: We don't check queries for changes as we didn't do this in v2.x.\n  // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n  view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n}\n\nexport function checkAndUpdateView(view: ViewData) {\n  if (view.state & ViewState.BeforeFirstCheck) {\n    view.state &= ~ViewState.BeforeFirstCheck;\n    view.state |= ViewState.FirstCheck;\n  } else {\n    view.state &= ~ViewState.FirstCheck;\n  }\n  shiftInitState(view, ViewState.InitState_BeforeInit, ViewState.InitState_CallingOnInit);\n  markProjectedViewsForCheck(view);\n  Services.updateDirectives(view, CheckType.CheckAndUpdate);\n  execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n  execQueriesAction(\n      view, NodeFlags.TypeContentQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n  let callInit = shiftInitState(\n      view, ViewState.InitState_CallingOnInit, ViewState.InitState_CallingAfterContentInit);\n  callLifecycleHooksChildrenFirst(\n      view, NodeFlags.AfterContentChecked | (callInit ? NodeFlags.AfterContentInit : 0));\n\n  Services.updateRenderer(view, CheckType.CheckAndUpdate);\n\n  execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n  execQueriesAction(\n      view, NodeFlags.TypeViewQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n  callInit = shiftInitState(\n      view, ViewState.InitState_CallingAfterContentInit, ViewState.InitState_CallingAfterViewInit);\n  callLifecycleHooksChildrenFirst(\n      view, NodeFlags.AfterViewChecked | (callInit ? NodeFlags.AfterViewInit : 0));\n\n  if (view.def.flags & ViewFlags.OnPush) {\n    view.state &= ~ViewState.ChecksEnabled;\n  }\n  view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n  shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit);\n}\n\nexport function checkAndUpdateNode(\n    view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n    v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n  if (argStyle === ArgumentType.Inline) {\n    return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  } else {\n    return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n  }\n}\n\nfunction markProjectedViewsForCheck(view: ViewData) {\n  const def = view.def;\n  if (!(def.nodeFlags & NodeFlags.ProjectedTemplate)) {\n    return;\n  }\n  for (let i = 0; i < def.nodes.length; i++) {\n    const nodeDef = def.nodes[i];\n    if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n      const projectedViews = asElementData(view, i).template._projectedViews;\n      if (projectedViews) {\n        for (let i = 0; i < projectedViews.length; i++) {\n          const projectedView = projectedViews[i];\n          projectedView.state |= ViewState.CheckProjectedView;\n          markParentViewsForCheckProjectedViews(projectedView, view);\n        }\n      }\n    } else if ((nodeDef.childFlags & NodeFlags.ProjectedTemplate) === 0) {\n      // a parent with leafs\n      // no child is a component,\n      // then skip the children\n      i += nodeDef.childCount;\n    }\n  }\n}\n\nfunction checkAndUpdateNodeInline(\n    view: ViewData, nodeDef: NodeDef, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any,\n    v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n  switch (nodeDef.flags & NodeFlags.Types) {\n    case NodeFlags.TypeElement:\n      return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    case NodeFlags.TypeText:\n      return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    case NodeFlags.TypeDirective:\n      return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    case NodeFlags.TypePureArray:\n    case NodeFlags.TypePureObject:\n    case NodeFlags.TypePurePipe:\n      return checkAndUpdatePureExpressionInline(\n          view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    default:\n      throw 'unreachable';\n  }\n}\n\nfunction checkAndUpdateNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): boolean {\n  switch (nodeDef.flags & NodeFlags.Types) {\n    case NodeFlags.TypeElement:\n      return checkAndUpdateElementDynamic(view, nodeDef, values);\n    case NodeFlags.TypeText:\n      return checkAndUpdateTextDynamic(view, nodeDef, values);\n    case NodeFlags.TypeDirective:\n      return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n    case NodeFlags.TypePureArray:\n    case NodeFlags.TypePureObject:\n    case NodeFlags.TypePurePipe:\n      return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n    default:\n      throw 'unreachable';\n  }\n}\n\nexport function checkNoChangesNode(\n    view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n    v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n  if (argStyle === ArgumentType.Inline) {\n    checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  } else {\n    checkNoChangesNodeDynamic(view, nodeDef, v0);\n  }\n  // Returning false is ok here as we would have thrown in case of a change.\n  return false;\n}\n\nfunction checkNoChangesNodeInline(\n    view: ViewData, nodeDef: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n    v7: any, v8: any, v9: any): void {\n  const bindLen = nodeDef.bindings.length;\n  if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);\n  if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);\n  if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);\n  if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);\n  if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);\n  if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);\n  if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);\n  if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);\n  if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);\n  if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);\n}\n\nfunction checkNoChangesNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): void {\n  for (let i = 0; i < values.length; i++) {\n    checkBindingNoChanges(view, nodeDef, i, values[i]);\n  }\n}\n\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view: ViewData, nodeDef: NodeDef) {\n  const queryList = asQueryList(view, nodeDef.nodeIndex);\n  if (queryList.dirty) {\n    throw expressionChangedAfterItHasBeenCheckedError(\n        Services.createDebugContext(view, nodeDef.nodeIndex),\n        `Query ${nodeDef.query!.id} not dirty`, `Query ${nodeDef.query!.id} dirty`,\n        (view.state & ViewState.BeforeFirstCheck) !== 0);\n  }\n}\n\nexport function destroyView(view: ViewData) {\n  if (view.state & ViewState.Destroyed) {\n    return;\n  }\n  execEmbeddedViewsAction(view, ViewAction.Destroy);\n  execComponentViewsAction(view, ViewAction.Destroy);\n  callLifecycleHooksChildrenFirst(view, NodeFlags.OnDestroy);\n  if (view.disposables) {\n    for (let i = 0; i < view.disposables.length; i++) {\n      view.disposables[i]();\n    }\n  }\n  detachProjectedView(view);\n  if (view.renderer.destroyNode) {\n    destroyViewNodes(view);\n  }\n  if (isComponentView(view)) {\n    view.renderer.destroy();\n  }\n  view.state |= ViewState.Destroyed;\n}\n\nfunction destroyViewNodes(view: ViewData) {\n  const len = view.def.nodes.length;\n  for (let i = 0; i < len; i++) {\n    const def = view.def.nodes[i];\n    if (def.flags & NodeFlags.TypeElement) {\n      view.renderer.destroyNode !(asElementData(view, i).renderElement);\n    } else if (def.flags & NodeFlags.TypeText) {\n      view.renderer.destroyNode !(asTextData(view, i).renderText);\n    } else if (def.flags & NodeFlags.TypeContentQuery || def.flags & NodeFlags.TypeViewQuery) {\n      asQueryList(view, i).destroy();\n    }\n  }\n}\n\nenum ViewAction {\n  CreateViewNodes,\n  CheckNoChanges,\n  CheckNoChangesProjectedViews,\n  CheckAndUpdate,\n  CheckAndUpdateProjectedViews,\n  Destroy\n}\n\nfunction execComponentViewsAction(view: ViewData, action: ViewAction) {\n  const def = view.def;\n  if (!(def.nodeFlags & NodeFlags.ComponentView)) {\n    return;\n  }\n  for (let i = 0; i < def.nodes.length; i++) {\n    const nodeDef = def.nodes[i];\n    if (nodeDef.flags & NodeFlags.ComponentView) {\n      // a leaf\n      callViewAction(asElementData(view, i).componentView, action);\n    } else if ((nodeDef.childFlags & NodeFlags.ComponentView) === 0) {\n      // a parent with leafs\n      // no child is a component,\n      // then skip the children\n      i += nodeDef.childCount;\n    }\n  }\n}\n\nfunction execEmbeddedViewsAction(view: ViewData, action: ViewAction) {\n  const def = view.def;\n  if (!(def.nodeFlags & NodeFlags.EmbeddedViews)) {\n    return;\n  }\n  for (let i = 0; i < def.nodes.length; i++) {\n    const nodeDef = def.nodes[i];\n    if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n      // a leaf\n      const embeddedViews = asElementData(view, i).viewContainer !._embeddedViews;\n      for (let k = 0; k < embeddedViews.length; k++) {\n        callViewAction(embeddedViews[k], action);\n      }\n    } else if ((nodeDef.childFlags & NodeFlags.EmbeddedViews) === 0) {\n      // a parent with leafs\n      // no child is a component,\n      // then skip the children\n      i += nodeDef.childCount;\n    }\n  }\n}\n\nfunction callViewAction(view: ViewData, action: ViewAction) {\n  const viewState = view.state;\n  switch (action) {\n    case ViewAction.CheckNoChanges:\n      if ((viewState & ViewState.Destroyed) === 0) {\n        if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n          checkNoChangesView(view);\n        } else if (viewState & ViewState.CheckProjectedViews) {\n          execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n        }\n      }\n      break;\n    case ViewAction.CheckNoChangesProjectedViews:\n      if ((viewState & ViewState.Destroyed) === 0) {\n        if (viewState & ViewState.CheckProjectedView) {\n          checkNoChangesView(view);\n        } else if (viewState & ViewState.CheckProjectedViews) {\n          execProjectedViewsAction(view, action);\n        }\n      }\n      break;\n    case ViewAction.CheckAndUpdate:\n      if ((viewState & ViewState.Destroyed) === 0) {\n        if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n          checkAndUpdateView(view);\n        } else if (viewState & ViewState.CheckProjectedViews) {\n          execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n        }\n      }\n      break;\n    case ViewAction.CheckAndUpdateProjectedViews:\n      if ((viewState & ViewState.Destroyed) === 0) {\n        if (viewState & ViewState.CheckProjectedView) {\n          checkAndUpdateView(view);\n        } else if (viewState & ViewState.CheckProjectedViews) {\n          execProjectedViewsAction(view, action);\n        }\n      }\n      break;\n    case ViewAction.Destroy:\n      // Note: destroyView recurses over all views,\n      // so we don't need to special case projected views here.\n      destroyView(view);\n      break;\n    case ViewAction.CreateViewNodes:\n      createViewNodes(view);\n      break;\n  }\n}\n\nfunction execProjectedViewsAction(view: ViewData, action: ViewAction) {\n  execEmbeddedViewsAction(view, action);\n  execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(\n    view: ViewData, queryFlags: NodeFlags, staticDynamicQueryFlag: NodeFlags,\n    checkType: CheckType) {\n  if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n    return;\n  }\n  const nodeCount = view.def.nodes.length;\n  for (let i = 0; i < nodeCount; i++) {\n    const nodeDef = view.def.nodes[i];\n    if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n      Services.setCurrentNode(view, nodeDef.nodeIndex);\n      switch (checkType) {\n        case CheckType.CheckAndUpdate:\n          checkAndUpdateQuery(view, nodeDef);\n          break;\n        case CheckType.CheckNoChanges:\n          checkNoChangesQuery(view, nodeDef);\n          break;\n      }\n    }\n    if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n      // no child has a matching query\n      // then skip the children\n      i += nodeDef.childCount;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {SecurityContext} from '../sanitization/security';\n\nimport {BindingDef, BindingFlags, ElementData, ElementHandleEventFn, NodeDef, NodeFlags, OutputDef, OutputType, QueryValueType, ViewData, ViewDefinitionFactory, asElementData} from './types';\nimport {NOOP, calcBindingFlags, checkAndUpdateBinding, dispatchEvent, elementEventFullName, getParentRenderElement, resolveDefinition, resolveRendererType2, splitMatchedQueriesDsl, splitNamespace} from './util';\n\nexport function anchorDef(\n    flags: NodeFlags, matchedQueriesDsl: null | [string | number, QueryValueType][],\n    ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn,\n    templateFactory?: ViewDefinitionFactory): NodeDef {\n  flags |= NodeFlags.TypeElement;\n  const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n  const template = templateFactory ? resolveDefinition(templateFactory) : null;\n\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    flags,\n    checkIndex: -1,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n    bindings: [],\n    bindingFlags: 0,\n    outputs: [],\n    element: {\n      ns: null,\n      name: null,\n      attrs: null, template,\n      componentProvider: null,\n      componentView: null,\n      componentRendererType: null,\n      publicProviders: null,\n      allProviders: null,\n      handleEvent: handleEvent || NOOP\n    },\n    provider: null,\n    text: null,\n    query: null,\n    ngContent: null\n  };\n}\n\nexport function elementDef(\n    checkIndex: number, flags: NodeFlags,\n    matchedQueriesDsl: null | [string | number, QueryValueType][], ngContentIndex: null | number,\n    childCount: number, namespaceAndName: string | null, fixedAttrs: null | [string, string][] = [],\n    bindings?: null | [BindingFlags, string, string | SecurityContext | null][],\n    outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn,\n    componentView?: null | ViewDefinitionFactory,\n    componentRendererType?: RendererType2 | null): NodeDef {\n  if (!handleEvent) {\n    handleEvent = NOOP;\n  }\n  const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n  let ns: string = null !;\n  let name: string = null !;\n  if (namespaceAndName) {\n    [ns, name] = splitNamespace(namespaceAndName);\n  }\n  bindings = bindings || [];\n  const bindingDefs: BindingDef[] = new Array(bindings.length);\n  for (let i = 0; i < bindings.length; i++) {\n    const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n\n    const [ns, name] = splitNamespace(namespaceAndName);\n    let securityContext: SecurityContext = undefined !;\n    let suffix: string = undefined !;\n    switch (bindingFlags & BindingFlags.Types) {\n      case BindingFlags.TypeElementStyle:\n        suffix = <string>suffixOrSecurityContext;\n        break;\n      case BindingFlags.TypeElementAttribute:\n      case BindingFlags.TypeProperty:\n        securityContext = <SecurityContext>suffixOrSecurityContext;\n        break;\n    }\n    bindingDefs[i] =\n        {flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix};\n  }\n  outputs = outputs || [];\n  const outputDefs: OutputDef[] = new Array(outputs.length);\n  for (let i = 0; i < outputs.length; i++) {\n    const [target, eventName] = outputs[i];\n    outputDefs[i] = {\n      type: OutputType.ElementOutput,\n      target: <any>target, eventName,\n      propName: null\n    };\n  }\n  fixedAttrs = fixedAttrs || [];\n  const attrs = <[string, string, string][]>fixedAttrs.map(([namespaceAndName, value]) => {\n    const [ns, name] = splitNamespace(namespaceAndName);\n    return [ns, name, value];\n  });\n  componentRendererType = resolveRendererType2(componentRendererType);\n  if (componentView) {\n    flags |= NodeFlags.ComponentView;\n  }\n  flags |= NodeFlags.TypeElement;\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    checkIndex,\n    flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n    bindings: bindingDefs,\n    bindingFlags: calcBindingFlags(bindingDefs),\n    outputs: outputDefs,\n    element: {\n      ns,\n      name,\n      attrs,\n      template: null,\n      // will bet set by the view definition\n      componentProvider: null,\n      componentView: componentView || null,\n      componentRendererType: componentRendererType,\n      publicProviders: null,\n      allProviders: null,\n      handleEvent: handleEvent || NOOP,\n    },\n    provider: null,\n    text: null,\n    query: null,\n    ngContent: null\n  };\n}\n\nexport function createElement(view: ViewData, renderHost: any, def: NodeDef): ElementData {\n  const elDef = def.element !;\n  const rootSelectorOrNode = view.root.selectorOrNode;\n  const renderer = view.renderer;\n  let el: any;\n  if (view.parent || !rootSelectorOrNode) {\n    if (elDef.name) {\n      el = renderer.createElement(elDef.name, elDef.ns);\n    } else {\n      el = renderer.createComment('');\n    }\n    const parentEl = getParentRenderElement(view, renderHost, def);\n    if (parentEl) {\n      renderer.appendChild(parentEl, el);\n    }\n  } else {\n    // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n    const preserveContent =\n        (!!elDef.componentRendererType &&\n         elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n    el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n  }\n  if (elDef.attrs) {\n    for (let i = 0; i < elDef.attrs.length; i++) {\n      const [ns, name, value] = elDef.attrs[i];\n      renderer.setAttribute(el, name, value, ns);\n    }\n  }\n  return el;\n}\n\nexport function listenToElementOutputs(view: ViewData, compView: ViewData, def: NodeDef, el: any) {\n  for (let i = 0; i < def.outputs.length; i++) {\n    const output = def.outputs[i];\n    const handleEventClosure = renderEventHandlerClosure(\n        view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n    let listenTarget: 'window'|'document'|'body'|'component'|null = output.target;\n    let listenerView = view;\n    if (output.target === 'component') {\n      listenTarget = null;\n      listenerView = compView;\n    }\n    const disposable =\n        <any>listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n    view.disposables ![def.outputIndex + i] = disposable;\n  }\n}\n\nfunction renderEventHandlerClosure(view: ViewData, index: number, eventName: string) {\n  return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\n\nexport function checkAndUpdateElementInline(\n    view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n    v7: any, v8: any, v9: any): boolean {\n  const bindLen = def.bindings.length;\n  let changed = false;\n  if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;\n  if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;\n  if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;\n  if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;\n  if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;\n  if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;\n  if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;\n  if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;\n  if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;\n  if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;\n  return changed;\n}\n\nexport function checkAndUpdateElementDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n  let changed = false;\n  for (let i = 0; i < values.length; i++) {\n    if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n  }\n  return changed;\n}\n\nfunction checkAndUpdateElementValue(view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n  if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n    return false;\n  }\n  const binding = def.bindings[bindingIdx];\n  const elData = asElementData(view, def.nodeIndex);\n  const renderNode = elData.renderElement;\n  const name = binding.name !;\n  switch (binding.flags & BindingFlags.Types) {\n    case BindingFlags.TypeElementAttribute:\n      setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n      break;\n    case BindingFlags.TypeElementClass:\n      setElementClass(view, renderNode, name, value);\n      break;\n    case BindingFlags.TypeElementStyle:\n      setElementStyle(view, binding, renderNode, name, value);\n      break;\n    case BindingFlags.TypeProperty:\n      const bindView = (def.flags & NodeFlags.ComponentView &&\n                        binding.flags & BindingFlags.SyntheticHostProperty) ?\n          elData.componentView :\n          view;\n      setElementProperty(bindView, binding, renderNode, name, value);\n      break;\n  }\n  return true;\n}\n\nfunction setElementAttribute(\n    view: ViewData, binding: BindingDef, renderNode: any, ns: string | null, name: string,\n    value: any) {\n  const securityContext = binding.securityContext;\n  let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n  renderValue = renderValue != null ? renderValue.toString() : null;\n  const renderer = view.renderer;\n  if (value != null) {\n    renderer.setAttribute(renderNode, name, renderValue, ns);\n  } else {\n    renderer.removeAttribute(renderNode, name, ns);\n  }\n}\n\nfunction setElementClass(view: ViewData, renderNode: any, name: string, value: boolean) {\n  const renderer = view.renderer;\n  if (value) {\n    renderer.addClass(renderNode, name);\n  } else {\n    renderer.removeClass(renderNode, name);\n  }\n}\n\nfunction setElementStyle(\n    view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n  let renderValue: string|null =\n      view.root.sanitizer.sanitize(SecurityContext.STYLE, value as{} | string);\n  if (renderValue != null) {\n    renderValue = renderValue.toString();\n    const unit = binding.suffix;\n    if (unit != null) {\n      renderValue = renderValue + unit;\n    }\n  } else {\n    renderValue = null;\n  }\n  const renderer = view.renderer;\n  if (renderValue != null) {\n    renderer.setStyle(renderNode, name, renderValue);\n  } else {\n    renderer.removeStyle(renderNode, name);\n  }\n}\n\nfunction setElementProperty(\n    view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n  const securityContext = binding.securityContext;\n  let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n  view.renderer.setProperty(renderNode, name, renderValue);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\n\nimport {NodeDef, NodeFlags, QueryBindingDef, QueryBindingType, QueryDef, QueryValueType, ViewData, asElementData, asProviderData, asQueryList} from './types';\nimport {declaredViewContainer, filterQueryId, isEmbeddedView} from './util';\n\nexport function queryDef(\n    flags: NodeFlags, id: number, bindings: {[propName: string]: QueryBindingType}): NodeDef {\n  let bindingDefs: QueryBindingDef[] = [];\n  for (let propName in bindings) {\n    const bindingType = bindings[propName];\n    bindingDefs.push({propName, bindingType});\n  }\n\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    // TODO(vicb): check\n    checkIndex: -1, flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    ngContentIndex: -1,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {},\n    childCount: 0,\n    bindings: [],\n    bindingFlags: 0,\n    outputs: [],\n    element: null,\n    provider: null,\n    text: null,\n    query: {id, filterId: filterQueryId(id), bindings: bindingDefs},\n    ngContent: null\n  };\n}\n\nexport function createQuery(): QueryList<any> {\n  return new QueryList();\n}\n\nexport function dirtyParentQueries(view: ViewData) {\n  const queryIds = view.def.nodeMatchedQueries;\n  while (view.parent && isEmbeddedView(view)) {\n    let tplDef = view.parentNodeDef !;\n    view = view.parent;\n    // content queries\n    const end = tplDef.nodeIndex + tplDef.childCount;\n    for (let i = 0; i <= end; i++) {\n      const nodeDef = view.def.nodes[i];\n      if ((nodeDef.flags & NodeFlags.TypeContentQuery) &&\n          (nodeDef.flags & NodeFlags.DynamicQuery) &&\n          (nodeDef.query !.filterId & queryIds) === nodeDef.query !.filterId) {\n        asQueryList(view, i).setDirty();\n      }\n      if ((nodeDef.flags & NodeFlags.TypeElement && i + nodeDef.childCount < tplDef.nodeIndex) ||\n          !(nodeDef.childFlags & NodeFlags.TypeContentQuery) ||\n          !(nodeDef.childFlags & NodeFlags.DynamicQuery)) {\n        // skip elements that don't contain the template element or no query.\n        i += nodeDef.childCount;\n      }\n    }\n  }\n\n  // view queries\n  if (view.def.nodeFlags & NodeFlags.TypeViewQuery) {\n    for (let i = 0; i < view.def.nodes.length; i++) {\n      const nodeDef = view.def.nodes[i];\n      if ((nodeDef.flags & NodeFlags.TypeViewQuery) && (nodeDef.flags & NodeFlags.DynamicQuery)) {\n        asQueryList(view, i).setDirty();\n      }\n      // only visit the root nodes\n      i += nodeDef.childCount;\n    }\n  }\n}\n\nexport function checkAndUpdateQuery(view: ViewData, nodeDef: NodeDef) {\n  const queryList = asQueryList(view, nodeDef.nodeIndex);\n  if (!queryList.dirty) {\n    return;\n  }\n  let directiveInstance: any;\n  let newValues: any[] = undefined !;\n  if (nodeDef.flags & NodeFlags.TypeContentQuery) {\n    const elementDef = nodeDef.parent !.parent !;\n    newValues = calcQueryValues(\n        view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query !,\n        []);\n    directiveInstance = asProviderData(view, nodeDef.parent !.nodeIndex).instance;\n  } else if (nodeDef.flags & NodeFlags.TypeViewQuery) {\n    newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query !, []);\n    directiveInstance = view.component;\n  }\n  queryList.reset(newValues);\n  const bindings = nodeDef.query !.bindings;\n  let notify = false;\n  for (let i = 0; i < bindings.length; i++) {\n    const binding = bindings[i];\n    let boundValue: any;\n    switch (binding.bindingType) {\n      case QueryBindingType.First:\n        boundValue = queryList.first;\n        break;\n      case QueryBindingType.All:\n        boundValue = queryList;\n        notify = true;\n        break;\n    }\n    directiveInstance[binding.propName] = boundValue;\n  }\n  if (notify) {\n    queryList.notifyOnChanges();\n  }\n}\n\nfunction calcQueryValues(\n    view: ViewData, startIndex: number, endIndex: number, queryDef: QueryDef,\n    values: any[]): any[] {\n  for (let i = startIndex; i <= endIndex; i++) {\n    const nodeDef = view.def.nodes[i];\n    const valueType = nodeDef.matchedQueries[queryDef.id];\n    if (valueType != null) {\n      values.push(getQueryValue(view, nodeDef, valueType));\n    }\n    if (nodeDef.flags & NodeFlags.TypeElement && nodeDef.element !.template &&\n        (nodeDef.element !.template !.nodeMatchedQueries & queryDef.filterId) ===\n            queryDef.filterId) {\n      const elementData = asElementData(view, i);\n      // check embedded views that were attached at the place of their template,\n      // but process child nodes first if some match the query (see issue #16568)\n      if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n        calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n        i += nodeDef.childCount;\n      }\n      if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n        const embeddedViews = elementData.viewContainer !._embeddedViews;\n        for (let k = 0; k < embeddedViews.length; k++) {\n          const embeddedView = embeddedViews[k];\n          const dvc = declaredViewContainer(embeddedView);\n          if (dvc && dvc === elementData) {\n            calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n          }\n        }\n      }\n      const projectedViews = elementData.template._projectedViews;\n      if (projectedViews) {\n        for (let k = 0; k < projectedViews.length; k++) {\n          const projectedView = projectedViews[k];\n          calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n        }\n      }\n    }\n    if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n      // if no child matches the query, skip the children.\n      i += nodeDef.childCount;\n    }\n  }\n  return values;\n}\n\nexport function getQueryValue(\n    view: ViewData, nodeDef: NodeDef, queryValueType: QueryValueType): any {\n  if (queryValueType != null) {\n    // a match\n    switch (queryValueType) {\n      case QueryValueType.RenderElement:\n        return asElementData(view, nodeDef.nodeIndex).renderElement;\n      case QueryValueType.ElementRef:\n        return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n      case QueryValueType.TemplateRef:\n        return asElementData(view, nodeDef.nodeIndex).template;\n      case QueryValueType.ViewContainerRef:\n        return asElementData(view, nodeDef.nodeIndex).viewContainer;\n      case QueryValueType.Provider:\n        return asProviderData(view, nodeDef.nodeIndex).instance;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NodeDef, NodeFlags, ViewData} from './types';\nimport {RenderNodeAction, getParentRenderElement, visitProjectedRenderNodes} from './util';\n\nexport function ngContentDef(ngContentIndex: null | number, index: number): NodeDef {\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    checkIndex: -1,\n    flags: NodeFlags.TypeNgContent,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {}, ngContentIndex,\n    childCount: 0,\n    bindings: [],\n    bindingFlags: 0,\n    outputs: [],\n    element: null,\n    provider: null,\n    text: null,\n    query: null,\n    ngContent: {index}\n  };\n}\n\nexport function appendNgContent(view: ViewData, renderHost: any, def: NodeDef) {\n  const parentEl = getParentRenderElement(view, renderHost, def);\n  if (!parentEl) {\n    // Nothing to do if there is no parent element.\n    return;\n  }\n  const ngContentIndex = def.ngContent !.index;\n  visitProjectedRenderNodes(\n      view, ngContentIndex, RenderNodeAction.AppendChild, parentEl, null, undefined);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, PureExpressionData, ViewData, asPureExpressionData} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding} from './util';\n\nexport function purePipeDef(checkIndex: number, argCount: number): NodeDef {\n  // argCount + 1 to include the pipe as first arg\n  return _pureExpressionDef(NodeFlags.TypePurePipe, checkIndex, new Array(argCount + 1));\n}\n\nexport function pureArrayDef(checkIndex: number, argCount: number): NodeDef {\n  return _pureExpressionDef(NodeFlags.TypePureArray, checkIndex, new Array(argCount));\n}\n\nexport function pureObjectDef(checkIndex: number, propToIndex: {[p: string]: number}): NodeDef {\n  const keys = Object.keys(propToIndex);\n  const nbKeys = keys.length;\n  const propertyNames = new Array(nbKeys);\n  for (let i = 0; i < nbKeys; i++) {\n    const key = keys[i];\n    const index = propToIndex[key];\n    propertyNames[index] = key;\n  }\n\n  return _pureExpressionDef(NodeFlags.TypePureObject, checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(\n    flags: NodeFlags, checkIndex: number, propertyNames: string[]): NodeDef {\n  const bindings: BindingDef[] = new Array(propertyNames.length);\n  for (let i = 0; i < propertyNames.length; i++) {\n    const prop = propertyNames[i];\n    bindings[i] = {\n      flags: BindingFlags.TypeProperty,\n      name: prop,\n      ns: null,\n      nonMinifiedName: prop,\n      securityContext: null,\n      suffix: null\n    };\n  }\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    checkIndex,\n    flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {},\n    ngContentIndex: -1,\n    childCount: 0, bindings,\n    bindingFlags: calcBindingFlags(bindings),\n    outputs: [],\n    element: null,\n    provider: null,\n    text: null,\n    query: null,\n    ngContent: null\n  };\n}\n\nexport function createPureExpression(view: ViewData, def: NodeDef): PureExpressionData {\n  return {value: undefined};\n}\n\nexport function checkAndUpdatePureExpressionInline(\n    view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n    v7: any, v8: any, v9: any): boolean {\n  const bindings = def.bindings;\n  let changed = false;\n  const bindLen = bindings.length;\n  if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n  if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n  if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n  if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n  if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n  if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n  if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n  if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n  if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n  if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n  if (changed) {\n    const data = asPureExpressionData(view, def.nodeIndex);\n    let value: any;\n    switch (def.flags & NodeFlags.Types) {\n      case NodeFlags.TypePureArray:\n        value = new Array(bindings.length);\n        if (bindLen > 0) value[0] = v0;\n        if (bindLen > 1) value[1] = v1;\n        if (bindLen > 2) value[2] = v2;\n        if (bindLen > 3) value[3] = v3;\n        if (bindLen > 4) value[4] = v4;\n        if (bindLen > 5) value[5] = v5;\n        if (bindLen > 6) value[6] = v6;\n        if (bindLen > 7) value[7] = v7;\n        if (bindLen > 8) value[8] = v8;\n        if (bindLen > 9) value[9] = v9;\n        break;\n      case NodeFlags.TypePureObject:\n        value = {};\n        if (bindLen > 0) value[bindings[0].name !] = v0;\n        if (bindLen > 1) value[bindings[1].name !] = v1;\n        if (bindLen > 2) value[bindings[2].name !] = v2;\n        if (bindLen > 3) value[bindings[3].name !] = v3;\n        if (bindLen > 4) value[bindings[4].name !] = v4;\n        if (bindLen > 5) value[bindings[5].name !] = v5;\n        if (bindLen > 6) value[bindings[6].name !] = v6;\n        if (bindLen > 7) value[bindings[7].name !] = v7;\n        if (bindLen > 8) value[bindings[8].name !] = v8;\n        if (bindLen > 9) value[bindings[9].name !] = v9;\n        break;\n      case NodeFlags.TypePurePipe:\n        const pipe = v0;\n        switch (bindLen) {\n          case 1:\n            value = pipe.transform(v0);\n            break;\n          case 2:\n            value = pipe.transform(v1);\n            break;\n          case 3:\n            value = pipe.transform(v1, v2);\n            break;\n          case 4:\n            value = pipe.transform(v1, v2, v3);\n            break;\n          case 5:\n            value = pipe.transform(v1, v2, v3, v4);\n            break;\n          case 6:\n            value = pipe.transform(v1, v2, v3, v4, v5);\n            break;\n          case 7:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6);\n            break;\n          case 8:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n            break;\n          case 9:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n            break;\n          case 10:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n            break;\n        }\n        break;\n    }\n    data.value = value;\n  }\n  return changed;\n}\n\nexport function checkAndUpdatePureExpressionDynamic(\n    view: ViewData, def: NodeDef, values: any[]): boolean {\n  const bindings = def.bindings;\n  let changed = false;\n  for (let i = 0; i < values.length; i++) {\n    // Note: We need to loop over all values, so that\n    // the old values are updates as well!\n    if (checkAndUpdateBinding(view, def, i, values[i])) {\n      changed = true;\n    }\n  }\n  if (changed) {\n    const data = asPureExpressionData(view, def.nodeIndex);\n    let value: any;\n    switch (def.flags & NodeFlags.Types) {\n      case NodeFlags.TypePureArray:\n        value = values;\n        break;\n      case NodeFlags.TypePureObject:\n        value = {};\n        for (let i = 0; i < values.length; i++) {\n          value[bindings[i].name !] = values[i];\n        }\n        break;\n      case NodeFlags.TypePurePipe:\n        const pipe = values[0];\n        const params = values.slice(1);\n        value = (<any>pipe.transform)(...params);\n        break;\n    }\n    data.value = value;\n  }\n  return changed;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, TextData, ViewData, asTextData} from './types';\nimport {checkAndUpdateBinding, getParentRenderElement} from './util';\n\nexport function textDef(\n    checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef {\n  const bindings: BindingDef[] = new Array(staticText.length - 1);\n  for (let i = 1; i < staticText.length; i++) {\n    bindings[i - 1] = {\n      flags: BindingFlags.TypeProperty,\n      name: null,\n      ns: null,\n      nonMinifiedName: null,\n      securityContext: null,\n      suffix: staticText[i],\n    };\n  }\n\n  return {\n    // will bet set by the view definition\n    nodeIndex: -1,\n    parent: null,\n    renderParent: null,\n    bindingIndex: -1,\n    outputIndex: -1,\n    // regular values\n    checkIndex,\n    flags: NodeFlags.TypeText,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {}, ngContentIndex,\n    childCount: 0, bindings,\n    bindingFlags: BindingFlags.TypeProperty,\n    outputs: [],\n    element: null,\n    provider: null,\n    text: {prefix: staticText[0]},\n    query: null,\n    ngContent: null,\n  };\n}\n\nexport function createText(view: ViewData, renderHost: any, def: NodeDef): TextData {\n  let renderNode: any;\n  const renderer = view.renderer;\n  renderNode = renderer.createText(def.text !.prefix);\n  const parentEl = getParentRenderElement(view, renderHost, def);\n  if (parentEl) {\n    renderer.appendChild(parentEl, renderNode);\n  }\n  return {renderText: renderNode};\n}\n\nexport function checkAndUpdateTextInline(\n    view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n    v7: any, v8: any, v9: any): boolean {\n  let changed = false;\n  const bindings = def.bindings;\n  const bindLen = bindings.length;\n  if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n  if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n  if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n  if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n  if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n  if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n  if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n  if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n  if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n  if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n  if (changed) {\n    let value = def.text !.prefix;\n    if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);\n    if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);\n    if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);\n    if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);\n    if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);\n    if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);\n    if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);\n    if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);\n    if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);\n    if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);\n    const renderNode = asTextData(view, def.nodeIndex).renderText;\n    view.renderer.setValue(renderNode, value);\n  }\n  return changed;\n}\n\nexport function checkAndUpdateTextDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n  const bindings = def.bindings;\n  let changed = false;\n  for (let i = 0; i < values.length; i++) {\n    // Note: We need to loop over all values, so that\n    // the old values are updates as well!\n    if (checkAndUpdateBinding(view, def, i, values[i])) {\n      changed = true;\n    }\n  }\n  if (changed) {\n    let value = '';\n    for (let i = 0; i < values.length; i++) {\n      value = value + _addInterpolationPart(values[i], bindings[i]);\n    }\n    value = def.text !.prefix + value;\n    const renderNode = asTextData(view, def.nodeIndex).renderText;\n    view.renderer.setValue(renderNode, value);\n  }\n  return changed;\n}\n\nfunction _addInterpolationPart(value: any, binding: BindingDef): string {\n  const valueStr = value != null ? value.toString() : '';\n  return valueStr + binding.suffix;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';\nimport {Injector} from '../di';\nimport {InjectableType} from '../di/injectable';\nimport {getInjectableDef, ÉµÉµInjectableDef} from '../di/interface/defs';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {isDevMode} from '../util/is_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../util/ng_reflect';\n\nimport {isViewDebugError, viewDestroyedError, viewWrappedDebugError} from './errors';\nimport {resolveDep} from './provider';\nimport {dirtyParentQueries, getQueryValue} from './query';\nimport {createInjector, createNgModuleRef, getComponentViewDefinitionFactory} from './refs';\nimport {ArgumentType, BindingFlags, CheckType, DebugContext, ElementData, NgModuleDefinition, NodeDef, NodeFlags, NodeLogger, ProviderOverride, RootData, Services, ViewData, ViewDefinition, ViewState, asElementData, asPureExpressionData} from './types';\nimport {NOOP, isComponentView, renderNode, resolveDefinition, splitDepsDsl, tokenKey, viewParentEl} from './util';\nimport {checkAndUpdateNode, checkAndUpdateView, checkNoChangesNode, checkNoChangesView, createComponentView, createEmbeddedView, createRootView, destroyView} from './view';\n\n\nlet initialized = false;\n\nexport function initServicesIfNeeded() {\n  if (initialized) {\n    return;\n  }\n  initialized = true;\n  const services = isDevMode() ? createDebugServices() : createProdServices();\n  Services.setCurrentNode = services.setCurrentNode;\n  Services.createRootView = services.createRootView;\n  Services.createEmbeddedView = services.createEmbeddedView;\n  Services.createComponentView = services.createComponentView;\n  Services.createNgModuleRef = services.createNgModuleRef;\n  Services.overrideProvider = services.overrideProvider;\n  Services.overrideComponentView = services.overrideComponentView;\n  Services.clearOverrides = services.clearOverrides;\n  Services.checkAndUpdateView = services.checkAndUpdateView;\n  Services.checkNoChangesView = services.checkNoChangesView;\n  Services.destroyView = services.destroyView;\n  Services.resolveDep = resolveDep;\n  Services.createDebugContext = services.createDebugContext;\n  Services.handleEvent = services.handleEvent;\n  Services.updateDirectives = services.updateDirectives;\n  Services.updateRenderer = services.updateRenderer;\n  Services.dirtyParentQueries = dirtyParentQueries;\n}\n\nfunction createProdServices() {\n  return {\n    setCurrentNode: () => {},\n    createRootView: createProdRootView,\n    createEmbeddedView: createEmbeddedView,\n    createComponentView: createComponentView,\n    createNgModuleRef: createNgModuleRef,\n    overrideProvider: NOOP,\n    overrideComponentView: NOOP,\n    clearOverrides: NOOP,\n    checkAndUpdateView: checkAndUpdateView,\n    checkNoChangesView: checkNoChangesView,\n    destroyView: destroyView,\n    createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n    handleEvent: (view: ViewData, nodeIndex: number, eventName: string, event: any) =>\n                     view.def.handleEvent(view, nodeIndex, eventName, event),\n    updateDirectives: (view: ViewData, checkType: CheckType) => view.def.updateDirectives(\n                          checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n                                                                   prodCheckNoChangesNode,\n                          view),\n    updateRenderer: (view: ViewData, checkType: CheckType) => view.def.updateRenderer(\n                        checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n                                                                 prodCheckNoChangesNode,\n                        view),\n  };\n}\n\nfunction createDebugServices() {\n  return {\n    setCurrentNode: debugSetCurrentNode,\n    createRootView: debugCreateRootView,\n    createEmbeddedView: debugCreateEmbeddedView,\n    createComponentView: debugCreateComponentView,\n    createNgModuleRef: debugCreateNgModuleRef,\n    overrideProvider: debugOverrideProvider,\n    overrideComponentView: debugOverrideComponentView,\n    clearOverrides: debugClearOverrides,\n    checkAndUpdateView: debugCheckAndUpdateView,\n    checkNoChangesView: debugCheckNoChangesView,\n    destroyView: debugDestroyView,\n    createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n    handleEvent: debugHandleEvent,\n    updateDirectives: debugUpdateDirectives,\n    updateRenderer: debugUpdateRenderer,\n  };\n}\n\nfunction createProdRootView(\n    elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n    def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n  const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n  return createRootView(\n      createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode),\n      def, context);\n}\n\nfunction debugCreateRootView(\n    elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n    def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n  const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n  const root = createRootData(\n      elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes,\n      rootSelectorOrNode);\n  const defWithOverride = applyProviderOverridesToView(def);\n  return callWithDebugContext(\n      DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(\n    elInjector: Injector, ngModule: NgModuleRef<any>, rendererFactory: RendererFactory2,\n    projectableNodes: any[][], rootSelectorOrNode: any): RootData {\n  const sanitizer = ngModule.injector.get(Sanitizer);\n  const errorHandler = ngModule.injector.get(ErrorHandler);\n  const renderer = rendererFactory.createRenderer(null, null);\n  return {\n    ngModule,\n    injector: elInjector, projectableNodes,\n    selectorOrNode: rootSelectorOrNode, sanitizer, rendererFactory, renderer, errorHandler\n  };\n}\n\nfunction debugCreateEmbeddedView(\n    parentView: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n  const defWithOverride = applyProviderOverridesToView(viewDef);\n  return callWithDebugContext(\n      DebugAction.create, createEmbeddedView, null,\n      [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(\n    parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n  const overrideComponentView =\n      viewDefOverrides.get(nodeDef.element !.componentProvider !.provider !.token);\n  if (overrideComponentView) {\n    viewDef = overrideComponentView;\n  } else {\n    viewDef = applyProviderOverridesToView(viewDef);\n  }\n  return callWithDebugContext(\n      DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(\n    moduleType: Type<any>, parentInjector: Injector, bootstrapComponents: Type<any>[],\n    def: NgModuleDefinition): NgModuleRef<any> {\n  const defWithOverride = applyProviderOverridesToNgModule(def);\n  return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nconst providerOverrides = new Map<any, ProviderOverride>();\nconst providerOverridesWithScope = new Map<InjectableType<any>, ProviderOverride>();\nconst viewDefOverrides = new Map<any, ViewDefinition>();\n\nfunction debugOverrideProvider(override: ProviderOverride) {\n  providerOverrides.set(override.token, override);\n  let injectableDef: ÉµÉµInjectableDef<any>|null;\n  if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n      typeof injectableDef.providedIn === 'function') {\n    providerOverridesWithScope.set(override.token as InjectableType<any>, override);\n  }\n}\n\nfunction debugOverrideComponentView(comp: any, compFactory: ComponentFactory<any>) {\n  const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n  const compViewDef = resolveDefinition(hostViewDef.nodes[0].element !.componentView !);\n  viewDefOverrides.set(comp, compViewDef);\n}\n\nfunction debugClearOverrides() {\n  providerOverrides.clear();\n  providerOverridesWithScope.clear();\n  viewDefOverrides.clear();\n}\n\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def: ViewDefinition): ViewDefinition {\n  if (providerOverrides.size === 0) {\n    return def;\n  }\n  const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n  if (elementIndicesWithOverwrittenProviders.length === 0) {\n    return def;\n  }\n  // clone the whole view definition,\n  // as it maintains references between the nodes that are hard to update.\n  def = def.factory !(() => NOOP);\n  for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n    applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n  }\n  return def;\n\n  function findElementIndicesWithOverwrittenProviders(def: ViewDefinition): number[] {\n    const elIndicesWithOverwrittenProviders: number[] = [];\n    let lastElementDef: NodeDef|null = null;\n    for (let i = 0; i < def.nodes.length; i++) {\n      const nodeDef = def.nodes[i];\n      if (nodeDef.flags & NodeFlags.TypeElement) {\n        lastElementDef = nodeDef;\n      }\n      if (lastElementDef && nodeDef.flags & NodeFlags.CatProviderNoDirective &&\n          providerOverrides.has(nodeDef.provider !.token)) {\n        elIndicesWithOverwrittenProviders.push(lastElementDef !.nodeIndex);\n        lastElementDef = null;\n      }\n    }\n    return elIndicesWithOverwrittenProviders;\n  }\n\n  function applyProviderOverridesToElement(viewDef: ViewDefinition, elIndex: number) {\n    for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n      const nodeDef = viewDef.nodes[i];\n      if (nodeDef.flags & NodeFlags.TypeElement) {\n        // stop at the next element\n        return;\n      }\n      if (nodeDef.flags & NodeFlags.CatProviderNoDirective) {\n        const provider = nodeDef.provider !;\n        const override = providerOverrides.get(provider.token);\n        if (override) {\n          nodeDef.flags = (nodeDef.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n          provider.deps = splitDepsDsl(override.deps);\n          provider.value = override.value;\n        }\n      }\n    }\n  }\n}\n\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def: NgModuleDefinition): NgModuleDefinition {\n  const {hasOverrides, hasDeprecatedOverrides} = calcHasOverrides(def);\n  if (!hasOverrides) {\n    return def;\n  }\n  // clone the whole view definition,\n  // as it maintains references between the nodes that are hard to update.\n  def = def.factory !(() => NOOP);\n  applyProviderOverrides(def);\n  return def;\n\n  function calcHasOverrides(def: NgModuleDefinition):\n      {hasOverrides: boolean, hasDeprecatedOverrides: boolean} {\n    let hasOverrides = false;\n    let hasDeprecatedOverrides = false;\n    if (providerOverrides.size === 0) {\n      return {hasOverrides, hasDeprecatedOverrides};\n    }\n    def.providers.forEach(node => {\n      const override = providerOverrides.get(node.token);\n      if ((node.flags & NodeFlags.CatProviderNoDirective) && override) {\n        hasOverrides = true;\n        hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n      }\n    });\n    def.modules.forEach(module => {\n      providerOverridesWithScope.forEach((override, token) => {\n        if (getInjectableDef(token) !.providedIn === module) {\n          hasOverrides = true;\n          hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n        }\n      });\n    });\n    return {hasOverrides, hasDeprecatedOverrides};\n  }\n\n  function applyProviderOverrides(def: NgModuleDefinition) {\n    for (let i = 0; i < def.providers.length; i++) {\n      const provider = def.providers[i];\n      if (hasDeprecatedOverrides) {\n        // We had a bug where me made\n        // all providers lazy. Keep this logic behind a flag\n        // for migrating existing users.\n        provider.flags |= NodeFlags.LazyProvider;\n      }\n      const override = providerOverrides.get(provider.token);\n      if (override) {\n        provider.flags = (provider.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n        provider.deps = splitDepsDsl(override.deps);\n        provider.value = override.value;\n      }\n    }\n    if (providerOverridesWithScope.size > 0) {\n      let moduleSet = new Set<any>(def.modules);\n      providerOverridesWithScope.forEach((override, token) => {\n        if (moduleSet.has(getInjectableDef(token) !.providedIn)) {\n          let provider = {\n            token: token,\n            flags:\n                override.flags | (hasDeprecatedOverrides ? NodeFlags.LazyProvider : NodeFlags.None),\n            deps: splitDepsDsl(override.deps),\n            value: override.value,\n            index: def.providers.length,\n          };\n          def.providers.push(provider);\n          def.providersByKey[tokenKey(token)] = provider;\n        }\n      });\n    }\n  }\n}\n\nfunction prodCheckAndUpdateNode(\n    view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n    v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n  const nodeDef = view.def.nodes[checkIndex];\n  checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n      asPureExpressionData(view, checkIndex).value :\n      undefined;\n}\n\nfunction prodCheckNoChangesNode(\n    view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n    v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n  const nodeDef = view.def.nodes[checkIndex];\n  checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n      asPureExpressionData(view, checkIndex).value :\n      undefined;\n}\n\nfunction debugCheckAndUpdateView(view: ViewData) {\n  return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view: ViewData) {\n  return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view: ViewData) {\n  return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nenum DebugAction {\n  create,\n  detectChanges,\n  checkNoChanges,\n  destroy,\n  handleEvent\n}\n\nlet _currentAction: DebugAction;\nlet _currentView: ViewData;\nlet _currentNodeIndex: number|null;\n\nfunction debugSetCurrentNode(view: ViewData, nodeIndex: number | null) {\n  _currentView = view;\n  _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view: ViewData, nodeIndex: number, eventName: string, event: any) {\n  debugSetCurrentNode(view, nodeIndex);\n  return callWithDebugContext(\n      DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view: ViewData, checkType: CheckType) {\n  if (view.state & ViewState.Destroyed) {\n    throw viewDestroyedError(DebugAction[_currentAction]);\n  }\n  debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n  return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n  function debugCheckDirectivesFn(\n      view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n    const nodeDef = view.def.nodes[nodeIndex];\n    if (checkType === CheckType.CheckAndUpdate) {\n      debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n    } else {\n      debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n    }\n    if (nodeDef.flags & NodeFlags.TypeDirective) {\n      debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n    }\n    return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n        asPureExpressionData(view, nodeDef.nodeIndex).value :\n        undefined;\n  }\n}\n\nfunction debugUpdateRenderer(view: ViewData, checkType: CheckType) {\n  if (view.state & ViewState.Destroyed) {\n    throw viewDestroyedError(DebugAction[_currentAction]);\n  }\n  debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n  return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n  function debugCheckRenderNodeFn(\n      view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n    const nodeDef = view.def.nodes[nodeIndex];\n    if (checkType === CheckType.CheckAndUpdate) {\n      debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n    } else {\n      debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n    }\n    if (nodeDef.flags & NodeFlags.CatRenderNode) {\n      debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n    }\n    return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n        asPureExpressionData(view, nodeDef.nodeIndex).value :\n        undefined;\n  }\n}\n\nfunction debugCheckAndUpdateNode(\n    view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, givenValues: any[]): void {\n  const changed = (<any>checkAndUpdateNode)(view, nodeDef, argStyle, ...givenValues);\n  if (changed) {\n    const values = argStyle === ArgumentType.Dynamic ? givenValues[0] : givenValues;\n    if (nodeDef.flags & NodeFlags.TypeDirective) {\n      const bindingValues: {[key: string]: string} = {};\n      for (let i = 0; i < nodeDef.bindings.length; i++) {\n        const binding = nodeDef.bindings[i];\n        const value = values[i];\n        if (binding.flags & BindingFlags.TypeProperty) {\n          bindingValues[normalizeDebugBindingName(binding.nonMinifiedName !)] =\n              normalizeDebugBindingValue(value);\n        }\n      }\n      const elDef = nodeDef.parent !;\n      const el = asElementData(view, elDef.nodeIndex).renderElement;\n      if (!elDef.element !.name) {\n        // a comment.\n        view.renderer.setValue(el, `bindings=${JSON.stringify(bindingValues, null, 2)}`);\n      } else {\n        // a regular element.\n        for (let attr in bindingValues) {\n          const value = bindingValues[attr];\n          if (value != null) {\n            view.renderer.setAttribute(el, attr, value);\n          } else {\n            view.renderer.removeAttribute(el, attr);\n          }\n        }\n      }\n    }\n  }\n}\n\nfunction debugCheckNoChangesNode(\n    view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, values: any[]): void {\n  (<any>checkNoChangesNode)(view, nodeDef, argStyle, ...values);\n}\n\nfunction nextDirectiveWithBinding(view: ViewData, nodeIndex: number): number|null {\n  for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n    const nodeDef = view.def.nodes[i];\n    if (nodeDef.flags & NodeFlags.TypeDirective && nodeDef.bindings && nodeDef.bindings.length) {\n      return i;\n    }\n  }\n  return null;\n}\n\nfunction nextRenderNodeWithBinding(view: ViewData, nodeIndex: number): number|null {\n  for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n    const nodeDef = view.def.nodes[i];\n    if ((nodeDef.flags & NodeFlags.CatRenderNode) && nodeDef.bindings && nodeDef.bindings.length) {\n      return i;\n    }\n  }\n  return null;\n}\n\nclass DebugContext_ implements DebugContext {\n  private nodeDef: NodeDef;\n  private elView: ViewData;\n  private elDef: NodeDef;\n\n  constructor(public view: ViewData, public nodeIndex: number|null) {\n    if (nodeIndex == null) {\n      this.nodeIndex = nodeIndex = 0;\n    }\n    this.nodeDef = view.def.nodes[nodeIndex];\n    let elDef = this.nodeDef;\n    let elView = view;\n    while (elDef && (elDef.flags & NodeFlags.TypeElement) === 0) {\n      elDef = elDef.parent !;\n    }\n    if (!elDef) {\n      while (!elDef && elView) {\n        elDef = viewParentEl(elView) !;\n        elView = elView.parent !;\n      }\n    }\n    this.elDef = elDef;\n    this.elView = elView;\n  }\n\n  private get elOrCompView() {\n    // Has to be done lazily as we use the DebugContext also during creation of elements...\n    return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n  }\n\n  get injector(): Injector { return createInjector(this.elView, this.elDef); }\n\n  get component(): any { return this.elOrCompView.component; }\n\n  get context(): any { return this.elOrCompView.context; }\n\n  get providerTokens(): any[] {\n    const tokens: any[] = [];\n    if (this.elDef) {\n      for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n           i++) {\n        const childDef = this.elView.def.nodes[i];\n        if (childDef.flags & NodeFlags.CatProvider) {\n          tokens.push(childDef.provider !.token);\n        }\n        i += childDef.childCount;\n      }\n    }\n    return tokens;\n  }\n\n  get references(): {[key: string]: any} {\n    const references: {[key: string]: any} = {};\n    if (this.elDef) {\n      collectReferences(this.elView, this.elDef, references);\n\n      for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n           i++) {\n        const childDef = this.elView.def.nodes[i];\n        if (childDef.flags & NodeFlags.CatProvider) {\n          collectReferences(this.elView, childDef, references);\n        }\n        i += childDef.childCount;\n      }\n    }\n    return references;\n  }\n\n  get componentRenderElement() {\n    const elData = findHostElement(this.elOrCompView);\n    return elData ? elData.renderElement : undefined;\n  }\n\n  get renderNode(): any {\n    return this.nodeDef.flags & NodeFlags.TypeText ? renderNode(this.view, this.nodeDef) :\n                                                     renderNode(this.elView, this.elDef);\n  }\n\n  logError(console: Console, ...values: any[]) {\n    let logViewDef: ViewDefinition;\n    let logNodeIndex: number;\n    if (this.nodeDef.flags & NodeFlags.TypeText) {\n      logViewDef = this.view.def;\n      logNodeIndex = this.nodeDef.nodeIndex;\n    } else {\n      logViewDef = this.elView.def;\n      logNodeIndex = this.elDef.nodeIndex;\n    }\n    // Note: we only generate a log function for text and element nodes\n    // to make the generated code as small as possible.\n    const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n    let currRenderNodeIndex = -1;\n    let nodeLogger: NodeLogger = () => {\n      currRenderNodeIndex++;\n      if (currRenderNodeIndex === renderNodeIndex) {\n        return console.error.bind(console, ...values);\n      } else {\n        return NOOP;\n      }\n    };\n    logViewDef.factory !(nodeLogger);\n    if (currRenderNodeIndex < renderNodeIndex) {\n      console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n      (<any>console.error)(...values);\n    }\n  }\n}\n\nfunction getRenderNodeIndex(viewDef: ViewDefinition, nodeIndex: number): number {\n  let renderNodeIndex = -1;\n  for (let i = 0; i <= nodeIndex; i++) {\n    const nodeDef = viewDef.nodes[i];\n    if (nodeDef.flags & NodeFlags.CatRenderNode) {\n      renderNodeIndex++;\n    }\n  }\n  return renderNodeIndex;\n}\n\nfunction findHostElement(view: ViewData): ElementData|null {\n  while (view && !isComponentView(view)) {\n    view = view.parent !;\n  }\n  if (view.parent) {\n    return asElementData(view.parent, viewParentEl(view) !.nodeIndex);\n  }\n  return null;\n}\n\nfunction collectReferences(view: ViewData, nodeDef: NodeDef, references: {[key: string]: any}) {\n  for (let refName in nodeDef.references) {\n    references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n  }\n}\n\nfunction callWithDebugContext(action: DebugAction, fn: any, self: any, args: any[]) {\n  const oldAction = _currentAction;\n  const oldView = _currentView;\n  const oldNodeIndex = _currentNodeIndex;\n  try {\n    _currentAction = action;\n    const result = fn.apply(self, args);\n    _currentView = oldView;\n    _currentNodeIndex = oldNodeIndex;\n    _currentAction = oldAction;\n    return result;\n  } catch (e) {\n    if (isViewDebugError(e) || !_currentView) {\n      throw e;\n    }\n    throw viewWrappedDebugError(e, getCurrentDebugContext() !);\n  }\n}\n\nexport function getCurrentDebugContext(): DebugContext|null {\n  return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nexport class DebugRendererFactory2 implements RendererFactory2 {\n  constructor(private delegate: RendererFactory2) {}\n\n  createRenderer(element: any, renderData: RendererType2|null): Renderer2 {\n    return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n  }\n\n  begin() {\n    if (this.delegate.begin) {\n      this.delegate.begin();\n    }\n  }\n  end() {\n    if (this.delegate.end) {\n      this.delegate.end();\n    }\n  }\n\n  whenRenderingDone(): Promise<any> {\n    if (this.delegate.whenRenderingDone) {\n      return this.delegate.whenRenderingDone();\n    }\n    return Promise.resolve(null);\n  }\n}\n\nexport class DebugRenderer2 implements Renderer2 {\n  readonly data: {[key: string]: any};\n\n  private createDebugContext(nativeElement: any) { return this.debugContextFactory(nativeElement); }\n\n  /**\n   * Factory function used to create a `DebugContext` when a node is created.\n   *\n   * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n   *\n   * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n   * or a Render context.\n   */\n  debugContextFactory: (nativeElement?: any) => DebugContext | null = getCurrentDebugContext;\n\n  constructor(private delegate: Renderer2) { this.data = this.delegate.data; }\n\n  destroyNode(node: any) {\n    const debugNode = getDebugNode(node) !;\n    removeDebugNodeFromIndex(debugNode);\n    if (debugNode instanceof DebugNode__PRE_R3__) {\n      debugNode.listeners.length = 0;\n    }\n    if (this.delegate.destroyNode) {\n      this.delegate.destroyNode(node);\n    }\n  }\n\n  destroy() { this.delegate.destroy(); }\n\n  createElement(name: string, namespace?: string): any {\n    const el = this.delegate.createElement(name, namespace);\n    const debugCtx = this.createDebugContext(el);\n    if (debugCtx) {\n      const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n      (debugEl as{name: string}).name = name;\n      indexDebugNode(debugEl);\n    }\n    return el;\n  }\n\n  createComment(value: string): any {\n    const comment = this.delegate.createComment(value);\n    const debugCtx = this.createDebugContext(comment);\n    if (debugCtx) {\n      indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n    }\n    return comment;\n  }\n\n  createText(value: string): any {\n    const text = this.delegate.createText(value);\n    const debugCtx = this.createDebugContext(text);\n    if (debugCtx) {\n      indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n    }\n    return text;\n  }\n\n  appendChild(parent: any, newChild: any): void {\n    const debugEl = getDebugNode(parent);\n    const debugChildEl = getDebugNode(newChild);\n    if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.addChild(debugChildEl);\n    }\n    this.delegate.appendChild(parent, newChild);\n  }\n\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    const debugEl = getDebugNode(parent);\n    const debugChildEl = getDebugNode(newChild);\n    const debugRefEl = getDebugNode(refChild) !;\n    if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.insertBefore(debugRefEl, debugChildEl);\n    }\n\n    this.delegate.insertBefore(parent, newChild, refChild);\n  }\n\n  removeChild(parent: any, oldChild: any): void {\n    const debugEl = getDebugNode(parent);\n    const debugChildEl = getDebugNode(oldChild);\n    if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.removeChild(debugChildEl);\n    }\n    this.delegate.removeChild(parent, oldChild);\n  }\n\n  selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n    const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n    const debugCtx = getCurrentDebugContext();\n    if (debugCtx) {\n      indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n    }\n    return el;\n  }\n\n  setAttribute(el: any, name: string, value: string, namespace?: string): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      const fullName = namespace ? namespace + ':' + name : name;\n      debugEl.attributes[fullName] = value;\n    }\n    this.delegate.setAttribute(el, name, value, namespace);\n  }\n\n  removeAttribute(el: any, name: string, namespace?: string): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      const fullName = namespace ? namespace + ':' + name : name;\n      debugEl.attributes[fullName] = null;\n    }\n    this.delegate.removeAttribute(el, name, namespace);\n  }\n\n  addClass(el: any, name: string): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.classes[name] = true;\n    }\n    this.delegate.addClass(el, name);\n  }\n\n  removeClass(el: any, name: string): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.classes[name] = false;\n    }\n    this.delegate.removeClass(el, name);\n  }\n\n  setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.styles[style] = value;\n    }\n    this.delegate.setStyle(el, style, value, flags);\n  }\n\n  removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.styles[style] = null;\n    }\n    this.delegate.removeStyle(el, style, flags);\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    const debugEl = getDebugNode(el);\n    if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n      debugEl.properties[name] = value;\n    }\n    this.delegate.setProperty(el, name, value);\n  }\n\n  listen(\n      target: 'document'|'windows'|'body'|any, eventName: string,\n      callback: (event: any) => boolean): () => void {\n    if (typeof target !== 'string') {\n      const debugEl = getDebugNode(target);\n      if (debugEl) {\n        debugEl.listeners.push(new DebugEventListener(eventName, callback));\n      }\n    }\n\n    return this.delegate.listen(target, eventName, callback);\n  }\n\n  parentNode(node: any): any { return this.delegate.parentNode(node); }\n  nextSibling(node: any): any { return this.delegate.nextSibling(node); }\n  setValue(node: any, value: string): void { return this.delegate.setValue(node, value); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\n\nimport {initServicesIfNeeded} from './services';\nimport {NgModuleDefinition, NgModuleDefinitionFactory, NgModuleProviderDef, ProviderOverride, Services, ViewDefinition} from './types';\nimport {resolveDefinition} from './util';\n\nexport function overrideProvider(override: ProviderOverride) {\n  initServicesIfNeeded();\n  return Services.overrideProvider(override);\n}\n\nexport function overrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>) {\n  initServicesIfNeeded();\n  return Services.overrideComponentView(comp, componentFactory);\n}\n\nexport function clearOverrides() {\n  initServicesIfNeeded();\n  return Services.clearOverrides();\n}\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createNgModuleFactory(\n    ngModuleType: Type<any>, bootstrapComponents: Type<any>[],\n    defFactory: NgModuleDefinitionFactory): NgModuleFactory<any> {\n  return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def: NgModuleDefinition): NgModuleDefinition {\n  const providers = Array.from(def.providers);\n  const modules = Array.from(def.modules);\n  const providersByKey: {[tokenKey: string]: NgModuleProviderDef} = {};\n  for (const key in def.providersByKey) {\n    providersByKey[key] = def.providersByKey[key];\n  }\n\n  return {\n    factory: def.factory,\n    isRoot: def.isRoot, providers, modules, providersByKey,\n  };\n}\n\nclass NgModuleFactory_ extends NgModuleFactory<any> {\n  constructor(\n      public readonly moduleType: Type<any>, private _bootstrapComponents: Type<any>[],\n      private _ngModuleDefFactory: NgModuleDefinitionFactory) {\n    // Attention: this ctor is called as top level function.\n    // Putting any logic in here will destroy closure tree shaking!\n    super();\n  }\n\n  create(parentInjector: Injector|null): NgModuleRef<any> {\n    initServicesIfNeeded();\n    // Clone the NgModuleDefinition so that any tree shakeable provider definition\n    // added to this instance of the NgModuleRef doesn't affect the cached copy.\n    // See https://github.com/angular/angular/issues/25018.\n    const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n    return Services.createNgModuleRef(\n        this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n  }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n    for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n};\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n    result.default = mod;\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to get private field on non-instance\");\r\n    }\r\n    return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to set private field on non-instance\");\r\n    }\r\n    privateMap.set(receiver, value);\r\n    return value;\r\n}\r\n","//! moment.js\n//! version : 2.29.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i;\n        for (i = 0; i < arr.length; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        if (m._isValid == null) {\n            var flags = getParsingFlags(m),\n                parsedParts = some.call(flags.parsedDateParts, function (i) {\n                    return i != null;\n                }),\n                isNowValid =\n                    !isNaN(m._d.getTime()) &&\n                    flags.overflow < 0 &&\n                    !flags.empty &&\n                    !flags.invalidEra &&\n                    !flags.invalidMonth &&\n                    !flags.invalidWeekday &&\n                    !flags.weekdayMismatch &&\n                    !flags.nullInput &&\n                    !flags.invalidFormat &&\n                    !flags.userInvalidated &&\n                    (!flags.meridiem || (flags.meridiem && parsedParts));\n\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n\n            if (Object.isFrozen == null || !Object.isFrozen(m)) {\n                m._isValid = isNowValid;\n            } else {\n                return isNowValid;\n            }\n        }\n        return m._isValid;\n    }\n\n    function createInvalid(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i, prop, val;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentProperties.length > 0) {\n            for (i = 0; i < momentProperties.length; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key;\n                for (i = 0; i < arguments.length; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTime(number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function pastFuture(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {};\n\n    function addUnitAlias(unit, shorthand) {\n        var lowerCase = unit.toLowerCase();\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n    }\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {};\n\n    function addUnitPriority(unit, priority) {\n        priorities[unit] = priority;\n    }\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get(mom, unit) {\n        return mom.isValid()\n            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n            : NaN;\n    }\n\n    function set$1(mom, unit, value) {\n        if (mom.isValid() && !isNaN(value)) {\n            if (\n                unit === 'FullYear' &&\n                isLeapYear(mom.year()) &&\n                mom.month() === 1 &&\n                mom.date() === 29\n            ) {\n                value = toInt(value);\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n                    value,\n                    mom.month(),\n                    daysInMonth(value, mom.month())\n                );\n            } else {\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i;\n            for (i = 0; i < prioritized.length; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (\n                    matched,\n                    p1,\n                    p2,\n                    p3,\n                    p4\n                ) {\n                    return p1 || p2 || p3 || p4;\n                })\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        for (i = 0; i < token.length; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // ALIASES\n\n    addUnitAlias('month', 'M');\n\n    // PRIORITY\n\n    addUnitPriority('month', 8);\n\n    // PARSING\n\n    addRegexToken('M', match1to2);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(\n            '_'\n        ),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord;\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        var dayOfMonth;\n\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortPieces.push(this.monthsShort(mom, ''));\n            longPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.monthsShort(mom, ''));\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 12; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n        }\n        for (i = 0; i < 24; i++) {\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // ALIASES\n\n    addUnitAlias('year', 'y');\n\n    // PRIORITIES\n\n    addUnitPriority('year', 1);\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // ALIASES\n\n    addUnitAlias('week', 'w');\n    addUnitAlias('isoWeek', 'W');\n\n    // PRIORITIES\n\n    addUnitPriority('week', 5);\n    addUnitPriority('isoWeek', 5);\n\n    // PARSING\n\n    addRegexToken('w', match1to2);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (\n        input,\n        week,\n        config,\n        token\n    ) {\n        week[token.substr(0, 1)] = toInt(input);\n    });\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // ALIASES\n\n    addUnitAlias('day', 'd');\n    addUnitAlias('weekday', 'e');\n    addUnitAlias('isoWeekday', 'E');\n\n    // PRIORITY\n    addUnitPriority('day', 11);\n    addUnitPriority('weekday', 11);\n    addUnitPriority('isoWeekday', 11);\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord;\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n            ? weekdays[m.day()]\n            : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n            ? this._weekdaysShort[m.day()]\n            : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n            ? this._weekdaysMin[m.day()]\n            : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // ALIASES\n\n    addUnitAlias('hour', 'h');\n\n    // PRIORITY\n    addUnitPriority('hour', 13);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2);\n    addRegexToken('h', match1to2);\n    addRegexToken('k', match1to2);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[name] = null; // null means not found\n            }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                tmpLocale = loadLocale(name);\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                    ? DATE\n                    : a[HOUR] < 0 ||\n                      a[HOUR] > 24 ||\n                      (a[HOUR] === 24 &&\n                          (a[MINUTE] !== 0 ||\n                              a[SECOND] !== 0 ||\n                              a[MILLISECOND] !== 0))\n                    ? HOUR\n                    : a[MINUTE] < 0 || a[MINUTE] > 59\n                    ? MINUTE\n                    : a[SECOND] < 0 || a[SECOND] > 59\n                    ? SECOND\n                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                    ? MILLISECOND\n                    : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n\n            for (i = 0, l = isoDates.length; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimes.length; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYear(createLocal(), 1, 4).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n        for (i = 0; i < tokens.length; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false;\n\n        if (config._f.length === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < config._f.length; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < ordering.length; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add = createAdder(1, 'add'),\n        subtract = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n            ? 'lastWeek'\n            : diff < 0\n            ? 'lastDay'\n            : diff < 1\n            ? 'sameDay'\n            : diff < 2\n            ? 'nextDay'\n            : diff < 7\n            ? 'nextWeek'\n            : 'sameElse';\n    }\n\n    function calendar$1(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod$1(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod$1(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2() {\n        return isValid(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (\n        input,\n        array,\n        config,\n        token\n    ) {\n        var era = config._locale.erasParse(input, token, config._strict);\n        if (era) {\n            getParsingFlags(config).era = era;\n        } else {\n            getParsingFlags(config).invalidEra = input;\n        }\n    });\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? +1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            namePieces.push(regexEscape(eras[i].name));\n            abbrPieces.push(regexEscape(eras[i].abbr));\n            narrowPieces.push(regexEscape(eras[i].narrow));\n\n            mixedPieces.push(regexEscape(eras[i].name));\n            mixedPieces.push(regexEscape(eras[i].abbr));\n            mixedPieces.push(regexEscape(eras[i].narrow));\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    addUnitAlias('weekYear', 'gg');\n    addUnitAlias('isoWeekYear', 'GG');\n\n    // PRIORITY\n\n    addUnitPriority('weekYear', 1);\n    addUnitPriority('isoWeekYear', 1);\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (\n        input,\n        week,\n        config,\n        token\n    ) {\n        week[token.substr(0, 2)] = toInt(input);\n    });\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday(),\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // ALIASES\n\n    addUnitAlias('quarter', 'Q');\n\n    // PRIORITY\n\n    addUnitPriority('quarter', 7);\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // ALIASES\n\n    addUnitAlias('date', 'D');\n\n    // PRIORITY\n    addUnitPriority('date', 9);\n\n    // PARSING\n\n    addRegexToken('D', match1to2);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // ALIASES\n\n    addUnitAlias('dayOfYear', 'DDD');\n\n    // PRIORITY\n    addUnitPriority('dayOfYear', 4);\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // ALIASES\n\n    addUnitAlias('minute', 'm');\n\n    // PRIORITY\n\n    addUnitPriority('minute', 14);\n\n    // PARSING\n\n    addRegexToken('m', match1to2);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // ALIASES\n\n    addUnitAlias('second', 's');\n\n    // PRIORITY\n\n    addUnitPriority('second', 15);\n\n    // PARSING\n\n    addRegexToken('s', match1to2);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // ALIASES\n\n    addUnitAlias('millisecond', 'ms');\n\n    // PRIORITY\n\n    addUnitPriority('millisecond', 16);\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (\n            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\n        ) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    // TODO: Use this.as('ms')?\n    function valueOf$1() {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        return (\n            this._milliseconds +\n            this._days * 864e5 +\n            (this._months % 12) * 2592e6 +\n            toInt(this._months / 12) * 31536e6\n        );\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y');\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = Object.assign({}, thresholds, argThresholds);\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.29.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n","\n\nexport function mod(n: number, x: number): number {\n  return (n % x + x) % x;\n}\n\nexport function absFloor(num: number): number {\n  return num < 0 ? Math.ceil(num) || 0 : Math.floor(num);\n}\n\n","import { absFloor } from '../utils';\n\nexport function isString(str: any): str is string {\n  return typeof str === 'string';\n}\n\nexport function isDate(value: any): value is Date {\n  return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';\n}\n\nexport function isBoolean(value: any): value is boolean {\n  return value === true || value === false;\n}\n\nexport function isDateValid(date: Date): boolean {\n  return date && date.getTime && !isNaN(date.getTime());\n}\n\nexport function isFunction(fn: any): fn is Function {\n  return (\n    fn instanceof Function ||\n    Object.prototype.toString.call(fn) === '[object Function]'\n  );\n}\n\nexport function isNumber(value?: any): value is number {\n  return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';\n}\n\nexport function isArray<T>(input?: any): input is T[] {\n  return (\n    input instanceof Array ||\n    Object.prototype.toString.call(input) === '[object Array]'\n  );\n}\n\nexport function hasOwnProp<T>(a: T /*object*/, b: string): b is Extract<keyof T, string> {\n  return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nexport function isObject<T>(input: any /*object*/): input is T {\n  // IE8 will treat undefined and null as object if it wasn't for\n  // input != null\n  return (\n    input != null && Object.prototype.toString.call(input) === '[object Object]'\n  );\n}\n\nexport function isObjectEmpty(obj: any): boolean {\n  if (Object.getOwnPropertyNames) {\n    return (Object.getOwnPropertyNames(obj).length === 0);\n  }\n  let k;\n  for (k in obj) {\n    if (obj.hasOwnProperty(k)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n\nexport function isUndefined(input: any): boolean {\n  return input === void 0;\n}\n\nexport function toInt<T>(argumentForCoercion: string | number | T): number {\n  const coercedNumber = +argumentForCoercion;\n  let value = 0;\n\n  if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n    value = absFloor(coercedNumber);\n  }\n\n  return value;\n}\n","import { hasOwnProp, isString } from '../utils/type-checks';\nimport { DateObject, UnitOfTime } from '../types';\n\nconst aliases: { [key: string]: string } = {};\n\nexport type ExtendedUnitOfTime = UnitOfTime | 'date' | 'week' | 'isoWeek' | 'dayOfYear' |\n  'weekday' | 'isoWeekday' | 'second' | 'millisecond' | 'minute' | 'hour' | 'quarter' | 'weekYear' | 'isoWeekYear';\n\nconst _mapUnits: { [key: string]: UnitOfTime } = {\n  date: 'day',\n  hour: 'hours',\n  minute: 'minutes',\n  second: 'seconds',\n  millisecond: 'milliseconds'\n};\n\nexport function addUnitAlias(unit: ExtendedUnitOfTime, shorthand: string): void {\n  const lowerCase = unit.toLowerCase();\n  let _unit = unit;\n  if (lowerCase in _mapUnits) {\n    _unit = _mapUnits[lowerCase];\n  }\n  aliases[lowerCase] = aliases[`${lowerCase}s`] = aliases[shorthand] = _unit;\n}\n\nexport function normalizeUnits(units: string | string[]): string {\n  return isString(units) ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nexport function normalizeObjectUnits(inputObject: { [key: string]: number }): DateObject {\n  const normalizedInput: { [key: string]: number } = {};\n  let normalizedProp;\n  let prop;\n\n  for (prop in inputObject) {\n    if (hasOwnProp(inputObject, prop)) {\n      normalizedProp = normalizeUnits(prop);\n      if (normalizedProp) {\n        normalizedInput[normalizedProp] = inputObject[prop];\n      }\n    }\n  }\n\n  return normalizedInput as any;\n}\n","export function zeroFill(num: number,\n                         targetLength: number,\n                         forceSign?: boolean): string {\n  const absNumber = `${Math.abs(num)}`;\n  const zerosToFill = targetLength - absNumber.length;\n  const sign = num >= 0;\n  const _sign = sign ? (forceSign ? '+' : '') : '-';\n  // todo: this is crazy slow\n  const _zeros = Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1);\n\n  return (_sign + _zeros + absNumber);\n}\n","import { Locale } from '../locale/locale.class';\nimport { zeroFill } from '../utils/zero-fill';\nimport { isFunction } from '../utils/type-checks';\nimport { DateFormatterOptions, DateFormatterFn } from '../types';\n\nexport let formatFunctions: {\n  [key: string]: (date: Date, locale: Locale, isUTC?: boolean, offset?: number) => string;\n} = {};\nexport let formatTokenFunctions: { [key: string]: DateFormatterFn } = {};\n\n// tslint:disable-next-line\nexport const formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n// token:    'M'\n// padded:   ['MM', 2]\n// ordinal:  'Mo'\n// callback: function () { this.month() + 1 }\nexport function addFormatToken(token: string,\n                               padded: [string, number, boolean],\n                               ordinal: string,\n                               callback: DateFormatterFn): void {\n\n  if (token) {\n    formatTokenFunctions[token] = callback;\n  }\n\n  if (padded) {\n    formatTokenFunctions[padded[0]] = function (): string {\n      return zeroFill(callback.apply(null, arguments), padded[1], padded[2]);\n    };\n  }\n\n  if (ordinal) {\n    formatTokenFunctions[ordinal] = function (date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.ordinal(callback.apply(null, arguments), token);\n    };\n  }\n}\n\nexport function makeFormatFunction(format: string):\n  (date: Date, locale: Locale, isUTC?: boolean, offset?: number) => string {\n\n  const array: string[] = format.match(formattingTokens);\n  const length = array.length;\n\n  const formatArr: string[] | DateFormatterFn[] = new Array(length);\n\n  for (let i = 0; i < length; i++) {\n    formatArr[i] = formatTokenFunctions[array[i]]\n      ? formatTokenFunctions[array[i]]\n      : removeFormattingTokens(array[i]);\n  }\n\n  return function (date: Date, locale: Locale, isUTC: boolean, offset = 0): string {\n    let output = '';\n    for (let j = 0; j < length; j++) {\n      output += isFunction(formatArr[j])\n        ? (formatArr[j] as DateFormatterFn).call(null, date, {format, locale, isUTC, offset})\n        : formatArr[j];\n    }\n\n    return output;\n  };\n}\n\nfunction removeFormattingTokens(input: string): string {\n  if (input.match(/\\[[\\s\\S]/)) {\n    return input.replace(/^\\[|\\]$/g, '');\n  }\n\n  return input.replace(/\\\\/g, '');\n}\n","export function createUTCDate(y?: number,\n                              m?: number,\n                              d?: number): Date {\n  const date = new Date(Date.UTC.apply(null, arguments));\n\n  // the Date.UTC function remaps years 0-99 to 1900-1999\n  if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n    date.setUTCFullYear(y);\n  }\n\n  return date;\n}\n\nexport function createDate(y?: number,\n                           m = 0,\n                           d = 1,\n                           h = 0,\n                           M = 0,\n                           s = 0,\n                           ms = 0): Date {\n  const date = new Date(y, m, d, h, M, s, ms);\n\n  // the date constructor remaps years 0-99 to 1900-1999\n  if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n    date.setFullYear(y);\n  }\n\n  return date;\n}\n","import { createDate } from '../create/date-from-array';\n\nexport function getHours(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCHours() : date.getHours();\n}\n\nexport function getMinutes(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCMinutes() : date.getMinutes();\n}\n\nexport function getSeconds(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCSeconds() : date.getSeconds();\n}\n\nexport function getMilliseconds(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();\n}\nexport function getTime(date: Date): number {\n  return date.getTime();\n}\n\nexport function getDay(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCDay() : date.getDay();\n}\n\nexport function getDate(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCDate() : date.getDate();\n}\n\nexport function getMonth(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCMonth() : date.getMonth();\n}\n\nexport function getFullYear(date: Date, isUTC = false): number {\n  return isUTC ? date.getUTCFullYear() : date.getFullYear();\n}\n\nexport function getUnixTime(date: Date): number {\n  return Math.floor(date.valueOf() / 1000);\n}\n\nexport function unix(date: Date): number {\n  return Math.floor(date.valueOf() / 1000);\n}\n\nexport function getFirstDayOfMonth(date: Date): Date {\n  return createDate(\n    date.getFullYear(),\n    date.getMonth(),\n    1,\n    date.getHours(),\n    date.getMinutes(),\n    date.getSeconds()\n  );\n}\n\nexport function daysInMonth(date: Date): number {\n  return _daysInMonth(date.getFullYear(), date.getMonth());\n}\n\nexport function _daysInMonth(year: number, month: number): number {\n  return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\nexport function isFirstDayOfWeek(date: Date, firstDayOfWeek: number): boolean {\n  return date.getDay() === firstDayOfWeek;\n}\n\nexport function isSameMonth(date1: Date, date2: Date) {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  return isSameYear(date1, date2) && getMonth(date1) === getMonth(date2);\n}\n\nexport function isSameYear(date1: Date, date2: Date) {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  return getFullYear(date1) === getFullYear(date2);\n}\n\nexport function isSameDay(date1: Date, date2: Date): boolean {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  return (\n    isSameYear(date1, date2) &&\n    isSameMonth(date1, date2) &&\n    getDate(date1) === getDate(date2)\n  );\n}\n","import { hasOwnProp, isFunction } from '../utils/type-checks';\nimport { Locale } from '../locale/locale.class';\n\nexport const match1 = /\\d/;            //       0 - 9\nexport const match2 = /\\d\\d/;          //      00 - 99\nexport const match3 = /\\d{3}/;         //     000 - 999\nexport const match4 = /\\d{4}/;         //    0000 - 9999\nexport const match6 = /[+-]?\\d{6}/;    // -999999 - 999999\nexport const match1to2 = /\\d\\d?/;         //       0 - 99\nexport const match3to4 = /\\d\\d\\d\\d?/;     //     999 - 9999\nexport const match5to6 = /\\d\\d\\d\\d\\d\\d?/; //   99999 - 999999\nexport const match1to3 = /\\d{1,3}/;       //       0 - 999\nexport const match1to4 = /\\d{1,4}/;       //       0 - 9999\nexport const match1to6 = /[+-]?\\d{1,6}/;  // -999999 - 999999\n\nexport const matchUnsigned = /\\d+/;           //       0 - inf\nexport const matchSigned = /[+-]?\\d+/;      //    -inf - inf\n\nexport const matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nexport const matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nexport const matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\n// tslint:disable-next-line\nexport const matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\nexport type RegExpTokenFn = (isStrict: boolean, locale: Locale) => RegExp;\nconst regexes: {[key: string]: RegExpTokenFn} = {};\n\n\nexport function addRegexToken(token: string, regex: RegExp | RegExpTokenFn, strictRegex?: RegExp): void {\n  if (isFunction(regex)) {\n    regexes[token] = regex;\n\n    return;\n  }\n\n  regexes[token] = function (isStrict: boolean, locale: Locale) {\n    return (isStrict && strictRegex) ? strictRegex : regex;\n  };\n}\n\nexport function getParseRegexForToken(token: string, locale: Locale): RegExp {\n  const _strict = false;\n  if (!hasOwnProp(regexes, token)) {\n    return new RegExp(unescapeFormat(token));\n  }\n\n  return regexes[token](_strict, locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(str: string): string {\n  // tslint:disable-next-line\n  return regexEscape(str\n    .replace('\\\\', '')\n    .replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, (matched, p1, p2, p3, p4) => p1 || p2 || p3 || p4)\n  );\n}\n\nexport function regexEscape(str: string): string {\n  return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n","// tslint:disable:max-line-length\nimport { hasOwnProp, isArray, isFunction, isNumber, isString, toInt } from '../utils/type-checks';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { DateArray, DateParseTokenFn } from '../types';\n\nconst tokens: {[key: string]: DateParseTokenFn} = {};\n\nexport function addParseToken(token: string | string[], callback: DateParseTokenFn | number) {\n  const _token = isString(token) ? [token] : token;\n  let func = callback;\n\n  if (isNumber(callback)) {\n    func = function (input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n      array[callback] = toInt(input);\n\n      return config;\n    };\n  }\n\n  if (isArray<string>(_token) && isFunction(func)) {\n    let i;\n    for (i = 0; i < _token.length; i++) {\n      tokens[_token[i]] = func;\n    }\n  }\n}\n\nexport function addWeekParseToken(token: string[], callback: DateParseTokenFn): void {\n  addParseToken(token, function (input: string, array: DateArray, config: DateParsingConfig, _token: string): DateParsingConfig {\n    config._w = config._w || {};\n\n    return callback(input, config._w, config, _token);\n  });\n}\n\n\nexport function addTimeToArrayFromToken(token: string, input: string, config: DateParsingConfig): DateParsingConfig {\n  if (input != null && hasOwnProp(tokens, token)) {\n    tokens[token](input, config._a, config, token);\n  }\n\n  return config;\n}\n","import { DateParsingConfig, DateParsingFlags } from './parsing.types';\n\nfunction defaultParsingFlags(): DateParsingFlags {\n  // We need to deep clone this object.\n  return {\n    empty: false,\n    unusedTokens: [],\n    unusedInput: [],\n    overflow: -2,\n    charsLeftOver: 0,\n    nullInput: false,\n    invalidMonth: null,\n    invalidFormat: false,\n    userInvalidated: false,\n    iso: false,\n    parsedDateParts: [],\n    meridiem: null,\n    rfc2822: false,\n    weekdayMismatch: false\n  };\n}\n\nexport function getParsingFlags(config: DateParsingConfig): DateParsingFlags {\n  if (config._pf == null) {\n    config._pf = defaultParsingFlags();\n  }\n\n  return config._pf;\n}\n","import { addFormatToken } from '../format/format';\nimport { getFullYear } from '../utils/date-getters';\nimport { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { YEAR } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\nimport { DateFormatterOptions } from '../types';\n\n// FORMATTING\n\nfunction getYear(date: Date, opts: DateFormatterOptions): string {\n  return getFullYear(date, opts.isUTC).toString();\n}\n\nexport function initYear() {\n  addFormatToken('Y', null, null,\n    function (date: Date, opts: DateFormatterOptions): string {\n    const y = getFullYear(date, opts.isUTC);\n\n    return y <= 9999 ? y.toString(10) : `+${y}`;\n  });\n\n  addFormatToken(null, ['YY', 2, false], null,\n    function (date: Date, opts: DateFormatterOptions): string {\n    return (getFullYear(date, opts.isUTC) % 100).toString(10);\n  });\n\n  addFormatToken(null, ['YYYY', 4, false], null, getYear);\n  addFormatToken(null, ['YYYYY', 5, false], null, getYear);\n  addFormatToken(null, ['YYYYYY', 6, true], null, getYear);\n\n  // ALIASES\n\n  addUnitAlias('year', 'y');\n\n  // PRIORITIES\n\n  addUnitPriority('year', 1);\n\n  // PARSING\n\n  addRegexToken('Y', matchSigned);\n  addRegexToken('YY', match1to2, match2);\n  addRegexToken('YYYY', match1to4, match4);\n  addRegexToken('YYYYY', match1to6, match6);\n  addRegexToken('YYYYYY', match1to6, match6);\n\n  addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n  addParseToken('YYYY', function (input, array, config) {\n    array[YEAR] = input.length === 2 ? parseTwoDigitYear(input) : toInt(input);\n\n    return config;\n  });\n  addParseToken('YY', function (input, array, config) {\n    array[YEAR] = parseTwoDigitYear(input);\n\n    return config;\n  });\n  addParseToken('Y', function (input, array, config) {\n    array[YEAR] = parseInt(input, 10);\n\n    return config;\n  });\n}\n\nexport function parseTwoDigitYear(input: string): number {\n  return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n}\n\nexport function daysInYear(year: number): number {\n  return isLeapYear(year) ? 366 : 365;\n}\n\nexport function isLeapYear(year: number): boolean {\n  return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n","import { addFormatToken } from '../format/format';\nimport { isLeapYear } from './year';\nimport { mod } from '../utils';\nimport { getMonth } from '../utils/date-getters';\nimport { addRegexToken, match1to2, match2 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { MONTH } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\nimport { getParsingFlags } from '../create/parsing-flags';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { DateArray, DateFormatterOptions } from '../types';\n\n// todo: this is duplicate, source in date-getters.ts\nexport function daysInMonth(year: number, month: number): number {\n  if (isNaN(year) || isNaN(month)) {\n    return NaN;\n  }\n  const modMonth = mod(month, 12);\n  const _year = year + (month - modMonth) / 12;\n\n  return modMonth === 1\n    ? isLeapYear(_year) ? 29 : 28\n    : (31 - modMonth % 7 % 2);\n}\n\nexport function initMonth() {\n// FORMATTING\n\n  addFormatToken('M', ['MM', 2, false], 'Mo',\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMonth(date, opts.isUTC) + 1).toString(10);\n    }\n  );\n\n  addFormatToken('MMM', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.monthsShort(date, opts.format, opts.isUTC);\n    }\n  );\n\n  addFormatToken('MMMM', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.months(date, opts.format, opts.isUTC);\n    }\n  );\n\n\n// ALIASES\n\n  addUnitAlias('month', 'M');\n\n// PRIORITY\n\n  addUnitPriority('month', 8);\n\n// PARSING\n\n  addRegexToken('M', match1to2);\n  addRegexToken('MM', match1to2, match2);\n  addRegexToken('MMM', function(isStrict, locale) {\n    return locale.monthsShortRegex(isStrict);\n  });\n  addRegexToken('MMMM', function(isStrict, locale) {\n    return locale.monthsRegex(isStrict);\n  });\n\n  addParseToken(['M', 'MM'], function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    array[MONTH] = toInt(input) - 1;\n\n    return config;\n  });\n\n  addParseToken(\n    ['MMM', 'MMMM'],\n    function(input: string, array: DateArray, config: DateParsingConfig, token: string): DateParsingConfig {\n      const month = config._locale.monthsParse(input, token, config._strict);\n      // if we didn't find a month name, mark the date as invalid.\n      if (month != null) {\n        array[MONTH] = month;\n      } else {\n        getParsingFlags(config).invalidMonth = !!input;\n      }\n\n      return config;\n    }\n  );\n}\n","import { TimeUnit } from '../types';\nimport { daysInMonth } from '../units/month';\nimport { isNumber } from './type-checks';\nimport { getDate, getFullYear, getMonth } from './date-getters';\nimport { isLeapYear } from '../units/year';\nimport { createDate } from '../create/date-from-array';\n\nconst defaultTimeUnit: TimeUnit = {\n  year: 0,\n  month: 0,\n  day: 0,\n  hour: 0,\n  minute: 0,\n  seconds: 0\n};\n\nexport function shiftDate(date: Date, unit: TimeUnit): Date {\n  const _unit = Object.assign({}, defaultTimeUnit, unit);\n  const year = date.getFullYear() + (_unit.year || 0);\n  const month = date.getMonth() + (_unit.month || 0);\n  let day = date.getDate() + (_unit.day || 0);\n  if (_unit.month && !_unit.day) {\n    day = Math.min(day, daysInMonth(year, month));\n  }\n\n  return createDate(\n    year,\n    month,\n    day,\n    date.getHours() + (_unit.hour || 0),\n    date.getMinutes() + (_unit.minute || 0),\n    date.getSeconds() + (_unit.seconds || 0)\n  );\n}\n\nexport function setFullDate(date: Date, unit: TimeUnit): Date {\n  return createDate(\n    getNum(date.getFullYear(), unit.year),\n    getNum(date.getMonth(), unit.month),\n    getNum(date.getDate(), unit.day),\n    getNum(date.getHours(), unit.hour),\n    getNum(date.getMinutes(), unit.minute),\n    getNum(date.getSeconds(), unit.seconds),\n    getNum(date.getMilliseconds(), unit.milliseconds)\n  );\n}\n\nfunction getNum(def: number, num?: number): number {\n  return isNumber(num) ? num : def;\n}\n\nexport function setFullYear(date: Date, value: number, isUTC?: boolean): Date {\n  const _month = getMonth(date, isUTC);\n  const _date = getDate(date, isUTC);\n  const _year = getFullYear(date, isUTC);\n  if (isLeapYear(_year) && _month === 1 && _date === 29) {\n    const _daysInMonth = daysInMonth(value, _month);\n    isUTC ? date.setUTCFullYear(value, _month, _daysInMonth) : date.setFullYear(value, _month, _daysInMonth);\n  }\n\n  isUTC ? date.setUTCFullYear(value) : date.setFullYear(value);\n\n  return date;\n}\n\nexport function setMonth(date: Date, value: number, isUTC?: boolean): Date {\n  const dayOfMonth = Math.min(getDate(date), daysInMonth(getFullYear(date), value));\n  isUTC ? date.setUTCMonth(value, dayOfMonth) : date.setMonth(value, dayOfMonth);\n\n  return date;\n}\n\nexport function setDay(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCDate(value) : date.setDate(value);\n\n  return date;\n}\n\nexport function setHours(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCHours(value) : date.setHours(value);\n\n  return date;\n}\n\nexport function setMinutes(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCMinutes(value) : date.setMinutes(value);\n\n  return date;\n}\n\nexport function setSeconds(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCSeconds(value) : date.setSeconds(value);\n\n  return date;\n}\n\nexport function setMilliseconds(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);\n\n  return date;\n}\n\nexport function setDate(date: Date, value: number, isUTC?: boolean): Date {\n  isUTC ? date.setUTCDate(value) : date.setDate(value);\n\n  return date;\n}\n\nexport function setTime(date: Date, value: number): Date {\n  date.setTime(value);\n\n  return date;\n}\n","// fastest way to clone date\n// https://jsperf.com/clone-date-object2\nexport function cloneDate(date: Date): Date {\n  return new Date(date.getTime());\n}\n","// tslint:disable: switch-default\nimport { TimeUnit, UnitOfTime } from '../types';\nimport {\n  setDate, setFullDate, setHours, setMilliseconds, setMinutes, setMonth, setSeconds,\n  shiftDate\n} from './date-setters';\nimport { cloneDate } from '../create/clone';\nimport { setISODayOfWeek, setLocaleDayOfWeek } from '../units/day-of-week';\nimport { getMonth } from './date-getters';\nimport { add, subtract } from '../moment/add-subtract';\n\nexport function startOf(date: Date, unit: UnitOfTime, isUTC?: boolean): Date {\n  const _date = cloneDate(date);\n  // the following switch intentionally omits break keywords\n  // to utilize falling through the cases.\n  switch (unit) {\n    case 'year':\n      setMonth(_date, 0, isUTC);\n    /* falls through */\n    case 'quarter':\n    case 'month':\n      setDate(_date, 1, isUTC);\n    /* falls through */\n    case 'week':\n    case 'isoWeek':\n    case 'day':\n    case 'date':\n      setHours(_date, 0, isUTC);\n    /* falls through */\n    case 'hours':\n      setMinutes(_date, 0, isUTC);\n    /* falls through */\n    case 'minutes':\n      setSeconds(_date, 0, isUTC);\n    /* falls through */\n    case 'seconds':\n      setMilliseconds(_date, 0, isUTC);\n  }\n\n  // weeks are a special case\n  if (unit === 'week') {\n    setLocaleDayOfWeek(_date, 0, {isUTC});\n  }\n  if (unit === 'isoWeek') {\n    setISODayOfWeek(_date, 1);\n  }\n\n  // quarters are also special\n  if (unit === 'quarter') {\n    setMonth(_date, Math.floor(getMonth(_date, isUTC) / 3) * 3, isUTC);\n  }\n\n  return _date;\n}\n\nexport function endOf(date: Date, unit: UnitOfTime, isUTC?: boolean): Date {\n  let _unit = unit;\n  // 'date' is an alias for 'day', so it should be considered as such.\n  if (_unit === 'date') {\n    _unit = 'day';\n  }\n\n  const start = startOf(date, _unit, isUTC);\n  const _step = add(start, 1, _unit === 'isoWeek' ? 'week' : _unit, isUTC);\n  const res = subtract(_step, 1, 'milliseconds', isUTC);\n\n  return res;\n}\n","import { addFormatToken } from '../format/format';\nimport { Locale } from '../locale/locale.class';\nimport { getDay } from '../utils/date-getters';\nimport { addRegexToken, match1to2 } from '../parse/regex';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { addWeekParseToken } from '../parse/token';\nimport { getParsingFlags } from '../create/parsing-flags';\nimport { isNumber, isString, toInt } from '../utils/type-checks';\nimport { DateFormatterOptions, WeekParsing } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { add } from '../moment/add-subtract';\nimport { getLocale } from '../locale/locales';\n\n\nexport function initDayOfWeek() {\n// FORMATTING\n\n  addFormatToken('d', null, 'do',\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getDay(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n  addFormatToken('dd', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.weekdaysMin(date, opts.format, opts.isUTC);\n    }\n  );\n\n  addFormatToken('ddd', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.weekdaysShort(date, opts.format, opts.isUTC);\n    }\n  );\n\n  addFormatToken('dddd', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.locale.weekdays(date, opts.format, opts.isUTC);\n    }\n  );\n\n  addFormatToken('e', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getLocaleDayOfWeek(date, opts.locale, opts.isUTC)\n        .toString(10);\n      // return getDay(date, opts.isUTC).toString(10);\n    }\n  );\n  addFormatToken('E', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getISODayOfWeek(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('day', 'd');\n  addUnitAlias('weekday', 'e');\n  addUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\n  addUnitPriority('day', 11);\n  addUnitPriority('weekday', 11);\n  addUnitPriority('isoWeekday', 11);\n\n// PARSING\n\n  addRegexToken('d', match1to2);\n  addRegexToken('e', match1to2);\n  addRegexToken('E', match1to2);\n\n  addRegexToken('dd', function(isStrict: boolean, locale: Locale): RegExp {\n    return locale.weekdaysMinRegex(isStrict);\n  });\n\n  addRegexToken('ddd', function(isStrict: boolean, locale: Locale): RegExp {\n    return locale.weekdaysShortRegex(isStrict);\n  });\n  addRegexToken('dddd', function(isStrict: boolean, locale: Locale): RegExp {\n    return locale.weekdaysRegex(isStrict);\n  });\n\n  addWeekParseToken(\n    ['dd', 'ddd', 'dddd'],\n    function(input: string, week: WeekParsing, config: DateParsingConfig, token) {\n      const weekday = config._locale.weekdaysParse(input, token, config._strict);\n      // if we didn't get a weekday name, mark the date as invalid\n      if (weekday != null) {\n        week.d = weekday;\n      } else {\n        getParsingFlags(config).invalidWeekday = !!input;\n      }\n\n      return config;\n    }\n  );\n\n  addWeekParseToken(\n    ['d', 'e', 'E'],\n    function(input: string, week: WeekParsing, config: DateParsingConfig, token: string): DateParsingConfig {\n      week[token] = toInt(input);\n\n      return config;\n    }\n  );\n}\n\n// HELPERS\n\nexport function parseWeekday(input: string | number, locale: Locale): number {\n  if (!isString(input)) {\n    return input;\n  }\n\n  const _num = parseInt(input, 10);\n  if (!isNaN(_num)) {\n    return _num;\n  }\n\n  const _weekDay = locale.weekdaysParse(input);\n  if (isNumber(_weekDay)) {\n    return _weekDay;\n  }\n\n  return null;\n}\n\nexport function parseIsoWeekday(input: string | number, locale: Locale = getLocale()): number {\n  if (isString(input)) {\n    return locale.weekdaysParse(input) % 7 || 7;\n  }\n\n  return isNumber(input) && isNaN(input) ? null : input;\n}\n\n// MOMENTS\n\nexport function getSetDayOfWeek(date: Date, input: number, opts: { isUTC?: boolean; locale: Locale }): Date | number {\n  if (!input) {\n    return getDayOfWeek(date, opts.isUTC);\n  }\n\n  return setDayOfWeek(date, input, opts.locale, opts.isUTC);\n}\n\nexport function setDayOfWeek(date: Date, input: number, locale = getLocale(), isUTC?: boolean): Date {\n  const day = getDay(date, isUTC);\n  const _input = parseWeekday(input, locale);\n\n  return add(date, _input - day, 'day');\n}\n\nexport function getDayOfWeek(date: Date, isUTC?: boolean): number {\n  return getDay(date, isUTC);\n}\n\n/********************************************/\n\n// todo: utc\n// getSetLocaleDayOfWeek\nexport function getLocaleDayOfWeek(date: Date, locale = getLocale(), isUTC?: boolean): number {\n  return (getDay(date, isUTC) + 7 - locale.firstDayOfWeek()) % 7;\n}\n\nexport function setLocaleDayOfWeek(date: Date, input: number, opts: { locale?: Locale; isUTC?: boolean } = {}): Date {\n  const weekday = getLocaleDayOfWeek(date, opts.locale, opts.isUTC);\n\n  return add(date, input - weekday, 'day');\n}\n\n\n// getSetISODayOfWeek\nexport function getISODayOfWeek(date: Date, isUTC?: boolean): number {\n  return getDay(date, isUTC) || 7;\n}\n\nexport function setISODayOfWeek(date: Date, input: number | string, opts: { locale?: Locale } = {}): Date {\n  // behaves the same as moment#day except\n  // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n  // as a setter, sunday should belong to the previous week.\n\n  const weekday = parseIsoWeekday(input, opts.locale);\n\n  return setDayOfWeek(date, getDayOfWeek(date) % 7 ? weekday : weekday - 7);\n}\n","import { addFormatToken } from '../format/format';\nimport { startOf } from '../utils/start-end-of';\nimport { addRegexToken, match1to3, match3 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\nimport { DateArray, DateFormatterOptions } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { toInt } from '../utils/type-checks';\nimport { add } from '../moment/add-subtract';\n\n\nexport function initDayOfYear() {\n// FORMATTING\n\n  addFormatToken('DDD', ['DDDD', 3, false], 'DDDo',\n    function(date: Date): string {\n      return getDayOfYear(date)\n        .toString(10);\n    }\n  );\n\n\n// ALIASES\n\n  addUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\n\n  addUnitPriority('dayOfYear', 4);\n\n  addRegexToken('DDD', match1to3);\n  addRegexToken('DDDD', match3);\n  addParseToken(\n    ['DDD', 'DDDD'],\n    function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n      config._dayOfYear = toInt(input);\n\n      return config;\n    }\n  );\n}\n\nexport function getDayOfYear(date: Date, isUTC?: boolean): number {\n  const date1 = +startOf(date, 'day', isUTC);\n  const date2 = +startOf(date, 'year', isUTC);\n  const someDate = date1 - date2;\n  const oneDay = 1000 * 60 * 60 * 24;\n\n  return Math.round(someDate / oneDay) + 1;\n}\n\nexport function setDayOfYear(date: Date, input: number): Date {\n  const dayOfYear = getDayOfYear(date);\n\n  return add(date, (input - dayOfYear), 'day');\n}\n","/**\n *\n * @param {number} year\n * @param {number} dow - start-of-first-week\n * @param {number} doy - start-of-year\n * @returns {number}\n */\nimport { createUTCDate } from '../create/date-from-array';\nimport { daysInYear } from './year';\nimport { getDayOfYear } from './day-of-year';\nimport { getFullYear } from '../utils/date-getters';\n\nfunction firstWeekOffset(year: number, dow: number, doy: number): number {\n  // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n  const fwd = dow - doy + 7;\n  // first-week day local weekday -- which local weekday is fwd\n  const fwdlw = (createUTCDate(year, 0, fwd).getUTCDay() - dow + 7) % 7;\n\n  return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nexport function dayOfYearFromWeeks(\n  year: number,\n  week: number,\n  weekday: number,\n  dow: number,\n  doy: number\n): { year: number; dayOfYear: number } {\n  const localWeekday = (7 + weekday - dow) % 7;\n  const weekOffset = firstWeekOffset(year, dow, doy);\n  const dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset;\n  let resYear: number;\n  let resDayOfYear: number;\n\n  if (dayOfYear <= 0) {\n    resYear = year - 1;\n    resDayOfYear = daysInYear(resYear) + dayOfYear;\n  } else if (dayOfYear > daysInYear(year)) {\n    resYear = year + 1;\n    resDayOfYear = dayOfYear - daysInYear(year);\n  } else {\n    resYear = year;\n    resDayOfYear = dayOfYear;\n  }\n\n  return {\n    year: resYear,\n    dayOfYear: resDayOfYear\n  };\n}\n\nexport function weekOfYear(date: Date, dow: number, doy: number, isUTC?: boolean): { week: number; year: number } {\n  const weekOffset = firstWeekOffset(getFullYear(date, isUTC), dow, doy);\n  const week = Math.floor((getDayOfYear(date, isUTC) - weekOffset - 1) / 7) + 1;\n  let resWeek: number;\n  let resYear: number;\n\n  if (week < 1) {\n    resYear = getFullYear(date, isUTC) - 1;\n    resWeek = week + weeksInYear(resYear, dow, doy);\n  } else if (week > weeksInYear(getFullYear(date, isUTC), dow, doy)) {\n    resWeek = week - weeksInYear(getFullYear(date, isUTC), dow, doy);\n    resYear = getFullYear(date, isUTC) + 1;\n  } else {\n    resYear = getFullYear(date, isUTC);\n    resWeek = week;\n  }\n\n  return {\n    week: resWeek,\n    year: resYear\n  };\n}\n\nexport function weeksInYear(year: number, dow: number, doy: number): number {\n  const weekOffset = firstWeekOffset(year, dow, doy);\n  const weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n\n  return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n","// tslint:disable:max-file-line-count max-line-length cyclomatic-complexity\n\nimport { weekOfYear } from '../units/week-calendar-utils';\nimport { hasOwnProp, isArray, isFunction } from '../utils/type-checks';\nimport { getDay, getMonth } from '../utils/date-getters';\nimport { matchWord, regexEscape } from '../parse/regex';\nimport { setDayOfWeek } from '../units/day-of-week';\n\nexport interface LocaleOptionsFormat {\n  format: string[];\n  standalone: string[];\n  isFormat?: RegExp;\n}\n\nexport type LocaleOptions = string[] | LocaleOptionsFormat;\n\nconst MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nexport const defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n  '_'\n);\nexport const defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(\n  '_'\n);\nexport const defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n  '_'\n);\nexport const defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split(\n  '_'\n);\nexport const defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nexport const defaultLongDateFormat: { [index: string]: string } = {\n  LTS: 'h:mm:ss A',\n  LT: 'h:mm A',\n  L: 'MM/DD/YYYY',\n  LL: 'MMMM D, YYYY',\n  LLL: 'MMMM D, YYYY h:mm A',\n  LLLL: 'dddd, MMMM D, YYYY h:mm A'\n};\n\nexport const defaultOrdinal = '%d';\nexport const defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nconst defaultMonthsShortRegex = matchWord;\nconst defaultMonthsRegex = matchWord;\n\nexport type OrdinalDateFn = (num: number, token?: string) => string;\nexport type PluralizeDateFn = (num: number, withoutSuffix: boolean,\n                               key?: string, isFuture?: boolean) => string;\n\nexport interface LocaleData {\n  abbr?: string;\n  parentLocale?: string;\n\n  months?: LocaleOptions | ((date: Date, format: string, isUTC?: boolean) => string | string[]);\n  monthsShort?: LocaleOptions | ((date: Date, format: string, isUTC?: boolean) => string | string[]);\n  monthsParseExact?: boolean;\n\n  weekdays?: LocaleOptions | ((date: Date, format: string, isUTC?: boolean) => string | string[]);\n  weekdaysShort?: string[] | ((date: Date, format: string, isUTC?: boolean) => string | string[]);\n  weekdaysMin?: string[] | ((date: Date, format: string, isUTC?: boolean) => string | string[]);\n  weekdaysParseExact?: boolean;\n\n  longDateFormat?: { [index: string]: string };\n  calendar?: {\n    [key: string]: (string\n      | ((date: Date, now?: Date) => string)\n      // tslint:disable-next-line\n      | ((dayOfWeek: number, isNextWeek: boolean) => string))\n  };\n  relativeTime?: { [key: string]: string | PluralizeDateFn };\n  dayOfMonthOrdinalParse?: RegExp;\n  ordinal?: string | OrdinalDateFn;\n\n  week?: { dow?: number; doy?: number };\n\n  invalidDate?: string;\n\n  monthsRegex?: RegExp;\n  monthsParse?: RegExp[];\n  monthsShortRegex?: RegExp;\n  monthsStrictRegex?: RegExp;\n  monthsShortStrictRegex?: RegExp;\n  longMonthsParse?: RegExp[];\n  shortMonthsParse?: RegExp[];\n\n  meridiemParse?: RegExp;\n\n  meridiemHour?(hour: number, meridiem: string): number;\n\n  preparse?(str: string): string;\n\n  postformat?(str: string | number): string;\n\n  meridiem?(hour: number, minute?: number, isLower?: boolean): string;\n\n  isPM?(input: string): boolean;\n}\n\nexport class Locale {\n  parentLocale?: Locale;\n  _abbr: string;\n  _config: LocaleData;\n  meridiemHour: (hour: number, meridiem: string) => number;\n\n  _invalidDate: string;\n  _week: { dow: number; doy: number };\n  _dayOfMonthOrdinalParse: RegExp;\n  _ordinalParse: RegExp;\n  _meridiemParse: RegExp;\n\n  private _calendar: { [key: string]: string };\n  private _relativeTime: { future: string; past: string };\n  private _months: LocaleOptions;\n  private _monthsShort: LocaleOptions;\n  private _monthsRegex: RegExp;\n  private _monthsShortRegex: RegExp;\n  private _monthsStrictRegex: RegExp;\n  private _monthsShortStrictRegex: RegExp;\n  private _monthsParse: RegExp[];\n  private _longMonthsParse: string[] | RegExp[];\n  private _shortMonthsParse: string[] | RegExp[];\n  private _monthsParseExact: RegExp;\n  private _weekdaysParseExact: boolean;\n  private _weekdaysRegex: RegExp;\n  private _weekdaysShortRegex: RegExp;\n  private _weekdaysMinRegex: RegExp;\n\n  private _weekdaysStrictRegex: RegExp;\n  private _weekdaysShortStrictRegex: RegExp;\n  private _weekdaysMinStrictRegex: RegExp;\n\n  private _weekdays: LocaleOptions;\n  private _weekdaysShort: string[];\n  private _weekdaysMin: string[];\n  private _weekdaysParse: string[] | RegExp[];\n  private _minWeekdaysParse: string[] | RegExp[];\n  private _shortWeekdaysParse: string[] | RegExp[];\n  private _fullWeekdaysParse: RegExp[];\n  private _longDateFormat: { [key: string]: string };\n\n  private _ordinal: string;\n\n  constructor(config: LocaleData) {\n    if (!!config) {\n      this.set(config);\n    }\n  }\n\n  set(config: LocaleData): void {\n    let confKey;\n    for (confKey in config) {\n      if (!config.hasOwnProperty(confKey)) {\n        continue;\n      }\n      const prop = config[confKey as keyof LocaleData];\n      const key = (isFunction(prop) ? confKey : `_${confKey}`) as keyof Locale;\n\n      this[key] = prop as any;\n    }\n\n    this._config = config;\n  }\n\n  calendar(key: string, date: Date, now: Date): string {\n    const output = this._calendar[key] || this._calendar.sameElse;\n\n    return isFunction(output) ? output.call(null, date, now) : output;\n  }\n\n  longDateFormat(key: string) {\n    const format = this._longDateFormat[key];\n    const formatUpper = this._longDateFormat[key.toUpperCase()];\n\n    if (format || !formatUpper) {\n      return format;\n    }\n\n    this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val: string) {\n      return val.slice(1);\n    });\n\n    return this._longDateFormat[key];\n  }\n\n  get invalidDate(): string {\n    return this._invalidDate;\n  }\n\n  set invalidDate(val: string) {\n    this._invalidDate = val;\n  }\n\n  ordinal(num: number, token?: string): string {\n    return this._ordinal.replace('%d', num.toString(10));\n  }\n\n  preparse(str: string) {\n    return str;\n  }\n\n  postformat(str: string) {\n    return str;\n  }\n\n  relativeTime(num: number, withoutSuffix: boolean, str: 'future' | 'past', isFuture: boolean): string {\n    const output = this._relativeTime[str];\n\n    return (isFunction(output)) ?\n      output(num, withoutSuffix, str, isFuture) :\n      output.replace(/%d/i, num.toString(10));\n  }\n\n  pastFuture(diff: number, output: string): string {\n    const format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n\n    return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n  }\n\n  /** Months */\n  months(): string[];\n  months(date: Date, format?: string, isUTC?: boolean): string;\n  months(date?: Date, format?: string, isUTC = false): string | string[] {\n    if (!date) {\n      return isArray<string>(this._months)\n        ? this._months\n        : this._months.standalone;\n    }\n\n    if (isArray<string>(this._months)) {\n      return this._months[getMonth(date, isUTC)];\n    }\n\n    const key = (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n      ? 'format'\n      : 'standalone';\n\n    return this._months[key][getMonth(date, isUTC)];\n  }\n\n  monthsShort(): string[];\n  monthsShort(date?: Date, format?: string, isUTC?: boolean): string;\n  monthsShort(date?: Date, format?: string, isUTC = false): string | string[] {\n    if (!date) {\n      return isArray<string>(this._monthsShort)\n        ? this._monthsShort\n        : this._monthsShort.standalone;\n    }\n\n    if (isArray<string>(this._monthsShort)) {\n      return this._monthsShort[getMonth(date, isUTC)];\n    }\n    const key = MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone';\n\n    return this._monthsShort[key][getMonth(date, isUTC)];\n  }\n\n  monthsParse(monthName: string, format?: string, strict?: boolean): number {\n    let date;\n    let regex;\n\n    if (this._monthsParseExact) {\n      return this.handleMonthStrictParse(monthName, format, strict);\n    }\n\n    if (!this._monthsParse) {\n      this._monthsParse = [];\n      this._longMonthsParse = [];\n      this._shortMonthsParse = [];\n    }\n\n    // TODO: add sorting\n    // Sorting makes sure if one month (or abbr) is a prefix of another\n    // see sorting in computeMonthsParse\n    let i;\n    for (i = 0; i < 12; i++) {\n      // make the regex if we don't have it already\n      date = new Date(Date.UTC(2000, i));\n      if (strict && !this._longMonthsParse[i]) {\n        const _months = this.months(date, '', true).replace('.', '');\n        const _shortMonths = this.monthsShort(date, '', true).replace('.', '');\n        this._longMonthsParse[i] = new RegExp(`^${_months}$`, 'i');\n        this._shortMonthsParse[i] = new RegExp(`^${_shortMonths}$`, 'i');\n      }\n      if (!strict && !this._monthsParse[i]) {\n        regex = `^${this.months(date, '', true)}|^${this.monthsShort(date, '', true)}`;\n        this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n      }\n      // test the regex\n      if (strict && format === 'MMMM' && (this._longMonthsParse[i] as RegExp).test(monthName)) {\n        return i;\n      }\n\n      if (strict && format === 'MMM' && (this._shortMonthsParse[i] as RegExp).test(monthName)) {\n        return i;\n      }\n\n      if (!strict && this._monthsParse[i].test(monthName)) {\n        return i;\n      }\n    }\n  }\n\n  monthsRegex(isStrict: boolean): RegExp {\n    if (this._monthsParseExact) {\n      if (!hasOwnProp(this, '_monthsRegex')) {\n        this.computeMonthsParse();\n      }\n      if (isStrict) {\n        return this._monthsStrictRegex;\n      }\n\n      return this._monthsRegex;\n    }\n\n    if (!hasOwnProp(this, '_monthsRegex')) {\n      this._monthsRegex = defaultMonthsRegex;\n    }\n\n    return this._monthsStrictRegex && isStrict ?\n      this._monthsStrictRegex : this._monthsRegex;\n  }\n\n  monthsShortRegex(isStrict: boolean): RegExp {\n    if (this._monthsParseExact) {\n      if (!hasOwnProp(this, '_monthsRegex')) {\n        this.computeMonthsParse();\n      }\n      if (isStrict) {\n        return this._monthsShortStrictRegex;\n      }\n\n      return this._monthsShortRegex;\n    }\n    if (!hasOwnProp(this, '_monthsShortRegex')) {\n      this._monthsShortRegex = defaultMonthsShortRegex;\n    }\n\n    return this._monthsShortStrictRegex && isStrict ?\n      this._monthsShortStrictRegex : this._monthsShortRegex;\n  }\n\n  /** Week */\n  week(date: Date, isUTC?: boolean): number {\n    return weekOfYear(date, this._week.dow, this._week.doy, isUTC).week;\n  }\n\n  firstDayOfWeek(): number {\n    return this._week.dow;\n  }\n\n  firstDayOfYear(): number {\n    return this._week.doy;\n  }\n\n  /** Day of Week */\n  weekdays(): string[];\n  weekdays(date: Date, format?: string, isUTC?: boolean): string;\n  weekdays(date?: Date, format?: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return isArray<string>(this._weekdays)\n        ? this._weekdays\n        : this._weekdays.standalone;\n    }\n\n    if (isArray<string>(this._weekdays)) {\n      return this._weekdays[getDay(date, isUTC)];\n    }\n\n    const _key = this._weekdays.isFormat.test(format)\n      ? 'format'\n      : 'standalone';\n\n    return this._weekdays[_key][getDay(date, isUTC)];\n  }\n\n  weekdaysMin(): string[];\n  weekdaysMin(date: Date, format?: string, isUTC?: boolean): string;\n  weekdaysMin(date?: Date, format?: string, isUTC?: boolean): string | string[] {\n    return date ? this._weekdaysMin[getDay(date, isUTC)] : this._weekdaysMin;\n  }\n\n  weekdaysShort(): string[];\n  weekdaysShort(date: Date, format?: string, isUTC?: boolean): string;\n  weekdaysShort(date?: Date, format?: string, isUTC?: boolean): string | string[] {\n    return date ? this._weekdaysShort[getDay(date, isUTC)] : this._weekdaysShort;\n  }\n\n\n  // proto.weekdaysParse  =        localeWeekdaysParse;\n  weekdaysParse(weekdayName?: string, format?: string, strict?: boolean): number {\n    let i;\n    let regex;\n\n    if (this._weekdaysParseExact) {\n      return this.handleWeekStrictParse(weekdayName, format, strict);\n    }\n\n    if (!this._weekdaysParse) {\n      this._weekdaysParse = [];\n      this._minWeekdaysParse = [];\n      this._shortWeekdaysParse = [];\n      this._fullWeekdaysParse = [];\n    }\n\n    for (i = 0; i < 7; i++) {\n      // make the regex if we don't have it already\n      // fix: here is the issue\n      const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);\n      if (strict && !this._fullWeekdaysParse[i]) {\n        this._fullWeekdaysParse[i] = new RegExp(`^${this.weekdays(date, '', true).replace('.', '\\.?')}$`, 'i');\n        this._shortWeekdaysParse[i] = new RegExp(`^${this.weekdaysShort(date, '', true).replace('.', '\\.?')}$`, 'i');\n        this._minWeekdaysParse[i] = new RegExp(`^${this.weekdaysMin(date, '', true).replace('.', '\\.?')}$`, 'i');\n      }\n      if (!this._weekdaysParse[i]) {\n        regex = `^${this.weekdays(date, '', true)}|^${this.weekdaysShort(date, '', true)}|^${this.weekdaysMin(date, '', true)}`;\n        this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n      }\n\n      if (!isArray<RegExp>(this._fullWeekdaysParse)\n        || !isArray<RegExp>(this._shortWeekdaysParse)\n        || !isArray<RegExp>(this._minWeekdaysParse)\n        || !isArray<RegExp>(this._weekdaysParse)) {\n        return;\n      }\n\n      // test the regex\n      if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n        return i;\n      } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n        return i;\n      }\n    }\n  }\n\n  // proto.weekdaysRegex       =        weekdaysRegex;\n  weekdaysRegex(isStrict: boolean) {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        this.computeWeekdaysParse();\n      }\n\n      if (isStrict) {\n        return this._weekdaysStrictRegex;\n      } else {\n        return this._weekdaysRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        this._weekdaysRegex = matchWord;\n      }\n\n      return this._weekdaysStrictRegex && isStrict ?\n        this._weekdaysStrictRegex : this._weekdaysRegex;\n    }\n  }\n\n  // proto.weekdaysShortRegex  =        weekdaysShortRegex;\n  // proto.weekdaysMinRegex    =        weekdaysMinRegex;\n\n\n  weekdaysShortRegex(isStrict?: boolean): RegExp {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        this.computeWeekdaysParse();\n      }\n      if (isStrict) {\n        return this._weekdaysShortStrictRegex;\n      } else {\n        return this._weekdaysShortRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n        this._weekdaysShortRegex = matchWord;\n      }\n\n      return this._weekdaysShortStrictRegex && isStrict ?\n        this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n    }\n  }\n\n  weekdaysMinRegex(isStrict?: boolean): RegExp {\n    if (this._weekdaysParseExact) {\n      if (!hasOwnProp(this, '_weekdaysRegex')) {\n        this.computeWeekdaysParse();\n      }\n      if (isStrict) {\n        return this._weekdaysMinStrictRegex;\n      } else {\n        return this._weekdaysMinRegex;\n      }\n    } else {\n      if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n        this._weekdaysMinRegex = matchWord;\n      }\n\n      return this._weekdaysMinStrictRegex && isStrict ?\n        this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n    }\n  }\n\n  isPM(input: string): boolean {\n    // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n    // Using charAt should be more compatible.\n    return input.toLowerCase().charAt(0) === 'p';\n  }\n\n  meridiem(hours: number, minutes: number, isLower: boolean): string {\n    if (hours > 11) {\n      return isLower ? 'pm' : 'PM';\n    }\n\n    return isLower ? 'am' : 'AM';\n  }\n\n  formatLongDate(key: string) {\n    this._longDateFormat = this._longDateFormat ? this._longDateFormat : defaultLongDateFormat;\n    const format = this._longDateFormat[key];\n    const formatUpper = this._longDateFormat[key.toUpperCase()];\n\n    if (format || !formatUpper) {\n      return format;\n    }\n\n    this._longDateFormat[\n      key\n      ] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (val: string) => {\n      return val.slice(1);\n    });\n\n    return this._longDateFormat[key];\n  }\n\n  private handleMonthStrictParse(monthName: string, format: string, strict?: boolean) {\n    const llc = monthName.toLocaleLowerCase();\n    let i;\n    let ii;\n    let mom;\n    if (!this._monthsParse) {\n      // this is not used\n      this._monthsParse = [];\n      this._longMonthsParse = [];\n      this._shortMonthsParse = [];\n      for (i = 0; i < 12; ++i) {\n        mom = new Date(2000, i);\n        this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n        this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n      }\n    }\n\n    if (strict) {\n      if (format === 'MMM') {\n        ii = (this._shortMonthsParse as string[]).indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      }\n      ii = (this._longMonthsParse as string[]).indexOf(llc);\n\n      return ii !== -1 ? ii : null;\n    }\n\n    if (format === 'MMM') {\n      ii = (this._shortMonthsParse as string[]).indexOf(llc);\n      if (ii !== -1) {\n        return ii;\n      }\n\n      ii = (this._longMonthsParse as string[]).indexOf(llc);\n\n      return ii !== -1 ? ii : null;\n    }\n\n    ii = (this._longMonthsParse as string[]).indexOf(llc);\n    if (ii !== -1) {\n      return ii;\n    }\n    ii = (this._shortMonthsParse as string[]).indexOf(llc);\n\n    return ii !== -1 ? ii : null;\n  }\n\n  private handleWeekStrictParse(weekdayName: string, format: string, strict: boolean): number {\n    let ii;\n    const llc = weekdayName.toLocaleLowerCase();\n    if (!this._weekdaysParse) {\n      this._weekdaysParse = [];\n      this._shortWeekdaysParse = [];\n      this._minWeekdaysParse = [];\n\n      let i;\n      for (i = 0; i < 7; ++i) {\n        const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);\n        this._minWeekdaysParse[i] = this.weekdaysMin(date).toLocaleLowerCase();\n        this._shortWeekdaysParse[i] = this.weekdaysShort(date).toLocaleLowerCase();\n        this._weekdaysParse[i] = this.weekdays(date, '').toLocaleLowerCase();\n      }\n    }\n\n    if (!isArray<string>(this._weekdaysParse)\n      || !isArray<string>(this._shortWeekdaysParse)\n      || !isArray<string>(this._minWeekdaysParse)) {\n      return;\n    }\n\n    if (strict) {\n      if (format === 'dddd') {\n        ii = this._weekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      } else if (format === 'ddd') {\n        ii = this._shortWeekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = this._minWeekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      }\n    } else {\n      if (format === 'dddd') {\n        ii = this._weekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._shortWeekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._minWeekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      } else if (format === 'ddd') {\n        ii = this._shortWeekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._weekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._minWeekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      } else {\n        ii = this._minWeekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._weekdaysParse.indexOf(llc);\n        if (ii !== -1) {\n          return ii;\n        }\n        ii = this._shortWeekdaysParse.indexOf(llc);\n\n        return ii !== -1 ? ii : null;\n      }\n    }\n  }\n\n  private computeMonthsParse() {\n    const shortPieces: string[] = [];\n    const longPieces: string[] = [];\n    const mixedPieces: string[] = [];\n    let date;\n\n    let i;\n    for (i = 0; i < 12; i++) {\n      // make the regex if we don't have it already\n      date = new Date(2000, i);\n      shortPieces.push(this.monthsShort(date, ''));\n      longPieces.push(this.months(date, ''));\n      mixedPieces.push(this.months(date, ''));\n      mixedPieces.push(this.monthsShort(date, ''));\n    }\n    // Sorting makes sure if one month (or abbr) is a prefix of another it\n    // will match the longer piece.\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n    for (i = 0; i < 12; i++) {\n      shortPieces[i] = regexEscape(shortPieces[i]);\n      longPieces[i] = regexEscape(longPieces[i]);\n    }\n    for (i = 0; i < 24; i++) {\n      mixedPieces[i] = regexEscape(mixedPieces[i]);\n    }\n\n    this._monthsRegex = new RegExp(`^(${mixedPieces.join('|')})`, 'i');\n    this._monthsShortRegex = this._monthsRegex;\n    this._monthsStrictRegex = new RegExp(`^(${longPieces.join('|')})`, 'i');\n    this._monthsShortStrictRegex = new RegExp(`^(${shortPieces.join('|')})`, 'i');\n  }\n\n  private computeWeekdaysParse() {\n    const minPieces = [];\n    const shortPieces = [];\n    const longPieces = [];\n    const mixedPieces = [];\n\n    let i;\n    for (i = 0; i < 7; i++) {\n      // make the regex if we don't have it already\n      // let mom = createUTC([2000, 1]).day(i);\n      const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);\n      const minp = this.weekdaysMin(date);\n      const shortp = this.weekdaysShort(date);\n      const longp = this.weekdays(date);\n      minPieces.push(minp);\n      shortPieces.push(shortp);\n      longPieces.push(longp);\n      mixedPieces.push(minp);\n      mixedPieces.push(shortp);\n      mixedPieces.push(longp);\n    }\n    // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n    // will match the longer piece.\n    minPieces.sort(cmpLenRev);\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n    for (i = 0; i < 7; i++) {\n      shortPieces[i] = regexEscape(shortPieces[i]);\n      longPieces[i] = regexEscape(longPieces[i]);\n      mixedPieces[i] = regexEscape(mixedPieces[i]);\n    }\n\n    this._weekdaysRegex = new RegExp(`^(${mixedPieces.join('|')})`, 'i');\n    this._weekdaysShortRegex = this._weekdaysRegex;\n    this._weekdaysMinRegex = this._weekdaysRegex;\n\n    this._weekdaysStrictRegex = new RegExp(`^(${longPieces.join('|')})`, 'i');\n    this._weekdaysShortStrictRegex = new RegExp(`^(${shortPieces.join('|')})`, 'i');\n    this._weekdaysMinStrictRegex = new RegExp(`^(${minPieces.join('|')})`, 'i');\n  }\n}\n\nfunction cmpLenRev(a: string, b: string): number {\n  return b.length - a.length;\n}\n","export const defaultCalendar = {\n  sameDay: '[Today at] LT',\n  nextDay: '[Tomorrow at] LT',\n  nextWeek: 'dddd [at] LT',\n  lastDay: '[Yesterday at] LT',\n  lastWeek: '[Last] dddd [at] LT',\n  sameElse: 'L'\n};\n","import {\n  defaultDayOfMonthOrdinalParse,\n  defaultLocaleMonths,\n  defaultLocaleMonthsShort,\n  defaultLocaleWeekdays,\n  defaultLocaleWeekdaysMin,\n  defaultLocaleWeekdaysShort, defaultLongDateFormat, defaultOrdinal,\n  LocaleData\n} from './locale.class';\nimport { defaultCalendar } from './calendar';\n\nexport const defaultInvalidDate = 'Invalid date';\n\nexport const defaultLocaleWeek = {\n  dow: 0, // Sunday is the first day of the week.\n  doy: 6 // The week that contains Jan 1st is the first week of the year.\n};\n\nexport const defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\nexport const defaultRelativeTime: {[key: string]: string} = {\n  future : 'in %s',\n  past   : '%s ago',\n  s  : 'a few seconds',\n  ss : '%d seconds',\n  m  : 'a minute',\n  mm : '%d minutes',\n  h  : 'an hour',\n  hh : '%d hours',\n  d  : 'a day',\n  dd : '%d days',\n  M  : 'a month',\n  MM : '%d months',\n  y  : 'a year',\n  yy : '%d years'\n};\n\nexport const baseConfig: LocaleData = {\n  calendar: defaultCalendar,\n  longDateFormat: defaultLongDateFormat,\n  invalidDate: defaultInvalidDate,\n  ordinal: defaultOrdinal,\n  dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n  relativeTime: defaultRelativeTime,\n\n  months: defaultLocaleMonths,\n  monthsShort: defaultLocaleMonthsShort,\n\n  week: defaultLocaleWeek,\n\n  weekdays: defaultLocaleWeekdays,\n  weekdaysMin: defaultLocaleWeekdaysMin,\n  weekdaysShort: defaultLocaleWeekdaysShort,\n\n  meridiemParse: defaultLocaleMeridiemParse\n};\n","// compare two arrays, return the number of differences\nimport { toInt } from './type-checks';\n\nexport function compareArrays<T>(array1: T[], array2: T[], dontConvert: boolean) {\n  const len = Math.min(array1.length, array2.length);\n  const lengthDiff = Math.abs(array1.length - array2.length);\n  let diffs = 0;\n  let i;\n  for (i = 0; i < len; i++) {\n    if ((dontConvert && array1[i] !== array2[i])\n      || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n      diffs++;\n    }\n  }\n\n  return diffs + lengthDiff;\n}\n","import { addFormatToken } from '../format/format';\nimport { Locale } from '../locale/locale.class';\nimport { weekOfYear } from './week-calendar-utils';\nimport { addRegexToken, match1to2, match2 } from '../parse/regex';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { addWeekParseToken } from '../parse/token';\nimport { toInt } from '../utils/type-checks';\nimport { DateFormatterOptions, WeekParsing } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { getLocale } from '../locale/locales';\nimport { add } from '../moment/add-subtract';\n\n// FORMATTING\n\nexport function initWeek() {\n  addFormatToken('w', ['ww', 2, false], 'wo',\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getWeek(date, opts.locale)\n        .toString(10);\n    }\n  );\n\n  addFormatToken('W', ['WW', 2, false], 'Wo',\n    function(date: Date): string {\n      return getISOWeek(date)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('week', 'w');\n  addUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\n  addUnitPriority('week', 5);\n  addUnitPriority('isoWeek', 5);\n\n// PARSING\n\n  addRegexToken('w', match1to2);\n  addRegexToken('ww', match1to2, match2);\n  addRegexToken('W', match1to2);\n  addRegexToken('WW', match1to2, match2);\n\n  addWeekParseToken(\n    ['w', 'ww', 'W', 'WW'],\n    function(input: string, week: WeekParsing, config: DateParsingConfig, token: string): DateParsingConfig {\n      week[token.substr(0, 1)] = toInt(input);\n\n      return config;\n    }\n  );\n\n// export function getSetWeek (input) {\n//   var week = this.localeData().week(this);\n//   return input == null ? week : this.add((input - week) * 7, 'd');\n// }\n}\n\nexport function setWeek(date: Date, input: number, locale = getLocale()): Date {\n  const week = getWeek(date, locale);\n\n  return add(date, (input - week) * 7, 'day');\n}\n\nexport function getWeek(date: Date, locale = getLocale(), isUTC?: boolean): number {\n  return locale.week(date, isUTC);\n}\n\n// export function getSetISOWeek (input) {\n//   var week = weekOfYear(this, 1, 4).week;\n//   return input == null ? week : this.add((input - week) * 7, 'd');\n// }\n\nexport function setISOWeek(date: Date, input: number): Date {\n  const week = getISOWeek(date);\n\n  return add(date, (input - week) * 7, 'day');\n}\n\nexport function getISOWeek(date: Date, isUTC?: boolean): number {\n  return weekOfYear(date, 1, 4, isUTC).week;\n}\n\n","import { addFormatToken } from '../format/format';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex';\nimport { addWeekParseToken } from '../parse/token';\nimport { toInt } from '../utils/type-checks';\nimport { parseTwoDigitYear } from './year';\nimport { dayOfYearFromWeeks, weekOfYear, weeksInYear } from './week-calendar-utils';\nimport { createUTCDate } from '../create/date-from-array';\nimport { getISOWeek, getWeek } from './week';\nimport { getISODayOfWeek, getLocaleDayOfWeek } from './day-of-week';\nimport { getLocale } from '../locale/locales';\nimport { setDate, setFullYear, setMonth } from '../utils/date-setters';\nimport { getDate, getFullYear, getMonth } from '../utils/date-getters';\nimport { Locale } from '../locale/locale.class';\nimport { DateFormatterFn, DateFormatterOptions, WeekParsing } from '../types';\n\n// FORMATTING\n\nexport function initWeekYear() {\n  addFormatToken(null, ['gg', 2, false], null,\n    function (date: Date, opts: DateFormatterOptions): string {\n      // return this.weekYear() % 100;\n      return (getWeekYear(date, opts.locale) % 100).toString();\n    }\n  );\n\n  addFormatToken(null, ['GG', 2, false], null,\n    function (date: Date): string {\n      // return this.isoWeekYear() % 100;\n      return (getISOWeekYear(date) % 100).toString();\n    }\n  );\n\n  addWeekYearFormatToken('gggg', _getWeekYearFormatCb);\n  addWeekYearFormatToken('ggggg', _getWeekYearFormatCb);\n  addWeekYearFormatToken('GGGG', _getISOWeekYearFormatCb);\n  addWeekYearFormatToken('GGGGG', _getISOWeekYearFormatCb);\n\n// ALIASES\n\n  addUnitAlias('weekYear', 'gg');\n  addUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\n  addUnitPriority('weekYear', 1);\n  addUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\n  addRegexToken('G', matchSigned);\n  addRegexToken('g', matchSigned);\n  addRegexToken('GG', match1to2, match2);\n  addRegexToken('gg', match1to2, match2);\n  addRegexToken('GGGG', match1to4, match4);\n  addRegexToken('gggg', match1to4, match4);\n  addRegexToken('GGGGG', match1to6, match6);\n  addRegexToken('ggggg', match1to6, match6);\n\n  addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n    function (input, week: WeekParsing, config, token) {\n      week[token.substr(0, 2)] = toInt(input);\n\n      return config;\n    });\n\n  addWeekParseToken(['gg', 'GG'], function (input, week: WeekParsing, config, token) {\n    week[token] = parseTwoDigitYear(input);\n\n    return config;\n  });\n}\n\nfunction addWeekYearFormatToken(token: string, getter: DateFormatterFn): void {\n  addFormatToken(null, [token, token.length, false], null, getter);\n}\n\nfunction _getWeekYearFormatCb(date: Date, opts: DateFormatterOptions): string {\n  return getWeekYear(date, opts.locale).toString();\n}\n\nfunction _getISOWeekYearFormatCb(date: Date): string {\n  return getISOWeekYear(date).toString();\n}\n\n// MOMENTS\n\nexport function getSetWeekYear(date: Date, input: number, locale = getLocale(), isUTC?: boolean): number | Date {\n  return getSetWeekYearHelper(date,\n    input,\n    // this.week(),\n    getWeek(date, locale, isUTC),\n    // this.weekday(),\n    getLocaleDayOfWeek(date, locale, isUTC),\n    locale.firstDayOfWeek(),\n    locale.firstDayOfYear(),\n    isUTC);\n}\n\nexport function getWeekYear(date: Date, locale = getLocale(), isUTC?: boolean): number {\n  return weekOfYear(date, locale.firstDayOfWeek(), locale.firstDayOfYear(), isUTC).year;\n}\n\nexport function getSetISOWeekYear(date: Date, input: number, isUTC?: boolean): number | Date {\n  return getSetWeekYearHelper(date, input, getISOWeek(date, isUTC), getISODayOfWeek(date, isUTC), 1, 4);\n}\n\nexport function getISOWeekYear(date: Date, isUTC?: boolean): number {\n  return weekOfYear(date, 1, 4, isUTC).year;\n}\n\nexport function getISOWeeksInYear(date: Date, isUTC?: boolean) {\n  return weeksInYear(getFullYear(date, isUTC), 1, 4);\n}\n\nexport function getWeeksInYear(date: Date, isUTC?: boolean, locale: Locale = getLocale()): number {\n  return weeksInYear(getFullYear(date, isUTC), locale.firstDayOfWeek(), locale.firstDayOfYear());\n}\n\nfunction getSetWeekYearHelper(date: Date, input: number, week: number,\n                              weekday: number, dow: number, doy: number, isUTC?: boolean): number | Date {\n  if (!input) {\n    return getWeekYear(date, void 0, isUTC);\n  }\n\n  const weeksTarget = weeksInYear(input, dow, doy);\n  const _week = week > weeksTarget ? weeksTarget : week;\n\n  return setWeekAll(date, input, _week, weekday, dow, doy);\n}\n\nfunction setWeekAll(date: Date, weekYear: number, week: number,\n                    weekday: number, dow: number, doy: number): Date {\n  const dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n  const _date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n  setFullYear(date, getFullYear(_date, true), true);\n  setMonth(date, getMonth(_date, true), true);\n  setDate(date, getDate(_date, true), true);\n\n  return date;\n}\n","import { addFormatToken } from '../format/format';\nimport { unix } from '../utils/date-getters';\nimport { addRegexToken, matchSigned, matchTimestamp } from '../parse/regex';\nimport { addParseToken} from '../parse/token';\nimport { toInt } from '../utils/type-checks';\nimport { DateArray } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\n\n\nexport function initTimestamp() {\n// FORMATTING\n\n  addFormatToken('X', null, null, function(date: Date): string {\n    return unix(date)\n      .toString(10);\n  });\n  addFormatToken('x', null, null, function(date: Date): string {\n    return date.valueOf()\n      .toString(10);\n  });\n\n// PARSING\n\n  addRegexToken('x', matchSigned);\n  addRegexToken('X', matchTimestamp);\n\n  addParseToken('X', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    config._d = new Date(parseFloat(input) * 1000);\n\n    return config;\n  });\n  addParseToken('x', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    config._d = new Date(toInt(input));\n\n    return config;\n  });\n}\n","import { addFormatToken } from '../format/format';\nimport { addRegexToken, match1 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { MONTH } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { getMonth } from '../utils/date-getters';\nimport { DateArray, DateFormatterOptions } from '../types';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { setMonth } from '../utils/date-setters';\n\n\nexport function initQuarter() {\n// FORMATTING\n\n  addFormatToken('Q', null, 'Qo',\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getQuarter(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\n  addUnitPriority('quarter', 7);\n\n// PARSING\n\n  addRegexToken('Q', match1);\n  addParseToken('Q', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    array[MONTH] = (toInt(input) - 1) * 3;\n\n    return config;\n  });\n}\n\n// MOMENTS\n\nexport function getQuarter(date: Date, isUTC = false): number {\n  return Math.ceil((getMonth(date, isUTC) + 1) / 3);\n}\n\nexport function setQuarter(date: Date, quarter: number, isUTC?: boolean): Date {\n  return setMonth(date, (quarter - 1) * 3 + getMonth(date, isUTC) % 3, isUTC);\n}\n\n// export function getSetQuarter(input) {\n//   return input == null\n//     ? Math.ceil((this.month() + 1) / 3)\n//     : this.month((input - 1) * 3 + this.month() % 3);\n// }\n","// place in new Date([array])\nexport const YEAR = 0;\nexport const MONTH = 1;\nexport const DATE = 2;\nexport const HOUR = 3;\nexport const MINUTE = 4;\nexport const SECOND = 5;\nexport const MILLISECOND = 6;\nexport const WEEK = 7;\nexport const WEEKDAY = 8;\n","// tslint:disable:no-bitwise max-line-length\n// FORMATTING\n\nimport { addFormatToken } from '../format/format';\nimport { zeroFill } from '../utils/zero-fill';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { isNumber, isString, toInt } from '../utils/type-checks';\nimport { addRegexToken, matchOffset, matchShortOffset } from '../parse/regex';\nimport { add } from '../moment/add-subtract';\nimport { addParseToken } from '../parse/token';\nimport { DateArray } from '../types';\nimport { cloneDate } from '../create/clone';\nimport { setMonth } from '../utils/date-setters';\n\nfunction addOffsetFormatToken(token: string, separator: string): void {\n  addFormatToken(token, null, null, function (date: Date, config): string {\n    let offset = getUTCOffset(date, {_isUTC: config.isUTC, _offset: config.offset});\n    let sign = '+';\n    if (offset < 0) {\n      offset = -offset;\n      sign = '-';\n    }\n\n    return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n  });\n}\n\nexport function initOffset() {\n  addOffsetFormatToken('Z', ':');\n  addOffsetFormatToken('ZZ', '');\n\n// PARSING\n\n  addRegexToken('Z', matchShortOffset);\n  addRegexToken('ZZ', matchShortOffset);\n  addParseToken(['Z', 'ZZ'], function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    config._useUTC = true;\n    config._tzm = offsetFromString(matchShortOffset, input);\n\n    return config;\n  });\n}\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10',  '00']\n// '-1530'  > ['-15', '30']\nconst chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher: RegExp, str: string): number {\n  const matches = (str || '').match(matcher);\n\n  if (matches === null) {\n    return null;\n  }\n\n  const chunk = matches[matches.length - 1];\n  const parts = chunk.match(chunkOffset) || ['-', '0', '0'];\n  const minutes = parseInt(parts[1], 10) * 60 + toInt(parts[2]);\n  const _min = parts[0] === '+' ? minutes : -minutes;\n\n  return minutes === 0 ? 0 : _min;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nexport function cloneWithOffset(input: Date, date: Date,\n                                config: DateParsingConfig = {}): Date {\n  if (!config._isUTC) {\n    return input;\n  }\n\n  const res = cloneDate(date);\n  // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000\n  const offsetDiff = (config._offset || 0) * 60000;\n  const diff = input.valueOf() - res.valueOf() + offsetDiff;\n  // Use low-level api, because this fn is low-level api.\n  res.setTime(res.valueOf() + diff);\n  // todo: add timezone handling\n  // hooks.updateOffset(res, false);\n\n  return res;\n}\n\nexport function getDateOffset(date: Date): number {\n  // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n  // https://github.com/moment/moment/pull/1871\n  return -Math.round(date.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\n// todo: it's from moment timezones\n// hooks.updateOffset = function () {\n// };\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nexport function getUTCOffset(date: Date, config: DateParsingConfig = {}): number {\n  const _offset = config._offset || 0;\n\n  return config._isUTC ? _offset : getDateOffset(date);\n}\n\nexport function setUTCOffset(date: Date, input: number | string, keepLocalTime?: boolean, keepMinutes?: boolean, config: DateParsingConfig = {}): Date {\n  const offset = config._offset || 0;\n  let localAdjust;\n  let _input = input;\n  let _date = date;\n\n  if (isString(_input)) {\n    _input = offsetFromString(matchShortOffset, _input);\n    if (_input === null) {\n      return _date;\n    }\n  } else if (isNumber(_input) && Math.abs(_input) < 16 && !keepMinutes) {\n    _input = _input * 60;\n  }\n\n  if (!config._isUTC && keepLocalTime) {\n    localAdjust = getDateOffset(_date);\n  }\n  config._offset = _input;\n  config._isUTC = true;\n  if (localAdjust != null) {\n    _date = add(_date, localAdjust, 'minutes');\n  }\n  if (offset !== _input) {\n    if (!keepLocalTime || config._changeInProgress) {\n      _date = add(_date, _input - offset, 'minutes', config._isUTC);\n      // addSubtract(this, createDuration(_input - offset, 'm'), 1, false);\n    } else if (!config._changeInProgress) {\n      config._changeInProgress = true;\n      // todo: add timezone handling\n      // hooks.updateOffset(this, true);\n      config._changeInProgress = null;\n    }\n  }\n\n  return _date;\n}\n\n/*\nexport function getSetZone(input, keepLocalTime) {\n  if (input != null) {\n    if (typeof input !== 'string') {\n      input = -input;\n    }\n\n    this.utcOffset(input, keepLocalTime);\n\n    return this;\n  } else {\n    return -this.utcOffset();\n  }\n}\n*/\n\nexport function setOffsetToUTC(date: Date, keepLocalTime?: boolean): Date {\n  return setUTCOffset(date, 0, keepLocalTime);\n}\n\nexport function isDaylightSavingTime(date: Date): boolean {\n\n  return (getUTCOffset(date) > getUTCOffset(setMonth(cloneDate(date), 0))\n    || getUTCOffset(date) > getUTCOffset(setMonth(cloneDate(date), 5)));\n}\n\n/*export function setOffsetToLocal(date: Date, isUTC?: boolean, keepLocalTime?: boolean) {\n  if (this._isUTC) {\n    this.utcOffset(0, keepLocalTime);\n    this._isUTC = false;\n\n    if (keepLocalTime) {\n      this.subtract(getDateOffset(this), 'm');\n    }\n  }\n  return this;\n}*/\n\nexport function setOffsetToParsedOffset(date: Date, input: string, config: DateParsingConfig = {}): Date {\n  if (config._tzm != null) {\n    return setUTCOffset(date, config._tzm, false, true, config);\n  }\n\n  if (isString(input)) {\n    const tZone = offsetFromString(matchOffset, input);\n    if (tZone != null) {\n      return setUTCOffset(date, tZone, false, false, config);\n    }\n\n    return setUTCOffset(date, 0, true, false, config);\n  }\n\n  return date;\n}\n\nexport function hasAlignedHourOffset(date: Date, input?: Date) {\n  const _input = input ? getUTCOffset(input, { _isUTC: false }) : 0;\n\n  return (getUTCOffset(date) - _input) % 60 === 0;\n}\n\n\n// DEPRECATED\n/*export function isDaylightSavingTimeShifted() {\n  if (!isUndefined(this._isDSTShifted)) {\n    return this._isDSTShifted;\n  }\n\n  const c = {};\n\n  copyConfig(c, this);\n  c = prepareConfig(c);\n\n  if (c._a) {\n    const other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n    this._isDSTShifted = this.isValid() &&\n      compareArrays(c._a, other.toArray()) > 0;\n  } else {\n    this._isDSTShifted = false;\n  }\n\n  return this._isDSTShifted;\n}*/\n\n// in Khronos\n/*export function isLocal() {\n  return this.isValid() ? !this._isUTC : false;\n}\n\nexport function isUtcOffset() {\n  return this.isValid() ? this._isUTC : false;\n}\n\nexport function isUtc() {\n  return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}*/\n","import { getHours, getMinutes, getSeconds } from '../utils/date-getters';\nimport { addFormatToken } from '../format/format';\nimport { zeroFill } from '../utils/zero-fill';\nimport { Locale } from '../locale/locale.class';\nimport { addRegexToken, match1to2, match2, match3to4, match5to6 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { HOUR, MINUTE, SECOND } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { DateArray, DateFormatterOptions } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { getParsingFlags } from '../create/parsing-flags';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\n\n\nexport function initHour() {\n// FORMATTING\n\n  function hFormat(date: Date, isUTC: boolean): number {\n    return getHours(date, isUTC) % 12 || 12;\n  }\n\n  function kFormat(date: Date, isUTC: boolean): number {\n    return getHours(date, isUTC) || 24;\n  }\n\n  addFormatToken('H', ['HH', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getHours(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n  addFormatToken('h', ['hh', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return hFormat(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n  addFormatToken('k', ['kk', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return kFormat(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n  addFormatToken('hmm', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      const _h = hFormat(date, opts.isUTC);\n      const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);\n\n      return `${_h}${_mm}`;\n    }\n  );\n\n  addFormatToken('hmmss', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      const _h = hFormat(date, opts.isUTC);\n      const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);\n      const _ss = zeroFill(getSeconds(date, opts.isUTC), 2);\n\n      return `${_h}${_mm}${_ss}`;\n    }\n  );\n\n  addFormatToken('Hmm', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      const _H = getHours(date, opts.isUTC);\n      const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);\n\n      return `${_H}${_mm}`;\n    }\n  );\n\n  addFormatToken('Hmmss', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      const _H = getHours(date, opts.isUTC);\n      const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);\n      const _ss = zeroFill(getSeconds(date, opts.isUTC), 2);\n\n      return `${_H}${_mm}${_ss}`;\n    }\n  );\n\n  function meridiem(token: string, lowercase: boolean): void {\n    addFormatToken(token, null, null,\n      function(date: Date, opts: DateFormatterOptions): string {\n        return opts.locale.meridiem(getHours(date, opts.isUTC), getMinutes(date, opts.isUTC), lowercase);\n      }\n    );\n  }\n\n  meridiem('a', true);\n  meridiem('A', false);\n\n// ALIASES\n\n  addUnitAlias('hour', 'h');\n\n// PRIORITY\n  addUnitPriority('hour', 13);\n\n\n// PARSING\n\n  function matchMeridiem(isStrict: boolean, locale: Locale): RegExp {\n    return locale._meridiemParse;\n  }\n\n  addRegexToken('a', matchMeridiem);\n  addRegexToken('A', matchMeridiem);\n  addRegexToken('H', match1to2);\n  addRegexToken('h', match1to2);\n  addRegexToken('k', match1to2);\n  addRegexToken('HH', match1to2, match2);\n  addRegexToken('hh', match1to2, match2);\n  addRegexToken('kk', match1to2, match2);\n\n  addRegexToken('hmm', match3to4);\n  addRegexToken('hmmss', match5to6);\n  addRegexToken('Hmm', match3to4);\n  addRegexToken('Hmmss', match5to6);\n\n  addParseToken(['H', 'HH'], HOUR);\n  addParseToken(\n    ['k', 'kk'],\n    function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n      const kInput = toInt(input);\n      array[HOUR] = kInput === 24 ? 0 : kInput;\n\n      return config;\n    }\n  );\n  addParseToken(['a', 'A'], function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    config._isPm = config._locale.isPM(input);\n    config._meridiem = input;\n\n    return config;\n  });\n  addParseToken(['h', 'hh'], function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    array[HOUR] = toInt(input);\n    getParsingFlags(config).bigHour = true;\n\n    return config;\n  });\n  addParseToken('hmm', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    const pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n    getParsingFlags(config).bigHour = true;\n\n    return config;\n  });\n  addParseToken('hmmss', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    const pos1 = input.length - 4;\n    const pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n    getParsingFlags(config).bigHour = true;\n\n    return config;\n  });\n  addParseToken('Hmm', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    const pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n\n    return config;\n  });\n  addParseToken('Hmmss', function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    const pos1 = input.length - 4;\n    const pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n\n    return config;\n  });\n\n}\n","// internal storage for locale config files\nimport { Locale, LocaleData } from './locale.class';\nimport { baseConfig } from './locale.defaults';\nimport { hasOwnProp, isArray, isObject, isString, isUndefined, toInt } from '../utils/type-checks';\nimport { compareArrays } from '../utils/compare-arrays';\n\nimport { initWeek } from '../units/week';\nimport { initWeekYear } from '../units/week-year';\nimport { initYear } from '../units/year';\nimport { initTimezone } from '../units/timezone';\nimport { initTimestamp } from '../units/timestamp';\nimport { initSecond } from '../units/second';\nimport { initQuarter } from '../units/quarter';\nimport { initOffset } from '../units/offset';\nimport { initMinute } from '../units/minute';\nimport { initMillisecond } from '../units/millisecond';\nimport { initMonth } from '../units/month';\nimport { initHour } from '../units/hour';\nimport { initDayOfYear } from '../units/day-of-year';\nimport { initDayOfWeek } from '../units/day-of-week';\nimport { initDayOfMonth } from '../units/day-of-month';\n\nconst locales: { [key: string]: Locale } = {};\nconst localeFamilies: { [key: string]: {name: string; config: LocaleData}[] } = {};\nlet globalLocale: Locale;\n\nfunction normalizeLocale(key: string): string {\n  return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least,\n// but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names: string[]): Locale {\n  let next;\n  let locale;\n  let i = 0;\n\n  while (i < names.length) {\n    const split = normalizeLocale(names[i]).split('-');\n    let j = split.length;\n    next = normalizeLocale(names[i + 1]);\n    next = next ? next.split('-') : null;\n    while (j > 0) {\n      locale = loadLocale(split.slice(0, j).join('-'));\n      if (locale) {\n        return locale;\n      }\n      if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n        // the next array item is better than a shallower substring of this one\n        break;\n      }\n      j--;\n    }\n    i++;\n  }\n\n  return null;\n}\n\nexport function mergeConfigs(parentConfig: LocaleData,\n                             childConfig: LocaleData) {\n  const res: LocaleData = Object.assign({}, parentConfig);\n\n  for (const childProp in childConfig) {\n    if (!hasOwnProp(childConfig, childProp)) {\n      continue;\n    }\n    if (isObject(parentConfig[childProp]) && isObject(childConfig[childProp])) {\n      res[childProp] = {};\n      Object.assign(res[childProp], parentConfig[childProp]);\n      Object.assign(res[childProp], childConfig[childProp]);\n    } else if (childConfig[childProp] != null) {\n      res[childProp] = childConfig[childProp];\n    } else {\n      delete res[childProp];\n    }\n  }\n  let parentProp;\n  for (parentProp in parentConfig) {\n    if (\n      hasOwnProp(parentConfig, parentProp) &&\n      !hasOwnProp(childConfig, parentProp) &&\n      isObject(parentConfig[parentProp as keyof LocaleData])\n    ) {\n      // make sure changes to properties don't modify parent config\n      res[parentProp as keyof LocaleData] = Object.assign({}, res[parentProp as keyof LocaleData]);\n    }\n  }\n\n  return res;\n}\n\n\nfunction loadLocale(name: string): Locale {\n  // no way!\n  /* var oldLocale = null;\n   // TODO: Find a better way to register and load all the locales in Node\n   if (!locales[name] && (typeof module !== 'undefined') &&\n     module && module.exports) {\n     try {\n       oldLocale = globalLocale._abbr;\n       var aliasedRequire = require;\n       aliasedRequire('./locale/' + name);\n       getSetGlobalLocale(oldLocale);\n     } catch (e) {}\n   }*/\n  if (!locales[name]) {\n    // tslint:disable-next-line\n    console.error(`Khronos locale error: please load locale \"${name}\" before using it`);\n    // throw new Error(`Khronos locale error: please load locale \"${name}\" before using it`);\n  }\n\n  return locales[name];\n}\n\n// This function will load locale and then set the global locale.  If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nexport function getSetGlobalLocale(key?: string | string[], values?: LocaleData): string {\n  let data: Locale;\n\n  if (key) {\n    if (isUndefined(values)) {\n      data = getLocale(key);\n    } else if (isString(key)) {\n      data = defineLocale(key, values);\n    }\n\n    if (data) {\n      globalLocale = data;\n    }\n  }\n\n  return globalLocale && globalLocale._abbr;\n}\n\nexport function defineLocale(name: string, config?: LocaleData): Locale {\n  if (config === null) {\n    // useful for testing\n    delete locales[name];\n    globalLocale = getLocale('en');\n\n    return null;\n  }\n\n  if (!config) {\n    return;\n  }\n\n  let parentConfig = baseConfig;\n  config.abbr = name;\n  if (config.parentLocale != null) {\n    if (locales[config.parentLocale] != null) {\n      parentConfig = locales[config.parentLocale]._config;\n    } else {\n      if (!localeFamilies[config.parentLocale]) {\n        localeFamilies[config.parentLocale] = [];\n      }\n      localeFamilies[config.parentLocale].push({ name, config });\n\n      return null;\n    }\n  }\n\n  locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n  if (localeFamilies[name]) {\n    localeFamilies[name].forEach(function (x) {\n      defineLocale(x.name, x.config);\n    });\n  }\n\n  // backwards compat for now: also set the locale\n  // make sure we set the locale AFTER all child locales have been\n  // created, so we won't end up with the child locale set.\n  getSetGlobalLocale(name);\n\n\n  return locales[name];\n}\n\nexport function updateLocale(name: string, config?: LocaleData): Locale {\n  let _config = config;\n\n  if (_config != null) {\n    let parentConfig = baseConfig;\n    // MERGE\n    const tmpLocale = loadLocale(name);\n    if (tmpLocale != null) {\n      parentConfig = tmpLocale._config;\n    }\n    _config = mergeConfigs(parentConfig, _config);\n    const locale = new Locale(_config);\n    locale.parentLocale = locales[name];\n    locales[name] = locale;\n\n    // backwards compat for now: also set the locale\n    getSetGlobalLocale(name);\n  } else {\n    // pass null for config to unupdate, useful for tests\n    if (locales[name] != null) {\n      if (locales[name].parentLocale != null) {\n        locales[name] = locales[name].parentLocale;\n      } else if (locales[name] != null) {\n        delete locales[name];\n      }\n    }\n  }\n\n  return locales[name];\n}\n\n// returns locale data\nexport function getLocale(key?: string | string[]): Locale {\n  setDefaultLocale();\n\n  if (!key) {\n    return globalLocale;\n  }\n  // let locale;\n  const _key = isArray(key) ? key : [key];\n\n  return chooseLocale(_key);\n}\n\nexport function listLocales(): string[] {\n  return Object.keys(locales);\n}\n\nfunction setDefaultLocale(): void {\n  if (locales[`en`]) {\n\n    return undefined;\n  }\n\n  getSetGlobalLocale('en', {\n    dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n    ordinal(num: number): string {\n      const b = num % 10;\n      const output =\n        toInt((num % 100) / 10) === 1\n          ? 'th'\n          : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n\n      return num + output;\n    }\n  });\n\n  initWeek();\n  initWeekYear();\n  initYear();\n  initTimezone();\n  initTimestamp();\n  initSecond();\n  initQuarter();\n  initOffset();\n  initMonth();\n  initMinute();\n  initMillisecond();\n  initHour();\n  initDayOfYear();\n  initDayOfWeek();\n  initDayOfMonth();\n}\n","import { addFormatToken } from '../format/format';\nimport { DateFormatterOptions } from '../types';\n\n// todo: add support for timezones\n\nexport function initTimezone() {\n  // FORMATTING\n  addFormatToken('z', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.isUTC ? 'UTC' : '';\n    }\n  );\n  addFormatToken('zz', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return opts.isUTC ? 'Coordinated Universal Time' : '';\n    }\n  );\n}\n\n// MOMENTS\n\nexport function getZoneAbbr(isUTC: boolean) {\n  return isUTC ? 'UTC' : '';\n}\n\nexport function getZoneName(isUTC: boolean) {\n  return isUTC ? 'Coordinated Universal Time' : '';\n}\n","import { addFormatToken } from '../format/format';\nimport { getSeconds } from '../utils/date-getters';\nimport { addRegexToken, match1to2, match2 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { SECOND } from './constants';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { DateFormatterOptions } from '../types';\n\n\nexport function initSecond() {\n// FORMATTING\n\n  addFormatToken('s', ['ss', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getSeconds(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('second', 's');\n\n// PRIORITY\n\n  addUnitPriority('second', 15);\n\n// PARSING\n\n  addRegexToken('s', match1to2);\n  addRegexToken('ss', match1to2, match2);\n  addParseToken(['s', 'ss'], SECOND);\n}\n","import { addFormatToken } from '../format/format';\nimport { getMinutes } from '../utils/date-getters';\nimport { addRegexToken, match1to2, match2 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { MINUTE } from './constants';\nimport { addUnitPriority } from './priorities';\nimport { addUnitAlias } from './aliases';\nimport { DateFormatterOptions } from '../types';\n\n\nexport function initMinute() {\n// FORMATTING\n\n  addFormatToken('m', ['mm', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getMinutes(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('minute', 'm');\n\n// PRIORITY\n\n  addUnitPriority('minute', 14);\n\n// PARSING\n\n  addRegexToken('m', match1to2);\n  addRegexToken('mm', match1to2, match2);\n  addParseToken(['m', 'mm'], MINUTE);\n}\n","// tslint:disable:no-bitwise\n// FORMATTING\n\nimport { addFormatToken } from '../format/format';\nimport { addRegexToken, match1, match1to3, match2, match3, matchUnsigned } from '../parse/regex';\nimport { MILLISECOND } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { addParseToken } from '../parse/token';\nimport { DateArray, DateFormatterOptions, WeekParsing } from '../types';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { getMilliseconds } from '../utils/date-getters';\n\n\nexport function initMillisecond() {\n  addFormatToken('S', null, null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (~~(getMilliseconds(date, opts.isUTC) / 100)).toString(10);\n    }\n  );\n\n  addFormatToken(null, ['SS', 2, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (~~(getMilliseconds(date, opts.isUTC) / 10)).toString(10);\n    }\n  );\n\n  addFormatToken(null, ['SSS', 3, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC)).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSS', 4, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 10).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSSS', 5, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 100).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSSSS', 6, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 1000).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSSSSS', 7, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 10000).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSSSSSS', 8, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 100000).toString(10);\n    }\n  );\n  addFormatToken(null, ['SSSSSSSSS', 9, false], null,\n    function(date: Date, opts: DateFormatterOptions): string {\n      return (getMilliseconds(date, opts.isUTC) * 1000000).toString(10);\n    }\n  );\n\n\n// ALIASES\n\n  addUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\n  addUnitPriority('millisecond', 16);\n\n// PARSING\n\n  addRegexToken('S', match1to3, match1);\n  addRegexToken('SS', match1to3, match2);\n  addRegexToken('SSS', match1to3, match3);\n\n  let token;\n  for (token = 'SSSS'; token.length <= 9; token += 'S') {\n    addRegexToken(token, matchUnsigned);\n  }\n\n  function parseMs(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n    array[MILLISECOND] = toInt(parseFloat(`0.${input}`) * 1000);\n\n    return config;\n  }\n\n  for (token = 'S'; token.length <= 9; token += 'S') {\n    addParseToken(token, parseMs);\n  }\n// MOMENTS\n}\n","import { addFormatToken } from '../format/format';\nimport { getDate } from '../utils/date-getters';\nimport { addRegexToken, match1to2, match2 } from '../parse/regex';\nimport { addParseToken } from '../parse/token';\nimport { DATE } from './constants';\nimport { toInt } from '../utils/type-checks';\nimport { DateArray, DateFormatterOptions } from '../types';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\nimport { DateParsingConfig } from '../create/parsing.types';\n\n\nexport function initDayOfMonth() {\n// FORMATTING\n\n  addFormatToken('D', ['DD', 2, false], 'Do',\n    function(date: Date, opts: DateFormatterOptions): string {\n      return getDate(date, opts.isUTC)\n        .toString(10);\n    }\n  );\n\n// ALIASES\n\n  addUnitAlias('date', 'D');\n\n// PRIOROITY\n  addUnitPriority('date', 9);\n\n// PARSING\n\n  addRegexToken('D', match1to2);\n  addRegexToken('DD', match1to2, match2);\n  addRegexToken('Do', function(isStrict, locale) {\n    return locale._dayOfMonthOrdinalParse || locale._ordinalParse;\n  });\n\n  addParseToken(['D', 'DD'], DATE);\n  addParseToken(\n    'Do',\n    function(input: string, array: DateArray, config: DateParsingConfig): DateParsingConfig {\n      array[DATE] = toInt(input.match(match1to2)[0]);\n\n      return config;\n    }\n  );\n}\n","import { toInt } from '../utils/type-checks';\nimport { createDuration } from './create';\nimport { Duration } from './constructor';\nimport { DateObject } from '../types';\n\nconst ordering: (keyof DateObject)[] = ['year', 'quarter', 'month', 'week', 'day', 'hours', 'minutes', 'seconds', 'milliseconds'];\nconst orderingHash = ordering.reduce((mem: { [key: string]: boolean }, order) => {\n  mem[order] = true;\n\n  return mem;\n}, {});\n\nexport function isDurationValid(duration: Partial<DateObject>): boolean {\n  const durationKeys = Object.keys(duration);\n  if (durationKeys\n      .some((key: keyof DateObject) => {\n        return (key in orderingHash)\n          && duration[key] === null\n          || isNaN(duration[key]);\n      })) {\n    return false;\n  }\n  // for (let key in duration) {\n  //   if (!(indexOf.call(ordering, key) !== -1 && (duration[key] == null || !isNaN(duration[key])))) {\n  //     return false;\n  //   }\n  // }\n\n  let unitHasDecimal = false;\n  for (let i = 0; i < ordering.length; ++i) {\n    if (duration[ordering[i]]) {\n      // only allow non-integers for smallest unit\n      if (unitHasDecimal) {\n        return false;\n      }\n      if (duration[ordering[i]] !== toInt(duration[ordering[i]])) {\n        unitHasDecimal = true;\n      }\n    }\n  }\n\n  return true;\n}\n\n// export function isValid() {\n//   return this._isValid;\n// }\n//\n// export function createInvalid(): Duration {\n//   return createDuration(NaN);\n// }\n","export function absCeil (number: number): number {\n  return number < 0 ? Math.floor(number) : Math.ceil(number);\n}\n","import { Duration } from './constructor';\nimport { absFloor } from '../utils';\nimport { absCeil } from '../utils/abs-ceil';\n\nexport function bubble(dur: Duration): Duration {\n  let milliseconds = dur._milliseconds;\n  let days = dur._days;\n  let months = dur._months;\n  const data = dur._data;\n\n  // if we have a mix of positive and negative values, bubble down first\n  // check: https://github.com/moment/moment/issues/2166\n  if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n      (milliseconds <= 0 && days <= 0 && months <= 0))) {\n    milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n    days = 0;\n    months = 0;\n  }\n\n  // The following code bubbles up values, see the tests for\n  // examples of what that means.\n  data.milliseconds = milliseconds % 1000;\n\n  const seconds = absFloor(milliseconds / 1000);\n  data.seconds = seconds % 60;\n\n  const minutes = absFloor(seconds / 60);\n  data.minutes = minutes % 60;\n\n  const hours = absFloor(minutes / 60);\n  data.hours = hours % 24;\n\n  days += absFloor(hours / 24);\n\n  // convert days to months\n  const monthsFromDays = absFloor(daysToMonths(days));\n  months += monthsFromDays;\n  days -= absCeil(monthsToDays(monthsFromDays));\n\n  // 12 months -> 1 year\n  const years = absFloor(months / 12);\n  months %= 12;\n\n  data.day = days;\n  data.month = months;\n  data.year = years;\n\n  return dur;\n}\n\nexport function daysToMonths(day: number): number {\n  // 400 years have 146097 days (taking into account leap year rules)\n  // 400 years have 12 months === 4800\n  return day * 4800 / 146097;\n}\n\nexport function monthsToDays(month: number): number {\n  // the reverse of daysToMonths\n  return month * 146097 / 4800;\n}\n","// tslint:disable:cyclomatic-complexity\nimport { createDuration } from './create';\nimport { Locale } from '../locale/locale.class';\nimport { Duration } from './constructor';\n\nlet round = Math.round;\nconst thresholds: { [key: string]: number } = {\n  ss: 44,         // a few seconds to seconds\n  s: 45,         // seconds to minute\n  m: 45,         // minutes to hour\n  h: 22,         // hours to day\n  d: 26,         // days to month\n  M: 11          // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(str: 'future' | 'past', num: number,\n                           withoutSuffix: boolean, isFuture: boolean,\n                           locale: Locale): string {\n  return locale.relativeTime(num || 1, !!withoutSuffix, str, isFuture);\n}\n\nexport function relativeTime(posNegDuration: Duration, withoutSuffix: boolean, locale: Locale): string {\n  const duration = createDuration(posNegDuration).abs();\n  const seconds = round(duration.as('s'));\n  const minutes = round(duration.as('m'));\n  const hours = round(duration.as('h'));\n  const days = round(duration.as('d'));\n  const months = round(duration.as('M'));\n  const years = round(duration.as('y'));\n\n  const a: [string] | [string, number] =\n    seconds <= thresholds.ss && ['s', seconds] ||\n    seconds < thresholds.s && ['ss', seconds] ||\n    minutes <= 1 && ['m'] ||\n    minutes < thresholds.m && ['mm', minutes] ||\n    hours <= 1 && ['h'] ||\n    hours < thresholds.h && ['hh', hours] ||\n    days <= 1 && ['d'] ||\n    days < thresholds.d && ['dd', days] ||\n    months <= 1 && ['M'] ||\n    months < thresholds.M && ['MM', months] ||\n    years <= 1 && ['y'] || ['yy', years];\n\n  const b: [string, number | string, boolean, boolean, Locale] =\n    [a[0], a[1], withoutSuffix, +posNegDuration > 0, locale];\n  // a[2] = withoutSuffix;\n  // a[3] = +posNegDuration > 0;\n  // a[4] = locale;\n\n  return substituteTimeAgo.apply(null, b);\n}\n\n// This function allows you to set the rounding function for relative time strings\nexport function getSetRelativeTimeRounding(roundingFunction: any): boolean | Function {\n  if (roundingFunction === undefined) {\n    return round;\n  }\n  if (typeof(roundingFunction) === 'function') {\n    round = roundingFunction;\n\n    return true;\n  }\n\n  return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nexport function getSetRelativeTimeThreshold(threshold: string, limit: number): boolean | number {\n  if (thresholds[threshold] === undefined) {\n    return false;\n  }\n  if (limit === undefined) {\n    return thresholds[threshold];\n  }\n  thresholds[threshold] = limit;\n  if (threshold === 's') {\n    thresholds.ss = limit - 1;\n  }\n\n  return true;\n}\n\n// export function humanize(withSuffix) {\n//   if (!this.isValid()) {\n//     return this.localeData().invalidDate();\n//   }\n//\n//   const locale = this.localeData();\n//   let output = relativeTime(this, !withSuffix, locale);\n//\n//   if (withSuffix) {\n//     output = locale.pastFuture(+this, output);\n//   }\n//\n//   return locale.postformat(output);\n// }\n","import { getLocale } from '../locale/locales';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { isDurationValid } from './valid';\nimport { bubble, daysToMonths, monthsToDays } from './bubble';\nimport { DateObject } from '../types';\nimport { Locale } from '../locale/locale.class';\nimport { normalizeUnits } from '../units/aliases';\nimport { relativeTime } from './humanize';\nimport { toInt } from '../utils/type-checks';\n\nexport class Duration {\n  _milliseconds: number;\n  _days: number;\n  _months: number;\n  _data: Partial<DateObject> = {};\n  _locale: Locale = getLocale();\n  _isValid: boolean;\n\n  constructor(duration: Partial<DateObject>, config: DateParsingConfig = {}) {\n    this._locale = config && config._locale || getLocale();\n    // const normalizedInput = normalizeObjectUnits(duration);\n    const normalizedInput = duration;\n    const years = normalizedInput.year || 0;\n    const quarters = normalizedInput.quarter || 0;\n    const months = normalizedInput.month || 0;\n    const weeks = normalizedInput.week || 0;\n    const days = normalizedInput.day || 0;\n    const hours = normalizedInput.hours || 0;\n    const minutes = normalizedInput.minutes || 0;\n    const seconds = normalizedInput.seconds || 0;\n    const milliseconds = normalizedInput.milliseconds || 0;\n\n    this._isValid = isDurationValid(normalizedInput);\n\n    // representation for dateAddRemove\n    this._milliseconds = +milliseconds +\n      seconds * 1000 +\n      minutes * 60 * 1000 + // 1000 * 60\n      hours * 1000 * 60 * 60; // using 1000 * 60 * 60\n    // instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n    // Because of dateAddRemove treats 24 hours as different from a\n    // day when working around DST, we need to store them separately\n    this._days = +days +\n      weeks * 7;\n    // It is impossible to translate months into days without knowing\n    // which months you are are talking about, so we have to store\n    // it separately.\n    this._months = +months +\n      quarters * 3 +\n      years * 12;\n\n    // this._data = {};\n\n    // this._locale = getLocale();\n\n    // this._bubble();\n    return bubble(this);\n  }\n\n  isValid(): boolean {\n    return this._isValid;\n  }\n\n  humanize(withSuffix?: boolean): string {\n    // throw new Error(`TODO: implement`);\n\n    if (!this.isValid()) {\n      return this.localeData().invalidDate;\n    }\n\n    const locale = this.localeData();\n    let output = relativeTime(this, !withSuffix, locale);\n\n    if (withSuffix) {\n      output = locale.pastFuture(+this, output);\n    }\n\n    return locale.postformat(output);\n  }\n\n  localeData(): Locale {\n    return this._locale;\n  }\n\n  locale(): string;\n  locale(localeKey: string): Duration;\n  locale(localeKey?: string): Duration | string {\n    if (!localeKey) {\n      return this._locale._abbr;\n    }\n\n    this._locale = getLocale(localeKey) || this._locale;\n\n    return this;\n  }\n\n\n  abs(): Duration {\n    const mathAbs = Math.abs;\n\n    const data = this._data;\n\n    this._milliseconds = mathAbs(this._milliseconds);\n    this._days = mathAbs(this._days);\n    this._months = mathAbs(this._months);\n\n    data.milliseconds = mathAbs(data.milliseconds);\n    data.seconds = mathAbs(data.seconds);\n    data.minutes = mathAbs(data.minutes);\n    data.hours = mathAbs(data.hours);\n    data.month = mathAbs(data.month);\n    data.year = mathAbs(data.year);\n\n    return this;\n  }\n\n  as(_units: string): number {\n    if (!this.isValid()) {\n      return NaN;\n    }\n    let days;\n    let months;\n    const milliseconds = this._milliseconds;\n\n    const units = normalizeUnits(_units);\n\n    if (units === 'month' || units === 'year') {\n      days = this._days + milliseconds / 864e5;\n      months = this._months + daysToMonths(days);\n\n      return units === 'month' ? months : months / 12;\n    }\n\n    // handle milliseconds separately because of floating point math errors (issue #1867)\n    days = this._days + Math.round(monthsToDays(this._months));\n    switch (units) {\n      case 'week'   :\n        return days / 7 + milliseconds / 6048e5;\n      case 'day'    :\n        return days + milliseconds / 864e5;\n      case 'hours'   :\n        return days * 24 + milliseconds / 36e5;\n      case 'minutes' :\n        return days * 1440 + milliseconds / 6e4;\n      case 'seconds' :\n        return days * 86400 + milliseconds / 1000;\n      // Math.floor prevents floating point math errors here\n      case 'milliseconds':\n        return Math.floor(days * 864e5) + milliseconds;\n      default:\n        throw new Error(`Unknown unit ${units}`);\n    }\n  }\n\n  valueOf () {\n    if (!this.isValid()) {\n      return NaN;\n    }\n\n    return (\n      this._milliseconds +\n      this._days * 864e5 +\n      (this._months % 12) * 2592e6 +\n      toInt(this._months / 12) * 31536e6\n    );\n  }\n}\n\nexport function isDuration(obj: any): obj is Duration {\n  return obj instanceof Duration;\n}\n","import { DateParsingConfig } from './parsing.types';\nimport { getParsingFlags } from './parsing-flags';\n\nexport function isValid(config: DateParsingConfig): boolean {\n  if (config._isValid == null) {\n    const flags = getParsingFlags(config);\n    const parsedParts = Array.prototype.some.call(flags.parsedDateParts, function (i: number) {\n      return i != null;\n    });\n    let isNowValid = !isNaN(config._d && config._d.getTime()) &&\n      flags.overflow < 0 &&\n      !flags.empty &&\n      !flags.invalidMonth &&\n      !flags.invalidWeekday &&\n      !flags.weekdayMismatch &&\n      !flags.nullInput &&\n      !flags.invalidFormat &&\n      !flags.userInvalidated &&\n      (!flags.meridiem || (flags.meridiem && parsedParts));\n\n    if (config._strict) {\n      isNowValid = isNowValid &&\n        flags.charsLeftOver === 0 &&\n        flags.unusedTokens.length === 0 &&\n        flags.bigHour === undefined;\n    }\n\n    if (Object.isFrozen == null || !Object.isFrozen(config)) {\n      config._isValid = isNowValid;\n    } else {\n      return isNowValid;\n    }\n  }\n\n  return config._isValid;\n}\n\nexport function createInvalid(config: DateParsingConfig, flags?: { nullInput: boolean }): DateParsingConfig {\n  config._d = new Date(NaN);\n  Object.assign(getParsingFlags(config), flags || { userInvalidated: true });\n\n  return config;\n}\n\nexport function markInvalid(config: DateParsingConfig): DateParsingConfig {\n  config._isValid = false;\n\n  return config;\n}\n","// tslint:disable-next-line\nimport { defaultLocaleMonthsShort, defaultLocaleWeekdaysShort } from '../locale/locale.class';\nimport { DateArray } from '../types';\nimport { DateParsingConfig } from './parsing.types';\nimport { isString } from '../utils/type-checks';\nimport { configFromStringAndFormat } from './from-string-and-format';\nimport { createUTCDate } from './date-from-array';\nimport { createInvalid, markInvalid } from './valid';\nimport { getParsingFlags } from './parsing-flags';\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n// tslint:disable-next-line\nconst extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n// tslint:disable-next-line\nconst basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\nconst tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nconst isoDates: [string, RegExp, boolean][] = [\n  ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/, true],\n  ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/, true],\n  ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/, true],\n  ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n  ['YYYY-DDD', /\\d{4}-\\d{3}/, true],\n  ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n  ['YYYYYYMMDD', /[+-]\\d{10}/, true],\n  ['YYYYMMDD', /\\d{8}/, true],\n  // YYYYMM is NOT allowed by the standard\n  ['GGGG[W]WWE', /\\d{4}W\\d{3}/, true],\n  ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n  ['YYYYDDD', /\\d{7}/, true]\n];\n\n// iso time formats and regexes\nconst isoTimes: [string, RegExp][] = [\n  ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n  ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n  ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n  ['HH:mm', /\\d\\d:\\d\\d/],\n  ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n  ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n  ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n  ['HHmm', /\\d\\d\\d\\d/],\n  ['HH', /\\d\\d/]\n];\n\nconst aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\nconst obsOffsets: { [key: string]: number } = {\n  UT: 0,\n  GMT: 0,\n  EDT: -4 * 60,\n  EST: -5 * 60,\n  CDT: -5 * 60,\n  CST: -6 * 60,\n  MDT: -6 * 60,\n  MST: -7 * 60,\n  PDT: -7 * 60,\n  PST: -8 * 60\n};\n\n// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n// tslint:disable-next-line\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n// date from iso format\nexport function configFromISO(config: DateParsingConfig): DateParsingConfig {\n  if (!isString(config._i)) {\n    return config;\n  }\n\n  const input = config._i;\n  const match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n\n\n  let allowTime;\n  let dateFormat;\n  let timeFormat;\n  let tzFormat;\n\n  if (!match) {\n    config._isValid = false;\n\n    return config;\n  }\n\n  // getParsingFlags(config).iso = true;\n  let i;\n  let l;\n  for (i = 0, l = isoDates.length; i < l; i++) {\n    if (isoDates[i][1].exec(match[1])) {\n      dateFormat = isoDates[i][0];\n      allowTime = isoDates[i][2] !== false;\n      break;\n    }\n  }\n\n  if (dateFormat == null) {\n    config._isValid = false;\n\n    return config;\n  }\n\n  if (match[3]) {\n    for (i = 0, l = isoTimes.length; i < l; i++) {\n      if (isoTimes[i][1].exec(match[3])) {\n        // match[2] should be 'T' or space\n        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n        break;\n      }\n    }\n\n    if (timeFormat == null) {\n      config._isValid = false;\n\n      return config;\n    }\n\n  }\n  if (!allowTime && timeFormat != null) {\n    config._isValid = false;\n\n    return config;\n  }\n\n  if (match[4]) {\n    if (tzRegex.exec(match[4])) {\n      tzFormat = 'Z';\n    } else {\n      config._isValid = false;\n\n      return config;\n    }\n  }\n\n  config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n\n  return configFromStringAndFormat(config);\n}\n\n// tslint:disable-next-line\nfunction extractFromRFC2822Strings(yearStr: string, monthStr: string, dayStr: string, hourStr: string, minuteStr: string, secondStr: string): DateArray {\n  const result = [\n    untruncateYear(yearStr),\n    defaultLocaleMonthsShort.indexOf(monthStr),\n    parseInt(dayStr, 10),\n    parseInt(hourStr, 10),\n    parseInt(minuteStr, 10)\n  ];\n\n  if (secondStr) {\n    result.push(parseInt(secondStr, 10));\n  }\n\n  return result;\n}\n\nfunction untruncateYear(yearStr: string): number {\n  const year = parseInt(yearStr, 10);\n\n  return year <= 49 ? year + 2000 : year;\n}\n\nfunction preprocessRFC2822(str: string): string {\n  // Remove comments and folding whitespace and replace multiple-spaces with a single space\n  return str\n    .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n    .replace(/(\\s\\s+)/g, ' ').trim();\n}\n\nfunction checkWeekday(weekdayStr: string, parsedInput: DateArray, config: DateParsingConfig): boolean {\n  if (weekdayStr) {\n    // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n    const weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr);\n    const weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n    if (weekdayProvided !== weekdayActual) {\n      getParsingFlags(config).weekdayMismatch = true;\n      config._isValid = false;\n\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction calculateOffset(obsOffset: string, militaryOffset: string, numOffset: string) {\n  if (obsOffset) {\n    return obsOffsets[obsOffset];\n  } else if (militaryOffset) {\n    // the only allowed military tz is Z\n    return 0;\n  } else {\n    const hm = parseInt(numOffset, 10);\n    const m = hm % 100;\n    const h = (hm - m) / 100;\n\n    return h * 60 + m;\n  }\n}\n\n// date and time from ref 2822 format\nexport function configFromRFC2822(config: DateParsingConfig): DateParsingConfig {\n  if (!isString(config._i)) {\n    return config;\n  }\n\n  const match = rfc2822.exec(preprocessRFC2822(config._i));\n\n  if (!match) {\n    return markInvalid(config);\n  }\n\n  const parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n  if (!checkWeekday(match[1], parsedArray, config)) {\n    return config;\n  }\n\n  config._a = parsedArray;\n  config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n  config._d = createUTCDate.apply(null, config._a);\n  config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n  getParsingFlags(config).rfc2822 = true;\n\n  return config;\n}\n\n// date from iso format or fallback\nexport function configFromString(config: DateParsingConfig): DateParsingConfig {\n  if (!isString(config._i)) {\n    return config;\n  }\n\n  const matched = aspNetJsonRegex.exec(config._i);\n\n  if (matched !== null) {\n    config._d = new Date(+matched[1]);\n\n    return config;\n  }\n\n  // todo: update logic processing\n  // isISO -> configFromISO\n  // isRFC -> configFromRFC\n\n  configFromISO(config);\n  if (config._isValid === false) {\n    delete config._isValid;\n  } else {\n    return config;\n  }\n\n  configFromRFC2822(config);\n  if (config._isValid === false) {\n    delete config._isValid;\n  } else {\n    return config;\n  }\n\n  // Final attempt, use Input Fallback\n  // hooks.createFromInputFallback(config);\n  return createInvalid(config);\n}\n\n// hooks.createFromInputFallback = deprecate(\n//     'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n//     'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n//     'discouraged and will be removed in an upcoming major release. Please refer to ' +\n//     'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n//     function (config) {\n//         config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n//     }\n// );\n","// moment.js\n// version : 2.18.1\n// authors : Tim Wood, Iskren Chernev, Moment.js contributors\n// license : MIT\n// momentjs.com\n\nimport './units/index';\nimport { formatFunctions, makeFormatFunction } from './format/format';\nimport { Locale } from './locale/locale.class';\nimport { getLocale } from './locale/locales';\nimport { isDateValid } from './utils/type-checks';\n\nexport function formatDate(date: Date, format: string, locale?: string, isUTC?: boolean, offset = 0): string {\n  const _locale = getLocale(locale || 'en');\n  if (!_locale) {\n    throw new Error(\n      `Locale \"${locale}\" is not defined, please add it with \"defineLocale(...)\"`\n    );\n  }\n\n  const _format = format || (isUTC ?  'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ssZ');\n\n  const output = formatMoment(date, _format, _locale, isUTC, offset);\n\n  if (!output) {\n    return output;\n  }\n\n  return _locale.postformat(output);\n}\n\n// format date using native date object\nexport function formatMoment(date: Date, _format: string, locale: Locale, isUTC?: boolean, offset = 0): string {\n  if (!isDateValid(date)) {\n    return locale.invalidDate;\n  }\n\n  const format = expandFormat(_format, locale);\n  formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n  return formatFunctions[format](date, locale, isUTC, offset);\n}\n\nexport function expandFormat(_format: string, locale: Locale): string {\n  let format = _format;\n  let i = 5;\n  const localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n  const replaceLongDateFormatTokens = (input: any) => {\n    return locale.formatLongDate(input) || input;\n  };\n\n  localFormattingTokens.lastIndex = 0;\n  while (i >= 0 && localFormattingTokens.test(format)) {\n    format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n    localFormattingTokens.lastIndex = 0;\n    i -= 1;\n  }\n\n  return format;\n}\n","// Pick the first defined of two or three arguments.\nexport function defaults<T>(a?: T, b?: T, c?: T): T {\n  if (a != null) {\n    return a;\n  }\n  if (b != null) {\n    return b;\n  }\n\n  return c;\n}\n","import { DateParsingConfig } from './parsing.types';\nimport { DateArray } from '../types';\nimport { DATE, HOUR, MILLISECOND, MINUTE, MONTH, SECOND, YEAR } from '../units/constants';\nimport { daysInYear } from '../units/year';\nimport { getParsingFlags } from './parsing-flags';\nimport { createUTCDate } from './date-from-array';\nimport { createDate } from './date-from-array';\nimport { dayOfYearFromWeeks, weekOfYear, weeksInYear } from '../units/week-calendar-utils';\nimport { defaults } from '../utils/defaults';\n\nfunction currentDateArray(config: DateParsingConfig): DateArray {\n  const nowValue = new Date();\n\n  if (config._useUTC) {\n    return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n  }\n\n  return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nexport function configFromArray(config: DateParsingConfig): DateParsingConfig {\n  const input = [];\n  let i;\n  let date;\n  let currentDate;\n  let expectedWeekday;\n  let yearToUse;\n\n  if (config._d) {\n    return config;\n  }\n\n  currentDate = currentDateArray(config);\n\n  // compute day of the year from weeks and weekdays\n  if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n    dayOfYearFromWeekInfo(config);\n  }\n\n  // if the day of the year is set, figure out what it is\n  if (config._dayOfYear != null) {\n    yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n    if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n      getParsingFlags(config)._overflowDayOfYear = true;\n    }\n\n    date = new Date(Date.UTC(yearToUse, 0, config._dayOfYear));\n    config._a[MONTH] = date.getUTCMonth();\n    config._a[DATE] = date.getUTCDate();\n  }\n\n  // Default to current date.\n  // * if no year, month, day of month are given, default to today\n  // * if day of month is given, default month and year\n  // * if month is given, default only year\n  // * if year is given, don't default anything\n  for (i = 0; i < 3 && config._a[i] == null; ++i) {\n    config._a[i] = input[i] = currentDate[i];\n  }\n\n  // Zero out whatever was not defaulted, including time\n  for (; i < 7; i++) {\n    config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n  }\n\n  // Check for 24:00:00.000\n  if (config._a[HOUR] === 24 &&\n    config._a[MINUTE] === 0 &&\n    config._a[SECOND] === 0 &&\n    config._a[MILLISECOND] === 0) {\n    config._nextDay = true;\n    config._a[HOUR] = 0;\n  }\n\n  config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n  expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n  // Apply timezone offset from input. The actual utcOffset can be changed\n  // with parseZone.\n  if (config._tzm != null) {\n    config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n  }\n\n  if (config._nextDay) {\n    config._a[HOUR] = 24;\n  }\n\n  // check for mismatching day of week\n  if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n    getParsingFlags(config).weekdayMismatch = true;\n  }\n\n  return config;\n}\n\nfunction dayOfYearFromWeekInfo(config: DateParsingConfig): DateParsingConfig {\n  let w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n  w = config._w;\n  if (w.GG != null || w.W != null || w.E != null) {\n    dow = 1;\n    doy = 4;\n\n    // TODO: We need to take the current isoWeekYear, but that depends on\n    // how we interpret now (local, utc, fixed offset). So create\n    // a now version of current config (take local/utc/offset flags, and\n    // create now).\n    weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(new Date(), 1, 4).year);\n    week = defaults(w.W, 1);\n    weekday = defaults(w.E, 1);\n    if (weekday < 1 || weekday > 7) {\n      weekdayOverflow = true;\n    }\n  } else {\n    dow = config._locale._week.dow;\n    doy = config._locale._week.doy;\n\n    const curWeek = weekOfYear(new Date(), dow, doy);\n\n    weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n    // Default to current week.\n    week = defaults(w.w, curWeek.week);\n\n    if (w.d != null) {\n      // weekday -- low day numbers are considered next week\n      weekday = w.d;\n      if (weekday < 0 || weekday > 6) {\n        weekdayOverflow = true;\n      }\n    } else if (w.e != null) {\n      // local weekday -- counting starts from begining of week\n      weekday = w.e + dow;\n      if (w.e < 0 || w.e > 6) {\n        weekdayOverflow = true;\n      }\n    } else {\n      // default to begining of week\n      weekday = dow;\n    }\n  }\n  if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n    getParsingFlags(config)._overflowWeeks = true;\n  } else if (weekdayOverflow != null) {\n    getParsingFlags(config)._overflowWeekday = true;\n  } else {\n    temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n    config._a[YEAR] = temp.year;\n    config._dayOfYear = temp.dayOfYear;\n  }\n\n  return config;\n}\n","import { getParsingFlags } from './parsing-flags';\nimport { DATE, HOUR, MILLISECOND, MINUTE, MONTH, SECOND, WEEK, WEEKDAY, YEAR } from '../units/constants';\nimport { daysInMonth } from '../units/month';\nimport { DateParsingConfig } from './parsing.types';\n\nexport function checkOverflow(config: DateParsingConfig): DateParsingConfig {\n  let overflow;\n  const a = config._a;\n\n  if (a && getParsingFlags(config).overflow === -2) {\n    // todo: fix this sh*t\n    overflow =\n      a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n        a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n          a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n            a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n              a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n                  -1;\n\n    if (getParsingFlags(config)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n      overflow = DATE;\n    }\n    if (getParsingFlags(config)._overflowWeeks && overflow === -1) {\n      overflow = WEEK;\n    }\n    if (getParsingFlags(config)._overflowWeekday && overflow === -1) {\n      overflow = WEEKDAY;\n    }\n\n    getParsingFlags(config).overflow = overflow;\n  }\n\n  return config;\n}\n\n","import { DateParsingConfig } from './parsing.types';\nimport { configFromISO, configFromRFC2822 } from './from-string';\nimport { expandFormat } from '../format';\nimport { formattingTokens, formatTokenFunctions } from '../format/format';\nimport { isArray, isString } from '../utils/type-checks';\nimport { getParseRegexForToken } from '../parse/regex';\nimport { addTimeToArrayFromToken } from '../parse/token';\nimport { HOUR } from '../units/constants';\nimport { configFromArray } from './from-array';\nimport { getParsingFlags } from './parsing-flags';\nimport { checkOverflow } from './check-overflow';\nimport { Locale } from '../locale/locale.class';\n\n// constant that refers to the ISO standard\n// hooks.ISO_8601 = function () {};\nexport const ISO_8601 = 'ISO_8601';\n\n// constant that refers to the RFC 2822 form\n// hooks.RFC_2822 = function () {};\nexport const RFC_2822 = 'RFC_2822';\n\n// date from string and format string\nexport function configFromStringAndFormat(config: DateParsingConfig): DateParsingConfig {\n  // TODO: Move this to another part of the creation flow to prevent circular deps\n  if (config._f === ISO_8601) {\n    return configFromISO(config);\n  }\n  if (config._f === RFC_2822) {\n    return configFromRFC2822(config);\n  }\n  config._a = [];\n  getParsingFlags(config).empty = true;\n\n  if (isArray(config._f) || (!config._i && config._i !== 0)) {\n    return config;\n  }\n\n  // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n  let input = config._i.toString();\n  let totalParsedInputLength = 0;\n  const inputLength = input.length;\n  const tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n  let i;\n  let token;\n  let parsedInput;\n  let skipped;\n  for (i = 0; i < tokens.length; i++) {\n    token = tokens[i];\n    parsedInput = (input.match(getParseRegexForToken(token, config._locale)) || [])[0];\n    if (parsedInput) {\n      skipped = input.substr(0, input.indexOf(parsedInput));\n      if (skipped.length > 0) {\n        getParsingFlags(config).unusedInput.push(skipped);\n      }\n      input = input.slice(input.indexOf(parsedInput) + parsedInput.length);\n      totalParsedInputLength += parsedInput.length;\n    }\n    // don't parse if it's not a known token\n    if (formatTokenFunctions[token]) {\n      if (parsedInput) {\n        getParsingFlags(config).empty = false;\n      } else {\n        getParsingFlags(config).unusedTokens.push(token);\n      }\n\n      addTimeToArrayFromToken(token, parsedInput, config);\n    } else if (config._strict && !parsedInput) {\n      getParsingFlags(config).unusedTokens.push(token);\n    }\n  }\n\n  // add remaining unparsed input length to the string\n  getParsingFlags(config).charsLeftOver = inputLength - totalParsedInputLength;\n  if (input.length > 0) {\n    getParsingFlags(config).unusedInput.push(input);\n  }\n\n  // clear _12h flag if hour is <= 12\n  if (config._a[HOUR] <= 12 &&\n    getParsingFlags(config).bigHour === true &&\n    config._a[HOUR] > 0) {\n    getParsingFlags(config).bigHour = void 0;\n  }\n\n  getParsingFlags(config).parsedDateParts = config._a.slice(0);\n  getParsingFlags(config).meridiem = config._meridiem;\n  // handle meridiem\n  config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n  configFromArray(config);\n\n  return checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap(locale: Locale, _hour: number, meridiem: string): number {\n  let hour = _hour;\n\n  if (meridiem == null) {\n    // nothing to do\n    return hour;\n  }\n\n  if (locale.meridiemHour != null) {\n    return locale.meridiemHour(hour, meridiem);\n  }\n\n  if (locale.isPM == null) {\n    // this is not supposed to happen\n    return hour;\n  }\n  // Fallback\n  const isPm = locale.isPM(meridiem);\n  if (isPm && hour < 12) {\n    hour += 12;\n  }\n\n  if (!isPm && hour === 12) {\n    hour = 0;\n  }\n\n  return hour;\n}\n","import { normalizeObjectUnits } from '../units/aliases';\nimport { configFromArray } from './from-array';\nimport { DateParsingConfig } from './parsing.types';\nimport { isObject, isString } from '../utils/type-checks';\n\nexport function configFromObject(config: DateParsingConfig): DateParsingConfig {\n  if (config._d) {\n    return config;\n  }\n\n  const input = config._i;\n  if (isObject(input)) {\n    const i = normalizeObjectUnits(input as any);\n    config._a = [i.year, i.month, i.day, i.hours, i.minutes, i.seconds, i.milliseconds]\n    // todo: obsolete -> remove it\n      .map(obj => isString(obj) ? parseInt(obj, 10) : obj);\n  }\n\n  return configFromArray(config);\n}\n","// tslint:disable:max-line-length\nimport { isArray, isDate, isNumber, isObject, isObjectEmpty, isString, isUndefined } from '../utils/type-checks';\nimport { DateParsingConfig } from './parsing.types';\nimport { getLocale } from '../locale/locales';\nimport { createInvalid, isValid } from './valid';\nimport { configFromStringAndArray } from './from-string-and-array';\nimport { configFromStringAndFormat } from './from-string-and-format';\nimport { cloneDate } from './clone';\nimport { configFromString } from './from-string';\nimport { configFromArray } from './from-array';\nimport { configFromObject } from './from-object';\nimport { checkOverflow } from './check-overflow';\nimport { DateInput } from '../test/chain';\n\nfunction createFromConfig(config: DateParsingConfig): DateParsingConfig {\n  const res = checkOverflow(prepareConfig(config));\n  // todo: remove, in moment.js it's never called cuz of moment constructor\n  res._d = new Date(res._d != null ? res._d.getTime() : NaN);\n  if (!isValid(Object.assign({}, res, {_isValid: null}))) {\n    res._d = new Date(NaN);\n  }\n  // todo: update offset\n  /*if (res._nextDay) {\n    // Adding is smart enough around DST\n    res._d = add(res._d, 1, 'day');\n    res._nextDay = undefined;\n  }*/\n\n  return res;\n}\n\nexport function prepareConfig(config: DateParsingConfig): DateParsingConfig {\n  let input = config._i;\n  const format = config._f;\n\n  config._locale = config._locale || getLocale(config._l);\n\n  if (input === null || (format === undefined && input === '')) {\n    return createInvalid(config, { nullInput: true });\n  }\n\n  if (isString(input)) {\n    config._i = input = config._locale.preparse(input);\n  }\n\n  if (isDate(input)) {\n    config._d = cloneDate(input);\n\n    return config;\n  }\n\n  // todo: add check for recursion\n\n  if (isArray(format)) {\n    configFromStringAndArray(config);\n  } else if (format) {\n    configFromStringAndFormat(config);\n  } else {\n    configFromInput(config);\n  }\n\n  if (!isValid(config)) {\n    config._d = null;\n  }\n\n  return config;\n}\n\nfunction configFromInput(config: DateParsingConfig): DateParsingConfig {\n  const input = config._i;\n  if (isUndefined(input)) {\n    config._d = new Date();\n  } else if (isDate(input)) {\n    config._d = cloneDate(input);\n  } else if (isString(input)) {\n    configFromString(config);\n  } else if (isArray<string | number>(input) && input.length) {\n    const _arr: (string | number)[] = input.slice(0);\n    config._a = _arr.map(obj => isString(obj) ? parseInt(obj, 10) : obj);\n    configFromArray(config);\n  } else if (isObject(input)) {\n    configFromObject(config);\n  } else if (isNumber(input)) {\n    // from milliseconds\n    config._d = new Date(input);\n  } else {\n    //   hooks.createFromInputFallback(config);\n    return createInvalid(config);\n  }\n\n  return config;\n}\n\nexport function createLocalOrUTC(input: DateInput, format?: string | string[], localeKey?: string, strict?: boolean, isUTC?: boolean): DateParsingConfig {\n  const config: DateParsingConfig = {};\n  let _input = input;\n\n  // params switch -> skip; test it well\n  // if (localeKey === true || localeKey === false) {\n  //     strict = localeKey;\n  //     localeKey = undefined;\n  // }\n\n  // todo: fail fast and return not valid date\n  if ((isObject(_input) && isObjectEmpty(_input)) || (isArray(_input) && _input.length === 0)) {\n    _input = undefined;\n  }\n  // object construction must be done this way.\n  // https://github.com/moment/moment/issues/1423\n  // config._isAMomentObject = true;\n  config._useUTC = config._isUTC = isUTC;\n  config._l = localeKey;\n  config._i = _input;\n  config._f = format;\n  config._strict = strict;\n\n  return createFromConfig(config);\n}\n","import { DateParsingConfig } from './parsing.types';\nimport { createInvalid, isValid } from './valid';\nimport { getParsingFlags } from './parsing-flags';\nimport { configFromStringAndFormat } from './from-string-and-format';\n\n// date from string and array of format strings\nexport function configFromStringAndArray(config: DateParsingConfig): DateParsingConfig {\n  let tempConfig;\n  let bestMoment;\n  let scoreToBeat;\n  let currentScore;\n\n  if (!config._f || config._f.length === 0) {\n    getParsingFlags(config).invalidFormat = true;\n\n    return createInvalid(config);\n  }\n\n  let i;\n  for (i = 0; i < config._f.length; i++) {\n    currentScore = 0;\n    tempConfig = Object.assign({}, config);\n    if (config._useUTC != null) {\n      tempConfig._useUTC = config._useUTC;\n    }\n    tempConfig._f = config._f[i];\n    configFromStringAndFormat(tempConfig);\n\n    if (!isValid(tempConfig)) {\n      continue;\n    }\n\n    // if there is any input that was not parsed add a penalty for that format\n    currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n    // or tokens\n    currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n    getParsingFlags(tempConfig).score = currentScore;\n\n    if (scoreToBeat == null || currentScore < scoreToBeat) {\n      scoreToBeat = currentScore;\n      bestMoment = tempConfig;\n    }\n  }\n\n  return Object.assign(config, bestMoment || tempConfig);\n}\n","import { createLocalOrUTC } from './from-anything';\nimport { DateArray, DateObject } from '../types';\nimport { DateInput } from '../test/chain';\nimport { isDate } from '../utils/type-checks';\n\nexport function parseDate(input: DateInput, format?: string | string[],\n                          localeKey?: string, strict?: boolean, isUTC?: boolean): Date {\n  if (isDate(input)) {\n    return input;\n  }\n\n  const config = createLocalOrUTC(input, format, localeKey, strict, isUTC);\n\n  return config._d;\n}\n","export function absRound(num: number): number {\n  return num < 0 ? Math.round(num * -1) * -1 : Math.round(num);\n}\n","import { UnitOfTime } from '../types';\nimport { endOf, startOf } from './start-end-of';\n\nexport function isAfter(\n  date1: Date,\n  date2: Date,\n  units: UnitOfTime = 'milliseconds'\n): boolean {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  if (units === 'milliseconds') {\n    return date1.valueOf() > date2.valueOf();\n  }\n\n  return date2.valueOf() < startOf(date1, units).valueOf();\n}\n\nexport function isBefore(\n  date1: Date,\n  date2: Date,\n  units: UnitOfTime = 'milliseconds'\n): boolean {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  if (units === 'milliseconds') {\n    return date1.valueOf() < date2.valueOf();\n  }\n\n  return endOf(date1, units).valueOf() < date2.valueOf();\n}\n\nexport function isDisabledDay(date: Date, daysDisabled: number[]): boolean {\n  if (daysDisabled === undefined || !daysDisabled || !daysDisabled.length) {\n    return false;\n  }\n\n  return daysDisabled.some((day: number) => day === date.getDay());\n}\n\nexport function isBetween(\n  date: Date,\n  from: Date,\n  to: Date,\n  units: UnitOfTime,\n  inclusivity = '()'\n): boolean {\n  const leftBound =\n    inclusivity[0] === '('\n      ? isAfter(date, from, units)\n      : !isBefore(date, from, units);\n  const rightBound =\n    inclusivity[1] === ')'\n      ? isBefore(date, to, units)\n      : !isAfter(date, to, units);\n\n  return leftBound && rightBound;\n}\n\nexport function isSame(\n  date1: Date,\n  date2: Date,\n  units: UnitOfTime = 'milliseconds'\n): boolean {\n  if (!date1 || !date2) {\n    return false;\n  }\n\n  if (units === 'milliseconds') {\n    return date1.valueOf() === date2.valueOf();\n  }\n\n  const inputMs = date2.valueOf();\n\n  return (\n    startOf(date1, units).valueOf() <= inputMs &&\n    inputMs <= endOf(date1, units).valueOf()\n  );\n}\n\nexport function isSameDay(date1: Date, date2: Date):boolean{\n  return (date1.getDay() == date2.getDay());\n}\n\nexport function isSameOrAfter(\n  date1: Date,\n  date2: Date,\n  units?: UnitOfTime\n): boolean {\n  return isSame(date1, date2, units) || isAfter(date1, date2, units);\n}\n\nexport function isSameOrBefore(\n  date1: Date,\n  date2: Date,\n  units?: UnitOfTime\n): boolean {\n  return isSame(date1, date2, units) || isBefore(date1, date2, units);\n}\n","// ASP.NET json date format regex\nimport { Duration, isDuration } from './constructor';\nimport { isDateValid, isNumber, isObject, isString, toInt } from '../utils/type-checks';\nimport { DATE, HOUR, MILLISECOND, MINUTE, SECOND } from '../units/constants';\nimport { parseDate } from '../create/local';\nimport { absRound } from '../utils/abs-round';\nimport { DateObject } from '../types';\nimport { DateParsingConfig } from '../create/parsing.types';\nimport { cloneWithOffset } from '../units/offset';\nimport { isAfter, isBefore } from '../utils/date-compare';\nimport { getFullYear, getMonth } from '../utils/date-getters';\nimport { add } from '../moment/add-subtract';\nimport { cloneDate } from '../create/clone';\n\nconst aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\n// tslint:disable-next-line\nconst isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nexport type DurationInput = string | number | Duration | Partial<DateObject> | { from: Date; to: Date };\n\nexport function createDuration(input?: DurationInput, key?: string, config: DateParsingConfig = {}) {\n  const duration = convertDuration(input, key);\n  // matching against regexp is expensive, do it on demand\n\n  return new Duration(duration, config);\n}\n\nfunction convertDuration(input: any, key: string): Partial<DateObject> {\n  // checks for null or undefined\n  if (input == null) {\n    return {};\n  }\n\n  if (isDuration(input)) {\n    return {\n      milliseconds: input._milliseconds,\n      day: input._days,\n      month: input._months\n    };\n  }\n  if (isNumber(input)) {\n    // duration = {};\n    return key ? { [key]: input } : { milliseconds: input };\n  }\n\n  if (isString(input)) {\n    let match = aspNetRegex.exec(input);\n\n    if (match) {\n      const sign = (match[1] === '-') ? -1 : 1;\n\n      return {\n        year: 0,\n        day: toInt(match[DATE]) * sign,\n        hours: toInt(match[HOUR]) * sign,\n        minutes: toInt(match[MINUTE]) * sign,\n        seconds: toInt(match[SECOND]) * sign,\n        // the millisecond decimal point is included in the match\n        milliseconds: toInt(absRound(toInt(match[MILLISECOND]) * 1000)) * sign\n      };\n    }\n\n    match = isoRegex.exec(input);\n    if (match) {\n      const sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;\n\n      return {\n        year: parseIso(match[2], sign),\n        month: parseIso(match[3], sign),\n        week: parseIso(match[4], sign),\n        day: parseIso(match[5], sign),\n        hours: parseIso(match[6], sign),\n        minutes: parseIso(match[7], sign),\n        seconds: parseIso(match[8], sign)\n      };\n    }\n\n  }\n\n  if (isObject<{from: any; to: any}>(input) && ('from' in input || 'to' in input)) {\n    const diffRes = momentsDifference(parseDate(input.from), parseDate(input.to));\n\n    return {\n      milliseconds: diffRes.milliseconds,\n      month: diffRes.months\n    };\n  }\n\n  return input;\n}\n\n// createDuration.fn = Duration.prototype;\n// createDuration.invalid = invalid;\n\nfunction parseIso(inp: string, sign: number): number {\n  // We'd normally use ~~inp for this, but unfortunately it also\n  // converts floats to ints.\n  // inp may be undefined, so careful calling replace on it.\n  const res = inp && parseFloat(inp.replace(',', '.'));\n  // apply sign while we're at it\n\n  return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base: Date, other: Date): { milliseconds: number; months: number } {\n  const res = { milliseconds: 0, months: 0 };\n\n  res.months = getMonth(other) - getMonth(base) +\n    (getFullYear(other) - getFullYear(base)) * 12;\n  const _basePlus = add(cloneDate(base), res.months, 'month');\n  if (isAfter(_basePlus, other)) {\n    --res.months;\n  }\n\n  res.milliseconds = +other - +(add(cloneDate(base), res.months, 'month'));\n\n  return res;\n}\n\nfunction momentsDifference(base: Date, other: Date): { milliseconds: number; months: number } {\n  if (!(isDateValid(base) && isDateValid(other))) {\n    return { milliseconds: 0, months: 0 };\n  }\n\n  let res;\n  const _other = cloneWithOffset(other, base, {_offset: base.getTimezoneOffset()});\n  if (isBefore(base, _other)) {\n    res = positiveMomentsDifference(base, _other);\n  } else {\n    res = positiveMomentsDifference(_other, base);\n    res.milliseconds = -res.milliseconds;\n    res.months = -res.months;\n  }\n\n  return res;\n}\n","import { createDuration } from '../duration/create';\nimport { absRound } from '../utils/abs-round';\nimport { Duration } from '../duration/constructor';\nimport { getDate, getMonth, getTime } from '../utils/date-getters';\nimport { setDate, setMonth, setTime } from '../utils/date-setters';\nimport { cloneDate } from '../create/clone';\nimport { UnitOfTime } from '../types';\n\nexport function add(date: Date, val: number, period: UnitOfTime, isUTC?: boolean): Date {\n  const dur = createDuration(val, period);\n\n  return addSubtract(date, dur, 1, isUTC);\n}\n\nexport function subtract(date: Date, val: number, period: UnitOfTime, isUTC?: boolean): Date {\n  const dur = createDuration(val, period);\n\n  return addSubtract(date, dur, -1, isUTC);\n}\n\nexport function addSubtract(date: Date, duration: Duration, isAdding: number, isUTC?: boolean): Date {\n  const milliseconds = duration._milliseconds;\n  const days = absRound(duration._days);\n  const months = absRound(duration._months);\n\n  // todo: add timezones support\n  // const _updateOffset = updateOffset == null ? true : updateOffset;\n\n  if (months) {\n    setMonth(date, getMonth(date, isUTC) + months * isAdding, isUTC);\n  }\n  if (days) {\n    setDate(date, getDate(date, isUTC) + days * isAdding, isUTC);\n  }\n  if (milliseconds) {\n    setTime(date, getTime(date) + milliseconds * isAdding);\n  }\n\n  return cloneDate(date);\n  // todo: add timezones support\n  // if (_updateOffset) {\n  //   hooks.updateOffset(date, days || months);\n  // }\n}\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n\n//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\nimport { LocaleData } from '../locale/locale.class';\n\nconst symbolMap: {[key: string]: string} = {\n  1: 'Ù¡',\n  2: 'Ù¢',\n  3: 'Ù£',\n  4: 'Ù¤',\n  5: 'Ù¥',\n  6: 'Ù¦',\n  7: 'Ù§',\n  8: 'Ù¨',\n  9: 'Ù©',\n  0: 'Ù '\n};\nconst numberMap: {[key: string]: string} = {\n  'Ù¡': '1',\n  'Ù¢': '2',\n  'Ù£': '3',\n  'Ù¤': '4',\n  'Ù¥': '5',\n  'Ù¦': '6',\n  'Ù§': '7',\n  'Ù¨': '8',\n  'Ù©': '9',\n  'Ù ': '0'\n};\nconst pluralForm = function (num: number): number {\n  return num === 0 ? 0 : num === 1 ? 1 : num === 2 ? 2 : num % 100 >= 3 && num % 100 <= 10 ? 3 : num % 100 >= 11 ? 4 : 5;\n};\nconst plurals: {[key: string]: [string, string, [string, string], string, string, string]} = {\n  s: ['Ø£ÙÙ ÙÙ Ø«Ø§ÙÙØ©', 'Ø«Ø§ÙÙØ© ÙØ§Ø­Ø¯Ø©', ['Ø«Ø§ÙÙØªØ§Ù', 'Ø«Ø§ÙÙØªÙÙ'], '%d Ø«ÙØ§Ù', '%d Ø«Ø§ÙÙØ©', '%d Ø«Ø§ÙÙØ©'],\n  m: ['Ø£ÙÙ ÙÙ Ø¯ÙÙÙØ©', 'Ø¯ÙÙÙØ© ÙØ§Ø­Ø¯Ø©', ['Ø¯ÙÙÙØªØ§Ù', 'Ø¯ÙÙÙØªÙÙ'], '%d Ø¯ÙØ§Ø¦Ù', '%d Ø¯ÙÙÙØ©', '%d Ø¯ÙÙÙØ©'],\n  h: ['Ø£ÙÙ ÙÙ Ø³Ø§Ø¹Ø©', 'Ø³Ø§Ø¹Ø© ÙØ§Ø­Ø¯Ø©', ['Ø³Ø§Ø¹ØªØ§Ù', 'Ø³Ø§Ø¹ØªÙÙ'], '%d Ø³Ø§Ø¹Ø§Øª', '%d Ø³Ø§Ø¹Ø©', '%d Ø³Ø§Ø¹Ø©'],\n  d: ['Ø£ÙÙ ÙÙ ÙÙÙ', 'ÙÙÙ ÙØ§Ø­Ø¯', ['ÙÙÙØ§Ù', 'ÙÙÙÙÙ'], '%d Ø£ÙØ§Ù', '%d ÙÙÙÙØ§', '%d ÙÙÙ'],\n  M: ['Ø£ÙÙ ÙÙ Ø´ÙØ±', 'Ø´ÙØ± ÙØ§Ø­Ø¯', ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], '%d Ø£Ø´ÙØ±', '%d Ø´ÙØ±Ø§', '%d Ø´ÙØ±'],\n  y: ['Ø£ÙÙ ÙÙ Ø¹Ø§Ù', 'Ø¹Ø§Ù ÙØ§Ø­Ø¯', ['Ø¹Ø§ÙØ§Ù', 'Ø¹Ø§ÙÙÙ'], '%d Ø£Ø¹ÙØ§Ù', '%d Ø¹Ø§ÙÙØ§', '%d Ø¹Ø§Ù']\n};\nconst pluralize = function (u: string) {\n  return function (num: number, withoutSuffix: boolean): string {\n    const f = pluralForm(num);\n    let str = plurals[u][pluralForm(num)];\n    if (f === 2) {\n      str = str[withoutSuffix ? 0 : 1];\n    }\n\n    return (str as string).replace(/%d/i, num.toString());\n  };\n};\nconst months: string[] = [\n  'ÙÙØ§ÙØ±',\n  'ÙØ¨Ø±Ø§ÙØ±',\n  'ÙØ§Ø±Ø³',\n  'Ø£Ø¨Ø±ÙÙ',\n  'ÙØ§ÙÙ',\n  'ÙÙÙÙÙ',\n  'ÙÙÙÙÙ',\n  'Ø£ØºØ³Ø·Ø³',\n  'Ø³Ø¨ØªÙØ¨Ø±',\n  'Ø£ÙØªÙØ¨Ø±',\n  'ÙÙÙÙØ¨Ø±',\n  'Ø¯ÙØ³ÙØ¨Ø±'\n];\n\nexport const arLocale: LocaleData = {\n  abbr: 'ar',\n  months,\n  monthsShort: months,\n  weekdays: 'Ø§ÙØ£Ø­Ø¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«ÙØ§Ø«Ø§Ø¡_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®ÙÙØ³_Ø§ÙØ¬ÙØ¹Ø©_Ø§ÙØ³Ø¨Øª'.split('_'),\n  weekdaysShort: 'Ø£Ø­Ø¯_Ø¥Ø«ÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_Ø£Ø±Ø¨Ø¹Ø§Ø¡_Ø®ÙÙØ³_Ø¬ÙØ¹Ø©_Ø³Ø¨Øª'.split('_'),\n  weekdaysMin: 'Ø­_Ù_Ø«_Ø±_Ø®_Ø¬_Ø³'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'D/\\u200FM/\\u200FYYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd D MMMM YYYY HH:mm'\n  },\n  meridiemParse: /Øµ|Ù/,\n  isPM(input) {\n    return 'Ù' === input;\n  },\n  meridiem(hour, minute, isLower) {\n    if (hour < 12) {\n      return 'Øµ';\n    } else {\n      return 'Ù';\n    }\n  },\n  calendar: {\n    sameDay: '[Ø§ÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT',\n    nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT',\n    nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT',\n    lastDay: '[Ø£ÙØ³ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT',\n    lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'Ø¨Ø¹Ø¯ %s',\n    past: 'ÙÙØ° %s',\n    s: pluralize('s'),\n    ss: pluralize('s'),\n    m: pluralize('m'),\n    mm: pluralize('m'),\n    h: pluralize('h'),\n    hh: pluralize('h'),\n    d: pluralize('d'),\n    dd: pluralize('d'),\n    M: pluralize('M'),\n    MM: pluralize('M'),\n    y: pluralize('y'),\n    yy: pluralize('y')\n  },\n  preparse(str: string): string {\n    return str.replace(/[Ù¡Ù¢Ù£Ù¤Ù¥Ù¦Ù§Ù¨Ù©Ù ]/g, function (match) {\n      return numberMap[match];\n    }).replace(/Ø/g, ',');\n  },\n  postformat(str: string) {\n    return str.replace(/\\d/g, function (match) {\n      return symbolMap[match];\n    }).replace(/,/g, 'Ø');\n  },\n  week: {\n    dow: 6, // Saturday is the first day of the week.\n    doy: 12  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { Khronos } from '../test/chain';\n\n//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Iskren Ivov Chernev : https://github.com/ichernev\n//! author : Kunal Marwaha : https://github.com/marwahaha\n//! author : Matt Grande : https://github.com/mattgrande\n//! author : Isaac Cambron : https://github.com/icambron\n//! author : Venelin Manchev : https://github.com/vmanchev\n\nexport const bgLocale: LocaleData = {\n  abbr: 'bg',\n  months: 'ÑÐ½ÑÐ°ÑÐ¸_ÑÐµÐ²ÑÑÐ°ÑÐ¸_Ð¼Ð°ÑÑ_Ð°Ð¿ÑÐ¸Ð»_Ð¼Ð°Ð¹_ÑÐ½Ð¸_ÑÐ»Ð¸_Ð°Ð²Ð³ÑÑÑ_ÑÐµÐ¿ÑÐµÐ¼Ð²ÑÐ¸_Ð¾ÐºÑÐ¾Ð¼Ð²ÑÐ¸_Ð½Ð¾ÐµÐ¼Ð²ÑÐ¸_Ð´ÐµÐºÐµÐ¼Ð²ÑÐ¸'.split('_'),\n  monthsShort: 'ÑÐ½Ñ_ÑÐµÐ²_Ð¼Ð°Ñ_Ð°Ð¿Ñ_Ð¼Ð°Ð¹_ÑÐ½Ð¸_ÑÐ»Ð¸_Ð°Ð²Ð³_ÑÐµÐ¿_Ð¾ÐºÑ_Ð½Ð¾Ðµ_Ð´ÐµÐº'.split('_'),\n  weekdays: 'Ð½ÐµÐ´ÐµÐ»Ñ_Ð¿Ð¾Ð½ÐµÐ´ÐµÐ»Ð½Ð¸Ðº_Ð²ÑÐ¾ÑÐ½Ð¸Ðº_ÑÑÑÐ´Ð°_ÑÐµÑÐ²ÑÑÑÑÐº_Ð¿ÐµÑÑÐº_ÑÑÐ±Ð¾ÑÐ°'.split('_'),\n  weekdaysShort: 'Ð½ÐµÐ´_Ð¿Ð¾Ð½_Ð²ÑÐ¾_ÑÑÑ_ÑÐµÑ_Ð¿ÐµÑ_ÑÑÐ±'.split('_'),\n  weekdaysMin: 'Ð½Ð´_Ð¿Ð½_Ð²Ñ_ÑÑ_ÑÑ_Ð¿Ñ_ÑÐ±'.split('_'),\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'D.MM.YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY H:mm',\n    LLLL: 'dddd, D MMMM YYYY H:mm'\n  },\n  calendar: {\n    sameDay: '[ÐÐ½ÐµÑ Ð²] LT',\n    nextDay: '[Ð£ÑÑÐµ Ð²] LT',\n    nextWeek: 'dddd [Ð²] LT',\n    lastDay: '[ÐÑÐµÑÐ° Ð²] LT',\n    lastWeek: function (d: any) {\n\n      switch (d) {\n        case 0:\n        case 3:\n        case 6:\n          return '[Ð Ð¸Ð·Ð¼Ð¸Ð½Ð°Ð»Ð°ÑÐ°] dddd [Ð²] LT';\n        case 1:\n        case 2:\n        case 4:\n        case 5:\n          return '[Ð Ð¸Ð·Ð¼Ð¸Ð½Ð°Ð»Ð¸Ñ] dddd [Ð²] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'ÑÐ»ÐµÐ´ %s',\n    past: 'Ð¿ÑÐµÐ´Ð¸ %s',\n    s: 'Ð½ÑÐºÐ¾Ð»ÐºÐ¾ ÑÐµÐºÑÐ½Ð´Ð¸',\n    ss: '%d ÑÐµÐºÑÐ½Ð´Ð¸',\n    m: 'Ð¼Ð¸Ð½ÑÑÐ°',\n    mm: '%d Ð¼Ð¸Ð½ÑÑÐ¸',\n    h: 'ÑÐ°Ñ',\n    hh: '%d ÑÐ°ÑÐ°',\n    d: 'Ð´ÐµÐ½',\n    dd: '%d Ð´Ð½Ð¸',\n    M: 'Ð¼ÐµÑÐµÑ',\n    MM: '%d Ð¼ÐµÑÐµÑÐ°',\n    y: 'Ð³Ð¾Ð´Ð¸Ð½Ð°',\n    yy: '%d Ð³Ð¾Ð´Ð¸Ð½Ð¸'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}-(ÐµÐ²|ÐµÐ½|ÑÐ¸|Ð²Ð¸|ÑÐ¸|Ð¼Ð¸)/,\n  ordinal: function (_num: number): string {\n\n    const number = Number(_num);\n\n    let lastDigit = number % 10,\n      last2Digits = number % 100;\n\n    if (number === 0) {\n      return number + '-ÐµÐ²';\n    } else if (last2Digits === 0) {\n      return number + '-ÐµÐ½';\n    } else if (last2Digits > 10 && last2Digits < 20) {\n      return number + '-ÑÐ¸';\n    } else if (lastDigit === 1) {\n      return number + '-Ð²Ð¸';\n    } else if (lastDigit === 2) {\n      return number + '-ÑÐ¸';\n    } else if (lastDigit === 7 || lastDigit === 8) {\n      return number + '-Ð¼Ð¸';\n    } else {\n      return number + '-ÑÐ¸';\n    }\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 7  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getHours, getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Xavier Arbat : https://github.com/XavisaurusRex\n\nlet monthsShortDot = 'gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.'.split('_'),\n  monthsShort = 'ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des'.split('_');\n\nlet monthsParse = [/^gen/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^jun/i, /^jul/i, /^ago/i, /^set/i, /^oct/i, /^nov/i, /^des/i];\nlet monthsRegex = /^(gener|febrer|marÃ§|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre|gen\\.?|feb\\.?|mar\\.?|abr\\.?|mai\\.?|jun\\.?|jul\\.?|ago\\.?|set\\.?|oct\\.?|nov\\.?|des\\.?)/i;\n\nexport const caLocale: LocaleData = {\n  abbr: 'ca',\n  months: 'gener_febrer_marÃ§_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortDot;\n    }\n\n    if (/-MMM-/.test(format)) {\n      return monthsShort[getMonth(date, isUTC)];\n    }\n\n    return monthsShortDot[getMonth(date, isUTC)];\n  },\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(gener|febrer|marÃ§|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,\n  monthsShortStrictRegex: /^(gen\\.?|feb\\.?|mar\\.?|abr\\.?|mai\\.?|jun\\.?|jul\\.?|ago\\.?|set\\.?|oct\\.?|nov\\.?|des\\.?)/i,\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n  weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n  weekdaysShort: 'diu._dil._dim._dix._dij._div._dis.'.split('_'),\n  weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D [de] MMMM [de] YYYY',\n    LLL: 'D [de] MMMM [de] YYYY H:mm',\n    LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n  },\n  calendar: {\n    sameDay(date: Date) {\n      return '[avui a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';\n    },\n    nextDay(date: Date) {\n      return '[dema a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';\n    },\n    nextWeek(date: Date) {\n      return 'dddd [a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';\n    },\n    lastDay(date: Date) {\n      return '[ahir a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';\n    },\n    lastWeek(date: Date) {\n      return '[el] dddd [' + ('passada la ' + (getHours(date) !== 1) ? 'passades les' : '') + '] LT';\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'en %s',\n    past: 'fa %s',\n    s: 'uns segons',\n    ss: '%d segons',\n    m: 'un minut',\n    mm: '%d minuts',\n    h: 'una hora',\n    hh: '%d hores',\n    d: 'un dia',\n    dd: '%d dies',\n    M: 'un mes',\n    MM: '%d mesos',\n    y: 'un any',\n    yy: '%d anys'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(er|on|er|rt|Ã©)/,\n  ordinal(_num: number): string {\n    const num = Number(_num);\n    const output = (num > 4) ? 'Ã©' :\n        (num === 1 || num === 3) ? 'r' :\n          (num === 2) ? 'n' :\n            (num === 4) ? 't' : 'Ã©';\n    return num + output;\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\nconst months: string[] = 'leden_Ãºnor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_zÃ¡ÅÃ­_ÅÃ­jen_listopad_prosinec'.split('_');\nconst monthsShort: string[] = 'led_Ãºno_bÅe_dub_kvÄ_Ävn_Ävc_srp_zÃ¡Å_ÅÃ­j_lis_pro'.split('_');\n\nfunction plural(num: number): boolean {\n  return (num > 1) && (num < 5) && (~~(num / 10) !== 1);\n}\n\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  const result = num + ' ';\n\n  switch (key) {\n    case 's':  // a few seconds / in a few seconds / a few seconds ago\n      return (withoutSuffix || isFuture) ? 'pÃ¡r sekund' : 'pÃ¡r sekundami';\n    case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'sekundy' : 'sekund');\n      } else {\n        return result + 'sekundami';\n      }\n    // break;\n    case 'm':  // a minute / in a minute / a minute ago\n      return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');\n    case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'minuty' : 'minut');\n      } else {\n        return result + 'minutami';\n      }\n    // break;\n    case 'h':  // an hour / in an hour / an hour ago\n      return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n    case 'hh': // 9 hours / in 9 hours / 9 hours ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'hodiny' : 'hodin');\n      } else {\n        return result + 'hodinami';\n      }\n    // break;\n    case 'd':  // a day / in a day / a day ago\n      return (withoutSuffix || isFuture) ? 'den' : 'dnem';\n    case 'dd': // 9 days / in 9 days / 9 days ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'dny' : 'dnÃ­');\n      } else {\n        return result + 'dny';\n      }\n    // break;\n    case 'M':  // a month / in a month / a month ago\n      return (withoutSuffix || isFuture) ? 'mÄsÃ­c' : 'mÄsÃ­cem';\n    case 'MM': // 9 months / in 9 months / 9 months ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'mÄsÃ­ce' : 'mÄsÃ­cÅ¯');\n      } else {\n        return result + 'mÄsÃ­ci';\n      }\n    // break;\n    case 'y':  // a year / in a year / a year ago\n      return (withoutSuffix || isFuture) ? 'rok' : 'rokem';\n    case 'yy': // 9 years / in 9 years / 9 years ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'roky' : 'let');\n      } else {\n        return result + 'lety';\n      }\n    // break;\n  }\n}\n\nexport const csLocale: LocaleData = {\n  abbr: 'cs',\n  months,\n  monthsShort,\n  monthsParse: (function (months, monthsShort) {\n    let i, _monthsParse = [];\n    for (i = 0; i < 12; i++) {\n      // use custom parser to solve problem with July (Äervenec)\n      _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');\n    }\n    return _monthsParse;\n  }(months, monthsShort)),\n  shortMonthsParse: (function (monthsShort) {\n    let i, _shortMonthsParse = [];\n    for (i = 0; i < 12; i++) {\n      _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');\n    }\n    return _shortMonthsParse;\n  }(monthsShort)),\n  longMonthsParse: (function (months) {\n    let i, _longMonthsParse = [];\n    for (i = 0; i < 12; i++) {\n      _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');\n    }\n    return _longMonthsParse;\n  }(months)),\n  weekdays: 'nedÄle_pondÄlÃ­_ÃºterÃ½_stÅeda_Ätvrtek_pÃ¡tek_sobota'.split('_'),\n  weekdaysShort: 'ne_po_Ãºt_st_Ät_pÃ¡_so'.split('_'),\n  weekdaysMin: 'ne_po_Ãºt_st_Ät_pÃ¡_so'.split('_'),\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D. MMMM YYYY',\n    LLL: 'D. MMMM YYYY H:mm',\n    LLLL: 'dddd D. MMMM YYYY H:mm',\n    l: 'D. M. YYYY'\n  },\n  calendar: {\n    sameDay: '[dnes v] LT',\n    nextDay: '[zÃ­tra v] LT',\n    nextWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[v nedÄli v] LT';\n        case 1:\n        case 2:\n          return '[v] dddd [v] LT';\n        case 3:\n          return '[ve stÅedu v] LT';\n        case 4:\n          return '[ve Ätvrtek v] LT';\n        case 5:\n          return '[v pÃ¡tek v] LT';\n        case 6:\n          return '[v sobotu v] LT';\n      }\n    },\n    lastDay: '[vÄera v] LT',\n    lastWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[minulou nedÄli v] LT';\n        case 1:\n        case 2:\n          return '[minulÃ©] dddd [v] LT';\n        case 3:\n          return '[minulou stÅedu v] LT';\n        case 4:\n        case 5:\n          return '[minulÃ½] dddd [v] LT';\n        case 6:\n          return '[minulou sobotu v] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'za %s',\n    past: 'pÅed %s',\n    s: translate,\n    ss: translate,\n    m: translate,\n    mm: translate,\n    h: translate,\n    hh: translate,\n    d: translate,\n    dd: translate,\n    M: translate,\n    MM: translate,\n    y: translate,\n    yy: translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Danish (Denmark) [da]\n//! author : Per Hansen : https://github.com/perhp\n\nexport const daLocale: LocaleData = {\n  abbr: 'da',\n  months : 'Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December'.split('_'),\n  monthsShort : 'Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec'.split('_'),\n  weekdays : 'SÃ¸ndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_LÃ¸rdag'.split('_'),\n  weekdaysShort : 'SÃ¸n_Man_Tir_Ons_Tor_Fre_LÃ¸r'.split('_'),\n  weekdaysMin : 'SÃ¸_Ma_Ti_On_To_Fr_LÃ¸'.split('_'),\n  longDateFormat : {\n      LT : 'HH:mm',\n      LTS : 'HH:mm:ss',\n      L : 'DD/MM/YYYY',\n      LL : 'D. MMMM YYYY',\n      LLL : 'D. MMMM YYYY HH:mm',\n      LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'\n  },\n  calendar : {\n      sameDay : '[i dag kl.] LT',\n      nextDay : '[i morgen kl.] LT',\n      nextWeek : 'pÃ¥ dddd [kl.] LT',\n      lastDay : '[i gÃ¥r kl.] LT',\n      lastWeek : '[i] dddd[s kl.] LT',\n      sameElse : 'L'\n  },\n  relativeTime : {\n      future : 'om %s',\n      past : '%s siden',\n      s : 'fÃ¥ sekunder',\n      m : 'et minut',\n      mm : '%d minutter',\n      h : 'en time',\n      hh : '%d timer',\n      d : 'en dag',\n      dd : '%d dage',\n      M : 'en mÃ¥ned',\n      MM : '%d mÃ¥neder',\n      y : 'et Ã¥r',\n      yy : '%d Ã¥r'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal : '%d.',\n  week : {\n      dow : 1, // Monday is the first day of the week.\n      doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:object-literal-key-quotes\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion ElensÃºle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\nfunction processRelativeTime(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  const format: { [key: string]: [string, string] } = {\n    'm': ['eine Minute', 'einer Minute'],\n    'h': ['eine Stunde', 'einer Stunde'],\n    'd': ['ein Tag', 'einem Tag'],\n    'dd': [num + ' Tage', num + ' Tagen'],\n    'M': ['ein Monat', 'einem Monat'],\n    'MM': [num + ' Monate', num + ' Monaten'],\n    'y': ['ein Jahr', 'einem Jahr'],\n    'yy': [num + ' Jahre', num + ' Jahren']\n  };\n  return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nexport const deLocale: LocaleData = {\n  abbr: 'de',\n  months: 'Januar_Februar_MÃ¤rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n  monthsShort: 'Jan._Feb._MÃ¤rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n  weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n  weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D. MMMM YYYY',\n    LLL: 'D. MMMM YYYY HH:mm',\n    LLLL: 'dddd, D. MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[heute um] LT [Uhr]',\n    sameElse: 'L',\n    nextDay: '[morgen um] LT [Uhr]',\n    nextWeek: 'dddd [um] LT [Uhr]',\n    lastDay: '[gestern um] LT [Uhr]',\n    lastWeek: '[letzten] dddd [um] LT [Uhr]'\n  },\n  relativeTime: {\n    future: 'in %s',\n    past: 'vor %s',\n    s: 'ein paar Sekunden',\n    ss: '%d Sekunden',\n    m: processRelativeTime,\n    mm: '%d Minuten',\n    h: processRelativeTime,\n    hh: '%d Stunden',\n    d: processRelativeTime,\n    dd: processRelativeTime,\n    M: processRelativeTime,\n    MM: processRelativeTime,\n    y: processRelativeTime,\n    yy: processRelativeTime\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\nexport const enGbLocale: LocaleData = {\n  abbr: 'en-gb',\n  months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n  monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n  weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n  weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n  weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n  longDateFormat : {\n    LT : 'HH:mm',\n    LTS : 'HH:mm:ss',\n    L : 'DD/MM/YYYY',\n    LL : 'D MMMM YYYY',\n    LLL : 'D MMMM YYYY HH:mm',\n    LLLL : 'dddd, D MMMM YYYY HH:mm'\n  },\n  calendar : {\n    sameDay : '[Today at] LT',\n    nextDay : '[Tomorrow at] LT',\n    nextWeek : 'dddd [at] LT',\n    lastDay : '[Yesterday at] LT',\n    lastWeek : '[Last] dddd [at] LT',\n    sameElse : 'L'\n  },\n  relativeTime : {\n    future : 'in %s',\n    past : '%s ago',\n    s : 'a few seconds',\n    ss : '%d seconds',\n    m : 'a minute',\n    mm : '%d minutes',\n    h : 'an hour',\n    hh : '%d hours',\n    d : 'a day',\n    dd : '%d days',\n    M : 'a month',\n    MM : '%d months',\n    y : 'a year',\n    yy : '%d years'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n  ordinal(_num: number): string {\n    const num = Number(_num);\n    const b = num % 10,\n      output = (~~(num % 100 / 10) === 1) ? 'th' :\n        (b === 1) ? 'st' :\n          (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n    return num + output;\n  },\n  week : {\n    dow : 1, // Monday is the first day of the week.\n    doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getHours, getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\nlet monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n  monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nlet monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];\nlet monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\nexport const esDoLocale: LocaleData = {\n  abbr: 'es-do',\n  months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortDot;\n    } else if (/-MMM-/.test(format)) {\n      return monthsShort[getMonth(date, isUTC)];\n    } else {\n      return monthsShortDot[getMonth(date, isUTC)];\n    }\n  },\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n  monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n  weekdays: 'domingo_lunes_martes_miÃ©rcoles_jueves_viernes_sÃ¡bado'.split('_'),\n  weekdaysShort: 'dom._lun._mar._miÃ©._jue._vie._sÃ¡b.'.split('_'),\n  weekdaysMin: 'do_lu_ma_mi_ju_vi_sÃ¡'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'h:mm A',\n    LTS: 'h:mm:ss A',\n    L: 'DD/MM/YYYY',\n    LL: 'D [de] MMMM [de] YYYY',\n    LLL: 'D [de] MMMM [de] YYYY h:mm A',\n    LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n  },\n  calendar: {\n    sameDay(date: Date): string {\n      return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextDay(date: Date): string {\n      return '[maÃ±ana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextWeek(date: Date): string {\n      return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastDay(date: Date): string {\n      return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastWeek(date: Date): string {\n      return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'en %s',\n    past: 'hace %s',\n    s: 'unos segundos',\n    ss: '%d segundos',\n    m: 'un minuto',\n    mm: '%d minutos',\n    h: 'una hora',\n    hh: '%d horas',\n    d: 'un dÃ­a',\n    dd: '%d dÃ­as',\n    M: 'un mes',\n    MM: '%d meses',\n    y: 'un aÃ±o',\n    yy: '%d aÃ±os'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getHours, getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio NapurÃ­ : https://github.com/julionc\n\nlet monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n  monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nlet monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];\nlet monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\nexport const esLocale: LocaleData = {\n  abbr: 'es',\n  months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortDot;\n    }\n\n    if (/-MMM-/.test(format)) {\n      return monthsShort[getMonth(date, isUTC)];\n    }\n\n    return monthsShortDot[getMonth(date, isUTC)];\n  },\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n  monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n  weekdays: 'domingo_lunes_martes_miÃ©rcoles_jueves_viernes_sÃ¡bado'.split('_'),\n  weekdaysShort: 'dom._lun._mar._miÃ©._jue._vie._sÃ¡b.'.split('_'),\n  weekdaysMin: 'do_lu_ma_mi_ju_vi_sÃ¡'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D [de] MMMM [de] YYYY',\n    LLL: 'D [de] MMMM [de] YYYY H:mm',\n    LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n  },\n  calendar: {\n    sameDay(date: Date) {\n      return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextDay(date: Date) {\n      return '[maÃ±ana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextWeek(date: Date) {\n      return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastDay(date: Date) {\n      return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastWeek(date: Date) {\n      return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'en %s',\n    past: 'hace %s',\n    s: 'unos segundos',\n    ss: '%d segundos',\n    m: 'un minuto',\n    mm: '%d minutos',\n    h: 'una hora',\n    hh: '%d horas',\n    d: 'un dÃ­a',\n    dd: '%d dÃ­as',\n    M: 'un mes',\n    MM: '%d meses',\n    y: 'un aÃ±o',\n    yy: '%d aÃ±os'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getHours, getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n\nlet monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');\nlet monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nexport const esUsLocale: LocaleData = {\n  abbr: 'es-us',\n  months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortDot;\n    } else if (/-MMM-/.test(format)) {\n      return monthsShort[getMonth(date, isUTC)];\n    } else {\n      return monthsShortDot[getMonth(date, isUTC)];\n    }\n  },\n  monthsParseExact: true,\n  weekdays: 'domingo_lunes_martes_miÃ©rcoles_jueves_viernes_sÃ¡bado'.split('_'),\n  weekdaysShort: 'dom._lun._mar._miÃ©._jue._vie._sÃ¡b.'.split('_'),\n  weekdaysMin: 'do_lu_ma_mi_ju_vi_sÃ¡'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'h:mm A',\n    LTS: 'h:mm:ss A',\n    L: 'MM/DD/YYYY',\n    LL: 'MMMM [de] D [de] YYYY',\n    LLL: 'MMMM [de] D [de] YYYY h:mm A',\n    LLLL: 'dddd, MMMM [de] D [de] YYYY h:mm A'\n  },\n  calendar: {\n    sameDay(date: Date): string {\n      return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextDay(date: Date): string {\n      return '[maÃ±ana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextWeek(date: Date): string {\n      return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastDay(date: Date): string {\n      return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastWeek(date: Date): string {\n      return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'en %s',\n    past: 'hace %s',\n    s: 'unos segundos',\n    ss: '%d segundos',\n    m: 'un minuto',\n    mm: '%d minutos',\n    h: 'una hora',\n    hh: '%d horas',\n    d: 'un dÃ­a',\n    dd: '%d dÃ­as',\n    M: 'un mes',\n    MM: '%d meses',\n    y: 'un aÃ±o',\n    yy: '%d aÃ±os'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº',\n  week: {\n    dow: 0, // Sunday is the first day of the week.\n    doy: 6  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Chris Gedrim : https://github.com/a90machado\n\nconst processRelativeTime = function (num: number, withoutSuffix: boolean, key: string, isFuture: boolean) {\n  const format = {\n      s : ['mÃµne sekundi', 'mÃµni sekund', 'paar sekundit'],\n      ss: [num + 'sekundi', num + 'sekundit'],\n      m : ['Ã¼he minuti', 'Ã¼ks minut'],\n      mm: [num + ' minuti', num + ' minutit'],\n      h : ['Ã¼he tunni', 'tund aega', 'Ã¼ks tund'],\n      hh: [num + ' tunni', num + ' tundi'],\n      d : ['Ã¼he pÃ¤eva', 'Ã¼ks pÃ¤ev'],\n      M : ['kuu aja', 'kuu aega', 'Ã¼ks kuu'],\n      MM: [num + ' kuu', num + ' kuud'],\n      y : ['Ã¼he aasta', 'aasta', 'Ã¼ks aasta'],\n      yy: [num + ' aasta', num + ' aastat']\n  };\n  if (withoutSuffix) {\n      return format[key][2] ? format[key][2] : format[key][1];\n  }\n  return isFuture ? format[key][0] : format[key][1];\n};\n\nexport const etLocale: LocaleData = {\n  abbr: 'et',\n  months: 'jaanuar_veebruar_mÃ¤rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n  monthsShort: 'jaan_veebr_mÃ¤rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n  weekdays: 'pÃ¼hapÃ¤ev_esmaspÃ¤ev_teisipÃ¤ev_kolmapÃ¤ev_neljapÃ¤ev_reede_laupÃ¤ev'.split('_'),\n  weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n  weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n  longDateFormat: {\n    LT:   'H:mm',\n    LTS:  'H:mm:ss',\n    L:    'DD.MM.YYYY',\n    LL:   'D. MMMM YYYY',\n    LLL:  'D. MMMM YYYY H:mm',\n    LLLL: 'dddd, D. MMMM YYYY H:mm'\n  },\n  calendar: {\n    sameDay:  '[TÃ¤na,] LT',\n    nextDay:  '[Homme,] LT',\n    nextWeek: '[JÃ¤rgmine] dddd LT',\n    lastDay:  '[Eile,] LT',\n    lastWeek: '[Eelmine] dddd LT',\n    sameElse: 'L'\n  },\n  relativeTime : {\n    future : '%s pÃ¤rast',\n    past   : '%s tagasi',\n    s      : processRelativeTime,\n    ss     : processRelativeTime,\n    m      : processRelativeTime,\n    mm     : processRelativeTime,\n    h      : processRelativeTime,\n    hh     : processRelativeTime,\n    d      : processRelativeTime,\n    dd     : '%d pÃ¤eva',\n    M      : processRelativeTime,\n    MM     : processRelativeTime,\n    y      : processRelativeTime,\n    yy     : processRelativeTime\n  },\n  dayOfMonthOrdinalParse : /\\d{1,2}./,\n  ordinal : '%d.',\n  week : {\n      dow : 1, // Monday is the first day of the week.\n      doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n// https://github.com/moment/moment/blob/develop/locale/fi.js\n\nvar numbersPast = 'nolla yksi kaksi kolme neljÃ¤ viisi kuusi seitsemÃ¤n kahdeksan yhdeksÃ¤n'.split(' '),\n  numbersFuture = [\n    'nolla', 'yhden', 'kahden', 'kolmen', 'neljÃ¤n', 'viiden', 'kuuden',\n    numbersPast[7], numbersPast[8], numbersPast[9]\n  ];\n\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  var result = '';\n  switch (key) {\n    case 's':\n      return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n    case 'ss':\n      return isFuture ? 'sekunnin' : 'sekuntia';\n    case 'm':\n      return isFuture ? 'minuutin' : 'minuutti';\n    case 'mm':\n      result = isFuture ? 'minuutin' : 'minuuttia';\n      break;\n    case 'h':\n      return isFuture ? 'tunnin' : 'tunti';\n    case 'hh':\n      result = isFuture ? 'tunnin' : 'tuntia';\n      break;\n    case 'd':\n      return isFuture ? 'pÃ¤ivÃ¤n' : 'pÃ¤ivÃ¤';\n    case 'dd':\n      result = isFuture ? 'pÃ¤ivÃ¤n' : 'pÃ¤ivÃ¤Ã¤';\n      break;\n    case 'M':\n      return isFuture ? 'kuukauden' : 'kuukausi';\n    case 'MM':\n      result = isFuture ? 'kuukauden' : 'kuukautta';\n      break;\n    case 'y':\n      return isFuture ? 'vuoden' : 'vuosi';\n    case 'yy':\n      result = isFuture ? 'vuoden' : 'vuotta';\n      break;\n  }\n  result = verbalNumber(num, isFuture) + ' ' + result;\n  return result;\n}\n\nfunction verbalNumber(num: number, isFuture: boolean) {\n  return num < 10 ? (isFuture ? numbersFuture[num] : numbersPast[num]) : num;\n}\n\nexport const fiLocale: LocaleData = {\n  abbr: 'fi',\n  months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesÃ¤kuu_heinÃ¤kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n  monthsShort: 'tammi_helmi_maalis_huhti_touko_kesÃ¤_heinÃ¤_elo_syys_loka_marras_joulu'.split('_'),\n  weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n  weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n  weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n  longDateFormat: {\n    LT: 'HH.mm',\n    LTS: 'HH.mm.ss',\n    L: 'DD.MM.YYYY',\n    LL: 'Do MMMM[ta] YYYY',\n    LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n    LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n    l: 'D.M.YYYY',\n    ll: 'Do MMM YYYY',\n    lll: 'Do MMM YYYY, [klo] HH.mm',\n    llll: 'ddd, Do MMM YYYY, [klo] HH.mm'\n  },\n  calendar: {\n    sameDay: '[tÃ¤nÃ¤Ã¤n] [klo] LT',\n    nextDay: '[huomenna] [klo] LT',\n    nextWeek: 'dddd [klo] LT',\n    lastDay: '[eilen] [klo] LT',\n    lastWeek: '[viime] dddd[na] [klo] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: '%s pÃ¤Ã¤stÃ¤',\n    past: '%s sitten',\n    s: translate,\n    ss: translate,\n    m: translate,\n    mm: translate,\n    h: translate,\n    hh: translate,\n    d: translate,\n    dd: translate,\n    M: translate,\n    MM: translate,\n    y: translate,\n    yy: translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\nexport const frLocale: LocaleData = {\n  abbr: 'fr',\n  months: 'janvier_fÃ©vrier_mars_avril_mai_juin_juillet_aoÃ»t_septembre_octobre_novembre_dÃ©cembre'.split('_'),\n  monthsShort: 'janv._fÃ©vr._mars_avr._mai_juin_juil._aoÃ»t_sept._oct._nov._dÃ©c.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n  weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n  weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd D MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[Aujourdâhui Ã ] LT',\n    nextDay: '[Demain Ã ] LT',\n    nextWeek: 'dddd [Ã ] LT',\n    lastDay: '[Hier Ã ] LT',\n    lastWeek: 'dddd [dernier Ã ] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'dans %s',\n    past: 'il y a %s',\n    s: 'quelques secondes',\n    ss: '%d secondes',\n    m: 'une minute',\n    mm: '%d minutes',\n    h: 'une heure',\n    hh: '%d heures',\n    d: 'un jour',\n    dd: '%d jours',\n    M: 'un mois',\n    MM: '%d mois',\n    y: 'un an',\n    yy: '%d ans'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n  ordinal(_num: number, period: string): string {\n    const num = Number(_num);\n    switch (period) {\n      // TODO: Return 'e' when day of month > 1. Move this case inside\n      // block for masculine words below.\n      // See https://github.com/moment/moment/issues/3375\n      case 'D':\n        return num + (num === 1 ? 'er' : '');\n\n      // Words with masculine grammatical gender: mois, trimestre, jour\n      default:\n      case 'M':\n      case 'Q':\n      case 'DDD':\n      case 'd':\n        return num + (num === 1 ? 'er' : 'e');\n\n      // Words with feminine grammatical gender: semaine\n      case 'w':\n      case 'W':\n        return num + (num === 1 ? 're' : 'e');\n    }\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getHours, getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : DarÃ­o BeirÃ³ : https://github.com/quinobravo\n\nlet monthsShortDot = 'xan._feb._mar._abr._mai._xuÃ±._xul._ago._set._out._nov._dec.'.split('_'),\n  monthsShort = 'xan_feb_mar_abr_mai_xuÃ±_xul_ago_set_out_nov_dec'.split('_');\n\nlet monthsParse = [/^xan/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^xuÃ±/i, /^xul/i, /^ago/i, /^set/i, /^out/i, /^nov/i, /^dec/i];\nlet monthsRegex = /^(xaneiro|febreiro|marzo|abril|maio|xuÃ±o|xullo|agosto|setembro|outubro|novembro|decembro|xan\\.?|feb\\.?|mar\\.?|abr\\.?|mai\\.?|xuÃ±\\.?|xul\\.?|ago\\.?|set\\.?|out\\.?|nov\\.?|dec\\.?)/i;\n\nexport const glLocale: LocaleData = {\n  abbr: 'gl',\n  months: 'xaneiro_febreiro_marzo_abril_maio_xuÃ±o_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortDot;\n    }\n\n    if (/-MMM-/.test(format)) {\n      return monthsShort[getMonth(date, isUTC)];\n    }\n\n    return monthsShortDot[getMonth(date, isUTC)];\n  },\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(xaneiro|febreiro|marzo|abril|maio|xuÃ±o|xullo|agosto|setembro|outubro|novembro|decembro)/i,\n  monthsShortStrictRegex: /^(xan\\.?|feb\\.?|mar\\.?|abr\\.?|mai\\.?|xuÃ±\\.?|xul\\.?|ago\\.?|set\\.?|out\\.?|nov\\.?|dec\\.?)/i,\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n  weekdays: 'domingo_luns_martes_mÃ©rcores_xoves_venres_sÃ¡bado'.split('_'),\n  weekdaysShort: 'dom._lun._mar._mÃ©r._xov._ven._sÃ¡b.'.split('_'),\n  weekdaysMin: 'do_lu_ma_mÃ©_xo_ve_sÃ¡'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D [de] MMMM [de] YYYY',\n    LLL: 'D [de] MMMM [de] YYYY H:mm',\n    LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n  },\n  calendar: {\n    sameDay(date: Date) {\n      return '[hoxe Ã¡' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextDay(date: Date) {\n      return '[maÃ±an Ã¡' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    nextWeek(date: Date) {\n      return 'dddd [Ã¡' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastDay(date: Date) {\n      return '[onte Ã¡' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    lastWeek(date: Date) {\n      return '[o] dddd [pasado Ã¡' + ((getHours(date) !== 1) ? 's' : '') + '] LT';\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'en %s',\n    past: 'fai %s',\n    s: 'uns segundos',\n    ss: '%d segundos',\n    m: 'un minuto',\n    mm: '%d minutos',\n    h: 'unha hora',\n    hh: '%d horas',\n    d: 'un dÃ­a',\n    dd: '%d dÃ­as',\n    M: 'un mes',\n    MM: '%d meses',\n    y: 'un ano',\n    yy: '%d anos'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\nexport const heLocale: LocaleData = {\n  abbr: 'he',\n  months: '×× ×××¨_×¤××¨×××¨_××¨×¥_××¤×¨××_×××_××× ×_××××_×××××¡×_×¡×¤××××¨_×××§××××¨_× ×××××¨_××¦×××¨'.split('_'),\n  monthsShort: '×× ××³_×¤××¨×³_××¨×¥_××¤×¨×³_×××_××× ×_××××_××××³_×¡×¤××³_×××§×³_× ×××³_××¦××³'.split('_'),\n  weekdays: '×¨××©××_×©× ×_×©×××©×_×¨×××¢×_××××©×_×©××©×_×©××ª'.split('_'),\n  weekdaysShort: '××³_××³_××³_××³_××³_××³_×©×³'.split('_'),\n  weekdaysMin: '×_×_×_×_×_×_×©'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D [×]MMMM YYYY',\n    LLL: 'D [×]MMMM YYYY HH:mm',\n    LLLL: 'dddd, D [×]MMMM YYYY HH:mm',\n    l: 'D/M/YYYY',\n    ll: 'D MMM YYYY',\n    lll: 'D MMM YYYY HH:mm',\n    llll: 'ddd, D MMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[×××× ×Ö¾]LT',\n    nextDay: '[×××¨ ×Ö¾]LT',\n    nextWeek: 'dddd [××©×¢×] LT',\n    lastDay: '[××ª××× ×Ö¾]LT',\n    lastWeek: '[××××] dddd [××××¨×× ××©×¢×] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: '××¢×× %s',\n    past: '××¤× × %s',\n    s: '××¡×¤×¨ ×©× ×××ª',\n    ss: '%d ×©× ×××ª',\n    m: '××§×',\n    mm: '%d ××§××ª',\n    h: '×©×¢×',\n    hh(num: number): string {\n      if (num === 2) {\n        return '×©×¢×ª×××';\n      }\n      return num + ' ×©×¢××ª';\n    },\n    d: '×××',\n    dd(num: number): string {\n      if (num === 2) {\n        return '××××××';\n      }\n      return num + ' ××××';\n    },\n    M: '××××©',\n    MM(num: number): string {\n      if (num === 2) {\n        return '××××©×××';\n      }\n      return num + ' ××××©××';\n    },\n    y: '×©× ×',\n    yy(num: number): string {\n      if (num === 2) {\n        return '×©× ×ª×××';\n      } else if (num % 10 === 0 && num !== 10) {\n        return num + ' ×©× ×';\n      }\n      return num + ' ×©× ××';\n    }\n  },\n  meridiemParse: /×××\"×¦|××¤× ×\"×¦|×××¨× ××¦××¨×××|××¤× × ××¦××¨×××|××¤× ××ª ×××§×¨|××××§×¨|××¢×¨×/i,\n  isPM(input) {\n    return /^(×××\"×¦|×××¨× ××¦××¨×××|××¢×¨×)$/.test(input);\n  },\n  meridiem(hour, minute, isLower) {\n    if (hour < 5) {\n      return '××¤× ××ª ×××§×¨';\n    } else if (hour < 10) {\n      return '××××§×¨';\n    } else if (hour < 12) {\n      return isLower ? '××¤× ×\"×¦' : '××¤× × ××¦××¨×××';\n    } else if (hour < 18) {\n      return isLower ? '×××\"×¦' : '×××¨× ××¦××¨×××';\n    } else {\n      return '××¢×¨×';\n    }\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:no-parameter-reassignment prefer-switch\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\nlet symbolMap: {[key: string]: string} = {\n    1: 'à¥§',\n    2: 'à¥¨',\n    3: 'à¥©',\n    4: 'à¥ª',\n    5: 'à¥«',\n    6: 'à¥¬',\n    7: 'à¥­',\n    8: 'à¥®',\n    9: 'à¥¯',\n    0: 'à¥¦'\n  },\n  numberMap: {[key: string]: string} = {\n    'à¥§': '1',\n    'à¥¨': '2',\n    'à¥©': '3',\n    'à¥ª': '4',\n    'à¥«': '5',\n    'à¥¬': '6',\n    'à¥­': '7',\n    'à¥®': '8',\n    'à¥¯': '9',\n    'à¥¦': '0'\n  };\n\nexport const hiLocale: LocaleData = {\n  abbr: 'hi',\n  months: 'à¤à¤¨à¤µà¤°à¥_à¤«à¤¼à¤°à¤µà¤°à¥_à¤®à¤¾à¤°à¥à¤_à¤à¤ªà¥à¤°à¥à¤²_à¤®à¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_à¤à¤à¤¸à¥à¤¤_à¤¸à¤¿à¤¤à¤®à¥à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_à¤¨à¤µà¤®à¥à¤¬à¤°_à¤¦à¤¿à¤¸à¤®à¥à¤¬à¤°'.split('_'),\n  monthsShort: 'à¤à¤¨._à¤«à¤¼à¤°._à¤®à¤¾à¤°à¥à¤_à¤à¤ªà¥à¤°à¥._à¤®à¤_à¤à¥à¤¨_à¤à¥à¤²._à¤à¤._à¤¸à¤¿à¤¤._à¤à¤à¥à¤à¥._à¤¨à¤µ._à¤¦à¤¿à¤¸.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'à¤°à¤µà¤¿à¤µà¤¾à¤°_à¤¸à¥à¤®à¤µà¤¾à¤°_à¤®à¤à¤à¤²à¤µà¤¾à¤°_à¤¬à¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_à¤¶à¥à¤à¥à¤°à¤µà¤¾à¤°_à¤¶à¤¨à¤¿à¤µà¤¾à¤°'.split('_'),\n  weekdaysShort: 'à¤°à¤µà¤¿_à¤¸à¥à¤®_à¤®à¤à¤à¤²_à¤¬à¥à¤§_à¤à¥à¤°à¥_à¤¶à¥à¤à¥à¤°_à¤¶à¤¨à¤¿'.split('_'),\n  weekdaysMin: 'à¤°_à¤¸à¥_à¤®à¤_à¤¬à¥_à¤à¥_à¤¶à¥_à¤¶'.split('_'),\n  longDateFormat: {\n    LT: 'A h:mm à¤¬à¤à¥',\n    LTS: 'A h:mm:ss à¤¬à¤à¥',\n    L: 'DD/MM/YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY, A h:mm à¤¬à¤à¥',\n    LLLL: 'dddd, D MMMM YYYY, A h:mm à¤¬à¤à¥'\n  },\n  calendar: {\n    sameDay: '[à¤à¤] LT',\n    nextDay: '[à¤à¤²] LT',\n    nextWeek: 'dddd, LT',\n    lastDay: '[à¤à¤²] LT',\n    lastWeek: '[à¤ªà¤¿à¤à¤²à¥] dddd, LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: '%s à¤®à¥à¤',\n    past: '%s à¤ªà¤¹à¤²à¥',\n    s: 'à¤à¥à¤ à¤¹à¥ à¤à¥à¤·à¤£',\n    ss: '%d à¤¸à¥à¤à¤à¤¡',\n    m: 'à¤à¤ à¤®à¤¿à¤¨à¤',\n    mm: '%d à¤®à¤¿à¤¨à¤',\n    h: 'à¤à¤ à¤à¤à¤à¤¾',\n    hh: '%d à¤à¤à¤à¥',\n    d: 'à¤à¤ à¤¦à¤¿à¤¨',\n    dd: '%d à¤¦à¤¿à¤¨',\n    M: 'à¤à¤ à¤®à¤¹à¥à¤¨à¥',\n    MM: '%d à¤®à¤¹à¥à¤¨à¥',\n    y: 'à¤à¤ à¤µà¤°à¥à¤·',\n    yy: '%d à¤µà¤°à¥à¤·'\n  },\n  preparse(str: string): string {\n    return str.replace(/[à¥§à¥¨à¥©à¥ªà¥«à¥¬à¥­à¥®à¥¯à¥¦]/g, function (match) {\n      return numberMap[match];\n    });\n  },\n  postformat(str: string): string {\n    return str.replace(/\\d/g, function (match) {\n      return symbolMap[match];\n    });\n  },\n  // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n  // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n  meridiemParse: /à¤°à¤¾à¤¤|à¤¸à¥à¤¬à¤¹|à¤¦à¥à¤ªà¤¹à¤°|à¤¶à¤¾à¤®/,\n  meridiemHour(hour, meridiem) {\n    if (hour === 12) {\n      hour = 0;\n    }\n    if (meridiem === 'à¤°à¤¾à¤¤') {\n      return hour < 4 ? hour : hour + 12;\n    } else if (meridiem === 'à¤¸à¥à¤¬à¤¹') {\n      return hour;\n    } else if (meridiem === 'à¤¦à¥à¤ªà¤¹à¤°') {\n      return hour >= 10 ? hour : hour + 12;\n    } else if (meridiem === 'à¤¶à¤¾à¤®') {\n      return hour + 12;\n    }\n  },\n  meridiem(hour, minute, isLower) {\n    if (hour < 4) {\n      return 'à¤°à¤¾à¤¤';\n    } else if (hour < 10) {\n      return 'à¤¸à¥à¤¬à¤¹';\n    } else if (hour < 17) {\n      return 'à¤¦à¥à¤ªà¤¹à¤°';\n    } else if (hour < 20) {\n      return 'à¤¶à¤¾à¤®';\n    } else {\n      return 'à¤°à¤¾à¤¤';\n    }\n  },\n  week: {\n    dow: 0, // Sunday is the first day of the week.\n    doy: 6  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n\nlet weekEndings = 'vasÃ¡rnap hÃ©tfÅn kedden szerdÃ¡n csÃ¼tÃ¶rtÃ¶kÃ¶n pÃ©nteken szombaton'.split(' ');\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  switch (key) {\n    case 's':\n      return (isFuture || withoutSuffix) ? 'nÃ©hÃ¡ny mÃ¡sodperc' : 'nÃ©hÃ¡ny mÃ¡sodperce';\n    case 'ss':\n      return num + ((isFuture || withoutSuffix) ? ' mÃ¡sodperc' : ' mÃ¡sodperce');\n    case 'm':\n      return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n    case 'mm':\n      return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n    case 'h':\n      return 'egy' + (isFuture || withoutSuffix ? ' Ã³ra' : ' Ã³rÃ¡ja');\n    case 'hh':\n      return num + (isFuture || withoutSuffix ? ' Ã³ra' : ' Ã³rÃ¡ja');\n    case 'd':\n      return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n    case 'dd':\n      return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n    case 'M':\n      return 'egy' + (isFuture || withoutSuffix ? ' hÃ³nap' : ' hÃ³napja');\n    case 'MM':\n      return num + (isFuture || withoutSuffix ? ' hÃ³nap' : ' hÃ³napja');\n    case 'y':\n      return 'egy' + (isFuture || withoutSuffix ? ' Ã©v' : ' Ã©ve');\n    case 'yy':\n      return num + (isFuture || withoutSuffix ? ' Ã©v' : ' Ã©ve');\n  }\n  return '';\n}\nfunction week(date: Date, isFuture: boolean) {\n  return (isFuture ? '' : '[mÃºlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';\n}\n\nexport const huLocale: LocaleData = {\n  abbr: 'hu',\n  months : 'januÃ¡r_februÃ¡r_mÃ¡rcius_Ã¡prilis_mÃ¡jus_jÃºnius_jÃºlius_augusztus_szeptember_oktÃ³ber_november_december'.split('_'),\n  monthsShort : 'jan_feb_mÃ¡rc_Ã¡pr_mÃ¡j_jÃºn_jÃºl_aug_szept_okt_nov_dec'.split('_'),\n  weekdays : 'vasÃ¡rnap_hÃ©tfÅ_kedd_szerda_csÃ¼tÃ¶rtÃ¶k_pÃ©ntek_szombat'.split('_'),\n  weekdaysShort : 'vas_hÃ©t_kedd_sze_csÃ¼t_pÃ©n_szo'.split('_'),\n  weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),\n  longDateFormat : {\n    LT : 'H:mm',\n    LTS : 'H:mm:ss',\n    L : 'YYYY.MM.DD.',\n    LL : 'YYYY. MMMM D.',\n    LLL : 'YYYY. MMMM D. H:mm',\n    LLLL : 'YYYY. MMMM D., dddd H:mm'\n  },\n  meridiemParse: /de|du/i,\n  isPM (input) {\n    return input.charAt(1).toLowerCase() === 'u';\n  },\n  meridiem (hours, minutes, isLower) {\n    if (hours < 12) {\n      return isLower === true ? 'de' : 'DE';\n    } else {\n      return isLower === true ? 'du' : 'DU';\n    }\n  },\n  calendar : {\n    sameDay : '[ma] LT[-kor]',\n    nextDay : '[holnap] LT[-kor]',\n    nextWeek (date: Date) {\n      return week(date, true);\n    },\n    lastDay : '[tegnap] LT[-kor]',\n    lastWeek (date: Date) {\n      return week(date, false);\n    },\n    sameElse : 'L'\n  },\n  relativeTime : {\n    future : '%s mÃºlva',\n    past : '%s',\n    s : translate,\n    ss : translate,\n    m : translate,\n    mm : translate,\n    h : translate,\n    hh : translate,\n    d : translate,\n    dd : translate,\n    M : translate,\n    MM : translate,\n    y : translate,\n    yy : translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal : '%d.',\n  week : {\n    dow : 1, // Monday is the first day of the week.\n    doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:no-parameter-reassignment prefer-switch\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Indonesia [id]\n//! author : Romy Kusuma : https://github.com/rkusuma\n//! reference: https://github.com/moment/moment/blob/develop/locale/id.js\n\nexport const idLocale: LocaleData = {\n  abbr: 'id',\n  months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n  monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),\n  weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n  weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n  weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n  longDateFormat : {\n    LT : 'HH.mm',\n    LTS : 'HH.mm.ss',\n    L : 'DD/MM/YYYY',\n    LL : 'D MMMM YYYY',\n    LLL : 'D MMMM YYYY [pukul] HH.mm',\n    LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n  },\n  meridiemParse: /pagi|siang|sore|malam/,\n  meridiemHour(hour, meridiem) {\n    if (hour === 12) {\n      hour = 0;\n    }\n    if (meridiem === 'pagi') {\n      return hour;\n    } else if (meridiem === 'siang') {\n      return hour >= 11 ? hour : hour + 12;\n    } else if (meridiem === 'sore' || meridiem === 'malam') {\n      return hour + 12;\n    }\n  },\n  meridiem(hours, minutes, isLower) {\n    if (hours < 11) {\n      return 'pagi';\n    } else if (hours < 15) {\n      return 'siang';\n    } else if (hours < 19) {\n      return 'sore';\n    } else {\n      return 'malam';\n    }\n  },\n  calendar : {\n    sameDay : '[Hari ini pukul] LT',\n    nextDay : '[Besok pukul] LT',\n    nextWeek : 'dddd [pukul] LT',\n    lastDay : '[Kemarin pukul] LT',\n    lastWeek : 'dddd [lalu pukul] LT',\n    sameElse : 'L'\n  },\n  relativeTime : {\n    future : 'dalam %s',\n    past : '%s yang lalu',\n    s : 'beberapa detik',\n    ss : '%d detik',\n    m : 'semenit',\n    mm : '%d menit',\n    h : 'sejam',\n    hh : '%d jam',\n    d : 'sehari',\n    dd : '%d hari',\n    M : 'sebulan',\n    MM : '%d bulan',\n    y : 'setahun',\n    yy : '%d tahun'\n  },\n  week : {\n    dow : 1, // Monday is the first day of the week.\n    doy : 7  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n\nexport const itLocale: LocaleData = {\n  abbr: 'it',\n  months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n  monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n  weekdays: 'domenica_lunedÃ¬_martedÃ¬_mercoledÃ¬_giovedÃ¬_venerdÃ¬_sabato'.split('_'),\n  weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n  weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd D MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[Oggi alle] LT',\n    nextDay: '[Domani alle] LT',\n    nextWeek: 'dddd [alle] LT',\n    lastDay: '[Ieri alle] LT',\n    lastWeek(date: Date) {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[la scorsa] dddd [alle] LT';\n        default:\n          return '[lo scorso] dddd [alle] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future(num: number): string {\n      return ((/^[0-9].+$/).test(num.toString(10)) ? 'tra' : 'in') + ' ' + num;\n    },\n    past: '%s fa',\n    s: 'alcuni secondi',\n    ss: '%d secondi',\n    m: 'un minuto',\n    mm: '%d minuti',\n    h: 'un\\'ora',\n    hh: '%d ore',\n    d: 'un giorno',\n    dd: '%d giorni',\n    M: 'un mese',\n    MM: '%d mesi',\n    y: 'un anno',\n    yy: '%d anni'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\nexport const jaLocale: LocaleData =  {\n  abbr: 'ja',\n  months : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'),\n  monthsShort : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'),\n  weekdays : 'æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥'.split('_'),\n  weekdaysShort : 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'),\n  weekdaysMin : 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'),\n  longDateFormat : {\n    LT : 'HH:mm',\n    LTS : 'HH:mm:ss',\n    L : 'YYYY/MM/DD',\n    LL : 'YYYYå¹´MæDæ¥',\n    LLL : 'YYYYå¹´MæDæ¥ HH:mm',\n    LLLL : 'YYYYå¹´MæDæ¥ HH:mm dddd',\n    l : 'YYYY/MM/DD',\n    ll : 'YYYYå¹´MæDæ¥',\n    lll : 'YYYYå¹´MæDæ¥ HH:mm',\n    llll : 'YYYYå¹´MæDæ¥ HH:mm dddd'\n  },\n  meridiemParse: /åå|åå¾/i,\n  isPM (input) {\n    return input === 'åå¾';\n  },\n  meridiem (hour, minute, isLower) {\n    if (hour < 12) {\n      return 'åå';\n    } else {\n      return 'åå¾';\n    }\n  },\n  calendar : {\n    sameDay : '[ä»æ¥] LT',\n    nextDay : '[ææ¥] LT',\n    nextWeek : '[æ¥é±]dddd LT',\n    lastDay : '[æ¨æ¥] LT',\n    lastWeek : '[åé±]dddd LT',\n    sameElse : 'L'\n  },\n  dayOfMonthOrdinalParse : /\\d{1,2}æ¥/,\n  ordinal (num: number, period: string): string {\n    switch (period) {\n      case 'd':\n      case 'D':\n      case 'DDD':\n        return num + 'æ¥';\n      default:\n        return num.toString(10);\n    }\n  },\n  relativeTime : {\n    future : '%så¾',\n    past : '%så',\n    s : 'æ°ç§',\n    ss : '%dç§',\n    m : '1å',\n    mm : '%då',\n    h : '1æé',\n    hh : '%dæé',\n    d : '1æ¥',\n    dd : '%dæ¥',\n    M : '1ã¶æ',\n    MM : '%dã¶æ',\n    y : '1å¹´',\n    yy : '%då¹´'\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:object-literal-shorthand\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\nexport const koLocale: LocaleData = {\n  abbr: 'ko',\n  months : '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'),\n  monthsShort : '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'),\n  weekdays : 'ì¼ìì¼_ììì¼_íìì¼_ììì¼_ëª©ìì¼_ê¸ìì¼_í ìì¼'.split('_'),\n  weekdaysShort : 'ì¼_ì_í_ì_ëª©_ê¸_í '.split('_'),\n  weekdaysMin : 'ì¼_ì_í_ì_ëª©_ê¸_í '.split('_'),\n  longDateFormat : {\n    LT : 'A h:mm',\n    LTS : 'A h:mm:ss',\n    L : 'YYYY.MM.DD',\n    LL : 'YYYYë MMMM Dì¼',\n    LLL : 'YYYYë MMMM Dì¼ A h:mm',\n    LLLL : 'YYYYë MMMM Dì¼ dddd A h:mm',\n    l : 'YYYY.MM.DD',\n    ll : 'YYYYë MMMM Dì¼',\n    lll : 'YYYYë MMMM Dì¼ A h:mm',\n    llll : 'YYYYë MMMM Dì¼ dddd A h:mm'\n  },\n  calendar : {\n    sameDay : 'ì¤ë LT',\n    nextDay : 'ë´ì¼ LT',\n    nextWeek : 'dddd LT',\n    lastDay : 'ì´ì  LT',\n    lastWeek : 'ì§ëì£¼ dddd LT',\n    sameElse : 'L'\n  },\n  relativeTime : {\n    future : '%s í',\n    past : '%s ì ',\n    s : 'ëª ì´',\n    ss : '%dì´',\n    m : '1ë¶',\n    mm : '%dë¶',\n    h : 'í ìê°',\n    hh : '%dìê°',\n    d : 'íë£¨',\n    dd : '%dì¼',\n    M : 'í ë¬',\n    MM : '%dë¬',\n    y : 'ì¼ ë',\n    yy : '%dë'\n  },\n  dayOfMonthOrdinalParse : /\\d{1,2}(ì¼|ì|ì£¼)/,\n  ordinal : function (num: number, period: string): string {\n    switch (period) {\n      case 'd':\n      case 'D':\n      case 'DDD':\n        return num + 'ì¼';\n      case 'M':\n        return num + 'ì';\n      case 'w':\n      case 'W':\n        return num + 'ì£¼';\n      default:\n        return num.toString(10);\n    }\n  },\n  meridiemParse : /ì¤ì |ì¤í/,\n  isPM : function (token) {\n    return token === 'ì¤í';\n  },\n  meridiem : function (hour, minute, isUpper) {\n    return hour < 12 ? 'ì¤ì ' : 'ì¤í';\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Stanislavas Guk : https://github.com/ixoster\n\nconst units = {\n  ss : 'sekundÄ_sekundÅ¾iÅ³_sekundes',\n  m : 'minutÄ_minutÄs_minutÄ',\n  mm: 'minutÄs_minuÄiÅ³_minutes',\n  h : 'valanda_valandos_valandÄ',\n  hh: 'valandos_valandÅ³_valandas',\n  d : 'diena_dienos_dienÄ',\n  dd: 'dienos_dienÅ³_dienas',\n  M : 'mÄnuo_mÄnesio_mÄnesÄ¯',\n  MM: 'mÄnesiai_mÄnesiÅ³_mÄnesius',\n  y : 'metai_metÅ³_metus',\n  yy: 'metai_metÅ³_metus'\n};\nfunction translateSeconds(num: number, withoutSuffix: boolean, key: string, isFuture: boolean) {\n  if (withoutSuffix) {\n      return 'kelios sekundÄs';\n  } else {\n      return isFuture ? 'keliÅ³ sekundÅ¾iÅ³' : 'kelias sekundes';\n  }\n}\nfunction translateSingular(num: number, withoutSuffix: boolean, key: string, isFuture: boolean) {\n  return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);\n}\nfunction special(num: number) {\n  return num % 10 === 0 || (num > 10 && num < 20);\n}\nfunction forms(key: string) {\n  return (units as any)[key].split('_');\n}\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean) {\n  let result = num + ' ';\n  if (num === 1) {\n      return result + translateSingular(num, withoutSuffix, key[0], isFuture);\n  } else if (withoutSuffix) {\n      return result + (special(num) ? forms(key)[1] : forms(key)[0]);\n  } else {\n      if (isFuture) {\n          return result + forms(key)[1];\n      } else {\n          return result + (special(num) ? forms(key)[1] : forms(key)[2]);\n      }\n  }\n}\n\nexport const ltLocale: LocaleData = {\n  abbr: 'lt',\n  months : {\n    format: 'sausio_vasario_kovo_balandÅ¾io_geguÅ¾Äs_birÅ¾elio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodÅ¾io'.split('_'),\n    standalone: 'sausis_vasaris_kovas_balandis_geguÅ¾Ä_birÅ¾elis_liepa_rugpjÅ«tis_rugsÄjis_spalis_lapkritis_gruodis'.split('_'),\n    isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n  },\n  monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n  weekdays : {\n      format: 'sekmadienÄ¯_pirmadienÄ¯_antradienÄ¯_treÄiadienÄ¯_ketvirtadienÄ¯_penktadienÄ¯_Å¡eÅ¡tadienÄ¯'.split('_'),\n      standalone: 'sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis'.split('_'),\n      isFormat: /dddd HH:mm/\n  },\n  weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡'.split('_'),\n  weekdaysMin : 'S_P_A_T_K_Pn_Å '.split('_'),\n  weekdaysParseExact : true,\n  longDateFormat : {\n      LT : 'HH:mm',\n      LTS : 'HH:mm:ss',\n      L : 'YYYY-MM-DD',\n      LL : 'YYYY [m.] MMMM D [d.]',\n      LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n      LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n      l : 'YYYY-MM-DD',\n      ll : 'YYYY [m.] MMMM D [d.]',\n      lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n      llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n  },\n  calendar : {\n      sameDay : '[Å iandien] LT',\n      nextDay : '[Rytoj] LT',\n      nextWeek : 'dddd LT',\n      lastDay : '[Vakar] LT',\n      lastWeek : '[PraÄjusÄ¯] dddd LT',\n      sameElse : 'L'\n  },\n  relativeTime : {\n      future : 'po %s',\n      past : 'prieÅ¡ %s',\n      s : translateSeconds,\n      ss : translate,\n      m : translateSingular,\n      mm : translate,\n      h : translateSingular,\n      hh : translate,\n      d : translateSingular,\n      dd : translate,\n      M : translateSingular,\n      MM : translate,\n      y : translateSingular,\n      yy : translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n  ordinal(num) {\n      return num + '-oji';\n  },\n  week : {\n      dow : 1, // Monday is the first day of the week.\n      doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:object-literal-shorthand\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean) {\n  switch (key) {\n    case 's':\n      return withoutSuffix ? 'ÑÑÐ´ÑÑÐ½ ÑÐµÐºÑÐ½Ð´' : 'ÑÑÐ´ÑÑÐ½ ÑÐµÐºÑÐ½Ð´ÑÐ½';\n    case 'ss':\n      return num + (withoutSuffix ? ' ÑÐµÐºÑÐ½Ð´' : ' ÑÐµÐºÑÐ½Ð´ÑÐ½');\n    case 'm':\n    case 'mm':\n      return num + (withoutSuffix ? ' Ð¼Ð¸Ð½ÑÑ' : ' Ð¼Ð¸Ð½ÑÑÑÐ½');\n    case 'h':\n    case 'hh':\n      return num + (withoutSuffix ? ' ÑÐ°Ð³' : ' ÑÐ°Ð³Ð¸Ð¹Ð½');\n    case 'd':\n    case 'dd':\n      return num + (withoutSuffix ? ' Ó©Ð´Ó©Ñ' : ' Ó©Ð´ÑÐ¸Ð¹Ð½');\n    case 'M':\n    case 'MM':\n      return num + (withoutSuffix ? ' ÑÐ°Ñ' : ' ÑÐ°ÑÑÐ½');\n    case 'y':\n    case 'yy':\n      return num + (withoutSuffix ? ' Ð¶Ð¸Ð»' : ' Ð¶Ð¸Ð»Ð¸Ð¹Ð½');\n    default:\n      return num.toString(10);\n  }\n}\n\nexport const mnLocale: LocaleData = {\n  abbr: 'mn',\n  months: 'ÐÑÐ³Ð´Ò¯Ð³ÑÑÑ ÑÐ°Ñ_Ð¥Ð¾ÑÑÐ´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÑÑÐ°Ð²Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÓ©ÑÓ©Ð²Ð´Ò¯Ð³ÑÑÑ ÑÐ°Ñ_Ð¢Ð°Ð²Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÑÑÐ³Ð°Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÐ¾Ð»Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÐ°Ð¹Ð¼Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÑÐ´Ò¯Ð³ÑÑÑ ÑÐ°Ñ_ÐÑÐ°Ð²Ð´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ_ÐÑÐ²Ð°Ð½ Ð½ÑÐ³Ð´Ò¯Ð³ÑÑÑ ÑÐ°Ñ_ÐÑÐ²Ð°Ð½ ÑÐ¾ÑÑÐ´ÑÐ³Ð°Ð°Ñ ÑÐ°Ñ'.split('_'),\n  monthsShort: '1 ÑÐ°Ñ_2 ÑÐ°Ñ_3 ÑÐ°Ñ_4 ÑÐ°Ñ_5 ÑÐ°Ñ_6 ÑÐ°Ñ_7 ÑÐ°Ñ_8 ÑÐ°Ñ_9 ÑÐ°Ñ_10 ÑÐ°Ñ_11 ÑÐ°Ñ_12 ÑÐ°Ñ'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'ÐÑÐ¼_ÐÐ°Ð²Ð°Ð°_ÐÑÐ³Ð¼Ð°Ñ_ÐÑÐ°Ð³Ð²Ð°_ÐÒ¯ÑÑÐ²_ÐÐ°Ð°ÑÐ°Ð½_ÐÑÐ¼Ð±Ð°'.split('_'),\n  weekdaysShort: 'ÐÑÐ¼_ÐÐ°Ð²_ÐÑÐ³_ÐÑÐ°_ÐÒ¯Ñ_ÐÐ°Ð°_ÐÑÐ¼'.split('_'),\n  weekdaysMin: 'ÐÑ_ÐÐ°_ÐÑ_ÐÑ_ÐÒ¯_ÐÐ°_ÐÑ'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'YYYY-MM-DD',\n    LL: 'YYYY Ð¾Ð½Ñ MMMMÑÐ½ D',\n    LLL: 'YYYY Ð¾Ð½Ñ MMMMÑÐ½ D HH:mm',\n    LLLL: 'dddd, YYYY Ð¾Ð½Ñ MMMMÑÐ½ D HH:mm'\n  },\n  meridiemParse: /Ò®Ó¨|Ò®Ð¥/i,\n  isPM: function (input) {\n    return input === 'Ò®Ð¥';\n  },\n  meridiem: function (hour, minute, isLower) {\n    if (hour < 12) {\n      return 'Ò®Ó¨';\n    } else {\n      return 'Ò®Ð¥';\n    }\n  },\n  calendar: {\n    sameDay: '[Ó¨Ð½Ó©Ó©Ð´Ó©Ñ] LT',\n    nextDay: '[ÐÐ°ÑÐ³Ð°Ð°Ñ] LT',\n    nextWeek: '[ÐÑÑÑ] dddd LT',\n    lastDay: '[Ó¨ÑÐ¸Ð³Ð´Ó©Ñ] LT',\n    lastWeek: '[Ó¨Ð½Ð³Ó©ÑÑÓ©Ð½] dddd LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: '%s Ð´Ð°ÑÐ°Ð°',\n    past: '%s Ó©Ð¼Ð½Ó©',\n    s: translate,\n    ss: translate,\n    m: translate,\n    mm: translate,\n    h: translate,\n    hh: translate,\n    d: translate,\n    dd: translate,\n    M: translate,\n    MM: translate,\n    y: translate,\n    yy: translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2} Ó©Ð´Ó©Ñ/,\n  ordinal: function (num: number, period: string): string {\n    switch (period) {\n      case 'd':\n      case 'D':\n      case 'DDD':\n        return num + ' Ó©Ð´Ó©Ñ';\n      default:\n        return num.toString(10);\n    }\n  }\n};\n","// tslint:disable:comment-format\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Norwegian BokmÃ¥l [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n\nexport const nbLocale: LocaleData = {\n  abbr: 'nb',\n  months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n  monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'sÃ¸ndag_mandag_tirsdag_onsdag_torsdag_fredag_lÃ¸rdag'.split('_'),\n  weekdaysShort: 'sÃ¸._ma._ti._on._to._fr._lÃ¸.'.split('_'),\n  weekdaysMin: 'sÃ¸_ma_ti_on_to_fr_lÃ¸'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D. MMMM YYYY',\n    LLL: 'D. MMMM YYYY [kl.] HH:mm',\n    LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n  },\n  calendar: {\n    sameDay: '[i dag kl.] LT',\n    nextDay: '[i morgen kl.] LT',\n    nextWeek: 'dddd [kl.] LT',\n    lastDay: '[i gÃ¥r kl.] LT',\n    lastWeek: '[forrige] dddd [kl.] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'om %s',\n    past: '%s siden',\n    s: 'noen sekunder',\n    ss: '%d sekunder',\n    m: 'ett minutt',\n    mm: '%d minutter',\n    h: 'en time',\n    hh: '%d timer',\n    d: 'en dag',\n    dd: '%d dager',\n    M: 'en mÃ¥ned',\n    MM: '%d mÃ¥neder',\n    y: 'ett Ã¥r',\n    yy: '%d Ã¥r'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4 // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris RÃ¶ling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\nlet monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');\nlet monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nlet monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nlet monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nexport const nlBeLocale: LocaleData = {\n  abbr: 'nl-be',\n  months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n  monthsShort(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortWithDots;\n    } else if (/-MMM-/.test(format)) {\n      return monthsShortWithoutDots[getMonth(date, isUTC)];\n    } else {\n      return monthsShortWithDots[getMonth(date, isUTC)];\n    }\n  },\n\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n  monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n\n  weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n  weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n  weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd D MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[vandaag om] LT',\n    nextDay: '[morgen om] LT',\n    nextWeek: 'dddd [om] LT',\n    lastDay: '[gisteren om] LT',\n    lastWeek: '[afgelopen] dddd [om] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'over %s',\n    past: '%s geleden',\n    s: 'een paar seconden',\n    ss: '%d seconden',\n    m: 'Ã©Ã©n minuut',\n    mm: '%d minuten',\n    h: 'Ã©Ã©n uur',\n    hh: '%d uur',\n    d: 'Ã©Ã©n dag',\n    dd: '%d dagen',\n    M: 'Ã©Ã©n maand',\n    MM: '%d maanden',\n    y: 'Ã©Ã©n jaar',\n    yy: '%d jaar'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n  ordinal(_num: number): string {\n    const num = Number(_num);\n    return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getMonth } from '../utils/date-getters';\n\n//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris RÃ¶ling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\nlet monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n  monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nlet monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nlet monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nexport const nlLocale: LocaleData = {\n  abbr: 'nl',\n  months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n  monthsShort (date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsShortWithDots;\n    } else if (/-MMM-/.test(format)) {\n      return monthsShortWithoutDots[getMonth(date, isUTC)];\n    } else {\n      return monthsShortWithDots[getMonth(date, isUTC)];\n    }\n  },\n\n  monthsRegex,\n  monthsShortRegex: monthsRegex,\n  monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n  monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n  monthsParse,\n  longMonthsParse : monthsParse,\n  shortMonthsParse : monthsParse,\n\n  weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n  weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n  weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),\n  weekdaysParseExact : true,\n  longDateFormat : {\n    LT : 'HH:mm',\n    LTS : 'HH:mm:ss',\n    L : 'DD-MM-YYYY',\n    LL : 'D MMMM YYYY',\n    LLL : 'D MMMM YYYY HH:mm',\n    LLLL : 'dddd D MMMM YYYY HH:mm'\n  },\n  calendar : {\n    sameDay: '[vandaag om] LT',\n    nextDay: '[morgen om] LT',\n    nextWeek: 'dddd [om] LT',\n    lastDay: '[gisteren om] LT',\n    lastWeek: '[afgelopen] dddd [om] LT',\n    sameElse: 'L'\n  },\n  relativeTime : {\n    future : 'over %s',\n    past : '%s geleden',\n    s : 'een paar seconden',\n    ss : '%d seconden',\n    m : 'Ã©Ã©n minuut',\n    mm : '%d minuten',\n    h : 'Ã©Ã©n uur',\n    hh : '%d uur',\n    d : 'Ã©Ã©n dag',\n    dd : '%d dagen',\n    M : 'Ã©Ã©n maand',\n    MM : '%d maanden',\n    y : 'Ã©Ã©n jaar',\n    yy : '%d jaar'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n  ordinal (_num: number): string {\n    const num = Number(_num);\n    return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');\n  },\n  week : {\n    dow : 1, // Monday is the first day of the week.\n    doy : 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getMonth } from '../utils/date-getters';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\nlet monthsNominative = 'styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_paÅºdziernik_listopad_grudzieÅ'.split('_');\nlet monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_paÅºdziernika_listopada_grudnia'.split('_');\n\nfunction plural(num: number): boolean {\n  return (num % 10 < 5) && (num % 10 > 1) && ((~~(num / 10) % 10) !== 1);\n}\n\nfunction translate(num: number, withoutSuffix: boolean, key: string): string {\n  let result = num + ' ';\n  switch (key) {\n    case 'ss':\n      return result + (plural(num) ? 'sekundy' : 'sekund');\n    case 'm':\n      return withoutSuffix ? 'minuta' : 'minutÄ';\n    case 'mm':\n      return result + (plural(num) ? 'minuty' : 'minut');\n    case 'h':\n      return withoutSuffix ? 'godzina' : 'godzinÄ';\n    case 'hh':\n      return result + (plural(num) ? 'godziny' : 'godzin');\n    case 'MM':\n      return result + (plural(num) ? 'miesiÄce' : 'miesiÄcy');\n    case 'yy':\n      return result + (plural(num) ? 'lata' : 'lat');\n  }\n}\n\nexport const plLocale: LocaleData = {\n  abbr: 'pl',\n  months(date: Date, format: string, isUTC?: boolean): string | string[] {\n    if (!date) {\n      return monthsNominative;\n    } else if (format === '') {\n      // Hack: if format empty we know this is used to generate\n      // RegExp by moment. Give then back both valid forms of months\n      // in RegExp ready format.\n      return '(' + monthsSubjective[getMonth(date, isUTC)] + '|' + monthsNominative[getMonth(date, isUTC)] + ')';\n    } else if (/D MMMM/.test(format)) {\n      return monthsSubjective[getMonth(date, isUTC)];\n    } else {\n      return monthsNominative[getMonth(date, isUTC)];\n    }\n  },\n  monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paÅº_lis_gru'.split('_'),\n  weekdays: 'niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄtek_sobota'.split('_'),\n  weekdaysShort: 'ndz_pon_wt_År_czw_pt_sob'.split('_'),\n  weekdaysMin: 'Nd_Pn_Wt_År_Cz_Pt_So'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd, D MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[DziÅ o] LT',\n    nextDay: '[Jutro o] LT',\n    nextWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[W niedzielÄ o] LT';\n\n        case 2:\n          return '[We wtorek o] LT';\n\n        case 3:\n          return '[W ÅrodÄ o] LT';\n\n        case 5:\n          return '[W piÄtek o] LT';\n\n        case 6:\n          return '[W sobotÄ o] LT';\n\n        default:\n          return '[W] dddd [o] LT';\n      }\n    },\n    lastDay: '[Wczoraj o] LT',\n    lastWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[W zeszÅÄ niedzielÄ o] LT';\n        case 3:\n          return '[W zeszÅÄ ÅrodÄ o] LT';\n        case 4:\n          return '[W zeszÅÄ czwartek o] LT';\n        case 5:\n          return '[W zeszÅÄ piÄtek o] LT';\n        case 6:\n          return '[W zeszÅÄ sobotÄ o] LT';\n        default:\n          return '[W zeszÅy] dddd [o] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'za %s',\n    past: '%s temu',\n    s: 'kilka sekund',\n    ss: translate,\n    m: translate,\n    mm: translate,\n    h: translate,\n    hh: translate,\n    d: '1 dzieÅ',\n    dd: '%d dni',\n    M: 'miesiÄc',\n    MM: translate,\n    y: 'rok',\n    yy: translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\nexport const ptBrLocale: LocaleData = {\n  abbr: 'pt-br',\n  months: 'Janeiro_Fevereiro_MarÃ§o_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n  monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n  weekdays: 'Domingo_Segunda-feira_TerÃ§a-feira_Quarta-feira_Quinta-feira_Sexta-feira_SÃ¡bado'.split('_'),\n  weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_SÃ¡b'.split('_'),\n  weekdaysMin: 'Do_2Âª_3Âª_4Âª_5Âª_6Âª_SÃ¡'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D [de] MMMM [de] YYYY',\n    LLL: 'D [de] MMMM [de] YYYY [Ã s] HH:mm',\n    LLLL: 'dddd, D [de] MMMM [de] YYYY [Ã s] HH:mm'\n  },\n  calendar: {\n    sameDay: '[Hoje Ã s] LT',\n    nextDay: '[AmanhÃ£ Ã s] LT',\n    nextWeek: 'dddd [Ã s] LT',\n    lastDay: '[Ontem Ã s] LT',\n    lastWeek(date: Date) {\n      return (getDayOfWeek(date) === 0 || getDayOfWeek(date) === 6) ?\n        '[Ãltimo] dddd [Ã s] LT' : // Saturday + Sunday\n        '[Ãltima] dddd [Ã s] LT'; // Monday - Friday\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'em %s',\n    past: '%s atrÃ¡s',\n    s: 'poucos segundos',\n    ss: '%d segundos',\n    m: 'um minuto',\n    mm: '%d minutos',\n    h: 'uma hora',\n    hh: '%d horas',\n    d: 'um dia',\n    dd: '%d dias',\n    M: 'um mÃªs',\n    MM: '%d meses',\n    y: 'um ano',\n    yy: '%d anos'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}Âº/,\n  ordinal: '%dÂº'\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\nimport { LocaleData } from '../locale/locale.class';\n\n// ! moment.js locale configuration\n// ! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n// ! author : Earle white: https://github.com/5earle\n\nfunction relativeTimeWithPlural(num: number, withoutSuffix: boolean, key: string): string {\n  let format: {[key:string]: string} = {\n    ss: 'secunde',\n    mm: 'minute',\n    hh: 'ore',\n    dd: 'zile',\n    MM: 'luni',\n    yy: 'ani'\n  };\n\n  let separator = ' ';\n  if (num % 100 >= 20 || (num >= 100 && num % 100 === 0)) {\n    separator = ' de ';\n  }\n  return num + separator + format[key];\n}\n\n\nexport const roLocale: LocaleData = {\n  abbr: 'ro',\n  months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n  monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'duminicÄ_luni_marÈi_miercuri_joi_vineri_sÃ¢mbÄtÄ'.split('_'),\n  weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_SÃ¢m'.split('_'),\n  weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_SÃ¢'.split('_'),\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY H:mm',\n    LLLL: 'dddd, D MMMM YYYY H:mm'\n  },\n  calendar: {\n    sameDay: '[azi la] LT',\n    nextDay: '[mÃ¢ine la] LT',\n    nextWeek: 'dddd [la] LT',\n    lastDay: '[ieri la] LT',\n    lastWeek: '[fosta] dddd [la] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'peste %s',\n    past: '%s Ã®n urmÄ',\n    s: 'cÃ¢teva secunde',\n    ss: relativeTimeWithPlural,\n    m: 'un minut',\n    mm: relativeTimeWithPlural,\n    h: 'o orÄ',\n    hh: relativeTimeWithPlural,\n    d: 'o zi',\n    dd: relativeTimeWithPlural,\n    M: 'o lunÄ',\n    MM: relativeTimeWithPlural,\n    y: 'un an',\n    yy: relativeTimeWithPlural\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 7  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getWeek } from '../units/week';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion ElensÃºle : https://github.com/Oire\n//! author : ÐÐ¾ÑÐµÐ½Ð±ÐµÑÐ³ ÐÐ°ÑÐº : https://github.com/socketpair\n\nfunction plural(word: string, num: number): string {\n  let forms = word.split('_');\n  return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\n\nfunction relativeTimeWithPlural(num: number, withoutSuffix: boolean, key: string): string {\n  let format: {[key: string]: string} = {\n    ss: withoutSuffix ? 'ÑÐµÐºÑÐ½Ð´Ð°_ÑÐµÐºÑÐ½Ð´Ñ_ÑÐµÐºÑÐ½Ð´' : 'ÑÐµÐºÑÐ½Ð´Ñ_ÑÐµÐºÑÐ½Ð´Ñ_ÑÐµÐºÑÐ½Ð´',\n    mm: withoutSuffix ? 'Ð¼Ð¸Ð½ÑÑÐ°_Ð¼Ð¸Ð½ÑÑÑ_Ð¼Ð¸Ð½ÑÑ' : 'Ð¼Ð¸Ð½ÑÑÑ_Ð¼Ð¸Ð½ÑÑÑ_Ð¼Ð¸Ð½ÑÑ',\n    hh: 'ÑÐ°Ñ_ÑÐ°ÑÐ°_ÑÐ°ÑÐ¾Ð²',\n    dd: 'Ð´ÐµÐ½Ñ_Ð´Ð½Ñ_Ð´Ð½ÐµÐ¹',\n    MM: 'Ð¼ÐµÑÑÑ_Ð¼ÐµÑÑÑÐ°_Ð¼ÐµÑÑÑÐµÐ²',\n    yy: 'Ð³Ð¾Ð´_Ð³Ð¾Ð´Ð°_Ð»ÐµÑ'\n  };\n  if (key === 'm') {\n    return withoutSuffix ? 'Ð¼Ð¸Ð½ÑÑÐ°' : 'Ð¼Ð¸Ð½ÑÑÑ';\n  }\n  return num + ' ' + plural(format[key], +num);\n}\n\nlet monthsParse = [/^ÑÐ½Ð²/i, /^ÑÐµÐ²/i, /^Ð¼Ð°Ñ/i, /^Ð°Ð¿Ñ/i, /^Ð¼Ð°[Ð¹Ñ]/i, /^Ð¸ÑÐ½/i, /^Ð¸ÑÐ»/i, /^Ð°Ð²Ð³/i, /^ÑÐµÐ½/i, /^Ð¾ÐºÑ/i, /^Ð½Ð¾Ñ/i, /^Ð´ÐµÐº/i];\n\n// http://new.gramota.ru/spravka/rules/139-prop : Â§ 103\n// Ð¡Ð¾ÐºÑÐ°ÑÐµÐ½Ð¸Ñ Ð¼ÐµÑÑÑÐµÐ²: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n// CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\nexport const ruLocale: LocaleData = {\n  abbr: 'ru',\n  months: {\n    format: 'ÑÐ½Ð²Ð°ÑÑ_ÑÐµÐ²ÑÐ°Ð»Ñ_Ð¼Ð°ÑÑÐ°_Ð°Ð¿ÑÐµÐ»Ñ_Ð¼Ð°Ñ_Ð¸ÑÐ½Ñ_Ð¸ÑÐ»Ñ_Ð°Ð²Ð³ÑÑÑÐ°_ÑÐµÐ½ÑÑÐ±ÑÑ_Ð¾ÐºÑÑÐ±ÑÑ_Ð½Ð¾ÑÐ±ÑÑ_Ð´ÐµÐºÐ°Ð±ÑÑ'.split('_'),\n    standalone: 'ÑÐ½Ð²Ð°ÑÑ_ÑÐµÐ²ÑÐ°Ð»Ñ_Ð¼Ð°ÑÑ_Ð°Ð¿ÑÐµÐ»Ñ_Ð¼Ð°Ð¹_Ð¸ÑÐ½Ñ_Ð¸ÑÐ»Ñ_Ð°Ð²Ð³ÑÑÑ_ÑÐµÐ½ÑÑÐ±ÑÑ_Ð¾ÐºÑÑÐ±ÑÑ_Ð½Ð¾ÑÐ±ÑÑ_Ð´ÐµÐºÐ°Ð±ÑÑ'.split('_')\n  },\n  monthsShort: {\n    // Ð¿Ð¾ CLDR Ð¸Ð¼ÐµÐ½Ð½Ð¾ \"Ð¸ÑÐ».\" Ð¸ \"Ð¸ÑÐ½.\", Ð½Ð¾ ÐºÐ°ÐºÐ¾Ð¹ ÑÐ¼ÑÑÐ» Ð¼ÐµÐ½ÑÑÑ Ð±ÑÐºÐ²Ñ Ð½Ð° ÑÐ¾ÑÐºÑ ?\n    format: 'ÑÐ½Ð²._ÑÐµÐ²Ñ._Ð¼Ð°Ñ._Ð°Ð¿Ñ._Ð¼Ð°Ñ_Ð¸ÑÐ½Ñ_Ð¸ÑÐ»Ñ_Ð°Ð²Ð³._ÑÐµÐ½Ñ._Ð¾ÐºÑ._Ð½Ð¾ÑÐ±._Ð´ÐµÐº.'.split('_'),\n    standalone: 'ÑÐ½Ð²._ÑÐµÐ²Ñ._Ð¼Ð°ÑÑ_Ð°Ð¿Ñ._Ð¼Ð°Ð¹_Ð¸ÑÐ½Ñ_Ð¸ÑÐ»Ñ_Ð°Ð²Ð³._ÑÐµÐ½Ñ._Ð¾ÐºÑ._Ð½Ð¾ÑÐ±._Ð´ÐµÐº.'.split('_')\n  },\n  weekdays: {\n    standalone: 'Ð²Ð¾ÑÐºÑÐµÑÐµÐ½ÑÐµ_Ð¿Ð¾Ð½ÐµÐ´ÐµÐ»ÑÐ½Ð¸Ðº_Ð²ÑÐ¾ÑÐ½Ð¸Ðº_ÑÑÐµÐ´Ð°_ÑÐµÑÐ²ÐµÑÐ³_Ð¿ÑÑÐ½Ð¸ÑÐ°_ÑÑÐ±Ð±Ð¾ÑÐ°'.split('_'),\n    format: 'Ð²Ð¾ÑÐºÑÐµÑÐµÐ½ÑÐµ_Ð¿Ð¾Ð½ÐµÐ´ÐµÐ»ÑÐ½Ð¸Ðº_Ð²ÑÐ¾ÑÐ½Ð¸Ðº_ÑÑÐµÐ´Ñ_ÑÐµÑÐ²ÐµÑÐ³_Ð¿ÑÑÐ½Ð¸ÑÑ_ÑÑÐ±Ð±Ð¾ÑÑ'.split('_'),\n    isFormat: /\\[ ?[ÐÐ²] ?(?:Ð¿ÑÐ¾ÑÐ»ÑÑ|ÑÐ»ÐµÐ´ÑÑÑÑÑ|ÑÑÑ)? ?\\] ?dddd/\n  },\n  weekdaysShort: 'Ð²Ñ_Ð¿Ð½_Ð²Ñ_ÑÑ_ÑÑ_Ð¿Ñ_ÑÐ±'.split('_'),\n  weekdaysMin: 'Ð²Ñ_Ð¿Ð½_Ð²Ñ_ÑÑ_ÑÑ_Ð¿Ñ_ÑÐ±'.split('_'),\n  monthsParse,\n  longMonthsParse: monthsParse,\n  shortMonthsParse: monthsParse,\n\n  // Ð¿Ð¾Ð»Ð½ÑÐµ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸, Ð¿Ð¾ ÑÑÐ¸ Ð±ÑÐºÐ²Ñ, Ð´Ð»Ñ Ð½ÐµÐºÐ¾ÑÐ¾ÑÑÑ, Ð¿Ð¾ 4 Ð±ÑÐºÐ²Ñ, ÑÐ¾ÐºÑÐ°ÑÐµÐ½Ð¸Ñ Ñ ÑÐ¾ÑÐºÐ¾Ð¹ Ð¸ Ð±ÐµÐ· ÑÐ¾ÑÐºÐ¸\n  monthsRegex: /^(ÑÐ½Ð²Ð°Ñ[ÑÑ]|ÑÐ½Ð²\\.?|ÑÐµÐ²ÑÐ°Ð»[ÑÑ]|ÑÐµÐ²Ñ?\\.?|Ð¼Ð°ÑÑÐ°?|Ð¼Ð°Ñ\\.?|Ð°Ð¿ÑÐµÐ»[ÑÑ]|Ð°Ð¿Ñ\\.?|Ð¼Ð°[Ð¹Ñ]|Ð¸ÑÐ½[ÑÑ]|Ð¸ÑÐ½\\.?|Ð¸ÑÐ»[ÑÑ]|Ð¸ÑÐ»\\.?|Ð°Ð²Ð³ÑÑÑÐ°?|Ð°Ð²Ð³\\.?|ÑÐµÐ½ÑÑÐ±Ñ[ÑÑ]|ÑÐµÐ½Ñ?\\.?|Ð¾ÐºÑÑÐ±Ñ[ÑÑ]|Ð¾ÐºÑ\\.?|Ð½Ð¾ÑÐ±Ñ[ÑÑ]|Ð½Ð¾ÑÐ±?\\.?|Ð´ÐµÐºÐ°Ð±Ñ[ÑÑ]|Ð´ÐµÐº\\.?)/i,\n\n  // ÐºÐ¾Ð¿Ð¸Ñ Ð¿ÑÐµÐ´ÑÐ´ÑÑÐµÐ³Ð¾\n  monthsShortRegex: /^(ÑÐ½Ð²Ð°Ñ[ÑÑ]|ÑÐ½Ð²\\.?|ÑÐµÐ²ÑÐ°Ð»[ÑÑ]|ÑÐµÐ²Ñ?\\.?|Ð¼Ð°ÑÑÐ°?|Ð¼Ð°Ñ\\.?|Ð°Ð¿ÑÐµÐ»[ÑÑ]|Ð°Ð¿Ñ\\.?|Ð¼Ð°[Ð¹Ñ]|Ð¸ÑÐ½[ÑÑ]|Ð¸ÑÐ½\\.?|Ð¸ÑÐ»[ÑÑ]|Ð¸ÑÐ»\\.?|Ð°Ð²Ð³ÑÑÑÐ°?|Ð°Ð²Ð³\\.?|ÑÐµÐ½ÑÑÐ±Ñ[ÑÑ]|ÑÐµÐ½Ñ?\\.?|Ð¾ÐºÑÑÐ±Ñ[ÑÑ]|Ð¾ÐºÑ\\.?|Ð½Ð¾ÑÐ±Ñ[ÑÑ]|Ð½Ð¾ÑÐ±?\\.?|Ð´ÐµÐºÐ°Ð±Ñ[ÑÑ]|Ð´ÐµÐº\\.?)/i,\n\n  // Ð¿Ð¾Ð»Ð½ÑÐµ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸\n  monthsStrictRegex: /^(ÑÐ½Ð²Ð°Ñ[ÑÑ]|ÑÐµÐ²ÑÐ°Ð»[ÑÑ]|Ð¼Ð°ÑÑÐ°?|Ð°Ð¿ÑÐµÐ»[ÑÑ]|Ð¼Ð°[ÑÐ¹]|Ð¸ÑÐ½[ÑÑ]|Ð¸ÑÐ»[ÑÑ]|Ð°Ð²Ð³ÑÑÑÐ°?|ÑÐµÐ½ÑÑÐ±Ñ[ÑÑ]|Ð¾ÐºÑÑÐ±Ñ[ÑÑ]|Ð½Ð¾ÑÐ±Ñ[ÑÑ]|Ð´ÐµÐºÐ°Ð±Ñ[ÑÑ])/i,\n\n  // ÐÑÑÐ°Ð¶ÐµÐ½Ð¸Ðµ, ÐºÐ¾ÑÐ¾ÑÐ¾Ðµ ÑÐ¾Ð¾ÑÐ²ÐµÑÑÐ²ÑÐµÑ ÑÐ¾Ð»ÑÐºÐ¾ ÑÐ¾ÐºÑÐ°ÑÑÐ½Ð½ÑÐ¼ ÑÐ¾ÑÐ¼Ð°Ð¼\n  monthsShortStrictRegex: /^(ÑÐ½Ð²\\.|ÑÐµÐ²Ñ?\\.|Ð¼Ð°Ñ[Ñ.]|Ð°Ð¿Ñ\\.|Ð¼Ð°[ÑÐ¹]|Ð¸ÑÐ½[ÑÑ.]|Ð¸ÑÐ»[ÑÑ.]|Ð°Ð²Ð³\\.|ÑÐµÐ½Ñ?\\.|Ð¾ÐºÑ\\.|Ð½Ð¾ÑÐ±?\\.|Ð´ÐµÐº\\.)/i,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D MMMM YYYY Ð³.',\n    LLL: 'D MMMM YYYY Ð³., H:mm',\n    LLLL: 'dddd, D MMMM YYYY Ð³., H:mm'\n  },\n  calendar: {\n    sameDay: '[Ð¡ÐµÐ³Ð¾Ð´Ð½Ñ Ð²] LT',\n    nextDay: '[ÐÐ°Ð²ÑÑÐ° Ð²] LT',\n    lastDay: '[ÐÑÐµÑÐ° Ð²] LT',\n    nextWeek(date: Date, now: Date) {\n      if (getWeek(now) !== getWeek(date)) {\n        switch (getDayOfWeek(date)) {\n          case 0:\n            return '[Ð ÑÐ»ÐµÐ´ÑÑÑÐµÐµ] dddd [Ð²] LT';\n          case 1:\n          case 2:\n          case 4:\n            return '[Ð ÑÐ»ÐµÐ´ÑÑÑÐ¸Ð¹] dddd [Ð²] LT';\n          case 3:\n          case 5:\n          case 6:\n            return '[Ð ÑÐ»ÐµÐ´ÑÑÑÑÑ] dddd [Ð²] LT';\n        }\n      } else {\n        if (getDayOfWeek(date) === 2) {\n          return '[ÐÐ¾] dddd [Ð²] LT';\n        } else {\n          return '[Ð] dddd [Ð²] LT';\n        }\n      }\n    },\n    lastWeek(date: Date, now: Date) {\n      if (getWeek(now) !== getWeek(date)) {\n        switch (getDayOfWeek(date)) {\n          case 0:\n            return '[Ð Ð¿ÑÐ¾ÑÐ»Ð¾Ðµ] dddd [Ð²] LT';\n          case 1:\n          case 2:\n          case 4:\n            return '[Ð Ð¿ÑÐ¾ÑÐ»ÑÐ¹] dddd [Ð²] LT';\n          case 3:\n          case 5:\n          case 6:\n            return '[Ð Ð¿ÑÐ¾ÑÐ»ÑÑ] dddd [Ð²] LT';\n        }\n      } else {\n        if (getDayOfWeek(date) === 2) {\n          return '[ÐÐ¾] dddd [Ð²] LT';\n        } else {\n          return '[Ð] dddd [Ð²] LT';\n        }\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'ÑÐµÑÐµÐ· %s',\n    past: '%s Ð½Ð°Ð·Ð°Ð´',\n    s: 'Ð½ÐµÑÐºÐ¾Ð»ÑÐºÐ¾ ÑÐµÐºÑÐ½Ð´',\n    ss: relativeTimeWithPlural,\n    m: relativeTimeWithPlural,\n    mm: relativeTimeWithPlural,\n    h: 'ÑÐ°Ñ',\n    hh: relativeTimeWithPlural,\n    d: 'Ð´ÐµÐ½Ñ',\n    dd: relativeTimeWithPlural,\n    M: 'Ð¼ÐµÑÑÑ',\n    MM: relativeTimeWithPlural,\n    y: 'Ð³Ð¾Ð´',\n    yy: relativeTimeWithPlural\n  },\n  meridiemParse: /Ð½Ð¾ÑÐ¸|ÑÑÑÐ°|Ð´Ð½Ñ|Ð²ÐµÑÐµÑÐ°/i,\n  isPM(input) {\n    return /^(Ð´Ð½Ñ|Ð²ÐµÑÐµÑÐ°)$/.test(input);\n  },\n  meridiem(hour, minute, isLower) {\n    if (hour < 4) {\n      return 'Ð½Ð¾ÑÐ¸';\n    } else if (hour < 12) {\n      return 'ÑÑÑÐ°';\n    } else if (hour < 17) {\n      return 'Ð´Ð½Ñ';\n    } else {\n      return 'Ð²ÐµÑÐµÑÐ°';\n    }\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}-(Ð¹|Ð³Ð¾|Ñ)/,\n  ordinal(_num: number, period: string): string {\n    const num = Number(_num);\n    switch (period) {\n      case 'M':\n      case 'd':\n      case 'DDD':\n        return num + '-Ð¹';\n      case 'D':\n        return num + '-Ð³Ð¾';\n      case 'w':\n      case 'W':\n        return num + '-Ñ';\n      default:\n        return num.toString(10);\n    }\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Jozef PaÅ¾in : https://github.com/atiris\n\nconst months = 'januÃ¡r_februÃ¡r_marec_aprÃ­l_mÃ¡j_jÃºn_jÃºl_august_september_oktÃ³ber_november_december'.split('_');\nconst monthsShort = 'jan_feb_mar_apr_mÃ¡j_jÃºn_jÃºl_aug_sep_okt_nov_dec'.split('_');\n\nfunction plural(num: number): boolean {\n  return (num > 1) && (num < 5) && (~~(num / 10) !== 1);\n}\n\nfunction translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  const result = num + ' ';\n\n  switch (key) {\n    case 's':// a few seconds / in a few seconds / a few seconds ago\n      return (withoutSuffix || isFuture) ? 'pÃ¡r sekÃºnd' : 'pÃ¡r sekundami';\n    case 'ss':// 9 seconds / in 9 seconds / 9 seconds ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'sekundy' : 'sekÃºnd');\n      }\n      else {\n        return result + 'sekundami';\n      }\n    // break;\n    case 'm':// a minute / in a minute / a minute ago\n      return withoutSuffix ? 'minÃºta' : (isFuture ? 'minÃºtu' : 'minÃºtou');\n    case 'mm':// 9 minutes / in 9 minutes / 9 minutes ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'minÃºty' : 'minÃºt');\n      }\n      else {\n        return result + 'minÃºtami';\n      }\n    // break;\n    case 'h':// an hour / in an hour / an hour ago\n      return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n    case 'hh':// 9 hours / in 9 hours / 9 hours ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'hodiny' : 'hodÃ­n');\n      }\n      else {\n        return result + 'hodinami';\n      }\n    // break;\n    case 'd':// a day / in a day / a day ago\n      return (withoutSuffix || isFuture) ? 'deÅ' : 'dÅom';\n    case 'dd':// 9 days / in 9 days / 9 days ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'dni' : 'dnÃ­');\n      }\n      else {\n        return result + 'dÅami';\n      }\n    // break;\n    case 'M':// a month / in a month / a month ago\n      return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';\n    case 'MM':// 9 months / in 9 months / 9 months ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'mesiace' : 'mesiacov');\n      }\n      else {\n        return result + 'mesiacmi';\n      }\n    // break;\n    case 'y':// a year / in a year / a year ago\n      return (withoutSuffix || isFuture) ? 'rok' : 'rokom';\n    case 'yy':// 9 years / in 9 years / 9 years ago\n      if (withoutSuffix || isFuture) {\n        return result + (plural(num) ? 'roky' : 'rokov');\n      }\n      else {\n        return result + 'rokmi';\n      }\n    // break;\n  }\n}\n\nexport const skLocale: LocaleData = {\n  abbr: 'sk',\n  months,\n  monthsShort,\n  weekdays: 'nedeÄ¾a_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota'.split('_'),\n  weekdaysShort: 'ne_po_ut_st_Å¡t_pi_so'.split('_'),\n  weekdaysMin: 'ne_po_ut_st_Å¡t_pi_so'.split('_'),\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D. MMMM YYYY',\n    LLL: 'D. MMMM YYYY H:mm',\n    LLLL: 'dddd D. MMMM YYYY H:mm',\n    l: 'D. M. YYYY'\n  },\n  calendar: {\n    sameDay: '[dnes o] LT',\n    nextDay: '[zajtra o] LT',\n    nextWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[v nedeÄ¾u o] LT';\n        case 1:\n        case 2:\n          return '[v] dddd [o] LT';\n        case 3:\n          return '[v stredu o] LT';\n        case 4:\n          return '[vo Å¡tvrtok o] LT';\n        case 5:\n          return '[v piatok o] LT';\n        case 6:\n          return '[v sobotu o] LT';\n      }\n    },\n    lastDay: '[vÄera o] LT',\n    lastWeek(date: Date): string {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[minulÃº nedeÄ¾u o] LT';\n        case 1:\n        case 2:\n          return '[minulÃ½] dddd [o] LT';\n        case 3:\n          return '[minulÃº stredu o] LT';\n        case 4:\n        case 5:\n          return '[minulÃ½] dddd [o] LT';\n        case 6:\n          return '[minulÃº sobotu o] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'o %s',\n    past: 'pred %s',\n    s: translate,\n    ss: translate,\n    m: translate,\n    mm: translate,\n    h: translate,\n    hh: translate,\n    d: translate,\n    dd: translate,\n    M: translate,\n    MM: translate,\n    y: translate,\n    yy: translate\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:object-literal-key-quotes\n\nimport { LocaleData } from '../locale/locale.class';\nimport { getDayOfWeek } from '../units/day-of-week';\n\n//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : mihan : https://github.com/mihan\n\nfunction processRelativeTime(number: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {\n  var result = number + ' ';\n  switch (key) {\n    case 's':\n      return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n    case 'ss':\n      if (number === 1) {\n        result += withoutSuffix ? 'sekundo' : 'sekundi';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n      } else if (number < 5) {\n        result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n      } else {\n        result += withoutSuffix || isFuture ? 'sekund' : 'sekund';\n      }\n      return result;\n    case 'm':\n      return withoutSuffix ? 'ena minuta' : 'eno minuto';\n    case 'mm':\n      if (number === 1) {\n        result += withoutSuffix ? 'minuta' : 'minuto';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n      } else if (number < 5) {\n        result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n      } else {\n        result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n      }\n      return result;\n    case 'h':\n      return withoutSuffix ? 'ena ura' : 'eno uro';\n    case 'hh':\n      if (number === 1) {\n        result += withoutSuffix ? 'ura' : 'uro';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'uri' : 'urama';\n      } else if (number < 5) {\n        result += withoutSuffix || isFuture ? 'ure' : 'urami';\n      } else {\n        result += withoutSuffix || isFuture ? 'ur' : 'urami';\n      }\n      return result;\n    case 'd':\n      return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n    case 'dd':\n      if (number === 1) {\n        result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n      } else {\n        result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n      }\n      return result;\n    case 'M':\n      return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n    case 'MM':\n      if (number === 1) {\n        result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n      } else if (number < 5) {\n        result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n      } else {\n        result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n      }\n      return result;\n    case 'y':\n      return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n    case 'yy':\n      if (number === 1) {\n        result += withoutSuffix || isFuture ? 'leto' : 'letom';\n      } else if (number === 2) {\n        result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n      } else if (number < 5) {\n        result += withoutSuffix || isFuture ? 'leta' : 'leti';\n      } else {\n        result += withoutSuffix || isFuture ? 'let' : 'leti';\n      }\n      return result;\n  }\n}\n\nexport const slLocale: LocaleData = {\n  abbr: 'sl',\n  months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n  monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota'.split('_'),\n  weekdaysShort: 'ned._pon._tor._sre._Äet._pet._sob.'.split('_'),\n  weekdaysMin: 'ne_po_to_sr_Äe_pe_so'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D. MMMM YYYY',\n    LLL: 'D. MMMM YYYY H:mm',\n    LLLL: 'dddd, D. MMMM YYYY H:mm'\n  },\n  calendar: {\n    sameDay: '[danes ob] LT',\n    nextDay: '[jutri ob] LT',\n\n    nextWeek(date: Date) {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[v] [nedeljo] [ob] LT';\n        case 3:\n          return '[v] [sredo] [ob] LT';\n        case 6:\n          return '[v] [soboto] [ob] LT';\n        case 1:\n        case 2:\n        case 4:\n        case 5:\n          return '[v] dddd [ob] LT';\n      }\n    },\n    lastDay: '[vÄeraj ob] LT',\n    lastWeek(date: Date) {\n      switch (getDayOfWeek(date)) {\n        case 0:\n          return '[prejÅ¡njo] [nedeljo] [ob] LT';\n        case 3:\n          return '[prejÅ¡njo] [sredo] [ob] LT';\n        case 6:\n          return '[prejÅ¡njo] [soboto] [ob] LT';\n        case 1:\n        case 2:\n        case 4:\n        case 5:\n          return '[prejÅ¡nji] dddd [ob] LT';\n      }\n    },\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'Äez %s',\n    past: 'pred %s',\n    s: processRelativeTime,\n    ss: processRelativeTime,\n    m: processRelativeTime,\n    mm: processRelativeTime,\n    h: processRelativeTime,\n    hh: processRelativeTime,\n    d: processRelativeTime,\n    dd: processRelativeTime,\n    M: processRelativeTime,\n    MM: processRelativeTime,\n    y: processRelativeTime,\n    yy: processRelativeTime\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n  ordinal: '%d.',\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 7  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\nexport const svLocale: LocaleData = {\n  abbr: 'sv',\n  months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n  monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n  weekdays: 'sÃ¶ndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lÃ¶rdag'.split('_'),\n  weekdaysShort: 'sÃ¶n_mÃ¥n_tis_ons_tor_fre_lÃ¶r'.split('_'),\n  weekdaysMin: 'sÃ¶_mÃ¥_ti_on_to_fr_lÃ¶'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'YYYY-MM-DD',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY [kl.] HH:mm',\n    LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n    lll: 'D MMM YYYY HH:mm',\n    llll: 'ddd D MMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[Idag] LT',\n    nextDay: '[Imorgon] LT',\n    lastDay: '[IgÃ¥r] LT',\n    nextWeek: '[PÃ¥] dddd LT',\n    lastWeek: '[I] dddd[s] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'om %s',\n    past: 'fÃ¶r %s sedan',\n    s: 'nÃ¥gra sekunder',\n    ss: '%d sekunder',\n    m: 'en minut',\n    mm: '%d minuter',\n    h: 'en timme',\n    hh: '%d timmar',\n    d: 'en dag',\n    dd: '%d dagar',\n    M: 'en mÃ¥nad',\n    MM: '%d mÃ¥nader',\n    y: 'ett Ã¥r',\n    yy: '%d Ã¥r'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(e|a)/,\n  ordinal(_num: number): string {\n    const num = Number(_num);\n    let b = num % 10,\n      output = (~~(num % 100 / 10) === 1) ? 'e' :\n        (b === 1) ? 'a' :\n          (b === 2) ? 'a' :\n            (b === 3) ? 'e' : 'e';\n    return num + output;\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\n// moment.js locale configuration\n// locale : Thai [th]\n// author : Watcharapol Sanitwong : https://github.com/tumit\n\nimport { LocaleData } from '../locale/locale.class';\n\nexport const thLocale: LocaleData = {\n  abbr: 'th',\n  months: 'à¸¡à¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ à¸²à¸à¸±à¸à¸à¹_à¸¡à¸µà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ à¸²à¸à¸¡_à¸¡à¸´à¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_à¸ªà¸´à¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡'.split('_'),\n  monthsShort: 'à¸¡.à¸._à¸.à¸._à¸¡à¸µ.à¸._à¹à¸¡.à¸¢._à¸.à¸._à¸¡à¸´.à¸¢._à¸.à¸._à¸ª.à¸._à¸.à¸¢._à¸.à¸._à¸.à¸¢._à¸.à¸.'.split('_'),\n  monthsParseExact: true,\n  weekdays: 'à¸­à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸­à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_à¸¨à¸¸à¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.split('_'),\n  weekdaysShort: 'à¸­à¸²._à¸._à¸­._à¸._à¸à¸¤._à¸¨._à¸ª.'.split('_'), // yes, three characters difference\n  weekdaysMin: 'à¸­à¸²._à¸._à¸­._à¸._à¸à¸¤._à¸¨._à¸ª.'.split('_'),\n  weekdaysParseExact: true,\n  longDateFormat: {\n    LT: 'H:mm',\n    LTS: 'H:mm:ss',\n    L: 'DD/MM/YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY à¹à¸§à¸¥à¸² H:mm',\n    LLLL: 'à¸§à¸±à¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² H:mm'\n  },\n  meridiemParse: /à¸à¹à¸­à¸à¹à¸à¸µà¹à¸¢à¸|à¸«à¸¥à¸±à¸à¹à¸à¸µà¹à¸¢à¸/,\n  isPM(input) {\n    return input === 'à¸«à¸¥à¸±à¸à¹à¸à¸µà¹à¸¢à¸';\n  },\n  meridiem(hour, minute, isLower) {\n    if (hour < 12) {\n      return 'à¸à¹à¸­à¸à¹à¸à¸µà¹à¸¢à¸';\n    } else {\n      return 'à¸«à¸¥à¸±à¸à¹à¸à¸µà¹à¸¢à¸';\n    }\n  },\n  calendar: {\n    sameDay: '[à¸§à¸±à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT',\n    nextDay: '[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT',\n    nextWeek: 'dddd[à¸«à¸à¹à¸² à¹à¸§à¸¥à¸²] LT',\n    lastDay: '[à¹à¸¡à¸·à¹à¸­à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT',\n    lastWeek: '[à¸§à¸±à¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: 'à¸­à¸µà¸ %s',\n    past: '%sà¸à¸µà¹à¹à¸¥à¹à¸§',\n    s: 'à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ',\n    ss: '%d à¸§à¸´à¸à¸²à¸à¸µ',\n    m: '1 à¸à¸²à¸à¸µ',\n    mm: '%d à¸à¸²à¸à¸µ',\n    h: '1 à¸à¸±à¹à¸§à¹à¸¡à¸',\n    hh: '%d à¸à¸±à¹à¸§à¹à¸¡à¸',\n    d: '1 à¸§à¸±à¸',\n    dd: '%d à¸§à¸±à¸',\n    M: '1 à¹à¸à¸·à¸­à¸',\n    MM: '%d à¹à¸à¸·à¸­à¸',\n    y: '1 à¸à¸µ',\n    yy: '%d à¸à¸µ'\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak YiÄit Kaya: https://github.com/BYK\n\nlet suffixes: { [key: string]: string } = {\n  1: '\\'inci',\n  5: '\\'inci',\n  8: '\\'inci',\n  70: '\\'inci',\n  80: '\\'inci',\n  2: '\\'nci',\n  7: '\\'nci',\n  20: '\\'nci',\n  50: '\\'nci',\n  3: '\\'Ã¼ncÃ¼',\n  4: '\\'Ã¼ncÃ¼',\n  100: '\\'Ã¼ncÃ¼',\n  6: '\\'ncÄ±',\n  9: '\\'uncu',\n  10: '\\'uncu',\n  30: '\\'uncu',\n  60: '\\'Ä±ncÄ±',\n  90: '\\'Ä±ncÄ±'\n};\n\nexport const trLocale: LocaleData = {\n  abbr: 'tr',\n  months: 'Ocak_Åubat_Mart_Nisan_MayÄ±s_Haziran_Temmuz_AÄustos_EylÃ¼l_Ekim_KasÄ±m_AralÄ±k'.split('_'),\n  monthsShort: 'Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara'.split('_'),\n  weekdays: 'Pazar_Pazartesi_SalÄ±_ÃarÅamba_PerÅembe_Cuma_Cumartesi'.split('_'),\n  weekdaysShort: 'Paz_Pts_Sal_Ãar_Per_Cum_Cts'.split('_'),\n  weekdaysMin: 'Pz_Pt_Sa_Ãa_Pe_Cu_Ct'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'DD.MM.YYYY',\n    LL: 'D MMMM YYYY',\n    LLL: 'D MMMM YYYY HH:mm',\n    LLLL: 'dddd, D MMMM YYYY HH:mm'\n  },\n  calendar: {\n    sameDay: '[bugÃ¼n saat] LT',\n    nextDay: '[yarÄ±n saat] LT',\n    nextWeek: '[gelecek] dddd [saat] LT',\n    lastDay: '[dÃ¼n] LT',\n    lastWeek: '[geÃ§en] dddd [saat] LT',\n    sameElse: 'L'\n  },\n  relativeTime: {\n    future: '%s sonra',\n    past: '%s Ã¶nce',\n    s: 'birkaÃ§ saniye',\n    ss: '%d saniye',\n    m: 'bir dakika',\n    mm: '%d dakika',\n    h: 'bir saat',\n    hh: '%d saat',\n    d: 'bir gÃ¼n',\n    dd: '%d gÃ¼n',\n    M: 'bir ay',\n    MM: '%d ay',\n    y: 'bir yÄ±l',\n    yy: '%d yÄ±l'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}'(inci|nci|Ã¼ncÃ¼|ncÄ±|uncu|Ä±ncÄ±)/,\n  ordinal(_num: number): string {\n    const num = Number(_num);\n    if (num === 0) {  // special case for zero\n      return num + '\\'Ä±ncÄ±';\n    }\n    let a = num % 10,\n      b = num % 100 - a,\n      c = num >= 100 ? 100 : null;\n    return num + (suffixes[a] || suffixes[b] || suffixes[c]);\n  },\n  week: {\n    dow: 1, // Monday is the first day of the week.\n    doy: 7  // The week that contains Jan 1st is the first week of the year.\n  }\n};\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Viá»t Nam [vi]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\nexport const viLocale: LocaleData = {\n  abbr: 'vi',\n  months : 'thÃ¡ng 1_thÃ¡ng 2_thÃ¡ng 3_thÃ¡ng 4_thÃ¡ng 5_thÃ¡ng 6_thÃ¡ng 7_thÃ¡ng 8_thÃ¡ng 9_thÃ¡ng 10_thÃ¡ng 11_thÃ¡ng 12'.split('_'),\n  monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),\n  monthsParseExact: true,\n  weekdays : 'chá»§ nháº­t_thá»© hai_thá»© ba_thá»© tÆ°_thá»© nÄm_thá»© sÃ¡u_thá»© báº£y'.split('_'),\n  weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n  weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n  weekdaysParseExact : true,\n  meridiemParse: /sa|ch/i,\n  isPM(input: string): boolean {\n    return /^ch$/i.test(input);\n  },\n  meridiem(hours: number, minutes: number, isLower: boolean): string {\n    if (hours < 12) {\n      return isLower ? 'sa' : 'SA';\n    } else {\n      return isLower ? 'ch' : 'CH';\n    }\n  },\n  longDateFormat : {\n    LT : 'HH:mm',\n    LTS : 'HH:mm:ss',\n    L : 'DD/MM/YYYY',\n    LL : 'D MMMM [nÄm] YYYY',\n    LLL : 'D MMMM [nÄm] YYYY HH:mm',\n    LLLL : 'dddd, D MMMM [nÄm] YYYY HH:mm',\n    l : 'DD/M/YYYY',\n    ll : 'D MMM YYYY',\n    lll : 'D MMM YYYY HH:mm',\n    llll : 'ddd, D MMM YYYY HH:mm'\n  },\n  calendar : {\n    sameDay: '[HÃ´m nay lÃºc] LT',\n    nextDay: '[NgÃ y mai lÃºc] LT',\n    nextWeek: 'dddd [tuáº§n tá»i lÃºc] LT',\n    lastDay: '[HÃ´m qua lÃºc] LT',\n    lastWeek: 'dddd [tuáº§n trÆ°á»c lÃºc] LT',\n    sameElse: 'L'\n  },\n  relativeTime : {\n    future : '%s tá»i',\n    past : '%s trÆ°á»c',\n    s : 'vÃ i giÃ¢y',\n    ss : '%d giÃ¢y' ,\n    m : 'má»t phÃºt',\n    mm : '%d phÃºt',\n    h : 'má»t giá»',\n    hh : '%d giá»',\n    d : 'má»t ngÃ y',\n    dd : '%d ngÃ y',\n    M : 'má»t thÃ¡ng',\n    MM : '%d thÃ¡ng',\n    y : 'má»t nÄm',\n    yy : '%d nÄm'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}/,\n  ordinal(_num: number): string {\n    return '' + _num;\n  },\n  week : {\n    dow : 1, // Thá»© Hai lÃ  ngÃ y Äáº§u tuáº§n.\n    doy : 4  // Tuáº§n chá»©a ngÃ y 4 thÃ¡ng 1 lÃ  tuáº§n Äáº§u tiÃªn trong nÄm.\n  }\n};\n\n","// tslint:disable:comment-format binary-expression-operand-order max-line-length\n// tslint:disable:no-bitwise prefer-template cyclomatic-complexity\n// tslint:disable:no-shadowed-variable switch-default prefer-const\n// tslint:disable:one-variable-per-declaration newline-before-return\n// tslint:disable:no-parameter-reassignment prefer-switch\n\nimport { LocaleData } from '../locale/locale.class';\n\n//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n\nexport const zhCnLocale: LocaleData = {\n  abbr: 'zh-cn',\n  months: 'ä¸æ_äºæ_ä¸æ_åæ_äºæ_å­æ_ä¸æ_å«æ_ä¹æ_åæ_åä¸æ_åäºæ'.split('_'),\n  monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'),\n  weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå­'.split('_'),\n  weekdaysShort: 'å¨æ¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å­'.split('_'),\n  weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å­'.split('_'),\n  longDateFormat: {\n    LT: 'HH:mm',\n    LTS: 'HH:mm:ss',\n    L: 'YYYY/MM/DD',\n    LL: 'YYYYå¹´MæDæ¥',\n    LLL: 'YYYYå¹´MæDæ¥Ahç¹mmå',\n    LLLL: 'YYYYå¹´MæDæ¥ddddAhç¹mmå',\n    l: 'YYYY/M/D',\n    ll: 'YYYYå¹´MæDæ¥',\n    lll: 'YYYYå¹´MæDæ¥ HH:mm',\n    llll: 'YYYYå¹´MæDæ¥dddd HH:mm'\n  },\n  meridiemParse: /åæ¨|æ©ä¸|ä¸å|ä¸­å|ä¸å|æä¸/,\n  meridiemHour(hour, meridiem) {\n    if (hour === 12) {\n      hour = 0;\n    }\n    if (meridiem === 'åæ¨' || meridiem === 'æ©ä¸' ||\n      meridiem === 'ä¸å') {\n      return hour;\n    } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') {\n      return hour + 12;\n    } else {\n      // 'ä¸­å'\n      return hour >= 11 ? hour : hour + 12;\n    }\n  },\n  meridiem(hour, minute, isLower) {\n    let hm = hour * 100 + minute;\n    if (hm < 600) {\n      return 'åæ¨';\n    } else if (hm < 900) {\n      return 'æ©ä¸';\n    } else if (hm < 1130) {\n      return 'ä¸å';\n    } else if (hm < 1230) {\n      return 'ä¸­å';\n    } else if (hm < 1800) {\n      return 'ä¸å';\n    } else {\n      return 'æä¸';\n    }\n  },\n  calendar: {\n    sameDay: '[ä»å¤©]LT',\n    nextDay: '[æå¤©]LT',\n    nextWeek: '[ä¸]ddddLT',\n    lastDay: '[æ¨å¤©]LT',\n    lastWeek: '[ä¸]ddddLT',\n    sameElse: 'L'\n  },\n  dayOfMonthOrdinalParse: /\\d{1,2}(æ¥|æ|å¨)/,\n  ordinal(_num: number, period) {\n    const num = Number(_num);\n    switch (period) {\n      case 'd':\n      case 'D':\n      case 'DDD':\n        return num + 'æ¥';\n      case 'M':\n        return num + 'æ';\n      case 'w':\n      case 'W':\n        return num + 'å¨';\n      default:\n        return num.toString();\n    }\n  },\n  relativeTime: {\n    future: '%så',\n    past: '%så',\n    s: 'å ç§',\n    ss: '%d ç§',\n    m: '1 åé',\n    mm: '%d åé',\n    h: '1 å°æ¶',\n    hh: '%d å°æ¶',\n    d: '1 å¤©',\n    dd: '%d å¤©',\n    M: '1 ä¸ªæ',\n    MM: '%d ä¸ªæ',\n    y: '1 å¹´',\n    yy: '%d å¹´'\n  },\n  week: {\n    // GB/T 7408-1994ãæ°æ®ååäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988ç­æ\n    dow: 1, // Monday is the first day of the week.\n    doy: 4  // The week that contains Jan 4th is the first week of the year.\n  }\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport enum TagContentType {\n  RAW_TEXT,\n  ESCAPABLE_RAW_TEXT,\n  PARSABLE_DATA\n}\n\nexport interface TagDefinition {\n  closedByParent: boolean;\n  implicitNamespacePrefix: string|null;\n  contentType: TagContentType;\n  isVoid: boolean;\n  ignoreFirstLf: boolean;\n  canSelfClose: boolean;\n\n  isClosedByChild(name: string): boolean;\n}\n\nexport function splitNsName(elementName: string): [string | null, string] {\n  if (elementName[0] != ':') {\n    return [null, elementName];\n  }\n\n  const colonIndex = elementName.indexOf(':', 1);\n\n  if (colonIndex == -1) {\n    throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n  }\n\n  return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n\n// `<ng-container>` tags work the same regardless the namespace\nexport function isNgContainer(tagName: string): boolean {\n  return splitNsName(tagName)[1] === 'ng-container';\n}\n\n// `<ng-content>` tags work the same regardless the namespace\nexport function isNgContent(tagName: string): boolean {\n  return splitNsName(tagName)[1] === 'ng-content';\n}\n\n// `<ng-template>` tags work the same regardless the namespace\nexport function isNgTemplate(tagName: string): boolean {\n  return splitNsName(tagName)[1] === 'ng-template';\n}\n\nexport function getNsPrefix(fullName: string): string;\nexport function getNsPrefix(fullName: null): null;\nexport function getNsPrefix(fullName: string | null): string|null {\n  return fullName === null ? null : splitNsName(fullName)[0];\n}\n\nexport function mergeNsAndName(prefix: string, localName: string): string {\n  return prefix ? `:${prefix}:${localName}` : localName;\n}\n\n// see http://www.w3.org/TR/html51/syntax.html#named-character-references\n// see https://html.spec.whatwg.org/multipage/entities.json\n// This list is not exhaustive to keep the compiler footprint low.\n// The `&#123;` / `&#x1ab;` syntax should be used when the named character reference does not\n// exist.\nexport const NAMED_ENTITIES: {[k: string]: string} = {\n  'Aacute': '\\u00C1',\n  'aacute': '\\u00E1',\n  'Acirc': '\\u00C2',\n  'acirc': '\\u00E2',\n  'acute': '\\u00B4',\n  'AElig': '\\u00C6',\n  'aelig': '\\u00E6',\n  'Agrave': '\\u00C0',\n  'agrave': '\\u00E0',\n  'alefsym': '\\u2135',\n  'Alpha': '\\u0391',\n  'alpha': '\\u03B1',\n  'amp': '&',\n  'and': '\\u2227',\n  'ang': '\\u2220',\n  'apos': '\\u0027',\n  'Aring': '\\u00C5',\n  'aring': '\\u00E5',\n  'asymp': '\\u2248',\n  'Atilde': '\\u00C3',\n  'atilde': '\\u00E3',\n  'Auml': '\\u00C4',\n  'auml': '\\u00E4',\n  'bdquo': '\\u201E',\n  'Beta': '\\u0392',\n  'beta': '\\u03B2',\n  'brvbar': '\\u00A6',\n  'bull': '\\u2022',\n  'cap': '\\u2229',\n  'Ccedil': '\\u00C7',\n  'ccedil': '\\u00E7',\n  'cedil': '\\u00B8',\n  'cent': '\\u00A2',\n  'Chi': '\\u03A7',\n  'chi': '\\u03C7',\n  'circ': '\\u02C6',\n  'clubs': '\\u2663',\n  'cong': '\\u2245',\n  'copy': '\\u00A9',\n  'crarr': '\\u21B5',\n  'cup': '\\u222A',\n  'curren': '\\u00A4',\n  'dagger': '\\u2020',\n  'Dagger': '\\u2021',\n  'darr': '\\u2193',\n  'dArr': '\\u21D3',\n  'deg': '\\u00B0',\n  'Delta': '\\u0394',\n  'delta': '\\u03B4',\n  'diams': '\\u2666',\n  'divide': '\\u00F7',\n  'Eacute': '\\u00C9',\n  'eacute': '\\u00E9',\n  'Ecirc': '\\u00CA',\n  'ecirc': '\\u00EA',\n  'Egrave': '\\u00C8',\n  'egrave': '\\u00E8',\n  'empty': '\\u2205',\n  'emsp': '\\u2003',\n  'ensp': '\\u2002',\n  'Epsilon': '\\u0395',\n  'epsilon': '\\u03B5',\n  'equiv': '\\u2261',\n  'Eta': '\\u0397',\n  'eta': '\\u03B7',\n  'ETH': '\\u00D0',\n  'eth': '\\u00F0',\n  'Euml': '\\u00CB',\n  'euml': '\\u00EB',\n  'euro': '\\u20AC',\n  'exist': '\\u2203',\n  'fnof': '\\u0192',\n  'forall': '\\u2200',\n  'frac12': '\\u00BD',\n  'frac14': '\\u00BC',\n  'frac34': '\\u00BE',\n  'frasl': '\\u2044',\n  'Gamma': '\\u0393',\n  'gamma': '\\u03B3',\n  'ge': '\\u2265',\n  'gt': '>',\n  'harr': '\\u2194',\n  'hArr': '\\u21D4',\n  'hearts': '\\u2665',\n  'hellip': '\\u2026',\n  'Iacute': '\\u00CD',\n  'iacute': '\\u00ED',\n  'Icirc': '\\u00CE',\n  'icirc': '\\u00EE',\n  'iexcl': '\\u00A1',\n  'Igrave': '\\u00CC',\n  'igrave': '\\u00EC',\n  'image': '\\u2111',\n  'infin': '\\u221E',\n  'int': '\\u222B',\n  'Iota': '\\u0399',\n  'iota': '\\u03B9',\n  'iquest': '\\u00BF',\n  'isin': '\\u2208',\n  'Iuml': '\\u00CF',\n  'iuml': '\\u00EF',\n  'Kappa': '\\u039A',\n  'kappa': '\\u03BA',\n  'Lambda': '\\u039B',\n  'lambda': '\\u03BB',\n  'lang': '\\u27E8',\n  'laquo': '\\u00AB',\n  'larr': '\\u2190',\n  'lArr': '\\u21D0',\n  'lceil': '\\u2308',\n  'ldquo': '\\u201C',\n  'le': '\\u2264',\n  'lfloor': '\\u230A',\n  'lowast': '\\u2217',\n  'loz': '\\u25CA',\n  'lrm': '\\u200E',\n  'lsaquo': '\\u2039',\n  'lsquo': '\\u2018',\n  'lt': '<',\n  'macr': '\\u00AF',\n  'mdash': '\\u2014',\n  'micro': '\\u00B5',\n  'middot': '\\u00B7',\n  'minus': '\\u2212',\n  'Mu': '\\u039C',\n  'mu': '\\u03BC',\n  'nabla': '\\u2207',\n  'nbsp': '\\u00A0',\n  'ndash': '\\u2013',\n  'ne': '\\u2260',\n  'ni': '\\u220B',\n  'not': '\\u00AC',\n  'notin': '\\u2209',\n  'nsub': '\\u2284',\n  'Ntilde': '\\u00D1',\n  'ntilde': '\\u00F1',\n  'Nu': '\\u039D',\n  'nu': '\\u03BD',\n  'Oacute': '\\u00D3',\n  'oacute': '\\u00F3',\n  'Ocirc': '\\u00D4',\n  'ocirc': '\\u00F4',\n  'OElig': '\\u0152',\n  'oelig': '\\u0153',\n  'Ograve': '\\u00D2',\n  'ograve': '\\u00F2',\n  'oline': '\\u203E',\n  'Omega': '\\u03A9',\n  'omega': '\\u03C9',\n  'Omicron': '\\u039F',\n  'omicron': '\\u03BF',\n  'oplus': '\\u2295',\n  'or': '\\u2228',\n  'ordf': '\\u00AA',\n  'ordm': '\\u00BA',\n  'Oslash': '\\u00D8',\n  'oslash': '\\u00F8',\n  'Otilde': '\\u00D5',\n  'otilde': '\\u00F5',\n  'otimes': '\\u2297',\n  'Ouml': '\\u00D6',\n  'ouml': '\\u00F6',\n  'para': '\\u00B6',\n  'permil': '\\u2030',\n  'perp': '\\u22A5',\n  'Phi': '\\u03A6',\n  'phi': '\\u03C6',\n  'Pi': '\\u03A0',\n  'pi': '\\u03C0',\n  'piv': '\\u03D6',\n  'plusmn': '\\u00B1',\n  'pound': '\\u00A3',\n  'prime': '\\u2032',\n  'Prime': '\\u2033',\n  'prod': '\\u220F',\n  'prop': '\\u221D',\n  'Psi': '\\u03A8',\n  'psi': '\\u03C8',\n  'quot': '\\u0022',\n  'radic': '\\u221A',\n  'rang': '\\u27E9',\n  'raquo': '\\u00BB',\n  'rarr': '\\u2192',\n  'rArr': '\\u21D2',\n  'rceil': '\\u2309',\n  'rdquo': '\\u201D',\n  'real': '\\u211C',\n  'reg': '\\u00AE',\n  'rfloor': '\\u230B',\n  'Rho': '\\u03A1',\n  'rho': '\\u03C1',\n  'rlm': '\\u200F',\n  'rsaquo': '\\u203A',\n  'rsquo': '\\u2019',\n  'sbquo': '\\u201A',\n  'Scaron': '\\u0160',\n  'scaron': '\\u0161',\n  'sdot': '\\u22C5',\n  'sect': '\\u00A7',\n  'shy': '\\u00AD',\n  'Sigma': '\\u03A3',\n  'sigma': '\\u03C3',\n  'sigmaf': '\\u03C2',\n  'sim': '\\u223C',\n  'spades': '\\u2660',\n  'sub': '\\u2282',\n  'sube': '\\u2286',\n  'sum': '\\u2211',\n  'sup': '\\u2283',\n  'sup1': '\\u00B9',\n  'sup2': '\\u00B2',\n  'sup3': '\\u00B3',\n  'supe': '\\u2287',\n  'szlig': '\\u00DF',\n  'Tau': '\\u03A4',\n  'tau': '\\u03C4',\n  'there4': '\\u2234',\n  'Theta': '\\u0398',\n  'theta': '\\u03B8',\n  'thetasym': '\\u03D1',\n  'thinsp': '\\u2009',\n  'THORN': '\\u00DE',\n  'thorn': '\\u00FE',\n  'tilde': '\\u02DC',\n  'times': '\\u00D7',\n  'trade': '\\u2122',\n  'Uacute': '\\u00DA',\n  'uacute': '\\u00FA',\n  'uarr': '\\u2191',\n  'uArr': '\\u21D1',\n  'Ucirc': '\\u00DB',\n  'ucirc': '\\u00FB',\n  'Ugrave': '\\u00D9',\n  'ugrave': '\\u00F9',\n  'uml': '\\u00A8',\n  'upsih': '\\u03D2',\n  'Upsilon': '\\u03A5',\n  'upsilon': '\\u03C5',\n  'Uuml': '\\u00DC',\n  'uuml': '\\u00FC',\n  'weierp': '\\u2118',\n  'Xi': '\\u039E',\n  'xi': '\\u03BE',\n  'Yacute': '\\u00DD',\n  'yacute': '\\u00FD',\n  'yen': '\\u00A5',\n  'yuml': '\\u00FF',\n  'Yuml': '\\u0178',\n  'Zeta': '\\u0396',\n  'zeta': '\\u03B6',\n  'zwj': '\\u200D',\n  'zwnj': '\\u200C',\n};\n\n// The &ngsp; pseudo-entity is denoting a space. see:\n// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart\nexport const NGSP_UNICODE = '\\uE500';\n\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TagContentType, TagDefinition} from './tags';\n\nexport class HtmlTagDefinition implements TagDefinition {\n  private closedByChildren: {[key: string]: boolean} = {};\n\n  closedByParent: boolean = false;\n  implicitNamespacePrefix: string|null;\n  contentType: TagContentType;\n  isVoid: boolean;\n  ignoreFirstLf: boolean;\n  canSelfClose: boolean = false;\n\n  constructor(\n      {closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA,\n       closedByParent = false, isVoid = false, ignoreFirstLf = false}: {\n        closedByChildren?: string[],\n        closedByParent?: boolean,\n        implicitNamespacePrefix?: string,\n        contentType?: TagContentType,\n        isVoid?: boolean,\n        ignoreFirstLf?: boolean\n      } = {}) {\n    if (closedByChildren && closedByChildren.length > 0) {\n      closedByChildren.forEach(tagName => this.closedByChildren[tagName] = true);\n    }\n    this.isVoid = isVoid;\n    this.closedByParent = closedByParent || isVoid;\n    this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n    this.contentType = contentType;\n    this.ignoreFirstLf = ignoreFirstLf;\n  }\n\n  isClosedByChild(name: string): boolean {\n    return this.isVoid || name.toLowerCase() in this.closedByChildren;\n  }\n}\n\nlet _DEFAULT_TAG_DEFINITION !: HtmlTagDefinition;\n\n// see http://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nlet TAG_DEFINITIONS !: {[key: string]: HtmlTagDefinition};\n\nexport function getHtmlTagDefinition(tagName: string): HtmlTagDefinition {\n  if (!TAG_DEFINITIONS) {\n    _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n    TAG_DEFINITIONS = {\n      'base': new HtmlTagDefinition({isVoid: true}),\n      'meta': new HtmlTagDefinition({isVoid: true}),\n      'area': new HtmlTagDefinition({isVoid: true}),\n      'embed': new HtmlTagDefinition({isVoid: true}),\n      'link': new HtmlTagDefinition({isVoid: true}),\n      'img': new HtmlTagDefinition({isVoid: true}),\n      'input': new HtmlTagDefinition({isVoid: true}),\n      'param': new HtmlTagDefinition({isVoid: true}),\n      'hr': new HtmlTagDefinition({isVoid: true}),\n      'br': new HtmlTagDefinition({isVoid: true}),\n      'source': new HtmlTagDefinition({isVoid: true}),\n      'track': new HtmlTagDefinition({isVoid: true}),\n      'wbr': new HtmlTagDefinition({isVoid: true}),\n      'p': new HtmlTagDefinition({\n        closedByChildren: [\n          'address', 'article', 'aside',   'blockquote', 'div',  'dl',  'fieldset',\n          'footer',  'form',    'h1',      'h2',         'h3',   'h4',  'h5',\n          'h6',      'header',  'hgroup',  'hr',         'main', 'nav', 'ol',\n          'p',       'pre',     'section', 'table',      'ul'\n        ],\n        closedByParent: true\n      }),\n      'thead': new HtmlTagDefinition({closedByChildren: ['tbody', 'tfoot']}),\n      'tbody': new HtmlTagDefinition({closedByChildren: ['tbody', 'tfoot'], closedByParent: true}),\n      'tfoot': new HtmlTagDefinition({closedByChildren: ['tbody'], closedByParent: true}),\n      'tr': new HtmlTagDefinition({closedByChildren: ['tr'], closedByParent: true}),\n      'td': new HtmlTagDefinition({closedByChildren: ['td', 'th'], closedByParent: true}),\n      'th': new HtmlTagDefinition({closedByChildren: ['td', 'th'], closedByParent: true}),\n      'col': new HtmlTagDefinition({isVoid: true}),\n      'svg': new HtmlTagDefinition({implicitNamespacePrefix: 'svg'}),\n      'math': new HtmlTagDefinition({implicitNamespacePrefix: 'math'}),\n      'li': new HtmlTagDefinition({closedByChildren: ['li'], closedByParent: true}),\n      'dt': new HtmlTagDefinition({closedByChildren: ['dt', 'dd']}),\n      'dd': new HtmlTagDefinition({closedByChildren: ['dt', 'dd'], closedByParent: true}),\n      'rb': new HtmlTagDefinition(\n          {closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true}),\n      'rt': new HtmlTagDefinition(\n          {closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true}),\n      'rtc': new HtmlTagDefinition({closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true}),\n      'rp': new HtmlTagDefinition(\n          {closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true}),\n      'optgroup': new HtmlTagDefinition({closedByChildren: ['optgroup'], closedByParent: true}),\n      'option':\n          new HtmlTagDefinition({closedByChildren: ['option', 'optgroup'], closedByParent: true}),\n      'pre': new HtmlTagDefinition({ignoreFirstLf: true}),\n      'listing': new HtmlTagDefinition({ignoreFirstLf: true}),\n      'style': new HtmlTagDefinition({contentType: TagContentType.RAW_TEXT}),\n      'script': new HtmlTagDefinition({contentType: TagContentType.RAW_TEXT}),\n      'title': new HtmlTagDefinition({contentType: TagContentType.ESCAPABLE_RAW_TEXT}),\n      'textarea': new HtmlTagDefinition(\n          {contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true}),\n    };\n  }\n  return TAG_DEFINITIONS[tagName.toLowerCase()] || _DEFAULT_TAG_DEFINITION;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getHtmlTagDefinition} from './ml_parser/html_tags';\n\nconst _SELECTOR_REGEXP = new RegExp(\n    '(\\\\:not\\\\()|' +           //\":not(\"\n        '([-\\\\w]+)|' +         // \"tag\"\n        '(?:\\\\.([-\\\\w]+))|' +  // \".class\"\n        // \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n        '(?:\\\\[([-.\\\\w*]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' +  // \"[name]\", \"[name=value]\",\n                                                                   // \"[name=\"value\"]\",\n                                                                   // \"[name='value']\"\n        '(\\\\))|' +                                                 // \")\"\n        '(\\\\s*,\\\\s*)',                                             // \",\"\n    'g');\n\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nexport class CssSelector {\n  element: string|null = null;\n  classNames: string[] = [];\n  /**\n   * The selectors are encoded in pairs where:\n   * - even locations are attribute names\n   * - odd locations are attribute values.\n   *\n   * Example:\n   * Selector: `[key1=value1][key2]` would parse to:\n   * ```\n   * ['key1', 'value1', 'key2', '']\n   * ```\n   */\n  attrs: string[] = [];\n  notSelectors: CssSelector[] = [];\n\n  static parse(selector: string): CssSelector[] {\n    const results: CssSelector[] = [];\n    const _addResult = (res: CssSelector[], cssSel: CssSelector) => {\n      if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&\n          cssSel.attrs.length == 0) {\n        cssSel.element = '*';\n      }\n      res.push(cssSel);\n    };\n    let cssSelector = new CssSelector();\n    let match: string[]|null;\n    let current = cssSelector;\n    let inNot = false;\n    _SELECTOR_REGEXP.lastIndex = 0;\n    while (match = _SELECTOR_REGEXP.exec(selector)) {\n      if (match[1]) {\n        if (inNot) {\n          throw new Error('Nesting :not is not allowed in a selector');\n        }\n        inNot = true;\n        current = new CssSelector();\n        cssSelector.notSelectors.push(current);\n      }\n      if (match[2]) {\n        current.setElement(match[2]);\n      }\n      if (match[3]) {\n        current.addClassName(match[3]);\n      }\n      if (match[4]) {\n        current.addAttribute(match[4], match[6]);\n      }\n      if (match[7]) {\n        inNot = false;\n        current = cssSelector;\n      }\n      if (match[8]) {\n        if (inNot) {\n          throw new Error('Multiple selectors in :not are not supported');\n        }\n        _addResult(results, cssSelector);\n        cssSelector = current = new CssSelector();\n      }\n    }\n    _addResult(results, cssSelector);\n    return results;\n  }\n\n  isElementSelector(): boolean {\n    return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n        this.notSelectors.length === 0;\n  }\n\n  hasElementSelector(): boolean { return !!this.element; }\n\n  setElement(element: string|null = null) { this.element = element; }\n\n  /** Gets a template string for an element that matches the selector. */\n  getMatchingElementTemplate(): string {\n    const tagName = this.element || 'div';\n    const classAttr = this.classNames.length > 0 ? ` class=\"${this.classNames.join(' ')}\"` : '';\n\n    let attrs = '';\n    for (let i = 0; i < this.attrs.length; i += 2) {\n      const attrName = this.attrs[i];\n      const attrValue = this.attrs[i + 1] !== '' ? `=\"${this.attrs[i + 1]}\"` : '';\n      attrs += ` ${attrName}${attrValue}`;\n    }\n\n    return getHtmlTagDefinition(tagName).isVoid ? `<${tagName}${classAttr}${attrs}/>` :\n                                                  `<${tagName}${classAttr}${attrs}></${tagName}>`;\n  }\n\n  getAttrs(): string[] {\n    const result: string[] = [];\n    if (this.classNames.length > 0) {\n      result.push('class', this.classNames.join(' '));\n    }\n    return result.concat(this.attrs);\n  }\n\n  addAttribute(name: string, value: string = '') {\n    this.attrs.push(name, value && value.toLowerCase() || '');\n  }\n\n  addClassName(name: string) { this.classNames.push(name.toLowerCase()); }\n\n  toString(): string {\n    let res: string = this.element || '';\n    if (this.classNames) {\n      this.classNames.forEach(klass => res += `.${klass}`);\n    }\n    if (this.attrs) {\n      for (let i = 0; i < this.attrs.length; i += 2) {\n        const name = this.attrs[i];\n        const value = this.attrs[i + 1];\n        res += `[${name}${value ? '=' + value : ''}]`;\n      }\n    }\n    this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`);\n    return res;\n  }\n}\n\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nexport class SelectorMatcher<T = any> {\n  static createNotMatcher(notSelectors: CssSelector[]): SelectorMatcher<null> {\n    const notMatcher = new SelectorMatcher<null>();\n    notMatcher.addSelectables(notSelectors, null);\n    return notMatcher;\n  }\n\n  private _elementMap = new Map<string, SelectorContext<T>[]>();\n  private _elementPartialMap = new Map<string, SelectorMatcher<T>>();\n  private _classMap = new Map<string, SelectorContext<T>[]>();\n  private _classPartialMap = new Map<string, SelectorMatcher<T>>();\n  private _attrValueMap = new Map<string, Map<string, SelectorContext<T>[]>>();\n  private _attrValuePartialMap = new Map<string, Map<string, SelectorMatcher<T>>>();\n  private _listContexts: SelectorListContext[] = [];\n\n  addSelectables(cssSelectors: CssSelector[], callbackCtxt?: T) {\n    let listContext: SelectorListContext = null !;\n    if (cssSelectors.length > 1) {\n      listContext = new SelectorListContext(cssSelectors);\n      this._listContexts.push(listContext);\n    }\n    for (let i = 0; i < cssSelectors.length; i++) {\n      this._addSelectable(cssSelectors[i], callbackCtxt as T, listContext);\n    }\n  }\n\n  /**\n   * Add an object that can be found later on by calling `match`.\n   * @param cssSelector A css selector\n   * @param callbackCtxt An opaque object that will be given to the callback of the `match` function\n   */\n  private _addSelectable(\n      cssSelector: CssSelector, callbackCtxt: T, listContext: SelectorListContext) {\n    let matcher: SelectorMatcher<T> = this;\n    const element = cssSelector.element;\n    const classNames = cssSelector.classNames;\n    const attrs = cssSelector.attrs;\n    const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n\n    if (element) {\n      const isTerminal = attrs.length === 0 && classNames.length === 0;\n      if (isTerminal) {\n        this._addTerminal(matcher._elementMap, element, selectable);\n      } else {\n        matcher = this._addPartial(matcher._elementPartialMap, element);\n      }\n    }\n\n    if (classNames) {\n      for (let i = 0; i < classNames.length; i++) {\n        const isTerminal = attrs.length === 0 && i === classNames.length - 1;\n        const className = classNames[i];\n        if (isTerminal) {\n          this._addTerminal(matcher._classMap, className, selectable);\n        } else {\n          matcher = this._addPartial(matcher._classPartialMap, className);\n        }\n      }\n    }\n\n    if (attrs) {\n      for (let i = 0; i < attrs.length; i += 2) {\n        const isTerminal = i === attrs.length - 2;\n        const name = attrs[i];\n        const value = attrs[i + 1];\n        if (isTerminal) {\n          const terminalMap = matcher._attrValueMap;\n          let terminalValuesMap = terminalMap.get(name);\n          if (!terminalValuesMap) {\n            terminalValuesMap = new Map<string, SelectorContext<T>[]>();\n            terminalMap.set(name, terminalValuesMap);\n          }\n          this._addTerminal(terminalValuesMap, value, selectable);\n        } else {\n          const partialMap = matcher._attrValuePartialMap;\n          let partialValuesMap = partialMap.get(name);\n          if (!partialValuesMap) {\n            partialValuesMap = new Map<string, SelectorMatcher<T>>();\n            partialMap.set(name, partialValuesMap);\n          }\n          matcher = this._addPartial(partialValuesMap, value);\n        }\n      }\n    }\n  }\n\n  private _addTerminal(\n      map: Map<string, SelectorContext<T>[]>, name: string, selectable: SelectorContext<T>) {\n    let terminalList = map.get(name);\n    if (!terminalList) {\n      terminalList = [];\n      map.set(name, terminalList);\n    }\n    terminalList.push(selectable);\n  }\n\n  private _addPartial(map: Map<string, SelectorMatcher<T>>, name: string): SelectorMatcher<T> {\n    let matcher = map.get(name);\n    if (!matcher) {\n      matcher = new SelectorMatcher<T>();\n      map.set(name, matcher);\n    }\n    return matcher;\n  }\n\n  /**\n   * Find the objects that have been added via `addSelectable`\n   * whose css selector is contained in the given css selector.\n   * @param cssSelector A css selector\n   * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n   * @return boolean true if a match was found\n  */\n  match(cssSelector: CssSelector, matchedCallback: ((c: CssSelector, a: T) => void)|null): boolean {\n    let result = false;\n    const element = cssSelector.element !;\n    const classNames = cssSelector.classNames;\n    const attrs = cssSelector.attrs;\n\n    for (let i = 0; i < this._listContexts.length; i++) {\n      this._listContexts[i].alreadyMatched = false;\n    }\n\n    result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n    result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||\n        result;\n\n    if (classNames) {\n      for (let i = 0; i < classNames.length; i++) {\n        const className = classNames[i];\n        result =\n            this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n        result =\n            this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||\n            result;\n      }\n    }\n\n    if (attrs) {\n      for (let i = 0; i < attrs.length; i += 2) {\n        const name = attrs[i];\n        const value = attrs[i + 1];\n\n        const terminalValuesMap = this._attrValueMap.get(name) !;\n        if (value) {\n          result =\n              this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n        }\n        result =\n            this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n\n        const partialValuesMap = this._attrValuePartialMap.get(name) !;\n        if (value) {\n          result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n        }\n        result =\n            this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n      }\n    }\n    return result;\n  }\n\n  /** @internal */\n  _matchTerminal(\n      map: Map<string, SelectorContext<T>[]>, name: string, cssSelector: CssSelector,\n      matchedCallback: ((c: CssSelector, a: any) => void)|null): boolean {\n    if (!map || typeof name !== 'string') {\n      return false;\n    }\n\n    let selectables: SelectorContext<T>[] = map.get(name) || [];\n    const starSelectables: SelectorContext<T>[] = map.get('*') !;\n    if (starSelectables) {\n      selectables = selectables.concat(starSelectables);\n    }\n    if (selectables.length === 0) {\n      return false;\n    }\n    let selectable: SelectorContext<T>;\n    let result = false;\n    for (let i = 0; i < selectables.length; i++) {\n      selectable = selectables[i];\n      result = selectable.finalize(cssSelector, matchedCallback) || result;\n    }\n    return result;\n  }\n\n  /** @internal */\n  _matchPartial(\n      map: Map<string, SelectorMatcher<T>>, name: string, cssSelector: CssSelector,\n      matchedCallback: ((c: CssSelector, a: any) => void)|null): boolean {\n    if (!map || typeof name !== 'string') {\n      return false;\n    }\n\n    const nestedSelector = map.get(name);\n    if (!nestedSelector) {\n      return false;\n    }\n    // TODO(perf): get rid of recursion and measure again\n    // TODO(perf): don't pass the whole selector into the recursion,\n    // but only the not processed parts\n    return nestedSelector.match(cssSelector, matchedCallback);\n  }\n}\n\n\nexport class SelectorListContext {\n  alreadyMatched: boolean = false;\n\n  constructor(public selectors: CssSelector[]) {}\n}\n\n// Store context to pass back selector and context when a selector is matched\nexport class SelectorContext<T = any> {\n  notSelectors: CssSelector[];\n\n  constructor(\n      public selector: CssSelector, public cbContext: T, public listContext: SelectorListContext) {\n    this.notSelectors = selector.notSelectors;\n  }\n\n  finalize(cssSelector: CssSelector, callback: ((c: CssSelector, a: T) => void)|null): boolean {\n    let result = true;\n    if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n      const notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n      result = !notMatcher.match(cssSelector, null);\n    }\n    if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n      if (this.listContext) {\n        this.listContext.alreadyMatched = true;\n      }\n      callback(this.selector, this.cbContext);\n    }\n    return result;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Attention:\n// This file duplicates types and values from @angular/core\n// so that we are able to make @angular/compiler independent of @angular/core.\n// This is important to prevent a build cycle, as @angular/core needs to\n// be compiled with the compiler.\n\nimport {CssSelector} from './selector';\n\nexport interface Inject { token: any; }\nexport const createInject = makeMetadataFactory<Inject>('Inject', (token: any) => ({token}));\nexport const createInjectionToken = makeMetadataFactory<object>(\n    'InjectionToken', (desc: string) => ({_desc: desc, ngInjectableDef: undefined}));\n\nexport interface Attribute { attributeName?: string; }\nexport const createAttribute =\n    makeMetadataFactory<Attribute>('Attribute', (attributeName?: string) => ({attributeName}));\n\nexport interface Query {\n  descendants: boolean;\n  first: boolean;\n  read: any;\n  isViewQuery: boolean;\n  selector: any;\n  static: boolean;\n}\n\nexport const createContentChildren = makeMetadataFactory<Query>(\n    'ContentChildren',\n    (selector?: any, data: any = {}) =>\n        ({selector, first: false, isViewQuery: false, descendants: false, ...data}));\nexport const createContentChild = makeMetadataFactory<Query>(\n    'ContentChild', (selector?: any, data: any = {}) =>\n                        ({selector, first: true, isViewQuery: false, descendants: true, ...data}));\nexport const createViewChildren = makeMetadataFactory<Query>(\n    'ViewChildren', (selector?: any, data: any = {}) =>\n                        ({selector, first: false, isViewQuery: true, descendants: true, ...data}));\nexport const createViewChild = makeMetadataFactory<Query>(\n    'ViewChild', (selector: any, data: any) =>\n                     ({selector, first: true, isViewQuery: true, descendants: true, ...data}));\n\nexport interface Directive {\n  selector?: string;\n  inputs?: string[];\n  outputs?: string[];\n  host?: {[key: string]: string};\n  providers?: Provider[];\n  exportAs?: string;\n  queries?: {[key: string]: any};\n  guards?: {[key: string]: any};\n}\nexport const createDirective =\n    makeMetadataFactory<Directive>('Directive', (dir: Directive = {}) => dir);\n\nexport interface Component extends Directive {\n  changeDetection?: ChangeDetectionStrategy;\n  viewProviders?: Provider[];\n  moduleId?: string;\n  templateUrl?: string;\n  template?: string;\n  styleUrls?: string[];\n  styles?: string[];\n  animations?: any[];\n  encapsulation?: ViewEncapsulation;\n  interpolation?: [string, string];\n  entryComponents?: Array<Type|any[]>;\n  preserveWhitespaces?: boolean;\n}\nexport enum ViewEncapsulation {\n  Emulated = 0,\n  Native = 1,\n  None = 2,\n  ShadowDom = 3\n}\n\nexport enum ChangeDetectionStrategy {\n  OnPush = 0,\n  Default = 1\n}\n\nexport const createComponent = makeMetadataFactory<Component>(\n    'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}));\n\nexport interface Pipe {\n  name: string;\n  pure?: boolean;\n}\nexport const createPipe = makeMetadataFactory<Pipe>('Pipe', (p: Pipe) => ({pure: true, ...p}));\n\nexport interface Input { bindingPropertyName?: string; }\nexport const createInput =\n    makeMetadataFactory<Input>('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\nexport interface Output { bindingPropertyName?: string; }\nexport const createOutput = makeMetadataFactory<Output>(\n    'Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\nexport interface HostBinding { hostPropertyName?: string; }\nexport const createHostBinding = makeMetadataFactory<HostBinding>(\n    'HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\nexport interface HostListener {\n  eventName?: string;\n  args?: string[];\n}\nexport const createHostListener = makeMetadataFactory<HostListener>(\n    'HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\nexport interface NgModule {\n  providers?: Provider[];\n  declarations?: Array<Type|any[]>;\n  imports?: Array<Type|ModuleWithProviders|any[]>;\n  exports?: Array<Type|any[]>;\n  entryComponents?: Array<Type|any[]>;\n  bootstrap?: Array<Type|any[]>;\n  schemas?: Array<SchemaMetadata|any[]>;\n  id?: string;\n}\nexport const createNgModule =\n    makeMetadataFactory<NgModule>('NgModule', (ngModule: NgModule) => ngModule);\n\nexport interface ModuleWithProviders {\n  ngModule: Type;\n  providers?: Provider[];\n}\nexport interface Injectable {\n  providedIn?: Type|'root'|any;\n  useClass?: Type|any;\n  useExisting?: Type|any;\n  useValue?: any;\n  useFactory?: Type|any;\n  deps?: Array<Type|any[]>;\n}\nexport const createInjectable =\n    makeMetadataFactory('Injectable', (injectable: Injectable = {}) => injectable);\nexport interface SchemaMetadata { name: string; }\n\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n  name: 'custom-elements'\n};\n\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n  name: 'no-errors-schema'\n};\n\nexport const createOptional = makeMetadataFactory('Optional');\nexport const createSelf = makeMetadataFactory('Self');\nexport const createSkipSelf = makeMetadataFactory('SkipSelf');\nexport const createHost = makeMetadataFactory('Host');\n\nexport interface Type extends Function { new (...args: any[]): any; }\nexport const Type = Function;\n\nexport enum SecurityContext {\n  NONE = 0,\n  HTML = 1,\n  STYLE = 2,\n  SCRIPT = 3,\n  URL = 4,\n  RESOURCE_URL = 5,\n}\n\nexport type Provider = any;\n\nexport const enum NodeFlags {\n  None = 0,\n  TypeElement = 1 << 0,\n  TypeText = 1 << 1,\n  ProjectedTemplate = 1 << 2,\n  CatRenderNode = TypeElement | TypeText,\n  TypeNgContent = 1 << 3,\n  TypePipe = 1 << 4,\n  TypePureArray = 1 << 5,\n  TypePureObject = 1 << 6,\n  TypePurePipe = 1 << 7,\n  CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n  TypeValueProvider = 1 << 8,\n  TypeClassProvider = 1 << 9,\n  TypeFactoryProvider = 1 << 10,\n  TypeUseExistingProvider = 1 << 11,\n  LazyProvider = 1 << 12,\n  PrivateProvider = 1 << 13,\n  TypeDirective = 1 << 14,\n  Component = 1 << 15,\n  CatProviderNoDirective =\n      TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n  CatProvider = CatProviderNoDirective | TypeDirective,\n  OnInit = 1 << 16,\n  OnDestroy = 1 << 17,\n  DoCheck = 1 << 18,\n  OnChanges = 1 << 19,\n  AfterContentInit = 1 << 20,\n  AfterContentChecked = 1 << 21,\n  AfterViewInit = 1 << 22,\n  AfterViewChecked = 1 << 23,\n  EmbeddedViews = 1 << 24,\n  ComponentView = 1 << 25,\n  TypeContentQuery = 1 << 26,\n  TypeViewQuery = 1 << 27,\n  StaticQuery = 1 << 28,\n  DynamicQuery = 1 << 29,\n  TypeModuleProvider = 1 << 30,\n  CatQuery = TypeContentQuery | TypeViewQuery,\n\n  // mutually exclusive values...\n  Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport const enum DepFlags {\n  None = 0,\n  SkipSelf = 1 << 0,\n  Optional = 1 << 1,\n  Self = 1 << 2,\n  Value = 1 << 3,\n}\n\n/**\n * Injection flags for DI.\n */\nexport const enum InjectFlags {\n  Default = 0,\n\n  /**\n   * Specifies that an injector should retrieve a dependency from any injector until reaching the\n   * host element of the current component. (Only used with Element Injector)\n   */\n  Host = 1 << 0,\n  /** Don't descend into ancestors of the node requesting injection. */\n  Self = 1 << 1,\n  /** Skip the node that is requesting injection. */\n  SkipSelf = 1 << 2,\n  /** Inject `defaultValue` instead if token not found. */\n  Optional = 1 << 3,\n}\n\nexport const enum ArgumentType {Inline = 0, Dynamic = 1}\n\nexport const enum BindingFlags {\n  TypeElementAttribute = 1 << 0,\n  TypeElementClass = 1 << 1,\n  TypeElementStyle = 1 << 2,\n  TypeProperty = 1 << 3,\n  SyntheticProperty = 1 << 4,\n  SyntheticHostProperty = 1 << 5,\n  CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n  // mutually exclusive values...\n  Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport const enum QueryBindingType {First = 0, All = 1}\n\nexport const enum QueryValueType {\n  ElementRef = 0,\n  RenderElement = 1,\n  TemplateRef = 2,\n  ViewContainerRef = 3,\n  Provider = 4\n}\n\nexport const enum ViewFlags {\n  None = 0,\n  OnPush = 1 << 1,\n}\n\nexport enum MissingTranslationStrategy {\n  Error = 0,\n  Warning = 1,\n  Ignore = 2,\n}\n\nexport interface MetadataFactory<T> {\n  (...args: any[]): T;\n  isTypeOf(obj: any): obj is T;\n  ngMetadataName: string;\n}\n\nfunction makeMetadataFactory<T>(name: string, props?: (...args: any[]) => T): MetadataFactory<T> {\n  // This must be declared as a function, not a fat arrow, so that ES2015 devmode produces code\n  // that works with the static_reflector.ts in the ViewEngine compiler.\n  // In particular, `_registerDecoratorOrConstructor` assumes that the value returned here can be\n  // new'ed.\n  function factory(...args: any[]) {\n    const values = props ? props(...args) : {};\n    return {\n      ngMetadataName: name,\n      ...values,\n    };\n  }\n  (factory as any).isTypeOf = (obj: any) => obj && obj.ngMetadataName === name;\n  (factory as any).ngMetadataName = name;\n  return factory as any;\n}\n\nexport interface Route {\n  children?: Route[];\n  loadChildren?: string|Type|any;\n}\n\n/**\n * Flags used to generate R3-style CSS Selectors. They are pasted from\n * core/src/render3/projection.ts because they cannot be referenced directly.\n */\nexport const enum SelectorFlags {\n  /** Indicates this is the beginning of a new negative selector */\n  NOT = 0b0001,\n\n  /** Mode for matching attributes */\n  ATTRIBUTE = 0b0010,\n\n  /** Mode for matching tag names */\n  ELEMENT = 0b0100,\n\n  /** Mode for matching class names */\n  CLASS = 0b1000,\n}\n\n// These are a copy the CSS types from core/src/render3/interfaces/projection.ts\n// They are duplicated here as they cannot be directly referenced from core.\nexport type R3CssSelector = (string | SelectorFlags)[];\nexport type R3CssSelectorList = R3CssSelector[];\n\nfunction parserSelectorToSimpleSelector(selector: CssSelector): R3CssSelector {\n  const classes = selector.classNames && selector.classNames.length ?\n      [SelectorFlags.CLASS, ...selector.classNames] :\n      [];\n  const elementName = selector.element && selector.element !== '*' ? selector.element : '';\n  return [elementName, ...selector.attrs, ...classes];\n}\n\nfunction parserSelectorToNegativeSelector(selector: CssSelector): R3CssSelector {\n  const classes = selector.classNames && selector.classNames.length ?\n      [SelectorFlags.CLASS, ...selector.classNames] :\n      [];\n\n  if (selector.element) {\n    return [\n      SelectorFlags.NOT | SelectorFlags.ELEMENT, selector.element, ...selector.attrs, ...classes\n    ];\n  } else if (selector.attrs.length) {\n    return [SelectorFlags.NOT | SelectorFlags.ATTRIBUTE, ...selector.attrs, ...classes];\n  } else {\n    return selector.classNames && selector.classNames.length ?\n        [SelectorFlags.NOT | SelectorFlags.CLASS, ...selector.classNames] :\n        [];\n  }\n}\n\nfunction parserSelectorToR3Selector(selector: CssSelector): R3CssSelector {\n  const positive = parserSelectorToSimpleSelector(selector);\n\n  const negative: R3CssSelectorList = selector.notSelectors && selector.notSelectors.length ?\n      selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) :\n      [];\n\n  return positive.concat(...negative);\n}\n\nexport function parseSelectorToR3Selector(selector: string | null): R3CssSelectorList {\n  return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];\n}\n\n// Pasted from render3/interfaces/definition since it cannot be referenced directly\n/**\n * Flags passed into template functions to determine which blocks (i.e. creation, update)\n * should be executed.\n *\n * Typically, a template runs both the creation block and the update block on initialization and\n * subsequent runs only execute the update block. However, dynamically created views require that\n * the creation block be executed separately from the update block (for backwards compat).\n */\nexport const enum RenderFlags {\n  /* Whether to run the creation block (e.g. create elements and directives) */\n  Create = 0b01,\n\n  /* Whether to run the update block (e.g. refresh bindings) */\n  Update = 0b10\n}\n\n// Pasted from render3/interfaces/node.ts\n/**\n * A set of marker values to be used in the attributes arrays. These markers indicate that some\n * items are not regular attributes and the processing should be adapted accordingly.\n */\nexport const enum AttributeMarker {\n  /**\n   * Marker indicates that the following 3 values in the attributes array are:\n   * namespaceUri, attributeName, attributeValue\n   * in that order.\n   */\n  NamespaceURI = 0,\n\n  /**\n   * Signals class declaration.\n   *\n   * Each value following `Classes` designates a class name to include on the element.\n   * ## Example:\n   *\n   * Given:\n   * ```\n   * <div class=\"foo bar baz\">...<d/vi>\n   * ```\n   *\n   * the generated code is:\n   * ```\n   * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];\n   * ```\n   */\n  Classes = 1,\n\n  /**\n   * Signals style declaration.\n   *\n   * Each pair of values following `Styles` designates a style name and value to include on the\n   * element.\n   * ## Example:\n   *\n   * Given:\n   * ```\n   * <div style=\"width:100px; height:200px; color:red\">...</div>\n   * ```\n   *\n   * the generated code is:\n   * ```\n   * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];\n   * ```\n   */\n  Styles = 2,\n\n  /**\n   * Signals that the following attribute names were extracted from input or output bindings.\n   *\n   * For example, given the following HTML:\n   *\n   * ```\n   * <div moo=\"car\" [foo]=\"exp\" (bar)=\"doSth()\">\n   * ```\n   *\n   * the generated code is:\n   *\n   * ```\n   * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];\n   * ```\n   */\n  Bindings = 3,\n\n  /**\n   * Signals that the following attribute names were hoisted from an inline-template declaration.\n   *\n   * For example, given the following HTML:\n   *\n   * ```\n   * <div *ngFor=\"let value of values; trackBy:trackBy\" dirA [dirB]=\"value\">\n   * ```\n   *\n   * the generated code for the `template()` instruction would include:\n   *\n   * ```\n   * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',\n   * 'ngForTrackBy', 'let-value']\n   * ```\n   *\n   * while the generated code for the `element()` instruction inside the template function would\n   * include:\n   *\n   * ```\n   * ['dirA', '', AttributeMarker.Bindings, 'dirB']\n   * ```\n   */\n  Template = 4,\n\n  /**\n   * Signals that the following attribute is `ngProjectAs` and its value is a parsed `CssSelector`.\n   *\n   * For example, given the following HTML:\n   *\n   * ```\n   * <h1 attr=\"value\" ngProjectAs=\"[title]\">\n   * ```\n   *\n   * the generated code for the `element()` instruction would include:\n   *\n   * ```\n   * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]\n   * ```\n   */\n  ProjectAs = 5,\n\n  /**\n   * Signals that the following attribute will be translated by runtime i18n\n   *\n   * For example, given the following HTML:\n   *\n   * ```\n   * <div moo=\"car\" foo=\"value\" i18n-foo [bar]=\"binding\" i18n-bar>\n   * ```\n   *\n   * the generated code is:\n   *\n   * ```\n   * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];\n   */\n  I18n = 6,\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ParseSourceSpan} from '../parse_util';\nimport {error} from '../util';\n\n//// Types\nexport enum TypeModifier {\n  Const\n}\n\nexport abstract class Type {\n  constructor(public modifiers: TypeModifier[]|null = null) {\n    if (!modifiers) {\n      this.modifiers = [];\n    }\n  }\n  abstract visitType(visitor: TypeVisitor, context: any): any;\n\n  hasModifier(modifier: TypeModifier): boolean { return this.modifiers !.indexOf(modifier) !== -1; }\n}\n\nexport enum BuiltinTypeName {\n  Dynamic,\n  Bool,\n  String,\n  Int,\n  Number,\n  Function,\n  Inferred,\n  None,\n}\n\nexport class BuiltinType extends Type {\n  constructor(public name: BuiltinTypeName, modifiers: TypeModifier[]|null = null) {\n    super(modifiers);\n  }\n  visitType(visitor: TypeVisitor, context: any): any {\n    return visitor.visitBuiltinType(this, context);\n  }\n}\n\nexport class ExpressionType extends Type {\n  constructor(\n      public value: Expression, modifiers: TypeModifier[]|null = null,\n      public typeParams: Type[]|null = null) {\n    super(modifiers);\n  }\n  visitType(visitor: TypeVisitor, context: any): any {\n    return visitor.visitExpressionType(this, context);\n  }\n}\n\n\nexport class ArrayType extends Type {\n  constructor(public of : Type, modifiers: TypeModifier[]|null = null) { super(modifiers); }\n  visitType(visitor: TypeVisitor, context: any): any {\n    return visitor.visitArrayType(this, context);\n  }\n}\n\n\nexport class MapType extends Type {\n  public valueType: Type|null;\n  constructor(valueType: Type|null|undefined, modifiers: TypeModifier[]|null = null) {\n    super(modifiers);\n    this.valueType = valueType || null;\n  }\n  visitType(visitor: TypeVisitor, context: any): any { return visitor.visitMapType(this, context); }\n}\n\nexport const DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nexport const INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nexport const BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nexport const INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nexport const NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nexport const STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nexport const FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\nexport const NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\n\nexport interface TypeVisitor {\n  visitBuiltinType(type: BuiltinType, context: any): any;\n  visitExpressionType(type: ExpressionType, context: any): any;\n  visitArrayType(type: ArrayType, context: any): any;\n  visitMapType(type: MapType, context: any): any;\n}\n\n///// Expressions\n\nexport enum BinaryOperator {\n  Equals,\n  NotEquals,\n  Identical,\n  NotIdentical,\n  Minus,\n  Plus,\n  Divide,\n  Multiply,\n  Modulo,\n  And,\n  Or,\n  BitwiseAnd,\n  Lower,\n  LowerEquals,\n  Bigger,\n  BiggerEquals\n}\n\nexport function nullSafeIsEquivalent<T extends{isEquivalent(other: T): boolean}>(\n    base: T | null, other: T | null) {\n  if (base == null || other == null) {\n    return base == other;\n  }\n  return base.isEquivalent(other);\n}\n\nexport function areAllEquivalent<T extends{isEquivalent(other: T): boolean}>(\n    base: T[], other: T[]) {\n  const len = base.length;\n  if (len !== other.length) {\n    return false;\n  }\n  for (let i = 0; i < len; i++) {\n    if (!base[i].isEquivalent(other[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\nexport abstract class Expression {\n  public type: Type|null;\n  public sourceSpan: ParseSourceSpan|null;\n\n  constructor(type: Type|null|undefined, sourceSpan?: ParseSourceSpan|null) {\n    this.type = type || null;\n    this.sourceSpan = sourceSpan || null;\n  }\n\n  abstract visitExpression(visitor: ExpressionVisitor, context: any): any;\n\n  /**\n   * Calculates whether this expression produces the same value as the given expression.\n   * Note: We don't check Types nor ParseSourceSpans nor function arguments.\n   */\n  abstract isEquivalent(e: Expression): boolean;\n\n  /**\n   * Return true if the expression is constant.\n   */\n  abstract isConstant(): boolean;\n\n  prop(name: string, sourceSpan?: ParseSourceSpan|null): ReadPropExpr {\n    return new ReadPropExpr(this, name, null, sourceSpan);\n  }\n\n  key(index: Expression, type?: Type|null, sourceSpan?: ParseSourceSpan|null): ReadKeyExpr {\n    return new ReadKeyExpr(this, index, type, sourceSpan);\n  }\n\n  callMethod(name: string|BuiltinMethod, params: Expression[], sourceSpan?: ParseSourceSpan|null):\n      InvokeMethodExpr {\n    return new InvokeMethodExpr(this, name, params, null, sourceSpan);\n  }\n\n  callFn(params: Expression[], sourceSpan?: ParseSourceSpan|null): InvokeFunctionExpr {\n    return new InvokeFunctionExpr(this, params, null, sourceSpan);\n  }\n\n  instantiate(params: Expression[], type?: Type|null, sourceSpan?: ParseSourceSpan|null):\n      InstantiateExpr {\n    return new InstantiateExpr(this, params, type, sourceSpan);\n  }\n\n  conditional(\n      trueCase: Expression, falseCase: Expression|null = null,\n      sourceSpan?: ParseSourceSpan|null): ConditionalExpr {\n    return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n  }\n\n  equals(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n  }\n  notEquals(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n  }\n  identical(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n  }\n  notIdentical(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n  }\n  minus(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n  }\n  plus(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n  }\n  divide(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n  }\n  multiply(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n  }\n  modulo(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n  }\n  and(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n  }\n  bitwiseAnd(rhs: Expression, sourceSpan?: ParseSourceSpan|null, parens: boolean = true):\n      BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n  }\n  or(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n  }\n  lower(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n  }\n  lowerEquals(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n  }\n  bigger(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n  }\n  biggerEquals(rhs: Expression, sourceSpan?: ParseSourceSpan|null): BinaryOperatorExpr {\n    return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n  }\n  isBlank(sourceSpan?: ParseSourceSpan|null): Expression {\n    // Note: We use equals by purpose here to compare to null and undefined in JS.\n    // We use the typed null to allow strictNullChecks to narrow types.\n    return this.equals(TYPED_NULL_EXPR, sourceSpan);\n  }\n  cast(type: Type, sourceSpan?: ParseSourceSpan|null): Expression {\n    return new CastExpr(this, type, sourceSpan);\n  }\n\n  toStmt(): Statement { return new ExpressionStatement(this, null); }\n}\n\nexport enum BuiltinVar {\n  This,\n  Super,\n  CatchError,\n  CatchStack\n}\n\nexport class ReadVarExpr extends Expression {\n  public name: string|null;\n  public builtin: BuiltinVar|null;\n\n  constructor(name: string|BuiltinVar, type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n    if (typeof name === 'string') {\n      this.name = name;\n      this.builtin = null;\n    } else {\n      this.name = null;\n      this.builtin = name;\n    }\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitReadVarExpr(this, context);\n  }\n\n  set(value: Expression): WriteVarExpr {\n    if (!this.name) {\n      throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);\n    }\n    return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n  }\n}\n\nexport class TypeofExpr extends Expression {\n  constructor(public expr: Expression, type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  visitExpression(visitor: ExpressionVisitor, context: any) {\n    return visitor.visitTypeofExpr(this, context);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n  }\n\n  isConstant(): boolean { return this.expr.isConstant(); }\n}\n\nexport class WrappedNodeExpr<T> extends Expression {\n  constructor(public node: T, type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof WrappedNodeExpr && this.node === e.node;\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitWrappedNodeExpr(this, context);\n  }\n}\n\nexport class WriteVarExpr extends Expression {\n  public value: Expression;\n  constructor(\n      public name: string, value: Expression, type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type || value.type, sourceSpan);\n    this.value = value;\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitWriteVarExpr(this, context);\n  }\n\n  toDeclStmt(type?: Type|null, modifiers?: StmtModifier[]|null): DeclareVarStmt {\n    return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n  }\n\n  toConstDecl(): DeclareVarStmt { return this.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]); }\n}\n\n\nexport class WriteKeyExpr extends Expression {\n  public value: Expression;\n  constructor(\n      public receiver: Expression, public index: Expression, value: Expression, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type || value.type, sourceSpan);\n    this.value = value;\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n        this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitWriteKeyExpr(this, context);\n  }\n}\n\n\nexport class WritePropExpr extends Expression {\n  public value: Expression;\n  constructor(\n      public receiver: Expression, public name: string, value: Expression, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type || value.type, sourceSpan);\n    this.value = value;\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n        this.name === e.name && this.value.isEquivalent(e.value);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitWritePropExpr(this, context);\n  }\n}\n\nexport enum BuiltinMethod {\n  ConcatArray,\n  SubscribeObservable,\n  Bind\n}\n\nexport class InvokeMethodExpr extends Expression {\n  public name: string|null;\n  public builtin: BuiltinMethod|null;\n  constructor(\n      public receiver: Expression, method: string|BuiltinMethod, public args: Expression[],\n      type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n    if (typeof method === 'string') {\n      this.name = method;\n      this.builtin = null;\n    } else {\n      this.name = null;\n      this.builtin = <BuiltinMethod>method;\n    }\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&\n        this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitInvokeMethodExpr(this, context);\n  }\n}\n\n\nexport class InvokeFunctionExpr extends Expression {\n  constructor(\n      public fn: Expression, public args: Expression[], type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null, public pure = false) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n        areAllEquivalent(this.args, e.args) && this.pure === e.pure;\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitInvokeFunctionExpr(this, context);\n  }\n}\n\n\nexport class InstantiateExpr extends Expression {\n  constructor(\n      public classExpr: Expression, public args: Expression[], type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n        areAllEquivalent(this.args, e.args);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitInstantiateExpr(this, context);\n  }\n}\n\n\nexport class LiteralExpr extends Expression {\n  constructor(\n      public value: number|string|boolean|null|undefined, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof LiteralExpr && this.value === e.value;\n  }\n\n  isConstant() { return true; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitLiteralExpr(this, context);\n  }\n}\n\n\nexport class ExternalExpr extends Expression {\n  constructor(\n      public value: ExternalReference, type?: Type|null, public typeParams: Type[]|null = null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof ExternalExpr && this.value.name === e.value.name &&\n        this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitExternalExpr(this, context);\n  }\n}\n\nexport class ExternalReference {\n  constructor(public moduleName: string|null, public name: string|null, public runtime?: any|null) {\n  }\n  // Note: no isEquivalent method here as we use this as an interface too.\n}\n\nexport class ConditionalExpr extends Expression {\n  public trueCase: Expression;\n\n  constructor(\n      public condition: Expression, trueCase: Expression, public falseCase: Expression|null = null,\n      type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type || trueCase.type, sourceSpan);\n    this.trueCase = trueCase;\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n        this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitConditionalExpr(this, context);\n  }\n}\n\n\nexport class NotExpr extends Expression {\n  constructor(public condition: Expression, sourceSpan?: ParseSourceSpan|null) {\n    super(BOOL_TYPE, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitNotExpr(this, context);\n  }\n}\n\nexport class AssertNotNull extends Expression {\n  constructor(public condition: Expression, sourceSpan?: ParseSourceSpan|null) {\n    super(condition.type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitAssertNotNullExpr(this, context);\n  }\n}\n\nexport class CastExpr extends Expression {\n  constructor(public value: Expression, type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof CastExpr && this.value.isEquivalent(e.value);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitCastExpr(this, context);\n  }\n}\n\n\nexport class FnParam {\n  constructor(public name: string, public type: Type|null = null) {}\n\n  isEquivalent(param: FnParam): boolean { return this.name === param.name; }\n}\n\n\nexport class FunctionExpr extends Expression {\n  constructor(\n      public params: FnParam[], public statements: Statement[], type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null, public name?: string|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n        areAllEquivalent(this.statements, e.statements);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitFunctionExpr(this, context);\n  }\n\n  toDeclStmt(name: string, modifiers: StmtModifier[]|null = null): DeclareFunctionStmt {\n    return new DeclareFunctionStmt(\n        name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n  }\n}\n\n\nexport class BinaryOperatorExpr extends Expression {\n  public lhs: Expression;\n  constructor(\n      public operator: BinaryOperator, lhs: Expression, public rhs: Expression, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null, public parens: boolean = true) {\n    super(type || lhs.type, sourceSpan);\n    this.lhs = lhs;\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n        this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitBinaryOperatorExpr(this, context);\n  }\n}\n\n\nexport class ReadPropExpr extends Expression {\n  constructor(\n      public receiver: Expression, public name: string, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n        this.name === e.name;\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitReadPropExpr(this, context);\n  }\n\n  set(value: Expression): WritePropExpr {\n    return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n  }\n}\n\n\nexport class ReadKeyExpr extends Expression {\n  constructor(\n      public receiver: Expression, public index: Expression, type?: Type|null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n        this.index.isEquivalent(e.index);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitReadKeyExpr(this, context);\n  }\n\n  set(value: Expression): WriteKeyExpr {\n    return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n  }\n}\n\n\nexport class LiteralArrayExpr extends Expression {\n  public entries: Expression[];\n  constructor(entries: Expression[], type?: Type|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n    this.entries = entries;\n  }\n\n  isConstant() { return this.entries.every(e => e.isConstant()); }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n  }\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitLiteralArrayExpr(this, context);\n  }\n}\n\nexport class LiteralMapEntry {\n  constructor(public key: string, public value: Expression, public quoted: boolean) {}\n  isEquivalent(e: LiteralMapEntry): boolean {\n    return this.key === e.key && this.value.isEquivalent(e.value);\n  }\n}\n\nexport class LiteralMapExpr extends Expression {\n  public valueType: Type|null = null;\n  constructor(\n      public entries: LiteralMapEntry[], type?: MapType|null, sourceSpan?: ParseSourceSpan|null) {\n    super(type, sourceSpan);\n    if (type) {\n      this.valueType = type.valueType;\n    }\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n  }\n\n  isConstant() { return this.entries.every(e => e.value.isConstant()); }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitLiteralMapExpr(this, context);\n  }\n}\n\nexport class CommaExpr extends Expression {\n  constructor(public parts: Expression[], sourceSpan?: ParseSourceSpan|null) {\n    super(parts[parts.length - 1].type, sourceSpan);\n  }\n\n  isEquivalent(e: Expression): boolean {\n    return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n  }\n\n  isConstant() { return false; }\n\n  visitExpression(visitor: ExpressionVisitor, context: any): any {\n    return visitor.visitCommaExpr(this, context);\n  }\n}\n\nexport interface ExpressionVisitor {\n  visitReadVarExpr(ast: ReadVarExpr, context: any): any;\n  visitWriteVarExpr(expr: WriteVarExpr, context: any): any;\n  visitWriteKeyExpr(expr: WriteKeyExpr, context: any): any;\n  visitWritePropExpr(expr: WritePropExpr, context: any): any;\n  visitInvokeMethodExpr(ast: InvokeMethodExpr, context: any): any;\n  visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any;\n  visitInstantiateExpr(ast: InstantiateExpr, context: any): any;\n  visitLiteralExpr(ast: LiteralExpr, context: any): any;\n  visitExternalExpr(ast: ExternalExpr, context: any): any;\n  visitConditionalExpr(ast: ConditionalExpr, context: any): any;\n  visitNotExpr(ast: NotExpr, context: any): any;\n  visitAssertNotNullExpr(ast: AssertNotNull, context: any): any;\n  visitCastExpr(ast: CastExpr, context: any): any;\n  visitFunctionExpr(ast: FunctionExpr, context: any): any;\n  visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any;\n  visitReadPropExpr(ast: ReadPropExpr, context: any): any;\n  visitReadKeyExpr(ast: ReadKeyExpr, context: any): any;\n  visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any;\n  visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any;\n  visitCommaExpr(ast: CommaExpr, context: any): any;\n  visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any;\n  visitTypeofExpr(ast: TypeofExpr, context: any): any;\n}\n\nexport const THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);\nexport const SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);\nexport const CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);\nexport const CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);\nexport const NULL_EXPR = new LiteralExpr(null, null, null);\nexport const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n\n//// Statements\nexport enum StmtModifier {\n  Final,\n  Private,\n  Exported,\n  Static,\n}\n\nexport abstract class Statement {\n  public modifiers: StmtModifier[];\n  public sourceSpan: ParseSourceSpan|null;\n  constructor(modifiers?: StmtModifier[]|null, sourceSpan?: ParseSourceSpan|null) {\n    this.modifiers = modifiers || [];\n    this.sourceSpan = sourceSpan || null;\n  }\n  /**\n   * Calculates whether this statement produces the same value as the given statement.\n   * Note: We don't check Types nor ParseSourceSpans nor function arguments.\n   */\n  abstract isEquivalent(stmt: Statement): boolean;\n\n  abstract visitStatement(visitor: StatementVisitor, context: any): any;\n\n  hasModifier(modifier: StmtModifier): boolean { return this.modifiers !.indexOf(modifier) !== -1; }\n}\n\n\nexport class DeclareVarStmt extends Statement {\n  public type: Type|null;\n  constructor(\n      public name: string, public value?: Expression, type?: Type|null,\n      modifiers: StmtModifier[]|null = null, sourceSpan?: ParseSourceSpan|null) {\n    super(modifiers, sourceSpan);\n    this.type = type || (value && value.type) || null;\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n        (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitDeclareVarStmt(this, context);\n  }\n}\n\nexport class DeclareFunctionStmt extends Statement {\n  public type: Type|null;\n  constructor(\n      public name: string, public params: FnParam[], public statements: Statement[],\n      type?: Type|null, modifiers: StmtModifier[]|null = null, sourceSpan?: ParseSourceSpan|null) {\n    super(modifiers, sourceSpan);\n    this.type = type || null;\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n        areAllEquivalent(this.statements, stmt.statements);\n  }\n\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitDeclareFunctionStmt(this, context);\n  }\n}\n\nexport class ExpressionStatement extends Statement {\n  constructor(public expr: Expression, sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n  }\n\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitExpressionStmt(this, context);\n  }\n}\n\n\nexport class ReturnStatement extends Statement {\n  constructor(public value: Expression, sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitReturnStmt(this, context);\n  }\n}\n\nexport class AbstractClassPart {\n  public type: Type|null;\n  constructor(type: Type|null|undefined, public modifiers: StmtModifier[]|null) {\n    if (!modifiers) {\n      this.modifiers = [];\n    }\n    this.type = type || null;\n  }\n  hasModifier(modifier: StmtModifier): boolean { return this.modifiers !.indexOf(modifier) !== -1; }\n}\n\nexport class ClassField extends AbstractClassPart {\n  constructor(\n      public name: string, type?: Type|null, modifiers: StmtModifier[]|null = null,\n      public initializer?: Expression) {\n    super(type, modifiers);\n  }\n  isEquivalent(f: ClassField) { return this.name === f.name; }\n}\n\n\nexport class ClassMethod extends AbstractClassPart {\n  constructor(\n      public name: string|null, public params: FnParam[], public body: Statement[],\n      type?: Type|null, modifiers: StmtModifier[]|null = null) {\n    super(type, modifiers);\n  }\n  isEquivalent(m: ClassMethod) {\n    return this.name === m.name && areAllEquivalent(this.body, m.body);\n  }\n}\n\n\nexport class ClassGetter extends AbstractClassPart {\n  constructor(\n      public name: string, public body: Statement[], type?: Type|null,\n      modifiers: StmtModifier[]|null = null) {\n    super(type, modifiers);\n  }\n  isEquivalent(m: ClassGetter) {\n    return this.name === m.name && areAllEquivalent(this.body, m.body);\n  }\n}\n\n\nexport class ClassStmt extends Statement {\n  constructor(\n      public name: string, public parent: Expression|null, public fields: ClassField[],\n      public getters: ClassGetter[], public constructorMethod: ClassMethod,\n      public methods: ClassMethod[], modifiers: StmtModifier[]|null = null,\n      sourceSpan?: ParseSourceSpan|null) {\n    super(modifiers, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof ClassStmt && this.name === stmt.name &&\n        nullSafeIsEquivalent(this.parent, stmt.parent) &&\n        areAllEquivalent(this.fields, stmt.fields) &&\n        areAllEquivalent(this.getters, stmt.getters) &&\n        this.constructorMethod.isEquivalent(stmt.constructorMethod) &&\n        areAllEquivalent(this.methods, stmt.methods);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitDeclareClassStmt(this, context);\n  }\n}\n\n\nexport class IfStmt extends Statement {\n  constructor(\n      public condition: Expression, public trueCase: Statement[],\n      public falseCase: Statement[] = [], sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&\n        areAllEquivalent(this.trueCase, stmt.trueCase) &&\n        areAllEquivalent(this.falseCase, stmt.falseCase);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitIfStmt(this, context);\n  }\n}\n\nexport class CommentStmt extends Statement {\n  constructor(public comment: string, public multiline = false, sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean { return stmt instanceof CommentStmt; }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitCommentStmt(this, context);\n  }\n}\n\nexport class JSDocCommentStmt extends Statement {\n  constructor(public tags: JSDocTag[] = [], sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof JSDocCommentStmt && this.toString() === stmt.toString();\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitJSDocCommentStmt(this, context);\n  }\n  toString(): string { return serializeTags(this.tags); }\n}\n\nexport class TryCatchStmt extends Statement {\n  constructor(\n      public bodyStmts: Statement[], public catchStmts: Statement[],\n      sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: Statement): boolean {\n    return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&\n        areAllEquivalent(this.catchStmts, stmt.catchStmts);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitTryCatchStmt(this, context);\n  }\n}\n\n\nexport class ThrowStmt extends Statement {\n  constructor(public error: Expression, sourceSpan?: ParseSourceSpan|null) {\n    super(null, sourceSpan);\n  }\n  isEquivalent(stmt: ThrowStmt): boolean {\n    return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);\n  }\n  visitStatement(visitor: StatementVisitor, context: any): any {\n    return visitor.visitThrowStmt(this, context);\n  }\n}\n\nexport interface StatementVisitor {\n  visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any;\n  visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any;\n  visitExpressionStmt(stmt: ExpressionStatement, context: any): any;\n  visitReturnStmt(stmt: ReturnStatement, context: any): any;\n  visitDeclareClassStmt(stmt: ClassStmt, context: any): any;\n  visitIfStmt(stmt: IfStmt, context: any): any;\n  visitTryCatchStmt(stmt: TryCatchStmt, context: any): any;\n  visitThrowStmt(stmt: ThrowStmt, context: any): any;\n  visitCommentStmt(stmt: CommentStmt, context: any): any;\n  visitJSDocCommentStmt(stmt: JSDocCommentStmt, context: any): any;\n}\n\nexport class AstTransformer implements StatementVisitor, ExpressionVisitor {\n  transformExpr(expr: Expression, context: any): Expression { return expr; }\n\n  transformStmt(stmt: Statement, context: any): Statement { return stmt; }\n\n  visitReadVarExpr(ast: ReadVarExpr, context: any): any { return this.transformExpr(ast, context); }\n\n  visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any {\n    return this.transformExpr(ast, context);\n  }\n\n  visitTypeofExpr(expr: TypeofExpr, context: any): any {\n    return this.transformExpr(\n        new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan),\n        context);\n  }\n\n  visitWriteVarExpr(expr: WriteVarExpr, context: any): any {\n    return this.transformExpr(\n        new WriteVarExpr(\n            expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan),\n        context);\n  }\n\n  visitWriteKeyExpr(expr: WriteKeyExpr, context: any): any {\n    return this.transformExpr(\n        new WriteKeyExpr(\n            expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context),\n            expr.value.visitExpression(this, context), expr.type, expr.sourceSpan),\n        context);\n  }\n\n  visitWritePropExpr(expr: WritePropExpr, context: any): any {\n    return this.transformExpr(\n        new WritePropExpr(\n            expr.receiver.visitExpression(this, context), expr.name,\n            expr.value.visitExpression(this, context), expr.type, expr.sourceSpan),\n        context);\n  }\n\n  visitInvokeMethodExpr(ast: InvokeMethodExpr, context: any): any {\n    const method = ast.builtin || ast.name;\n    return this.transformExpr(\n        new InvokeMethodExpr(\n            ast.receiver.visitExpression(this, context), method !,\n            this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any {\n    return this.transformExpr(\n        new InvokeFunctionExpr(\n            ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context),\n            ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitInstantiateExpr(ast: InstantiateExpr, context: any): any {\n    return this.transformExpr(\n        new InstantiateExpr(\n            ast.classExpr.visitExpression(this, context),\n            this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitLiteralExpr(ast: LiteralExpr, context: any): any { return this.transformExpr(ast, context); }\n\n  visitExternalExpr(ast: ExternalExpr, context: any): any {\n    return this.transformExpr(ast, context);\n  }\n\n  visitConditionalExpr(ast: ConditionalExpr, context: any): any {\n    return this.transformExpr(\n        new ConditionalExpr(\n            ast.condition.visitExpression(this, context),\n            ast.trueCase.visitExpression(this, context),\n            ast.falseCase !.visitExpression(this, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitNotExpr(ast: NotExpr, context: any): any {\n    return this.transformExpr(\n        new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n  }\n\n  visitAssertNotNullExpr(ast: AssertNotNull, context: any): any {\n    return this.transformExpr(\n        new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n  }\n\n  visitCastExpr(ast: CastExpr, context: any): any {\n    return this.transformExpr(\n        new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n  }\n\n  visitFunctionExpr(ast: FunctionExpr, context: any): any {\n    return this.transformExpr(\n        new FunctionExpr(\n            ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any {\n    return this.transformExpr(\n        new BinaryOperatorExpr(\n            ast.operator, ast.lhs.visitExpression(this, context),\n            ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitReadPropExpr(ast: ReadPropExpr, context: any): any {\n    return this.transformExpr(\n        new ReadPropExpr(\n            ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitReadKeyExpr(ast: ReadKeyExpr, context: any): any {\n    return this.transformExpr(\n        new ReadKeyExpr(\n            ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context),\n            ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any {\n    return this.transformExpr(\n        new LiteralArrayExpr(\n            this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan),\n        context);\n  }\n\n  visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any {\n    const entries = ast.entries.map(\n        (entry): LiteralMapEntry => new LiteralMapEntry(\n            entry.key, entry.value.visitExpression(this, context), entry.quoted));\n    const mapType = new MapType(ast.valueType, null);\n    return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);\n  }\n  visitCommaExpr(ast: CommaExpr, context: any): any {\n    return this.transformExpr(\n        new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);\n  }\n  visitAllExpressions(exprs: Expression[], context: any): Expression[] {\n    return exprs.map(expr => expr.visitExpression(this, context));\n  }\n\n  visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any {\n    const value = stmt.value && stmt.value.visitExpression(this, context);\n    return this.transformStmt(\n        new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan), context);\n  }\n  visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any {\n    return this.transformStmt(\n        new DeclareFunctionStmt(\n            stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type,\n            stmt.modifiers, stmt.sourceSpan),\n        context);\n  }\n\n  visitExpressionStmt(stmt: ExpressionStatement, context: any): any {\n    return this.transformStmt(\n        new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan),\n        context);\n  }\n\n  visitReturnStmt(stmt: ReturnStatement, context: any): any {\n    return this.transformStmt(\n        new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);\n  }\n\n  visitDeclareClassStmt(stmt: ClassStmt, context: any): any {\n    const parent = stmt.parent !.visitExpression(this, context);\n    const getters = stmt.getters.map(\n        getter => new ClassGetter(\n            getter.name, this.visitAllStatements(getter.body, context), getter.type,\n            getter.modifiers));\n    const ctorMethod = stmt.constructorMethod &&\n        new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params,\n                        this.visitAllStatements(stmt.constructorMethod.body, context),\n                        stmt.constructorMethod.type, stmt.constructorMethod.modifiers);\n    const methods = stmt.methods.map(\n        method => new ClassMethod(\n            method.name, method.params, this.visitAllStatements(method.body, context), method.type,\n            method.modifiers));\n    return this.transformStmt(\n        new ClassStmt(\n            stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers,\n            stmt.sourceSpan),\n        context);\n  }\n\n  visitIfStmt(stmt: IfStmt, context: any): any {\n    return this.transformStmt(\n        new IfStmt(\n            stmt.condition.visitExpression(this, context),\n            this.visitAllStatements(stmt.trueCase, context),\n            this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan),\n        context);\n  }\n\n  visitTryCatchStmt(stmt: TryCatchStmt, context: any): any {\n    return this.transformStmt(\n        new TryCatchStmt(\n            this.visitAllStatements(stmt.bodyStmts, context),\n            this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan),\n        context);\n  }\n\n  visitThrowStmt(stmt: ThrowStmt, context: any): any {\n    return this.transformStmt(\n        new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);\n  }\n\n  visitCommentStmt(stmt: CommentStmt, context: any): any {\n    return this.transformStmt(stmt, context);\n  }\n\n  visitJSDocCommentStmt(stmt: JSDocCommentStmt, context: any): any {\n    return this.transformStmt(stmt, context);\n  }\n\n  visitAllStatements(stmts: Statement[], context: any): Statement[] {\n    return stmts.map(stmt => stmt.visitStatement(this, context));\n  }\n}\n\n\nexport class RecursiveAstVisitor implements StatementVisitor, ExpressionVisitor {\n  visitType(ast: Type, context: any): any { return ast; }\n  visitExpression(ast: Expression, context: any): any {\n    if (ast.type) {\n      ast.type.visitType(this, context);\n    }\n    return ast;\n  }\n  visitBuiltinType(type: BuiltinType, context: any): any { return this.visitType(type, context); }\n  visitExpressionType(type: ExpressionType, context: any): any {\n    type.value.visitExpression(this, context);\n    if (type.typeParams !== null) {\n      type.typeParams.forEach(param => this.visitType(param, context));\n    }\n    return this.visitType(type, context);\n  }\n  visitArrayType(type: ArrayType, context: any): any { return this.visitType(type, context); }\n  visitMapType(type: MapType, context: any): any { return this.visitType(type, context); }\n  visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any { return ast; }\n  visitTypeofExpr(ast: TypeofExpr, context: any): any { return this.visitExpression(ast, context); }\n  visitReadVarExpr(ast: ReadVarExpr, context: any): any {\n    return this.visitExpression(ast, context);\n  }\n  visitWriteVarExpr(ast: WriteVarExpr, context: any): any {\n    ast.value.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitWriteKeyExpr(ast: WriteKeyExpr, context: any): any {\n    ast.receiver.visitExpression(this, context);\n    ast.index.visitExpression(this, context);\n    ast.value.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitWritePropExpr(ast: WritePropExpr, context: any): any {\n    ast.receiver.visitExpression(this, context);\n    ast.value.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitInvokeMethodExpr(ast: InvokeMethodExpr, context: any): any {\n    ast.receiver.visitExpression(this, context);\n    this.visitAllExpressions(ast.args, context);\n    return this.visitExpression(ast, context);\n  }\n  visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any {\n    ast.fn.visitExpression(this, context);\n    this.visitAllExpressions(ast.args, context);\n    return this.visitExpression(ast, context);\n  }\n  visitInstantiateExpr(ast: InstantiateExpr, context: any): any {\n    ast.classExpr.visitExpression(this, context);\n    this.visitAllExpressions(ast.args, context);\n    return this.visitExpression(ast, context);\n  }\n  visitLiteralExpr(ast: LiteralExpr, context: any): any {\n    return this.visitExpression(ast, context);\n  }\n  visitExternalExpr(ast: ExternalExpr, context: any): any {\n    if (ast.typeParams) {\n      ast.typeParams.forEach(type => type.visitType(this, context));\n    }\n    return this.visitExpression(ast, context);\n  }\n  visitConditionalExpr(ast: ConditionalExpr, context: any): any {\n    ast.condition.visitExpression(this, context);\n    ast.trueCase.visitExpression(this, context);\n    ast.falseCase !.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitNotExpr(ast: NotExpr, context: any): any {\n    ast.condition.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitAssertNotNullExpr(ast: AssertNotNull, context: any): any {\n    ast.condition.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitCastExpr(ast: CastExpr, context: any): any {\n    ast.value.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitFunctionExpr(ast: FunctionExpr, context: any): any {\n    this.visitAllStatements(ast.statements, context);\n    return this.visitExpression(ast, context);\n  }\n  visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any {\n    ast.lhs.visitExpression(this, context);\n    ast.rhs.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitReadPropExpr(ast: ReadPropExpr, context: any): any {\n    ast.receiver.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitReadKeyExpr(ast: ReadKeyExpr, context: any): any {\n    ast.receiver.visitExpression(this, context);\n    ast.index.visitExpression(this, context);\n    return this.visitExpression(ast, context);\n  }\n  visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any {\n    this.visitAllExpressions(ast.entries, context);\n    return this.visitExpression(ast, context);\n  }\n  visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any {\n    ast.entries.forEach((entry) => entry.value.visitExpression(this, context));\n    return this.visitExpression(ast, context);\n  }\n  visitCommaExpr(ast: CommaExpr, context: any): any {\n    this.visitAllExpressions(ast.parts, context);\n    return this.visitExpression(ast, context);\n  }\n  visitAllExpressions(exprs: Expression[], context: any): void {\n    exprs.forEach(expr => expr.visitExpression(this, context));\n  }\n\n  visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any {\n    if (stmt.value) {\n      stmt.value.visitExpression(this, context);\n    }\n    if (stmt.type) {\n      stmt.type.visitType(this, context);\n    }\n    return stmt;\n  }\n  visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any {\n    this.visitAllStatements(stmt.statements, context);\n    if (stmt.type) {\n      stmt.type.visitType(this, context);\n    }\n    return stmt;\n  }\n  visitExpressionStmt(stmt: ExpressionStatement, context: any): any {\n    stmt.expr.visitExpression(this, context);\n    return stmt;\n  }\n  visitReturnStmt(stmt: ReturnStatement, context: any): any {\n    stmt.value.visitExpression(this, context);\n    return stmt;\n  }\n  visitDeclareClassStmt(stmt: ClassStmt, context: any): any {\n    stmt.parent !.visitExpression(this, context);\n    stmt.getters.forEach(getter => this.visitAllStatements(getter.body, context));\n    if (stmt.constructorMethod) {\n      this.visitAllStatements(stmt.constructorMethod.body, context);\n    }\n    stmt.methods.forEach(method => this.visitAllStatements(method.body, context));\n    return stmt;\n  }\n  visitIfStmt(stmt: IfStmt, context: any): any {\n    stmt.condition.visitExpression(this, context);\n    this.visitAllStatements(stmt.trueCase, context);\n    this.visitAllStatements(stmt.falseCase, context);\n    return stmt;\n  }\n  visitTryCatchStmt(stmt: TryCatchStmt, context: any): any {\n    this.visitAllStatements(stmt.bodyStmts, context);\n    this.visitAllStatements(stmt.catchStmts, context);\n    return stmt;\n  }\n  visitThrowStmt(stmt: ThrowStmt, context: any): any {\n    stmt.error.visitExpression(this, context);\n    return stmt;\n  }\n  visitCommentStmt(stmt: CommentStmt, context: any): any { return stmt; }\n  visitJSDocCommentStmt(stmt: JSDocCommentStmt, context: any): any { return stmt; }\n  visitAllStatements(stmts: Statement[], context: any): void {\n    stmts.forEach(stmt => stmt.visitStatement(this, context));\n  }\n}\n\nexport function findReadVarNames(stmts: Statement[]): Set<string> {\n  const visitor = new _ReadVarVisitor();\n  visitor.visitAllStatements(stmts, null);\n  return visitor.varNames;\n}\n\nclass _ReadVarVisitor extends RecursiveAstVisitor {\n  varNames = new Set<string>();\n  visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any {\n    // Don't descend into nested functions\n    return stmt;\n  }\n  visitDeclareClassStmt(stmt: ClassStmt, context: any): any {\n    // Don't descend into nested classes\n    return stmt;\n  }\n  visitReadVarExpr(ast: ReadVarExpr, context: any): any {\n    if (ast.name) {\n      this.varNames.add(ast.name);\n    }\n    return null;\n  }\n}\n\nexport function collectExternalReferences(stmts: Statement[]): ExternalReference[] {\n  const visitor = new _FindExternalReferencesVisitor();\n  visitor.visitAllStatements(stmts, null);\n  return visitor.externalReferences;\n}\n\nclass _FindExternalReferencesVisitor extends RecursiveAstVisitor {\n  externalReferences: ExternalReference[] = [];\n  visitExternalExpr(e: ExternalExpr, context: any) {\n    this.externalReferences.push(e.value);\n    return super.visitExternalExpr(e, context);\n  }\n}\n\nexport function applySourceSpanToStatementIfNeeded(\n    stmt: Statement, sourceSpan: ParseSourceSpan | null): Statement {\n  if (!sourceSpan) {\n    return stmt;\n  }\n  const transformer = new _ApplySourceSpanTransformer(sourceSpan);\n  return stmt.visitStatement(transformer, null);\n}\n\nexport function applySourceSpanToExpressionIfNeeded(\n    expr: Expression, sourceSpan: ParseSourceSpan | null): Expression {\n  if (!sourceSpan) {\n    return expr;\n  }\n  const transformer = new _ApplySourceSpanTransformer(sourceSpan);\n  return expr.visitExpression(transformer, null);\n}\n\nclass _ApplySourceSpanTransformer extends AstTransformer {\n  constructor(private sourceSpan: ParseSourceSpan) { super(); }\n  private _clone(obj: any): any {\n    const clone = Object.create(obj.constructor.prototype);\n    for (let prop of Object.keys(obj)) {\n      clone[prop] = obj[prop];\n    }\n    return clone;\n  }\n\n  transformExpr(expr: Expression, context: any): Expression {\n    if (!expr.sourceSpan) {\n      expr = this._clone(expr);\n      expr.sourceSpan = this.sourceSpan;\n    }\n    return expr;\n  }\n\n  transformStmt(stmt: Statement, context: any): Statement {\n    if (!stmt.sourceSpan) {\n      stmt = this._clone(stmt);\n      stmt.sourceSpan = this.sourceSpan;\n    }\n    return stmt;\n  }\n}\n\nexport function variable(\n    name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null): ReadVarExpr {\n  return new ReadVarExpr(name, type, sourceSpan);\n}\n\nexport function importExpr(\n    id: ExternalReference, typeParams: Type[] | null = null,\n    sourceSpan?: ParseSourceSpan | null): ExternalExpr {\n  return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\n\nexport function importType(\n    id: ExternalReference, typeParams: Type[] | null = null,\n    typeModifiers: TypeModifier[] | null = null): ExpressionType|null {\n  return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\n\nexport function expressionType(\n    expr: Expression, typeModifiers: TypeModifier[] | null = null,\n    typeParams: Type[] | null = null): ExpressionType {\n  return new ExpressionType(expr, typeModifiers, typeParams);\n}\n\nexport function typeofExpr(expr: Expression) {\n  return new TypeofExpr(expr);\n}\n\nexport function literalArr(\n    values: Expression[], type?: Type | null,\n    sourceSpan?: ParseSourceSpan | null): LiteralArrayExpr {\n  return new LiteralArrayExpr(values, type, sourceSpan);\n}\n\nexport function literalMap(\n    values: {key: string, quoted: boolean, value: Expression}[],\n    type: MapType | null = null): LiteralMapExpr {\n  return new LiteralMapExpr(\n      values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);\n}\n\nexport function not(expr: Expression, sourceSpan?: ParseSourceSpan | null): NotExpr {\n  return new NotExpr(expr, sourceSpan);\n}\n\nexport function assertNotNull(\n    expr: Expression, sourceSpan?: ParseSourceSpan | null): AssertNotNull {\n  return new AssertNotNull(expr, sourceSpan);\n}\n\nexport function fn(\n    params: FnParam[], body: Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null,\n    name?: string | null): FunctionExpr {\n  return new FunctionExpr(params, body, type, sourceSpan, name);\n}\n\nexport function ifStmt(condition: Expression, thenClause: Statement[], elseClause?: Statement[]) {\n  return new IfStmt(condition, thenClause, elseClause);\n}\n\nexport function literal(\n    value: any, type?: Type | null, sourceSpan?: ParseSourceSpan | null): LiteralExpr {\n  return new LiteralExpr(value, type, sourceSpan);\n}\n\nexport function isNull(exp: Expression): boolean {\n  return exp instanceof LiteralExpr && exp.value === null;\n}\n\n// The list of JSDoc tags that we currently support. Extend it if needed.\nexport const enum JSDocTagName {\n  Desc = 'desc',\n  Id = 'id',\n  Meaning = 'meaning',\n}\n\n/*\n * TypeScript has an API for JSDoc already, but it's not exposed.\n * https://github.com/Microsoft/TypeScript/issues/7393\n * For now we create types that are similar to theirs so that migrating\n * to their API will be easier. See e.g. `ts.JSDocTag` and `ts.JSDocComment`.\n */\nexport type JSDocTag = {\n  // `tagName` is e.g. \"param\" in an `@param` declaration\n  tagName: JSDocTagName | string,\n  // Any remaining text on the tag, e.g. the description\n  text?: string,\n} | {\n  // no `tagName` for plain text documentation that occurs before any `@param` lines\n  tagName?: undefined,\n  text: string,\n};\n\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag: JSDocTag): string {\n  let out = '';\n  if (tag.tagName) {\n    out += ` @${tag.tagName}`;\n  }\n  if (tag.text) {\n    if (tag.text.match(/\\/\\*|\\*\\//)) {\n      throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n    }\n    out += ' ' + tag.text.replace(/@/g, '\\\\@');\n  }\n  return out;\n}\n\nfunction serializeTags(tags: JSDocTag[]): string {\n  if (tags.length === 0) return '';\n\n  let out = '*\\n';\n  for (const tag of tags) {\n    out += ' *';\n    // If the tagToString is multi-line, insert \" * \" prefixes on subsequent lines.\n    out += tagToString(tag).replace(/\\n/g, '\\n * ');\n    out += '\\n';\n  }\n  out += ' ';\n  return out;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ConstantPool} from './constant_pool';\n\nimport * as o from './output/output_ast';\nimport {ParseError} from './parse_util';\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\n\nexport function dashCaseToCamelCase(input: string): string {\n  return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function splitAtColon(input: string, defaultValues: string[]): string[] {\n  return _splitAt(input, ':', defaultValues);\n}\n\nexport function splitAtPeriod(input: string, defaultValues: string[]): string[] {\n  return _splitAt(input, '.', defaultValues);\n}\n\nfunction _splitAt(input: string, character: string, defaultValues: string[]): string[] {\n  const characterIndex = input.indexOf(character);\n  if (characterIndex == -1) return defaultValues;\n  return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\n\nexport function visitValue(value: any, visitor: ValueVisitor, context: any): any {\n  if (Array.isArray(value)) {\n    return visitor.visitArray(<any[]>value, context);\n  }\n\n  if (isStrictStringMap(value)) {\n    return visitor.visitStringMap(<{[key: string]: any}>value, context);\n  }\n\n  if (value == null || typeof value == 'string' || typeof value == 'number' ||\n      typeof value == 'boolean') {\n    return visitor.visitPrimitive(value, context);\n  }\n\n  return visitor.visitOther(value, context);\n}\n\nexport function isDefined(val: any): boolean {\n  return val !== null && val !== undefined;\n}\n\nexport function noUndefined<T>(val: T | undefined): T {\n  return val === undefined ? null ! : val;\n}\n\nexport interface ValueVisitor {\n  visitArray(arr: any[], context: any): any;\n  visitStringMap(map: {[key: string]: any}, context: any): any;\n  visitPrimitive(value: any, context: any): any;\n  visitOther(value: any, context: any): any;\n}\n\nexport class ValueTransformer implements ValueVisitor {\n  visitArray(arr: any[], context: any): any {\n    return arr.map(value => visitValue(value, this, context));\n  }\n  visitStringMap(map: {[key: string]: any}, context: any): any {\n    const result: {[key: string]: any} = {};\n    Object.keys(map).forEach(key => { result[key] = visitValue(map[key], this, context); });\n    return result;\n  }\n  visitPrimitive(value: any, context: any): any { return value; }\n  visitOther(value: any, context: any): any { return value; }\n}\n\nexport type SyncAsync<T> = T | Promise<T>;\n\nexport const SyncAsync = {\n  assertSync: <T>(value: SyncAsync<T>): T => {\n    if (isPromise(value)) {\n      throw new Error(`Illegal state: value cannot be a promise`);\n    }\n    return value;\n  },\n  then: <T, R>(value: SyncAsync<T>, cb: (value: T) => R | Promise<R>| SyncAsync<R>):\n            SyncAsync<R> => { return isPromise(value) ? value.then(cb) : cb(value);},\n  all: <T>(syncAsyncValues: SyncAsync<T>[]): SyncAsync<T[]> => {\n    return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues as T[];\n  }\n};\n\nexport function error(msg: string): never {\n  throw new Error(`Internal Error: ${msg}`);\n}\n\nexport function syntaxError(msg: string, parseErrors?: ParseError[]): Error {\n  const error = Error(msg);\n  (error as any)[ERROR_SYNTAX_ERROR] = true;\n  if (parseErrors) (error as any)[ERROR_PARSE_ERRORS] = parseErrors;\n  return error;\n}\n\nconst ERROR_SYNTAX_ERROR = 'ngSyntaxError';\nconst ERROR_PARSE_ERRORS = 'ngParseErrors';\n\nexport function isSyntaxError(error: Error): boolean {\n  return (error as any)[ERROR_SYNTAX_ERROR];\n}\n\nexport function getParseErrors(error: Error): ParseError[] {\n  return (error as any)[ERROR_PARSE_ERRORS] || [];\n}\n\n// Escape characters that have a special meaning in Regular Expressions\nexport function escapeRegExp(s: string): string {\n  return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\n\nconst STRING_MAP_PROTO = Object.getPrototypeOf({});\nfunction isStrictStringMap(obj: any): boolean {\n  return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\n}\n\nexport function utf8Encode(str: string): string {\n  let encoded = '';\n  for (let index = 0; index < str.length; index++) {\n    let codePoint = str.charCodeAt(index);\n\n    // decode surrogate\n    // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n    if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {\n      const low = str.charCodeAt(index + 1);\n      if (low >= 0xdc00 && low <= 0xdfff) {\n        index++;\n        codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;\n      }\n    }\n\n    if (codePoint <= 0x7f) {\n      encoded += String.fromCharCode(codePoint);\n    } else if (codePoint <= 0x7ff) {\n      encoded += String.fromCharCode(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n    } else if (codePoint <= 0xffff) {\n      encoded += String.fromCharCode(\n          (codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n    } else if (codePoint <= 0x1fffff) {\n      encoded += String.fromCharCode(\n          ((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80,\n          ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n    }\n  }\n\n  return encoded;\n}\n\nexport interface OutputContext {\n  genFilePath: string;\n  statements: o.Statement[];\n  constantPool: ConstantPool;\n  importExpr(reference: any, typeParams?: o.Type[]|null, useSummaries?: boolean): o.Expression;\n}\n\nexport function stringify(token: any): string {\n  if (typeof token === 'string') {\n    return token;\n  }\n\n  if (token instanceof Array) {\n    return '[' + token.map(stringify).join(', ') + ']';\n  }\n\n  if (token == null) {\n    return '' + token;\n  }\n\n  if (token.overriddenName) {\n    return `${token.overriddenName}`;\n  }\n\n  if (token.name) {\n    return `${token.name}`;\n  }\n\n  if (!token.toString) {\n    return 'object';\n  }\n\n  // WARNING: do not try to `JSON.stringify(token)` here\n  // see https://github.com/angular/angular/issues/23440\n  const res = token.toString();\n\n  if (res == null) {\n    return '' + res;\n  }\n\n  const newLineIndex = res.indexOf('\\n');\n  return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n */\nexport function resolveForwardRef(type: any): any {\n  if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {\n    return type();\n  } else {\n    return type;\n  }\n}\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise(obj: any): obj is Promise<any> {\n  // allow any Promise/A+ compliant thenable.\n  // It's up to the caller to ensure that obj.then conforms to the spec\n  return !!obj && typeof obj.then === 'function';\n}\n\nexport class Version {\n  public readonly major: string;\n  public readonly minor: string;\n  public readonly patch: string;\n\n  constructor(public full: string) {\n    const splits = full.split('.');\n    this.major = splits[0];\n    this.minor = splits[1];\n    this.patch = splits.slice(2).join('.');\n  }\n}\n\nexport interface Console {\n  log(message: string): void;\n  warn(message: string): void;\n}\n\n\ndeclare var WorkerGlobalScope: any;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n    self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Check __global first, because in Node tests both __global and __window may be defined and _global\n// should be __global in that case.\nconst _global: {[name: string]: any} = __global || __window || __self;\nexport {_global as global};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as o from './output/output_ast';\nimport {OutputContext, error} from './util';\n\nconst CONSTANT_PREFIX = '_c';\n\nexport const enum DefinitionKind {Injector, Directive, Component, Pipe}\n\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nconst KEY_CONTEXT = {};\n\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nclass FixupExpression extends o.Expression {\n  private original: o.Expression;\n\n  // TODO(issue/24571): remove '!'.\n  shared !: boolean;\n\n  constructor(public resolved: o.Expression) {\n    super(resolved.type);\n    this.original = resolved;\n  }\n\n  visitExpression(visitor: o.ExpressionVisitor, context: any): any {\n    if (context === KEY_CONTEXT) {\n      // When producing a key we want to traverse the constant not the\n      // variable used to refer to it.\n      return this.original.visitExpression(visitor, context);\n    } else {\n      return this.resolved.visitExpression(visitor, context);\n    }\n  }\n\n  isEquivalent(e: o.Expression): boolean {\n    return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n  }\n\n  isConstant() { return true; }\n\n  fixup(expression: o.Expression) {\n    this.resolved = expression;\n    this.shared = true;\n  }\n}\n\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nexport class ConstantPool {\n  statements: o.Statement[] = [];\n  private literals = new Map<string, FixupExpression>();\n  private literalFactories = new Map<string, o.Expression>();\n  private injectorDefinitions = new Map<any, FixupExpression>();\n  private directiveDefinitions = new Map<any, FixupExpression>();\n  private componentDefinitions = new Map<any, FixupExpression>();\n  private pipeDefinitions = new Map<any, FixupExpression>();\n\n  private nextNameIndex = 0;\n\n  getConstLiteral(literal: o.Expression, forceShared?: boolean): o.Expression {\n    if (literal instanceof o.LiteralExpr || literal instanceof FixupExpression) {\n      // Do no put simple literals into the constant pool or try to produce a constant for a\n      // reference to a constant.\n      return literal;\n    }\n    const key = this.keyOf(literal);\n    let fixup = this.literals.get(key);\n    let newValue = false;\n    if (!fixup) {\n      fixup = new FixupExpression(literal);\n      this.literals.set(key, fixup);\n      newValue = true;\n    }\n\n    if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n      // Replace the expression with a variable\n      const name = this.freshName();\n      this.statements.push(\n          o.variable(name).set(literal).toDeclStmt(o.INFERRED_TYPE, [o.StmtModifier.Final]));\n      fixup.fixup(o.variable(name));\n    }\n\n    return fixup;\n  }\n\n  getDefinition(type: any, kind: DefinitionKind, ctx: OutputContext, forceShared: boolean = false):\n      o.Expression {\n    const definitions = this.definitionsOf(kind);\n    let fixup = definitions.get(type);\n    let newValue = false;\n    if (!fixup) {\n      const property = this.propertyNameOf(kind);\n      fixup = new FixupExpression(ctx.importExpr(type).prop(property));\n      definitions.set(type, fixup);\n      newValue = true;\n    }\n\n    if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n      const name = this.freshName();\n      this.statements.push(\n          o.variable(name).set(fixup.resolved).toDeclStmt(o.INFERRED_TYPE, [o.StmtModifier.Final]));\n      fixup.fixup(o.variable(name));\n    }\n    return fixup;\n  }\n\n  getLiteralFactory(literal: o.LiteralArrayExpr|o.LiteralMapExpr):\n      {literalFactory: o.Expression, literalFactoryArguments: o.Expression[]} {\n    // Create a pure function that builds an array of a mix of constant  and variable expressions\n    if (literal instanceof o.LiteralArrayExpr) {\n      const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : o.literal(null));\n      const key = this.keyOf(o.literalArr(argumentsForKey));\n      return this._getLiteralFactory(key, literal.entries, entries => o.literalArr(entries));\n    } else {\n      const expressionForKey = o.literalMap(\n          literal.entries.map(e => ({\n                                key: e.key,\n                                value: e.value.isConstant() ? e.value : o.literal(null),\n                                quoted: e.quoted\n                              })));\n      const key = this.keyOf(expressionForKey);\n      return this._getLiteralFactory(\n          key, literal.entries.map(e => e.value),\n          entries => o.literalMap(entries.map((value, index) => ({\n                                                key: literal.entries[index].key,\n                                                value,\n                                                quoted: literal.entries[index].quoted\n                                              }))));\n    }\n  }\n\n  private _getLiteralFactory(\n      key: string, values: o.Expression[], resultMap: (parameters: o.Expression[]) => o.Expression):\n      {literalFactory: o.Expression, literalFactoryArguments: o.Expression[]} {\n    let literalFactory = this.literalFactories.get(key);\n    const literalFactoryArguments = values.filter((e => !e.isConstant()));\n    if (!literalFactory) {\n      const resultExpressions = values.map(\n          (e, index) => e.isConstant() ? this.getConstLiteral(e, true) : o.variable(`a${index}`));\n      const parameters =\n          resultExpressions.filter(isVariable).map(e => new o.FnParam(e.name !, o.DYNAMIC_TYPE));\n      const pureFunctionDeclaration =\n          o.fn(parameters, [new o.ReturnStatement(resultMap(resultExpressions))], o.INFERRED_TYPE);\n      const name = this.freshName();\n      this.statements.push(\n          o.variable(name).set(pureFunctionDeclaration).toDeclStmt(o.INFERRED_TYPE, [\n            o.StmtModifier.Final\n          ]));\n      literalFactory = o.variable(name);\n      this.literalFactories.set(key, literalFactory);\n    }\n    return {literalFactory, literalFactoryArguments};\n  }\n\n  /**\n   * Produce a unique name.\n   *\n   * The name might be unique among different prefixes if any of the prefixes end in\n   * a digit so the prefix should be a constant string (not based on user input) and\n   * must not end in a digit.\n   */\n  uniqueName(prefix: string): string { return `${prefix}${this.nextNameIndex++}`; }\n\n  private definitionsOf(kind: DefinitionKind): Map<any, FixupExpression> {\n    switch (kind) {\n      case DefinitionKind.Component:\n        return this.componentDefinitions;\n      case DefinitionKind.Directive:\n        return this.directiveDefinitions;\n      case DefinitionKind.Injector:\n        return this.injectorDefinitions;\n      case DefinitionKind.Pipe:\n        return this.pipeDefinitions;\n    }\n    error(`Unknown definition kind ${kind}`);\n    return this.componentDefinitions;\n  }\n\n  public propertyNameOf(kind: DefinitionKind): string {\n    switch (kind) {\n      case DefinitionKind.Component:\n        return 'ngComponentDef';\n      case DefinitionKind.Directive:\n        return 'ngDirectiveDef';\n      case DefinitionKind.Injector:\n        return 'ngInjectorDef';\n      case DefinitionKind.Pipe:\n        return 'ngPipeDef';\n    }\n    error(`Unknown definition kind ${kind}`);\n    return '<unknown>';\n  }\n\n  private freshName(): string { return this.uniqueName(CONSTANT_PREFIX); }\n\n  private keyOf(expression: o.Expression) {\n    return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);\n  }\n}\n\n/**\n * Visitor used to determine if 2 expressions are equivalent and can be shared in the\n * `ConstantPool`.\n *\n * When the id (string) generated by the visitor is equal, expressions are considered equivalent.\n */\nclass KeyVisitor implements o.ExpressionVisitor {\n  visitLiteralExpr(ast: o.LiteralExpr): string {\n    return `${typeof ast.value === 'string' ? '\"' + ast.value + '\"' : ast.value}`;\n  }\n\n  visitLiteralArrayExpr(ast: o.LiteralArrayExpr, context: object): string {\n    return `[${ast.entries.map(entry => entry.visitExpression(this, context)).join(',')}]`;\n  }\n\n  visitLiteralMapExpr(ast: o.LiteralMapExpr, context: object): string {\n    const mapKey = (entry: o.LiteralMapEntry) => {\n      const quote = entry.quoted ? '\"' : '';\n      return `${quote}${entry.key}${quote}`;\n    };\n    const mapEntry = (entry: o.LiteralMapEntry) =>\n        `${mapKey(entry)}:${entry.value.visitExpression(this, context)}`;\n    return `{${ast.entries.map(mapEntry).join(',')}`;\n  }\n\n  visitExternalExpr(ast: o.ExternalExpr): string {\n    return ast.value.moduleName ? `EX:${ast.value.moduleName}:${ast.value.name}` :\n                                  `EX:${ast.value.runtime.name}`;\n  }\n\n  visitReadVarExpr(node: o.ReadVarExpr) { return `VAR:${node.name}`; }\n\n  visitTypeofExpr(node: o.TypeofExpr, context: any): string {\n    return `TYPEOF:${node.expr.visitExpression(this, context)}`;\n  }\n\n  visitWrappedNodeExpr = invalid;\n  visitWriteVarExpr = invalid;\n  visitWriteKeyExpr = invalid;\n  visitWritePropExpr = invalid;\n  visitInvokeMethodExpr = invalid;\n  visitInvokeFunctionExpr = invalid;\n  visitInstantiateExpr = invalid;\n  visitConditionalExpr = invalid;\n  visitNotExpr = invalid;\n  visitAssertNotNullExpr = invalid;\n  visitCastExpr = invalid;\n  visitFunctionExpr = invalid;\n  visitBinaryOperatorExpr = invalid;\n  visitReadPropExpr = invalid;\n  visitReadKeyExpr = invalid;\n  visitCommaExpr = invalid;\n}\n\nfunction invalid<T>(this: o.ExpressionVisitor, arg: o.Expression | o.Statement): never {\n  throw new Error(\n      `Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\n\nfunction isVariable(e: o.Expression): e is o.ReadVarExpr {\n  return e instanceof o.ReadVarExpr;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileTokenMetadata} from './compile_metadata';\nimport {CompileReflector} from './compile_reflector';\nimport * as o from './output/output_ast';\n\nconst CORE = '@angular/core';\n\nexport class Identifiers {\n  static ANALYZE_FOR_ENTRY_COMPONENTS: o.ExternalReference = {\n    name: 'ANALYZE_FOR_ENTRY_COMPONENTS',\n    moduleName: CORE,\n\n  };\n  static ElementRef: o.ExternalReference = {name: 'ElementRef', moduleName: CORE};\n  static NgModuleRef: o.ExternalReference = {name: 'NgModuleRef', moduleName: CORE};\n  static ViewContainerRef: o.ExternalReference = {name: 'ViewContainerRef', moduleName: CORE};\n  static ChangeDetectorRef: o.ExternalReference = {\n    name: 'ChangeDetectorRef',\n    moduleName: CORE,\n\n  };\n  static QueryList: o.ExternalReference = {name: 'QueryList', moduleName: CORE};\n  static TemplateRef: o.ExternalReference = {name: 'TemplateRef', moduleName: CORE};\n  static Renderer2: o.ExternalReference = {name: 'Renderer2', moduleName: CORE};\n  static CodegenComponentFactoryResolver: o.ExternalReference = {\n    name: 'ÉµCodegenComponentFactoryResolver',\n    moduleName: CORE,\n\n  };\n  static ComponentFactoryResolver: o.ExternalReference = {\n    name: 'ComponentFactoryResolver',\n    moduleName: CORE,\n\n  };\n  static ComponentFactory: o.ExternalReference = {name: 'ComponentFactory', moduleName: CORE};\n  static ComponentRef: o.ExternalReference = {name: 'ComponentRef', moduleName: CORE};\n  static NgModuleFactory: o.ExternalReference = {name: 'NgModuleFactory', moduleName: CORE};\n  static createModuleFactory: o.ExternalReference = {\n    name: 'Éµcmf',\n    moduleName: CORE,\n\n  };\n  static moduleDef: o.ExternalReference = {\n    name: 'Éµmod',\n    moduleName: CORE,\n\n  };\n  static moduleProviderDef: o.ExternalReference = {\n    name: 'Éµmpd',\n    moduleName: CORE,\n\n  };\n  static RegisterModuleFactoryFn: o.ExternalReference = {\n    name: 'ÉµregisterModuleFactory',\n    moduleName: CORE,\n\n  };\n  static inject: o.ExternalReference = {name: 'ÉµÉµinject', moduleName: CORE};\n  static INJECTOR: o.ExternalReference = {name: 'INJECTOR', moduleName: CORE};\n  static Injector: o.ExternalReference = {name: 'Injector', moduleName: CORE};\n  static ÉµÉµdefineInjectable: o.ExternalReference = {name: 'ÉµÉµdefineInjectable', moduleName: CORE};\n  static InjectableDef: o.ExternalReference = {name: 'ÉµÉµInjectableDef', moduleName: CORE};\n  static ViewEncapsulation: o.ExternalReference = {\n    name: 'ViewEncapsulation',\n    moduleName: CORE,\n\n  };\n  static ChangeDetectionStrategy: o.ExternalReference = {\n    name: 'ChangeDetectionStrategy',\n    moduleName: CORE,\n\n  };\n  static SecurityContext: o.ExternalReference = {\n    name: 'SecurityContext',\n    moduleName: CORE,\n\n  };\n  static LOCALE_ID: o.ExternalReference = {name: 'LOCALE_ID', moduleName: CORE};\n  static TRANSLATIONS_FORMAT: o.ExternalReference = {\n    name: 'TRANSLATIONS_FORMAT',\n    moduleName: CORE,\n\n  };\n  static inlineInterpolate: o.ExternalReference = {\n    name: 'ÉµinlineInterpolate',\n    moduleName: CORE,\n  };\n  static interpolate: o.ExternalReference = {name: 'Éµinterpolate', moduleName: CORE};\n  static EMPTY_ARRAY: o.ExternalReference = {name: 'ÉµEMPTY_ARRAY', moduleName: CORE};\n  static EMPTY_MAP: o.ExternalReference = {name: 'ÉµEMPTY_MAP', moduleName: CORE};\n  static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE};\n  static viewDef: o.ExternalReference = {name: 'Éµvid', moduleName: CORE};\n  static elementDef: o.ExternalReference = {name: 'Éµeld', moduleName: CORE};\n  static anchorDef: o.ExternalReference = {name: 'Éµand', moduleName: CORE};\n  static textDef: o.ExternalReference = {name: 'Éµted', moduleName: CORE};\n  static directiveDef: o.ExternalReference = {name: 'Éµdid', moduleName: CORE};\n  static providerDef: o.ExternalReference = {name: 'Éµprd', moduleName: CORE};\n  static queryDef: o.ExternalReference = {name: 'Éµqud', moduleName: CORE};\n  static pureArrayDef: o.ExternalReference = {name: 'Éµpad', moduleName: CORE};\n  static pureObjectDef: o.ExternalReference = {name: 'Éµpod', moduleName: CORE};\n  static purePipeDef: o.ExternalReference = {name: 'Éµppd', moduleName: CORE};\n  static pipeDef: o.ExternalReference = {name: 'Éµpid', moduleName: CORE};\n  static nodeValue: o.ExternalReference = {name: 'Éµnov', moduleName: CORE};\n  static ngContentDef: o.ExternalReference = {name: 'Éµncd', moduleName: CORE};\n  static unwrapValue: o.ExternalReference = {name: 'Éµunv', moduleName: CORE};\n  static createRendererType2: o.ExternalReference = {name: 'Éµcrt', moduleName: CORE};\n  // type only\n  static RendererType2: o.ExternalReference = {\n    name: 'RendererType2',\n    moduleName: CORE,\n\n  };\n  // type only\n  static ViewDefinition: o.ExternalReference = {\n    name: 'ÉµViewDefinition',\n    moduleName: CORE,\n  };\n  static createComponentFactory: o.ExternalReference = {name: 'Éµccf', moduleName: CORE};\n  static setClassMetadata: o.ExternalReference = {name: 'ÉµsetClassMetadata', moduleName: CORE};\n}\n\nexport function createTokenForReference(reference: any): CompileTokenMetadata {\n  return {identifier: {reference: reference}};\n}\n\nexport function createTokenForExternalReference(\n    reflector: CompileReflector, reference: o.ExternalReference): CompileTokenMetadata {\n  return createTokenForReference(reflector.resolveExternalReference(reference));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\nexport class StaticSymbol {\n  constructor(public filePath: string, public name: string, public members: string[]) {}\n\n  assertNoMembers() {\n    if (this.members.length) {\n      throw new Error(\n          `Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`);\n    }\n  }\n}\n\n/**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\nexport class StaticSymbolCache {\n  private cache = new Map<string, StaticSymbol>();\n\n  get(declarationFile: string, name: string, members?: string[]): StaticSymbol {\n    members = members || [];\n    const memberSuffix = members.length ? `.${ members.join('.')}` : '';\n    const key = `\"${declarationFile}\".${name}${memberSuffix}`;\n    let result = this.cache.get(key);\n    if (!result) {\n      result = new StaticSymbol(declarationFile, name, members);\n      this.cache.set(key, result);\n    }\n    return result;\n  }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol} from './aot/static_symbol';\nimport {ChangeDetectionStrategy, SchemaMetadata, Type, ViewEncapsulation} from './core';\nimport {LifecycleHooks} from './lifecycle_reflector';\nimport {ParseTreeResult as HtmlParseTreeResult} from './ml_parser/parser';\nimport {splitAtColon, stringify} from './util';\n\n// group 0: \"[prop] or (event) or @trigger\"\n// group 1: \"prop\" from \"[prop]\"\n// group 2: \"event\" from \"(event)\"\n// group 3: \"@trigger\" from \"@trigger\"\nconst HOST_REG_EXP = /^(?:(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\)))|(\\@[-\\w]+)$/;\n\nexport function sanitizeIdentifier(name: string): string {\n  return name.replace(/\\W/g, '_');\n}\n\nlet _anonymousTypeIndex = 0;\n\nexport function identifierName(compileIdentifier: CompileIdentifierMetadata | null | undefined):\n    string|null {\n  if (!compileIdentifier || !compileIdentifier.reference) {\n    return null;\n  }\n  const ref = compileIdentifier.reference;\n  if (ref instanceof StaticSymbol) {\n    return ref.name;\n  }\n  if (ref['__anonymousType']) {\n    return ref['__anonymousType'];\n  }\n  let identifier = stringify(ref);\n  if (identifier.indexOf('(') >= 0) {\n    // case: anonymous functions!\n    identifier = `anonymous_${_anonymousTypeIndex++}`;\n    ref['__anonymousType'] = identifier;\n  } else {\n    identifier = sanitizeIdentifier(identifier);\n  }\n  return identifier;\n}\n\nexport function identifierModuleUrl(compileIdentifier: CompileIdentifierMetadata): string {\n  const ref = compileIdentifier.reference;\n  if (ref instanceof StaticSymbol) {\n    return ref.filePath;\n  }\n  // Runtime type\n  return `./${stringify(ref)}`;\n}\n\nexport function viewClassName(compType: any, embeddedTemplateIndex: number): string {\n  return `View_${identifierName({reference: compType})}_${embeddedTemplateIndex}`;\n}\n\nexport function rendererTypeName(compType: any): string {\n  return `RenderType_${identifierName({reference: compType})}`;\n}\n\nexport function hostViewClassName(compType: any): string {\n  return `HostView_${identifierName({reference: compType})}`;\n}\n\nexport function componentFactoryName(compType: any): string {\n  return `${identifierName({reference: compType})}NgFactory`;\n}\n\nexport interface ProxyClass { setDelegate(delegate: any): void; }\n\nexport interface CompileIdentifierMetadata { reference: any; }\n\nexport enum CompileSummaryKind {\n  Pipe,\n  Directive,\n  NgModule,\n  Injectable\n}\n\n/**\n * A CompileSummary is the data needed to use a directive / pipe / module\n * in other modules / components. However, this data is not enough to compile\n * the directive / module itself.\n */\nexport interface CompileTypeSummary {\n  summaryKind: CompileSummaryKind|null;\n  type: CompileTypeMetadata;\n}\n\nexport interface CompileDiDependencyMetadata {\n  isAttribute?: boolean;\n  isSelf?: boolean;\n  isHost?: boolean;\n  isSkipSelf?: boolean;\n  isOptional?: boolean;\n  isValue?: boolean;\n  token?: CompileTokenMetadata;\n  value?: any;\n}\n\nexport interface CompileProviderMetadata {\n  token: CompileTokenMetadata;\n  useClass?: CompileTypeMetadata;\n  useValue?: any;\n  useExisting?: CompileTokenMetadata;\n  useFactory?: CompileFactoryMetadata;\n  deps?: CompileDiDependencyMetadata[];\n  multi?: boolean;\n}\n\nexport interface CompileFactoryMetadata extends CompileIdentifierMetadata {\n  diDeps: CompileDiDependencyMetadata[];\n  reference: any;\n}\n\nexport function tokenName(token: CompileTokenMetadata) {\n  return token.value != null ? sanitizeIdentifier(token.value) : identifierName(token.identifier);\n}\n\nexport function tokenReference(token: CompileTokenMetadata) {\n  if (token.identifier != null) {\n    return token.identifier.reference;\n  } else {\n    return token.value;\n  }\n}\n\nexport interface CompileTokenMetadata {\n  value?: any;\n  identifier?: CompileIdentifierMetadata|CompileTypeMetadata;\n}\n\nexport interface CompileInjectableMetadata {\n  symbol: StaticSymbol;\n  type: CompileTypeMetadata;\n\n  providedIn?: StaticSymbol;\n\n  useValue?: any;\n  useClass?: StaticSymbol;\n  useExisting?: StaticSymbol;\n  useFactory?: StaticSymbol;\n  deps?: any[];\n}\n\n/**\n * Metadata regarding compilation of a type.\n */\nexport interface CompileTypeMetadata extends CompileIdentifierMetadata {\n  diDeps: CompileDiDependencyMetadata[];\n  lifecycleHooks: LifecycleHooks[];\n  reference: any;\n}\n\nexport interface CompileQueryMetadata {\n  selectors: Array<CompileTokenMetadata>;\n  descendants: boolean;\n  first: boolean;\n  propertyName: string;\n  read: CompileTokenMetadata;\n  static?: boolean;\n}\n\n/**\n * Metadata about a stylesheet\n */\nexport class CompileStylesheetMetadata {\n  moduleUrl: string|null;\n  styles: string[];\n  styleUrls: string[];\n  constructor(\n      {moduleUrl, styles,\n       styleUrls}: {moduleUrl?: string, styles?: string[], styleUrls?: string[]} = {}) {\n    this.moduleUrl = moduleUrl || null;\n    this.styles = _normalizeArray(styles);\n    this.styleUrls = _normalizeArray(styleUrls);\n  }\n}\n\n/**\n * Summary Metadata regarding compilation of a template.\n */\nexport interface CompileTemplateSummary {\n  ngContentSelectors: string[];\n  encapsulation: ViewEncapsulation|null;\n  styles: string[];\n  animations: any[]|null;\n}\n\n/**\n * Metadata regarding compilation of a template.\n */\nexport class CompileTemplateMetadata {\n  encapsulation: ViewEncapsulation|null;\n  template: string|null;\n  templateUrl: string|null;\n  htmlAst: HtmlParseTreeResult|null;\n  isInline: boolean;\n  styles: string[];\n  styleUrls: string[];\n  externalStylesheets: CompileStylesheetMetadata[];\n  animations: any[];\n  ngContentSelectors: string[];\n  interpolation: [string, string]|null;\n  preserveWhitespaces: boolean;\n  constructor({encapsulation, template, templateUrl, htmlAst, styles, styleUrls,\n               externalStylesheets, animations, ngContentSelectors, interpolation, isInline,\n               preserveWhitespaces}: {\n    encapsulation: ViewEncapsulation | null,\n    template: string|null,\n    templateUrl: string|null,\n    htmlAst: HtmlParseTreeResult|null,\n    styles: string[],\n    styleUrls: string[],\n    externalStylesheets: CompileStylesheetMetadata[],\n    ngContentSelectors: string[],\n    animations: any[],\n    interpolation: [string, string]|null,\n    isInline: boolean,\n    preserveWhitespaces: boolean\n  }) {\n    this.encapsulation = encapsulation;\n    this.template = template;\n    this.templateUrl = templateUrl;\n    this.htmlAst = htmlAst;\n    this.styles = _normalizeArray(styles);\n    this.styleUrls = _normalizeArray(styleUrls);\n    this.externalStylesheets = _normalizeArray(externalStylesheets);\n    this.animations = animations ? flatten(animations) : [];\n    this.ngContentSelectors = ngContentSelectors || [];\n    if (interpolation && interpolation.length != 2) {\n      throw new Error(`'interpolation' should have a start and an end symbol.`);\n    }\n    this.interpolation = interpolation;\n    this.isInline = isInline;\n    this.preserveWhitespaces = preserveWhitespaces;\n  }\n\n  toSummary(): CompileTemplateSummary {\n    return {\n      ngContentSelectors: this.ngContentSelectors,\n      encapsulation: this.encapsulation,\n      styles: this.styles,\n      animations: this.animations\n    };\n  }\n}\n\nexport interface CompileEntryComponentMetadata {\n  componentType: any;\n  componentFactory: StaticSymbol|object;\n}\n\n// Note: This should only use interfaces as nested data types\n// as we need to be able to serialize this from/to JSON!\nexport interface CompileDirectiveSummary extends CompileTypeSummary {\n  type: CompileTypeMetadata;\n  isComponent: boolean;\n  selector: string|null;\n  exportAs: string|null;\n  inputs: {[key: string]: string};\n  outputs: {[key: string]: string};\n  hostListeners: {[key: string]: string};\n  hostProperties: {[key: string]: string};\n  hostAttributes: {[key: string]: string};\n  providers: CompileProviderMetadata[];\n  viewProviders: CompileProviderMetadata[];\n  queries: CompileQueryMetadata[];\n  guards: {[key: string]: any};\n  viewQueries: CompileQueryMetadata[];\n  entryComponents: CompileEntryComponentMetadata[];\n  changeDetection: ChangeDetectionStrategy|null;\n  template: CompileTemplateSummary|null;\n  componentViewType: StaticSymbol|ProxyClass|null;\n  rendererType: StaticSymbol|object|null;\n  componentFactory: StaticSymbol|object|null;\n}\n\n/**\n * Metadata regarding compilation of a directive.\n */\nexport class CompileDirectiveMetadata {\n  static create({isHost, type, isComponent, selector, exportAs, changeDetection, inputs, outputs,\n                 host, providers, viewProviders, queries, guards, viewQueries, entryComponents,\n                 template, componentViewType, rendererType, componentFactory}: {\n    isHost: boolean,\n    type: CompileTypeMetadata,\n    isComponent: boolean,\n    selector: string|null,\n    exportAs: string|null,\n    changeDetection: ChangeDetectionStrategy|null,\n    inputs: string[],\n    outputs: string[],\n    host: {[key: string]: string},\n    providers: CompileProviderMetadata[],\n    viewProviders: CompileProviderMetadata[],\n    queries: CompileQueryMetadata[],\n    guards: {[key: string]: any};\n    viewQueries: CompileQueryMetadata[],\n    entryComponents: CompileEntryComponentMetadata[],\n    template: CompileTemplateMetadata,\n    componentViewType: StaticSymbol|ProxyClass|null,\n    rendererType: StaticSymbol|object|null,\n    componentFactory: StaticSymbol|object|null,\n  }): CompileDirectiveMetadata {\n    const hostListeners: {[key: string]: string} = {};\n    const hostProperties: {[key: string]: string} = {};\n    const hostAttributes: {[key: string]: string} = {};\n    if (host != null) {\n      Object.keys(host).forEach(key => {\n        const value = host[key];\n        const matches = key.match(HOST_REG_EXP);\n        if (matches === null) {\n          hostAttributes[key] = value;\n        } else if (matches[1] != null) {\n          hostProperties[matches[1]] = value;\n        } else if (matches[2] != null) {\n          hostListeners[matches[2]] = value;\n        }\n      });\n    }\n    const inputsMap: {[key: string]: string} = {};\n    if (inputs != null) {\n      inputs.forEach((bindConfig: string) => {\n        // canonical syntax: `dirProp: elProp`\n        // if there is no `:`, use dirProp = elProp\n        const parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n        inputsMap[parts[0]] = parts[1];\n      });\n    }\n    const outputsMap: {[key: string]: string} = {};\n    if (outputs != null) {\n      outputs.forEach((bindConfig: string) => {\n        // canonical syntax: `dirProp: elProp`\n        // if there is no `:`, use dirProp = elProp\n        const parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n        outputsMap[parts[0]] = parts[1];\n      });\n    }\n\n    return new CompileDirectiveMetadata({\n      isHost,\n      type,\n      isComponent: !!isComponent, selector, exportAs, changeDetection,\n      inputs: inputsMap,\n      outputs: outputsMap,\n      hostListeners,\n      hostProperties,\n      hostAttributes,\n      providers,\n      viewProviders,\n      queries,\n      guards,\n      viewQueries,\n      entryComponents,\n      template,\n      componentViewType,\n      rendererType,\n      componentFactory,\n    });\n  }\n  isHost: boolean;\n  type: CompileTypeMetadata;\n  isComponent: boolean;\n  selector: string|null;\n  exportAs: string|null;\n  changeDetection: ChangeDetectionStrategy|null;\n  inputs: {[key: string]: string};\n  outputs: {[key: string]: string};\n  hostListeners: {[key: string]: string};\n  hostProperties: {[key: string]: string};\n  hostAttributes: {[key: string]: string};\n  providers: CompileProviderMetadata[];\n  viewProviders: CompileProviderMetadata[];\n  queries: CompileQueryMetadata[];\n  guards: {[key: string]: any};\n  viewQueries: CompileQueryMetadata[];\n  entryComponents: CompileEntryComponentMetadata[];\n\n  template: CompileTemplateMetadata|null;\n\n  componentViewType: StaticSymbol|ProxyClass|null;\n  rendererType: StaticSymbol|object|null;\n  componentFactory: StaticSymbol|object|null;\n\n  constructor({isHost,\n               type,\n               isComponent,\n               selector,\n               exportAs,\n               changeDetection,\n               inputs,\n               outputs,\n               hostListeners,\n               hostProperties,\n               hostAttributes,\n               providers,\n               viewProviders,\n               queries,\n               guards,\n               viewQueries,\n               entryComponents,\n               template,\n               componentViewType,\n               rendererType,\n               componentFactory}: {\n    isHost: boolean,\n    type: CompileTypeMetadata,\n    isComponent: boolean,\n    selector: string|null,\n    exportAs: string|null,\n    changeDetection: ChangeDetectionStrategy|null,\n    inputs: {[key: string]: string},\n    outputs: {[key: string]: string},\n    hostListeners: {[key: string]: string},\n    hostProperties: {[key: string]: string},\n    hostAttributes: {[key: string]: string},\n    providers: CompileProviderMetadata[],\n    viewProviders: CompileProviderMetadata[],\n    queries: CompileQueryMetadata[],\n    guards: {[key: string]: any},\n    viewQueries: CompileQueryMetadata[],\n    entryComponents: CompileEntryComponentMetadata[],\n    template: CompileTemplateMetadata|null,\n    componentViewType: StaticSymbol|ProxyClass|null,\n    rendererType: StaticSymbol|object|null,\n    componentFactory: StaticSymbol|object|null,\n  }) {\n    this.isHost = !!isHost;\n    this.type = type;\n    this.isComponent = isComponent;\n    this.selector = selector;\n    this.exportAs = exportAs;\n    this.changeDetection = changeDetection;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.hostListeners = hostListeners;\n    this.hostProperties = hostProperties;\n    this.hostAttributes = hostAttributes;\n    this.providers = _normalizeArray(providers);\n    this.viewProviders = _normalizeArray(viewProviders);\n    this.queries = _normalizeArray(queries);\n    this.guards = guards;\n    this.viewQueries = _normalizeArray(viewQueries);\n    this.entryComponents = _normalizeArray(entryComponents);\n    this.template = template;\n\n    this.componentViewType = componentViewType;\n    this.rendererType = rendererType;\n    this.componentFactory = componentFactory;\n  }\n\n  toSummary(): CompileDirectiveSummary {\n    return {\n      summaryKind: CompileSummaryKind.Directive,\n      type: this.type,\n      isComponent: this.isComponent,\n      selector: this.selector,\n      exportAs: this.exportAs,\n      inputs: this.inputs,\n      outputs: this.outputs,\n      hostListeners: this.hostListeners,\n      hostProperties: this.hostProperties,\n      hostAttributes: this.hostAttributes,\n      providers: this.providers,\n      viewProviders: this.viewProviders,\n      queries: this.queries,\n      guards: this.guards,\n      viewQueries: this.viewQueries,\n      entryComponents: this.entryComponents,\n      changeDetection: this.changeDetection,\n      template: this.template && this.template.toSummary(),\n      componentViewType: this.componentViewType,\n      rendererType: this.rendererType,\n      componentFactory: this.componentFactory\n    };\n  }\n}\n\nexport interface CompilePipeSummary extends CompileTypeSummary {\n  type: CompileTypeMetadata;\n  name: string;\n  pure: boolean;\n}\n\nexport class CompilePipeMetadata {\n  type: CompileTypeMetadata;\n  name: string;\n  pure: boolean;\n\n  constructor({type, name, pure}: {\n    type: CompileTypeMetadata,\n    name: string,\n    pure: boolean,\n  }) {\n    this.type = type;\n    this.name = name;\n    this.pure = !!pure;\n  }\n\n  toSummary(): CompilePipeSummary {\n    return {\n      summaryKind: CompileSummaryKind.Pipe,\n      type: this.type,\n      name: this.name,\n      pure: this.pure\n    };\n  }\n}\n\n// Note: This should only use interfaces as nested data types\n// as we need to be able to serialize this from/to JSON!\nexport interface CompileNgModuleSummary extends CompileTypeSummary {\n  type: CompileTypeMetadata;\n\n  // Note: This is transitive over the exported modules.\n  exportedDirectives: CompileIdentifierMetadata[];\n  // Note: This is transitive over the exported modules.\n  exportedPipes: CompileIdentifierMetadata[];\n\n  // Note: This is transitive.\n  entryComponents: CompileEntryComponentMetadata[];\n  // Note: This is transitive.\n  providers: {provider: CompileProviderMetadata, module: CompileIdentifierMetadata}[];\n  // Note: This is transitive.\n  modules: CompileTypeMetadata[];\n}\n\nexport class CompileShallowModuleMetadata {\n  // TODO(issue/24571): remove '!'.\n  type !: CompileTypeMetadata;\n\n  rawExports: any;\n  rawImports: any;\n  rawProviders: any;\n}\n\n/**\n * Metadata regarding compilation of a module.\n */\nexport class CompileNgModuleMetadata {\n  type: CompileTypeMetadata;\n  declaredDirectives: CompileIdentifierMetadata[];\n  exportedDirectives: CompileIdentifierMetadata[];\n  declaredPipes: CompileIdentifierMetadata[];\n\n  exportedPipes: CompileIdentifierMetadata[];\n  entryComponents: CompileEntryComponentMetadata[];\n  bootstrapComponents: CompileIdentifierMetadata[];\n  providers: CompileProviderMetadata[];\n\n  importedModules: CompileNgModuleSummary[];\n  exportedModules: CompileNgModuleSummary[];\n  schemas: SchemaMetadata[];\n  id: string|null;\n\n  transitiveModule: TransitiveCompileNgModuleMetadata;\n\n  constructor({type, providers, declaredDirectives, exportedDirectives, declaredPipes,\n               exportedPipes, entryComponents, bootstrapComponents, importedModules,\n               exportedModules, schemas, transitiveModule, id}: {\n    type: CompileTypeMetadata,\n    providers: CompileProviderMetadata[],\n    declaredDirectives: CompileIdentifierMetadata[],\n    exportedDirectives: CompileIdentifierMetadata[],\n    declaredPipes: CompileIdentifierMetadata[],\n    exportedPipes: CompileIdentifierMetadata[],\n    entryComponents: CompileEntryComponentMetadata[],\n    bootstrapComponents: CompileIdentifierMetadata[],\n    importedModules: CompileNgModuleSummary[],\n    exportedModules: CompileNgModuleSummary[],\n    transitiveModule: TransitiveCompileNgModuleMetadata,\n    schemas: SchemaMetadata[],\n    id: string|null\n  }) {\n    this.type = type || null;\n    this.declaredDirectives = _normalizeArray(declaredDirectives);\n    this.exportedDirectives = _normalizeArray(exportedDirectives);\n    this.declaredPipes = _normalizeArray(declaredPipes);\n    this.exportedPipes = _normalizeArray(exportedPipes);\n    this.providers = _normalizeArray(providers);\n    this.entryComponents = _normalizeArray(entryComponents);\n    this.bootstrapComponents = _normalizeArray(bootstrapComponents);\n    this.importedModules = _normalizeArray(importedModules);\n    this.exportedModules = _normalizeArray(exportedModules);\n    this.schemas = _normalizeArray(schemas);\n    this.id = id || null;\n    this.transitiveModule = transitiveModule || null;\n  }\n\n  toSummary(): CompileNgModuleSummary {\n    const module = this.transitiveModule !;\n    return {\n      summaryKind: CompileSummaryKind.NgModule,\n      type: this.type,\n      entryComponents: module.entryComponents,\n      providers: module.providers,\n      modules: module.modules,\n      exportedDirectives: module.exportedDirectives,\n      exportedPipes: module.exportedPipes\n    };\n  }\n}\n\nexport class TransitiveCompileNgModuleMetadata {\n  directivesSet = new Set<any>();\n  directives: CompileIdentifierMetadata[] = [];\n  exportedDirectivesSet = new Set<any>();\n  exportedDirectives: CompileIdentifierMetadata[] = [];\n  pipesSet = new Set<any>();\n  pipes: CompileIdentifierMetadata[] = [];\n  exportedPipesSet = new Set<any>();\n  exportedPipes: CompileIdentifierMetadata[] = [];\n  modulesSet = new Set<any>();\n  modules: CompileTypeMetadata[] = [];\n  entryComponentsSet = new Set<any>();\n  entryComponents: CompileEntryComponentMetadata[] = [];\n\n  providers: {provider: CompileProviderMetadata, module: CompileIdentifierMetadata}[] = [];\n\n  addProvider(provider: CompileProviderMetadata, module: CompileIdentifierMetadata) {\n    this.providers.push({provider: provider, module: module});\n  }\n\n  addDirective(id: CompileIdentifierMetadata) {\n    if (!this.directivesSet.has(id.reference)) {\n      this.directivesSet.add(id.reference);\n      this.directives.push(id);\n    }\n  }\n  addExportedDirective(id: CompileIdentifierMetadata) {\n    if (!this.exportedDirectivesSet.has(id.reference)) {\n      this.exportedDirectivesSet.add(id.reference);\n      this.exportedDirectives.push(id);\n    }\n  }\n  addPipe(id: CompileIdentifierMetadata) {\n    if (!this.pipesSet.has(id.reference)) {\n      this.pipesSet.add(id.reference);\n      this.pipes.push(id);\n    }\n  }\n  addExportedPipe(id: CompileIdentifierMetadata) {\n    if (!this.exportedPipesSet.has(id.reference)) {\n      this.exportedPipesSet.add(id.reference);\n      this.exportedPipes.push(id);\n    }\n  }\n  addModule(id: CompileTypeMetadata) {\n    if (!this.modulesSet.has(id.reference)) {\n      this.modulesSet.add(id.reference);\n      this.modules.push(id);\n    }\n  }\n  addEntryComponent(ec: CompileEntryComponentMetadata) {\n    if (!this.entryComponentsSet.has(ec.componentType)) {\n      this.entryComponentsSet.add(ec.componentType);\n      this.entryComponents.push(ec);\n    }\n  }\n}\n\nfunction _normalizeArray(obj: any[] | undefined | null): any[] {\n  return obj || [];\n}\n\nexport class ProviderMeta {\n  token: any;\n  useClass: Type|null;\n  useValue: any;\n  useExisting: any;\n  useFactory: Function|null;\n  dependencies: Object[]|null;\n  multi: boolean;\n\n  constructor(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: {\n    useClass?: Type,\n    useValue?: any,\n    useExisting?: any,\n    useFactory?: Function|null,\n    deps?: Object[]|null,\n    multi?: boolean\n  }) {\n    this.token = token;\n    this.useClass = useClass || null;\n    this.useValue = useValue;\n    this.useExisting = useExisting;\n    this.useFactory = useFactory || null;\n    this.dependencies = deps || null;\n    this.multi = !!multi;\n  }\n}\n\nexport function flatten<T>(list: Array<T|T[]>): T[] {\n  return list.reduce((flat: any[], item: T | T[]): T[] => {\n    const flatItem = Array.isArray(item) ? flatten(item) : item;\n    return (<T[]>flat).concat(flatItem);\n  }, []);\n}\n\nfunction jitSourceUrl(url: string) {\n  // Note: We need 3 \"/\" so that ng shows up as a separate domain\n  // in the chrome dev tools.\n  return url.replace(/(\\w+:\\/\\/[\\w:-]+)?(\\/+)?/, 'ng:///');\n}\n\nexport function templateSourceUrl(\n    ngModuleType: CompileIdentifierMetadata, compMeta: {type: CompileIdentifierMetadata},\n    templateMeta: {isInline: boolean, templateUrl: string | null}) {\n  let url: string;\n  if (templateMeta.isInline) {\n    if (compMeta.type.reference instanceof StaticSymbol) {\n      // Note: a .ts file might contain multiple components with inline templates,\n      // so we need to give them unique urls, as these will be used for sourcemaps.\n      url = `${compMeta.type.reference.filePath}.${compMeta.type.reference.name}.html`;\n    } else {\n      url = `${identifierName(ngModuleType)}/${identifierName(compMeta.type)}.html`;\n    }\n  } else {\n    url = templateMeta.templateUrl !;\n  }\n  return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);\n}\n\nexport function sharedStylesheetJitUrl(meta: CompileStylesheetMetadata, id: number) {\n  const pathParts = meta.moduleUrl !.split(/\\/\\\\/g);\n  const baseName = pathParts[pathParts.length - 1];\n  return jitSourceUrl(`css/${id}${baseName}.ngstyle.js`);\n}\n\nexport function ngModuleJitUrl(moduleMeta: CompileNgModuleMetadata): string {\n  return jitSourceUrl(`${identifierName(moduleMeta.type)}/module.ngfactory.js`);\n}\n\nexport function templateJitUrl(\n    ngModuleType: CompileIdentifierMetadata, compMeta: CompileDirectiveMetadata): string {\n  return jitSourceUrl(\n      `${identifierName(ngModuleType)}/${identifierName(compMeta.type)}.ngfactory.js`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as o from '../output/output_ast';\n\nconst CORE = '@angular/core';\n\nexport class Identifiers {\n  /* Methods */\n  static NEW_METHOD = 'factory';\n  static TRANSFORM_METHOD = 'transform';\n  static PATCH_DEPS = 'patchedDeps';\n\n  /* Instructions */\n  static namespaceHTML: o.ExternalReference = {name: 'ÉµÉµnamespaceHTML', moduleName: CORE};\n\n  static namespaceMathML: o.ExternalReference = {name: 'ÉµÉµnamespaceMathML', moduleName: CORE};\n\n  static namespaceSVG: o.ExternalReference = {name: 'ÉµÉµnamespaceSVG', moduleName: CORE};\n\n  static element: o.ExternalReference = {name: 'ÉµÉµelement', moduleName: CORE};\n\n  static elementStart: o.ExternalReference = {name: 'ÉµÉµelementStart', moduleName: CORE};\n\n  static elementEnd: o.ExternalReference = {name: 'ÉµÉµelementEnd', moduleName: CORE};\n\n  static select: o.ExternalReference = {name: 'ÉµÉµselect', moduleName: CORE};\n\n  static updateSyntheticHostBinding:\n      o.ExternalReference = {name: 'ÉµÉµupdateSyntheticHostBinding', moduleName: CORE};\n\n  static componentHostSyntheticListener:\n      o.ExternalReference = {name: 'ÉµÉµcomponentHostSyntheticListener', moduleName: CORE};\n\n  static attribute: o.ExternalReference = {name: 'ÉµÉµattribute', moduleName: CORE};\n\n  static attributeInterpolate1:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate1', moduleName: CORE};\n  static attributeInterpolate2:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate2', moduleName: CORE};\n  static attributeInterpolate3:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate3', moduleName: CORE};\n  static attributeInterpolate4:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate4', moduleName: CORE};\n  static attributeInterpolate5:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate5', moduleName: CORE};\n  static attributeInterpolate6:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate6', moduleName: CORE};\n  static attributeInterpolate7:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate7', moduleName: CORE};\n  static attributeInterpolate8:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolate8', moduleName: CORE};\n  static attributeInterpolateV:\n      o.ExternalReference = {name: 'ÉµÉµattributeInterpolateV', moduleName: CORE};\n\n  static classProp: o.ExternalReference = {name: 'ÉµÉµclassProp', moduleName: CORE};\n\n  static elementContainerStart:\n      o.ExternalReference = {name: 'ÉµÉµelementContainerStart', moduleName: CORE};\n\n  static elementContainerEnd:\n      o.ExternalReference = {name: 'ÉµÉµelementContainerEnd', moduleName: CORE};\n\n  static elementContainer: o.ExternalReference = {name: 'ÉµÉµelementContainer', moduleName: CORE};\n\n  static styling: o.ExternalReference = {name: 'ÉµÉµstyling', moduleName: CORE};\n\n  static styleMap: o.ExternalReference = {name: 'ÉµÉµstyleMap', moduleName: CORE};\n\n  static classMap: o.ExternalReference = {name: 'ÉµÉµclassMap', moduleName: CORE};\n\n  static classMapInterpolate1:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate1', moduleName: CORE};\n  static classMapInterpolate2:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate2', moduleName: CORE};\n  static classMapInterpolate3:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate3', moduleName: CORE};\n  static classMapInterpolate4:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate4', moduleName: CORE};\n  static classMapInterpolate5:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate5', moduleName: CORE};\n  static classMapInterpolate6:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate6', moduleName: CORE};\n  static classMapInterpolate7:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate7', moduleName: CORE};\n  static classMapInterpolate8:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolate8', moduleName: CORE};\n  static classMapInterpolateV:\n      o.ExternalReference = {name: 'ÉµÉµclassMapInterpolateV', moduleName: CORE};\n\n  static styleProp: o.ExternalReference = {name: 'ÉµÉµstyleProp', moduleName: CORE};\n\n  static stylePropInterpolate1:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate1', moduleName: CORE};\n  static stylePropInterpolate2:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate2', moduleName: CORE};\n  static stylePropInterpolate3:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate3', moduleName: CORE};\n  static stylePropInterpolate4:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate4', moduleName: CORE};\n  static stylePropInterpolate5:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate5', moduleName: CORE};\n  static stylePropInterpolate6:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate6', moduleName: CORE};\n  static stylePropInterpolate7:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate7', moduleName: CORE};\n  static stylePropInterpolate8:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolate8', moduleName: CORE};\n  static stylePropInterpolateV:\n      o.ExternalReference = {name: 'ÉµÉµstylePropInterpolateV', moduleName: CORE};\n\n  static stylingApply: o.ExternalReference = {name: 'ÉµÉµstylingApply', moduleName: CORE};\n\n  static styleSanitizer: o.ExternalReference = {name: 'ÉµÉµstyleSanitizer', moduleName: CORE};\n\n  static elementHostAttrs: o.ExternalReference = {name: 'ÉµÉµelementHostAttrs', moduleName: CORE};\n\n  static containerCreate: o.ExternalReference = {name: 'ÉµÉµcontainer', moduleName: CORE};\n\n  static nextContext: o.ExternalReference = {name: 'ÉµÉµnextContext', moduleName: CORE};\n\n  static templateCreate: o.ExternalReference = {name: 'ÉµÉµtemplate', moduleName: CORE};\n\n  static text: o.ExternalReference = {name: 'ÉµÉµtext', moduleName: CORE};\n\n  static textBinding: o.ExternalReference = {name: 'ÉµÉµtextBinding', moduleName: CORE};\n\n  static enableBindings: o.ExternalReference = {name: 'ÉµÉµenableBindings', moduleName: CORE};\n\n  static disableBindings: o.ExternalReference = {name: 'ÉµÉµdisableBindings', moduleName: CORE};\n\n  static allocHostVars: o.ExternalReference = {name: 'ÉµÉµallocHostVars', moduleName: CORE};\n\n  static getCurrentView: o.ExternalReference = {name: 'ÉµÉµgetCurrentView', moduleName: CORE};\n\n  static textInterpolate: o.ExternalReference = {name: 'ÉµÉµtextInterpolate', moduleName: CORE};\n  static textInterpolate1: o.ExternalReference = {name: 'ÉµÉµtextInterpolate1', moduleName: CORE};\n  static textInterpolate2: o.ExternalReference = {name: 'ÉµÉµtextInterpolate2', moduleName: CORE};\n  static textInterpolate3: o.ExternalReference = {name: 'ÉµÉµtextInterpolate3', moduleName: CORE};\n  static textInterpolate4: o.ExternalReference = {name: 'ÉµÉµtextInterpolate4', moduleName: CORE};\n  static textInterpolate5: o.ExternalReference = {name: 'ÉµÉµtextInterpolate5', moduleName: CORE};\n  static textInterpolate6: o.ExternalReference = {name: 'ÉµÉµtextInterpolate6', moduleName: CORE};\n  static textInterpolate7: o.ExternalReference = {name: 'ÉµÉµtextInterpolate7', moduleName: CORE};\n  static textInterpolate8: o.ExternalReference = {name: 'ÉµÉµtextInterpolate8', moduleName: CORE};\n  static textInterpolateV: o.ExternalReference = {name: 'ÉµÉµtextInterpolateV', moduleName: CORE};\n\n  static restoreView: o.ExternalReference = {name: 'ÉµÉµrestoreView', moduleName: CORE};\n\n  static pureFunction0: o.ExternalReference = {name: 'ÉµÉµpureFunction0', moduleName: CORE};\n  static pureFunction1: o.ExternalReference = {name: 'ÉµÉµpureFunction1', moduleName: CORE};\n  static pureFunction2: o.ExternalReference = {name: 'ÉµÉµpureFunction2', moduleName: CORE};\n  static pureFunction3: o.ExternalReference = {name: 'ÉµÉµpureFunction3', moduleName: CORE};\n  static pureFunction4: o.ExternalReference = {name: 'ÉµÉµpureFunction4', moduleName: CORE};\n  static pureFunction5: o.ExternalReference = {name: 'ÉµÉµpureFunction5', moduleName: CORE};\n  static pureFunction6: o.ExternalReference = {name: 'ÉµÉµpureFunction6', moduleName: CORE};\n  static pureFunction7: o.ExternalReference = {name: 'ÉµÉµpureFunction7', moduleName: CORE};\n  static pureFunction8: o.ExternalReference = {name: 'ÉµÉµpureFunction8', moduleName: CORE};\n  static pureFunctionV: o.ExternalReference = {name: 'ÉµÉµpureFunctionV', moduleName: CORE};\n\n  static pipeBind1: o.ExternalReference = {name: 'ÉµÉµpipeBind1', moduleName: CORE};\n  static pipeBind2: o.ExternalReference = {name: 'ÉµÉµpipeBind2', moduleName: CORE};\n  static pipeBind3: o.ExternalReference = {name: 'ÉµÉµpipeBind3', moduleName: CORE};\n  static pipeBind4: o.ExternalReference = {name: 'ÉµÉµpipeBind4', moduleName: CORE};\n  static pipeBindV: o.ExternalReference = {name: 'ÉµÉµpipeBindV', moduleName: CORE};\n\n  static hostProperty: o.ExternalReference = {name: 'ÉµÉµhostProperty', moduleName: CORE};\n\n  static property: o.ExternalReference = {name: 'ÉµÉµproperty', moduleName: CORE};\n\n  static propertyInterpolate:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate', moduleName: CORE};\n  static propertyInterpolate1:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate1', moduleName: CORE};\n  static propertyInterpolate2:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate2', moduleName: CORE};\n  static propertyInterpolate3:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate3', moduleName: CORE};\n  static propertyInterpolate4:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate4', moduleName: CORE};\n  static propertyInterpolate5:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate5', moduleName: CORE};\n  static propertyInterpolate6:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate6', moduleName: CORE};\n  static propertyInterpolate7:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate7', moduleName: CORE};\n  static propertyInterpolate8:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolate8', moduleName: CORE};\n  static propertyInterpolateV:\n      o.ExternalReference = {name: 'ÉµÉµpropertyInterpolateV', moduleName: CORE};\n\n  static i18n: o.ExternalReference = {name: 'ÉµÉµi18n', moduleName: CORE};\n  static i18nAttributes: o.ExternalReference = {name: 'ÉµÉµi18nAttributes', moduleName: CORE};\n  static i18nExp: o.ExternalReference = {name: 'ÉµÉµi18nExp', moduleName: CORE};\n  static i18nStart: o.ExternalReference = {name: 'ÉµÉµi18nStart', moduleName: CORE};\n  static i18nEnd: o.ExternalReference = {name: 'ÉµÉµi18nEnd', moduleName: CORE};\n  static i18nApply: o.ExternalReference = {name: 'ÉµÉµi18nApply', moduleName: CORE};\n  static i18nPostprocess: o.ExternalReference = {name: 'ÉµÉµi18nPostprocess', moduleName: CORE};\n  static i18nLocalize: o.ExternalReference = {name: 'ÉµÉµi18nLocalize', moduleName: CORE};\n\n  static load: o.ExternalReference = {name: 'ÉµÉµload', moduleName: CORE};\n\n  static pipe: o.ExternalReference = {name: 'ÉµÉµpipe', moduleName: CORE};\n\n  static projection: o.ExternalReference = {name: 'ÉµÉµprojection', moduleName: CORE};\n  static projectionDef: o.ExternalReference = {name: 'ÉµÉµprojectionDef', moduleName: CORE};\n\n  static reference: o.ExternalReference = {name: 'ÉµÉµreference', moduleName: CORE};\n\n  static inject: o.ExternalReference = {name: 'ÉµÉµinject', moduleName: CORE};\n\n  static injectAttribute: o.ExternalReference = {name: 'ÉµÉµinjectAttribute', moduleName: CORE};\n\n  static injectPipeChangeDetectorRef:\n      o.ExternalReference = {name: 'ÉµÉµinjectPipeChangeDetectorRef', moduleName: CORE};\n\n  static directiveInject: o.ExternalReference = {name: 'ÉµÉµdirectiveInject', moduleName: CORE};\n\n  static templateRefExtractor:\n      o.ExternalReference = {name: 'ÉµÉµtemplateRefExtractor', moduleName: CORE};\n\n  static resolveWindow: o.ExternalReference = {name: 'ÉµÉµresolveWindow', moduleName: CORE};\n  static resolveDocument: o.ExternalReference = {name: 'ÉµÉµresolveDocument', moduleName: CORE};\n  static resolveBody: o.ExternalReference = {name: 'ÉµÉµresolveBody', moduleName: CORE};\n\n  static defineBase: o.ExternalReference = {name: 'ÉµÉµdefineBase', moduleName: CORE};\n\n  static BaseDef: o.ExternalReference = {\n    name: 'ÉµÉµBaseDef',\n    moduleName: CORE,\n  };\n\n  static defineComponent: o.ExternalReference = {name: 'ÉµÉµdefineComponent', moduleName: CORE};\n\n  static setComponentScope: o.ExternalReference = {name: 'ÉµÉµsetComponentScope', moduleName: CORE};\n\n  static ComponentDefWithMeta: o.ExternalReference = {\n    name: 'ÉµÉµComponentDefWithMeta',\n    moduleName: CORE,\n  };\n\n  static defineDirective: o.ExternalReference = {\n    name: 'ÉµÉµdefineDirective',\n    moduleName: CORE,\n  };\n\n  static DirectiveDefWithMeta: o.ExternalReference = {\n    name: 'ÉµÉµDirectiveDefWithMeta',\n    moduleName: CORE,\n  };\n\n  static InjectorDef: o.ExternalReference = {\n    name: 'ÉµÉµInjectorDef',\n    moduleName: CORE,\n  };\n\n  static defineInjector: o.ExternalReference = {\n    name: 'ÉµÉµdefineInjector',\n    moduleName: CORE,\n  };\n\n  static NgModuleDefWithMeta: o.ExternalReference = {\n    name: 'ÉµÉµNgModuleDefWithMeta',\n    moduleName: CORE,\n  };\n\n  static defineNgModule: o.ExternalReference = {name: 'ÉµÉµdefineNgModule', moduleName: CORE};\n  static setNgModuleScope: o.ExternalReference = {name: 'ÉµÉµsetNgModuleScope', moduleName: CORE};\n\n  static PipeDefWithMeta: o.ExternalReference = {name: 'ÉµÉµPipeDefWithMeta', moduleName: CORE};\n\n  static definePipe: o.ExternalReference = {name: 'ÉµÉµdefinePipe', moduleName: CORE};\n\n  static queryRefresh: o.ExternalReference = {name: 'ÉµÉµqueryRefresh', moduleName: CORE};\n  static viewQuery: o.ExternalReference = {name: 'ÉµÉµviewQuery', moduleName: CORE};\n  static staticViewQuery: o.ExternalReference = {name: 'ÉµÉµstaticViewQuery', moduleName: CORE};\n  static staticContentQuery: o.ExternalReference = {name: 'ÉµÉµstaticContentQuery', moduleName: CORE};\n  static loadViewQuery: o.ExternalReference = {name: 'ÉµÉµloadViewQuery', moduleName: CORE};\n  static contentQuery: o.ExternalReference = {name: 'ÉµÉµcontentQuery', moduleName: CORE};\n  static loadContentQuery: o.ExternalReference = {name: 'ÉµÉµloadContentQuery', moduleName: CORE};\n\n  static NgOnChangesFeature: o.ExternalReference = {name: 'ÉµÉµNgOnChangesFeature', moduleName: CORE};\n\n  static InheritDefinitionFeature:\n      o.ExternalReference = {name: 'ÉµÉµInheritDefinitionFeature', moduleName: CORE};\n\n  static ProvidersFeature: o.ExternalReference = {name: 'ÉµÉµProvidersFeature', moduleName: CORE};\n\n  static listener: o.ExternalReference = {name: 'ÉµÉµlistener', moduleName: CORE};\n\n  static getFactoryOf: o.ExternalReference = {\n    name: 'ÉµÉµgetFactoryOf',\n    moduleName: CORE,\n  };\n\n  static getInheritedFactory: o.ExternalReference = {\n    name: 'ÉµÉµgetInheritedFactory',\n    moduleName: CORE,\n  };\n\n  // sanitization-related functions\n  static sanitizeHtml: o.ExternalReference = {name: 'ÉµÉµsanitizeHtml', moduleName: CORE};\n  static sanitizeStyle: o.ExternalReference = {name: 'ÉµÉµsanitizeStyle', moduleName: CORE};\n  static defaultStyleSanitizer:\n      o.ExternalReference = {name: 'ÉµÉµdefaultStyleSanitizer', moduleName: CORE};\n  static sanitizeResourceUrl:\n      o.ExternalReference = {name: 'ÉµÉµsanitizeResourceUrl', moduleName: CORE};\n  static sanitizeScript: o.ExternalReference = {name: 'ÉµÉµsanitizeScript', moduleName: CORE};\n  static sanitizeUrl: o.ExternalReference = {name: 'ÉµÉµsanitizeUrl', moduleName: CORE};\n  static sanitizeUrlOrResourceUrl:\n      o.ExternalReference = {name: 'ÉµÉµsanitizeUrlOrResourceUrl', moduleName: CORE};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const $EOF = 0;\nexport const $BSPACE = 8;\nexport const $TAB = 9;\nexport const $LF = 10;\nexport const $VTAB = 11;\nexport const $FF = 12;\nexport const $CR = 13;\nexport const $SPACE = 32;\nexport const $BANG = 33;\nexport const $DQ = 34;\nexport const $HASH = 35;\nexport const $$ = 36;\nexport const $PERCENT = 37;\nexport const $AMPERSAND = 38;\nexport const $SQ = 39;\nexport const $LPAREN = 40;\nexport const $RPAREN = 41;\nexport const $STAR = 42;\nexport const $PLUS = 43;\nexport const $COMMA = 44;\nexport const $MINUS = 45;\nexport const $PERIOD = 46;\nexport const $SLASH = 47;\nexport const $COLON = 58;\nexport const $SEMICOLON = 59;\nexport const $LT = 60;\nexport const $EQ = 61;\nexport const $GT = 62;\nexport const $QUESTION = 63;\n\nexport const $0 = 48;\nexport const $7 = 55;\nexport const $9 = 57;\n\nexport const $A = 65;\nexport const $E = 69;\nexport const $F = 70;\nexport const $X = 88;\nexport const $Z = 90;\n\nexport const $LBRACKET = 91;\nexport const $BACKSLASH = 92;\nexport const $RBRACKET = 93;\nexport const $CARET = 94;\nexport const $_ = 95;\n\nexport const $a = 97;\nexport const $b = 98;\nexport const $e = 101;\nexport const $f = 102;\nexport const $n = 110;\nexport const $r = 114;\nexport const $t = 116;\nexport const $u = 117;\nexport const $v = 118;\nexport const $x = 120;\nexport const $z = 122;\n\nexport const $LBRACE = 123;\nexport const $BAR = 124;\nexport const $RBRACE = 125;\nexport const $NBSP = 160;\n\nexport const $PIPE = 124;\nexport const $TILDA = 126;\nexport const $AT = 64;\n\nexport const $BT = 96;\n\nexport function isWhitespace(code: number): boolean {\n  return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\n\nexport function isDigit(code: number): boolean {\n  return $0 <= code && code <= $9;\n}\n\nexport function isAsciiLetter(code: number): boolean {\n  return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\n\nexport function isAsciiHexDigit(code: number): boolean {\n  return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\n\nexport function isNewLine(code: number): boolean {\n  return code === $LF || code === $CR;\n}\n\nexport function isOctalDigit(code: number): boolean {\n  return $0 <= code && code <= $7;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as chars from './chars';\nimport {CompileIdentifierMetadata, identifierModuleUrl, identifierName} from './compile_metadata';\nimport {error} from './util';\n\nexport class ParseLocation {\n  constructor(\n      public file: ParseSourceFile, public offset: number, public line: number,\n      public col: number) {}\n\n  toString(): string {\n    return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;\n  }\n\n  moveBy(delta: number): ParseLocation {\n    const source = this.file.content;\n    const len = source.length;\n    let offset = this.offset;\n    let line = this.line;\n    let col = this.col;\n    while (offset > 0 && delta < 0) {\n      offset--;\n      delta++;\n      const ch = source.charCodeAt(offset);\n      if (ch == chars.$LF) {\n        line--;\n        const priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode(chars.$LF));\n        col = priorLine > 0 ? offset - priorLine : offset;\n      } else {\n        col--;\n      }\n    }\n    while (offset < len && delta > 0) {\n      const ch = source.charCodeAt(offset);\n      offset++;\n      delta--;\n      if (ch == chars.$LF) {\n        line++;\n        col = 0;\n      } else {\n        col++;\n      }\n    }\n    return new ParseLocation(this.file, offset, line, col);\n  }\n\n  // Return the source around the location\n  // Up to `maxChars` or `maxLines` on each side of the location\n  getContext(maxChars: number, maxLines: number): {before: string, after: string}|null {\n    const content = this.file.content;\n    let startOffset = this.offset;\n\n    if (startOffset != null) {\n      if (startOffset > content.length - 1) {\n        startOffset = content.length - 1;\n      }\n      let endOffset = startOffset;\n      let ctxChars = 0;\n      let ctxLines = 0;\n\n      while (ctxChars < maxChars && startOffset > 0) {\n        startOffset--;\n        ctxChars++;\n        if (content[startOffset] == '\\n') {\n          if (++ctxLines == maxLines) {\n            break;\n          }\n        }\n      }\n\n      ctxChars = 0;\n      ctxLines = 0;\n      while (ctxChars < maxChars && endOffset < content.length - 1) {\n        endOffset++;\n        ctxChars++;\n        if (content[endOffset] == '\\n') {\n          if (++ctxLines == maxLines) {\n            break;\n          }\n        }\n      }\n\n      return {\n        before: content.substring(startOffset, this.offset),\n        after: content.substring(this.offset, endOffset + 1),\n      };\n    }\n\n    return null;\n  }\n}\n\nexport class ParseSourceFile {\n  constructor(public content: string, public url: string) {}\n}\n\nexport class ParseSourceSpan {\n  constructor(\n      public start: ParseLocation, public end: ParseLocation, public details: string|null = null) {}\n\n  toString(): string {\n    return this.start.file.content.substring(this.start.offset, this.end.offset);\n  }\n}\n\nexport const EMPTY_PARSE_LOCATION = new ParseLocation(new ParseSourceFile('', ''), 0, 0, 0);\nexport const EMPTY_SOURCE_SPAN = new ParseSourceSpan(EMPTY_PARSE_LOCATION, EMPTY_PARSE_LOCATION);\n\nexport enum ParseErrorLevel {\n  WARNING,\n  ERROR,\n}\n\nexport class ParseError {\n  constructor(\n      public span: ParseSourceSpan, public msg: string,\n      public level: ParseErrorLevel = ParseErrorLevel.ERROR) {}\n\n  contextualMessage(): string {\n    const ctx = this.span.start.getContext(100, 3);\n    return ctx ? `${this.msg} (\"${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}\")` :\n                 this.msg;\n  }\n\n  toString(): string {\n    const details = this.span.details ? `, ${this.span.details}` : '';\n    return `${this.contextualMessage()}: ${this.span.start}${details}`;\n  }\n}\n\nexport function typeSourceSpan(kind: string, type: CompileIdentifierMetadata): ParseSourceSpan {\n  const moduleUrl = identifierModuleUrl(type);\n  const sourceFileName = moduleUrl != null ? `in ${kind} ${identifierName(type)} in ${moduleUrl}` :\n                                             `in ${kind} ${identifierName(type)}`;\n  const sourceFile = new ParseSourceFile('', sourceFileName);\n  return new ParseSourceSpan(\n      new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n\n/**\n * Generates Source Span object for a given R3 Type for JIT mode.\n *\n * @param kind Component or Directive.\n * @param typeName name of the Component or Directive.\n * @param sourceUrl reference to Component or Directive source.\n * @returns instance of ParseSourceSpan that represent a given Component or Directive.\n */\nexport function r3JitTypeSourceSpan(\n    kind: string, typeName: string, sourceUrl: string): ParseSourceSpan {\n  const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`;\n  const sourceFile = new ParseSourceFile('', sourceFileName);\n  return new ParseSourceSpan(\n      new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SecurityContext} from '../core';\nimport {AST, BindingType, BoundElementProperty, ParsedEvent, ParsedEventType} from '../expression_parser/ast';\nimport {AST as I18nAST} from '../i18n/i18n_ast';\nimport {ParseSourceSpan} from '../parse_util';\n\nexport interface Node {\n  sourceSpan: ParseSourceSpan;\n  visit<Result>(visitor: Visitor<Result>): Result;\n}\n\nexport class Text implements Node {\n  constructor(public value: string, public sourceSpan: ParseSourceSpan) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitText(this); }\n}\n\nexport class BoundText implements Node {\n  constructor(public value: AST, public sourceSpan: ParseSourceSpan, public i18n?: I18nAST) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitBoundText(this); }\n}\n\nexport class TextAttribute implements Node {\n  constructor(\n      public name: string, public value: string, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan, public i18n?: I18nAST) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitTextAttribute(this); }\n}\n\nexport class BoundAttribute implements Node {\n  constructor(\n      public name: string, public type: BindingType, public securityContext: SecurityContext,\n      public value: AST, public unit: string|null, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan, public i18n?: I18nAST) {}\n\n  static fromBoundElementProperty(prop: BoundElementProperty, i18n?: I18nAST) {\n    return new BoundAttribute(\n        prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan,\n        prop.valueSpan, i18n);\n  }\n\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitBoundAttribute(this); }\n}\n\nexport class BoundEvent implements Node {\n  constructor(\n      public name: string, public type: ParsedEventType, public handler: AST,\n      public target: string|null, public phase: string|null, public sourceSpan: ParseSourceSpan,\n      public handlerSpan: ParseSourceSpan) {}\n\n  static fromParsedEvent(event: ParsedEvent) {\n    const target: string|null = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;\n    const phase: string|null =\n        event.type === ParsedEventType.Animation ? event.targetOrPhase : null;\n    return new BoundEvent(\n        event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan);\n  }\n\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitBoundEvent(this); }\n}\n\nexport class Element implements Node {\n  constructor(\n      public name: string, public attributes: TextAttribute[], public inputs: BoundAttribute[],\n      public outputs: BoundEvent[], public children: Node[], public references: Reference[],\n      public sourceSpan: ParseSourceSpan, public startSourceSpan: ParseSourceSpan|null,\n      public endSourceSpan: ParseSourceSpan|null, public i18n?: I18nAST) {\n    // If the element is empty then the source span should include any closing tag\n    if (children.length === 0 && startSourceSpan && endSourceSpan) {\n      this.sourceSpan = new ParseSourceSpan(sourceSpan.start, endSourceSpan.end);\n    }\n  }\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitElement(this); }\n}\n\nexport class Template implements Node {\n  constructor(\n      public tagName: string, public attributes: TextAttribute[], public inputs: BoundAttribute[],\n      public outputs: BoundEvent[], public templateAttrs: (BoundAttribute|TextAttribute)[],\n      public children: Node[], public references: Reference[], public variables: Variable[],\n      public sourceSpan: ParseSourceSpan, public startSourceSpan: ParseSourceSpan|null,\n      public endSourceSpan: ParseSourceSpan|null, public i18n?: I18nAST) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitTemplate(this); }\n}\n\nexport class Content implements Node {\n  constructor(\n      public selector: string, public attributes: TextAttribute[],\n      public sourceSpan: ParseSourceSpan, public i18n?: I18nAST) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitContent(this); }\n}\n\nexport class Variable implements Node {\n  constructor(\n      public name: string, public value: string, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitVariable(this); }\n}\n\nexport class Reference implements Node {\n  constructor(\n      public name: string, public value: string, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitReference(this); }\n}\n\nexport class Icu implements Node {\n  constructor(\n      public vars: {[name: string]: BoundText},\n      public placeholders: {[name: string]: Text | BoundText}, public sourceSpan: ParseSourceSpan,\n      public i18n?: I18nAST) {}\n  visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitIcu(this); }\n}\n\nexport interface Visitor<Result = any> {\n  // Returning a truthy value from `visit()` will prevent `visitAll()` from the call to the typed\n  // method and result returned will become the result included in `visitAll()`s result array.\n  visit?(node: Node): Result;\n\n  visitElement(element: Element): Result;\n  visitTemplate(template: Template): Result;\n  visitContent(content: Content): Result;\n  visitVariable(variable: Variable): Result;\n  visitReference(reference: Reference): Result;\n  visitTextAttribute(attribute: TextAttribute): Result;\n  visitBoundAttribute(attribute: BoundAttribute): Result;\n  visitBoundEvent(attribute: BoundEvent): Result;\n  visitText(text: Text): Result;\n  visitBoundText(text: BoundText): Result;\n  visitIcu(icu: Icu): Result;\n}\n\nexport class NullVisitor implements Visitor<void> {\n  visitElement(element: Element): void {}\n  visitTemplate(template: Template): void {}\n  visitContent(content: Content): void {}\n  visitVariable(variable: Variable): void {}\n  visitReference(reference: Reference): void {}\n  visitTextAttribute(attribute: TextAttribute): void {}\n  visitBoundAttribute(attribute: BoundAttribute): void {}\n  visitBoundEvent(attribute: BoundEvent): void {}\n  visitText(text: Text): void {}\n  visitBoundText(text: BoundText): void {}\n  visitIcu(icu: Icu): void {}\n}\n\nexport class RecursiveVisitor implements Visitor<void> {\n  visitElement(element: Element): void {\n    visitAll(this, element.attributes);\n    visitAll(this, element.children);\n    visitAll(this, element.references);\n  }\n  visitTemplate(template: Template): void {\n    visitAll(this, template.attributes);\n    visitAll(this, template.children);\n    visitAll(this, template.references);\n    visitAll(this, template.variables);\n  }\n  visitContent(content: Content): void {}\n  visitVariable(variable: Variable): void {}\n  visitReference(reference: Reference): void {}\n  visitTextAttribute(attribute: TextAttribute): void {}\n  visitBoundAttribute(attribute: BoundAttribute): void {}\n  visitBoundEvent(attribute: BoundEvent): void {}\n  visitText(text: Text): void {}\n  visitBoundText(text: BoundText): void {}\n  visitIcu(icu: Icu): void {}\n}\n\nexport class TransformVisitor implements Visitor<Node> {\n  visitElement(element: Element): Node {\n    const newAttributes = transformAll(this, element.attributes);\n    const newInputs = transformAll(this, element.inputs);\n    const newOutputs = transformAll(this, element.outputs);\n    const newChildren = transformAll(this, element.children);\n    const newReferences = transformAll(this, element.references);\n    if (newAttributes != element.attributes || newInputs != element.inputs ||\n        newOutputs != element.outputs || newChildren != element.children ||\n        newReferences != element.references) {\n      return new Element(\n          element.name, newAttributes, newInputs, newOutputs, newChildren, newReferences,\n          element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n    }\n    return element;\n  }\n\n  visitTemplate(template: Template): Node {\n    const newAttributes = transformAll(this, template.attributes);\n    const newInputs = transformAll(this, template.inputs);\n    const newOutputs = transformAll(this, template.outputs);\n    const newTemplateAttrs = transformAll(this, template.templateAttrs);\n    const newChildren = transformAll(this, template.children);\n    const newReferences = transformAll(this, template.references);\n    const newVariables = transformAll(this, template.variables);\n    if (newAttributes != template.attributes || newInputs != template.inputs ||\n        newOutputs != template.outputs || newTemplateAttrs != template.templateAttrs ||\n        newChildren != template.children || newReferences != template.references ||\n        newVariables != template.variables) {\n      return new Template(\n          template.tagName, newAttributes, newInputs, newOutputs, newTemplateAttrs, newChildren,\n          newReferences, newVariables, template.sourceSpan, template.startSourceSpan,\n          template.endSourceSpan);\n    }\n    return template;\n  }\n\n  visitContent(content: Content): Node { return content; }\n\n  visitVariable(variable: Variable): Node { return variable; }\n  visitReference(reference: Reference): Node { return reference; }\n  visitTextAttribute(attribute: TextAttribute): Node { return attribute; }\n  visitBoundAttribute(attribute: BoundAttribute): Node { return attribute; }\n  visitBoundEvent(attribute: BoundEvent): Node { return attribute; }\n  visitText(text: Text): Node { return text; }\n  visitBoundText(text: BoundText): Node { return text; }\n  visitIcu(icu: Icu): Node { return icu; }\n}\n\nexport function visitAll<Result>(visitor: Visitor<Result>, nodes: Node[]): Result[] {\n  const result: Result[] = [];\n  if (visitor.visit) {\n    for (const node of nodes) {\n      const newNode = visitor.visit(node) || node.visit(visitor);\n    }\n  } else {\n    for (const node of nodes) {\n      const newNode = node.visit(visitor);\n      if (newNode) {\n        result.push(newNode);\n      }\n    }\n  }\n  return result;\n}\n\nexport function transformAll<Result extends Node>(\n    visitor: Visitor<Node>, nodes: Result[]): Result[] {\n  const result: Result[] = [];\n  let changed = false;\n  for (const node of nodes) {\n    const newNode = node.visit(visitor);\n    if (newNode) {\n      result.push(newNode as Result);\n    }\n    changed = changed || newNode != node;\n  }\n  return changed ? result : nodes;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParseSourceSpan} from '../parse_util';\n\nexport class Message {\n  sources: MessageSpan[];\n\n  /**\n   * @param nodes message AST\n   * @param placeholders maps placeholder names to static content\n   * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n   * @param meaning\n   * @param description\n   * @param id\n   */\n  constructor(\n      public nodes: Node[], public placeholders: {[phName: string]: string},\n      public placeholderToMessage: {[phName: string]: Message}, public meaning: string,\n      public description: string, public id: string) {\n    if (nodes.length) {\n      this.sources = [{\n        filePath: nodes[0].sourceSpan.start.file.url,\n        startLine: nodes[0].sourceSpan.start.line + 1,\n        startCol: nodes[0].sourceSpan.start.col + 1,\n        endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n        endCol: nodes[0].sourceSpan.start.col + 1\n      }];\n    } else {\n      this.sources = [];\n    }\n  }\n}\n\n// line and columns indexes are 1 based\nexport interface MessageSpan {\n  filePath: string;\n  startLine: number;\n  startCol: number;\n  endLine: number;\n  endCol: number;\n}\n\nexport interface Node {\n  sourceSpan: ParseSourceSpan;\n  visit(visitor: Visitor, context?: any): any;\n}\n\nexport class Text implements Node {\n  constructor(public value: string, public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitText(this, context); }\n}\n\n// TODO(vicb): do we really need this node (vs an array) ?\nexport class Container implements Node {\n  constructor(public children: Node[], public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitContainer(this, context); }\n}\n\nexport class Icu implements Node {\n  // TODO(issue/24571): remove '!'.\n  public expressionPlaceholder !: string;\n  constructor(\n      public expression: string, public type: string, public cases: {[k: string]: Node},\n      public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitIcu(this, context); }\n}\n\nexport class TagPlaceholder implements Node {\n  constructor(\n      public tag: string, public attrs: {[k: string]: string}, public startName: string,\n      public closeName: string, public children: Node[], public isVoid: boolean,\n      public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitTagPlaceholder(this, context); }\n}\n\nexport class Placeholder implements Node {\n  constructor(public value: string, public name: string, public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitPlaceholder(this, context); }\n}\n\nexport class IcuPlaceholder implements Node {\n  constructor(public value: Icu, public name: string, public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context?: any): any { return visitor.visitIcuPlaceholder(this, context); }\n}\n\nexport type AST = Message | Node;\n\nexport interface Visitor {\n  visitText(text: Text, context?: any): any;\n  visitContainer(container: Container, context?: any): any;\n  visitIcu(icu: Icu, context?: any): any;\n  visitTagPlaceholder(ph: TagPlaceholder, context?: any): any;\n  visitPlaceholder(ph: Placeholder, context?: any): any;\n  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any;\n}\n\n// Clone the AST\nexport class CloneVisitor implements Visitor {\n  visitText(text: Text, context?: any): Text { return new Text(text.value, text.sourceSpan); }\n\n  visitContainer(container: Container, context?: any): Container {\n    const children = container.children.map(n => n.visit(this, context));\n    return new Container(children, container.sourceSpan);\n  }\n\n  visitIcu(icu: Icu, context?: any): Icu {\n    const cases: {[k: string]: Node} = {};\n    Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context));\n    const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);\n    msg.expressionPlaceholder = icu.expressionPlaceholder;\n    return msg;\n  }\n\n  visitTagPlaceholder(ph: TagPlaceholder, context?: any): TagPlaceholder {\n    const children = ph.children.map(n => n.visit(this, context));\n    return new TagPlaceholder(\n        ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);\n  }\n\n  visitPlaceholder(ph: Placeholder, context?: any): Placeholder {\n    return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n  }\n\n  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): IcuPlaceholder {\n    return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n  }\n}\n\n// Visit all the nodes recursively\nexport class RecurseVisitor implements Visitor {\n  visitText(text: Text, context?: any): any {}\n\n  visitContainer(container: Container, context?: any): any {\n    container.children.forEach(child => child.visit(this));\n  }\n\n  visitIcu(icu: Icu, context?: any): any {\n    Object.keys(icu.cases).forEach(k => { icu.cases[k].visit(this); });\n  }\n\n  visitTagPlaceholder(ph: TagPlaceholder, context?: any): any {\n    ph.children.forEach(child => child.visit(this));\n  }\n\n  visitPlaceholder(ph: Placeholder, context?: any): any {}\n\n  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {utf8Encode} from '../util';\n\nimport * as i18n from './i18n_ast';\n\nexport function digest(message: i18n.Message): string {\n  return message.id || sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`);\n}\n\nexport function decimalDigest(message: i18n.Message): string {\n  if (message.id) {\n    return message.id;\n  }\n\n  const visitor = new _SerializerIgnoreIcuExpVisitor();\n  const parts = message.nodes.map(a => a.visit(visitor, null));\n  return computeMsgId(parts.join(''), message.meaning);\n}\n\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\nclass _SerializerVisitor implements i18n.Visitor {\n  visitText(text: i18n.Text, context: any): any { return text.value; }\n\n  visitContainer(container: i18n.Container, context: any): any {\n    return `[${container.children.map(child => child.visit(this)).join(', ')}]`;\n  }\n\n  visitIcu(icu: i18n.Icu, context: any): any {\n    const strCases =\n        Object.keys(icu.cases).map((k: string) => `${k} {${icu.cases[k].visit(this)}}`);\n    return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context: any): any {\n    return ph.isVoid ?\n        `<ph tag name=\"${ph.startName}\"/>` :\n        `<ph tag name=\"${ph.startName}\">${ph.children.map(child => child.visit(this)).join(', ')}</ph name=\"${ph.closeName}\">`;\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context: any): any {\n    return ph.value ? `<ph name=\"${ph.name}\">${ph.value}</ph>` : `<ph name=\"${ph.name}\"/>`;\n  }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any {\n    return `<ph icu name=\"${ph.name}\">${ph.value.visit(this)}</ph>`;\n  }\n}\n\nconst serializerVisitor = new _SerializerVisitor();\n\nexport function serializeNodes(nodes: i18n.Node[]): string[] {\n  return nodes.map(a => a.visit(serializerVisitor, null));\n}\n\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nclass _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {\n  visitIcu(icu: i18n.Icu, context: any): any {\n    let strCases = Object.keys(icu.cases).map((k: string) => `${k} {${icu.cases[k].visit(this)}}`);\n    // Do not take the expression into account\n    return `{${icu.type}, ${strCases.join(', ')}}`;\n  }\n}\n\n/**\n * Compute the SHA1 of the given string\n *\n * see http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n *          DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\nexport function sha1(str: string): string {\n  const utf8 = utf8Encode(str);\n  const words32 = stringToWords32(utf8, Endian.Big);\n  const len = utf8.length * 8;\n\n  const w = new Array(80);\n  let [a, b, c, d, e]: number[] = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n  words32[len >> 5] |= 0x80 << (24 - len % 32);\n  words32[((len + 64 >> 9) << 4) + 15] = len;\n\n  for (let i = 0; i < words32.length; i += 16) {\n    const [h0, h1, h2, h3, h4]: number[] = [a, b, c, d, e];\n\n    for (let j = 0; j < 80; j++) {\n      if (j < 16) {\n        w[j] = words32[i + j];\n      } else {\n        w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n      }\n\n      const [f, k] = fk(j, b, c, d);\n      const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n      [e, d, c, b, a] = [d, c, rol32(b, 30), a, temp];\n    }\n\n    [a, b, c, d, e] = [add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)];\n  }\n\n  return byteStringToHexString(words32ToByteString([a, b, c, d, e]));\n}\n\nfunction fk(index: number, b: number, c: number, d: number): [number, number] {\n  if (index < 20) {\n    return [(b & c) | (~b & d), 0x5a827999];\n  }\n\n  if (index < 40) {\n    return [b ^ c ^ d, 0x6ed9eba1];\n  }\n\n  if (index < 60) {\n    return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n  }\n\n  return [b ^ c ^ d, 0xca62c1d6];\n}\n\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\nexport function fingerprint(str: string): [number, number] {\n  const utf8 = utf8Encode(str);\n\n  let [hi, lo] = [hash32(utf8, 0), hash32(utf8, 102072)];\n\n  if (hi == 0 && (lo == 0 || lo == 1)) {\n    hi = hi ^ 0x130f9bef;\n    lo = lo ^ -0x6b5f56d8;\n  }\n\n  return [hi, lo];\n}\n\nexport function computeMsgId(msg: string, meaning: string): string {\n  let [hi, lo] = fingerprint(msg);\n\n  if (meaning) {\n    const [him, lom] = fingerprint(meaning);\n    [hi, lo] = add64(rol64([hi, lo], 1), [him, lom]);\n  }\n\n  return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));\n}\n\nfunction hash32(str: string, c: number): number {\n  let [a, b] = [0x9e3779b9, 0x9e3779b9];\n  let i: number;\n\n  const len = str.length;\n\n  for (i = 0; i + 12 <= len; i += 12) {\n    a = add32(a, wordAt(str, i, Endian.Little));\n    b = add32(b, wordAt(str, i + 4, Endian.Little));\n    c = add32(c, wordAt(str, i + 8, Endian.Little));\n    [a, b, c] = mix([a, b, c]);\n  }\n\n  a = add32(a, wordAt(str, i, Endian.Little));\n  b = add32(b, wordAt(str, i + 4, Endian.Little));\n  // the first byte of c is reserved for the length\n  c = add32(c, len);\n  c = add32(c, wordAt(str, i + 8, Endian.Little) << 8);\n\n  return mix([a, b, c])[2];\n}\n\n// clang-format off\nfunction mix([a, b, c]: [number, number, number]): [number, number, number] {\n  a = sub32(a, b); a = sub32(a, c); a ^= c >>> 13;\n  b = sub32(b, c); b = sub32(b, a); b ^= a << 8;\n  c = sub32(c, a); c = sub32(c, b); c ^= b >>> 13;\n  a = sub32(a, b); a = sub32(a, c); a ^= c >>> 12;\n  b = sub32(b, c); b = sub32(b, a); b ^= a << 16;\n  c = sub32(c, a); c = sub32(c, b); c ^= b >>> 5;\n  a = sub32(a, b); a = sub32(a, c); a ^= c >>> 3;\n  b = sub32(b, c); b = sub32(b, a); b ^= a << 10;\n  c = sub32(c, a); c = sub32(c, b); c ^= b >>> 15;\n  return [a, b, c];\n}\n// clang-format on\n\n// Utils\n\nenum Endian {\n  Little,\n  Big,\n}\n\nfunction add32(a: number, b: number): number {\n  return add32to64(a, b)[1];\n}\n\nfunction add32to64(a: number, b: number): [number, number] {\n  const low = (a & 0xffff) + (b & 0xffff);\n  const high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n  return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\n\nfunction add64([ah, al]: [number, number], [bh, bl]: [number, number]): [number, number] {\n  const [carry, l] = add32to64(al, bl);\n  const h = add32(add32(ah, bh), carry);\n  return [h, l];\n}\n\nfunction sub32(a: number, b: number): number {\n  const low = (a & 0xffff) - (b & 0xffff);\n  const high = (a >> 16) - (b >> 16) + (low >> 16);\n  return (high << 16) | (low & 0xffff);\n}\n\n// Rotate a 32b number left `count` position\nfunction rol32(a: number, count: number): number {\n  return (a << count) | (a >>> (32 - count));\n}\n\n// Rotate a 64b number left `count` position\nfunction rol64([hi, lo]: [number, number], count: number): [number, number] {\n  const h = (hi << count) | (lo >>> (32 - count));\n  const l = (lo << count) | (hi >>> (32 - count));\n  return [h, l];\n}\n\nfunction stringToWords32(str: string, endian: Endian): number[] {\n  const words32 = Array((str.length + 3) >>> 2);\n\n  for (let i = 0; i < words32.length; i++) {\n    words32[i] = wordAt(str, i * 4, endian);\n  }\n\n  return words32;\n}\n\nfunction byteAt(str: string, index: number): number {\n  return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;\n}\n\nfunction wordAt(str: string, index: number, endian: Endian): number {\n  let word = 0;\n  if (endian === Endian.Big) {\n    for (let i = 0; i < 4; i++) {\n      word += byteAt(str, index + i) << (24 - 8 * i);\n    }\n  } else {\n    for (let i = 0; i < 4; i++) {\n      word += byteAt(str, index + i) << 8 * i;\n    }\n  }\n  return word;\n}\n\nfunction words32ToByteString(words32: number[]): string {\n  return words32.reduce((str, word) => str + word32ToByteString(word), '');\n}\n\nfunction word32ToByteString(word: number): string {\n  let str = '';\n  for (let i = 0; i < 4; i++) {\n    str += String.fromCharCode((word >>> 8 * (3 - i)) & 0xff);\n  }\n  return str;\n}\n\nfunction byteStringToHexString(str: string): string {\n  let hex: string = '';\n  for (let i = 0; i < str.length; i++) {\n    const b = byteAt(str, i);\n    hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n  }\n  return hex.toLowerCase();\n}\n\n// based on http://www.danvk.org/hex2dec.html (JS can not handle more than 56b)\nfunction byteStringToDecString(str: string): string {\n  let decimal = '';\n  let toThePower = '1';\n\n  for (let i = str.length - 1; i >= 0; i--) {\n    decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n    toThePower = numberTimesBigInt(256, toThePower);\n  }\n\n  return decimal.split('').reverse().join('');\n}\n\n// x and y decimal, lowest significant digit first\nfunction addBigInt(x: string, y: string): string {\n  let sum = '';\n  const len = Math.max(x.length, y.length);\n  for (let i = 0, carry = 0; i < len || carry; i++) {\n    const tmpSum = carry + +(x[i] || 0) + +(y[i] || 0);\n    if (tmpSum >= 10) {\n      carry = 1;\n      sum += tmpSum - 10;\n    } else {\n      carry = 0;\n      sum += tmpSum;\n    }\n  }\n\n  return sum;\n}\n\nfunction numberTimesBigInt(num: number, b: string): string {\n  let product = '';\n  let bToThePower = b;\n  for (; num !== 0; num = num >>> 1) {\n    if (num & 1) product = addBigInt(product, bToThePower);\n    bToThePower = addBigInt(bToThePower, bToThePower);\n  }\n  return product;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as i18n from '../i18n_ast';\n\nexport abstract class Serializer {\n  // - The `placeholders` and `placeholderToMessage` properties are irrelevant in the input messages\n  // - The `id` contains the message id that the serializer is expected to use\n  // - Placeholder names are already map to public names using the provided mapper\n  abstract write(messages: i18n.Message[], locale: string|null): string;\n\n  abstract load(content: string, url: string):\n      {locale: string | null, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}};\n\n  abstract digest(message: i18n.Message): string;\n\n  // Creates a name mapper, see `PlaceholderMapper`\n  // Returning `null` means that no name mapping is used.\n  createNameMapper(message: i18n.Message): PlaceholderMapper|null { return null; }\n}\n\n/**\n * A `PlaceholderMapper` converts placeholder names from internal to serialized representation and\n * back.\n *\n * It should be used for serialization format that put constraints on the placeholder names.\n */\nexport interface PlaceholderMapper {\n  toPublicName(internalName: string): string|null;\n\n  toInternalName(publicName: string): string|null;\n}\n\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nexport class SimplePlaceholderMapper extends i18n.RecurseVisitor implements PlaceholderMapper {\n  private internalToPublic: {[k: string]: string} = {};\n  private publicToNextId: {[k: string]: number} = {};\n  private publicToInternal: {[k: string]: string} = {};\n\n  // create a mapping from the message\n  constructor(message: i18n.Message, private mapName: (name: string) => string) {\n    super();\n    message.nodes.forEach(node => node.visit(this));\n  }\n\n  toPublicName(internalName: string): string|null {\n    return this.internalToPublic.hasOwnProperty(internalName) ?\n        this.internalToPublic[internalName] :\n        null;\n  }\n\n  toInternalName(publicName: string): string|null {\n    return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n                                                              null;\n  }\n\n  visitText(text: i18n.Text, context?: any): any { return null; }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): any {\n    this.visitPlaceholderName(ph.startName);\n    super.visitTagPlaceholder(ph, context);\n    this.visitPlaceholderName(ph.closeName);\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context?: any): any { this.visitPlaceholderName(ph.name); }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any {\n    this.visitPlaceholderName(ph.name);\n  }\n\n  // XMB placeholders could only contains A-Z, 0-9 and _\n  private visitPlaceholderName(internalName: string): void {\n    if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n      return;\n    }\n\n    let publicName = this.mapName(internalName);\n\n    if (this.publicToInternal.hasOwnProperty(publicName)) {\n      // Create a new XMB when it has already been used\n      const nextId = this.publicToNextId[publicName];\n      this.publicToNextId[publicName] = nextId + 1;\n      publicName = `${publicName}_${nextId}`;\n    } else {\n      this.publicToNextId[publicName] = 1;\n    }\n\n    this.internalToPublic[internalName] = publicName;\n    this.publicToInternal[publicName] = internalName;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface IVisitor {\n  visitTag(tag: Tag): any;\n  visitText(text: Text): any;\n  visitDeclaration(decl: Declaration): any;\n  visitDoctype(doctype: Doctype): any;\n}\n\nclass _Visitor implements IVisitor {\n  visitTag(tag: Tag): string {\n    const strAttrs = this._serializeAttributes(tag.attrs);\n\n    if (tag.children.length == 0) {\n      return `<${tag.name}${strAttrs}/>`;\n    }\n\n    const strChildren = tag.children.map(node => node.visit(this));\n    return `<${tag.name}${strAttrs}>${strChildren.join('')}</${tag.name}>`;\n  }\n\n  visitText(text: Text): string { return text.value; }\n\n  visitDeclaration(decl: Declaration): string {\n    return `<?xml${this._serializeAttributes(decl.attrs)} ?>`;\n  }\n\n  private _serializeAttributes(attrs: {[k: string]: string}) {\n    const strAttrs = Object.keys(attrs).map((name: string) => `${name}=\"${attrs[name]}\"`).join(' ');\n    return strAttrs.length > 0 ? ' ' + strAttrs : '';\n  }\n\n  visitDoctype(doctype: Doctype): any {\n    return `<!DOCTYPE ${doctype.rootTag} [\\n${doctype.dtd}\\n]>`;\n  }\n}\n\nconst _visitor = new _Visitor();\n\nexport function serialize(nodes: Node[]): string {\n  return nodes.map((node: Node): string => node.visit(_visitor)).join('');\n}\n\nexport interface Node { visit(visitor: IVisitor): any; }\n\nexport class Declaration implements Node {\n  public attrs: {[k: string]: string} = {};\n\n  constructor(unescapedAttrs: {[k: string]: string}) {\n    Object.keys(unescapedAttrs).forEach((k: string) => {\n      this.attrs[k] = escapeXml(unescapedAttrs[k]);\n    });\n  }\n\n  visit(visitor: IVisitor): any { return visitor.visitDeclaration(this); }\n}\n\nexport class Doctype implements Node {\n  constructor(public rootTag: string, public dtd: string) {}\n\n  visit(visitor: IVisitor): any { return visitor.visitDoctype(this); }\n}\n\nexport class Tag implements Node {\n  public attrs: {[k: string]: string} = {};\n\n  constructor(\n      public name: string, unescapedAttrs: {[k: string]: string} = {},\n      public children: Node[] = []) {\n    Object.keys(unescapedAttrs).forEach((k: string) => {\n      this.attrs[k] = escapeXml(unescapedAttrs[k]);\n    });\n  }\n\n  visit(visitor: IVisitor): any { return visitor.visitTag(this); }\n}\n\nexport class Text implements Node {\n  value: string;\n  constructor(unescapedValue: string) { this.value = escapeXml(unescapedValue); }\n\n  visit(visitor: IVisitor): any { return visitor.visitText(this); }\n}\n\nexport class CR extends Text {\n  constructor(ws: number = 0) { super(`\\n${new Array(ws + 1).join(' ')}`); }\n}\n\nconst _ESCAPED_CHARS: [RegExp, string][] = [\n  [/&/g, '&amp;'],\n  [/\"/g, '&quot;'],\n  [/'/g, '&apos;'],\n  [/</g, '&lt;'],\n  [/>/g, '&gt;'],\n];\n\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nexport function escapeXml(text: string): string {\n  return _ESCAPED_CHARS.reduce(\n      (text: string, entry: [RegExp, string]) => text.replace(entry[0], entry[1]), text);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {decimalDigest} from '../digest';\nimport * as i18n from '../i18n_ast';\n\nimport {PlaceholderMapper, Serializer, SimplePlaceholderMapper} from './serializer';\nimport * as xml from './xml_helper';\n\nconst _MESSAGES_TAG = 'messagebundle';\nconst _MESSAGE_TAG = 'msg';\nconst _PLACEHOLDER_TAG = 'ph';\nconst _EXAMPLE_TAG = 'ex';\nconst _SOURCE_TAG = 'source';\n\nconst _DOCTYPE = `<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>`;\n\nexport class Xmb extends Serializer {\n  write(messages: i18n.Message[], locale: string|null): string {\n    const exampleVisitor = new ExampleVisitor();\n    const visitor = new _Visitor();\n    let rootNode = new xml.Tag(_MESSAGES_TAG);\n\n    messages.forEach(message => {\n      const attrs: {[k: string]: string} = {id: message.id};\n\n      if (message.description) {\n        attrs['desc'] = message.description;\n      }\n\n      if (message.meaning) {\n        attrs['meaning'] = message.meaning;\n      }\n\n      let sourceTags: xml.Tag[] = [];\n      message.sources.forEach((source: i18n.MessageSpan) => {\n        sourceTags.push(new xml.Tag(_SOURCE_TAG, {}, [\n          new xml.Text(\n              `${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)\n        ]));\n      });\n\n      rootNode.children.push(\n          new xml.CR(2),\n          new xml.Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));\n    });\n\n    rootNode.children.push(new xml.CR());\n\n    return xml.serialize([\n      new xml.Declaration({version: '1.0', encoding: 'UTF-8'}),\n      new xml.CR(),\n      new xml.Doctype(_MESSAGES_TAG, _DOCTYPE),\n      new xml.CR(),\n      exampleVisitor.addDefaultExamples(rootNode),\n      new xml.CR(),\n    ]);\n  }\n\n  load(content: string, url: string):\n      {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} {\n    throw new Error('Unsupported');\n  }\n\n  digest(message: i18n.Message): string { return digest(message); }\n\n\n  createNameMapper(message: i18n.Message): PlaceholderMapper {\n    return new SimplePlaceholderMapper(message, toPublicName);\n  }\n}\n\nclass _Visitor implements i18n.Visitor {\n  visitText(text: i18n.Text, context?: any): xml.Node[] { return [new xml.Text(text.value)]; }\n\n  visitContainer(container: i18n.Container, context: any): xml.Node[] {\n    const nodes: xml.Node[] = [];\n    container.children.forEach((node: i18n.Node) => nodes.push(...node.visit(this)));\n    return nodes;\n  }\n\n  visitIcu(icu: i18n.Icu, context?: any): xml.Node[] {\n    const nodes = [new xml.Text(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n\n    Object.keys(icu.cases).forEach((c: string) => {\n      nodes.push(new xml.Text(`${c} {`), ...icu.cases[c].visit(this), new xml.Text(`} `));\n    });\n\n    nodes.push(new xml.Text(`}`));\n\n    return nodes;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): xml.Node[] {\n    const startTagAsText = new xml.Text(`<${ph.tag}>`);\n    const startEx = new xml.Tag(_EXAMPLE_TAG, {}, [startTagAsText]);\n    // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n    const startTagPh =\n        new xml.Tag(_PLACEHOLDER_TAG, {name: ph.startName}, [startEx, startTagAsText]);\n    if (ph.isVoid) {\n      // void tags have no children nor closing tags\n      return [startTagPh];\n    }\n\n    const closeTagAsText = new xml.Text(`</${ph.tag}>`);\n    const closeEx = new xml.Tag(_EXAMPLE_TAG, {}, [closeTagAsText]);\n    // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n    const closeTagPh =\n        new xml.Tag(_PLACEHOLDER_TAG, {name: ph.closeName}, [closeEx, closeTagAsText]);\n\n    return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context?: any): xml.Node[] {\n    const interpolationAsText = new xml.Text(`{{${ph.value}}}`);\n    // Example tag needs to be not-empty for TC.\n    const exTag = new xml.Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);\n    return [\n      // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n      new xml.Tag(_PLACEHOLDER_TAG, {name: ph.name}, [exTag, interpolationAsText])\n    ];\n  }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): xml.Node[] {\n    const icuExpression = ph.value.expression;\n    const icuType = ph.value.type;\n    const icuCases = Object.keys(ph.value.cases).map((value: string) => value + ' {...}').join(' ');\n    const icuAsText = new xml.Text(`{${icuExpression}, ${icuType}, ${icuCases}}`);\n    const exTag = new xml.Tag(_EXAMPLE_TAG, {}, [icuAsText]);\n    return [\n      // TC requires PH to have a non empty EX, and uses the text node to show the \"original\" value.\n      new xml.Tag(_PLACEHOLDER_TAG, {name: ph.name}, [exTag, icuAsText])\n    ];\n  }\n\n  serialize(nodes: i18n.Node[]): xml.Node[] {\n    return [].concat(...nodes.map(node => node.visit(this)));\n  }\n}\n\nexport function digest(message: i18n.Message): string {\n  return decimalDigest(message);\n}\n\n// TC requires at least one non-empty example on placeholders\nclass ExampleVisitor implements xml.IVisitor {\n  addDefaultExamples(node: xml.Node): xml.Node {\n    node.visit(this);\n    return node;\n  }\n\n  visitTag(tag: xml.Tag): void {\n    if (tag.name === _PLACEHOLDER_TAG) {\n      if (!tag.children || tag.children.length == 0) {\n        const exText = new xml.Text(tag.attrs['name'] || '...');\n        tag.children = [new xml.Tag(_EXAMPLE_TAG, {}, [exText])];\n      }\n    } else if (tag.children) {\n      tag.children.forEach(node => node.visit(this));\n    }\n  }\n\n  visitText(text: xml.Text): void {}\n  visitDeclaration(decl: xml.Declaration): void {}\n  visitDoctype(doctype: xml.Doctype): void {}\n}\n\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nexport function toPublicName(internalName: string): string {\n  return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as o from './output_ast';\n\nexport type MapEntry = {\n  key: string,\n  quoted: boolean,\n  value: o.Expression\n};\n\nexport type MapLiteral = MapEntry[];\n\nexport function mapEntry(key: string, value: o.Expression): MapEntry {\n  return {key, value, quoted: false};\n}\n\nexport function mapLiteral(\n    obj: {[key: string]: o.Expression}, quoted: boolean = false): o.Expression {\n  return o.literalMap(Object.keys(obj).map(key => ({\n                                             key,\n                                             quoted,\n                                             value: obj[key],\n                                           })));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as i18n from '../../../i18n/i18n_ast';\nimport {toPublicName} from '../../../i18n/serializers/xmb';\nimport * as html from '../../../ml_parser/ast';\nimport {mapLiteral} from '../../../output/map_util';\nimport * as o from '../../../output/output_ast';\nimport {Identifiers as R3} from '../../r3_identifiers';\n\n\n/* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */\nconst CLOSURE_TRANSLATION_PREFIX = 'MSG_';\n\n/* Prefix for non-`goog.getMsg` i18n-related vars */\nexport const TRANSLATION_PREFIX = 'I18N_';\n\n/** Closure uses `goog.getMsg(message)` to lookup translations */\nconst GOOG_GET_MSG = 'goog.getMsg';\n\n/** Name of the global variable that is used to determine if we use Closure translations or not */\nconst NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';\n\n/** I18n separators for metadata **/\nconst I18N_MEANING_SEPARATOR = '|';\nconst I18N_ID_SEPARATOR = '@@';\n\n/** Name of the i18n attributes **/\nexport const I18N_ATTR = 'i18n';\nexport const I18N_ATTR_PREFIX = 'i18n-';\n\n/** Prefix of var expressions used in ICUs */\nexport const I18N_ICU_VAR_PREFIX = 'VAR_';\n\n/** Prefix of ICU expressions for post processing */\nexport const I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';\n\n/** Placeholder wrapper for i18n expressions **/\nexport const I18N_PLACEHOLDER_SYMBOL = 'ï¿½';\n\nexport type I18nMeta = {\n  id?: string,\n  description?: string,\n  meaning?: string\n};\n\nfunction i18nTranslationToDeclStmt(\n    variable: o.ReadVarExpr, closureVar: o.ReadVarExpr, message: string, meta: I18nMeta,\n    params?: {[name: string]: o.Expression}): o.Statement[] {\n  const statements: o.Statement[] = [];\n  // var I18N_X;\n  statements.push(\n      new o.DeclareVarStmt(variable.name !, undefined, o.INFERRED_TYPE, null, variable.sourceSpan));\n\n  const args = [o.literal(message) as o.Expression];\n  if (params && Object.keys(params).length) {\n    args.push(mapLiteral(params, true));\n  }\n\n  // Closure JSDoc comments\n  const docStatements = i18nMetaToDocStmt(meta);\n  const thenStatements: o.Statement[] = docStatements ? [docStatements] : [];\n  const googFnCall = o.variable(GOOG_GET_MSG).callFn(args);\n  // const MSG_... = goog.getMsg(..);\n  thenStatements.push(closureVar.set(googFnCall).toConstDecl());\n  // I18N_X = MSG_...;\n  thenStatements.push(new o.ExpressionStatement(variable.set(closureVar)));\n  const localizeFnCall = o.importExpr(R3.i18nLocalize).callFn(args);\n  // I18N_X = i18nLocalize(...);\n  const elseStatements = [new o.ExpressionStatement(variable.set(localizeFnCall))];\n  // if(ngI18nClosureMode) { ... } else { ... }\n  statements.push(o.ifStmt(o.variable(NG_I18N_CLOSURE_MODE), thenStatements, elseStatements));\n\n  return statements;\n}\n\n// Converts i18n meta information for a message (id, description, meaning)\n// to a JsDoc statement formatted as expected by the Closure compiler.\nfunction i18nMetaToDocStmt(meta: I18nMeta): o.JSDocCommentStmt|null {\n  const tags: o.JSDocTag[] = [];\n  if (meta.description) {\n    tags.push({tagName: o.JSDocTagName.Desc, text: meta.description});\n  }\n  if (meta.meaning) {\n    tags.push({tagName: o.JSDocTagName.Meaning, text: meta.meaning});\n  }\n  return tags.length == 0 ? null : new o.JSDocCommentStmt(tags);\n}\n\nexport function isI18nAttribute(name: string): boolean {\n  return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);\n}\n\nexport function isI18nRootNode(meta?: i18n.AST): meta is i18n.Message {\n  return meta instanceof i18n.Message;\n}\n\nexport function isSingleI18nIcu(meta?: i18n.AST): boolean {\n  return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof i18n.Icu;\n}\n\nexport function hasI18nAttrs(element: html.Element): boolean {\n  return element.attrs.some((attr: html.Attribute) => isI18nAttribute(attr.name));\n}\n\nexport function metaFromI18nMessage(message: i18n.Message, id: string | null = null): I18nMeta {\n  return {\n    id: typeof id === 'string' ? id : message.id || '',\n    meaning: message.meaning || '',\n    description: message.description || ''\n  };\n}\n\nexport function icuFromI18nMessage(message: i18n.Message) {\n  return message.nodes[0] as i18n.IcuPlaceholder;\n}\n\nexport function wrapI18nPlaceholder(content: string | number, contextId: number = 0): string {\n  const blockId = contextId > 0 ? `:${contextId}` : '';\n  return `${I18N_PLACEHOLDER_SYMBOL}${content}${blockId}${I18N_PLACEHOLDER_SYMBOL}`;\n}\n\nexport function assembleI18nBoundString(\n    strings: string[], bindingStartIndex: number = 0, contextId: number = 0): string {\n  if (!strings.length) return '';\n  let acc = '';\n  const lastIdx = strings.length - 1;\n  for (let i = 0; i < lastIdx; i++) {\n    acc += `${strings[i]}${wrapI18nPlaceholder(bindingStartIndex + i, contextId)}`;\n  }\n  acc += strings[lastIdx];\n  return acc;\n}\n\nexport function getSeqNumberGenerator(startsAt: number = 0): () => number {\n  let current = startsAt;\n  return () => current++;\n}\n\nexport function placeholdersToParams(placeholders: Map<string, string[]>):\n    {[name: string]: o.Expression} {\n  const params: {[name: string]: o.Expression} = {};\n  placeholders.forEach((values: string[], key: string) => {\n    params[key] = o.literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);\n  });\n  return params;\n}\n\nexport function updatePlaceholderMap(map: Map<string, any[]>, name: string, ...values: any[]) {\n  const current = map.get(name) || [];\n  current.push(...values);\n  map.set(name, current);\n}\n\nexport function assembleBoundTextPlaceholders(\n    meta: i18n.AST, bindingStartIndex: number = 0, contextId: number = 0): Map<string, any[]> {\n  const startIdx = bindingStartIndex;\n  const placeholders = new Map<string, any>();\n  const node =\n      meta instanceof i18n.Message ? meta.nodes.find(node => node instanceof i18n.Container) : meta;\n  if (node) {\n    (node as i18n.Container)\n        .children\n        .filter((child: i18n.Node): child is i18n.Placeholder => child instanceof i18n.Placeholder)\n        .forEach((child: i18n.Placeholder, idx: number) => {\n          const content = wrapI18nPlaceholder(startIdx + idx, contextId);\n          updatePlaceholderMap(placeholders, child.name, content);\n        });\n  }\n  return placeholders;\n}\n\nexport function findIndex(items: any[], callback: (item: any) => boolean): number {\n  for (let i = 0; i < items.length; i++) {\n    if (callback(items[i])) {\n      return i;\n    }\n  }\n  return -1;\n}\n\n/**\n * Parses i18n metas like:\n *  - \"@@id\",\n *  - \"description[@@id]\",\n *  - \"meaning|description[@@id]\"\n * and returns an object with parsed output.\n *\n * @param meta String that represents i18n meta\n * @returns Object with id, meaning and description fields\n */\nexport function parseI18nMeta(meta?: string): I18nMeta {\n  let id: string|undefined;\n  let meaning: string|undefined;\n  let description: string|undefined;\n\n  if (meta) {\n    const idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n    const descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);\n    let meaningAndDesc: string;\n    [meaningAndDesc, id] =\n        (idIndex > -1) ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];\n    [meaning, description] = (descIndex > -1) ?\n        [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n        ['', meaningAndDesc];\n  }\n\n  return {id, meaning, description};\n}\n\n/**\n * Converts internal placeholder names to public-facing format\n * (for example to use in goog.getMsg call).\n * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.\n *\n * @param name The placeholder name that should be formatted\n * @returns Formatted placeholder name\n */\nexport function formatI18nPlaceholderName(name: string, useCamelCase: boolean = true): string {\n  const publicName = toPublicName(name);\n  if (!useCamelCase) {\n    return publicName;\n  }\n  const chunks = publicName.split('_');\n  if (chunks.length === 1) {\n    // if no \"_\" found - just lowercase the value\n    return name.toLowerCase();\n  }\n  let postfix;\n  // eject last element if it's a number\n  if (/^\\d+$/.test(chunks[chunks.length - 1])) {\n    postfix = chunks.pop();\n  }\n  let raw = chunks.shift() !.toLowerCase();\n  if (chunks.length) {\n    raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join('');\n  }\n  return postfix ? `${raw}_${postfix}` : raw;\n}\n\n/**\n * Generates a prefix for translation const name.\n *\n * @param extra Additional local prefix that should be injected into translation var name\n * @returns Complete translation const prefix\n */\nexport function getTranslationConstPrefix(extra: string): string {\n  return `${CLOSURE_TRANSLATION_PREFIX}${extra}`.toUpperCase();\n}\n\n/**\n * Generates translation declaration statements.\n *\n * @param variable Translation value reference\n * @param closureVar Variable for Closure `goog.getMsg` calls\n * @param message Text message to be translated\n * @param meta Object that contains meta information (id, meaning and description)\n * @param params Object with placeholders key-value pairs\n * @param transformFn Optional transformation (post processing) function reference\n * @returns Array of Statements that represent a given translation\n */\nexport function getTranslationDeclStmts(\n    variable: o.ReadVarExpr, closureVar: o.ReadVarExpr, message: string, meta: I18nMeta,\n    params: {[name: string]: o.Expression} = {},\n    transformFn?: (raw: o.ReadVarExpr) => o.Expression): o.Statement[] {\n  const statements: o.Statement[] = [];\n\n  statements.push(...i18nTranslationToDeclStmt(variable, closureVar, message, meta, params));\n\n  if (transformFn) {\n    statements.push(new o.ExpressionStatement(variable.set(transformFn(variable))));\n  }\n\n  return statements;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ConstantPool} from '../../constant_pool';\nimport {Interpolation} from '../../expression_parser/ast';\nimport * as o from '../../output/output_ast';\nimport {ParseSourceSpan} from '../../parse_util';\nimport {splitAtColon} from '../../util';\nimport * as t from '../r3_ast';\n\nimport {R3QueryMetadata} from './api';\nimport {isI18nAttribute} from './i18n/util';\n\n\n/**\n * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in\n * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may\n * bot work in some cases when object keys are mangled by minifier.\n *\n * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with\n * inputs that contain potentially unsafe chars.\n */\nconst UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;\n\n/** Name of the temporary to use during data binding */\nexport const TEMPORARY_NAME = '_t';\n\n/** Name of the context parameter passed into a template function */\nexport const CONTEXT_NAME = 'ctx';\n\n/** Name of the RenderFlag passed into a template function */\nexport const RENDER_FLAGS = 'rf';\n\n/** The prefix reference variables */\nexport const REFERENCE_PREFIX = '_r';\n\n/** The name of the implicit context reference */\nexport const IMPLICIT_REFERENCE = '$implicit';\n\n/** Non bindable attribute name **/\nexport const NON_BINDABLE_ATTR = 'ngNonBindable';\n\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nexport function temporaryAllocator(statements: o.Statement[], name: string): () => o.ReadVarExpr {\n  let temp: o.ReadVarExpr|null = null;\n  return () => {\n    if (!temp) {\n      statements.push(new o.DeclareVarStmt(TEMPORARY_NAME, undefined, o.DYNAMIC_TYPE));\n      temp = o.variable(name);\n    }\n    return temp;\n  };\n}\n\n\nexport function unsupported(this: void|Function, feature: string): never {\n  if (this) {\n    throw new Error(`Builder ${this.constructor.name} doesn't support ${feature} yet`);\n  }\n  throw new Error(`Feature ${feature} is not supported yet`);\n}\n\nexport function invalid<T>(this: t.Visitor, arg: o.Expression | o.Statement | t.Node): never {\n  throw new Error(\n      `Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);\n}\n\nexport function asLiteral(value: any): o.Expression {\n  if (Array.isArray(value)) {\n    return o.literalArr(value.map(asLiteral));\n  }\n  return o.literal(value, o.INFERRED_TYPE);\n}\n\nexport function conditionallyCreateMapObjectLiteral(\n    keys: {[key: string]: string | string[]}, keepDeclared?: boolean): o.Expression|null {\n  if (Object.getOwnPropertyNames(keys).length > 0) {\n    return mapToExpression(keys, keepDeclared);\n  }\n  return null;\n}\n\nfunction mapToExpression(\n    map: {[key: string]: string | string[]}, keepDeclared?: boolean): o.Expression {\n  return o.literalMap(Object.getOwnPropertyNames(map).map(key => {\n    // canonical syntax: `dirProp: publicProp`\n    // if there is no `:`, use dirProp = elProp\n    const value = map[key];\n    let declaredName: string;\n    let publicName: string;\n    let minifiedName: string;\n    if (Array.isArray(value)) {\n      [publicName, declaredName] = value;\n    } else {\n      [declaredName, publicName] = splitAtColon(key, [key, value]);\n    }\n    minifiedName = declaredName;\n    return {\n      key: minifiedName,\n      // put quotes around keys that contain potentially unsafe characters\n      quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),\n      value: (keepDeclared && publicName !== declaredName) ?\n          o.literalArr([asLiteral(publicName), asLiteral(declaredName)]) :\n          asLiteral(publicName)\n    };\n  }));\n}\n\n/**\n *  Remove trailing null nodes as they are implied.\n */\nexport function trimTrailingNulls(parameters: o.Expression[]): o.Expression[] {\n  while (o.isNull(parameters[parameters.length - 1])) {\n    parameters.pop();\n  }\n  return parameters;\n}\n\nexport function getQueryPredicate(\n    query: R3QueryMetadata, constantPool: ConstantPool): o.Expression {\n  if (Array.isArray(query.predicate)) {\n    let predicate: o.Expression[] = [];\n    query.predicate.forEach((selector: string): void => {\n      // Each item in predicates array may contain strings with comma-separated refs\n      // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them\n      // as separate array entities\n      const selectors = selector.split(',').map(token => o.literal(token.trim()));\n      predicate.push(...selectors);\n    });\n    return constantPool.getConstLiteral(o.literalArr(predicate), true);\n  } else {\n    return query.predicate;\n  }\n}\n\nexport function noop() {}\n\nexport class DefinitionMap {\n  values: {key: string, quoted: boolean, value: o.Expression}[] = [];\n\n  set(key: string, value: o.Expression|null): void {\n    if (value) {\n      this.values.push({key, value, quoted: false});\n    }\n  }\n\n  toLiteralMap(): o.LiteralMapExpr { return o.literalMap(this.values); }\n}\n\n/**\n * Extract a map of properties to values for a given element or template node, which can be used\n * by the directive matching machinery.\n *\n * @param elOrTpl the element or template in question\n * @return an object set up for directive matching. For attributes on the element/template, this\n * object maps a property name to its (static) value. For any bindings, this map simply maps the\n * property name to an empty string.\n */\nexport function getAttrsForDirectiveMatching(elOrTpl: t.Element | t.Template):\n    {[name: string]: string} {\n  const attributesMap: {[name: string]: string} = {};\n\n\n  if (elOrTpl instanceof t.Template && elOrTpl.tagName !== 'ng-template') {\n    elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = '');\n  } else {\n    elOrTpl.attributes.forEach(a => {\n      if (!isI18nAttribute(a.name)) {\n        attributesMap[a.name] = a.value;\n      }\n    });\n\n    elOrTpl.inputs.forEach(i => { attributesMap[i.name] = ''; });\n    elOrTpl.outputs.forEach(o => { attributesMap[o.name] = ''; });\n  }\n\n  return attributesMap;\n}\n\n/** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */\nexport function chainedInstruction(\n    reference: o.ExternalReference, calls: o.Expression[][], span?: ParseSourceSpan | null) {\n  let expression = o.importExpr(reference, null, span) as o.Expression;\n\n  if (calls.length > 0) {\n    for (let i = 0; i < calls.length; i++) {\n      expression = expression.callFn(calls[i], span);\n    }\n  } else {\n    // Add a blank invocation, in case the `calls` array is empty.\n    expression = expression.callFn([], span);\n  }\n\n  return expression;\n}\n\n/**\n * Gets the number of arguments expected to be passed to a generated instruction in the case of\n * interpolation instructions.\n * @param interpolation An interpolation ast\n */\nexport function getInterpolationArgsLength(interpolation: Interpolation) {\n  const {expressions, strings} = interpolation;\n  if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {\n    // If the interpolation has one interpolated value, but the prefix and suffix are both empty\n    // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or\n    // `textInterpolate`.\n    return 1;\n  } else {\n    return expressions.length + strings.length;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol} from '../aot/static_symbol';\nimport {CompileTypeMetadata, tokenReference} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {InjectFlags} from '../core';\nimport {Identifiers} from '../identifiers';\nimport * as o from '../output/output_ast';\nimport {Identifiers as R3} from '../render3/r3_identifiers';\nimport {OutputContext} from '../util';\n\nimport {unsupported} from './view/util';\n\n\n/**\n * Metadata required by the factory generator to generate a `factory` function for a type.\n */\nexport interface R3ConstructorFactoryMetadata {\n  /**\n   * String name of the type being generated (used to name the factory function).\n   */\n  name: string;\n\n  /**\n   * An expression representing the function (or constructor) which will instantiate the requested\n   * type.\n   *\n   * This could be a reference to a constructor type, or to a user-defined factory function. The\n   * `useNew` property determines whether it will be called as a constructor or not.\n   */\n  type: o.Expression;\n\n  /**\n   * Regardless of whether `fnOrClass` is a constructor function or a user-defined factory, it\n   * may have 0 or more parameters, which will be injected according to the `R3DependencyMetadata`\n   * for those parameters. If this is `null`, then the type's constructor is nonexistent and will\n   * be inherited from `fnOrClass` which is interpreted as the current type. If this is `'invalid'`,\n   * then one or more of the parameters wasn't resolvable and any attempt to use these deps will\n   * result in a runtime error.\n   */\n  deps: R3DependencyMetadata[]|'invalid'|null;\n\n  /**\n   * An expression for the function which will be used to inject dependencies. The API of this\n   * function could be different, and other options control how it will be invoked.\n   */\n  injectFn: o.ExternalReference;\n}\n\nexport enum R3FactoryDelegateType {\n  Class,\n  Function,\n  Factory,\n}\n\nexport interface R3DelegatedFactoryMetadata extends R3ConstructorFactoryMetadata {\n  delegate: o.Expression;\n  delegateType: R3FactoryDelegateType.Factory;\n}\n\nexport interface R3DelegatedFnOrClassMetadata extends R3ConstructorFactoryMetadata {\n  delegate: o.Expression;\n  delegateType: R3FactoryDelegateType.Class|R3FactoryDelegateType.Function;\n  delegateDeps: R3DependencyMetadata[];\n}\n\nexport interface R3ExpressionFactoryMetadata extends R3ConstructorFactoryMetadata {\n  expression: o.Expression;\n}\n\nexport type R3FactoryMetadata = R3ConstructorFactoryMetadata | R3DelegatedFactoryMetadata |\n    R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;\n\n/**\n * Resolved type of a dependency.\n *\n * Occasionally, dependencies will have special significance which is known statically. In that\n * case the `R3ResolvedDependencyType` informs the factory generator that a particular dependency\n * should be generated specially (usually by calling a special injection function instead of the\n * standard one).\n */\nexport enum R3ResolvedDependencyType {\n  /**\n   * A normal token dependency.\n   */\n  Token = 0,\n\n  /**\n   * The dependency is for an attribute.\n   *\n   * The token expression is a string representing the attribute name.\n   */\n  Attribute = 1,\n\n  /**\n   * Injecting the `ChangeDetectorRef` token. Needs special handling when injected into a pipe.\n   */\n  ChangeDetectorRef = 2,\n}\n\n/**\n * Metadata representing a single dependency to be injected into a constructor or function call.\n */\nexport interface R3DependencyMetadata {\n  /**\n   * An expression representing the token or value to be injected.\n   */\n  token: o.Expression;\n\n  /**\n   * An enum indicating whether this dependency has special meaning to Angular and needs to be\n   * injected specially.\n   */\n  resolved: R3ResolvedDependencyType;\n\n  /**\n   * Whether the dependency has an @Host qualifier.\n   */\n  host: boolean;\n\n  /**\n   * Whether the dependency has an @Optional qualifier.\n   */\n  optional: boolean;\n\n  /**\n   * Whether the dependency has an @Self qualifier.\n   */\n  self: boolean;\n\n  /**\n   * Whether the dependency has an @SkipSelf qualifier.\n   */\n  skipSelf: boolean;\n}\n\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nexport function compileFactoryFunction(\n    meta: R3FactoryMetadata, isPipe = false): {factory: o.Expression, statements: o.Statement[]} {\n  const t = o.variable('t');\n  const statements: o.Statement[] = [];\n\n  // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n  // this type is always created by constructor invocation, then this is the type-to-create\n  // parameter provided by the user (t) if specified, or the current type if not. If there is a\n  // delegated factory (which is used to create the current type) then this is only the type-to-\n  // create parameter (t).\n  const typeForCtor =\n      !isDelegatedMetadata(meta) ? new o.BinaryOperatorExpr(o.BinaryOperator.Or, t, meta.type) : t;\n\n  let ctorExpr: o.Expression|null = null;\n  if (meta.deps !== null) {\n    // There is a constructor (either explicitly or implicitly defined).\n    if (meta.deps !== 'invalid') {\n      ctorExpr =\n          new o.InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.injectFn, isPipe));\n    }\n  } else {\n    const baseFactory = o.variable(`Éµ${meta.name}_BaseFactory`);\n    const getInheritedFactory = o.importExpr(R3.getInheritedFactory);\n    const baseFactoryStmt =\n        baseFactory.set(getInheritedFactory.callFn([meta.type])).toDeclStmt(o.INFERRED_TYPE, [\n          o.StmtModifier.Exported, o.StmtModifier.Final\n        ]);\n    statements.push(baseFactoryStmt);\n\n    // There is no constructor, use the base class' factory to construct typeForCtor.\n    ctorExpr = baseFactory.callFn([typeForCtor]);\n  }\n  const ctorExprFinal = ctorExpr;\n\n  const body: o.Statement[] = [];\n  let retExpr: o.Expression|null = null;\n\n  function makeConditionalFactory(nonCtorExpr: o.Expression): o.ReadVarExpr {\n    const r = o.variable('r');\n    body.push(r.set(o.NULL_EXPR).toDeclStmt());\n    let ctorStmt: o.Statement|null = null;\n    if (ctorExprFinal !== null) {\n      ctorStmt = r.set(ctorExprFinal).toStmt();\n    } else {\n      ctorStmt = makeErrorStmt(meta.name);\n    }\n    body.push(o.ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));\n    return r;\n  }\n\n  if (isDelegatedMetadata(meta) && meta.delegateType === R3FactoryDelegateType.Factory) {\n    const delegateFactory = o.variable(`Éµ${meta.name}_BaseFactory`);\n    const getFactoryOf = o.importExpr(R3.getFactoryOf);\n    if (meta.delegate.isEquivalent(meta.type)) {\n      throw new Error(`Illegal state: compiling factory that delegates to itself`);\n    }\n    const delegateFactoryStmt =\n        delegateFactory.set(getFactoryOf.callFn([meta.delegate])).toDeclStmt(o.INFERRED_TYPE, [\n          o.StmtModifier.Exported, o.StmtModifier.Final\n        ]);\n\n    statements.push(delegateFactoryStmt);\n    retExpr = makeConditionalFactory(delegateFactory.callFn([]));\n  } else if (isDelegatedMetadata(meta)) {\n    // This type is created with a delegated factory. If a type parameter is not specified, call\n    // the factory instead.\n    const delegateArgs = injectDependencies(meta.delegateDeps, meta.injectFn, isPipe);\n    // Either call `new delegate(...)` or `delegate(...)` depending on meta.useNewForDelegate.\n    const factoryExpr = new (\n        meta.delegateType === R3FactoryDelegateType.Class ?\n            o.InstantiateExpr :\n            o.InvokeFunctionExpr)(meta.delegate, delegateArgs);\n    retExpr = makeConditionalFactory(factoryExpr);\n  } else if (isExpressionFactoryMetadata(meta)) {\n    // TODO(alxhub): decide whether to lower the value here or in the caller\n    retExpr = makeConditionalFactory(meta.expression);\n  } else {\n    retExpr = ctorExpr;\n  }\n\n  if (retExpr !== null) {\n    body.push(new o.ReturnStatement(retExpr));\n  } else {\n    body.push(makeErrorStmt(meta.name));\n  }\n\n  return {\n    factory: o.fn(\n        [new o.FnParam('t', o.DYNAMIC_TYPE)], body, o.INFERRED_TYPE, undefined,\n        `${meta.name}_Factory`),\n    statements,\n  };\n}\n\nfunction injectDependencies(\n    deps: R3DependencyMetadata[], injectFn: o.ExternalReference, isPipe: boolean): o.Expression[] {\n  return deps.map(dep => compileInjectDependency(dep, injectFn, isPipe));\n}\n\nfunction compileInjectDependency(\n    dep: R3DependencyMetadata, injectFn: o.ExternalReference, isPipe: boolean): o.Expression {\n  // Interpret the dependency according to its resolved type.\n  switch (dep.resolved) {\n    case R3ResolvedDependencyType.Token:\n    case R3ResolvedDependencyType.ChangeDetectorRef:\n      // Build up the injection flags according to the metadata.\n      const flags = InjectFlags.Default | (dep.self ? InjectFlags.Self : 0) |\n          (dep.skipSelf ? InjectFlags.SkipSelf : 0) | (dep.host ? InjectFlags.Host : 0) |\n          (dep.optional ? InjectFlags.Optional : 0);\n\n      // If this dependency is optional or otherwise has non-default flags, then additional\n      // parameters describing how to inject the dependency must be passed to the inject function\n      // that's being used.\n      let flagsParam: o.LiteralExpr|null =\n          (flags !== InjectFlags.Default || dep.optional) ? o.literal(flags) : null;\n\n      // We have a separate instruction for injecting ChangeDetectorRef into a pipe.\n      if (isPipe && dep.resolved === R3ResolvedDependencyType.ChangeDetectorRef) {\n        return o.importExpr(R3.injectPipeChangeDetectorRef).callFn(flagsParam ? [flagsParam] : []);\n      }\n\n      // Build up the arguments to the injectFn call.\n      const injectArgs = [dep.token];\n      if (flagsParam) {\n        injectArgs.push(flagsParam);\n      }\n      return o.importExpr(injectFn).callFn(injectArgs);\n    case R3ResolvedDependencyType.Attribute:\n      // In the case of attributes, the attribute name in question is given as the token.\n      return o.importExpr(R3.injectAttribute).callFn([dep.token]);\n    default:\n      return unsupported(\n          `Unknown R3ResolvedDependencyType: ${R3ResolvedDependencyType[dep.resolved]}`);\n  }\n}\n\n/**\n * A helper function useful for extracting `R3DependencyMetadata` from a Render2\n * `CompileTypeMetadata` instance.\n */\nexport function dependenciesFromGlobalMetadata(\n    type: CompileTypeMetadata, outputCtx: OutputContext,\n    reflector: CompileReflector): R3DependencyMetadata[] {\n  // Use the `CompileReflector` to look up references to some well-known Angular types. These will\n  // be compared with the token to statically determine whether the token has significance to\n  // Angular, and set the correct `R3ResolvedDependencyType` as a result.\n  const injectorRef = reflector.resolveExternalReference(Identifiers.Injector);\n\n  // Iterate through the type's DI dependencies and produce `R3DependencyMetadata` for each of them.\n  const deps: R3DependencyMetadata[] = [];\n  for (let dependency of type.diDeps) {\n    if (dependency.token) {\n      const tokenRef = tokenReference(dependency.token);\n      let resolved: R3ResolvedDependencyType = dependency.isAttribute ?\n          R3ResolvedDependencyType.Attribute :\n          R3ResolvedDependencyType.Token;\n\n      // In the case of most dependencies, the token will be a reference to a type. Sometimes,\n      // however, it can be a string, in the case of older Angular code or @Attribute injection.\n      const token =\n          tokenRef instanceof StaticSymbol ? outputCtx.importExpr(tokenRef) : o.literal(tokenRef);\n\n      // Construct the dependency.\n      deps.push({\n        token,\n        resolved,\n        host: !!dependency.isHost,\n        optional: !!dependency.isOptional,\n        self: !!dependency.isSelf,\n        skipSelf: !!dependency.isSkipSelf,\n      });\n    } else {\n      unsupported('dependency without a token');\n    }\n  }\n\n  return deps;\n}\n\nfunction makeErrorStmt(name: string): o.Statement {\n  return new o.ThrowStmt(new o.InstantiateExpr(new o.ReadVarExpr('Error'), [\n    o.literal(\n        `${name} has a constructor which is not compatible with Dependency Injection. It should probably not be @Injectable().`)\n  ]));\n}\n\nfunction isDelegatedMetadata(meta: R3FactoryMetadata): meta is R3DelegatedFactoryMetadata|\n    R3DelegatedFnOrClassMetadata {\n  return (meta as any).delegateType !== undefined;\n}\n\nfunction isExpressionFactoryMetadata(meta: R3FactoryMetadata): meta is R3ExpressionFactoryMetadata {\n  return (meta as any).expression !== undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol} from '../aot/static_symbol';\nimport * as o from '../output/output_ast';\nimport {OutputContext} from '../util';\n\n/**\n * Convert an object map with `Expression` values into a `LiteralMapExpr`.\n */\nexport function mapToMapExpression(map: {[key: string]: o.Expression}): o.LiteralMapExpr {\n  const result = Object.keys(map).map(key => ({key, value: map[key], quoted: false}));\n  return o.literalMap(result);\n}\n\n/**\n * Convert metadata into an `Expression` in the given `OutputContext`.\n *\n * This operation will handle arrays, references to symbols, or literal `null` or `undefined`.\n */\nexport function convertMetaToOutput(meta: any, ctx: OutputContext): o.Expression {\n  if (Array.isArray(meta)) {\n    return o.literalArr(meta.map(entry => convertMetaToOutput(entry, ctx)));\n  }\n  if (meta instanceof StaticSymbol) {\n    return ctx.importExpr(meta);\n  }\n  if (meta == null) {\n    return o.literal(meta);\n  }\n\n  throw new Error(`Internal error: Unsupported or unknown metadata: ${meta}`);\n}\n\nexport function typeWithParameters(type: o.Expression, numParams: number): o.ExpressionType {\n  let params: o.Type[]|null = null;\n  if (numParams > 0) {\n    params = [];\n    for (let i = 0; i < numParams; i++) {\n      params.push(o.DYNAMIC_TYPE);\n    }\n  }\n  return o.expressionType(type, null, params);\n}\n\nexport interface R3Reference {\n  value: o.Expression;\n  type: o.Expression;\n}\n\nconst ANIMATE_SYMBOL_PREFIX = '@';\nexport function prepareSyntheticPropertyName(name: string) {\n  return `${ANIMATE_SYMBOL_PREFIX}${name}`;\n}\n\nexport function prepareSyntheticListenerName(name: string, phase: string) {\n  return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;\n}\n\nexport function isSyntheticPropertyOrListener(name: string) {\n  return name.charAt(0) == ANIMATE_SYMBOL_PREFIX;\n}\n\nexport function getSyntheticPropertyName(name: string) {\n  // this will strip out listener phase values...\n  // @foo.start => @foo\n  const i = name.indexOf('.');\n  name = i > 0 ? name.substring(0, i) : name;\n  if (name.charAt(0) !== ANIMATE_SYMBOL_PREFIX) {\n    name = ANIMATE_SYMBOL_PREFIX + name;\n  }\n  return name;\n}\n\nexport function prepareSyntheticListenerFunctionName(name: string, phase: string) {\n  return `animation_${name}_${phase}`;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function assertArrayOfStrings(identifier: string, value: any) {\n  if (value == null) {\n    return;\n  }\n  if (!Array.isArray(value)) {\n    throw new Error(`Expected '${identifier}' to be an array of strings.`);\n  }\n  for (let i = 0; i < value.length; i += 1) {\n    if (typeof value[i] !== 'string') {\n      throw new Error(`Expected '${identifier}' to be an array of strings.`);\n    }\n  }\n}\n\nconst UNUSABLE_INTERPOLATION_REGEXPS = [\n  /^\\s*$/,        // empty\n  /[<>]/,         // html tag\n  /^[{}]$/,       // i18n expansion\n  /&(#|[a-z])/i,  // character reference,\n  /^\\/\\//,        // comment\n];\n\nexport function assertInterpolationSymbols(identifier: string, value: any): void {\n  if (value != null && !(Array.isArray(value) && value.length == 2)) {\n    throw new Error(`Expected '${identifier}' to be an array, [start, end].`);\n  } else if (value != null) {\n    const start = value[0] as string;\n    const end = value[1] as string;\n    // Check for unusable interpolation symbols\n    UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => {\n      if (regexp.test(start) || regexp.test(end)) {\n        throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);\n      }\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertInterpolationSymbols} from '../assertions';\n\nexport class InterpolationConfig {\n  static fromArray(markers: [string, string]|null): InterpolationConfig {\n    if (!markers) {\n      return DEFAULT_INTERPOLATION_CONFIG;\n    }\n\n    assertInterpolationSymbols('interpolation', markers);\n    return new InterpolationConfig(markers[0], markers[1]);\n  }\n\n  constructor(public start: string, public end: string) {}\n}\n\nexport const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig =\n    new InterpolationConfig('{{', '}}');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {utf8Encode} from '../util';\n\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nconst VERSION = 3;\n\nconst JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\n\ntype Segment = {\n  col0: number,\n  sourceUrl?: string,\n  sourceLine0?: number,\n  sourceCol0?: number,\n};\n\nexport type SourceMap = {\n  version: number,\n  file?: string,\n  sourceRoot: string,\n  sources: string[],\n  sourcesContent: (string | null)[],\n  mappings: string,\n};\n\nexport class SourceMapGenerator {\n  private sourcesContent: Map<string, string|null> = new Map();\n  private lines: Segment[][] = [];\n  private lastCol0: number = 0;\n  private hasMappings = false;\n\n  constructor(private file: string|null = null) {}\n\n  // The content is `null` when the content is expected to be loaded using the URL\n  addSource(url: string, content: string|null = null): this {\n    if (!this.sourcesContent.has(url)) {\n      this.sourcesContent.set(url, content);\n    }\n    return this;\n  }\n\n  addLine(): this {\n    this.lines.push([]);\n    this.lastCol0 = 0;\n    return this;\n  }\n\n  addMapping(col0: number, sourceUrl?: string, sourceLine0?: number, sourceCol0?: number): this {\n    if (!this.currentLine) {\n      throw new Error(`A line must be added before mappings can be added`);\n    }\n    if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n      throw new Error(`Unknown source file \"${sourceUrl}\"`);\n    }\n    if (col0 == null) {\n      throw new Error(`The column in the generated code must be provided`);\n    }\n    if (col0 < this.lastCol0) {\n      throw new Error(`Mapping should be added in output order`);\n    }\n    if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n      throw new Error(`The source location must be provided when a source url is provided`);\n    }\n\n    this.hasMappings = true;\n    this.lastCol0 = col0;\n    this.currentLine.push({col0, sourceUrl, sourceLine0, sourceCol0});\n    return this;\n  }\n\n  private get currentLine(): Segment[]|null { return this.lines.slice(-1)[0]; }\n\n  toJSON(): SourceMap|null {\n    if (!this.hasMappings) {\n      return null;\n    }\n\n    const sourcesIndex = new Map<string, number>();\n    const sources: string[] = [];\n    const sourcesContent: (string | null)[] = [];\n\n    Array.from(this.sourcesContent.keys()).forEach((url: string, i: number) => {\n      sourcesIndex.set(url, i);\n      sources.push(url);\n      sourcesContent.push(this.sourcesContent.get(url) || null);\n    });\n\n    let mappings: string = '';\n    let lastCol0: number = 0;\n    let lastSourceIndex: number = 0;\n    let lastSourceLine0: number = 0;\n    let lastSourceCol0: number = 0;\n\n    this.lines.forEach(segments => {\n      lastCol0 = 0;\n\n      mappings += segments\n                      .map(segment => {\n                        // zero-based starting column of the line in the generated code\n                        let segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n                        lastCol0 = segment.col0;\n\n                        if (segment.sourceUrl != null) {\n                          // zero-based index into the âsourcesâ list\n                          segAsStr +=\n                              toBase64VLQ(sourcesIndex.get(segment.sourceUrl) ! - lastSourceIndex);\n                          lastSourceIndex = sourcesIndex.get(segment.sourceUrl) !;\n                          // the zero-based starting line in the original source\n                          segAsStr += toBase64VLQ(segment.sourceLine0 ! - lastSourceLine0);\n                          lastSourceLine0 = segment.sourceLine0 !;\n                          // the zero-based starting column in the original source\n                          segAsStr += toBase64VLQ(segment.sourceCol0 ! - lastSourceCol0);\n                          lastSourceCol0 = segment.sourceCol0 !;\n                        }\n\n                        return segAsStr;\n                      })\n                      .join(',');\n      mappings += ';';\n    });\n\n    mappings = mappings.slice(0, -1);\n\n    return {\n      'file': this.file || '',\n      'version': VERSION,\n      'sourceRoot': '',\n      'sources': sources,\n      'sourcesContent': sourcesContent,\n      'mappings': mappings,\n    };\n  }\n\n  toJsComment(): string {\n    return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n                              '';\n  }\n}\n\nexport function toBase64String(value: string): string {\n  let b64 = '';\n  value = utf8Encode(value);\n  for (let i = 0; i < value.length;) {\n    const i1 = value.charCodeAt(i++);\n    const i2 = value.charCodeAt(i++);\n    const i3 = value.charCodeAt(i++);\n    b64 += toBase64Digit(i1 >> 2);\n    b64 += toBase64Digit(((i1 & 3) << 4) | (isNaN(i2) ? 0 : i2 >> 4));\n    b64 += isNaN(i2) ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 >> 6));\n    b64 += isNaN(i2) || isNaN(i3) ? '=' : toBase64Digit(i3 & 63);\n  }\n\n  return b64;\n}\n\nfunction toBase64VLQ(value: number): string {\n  value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n\n  let out = '';\n  do {\n    let digit = value & 31;\n    value = value >> 5;\n    if (value > 0) {\n      digit = digit | 32;\n    }\n    out += toBase64Digit(digit);\n  } while (value > 0);\n\n  return out;\n}\n\nconst B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nfunction toBase64Digit(value: number): string {\n  if (value < 0 || value >= 64) {\n    throw new Error(`Can only encode value in the range [0, 63]`);\n  }\n\n  return B64_DIGITS[value];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParseSourceSpan} from '../parse_util';\n\nimport * as o from './output_ast';\nimport {SourceMapGenerator} from './source_map';\n\nconst _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nconst _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nconst _INDENT_WITH = '  ';\nexport const CATCH_ERROR_VAR = o.variable('error', null, null);\nexport const CATCH_STACK_VAR = o.variable('stack', null, null);\n\nexport interface OutputEmitter {\n  emitStatements(genFilePath: string, stmts: o.Statement[], preamble?: string|null): string;\n}\n\nclass _EmittedLine {\n  partsLength = 0;\n  parts: string[] = [];\n  srcSpans: (ParseSourceSpan|null)[] = [];\n  constructor(public indent: number) {}\n}\n\nexport class EmitterVisitorContext {\n  static createRoot(): EmitterVisitorContext { return new EmitterVisitorContext(0); }\n\n  private _lines: _EmittedLine[];\n  private _classes: o.ClassStmt[] = [];\n  private _preambleLineCount = 0;\n\n  constructor(private _indent: number) { this._lines = [new _EmittedLine(_indent)]; }\n\n  private get _currentLine(): _EmittedLine { return this._lines[this._lines.length - 1]; }\n\n  println(from?: {sourceSpan: ParseSourceSpan | null}|null, lastPart: string = ''): void {\n    this.print(from || null, lastPart, true);\n  }\n\n  lineIsEmpty(): boolean { return this._currentLine.parts.length === 0; }\n\n  lineLength(): number {\n    return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n  }\n\n  print(from: {sourceSpan: ParseSourceSpan | null}|null, part: string, newLine: boolean = false) {\n    if (part.length > 0) {\n      this._currentLine.parts.push(part);\n      this._currentLine.partsLength += part.length;\n      this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n    }\n    if (newLine) {\n      this._lines.push(new _EmittedLine(this._indent));\n    }\n  }\n\n  removeEmptyLastLine() {\n    if (this.lineIsEmpty()) {\n      this._lines.pop();\n    }\n  }\n\n  incIndent() {\n    this._indent++;\n    if (this.lineIsEmpty()) {\n      this._currentLine.indent = this._indent;\n    }\n  }\n\n  decIndent() {\n    this._indent--;\n    if (this.lineIsEmpty()) {\n      this._currentLine.indent = this._indent;\n    }\n  }\n\n  pushClass(clazz: o.ClassStmt) { this._classes.push(clazz); }\n\n  popClass(): o.ClassStmt { return this._classes.pop() !; }\n\n  get currentClass(): o.ClassStmt|null {\n    return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;\n  }\n\n  toSource(): string {\n    return this.sourceLines\n        .map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '')\n        .join('\\n');\n  }\n\n  toSourceMapGenerator(genFilePath: string, startsAtLine: number = 0): SourceMapGenerator {\n    const map = new SourceMapGenerator(genFilePath);\n\n    let firstOffsetMapped = false;\n    const mapFirstOffsetIfNeeded = () => {\n      if (!firstOffsetMapped) {\n        // Add a single space so that tools won't try to load the file from disk.\n        // Note: We are using virtual urls like `ng:///`, so we have to\n        // provide a content here.\n        map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n        firstOffsetMapped = true;\n      }\n    };\n\n    for (let i = 0; i < startsAtLine; i++) {\n      map.addLine();\n      mapFirstOffsetIfNeeded();\n    }\n\n    this.sourceLines.forEach((line, lineIdx) => {\n      map.addLine();\n\n      const spans = line.srcSpans;\n      const parts = line.parts;\n      let col0 = line.indent * _INDENT_WITH.length;\n      let spanIdx = 0;\n      // skip leading parts without source spans\n      while (spanIdx < spans.length && !spans[spanIdx]) {\n        col0 += parts[spanIdx].length;\n        spanIdx++;\n      }\n      if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n        firstOffsetMapped = true;\n      } else {\n        mapFirstOffsetIfNeeded();\n      }\n\n      while (spanIdx < spans.length) {\n        const span = spans[spanIdx] !;\n        const source = span.start.file;\n        const sourceLine = span.start.line;\n        const sourceCol = span.start.col;\n        map.addSource(source.url, source.content)\n            .addMapping(col0, source.url, sourceLine, sourceCol);\n\n        col0 += parts[spanIdx].length;\n        spanIdx++;\n\n        // assign parts without span or the same span to the previous segment\n        while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n          col0 += parts[spanIdx].length;\n          spanIdx++;\n        }\n      }\n    });\n\n    return map;\n  }\n\n  setPreambleLineCount(count: number) { return this._preambleLineCount = count; }\n\n  spanOf(line: number, column: number): ParseSourceSpan|null {\n    const emittedLine = this._lines[line - this._preambleLineCount];\n    if (emittedLine) {\n      let columnsLeft = column - _createIndent(emittedLine.indent).length;\n      for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n        const part = emittedLine.parts[partIndex];\n        if (part.length > columnsLeft) {\n          return emittedLine.srcSpans[partIndex];\n        }\n        columnsLeft -= part.length;\n      }\n    }\n    return null;\n  }\n\n  private get sourceLines(): _EmittedLine[] {\n    if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n      return this._lines.slice(0, -1);\n    }\n    return this._lines;\n  }\n}\n\nexport abstract class AbstractEmitterVisitor implements o.StatementVisitor, o.ExpressionVisitor {\n  constructor(private _escapeDollarInStrings: boolean) {}\n\n  visitExpressionStmt(stmt: o.ExpressionStatement, ctx: EmitterVisitorContext): any {\n    stmt.expr.visitExpression(this, ctx);\n    ctx.println(stmt, ';');\n    return null;\n  }\n\n  visitReturnStmt(stmt: o.ReturnStatement, ctx: EmitterVisitorContext): any {\n    ctx.print(stmt, `return `);\n    stmt.value.visitExpression(this, ctx);\n    ctx.println(stmt, ';');\n    return null;\n  }\n\n  abstract visitCastExpr(ast: o.CastExpr, context: any): any;\n\n  abstract visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any;\n\n  visitIfStmt(stmt: o.IfStmt, ctx: EmitterVisitorContext): any {\n    ctx.print(stmt, `if (`);\n    stmt.condition.visitExpression(this, ctx);\n    ctx.print(stmt, `) {`);\n    const hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n    if (stmt.trueCase.length <= 1 && !hasElseCase) {\n      ctx.print(stmt, ` `);\n      this.visitAllStatements(stmt.trueCase, ctx);\n      ctx.removeEmptyLastLine();\n      ctx.print(stmt, ` `);\n    } else {\n      ctx.println();\n      ctx.incIndent();\n      this.visitAllStatements(stmt.trueCase, ctx);\n      ctx.decIndent();\n      if (hasElseCase) {\n        ctx.println(stmt, `} else {`);\n        ctx.incIndent();\n        this.visitAllStatements(stmt.falseCase, ctx);\n        ctx.decIndent();\n      }\n    }\n    ctx.println(stmt, `}`);\n    return null;\n  }\n\n  abstract visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any;\n\n  visitThrowStmt(stmt: o.ThrowStmt, ctx: EmitterVisitorContext): any {\n    ctx.print(stmt, `throw `);\n    stmt.error.visitExpression(this, ctx);\n    ctx.println(stmt, `;`);\n    return null;\n  }\n  visitCommentStmt(stmt: o.CommentStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.multiline) {\n      ctx.println(stmt, `/* ${stmt.comment} */`);\n    } else {\n      stmt.comment.split('\\n').forEach((line) => { ctx.println(stmt, `// ${line}`); });\n    }\n    return null;\n  }\n  visitJSDocCommentStmt(stmt: o.JSDocCommentStmt, ctx: EmitterVisitorContext) {\n    ctx.println(stmt, `/*${stmt.toString()}*/`);\n    return null;\n  }\n\n  abstract visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any;\n\n  visitWriteVarExpr(expr: o.WriteVarExpr, ctx: EmitterVisitorContext): any {\n    const lineWasEmpty = ctx.lineIsEmpty();\n    if (!lineWasEmpty) {\n      ctx.print(expr, '(');\n    }\n    ctx.print(expr, `${expr.name} = `);\n    expr.value.visitExpression(this, ctx);\n    if (!lineWasEmpty) {\n      ctx.print(expr, ')');\n    }\n    return null;\n  }\n  visitWriteKeyExpr(expr: o.WriteKeyExpr, ctx: EmitterVisitorContext): any {\n    const lineWasEmpty = ctx.lineIsEmpty();\n    if (!lineWasEmpty) {\n      ctx.print(expr, '(');\n    }\n    expr.receiver.visitExpression(this, ctx);\n    ctx.print(expr, `[`);\n    expr.index.visitExpression(this, ctx);\n    ctx.print(expr, `] = `);\n    expr.value.visitExpression(this, ctx);\n    if (!lineWasEmpty) {\n      ctx.print(expr, ')');\n    }\n    return null;\n  }\n  visitWritePropExpr(expr: o.WritePropExpr, ctx: EmitterVisitorContext): any {\n    const lineWasEmpty = ctx.lineIsEmpty();\n    if (!lineWasEmpty) {\n      ctx.print(expr, '(');\n    }\n    expr.receiver.visitExpression(this, ctx);\n    ctx.print(expr, `.${expr.name} = `);\n    expr.value.visitExpression(this, ctx);\n    if (!lineWasEmpty) {\n      ctx.print(expr, ')');\n    }\n    return null;\n  }\n  visitInvokeMethodExpr(expr: o.InvokeMethodExpr, ctx: EmitterVisitorContext): any {\n    expr.receiver.visitExpression(this, ctx);\n    let name = expr.name;\n    if (expr.builtin != null) {\n      name = this.getBuiltinMethodName(expr.builtin);\n      if (name == null) {\n        // some builtins just mean to skip the call.\n        return null;\n      }\n    }\n    ctx.print(expr, `.${name}(`);\n    this.visitAllExpressions(expr.args, ctx, `,`);\n    ctx.print(expr, `)`);\n    return null;\n  }\n\n  abstract getBuiltinMethodName(method: o.BuiltinMethod): string;\n\n  visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): any {\n    expr.fn.visitExpression(this, ctx);\n    ctx.print(expr, `(`);\n    this.visitAllExpressions(expr.args, ctx, ',');\n    ctx.print(expr, `)`);\n    return null;\n  }\n  visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): any {\n    throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n  }\n  visitTypeofExpr(expr: o.TypeofExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(expr, 'typeof ');\n    expr.expr.visitExpression(this, ctx);\n  }\n  visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): any {\n    let varName = ast.name !;\n    if (ast.builtin != null) {\n      switch (ast.builtin) {\n        case o.BuiltinVar.Super:\n          varName = 'super';\n          break;\n        case o.BuiltinVar.This:\n          varName = 'this';\n          break;\n        case o.BuiltinVar.CatchError:\n          varName = CATCH_ERROR_VAR.name !;\n          break;\n        case o.BuiltinVar.CatchStack:\n          varName = CATCH_STACK_VAR.name !;\n          break;\n        default:\n          throw new Error(`Unknown builtin variable ${ast.builtin}`);\n      }\n    }\n    ctx.print(ast, varName);\n    return null;\n  }\n  visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `new `);\n    ast.classExpr.visitExpression(this, ctx);\n    ctx.print(ast, `(`);\n    this.visitAllExpressions(ast.args, ctx, ',');\n    ctx.print(ast, `)`);\n    return null;\n  }\n\n  visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any {\n    const value = ast.value;\n    if (typeof value === 'string') {\n      ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n    } else {\n      ctx.print(ast, `${value}`);\n    }\n    return null;\n  }\n\n  abstract visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any;\n\n  visitConditionalExpr(ast: o.ConditionalExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `(`);\n    ast.condition.visitExpression(this, ctx);\n    ctx.print(ast, '? ');\n    ast.trueCase.visitExpression(this, ctx);\n    ctx.print(ast, ': ');\n    ast.falseCase !.visitExpression(this, ctx);\n    ctx.print(ast, `)`);\n    return null;\n  }\n  visitNotExpr(ast: o.NotExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, '!');\n    ast.condition.visitExpression(this, ctx);\n    return null;\n  }\n  visitAssertNotNullExpr(ast: o.AssertNotNull, ctx: EmitterVisitorContext): any {\n    ast.condition.visitExpression(this, ctx);\n    return null;\n  }\n  abstract visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any;\n  abstract visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, context: any): any;\n\n  visitBinaryOperatorExpr(ast: o.BinaryOperatorExpr, ctx: EmitterVisitorContext): any {\n    let opStr: string;\n    switch (ast.operator) {\n      case o.BinaryOperator.Equals:\n        opStr = '==';\n        break;\n      case o.BinaryOperator.Identical:\n        opStr = '===';\n        break;\n      case o.BinaryOperator.NotEquals:\n        opStr = '!=';\n        break;\n      case o.BinaryOperator.NotIdentical:\n        opStr = '!==';\n        break;\n      case o.BinaryOperator.And:\n        opStr = '&&';\n        break;\n      case o.BinaryOperator.BitwiseAnd:\n        opStr = '&';\n        break;\n      case o.BinaryOperator.Or:\n        opStr = '||';\n        break;\n      case o.BinaryOperator.Plus:\n        opStr = '+';\n        break;\n      case o.BinaryOperator.Minus:\n        opStr = '-';\n        break;\n      case o.BinaryOperator.Divide:\n        opStr = '/';\n        break;\n      case o.BinaryOperator.Multiply:\n        opStr = '*';\n        break;\n      case o.BinaryOperator.Modulo:\n        opStr = '%';\n        break;\n      case o.BinaryOperator.Lower:\n        opStr = '<';\n        break;\n      case o.BinaryOperator.LowerEquals:\n        opStr = '<=';\n        break;\n      case o.BinaryOperator.Bigger:\n        opStr = '>';\n        break;\n      case o.BinaryOperator.BiggerEquals:\n        opStr = '>=';\n        break;\n      default:\n        throw new Error(`Unknown operator ${ast.operator}`);\n    }\n    if (ast.parens) ctx.print(ast, `(`);\n    ast.lhs.visitExpression(this, ctx);\n    ctx.print(ast, ` ${opStr} `);\n    ast.rhs.visitExpression(this, ctx);\n    if (ast.parens) ctx.print(ast, `)`);\n    return null;\n  }\n\n  visitReadPropExpr(ast: o.ReadPropExpr, ctx: EmitterVisitorContext): any {\n    ast.receiver.visitExpression(this, ctx);\n    ctx.print(ast, `.`);\n    ctx.print(ast, ast.name);\n    return null;\n  }\n  visitReadKeyExpr(ast: o.ReadKeyExpr, ctx: EmitterVisitorContext): any {\n    ast.receiver.visitExpression(this, ctx);\n    ctx.print(ast, `[`);\n    ast.index.visitExpression(this, ctx);\n    ctx.print(ast, `]`);\n    return null;\n  }\n  visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `[`);\n    this.visitAllExpressions(ast.entries, ctx, ',');\n    ctx.print(ast, `]`);\n    return null;\n  }\n  visitLiteralMapExpr(ast: o.LiteralMapExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `{`);\n    this.visitAllObjects(entry => {\n      ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`);\n      entry.value.visitExpression(this, ctx);\n    }, ast.entries, ctx, ',');\n    ctx.print(ast, `}`);\n    return null;\n  }\n  visitCommaExpr(ast: o.CommaExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, '(');\n    this.visitAllExpressions(ast.parts, ctx, ',');\n    ctx.print(ast, ')');\n    return null;\n  }\n  visitAllExpressions(expressions: o.Expression[], ctx: EmitterVisitorContext, separator: string):\n      void {\n    this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);\n  }\n\n  visitAllObjects<T>(\n      handler: (t: T) => void, expressions: T[], ctx: EmitterVisitorContext,\n      separator: string): void {\n    let incrementedIndent = false;\n    for (let i = 0; i < expressions.length; i++) {\n      if (i > 0) {\n        if (ctx.lineLength() > 80) {\n          ctx.print(null, separator, true);\n          if (!incrementedIndent) {\n            // continuation are marked with double indent.\n            ctx.incIndent();\n            ctx.incIndent();\n            incrementedIndent = true;\n          }\n        } else {\n          ctx.print(null, separator, false);\n        }\n      }\n      handler(expressions[i]);\n    }\n    if (incrementedIndent) {\n      // continuation are marked with double indent.\n      ctx.decIndent();\n      ctx.decIndent();\n    }\n  }\n\n  visitAllStatements(statements: o.Statement[], ctx: EmitterVisitorContext): void {\n    statements.forEach((stmt) => stmt.visitStatement(this, ctx));\n  }\n}\n\nexport function escapeIdentifier(\n    input: string, escapeDollar: boolean, alwaysQuote: boolean = true): any {\n  if (input == null) {\n    return null;\n  }\n  const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match: string[]) => {\n    if (match[0] == '$') {\n      return escapeDollar ? '\\\\$' : '$';\n    } else if (match[0] == '\\n') {\n      return '\\\\n';\n    } else if (match[0] == '\\r') {\n      return '\\\\r';\n    } else {\n      return `\\\\${match[0]}`;\n    }\n  });\n  const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n  return requiresQuotes ? `'${body}'` : body;\n}\n\nfunction _createIndent(count: number): string {\n  let res = '';\n  for (let i = 0; i < count; i++) {\n    res += _INDENT_WITH;\n  }\n  return res;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {AbstractEmitterVisitor, CATCH_ERROR_VAR, CATCH_STACK_VAR, EmitterVisitorContext} from './abstract_emitter';\nimport * as o from './output_ast';\n\nexport abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor {\n  constructor() { super(false); }\n  visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any {\n    ctx.pushClass(stmt);\n    this._visitClassConstructor(stmt, ctx);\n\n    if (stmt.parent != null) {\n      ctx.print(stmt, `${stmt.name}.prototype = Object.create(`);\n      stmt.parent.visitExpression(this, ctx);\n      ctx.println(stmt, `.prototype);`);\n    }\n    stmt.getters.forEach((getter) => this._visitClassGetter(stmt, getter, ctx));\n    stmt.methods.forEach((method) => this._visitClassMethod(stmt, method, ctx));\n    ctx.popClass();\n    return null;\n  }\n\n  private _visitClassConstructor(stmt: o.ClassStmt, ctx: EmitterVisitorContext) {\n    ctx.print(stmt, `function ${stmt.name}(`);\n    if (stmt.constructorMethod != null) {\n      this._visitParams(stmt.constructorMethod.params, ctx);\n    }\n    ctx.println(stmt, `) {`);\n    ctx.incIndent();\n    if (stmt.constructorMethod != null) {\n      if (stmt.constructorMethod.body.length > 0) {\n        ctx.println(stmt, `var self = this;`);\n        this.visitAllStatements(stmt.constructorMethod.body, ctx);\n      }\n    }\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n  }\n\n  private _visitClassGetter(stmt: o.ClassStmt, getter: o.ClassGetter, ctx: EmitterVisitorContext) {\n    ctx.println(\n        stmt,\n        `Object.defineProperty(${stmt.name}.prototype, '${getter.name}', { get: function() {`);\n    ctx.incIndent();\n    if (getter.body.length > 0) {\n      ctx.println(stmt, `var self = this;`);\n      this.visitAllStatements(getter.body, ctx);\n    }\n    ctx.decIndent();\n    ctx.println(stmt, `}});`);\n  }\n\n  private _visitClassMethod(stmt: o.ClassStmt, method: o.ClassMethod, ctx: EmitterVisitorContext) {\n    ctx.print(stmt, `${stmt.name}.prototype.${method.name} = function(`);\n    this._visitParams(method.params, ctx);\n    ctx.println(stmt, `) {`);\n    ctx.incIndent();\n    if (method.body.length > 0) {\n      ctx.println(stmt, `var self = this;`);\n      this.visitAllStatements(method.body, ctx);\n    }\n    ctx.decIndent();\n    ctx.println(stmt, `};`);\n  }\n\n  visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): any {\n    throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\n  }\n\n  visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): string|null {\n    if (ast.builtin === o.BuiltinVar.This) {\n      ctx.print(ast, 'self');\n    } else if (ast.builtin === o.BuiltinVar.Super) {\n      throw new Error(\n          `'super' needs to be handled at a parent ast node, not at the variable level!`);\n    } else {\n      super.visitReadVarExpr(ast, ctx);\n    }\n    return null;\n  }\n  visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any {\n    ctx.print(stmt, `var ${stmt.name}`);\n    if (stmt.value) {\n      ctx.print(stmt, ' = ');\n      stmt.value.visitExpression(this, ctx);\n    }\n    ctx.println(stmt, `;`);\n    return null;\n  }\n  visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any {\n    ast.value.visitExpression(this, ctx);\n    return null;\n  }\n  visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): string|null {\n    const fnExpr = expr.fn;\n    if (fnExpr instanceof o.ReadVarExpr && fnExpr.builtin === o.BuiltinVar.Super) {\n      ctx.currentClass !.parent !.visitExpression(this, ctx);\n      ctx.print(expr, `.call(this`);\n      if (expr.args.length > 0) {\n        ctx.print(expr, `, `);\n        this.visitAllExpressions(expr.args, ctx, ',');\n      }\n      ctx.print(expr, `)`);\n    } else {\n      super.visitInvokeFunctionExpr(expr, ctx);\n    }\n    return null;\n  }\n  visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);\n    this._visitParams(ast.params, ctx);\n    ctx.println(ast, `) {`);\n    ctx.incIndent();\n    this.visitAllStatements(ast.statements, ctx);\n    ctx.decIndent();\n    ctx.print(ast, `}`);\n    return null;\n  }\n  visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any {\n    ctx.print(stmt, `function ${stmt.name}(`);\n    this._visitParams(stmt.params, ctx);\n    ctx.println(stmt, `) {`);\n    ctx.incIndent();\n    this.visitAllStatements(stmt.statements, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n    return null;\n  }\n  visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any {\n    ctx.println(stmt, `try {`);\n    ctx.incIndent();\n    this.visitAllStatements(stmt.bodyStmts, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `} catch (${CATCH_ERROR_VAR.name}) {`);\n    ctx.incIndent();\n    const catchStmts =\n        [<o.Statement>CATCH_STACK_VAR.set(CATCH_ERROR_VAR.prop('stack')).toDeclStmt(null, [\n          o.StmtModifier.Final\n        ])].concat(stmt.catchStmts);\n    this.visitAllStatements(catchStmts, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n    return null;\n  }\n\n  private _visitParams(params: o.FnParam[], ctx: EmitterVisitorContext): void {\n    this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ',');\n  }\n\n  getBuiltinMethodName(method: o.BuiltinMethod): string {\n    let name: string;\n    switch (method) {\n      case o.BuiltinMethod.ConcatArray:\n        name = 'concat';\n        break;\n      case o.BuiltinMethod.SubscribeObservable:\n        name = 'subscribe';\n        break;\n      case o.BuiltinMethod.Bind:\n        name = 'bind';\n        break;\n      default:\n        throw new Error(`Unknown builtin method: ${method}`);\n    }\n    return name;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {identifierName} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\n\nimport {EmitterVisitorContext} from './abstract_emitter';\nimport {AbstractJsEmitterVisitor} from './abstract_js_emitter';\nimport * as o from './output_ast';\n\n/**\n * A helper class to manage the evaluation of JIT generated code.\n */\nexport class JitEvaluator {\n  /**\n   *\n   * @param sourceUrl The URL of the generated code.\n   * @param statements An array of Angular statement AST nodes to be evaluated.\n   * @param reflector A helper used when converting the statements to executable code.\n   * @param createSourceMaps If true then create a source-map for the generated code and include it\n   * inline as a source-map comment.\n   * @returns A map of all the variables in the generated code.\n   */\n  evaluateStatements(\n      sourceUrl: string, statements: o.Statement[], reflector: CompileReflector,\n      createSourceMaps: boolean): {[key: string]: any} {\n    const converter = new JitEmitterVisitor(reflector);\n    const ctx = EmitterVisitorContext.createRoot();\n    // Ensure generated code is in strict mode\n    if (statements.length > 0 && !isUseStrictStatement(statements[0])) {\n      statements = [\n        o.literal('use strict').toStmt(),\n        ...statements,\n      ];\n    }\n    converter.visitAllStatements(statements, ctx);\n    converter.createReturnStmt(ctx);\n    return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n  }\n\n  /**\n   * Evaluate a piece of JIT generated code.\n   * @param sourceUrl The URL of this generated code.\n   * @param ctx A context object that contains an AST of the code to be evaluated.\n   * @param vars A map containing the names and values of variables that the evaluated code might\n   * reference.\n   * @param createSourceMap If true then create a source-map for the generated code and include it\n   * inline as a source-map comment.\n   * @returns The result of evaluating the code.\n   */\n  evaluateCode(\n      sourceUrl: string, ctx: EmitterVisitorContext, vars: {[key: string]: any},\n      createSourceMap: boolean): any {\n    let fnBody = `\"use strict\";${ctx.toSource()}\\n//# sourceURL=${sourceUrl}`;\n    const fnArgNames: string[] = [];\n    const fnArgValues: any[] = [];\n    for (const argName in vars) {\n      fnArgValues.push(vars[argName]);\n      fnArgNames.push(argName);\n    }\n    if (createSourceMap) {\n      // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n      // E.g. ```\n      // function anonymous(a,b,c\n      // /**/) { ... }```\n      // We don't want to hard code this fact, so we auto detect it via an empty function first.\n      const emptyFn = new Function(...fnArgNames.concat('return null;')).toString();\n      const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n      fnBody += `\\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`;\n    }\n    const fn = new Function(...fnArgNames.concat(fnBody));\n    return this.executeFunction(fn, fnArgValues);\n  }\n\n  /**\n   * Execute a JIT generated function by calling it.\n   *\n   * This method can be overridden in tests to capture the functions that are generated\n   * by this `JitEvaluator` class.\n   *\n   * @param fn A function to execute.\n   * @param args The arguments to pass to the function being executed.\n   * @returns The return value of the executed function.\n   */\n  executeFunction(fn: Function, args: any[]) { return fn(...args); }\n}\n\n/**\n * An Angular AST visitor that converts AST nodes into executable JavaScript code.\n */\nexport class JitEmitterVisitor extends AbstractJsEmitterVisitor {\n  private _evalArgNames: string[] = [];\n  private _evalArgValues: any[] = [];\n  private _evalExportedVars: string[] = [];\n\n  constructor(private reflector: CompileReflector) { super(); }\n\n  createReturnStmt(ctx: EmitterVisitorContext) {\n    const stmt = new o.ReturnStatement(new o.LiteralMapExpr(this._evalExportedVars.map(\n        resultVar => new o.LiteralMapEntry(resultVar, o.variable(resultVar), false))));\n    stmt.visitStatement(this, ctx);\n  }\n\n  getArgs(): {[key: string]: any} {\n    const result: {[key: string]: any} = {};\n    for (let i = 0; i < this._evalArgNames.length; i++) {\n      result[this._evalArgNames[i]] = this._evalArgValues[i];\n    }\n    return result;\n  }\n\n  visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any {\n    this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx);\n    return null;\n  }\n\n  visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): any {\n    this._emitReferenceToExternal(ast, ast.node, ctx);\n    return null;\n  }\n\n  visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      this._evalExportedVars.push(stmt.name);\n    }\n    return super.visitDeclareVarStmt(stmt, ctx);\n  }\n\n  visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      this._evalExportedVars.push(stmt.name);\n    }\n    return super.visitDeclareFunctionStmt(stmt, ctx);\n  }\n\n  visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      this._evalExportedVars.push(stmt.name);\n    }\n    return super.visitDeclareClassStmt(stmt, ctx);\n  }\n\n  private _emitReferenceToExternal(ast: o.Expression, value: any, ctx: EmitterVisitorContext):\n      void {\n    let id = this._evalArgValues.indexOf(value);\n    if (id === -1) {\n      id = this._evalArgValues.length;\n      this._evalArgValues.push(value);\n      const name = identifierName({reference: value}) || 'val';\n      this._evalArgNames.push(`jit_${name}_${id}`);\n    }\n    ctx.print(ast, this._evalArgNames[id]);\n  }\n}\n\n\nfunction isUseStrictStatement(statement: o.Statement): boolean {\n  return statement.isEquivalent(o.literal('use strict').toStmt());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector} from '../compile_reflector';\nimport * as o from '../output/output_ast';\n\n/**\n * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nexport class R3JitReflector implements CompileReflector {\n  constructor(private context: {[key: string]: any}) {}\n\n  resolveExternalReference(ref: o.ExternalReference): any {\n    // This reflector only handles @angular/core imports.\n    if (ref.moduleName !== '@angular/core') {\n      throw new Error(\n          `Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`);\n    }\n    if (!this.context.hasOwnProperty(ref.name !)) {\n      throw new Error(`No value provided for @angular/core symbol '${ref.name!}'.`);\n    }\n    return this.context[ref.name !];\n  }\n\n  parameters(typeOrFunc: any): any[][] { throw new Error('Not implemented.'); }\n\n  annotations(typeOrFunc: any): any[] { throw new Error('Not implemented.'); }\n\n  shallowAnnotations(typeOrFunc: any): any[] { throw new Error('Not implemented.'); }\n\n  tryAnnotations(typeOrFunc: any): any[] { throw new Error('Not implemented.'); }\n\n  propMetadata(typeOrFunc: any): {[key: string]: any[];} { throw new Error('Not implemented.'); }\n\n  hasLifecycleHook(type: any, lcProperty: string): boolean { throw new Error('Not implemented.'); }\n\n  guards(typeOrFunc: any): {[key: string]: any;} { throw new Error('Not implemented.'); }\n\n  componentModuleUrl(type: any, cmpMetadata: any): string { throw new Error('Not implemented.'); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileShallowModuleMetadata, identifierName} from '../compile_metadata';\nimport {InjectableCompiler} from '../injectable_compiler';\nimport {mapLiteral} from '../output/map_util';\nimport * as o from '../output/output_ast';\nimport {OutputContext} from '../util';\n\nimport {R3DependencyMetadata, compileFactoryFunction} from './r3_factory';\nimport {Identifiers as R3} from './r3_identifiers';\nimport {R3Reference, convertMetaToOutput, mapToMapExpression} from './util';\n\nexport interface R3NgModuleDef {\n  expression: o.Expression;\n  type: o.Type;\n  additionalStatements: o.Statement[];\n}\n\n/**\n * Metadata required by the module compiler to generate a `ngModuleDef` for a type.\n */\nexport interface R3NgModuleMetadata {\n  /**\n   * An expression representing the module type being compiled.\n   */\n  type: o.Expression;\n\n  /**\n   * An array of expressions representing the bootstrap components specified by the module.\n   */\n  bootstrap: R3Reference[];\n\n  /**\n   * An array of expressions representing the directives and pipes declared by the module.\n   */\n  declarations: R3Reference[];\n\n  /**\n   * An array of expressions representing the imports of the module.\n   */\n  imports: R3Reference[];\n\n  /**\n   * An array of expressions representing the exports of the module.\n   */\n  exports: R3Reference[];\n\n  /**\n   * Whether to emit the selector scope values (declarations, imports, exports) inline into the\n   * module definition, or to generate additional statements which patch them on. Inline emission\n   * does not allow components to be tree-shaken, but is useful for JIT mode.\n   */\n  emitInline: boolean;\n\n  /**\n   * Whether to generate closure wrappers for bootstrap, declarations, imports, and exports.\n   */\n  containsForwardDecls: boolean;\n\n  /**\n   * The set of schemas that declare elements to be allowed in the NgModule.\n   */\n  schemas: R3Reference[]|null;\n\n  /** Unique ID or expression representing the unique ID of an NgModule. */\n  id: o.Expression|null;\n}\n\n/**\n * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nexport function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {\n  const {\n    type: moduleType,\n    bootstrap,\n    declarations,\n    imports,\n    exports,\n    schemas,\n    containsForwardDecls,\n    emitInline,\n    id\n  } = meta;\n\n  const additionalStatements: o.Statement[] = [];\n  const definitionMap = {\n    type: moduleType\n  } as{\n    type: o.Expression,\n    bootstrap: o.Expression,\n    declarations: o.Expression,\n    imports: o.Expression,\n    exports: o.Expression,\n    schemas: o.LiteralArrayExpr,\n    id: o.Expression\n  };\n\n  // Only generate the keys in the metadata if the arrays have values.\n  if (bootstrap.length) {\n    definitionMap.bootstrap = refsToArray(bootstrap, containsForwardDecls);\n  }\n\n  // If requested to emit scope information inline, pass the declarations, imports and exports to\n  // the `ÉµÉµdefineNgModule` call. The JIT compilation uses this.\n  if (emitInline) {\n    if (declarations.length) {\n      definitionMap.declarations = refsToArray(declarations, containsForwardDecls);\n    }\n\n    if (imports.length) {\n      definitionMap.imports = refsToArray(imports, containsForwardDecls);\n    }\n\n    if (exports.length) {\n      definitionMap.exports = refsToArray(exports, containsForwardDecls);\n    }\n  }\n\n  // If not emitting inline, the scope information is not passed into `ÉµÉµdefineNgModule` as it would\n  // prevent tree-shaking of the declarations, imports and exports references.\n  else {\n    const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);\n    if (setNgModuleScopeCall !== null) {\n      additionalStatements.push(setNgModuleScopeCall);\n    }\n  }\n\n  if (schemas && schemas.length) {\n    definitionMap.schemas = o.literalArr(schemas.map(ref => ref.value));\n  }\n\n  if (id) {\n    definitionMap.id = id;\n  }\n\n  const expression = o.importExpr(R3.defineNgModule).callFn([mapToMapExpression(definitionMap)]);\n  const type = new o.ExpressionType(o.importExpr(R3.NgModuleDefWithMeta, [\n    new o.ExpressionType(moduleType), tupleTypeOf(declarations), tupleTypeOf(imports),\n    tupleTypeOf(exports)\n  ]));\n\n\n  return {expression, type, additionalStatements};\n}\n\n/**\n * Generates a function call to `ÉµÉµsetNgModuleScope` with all necessary information so that the\n * transitive module scope can be computed during runtime in JIT mode. This call is marked pure\n * such that the references to declarations, imports and exports may be elided causing these\n * symbols to become tree-shakeable.\n */\nfunction generateSetNgModuleScopeCall(meta: R3NgModuleMetadata): o.Statement|null {\n  const {type: moduleType, declarations, imports, exports, containsForwardDecls} = meta;\n\n  const scopeMap = {} as{\n    declarations: o.Expression,\n    imports: o.Expression,\n    exports: o.Expression,\n  };\n\n  if (declarations.length) {\n    scopeMap.declarations = refsToArray(declarations, containsForwardDecls);\n  }\n\n  if (imports.length) {\n    scopeMap.imports = refsToArray(imports, containsForwardDecls);\n  }\n\n  if (exports.length) {\n    scopeMap.exports = refsToArray(exports, containsForwardDecls);\n  }\n\n  if (Object.keys(scopeMap).length === 0) {\n    return null;\n  }\n\n  const fnCall = new o.InvokeFunctionExpr(\n      /* fn */ o.importExpr(R3.setNgModuleScope),\n      /* args */[moduleType, mapToMapExpression(scopeMap)],\n      /* type */ undefined,\n      /* sourceSpan */ undefined,\n      /* pure */ true);\n  return fnCall.toStmt();\n}\n\nexport interface R3InjectorDef {\n  expression: o.Expression;\n  type: o.Type;\n  statements: o.Statement[];\n}\n\nexport interface R3InjectorMetadata {\n  name: string;\n  type: o.Expression;\n  deps: R3DependencyMetadata[]|null;\n  providers: o.Expression|null;\n  imports: o.Expression[];\n}\n\nexport function compileInjector(meta: R3InjectorMetadata): R3InjectorDef {\n  const result = compileFactoryFunction({\n    name: meta.name,\n    type: meta.type,\n    deps: meta.deps,\n    injectFn: R3.inject,\n  });\n  const definitionMap = {\n    factory: result.factory,\n  } as{factory: o.Expression, providers: o.Expression, imports: o.Expression};\n\n  if (meta.providers !== null) {\n    definitionMap.providers = meta.providers;\n  }\n\n  if (meta.imports.length > 0) {\n    definitionMap.imports = o.literalArr(meta.imports);\n  }\n\n  const expression = o.importExpr(R3.defineInjector).callFn([mapToMapExpression(definitionMap)]);\n  const type =\n      new o.ExpressionType(o.importExpr(R3.InjectorDef, [new o.ExpressionType(meta.type)]));\n  return {expression, type, statements: result.statements};\n}\n\n// TODO(alxhub): integrate this with `compileNgModule`. Currently the two are separate operations.\nexport function compileNgModuleFromRender2(\n    ctx: OutputContext, ngModule: CompileShallowModuleMetadata,\n    injectableCompiler: InjectableCompiler): void {\n  const className = identifierName(ngModule.type) !;\n\n  const rawImports = ngModule.rawImports ? [ngModule.rawImports] : [];\n  const rawExports = ngModule.rawExports ? [ngModule.rawExports] : [];\n\n  const injectorDefArg = mapLiteral({\n    'factory':\n        injectableCompiler.factoryFor({type: ngModule.type, symbol: ngModule.type.reference}, ctx),\n    'providers': convertMetaToOutput(ngModule.rawProviders, ctx),\n    'imports': convertMetaToOutput([...rawImports, ...rawExports], ctx),\n  });\n\n  const injectorDef = o.importExpr(R3.defineInjector).callFn([injectorDefArg]);\n\n  ctx.statements.push(new o.ClassStmt(\n      /* name */ className,\n      /* parent */ null,\n      /* fields */[new o.ClassField(\n          /* name */ 'ngInjectorDef',\n          /* type */ o.INFERRED_TYPE,\n          /* modifiers */[o.StmtModifier.Static],\n          /* initializer */ injectorDef, )],\n      /* getters */[],\n      /* constructorMethod */ new o.ClassMethod(null, [], []),\n      /* methods */[]));\n}\n\nfunction accessExportScope(module: o.Expression): o.Expression {\n  const selectorScope = new o.ReadPropExpr(module, 'ngModuleDef');\n  return new o.ReadPropExpr(selectorScope, 'exported');\n}\n\nfunction tupleTypeOf(exp: R3Reference[]): o.Type {\n  const types = exp.map(ref => o.typeofExpr(ref.type));\n  return exp.length > 0 ? o.expressionType(o.literalArr(types)) : o.NONE_TYPE;\n}\n\nfunction refsToArray(refs: R3Reference[], shouldForwardDeclare: boolean): o.Expression {\n  const values = o.literalArr(refs.map(ref => ref.value));\n  return shouldForwardDeclare ? o.fn([], [new o.ReturnStatement(values)]) : values;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompilePipeMetadata, identifierName} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {DefinitionKind} from '../constant_pool';\nimport * as o from '../output/output_ast';\nimport {OutputContext, error} from '../util';\n\nimport {R3DependencyMetadata, compileFactoryFunction, dependenciesFromGlobalMetadata} from './r3_factory';\nimport {Identifiers as R3} from './r3_identifiers';\nimport {typeWithParameters} from './util';\n\nexport interface R3PipeMetadata {\n  /**\n   * Name of the pipe type.\n   */\n  name: string;\n\n  /**\n   * An expression representing a reference to the pipe itself.\n   */\n  type: o.Expression;\n\n  /**\n   * Number of generic type parameters of the type itself.\n   */\n  typeArgumentCount: number;\n\n  /**\n   * Name of the pipe.\n   */\n  pipeName: string;\n\n  /**\n   * Dependencies of the pipe's constructor.\n   */\n  deps: R3DependencyMetadata[]|null;\n\n  /**\n   * Whether the pipe is marked as pure.\n   */\n  pure: boolean;\n}\n\nexport function compilePipeFromMetadata(metadata: R3PipeMetadata) {\n  const definitionMapValues: {key: string, quoted: boolean, value: o.Expression}[] = [];\n\n  // e.g. `name: 'myPipe'`\n  definitionMapValues.push({key: 'name', value: o.literal(metadata.pipeName), quoted: false});\n\n  // e.g. `type: MyPipe`\n  definitionMapValues.push({key: 'type', value: metadata.type, quoted: false});\n\n  const templateFactory = compileFactoryFunction(\n      {\n        name: metadata.name,\n        type: metadata.type,\n        deps: metadata.deps,\n        injectFn: R3.directiveInject,\n      },\n      true);\n  definitionMapValues.push({key: 'factory', value: templateFactory.factory, quoted: false});\n\n  // e.g. `pure: true`\n  definitionMapValues.push({key: 'pure', value: o.literal(metadata.pure), quoted: false});\n\n  const expression = o.importExpr(R3.definePipe).callFn([o.literalMap(definitionMapValues)]);\n  const type = new o.ExpressionType(o.importExpr(R3.PipeDefWithMeta, [\n    typeWithParameters(metadata.type, metadata.typeArgumentCount),\n    new o.ExpressionType(new o.LiteralExpr(metadata.pipeName)),\n  ]));\n  return {expression, type, statements: templateFactory.statements};\n}\n\n/**\n * Write a pipe definition to the output context.\n */\nexport function compilePipeFromRender2(\n    outputCtx: OutputContext, pipe: CompilePipeMetadata, reflector: CompileReflector) {\n  const definitionMapValues: {key: string, quoted: boolean, value: o.Expression}[] = [];\n\n  const name = identifierName(pipe.type);\n  if (!name) {\n    return error(`Cannot resolve the name of ${pipe.type}`);\n  }\n\n  const metadata: R3PipeMetadata = {\n    name,\n    pipeName: pipe.name,\n    type: outputCtx.importExpr(pipe.type.reference),\n    typeArgumentCount: 0,\n    deps: dependenciesFromGlobalMetadata(pipe.type, outputCtx, reflector),\n    pure: pipe.pure,\n  };\n\n  const res = compilePipeFromMetadata(metadata);\n\n  const definitionField = outputCtx.constantPool.propertyNameOf(DefinitionKind.Pipe);\n\n  outputCtx.statements.push(new o.ClassStmt(\n      /* name */ name,\n      /* parent */ null,\n      /* fields */[new o.ClassField(\n          /* name */ definitionField,\n          /* type */ o.INFERRED_TYPE,\n          /* modifiers */[o.StmtModifier.Static],\n          /* initializer */ res.expression)],\n      /* getters */[],\n      /* constructorMethod */ new o.ClassMethod(null, [], []),\n      /* methods */[]));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SecurityContext} from '../core';\nimport {ParseSourceSpan} from '../parse_util';\n\nexport class ParserError {\n  public message: string;\n  constructor(\n      message: string, public input: string, public errLocation: string, public ctxLocation?: any) {\n    this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;\n  }\n}\n\nexport class ParseSpan {\n  constructor(public start: number, public end: number) {}\n}\n\nexport class AST {\n  constructor(public span: ParseSpan) {}\n  visit(visitor: AstVisitor, context: any = null): any { return null; }\n  toString(): string { return 'AST'; }\n}\n\n/**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\nexport class Quote extends AST {\n  constructor(\n      span: ParseSpan, public prefix: string, public uninterpretedExpression: string,\n      public location: any) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any { return visitor.visitQuote(this, context); }\n  toString(): string { return 'Quote'; }\n}\n\nexport class EmptyExpr extends AST {\n  visit(visitor: AstVisitor, context: any = null) {\n    // do nothing\n  }\n}\n\nexport class ImplicitReceiver extends AST {\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitImplicitReceiver(this, context);\n  }\n}\n\n/**\n * Multiple expressions separated by a semicolon.\n */\nexport class Chain extends AST {\n  constructor(span: ParseSpan, public expressions: any[]) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any { return visitor.visitChain(this, context); }\n}\n\nexport class Conditional extends AST {\n  constructor(span: ParseSpan, public condition: AST, public trueExp: AST, public falseExp: AST) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitConditional(this, context);\n  }\n}\n\nexport class PropertyRead extends AST {\n  constructor(span: ParseSpan, public receiver: AST, public name: string) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitPropertyRead(this, context);\n  }\n}\n\nexport class PropertyWrite extends AST {\n  constructor(span: ParseSpan, public receiver: AST, public name: string, public value: AST) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitPropertyWrite(this, context);\n  }\n}\n\nexport class SafePropertyRead extends AST {\n  constructor(span: ParseSpan, public receiver: AST, public name: string) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitSafePropertyRead(this, context);\n  }\n}\n\nexport class KeyedRead extends AST {\n  constructor(span: ParseSpan, public obj: AST, public key: AST) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitKeyedRead(this, context);\n  }\n}\n\nexport class KeyedWrite extends AST {\n  constructor(span: ParseSpan, public obj: AST, public key: AST, public value: AST) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitKeyedWrite(this, context);\n  }\n}\n\nexport class BindingPipe extends AST {\n  constructor(span: ParseSpan, public exp: AST, public name: string, public args: any[]) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any { return visitor.visitPipe(this, context); }\n}\n\nexport class LiteralPrimitive extends AST {\n  constructor(span: ParseSpan, public value: any) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitLiteralPrimitive(this, context);\n  }\n}\n\nexport class LiteralArray extends AST {\n  constructor(span: ParseSpan, public expressions: any[]) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitLiteralArray(this, context);\n  }\n}\n\nexport type LiteralMapKey = {\n  key: string; quoted: boolean;\n};\n\nexport class LiteralMap extends AST {\n  constructor(span: ParseSpan, public keys: LiteralMapKey[], public values: any[]) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitLiteralMap(this, context);\n  }\n}\n\nexport class Interpolation extends AST {\n  constructor(span: ParseSpan, public strings: any[], public expressions: any[]) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitInterpolation(this, context);\n  }\n}\n\nexport class Binary extends AST {\n  constructor(span: ParseSpan, public operation: string, public left: AST, public right: AST) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitBinary(this, context);\n  }\n}\n\nexport class PrefixNot extends AST {\n  constructor(span: ParseSpan, public expression: AST) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitPrefixNot(this, context);\n  }\n}\n\nexport class NonNullAssert extends AST {\n  constructor(span: ParseSpan, public expression: AST) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitNonNullAssert(this, context);\n  }\n}\n\nexport class MethodCall extends AST {\n  constructor(span: ParseSpan, public receiver: AST, public name: string, public args: any[]) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitMethodCall(this, context);\n  }\n}\n\nexport class SafeMethodCall extends AST {\n  constructor(span: ParseSpan, public receiver: AST, public name: string, public args: any[]) {\n    super(span);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitSafeMethodCall(this, context);\n  }\n}\n\nexport class FunctionCall extends AST {\n  constructor(span: ParseSpan, public target: AST|null, public args: any[]) { super(span); }\n  visit(visitor: AstVisitor, context: any = null): any {\n    return visitor.visitFunctionCall(this, context);\n  }\n}\n\n/**\n * Records the absolute position of a text span in a source file, where `start` and `end` are the\n * starting and ending byte offsets, respectively, of the text span in a source file.\n */\nexport class AbsoluteSourceSpan {\n  constructor(public start: number, public end: number) {}\n}\n\nexport class ASTWithSource extends AST {\n  public sourceSpan: AbsoluteSourceSpan;\n  constructor(\n      public ast: AST, public source: string|null, public location: string, absoluteOffset: number,\n      public errors: ParserError[]) {\n    super(new ParseSpan(0, source == null ? 0 : source.length));\n    this.sourceSpan = new AbsoluteSourceSpan(absoluteOffset, absoluteOffset + this.span.end);\n  }\n  visit(visitor: AstVisitor, context: any = null): any {\n    if (visitor.visitASTWithSource) {\n      return visitor.visitASTWithSource(this, context);\n    }\n    return this.ast.visit(visitor, context);\n  }\n  toString(): string { return `${this.source} in ${this.location}`; }\n}\n\nexport class TemplateBinding {\n  constructor(\n      public span: ParseSpan, public key: string, public keyIsVar: boolean, public name: string,\n      public expression: ASTWithSource|null) {}\n}\n\nexport interface AstVisitor {\n  visitBinary(ast: Binary, context: any): any;\n  visitChain(ast: Chain, context: any): any;\n  visitConditional(ast: Conditional, context: any): any;\n  visitFunctionCall(ast: FunctionCall, context: any): any;\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any): any;\n  visitInterpolation(ast: Interpolation, context: any): any;\n  visitKeyedRead(ast: KeyedRead, context: any): any;\n  visitKeyedWrite(ast: KeyedWrite, context: any): any;\n  visitLiteralArray(ast: LiteralArray, context: any): any;\n  visitLiteralMap(ast: LiteralMap, context: any): any;\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;\n  visitMethodCall(ast: MethodCall, context: any): any;\n  visitPipe(ast: BindingPipe, context: any): any;\n  visitPrefixNot(ast: PrefixNot, context: any): any;\n  visitNonNullAssert(ast: NonNullAssert, context: any): any;\n  visitPropertyRead(ast: PropertyRead, context: any): any;\n  visitPropertyWrite(ast: PropertyWrite, context: any): any;\n  visitQuote(ast: Quote, context: any): any;\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): any;\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): any;\n  visitASTWithSource?(ast: ASTWithSource, context: any): any;\n  visit?(ast: AST, context?: any): any;\n}\n\nexport class NullAstVisitor implements AstVisitor {\n  visitBinary(ast: Binary, context: any): any {}\n  visitChain(ast: Chain, context: any): any {}\n  visitConditional(ast: Conditional, context: any): any {}\n  visitFunctionCall(ast: FunctionCall, context: any): any {}\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any): any {}\n  visitInterpolation(ast: Interpolation, context: any): any {}\n  visitKeyedRead(ast: KeyedRead, context: any): any {}\n  visitKeyedWrite(ast: KeyedWrite, context: any): any {}\n  visitLiteralArray(ast: LiteralArray, context: any): any {}\n  visitLiteralMap(ast: LiteralMap, context: any): any {}\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any {}\n  visitMethodCall(ast: MethodCall, context: any): any {}\n  visitPipe(ast: BindingPipe, context: any): any {}\n  visitPrefixNot(ast: PrefixNot, context: any): any {}\n  visitNonNullAssert(ast: NonNullAssert, context: any): any {}\n  visitPropertyRead(ast: PropertyRead, context: any): any {}\n  visitPropertyWrite(ast: PropertyWrite, context: any): any {}\n  visitQuote(ast: Quote, context: any): any {}\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): any {}\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): any {}\n}\n\nexport class RecursiveAstVisitor implements AstVisitor {\n  visitBinary(ast: Binary, context: any): any {\n    ast.left.visit(this, context);\n    ast.right.visit(this, context);\n    return null;\n  }\n  visitChain(ast: Chain, context: any): any { return this.visitAll(ast.expressions, context); }\n  visitConditional(ast: Conditional, context: any): any {\n    ast.condition.visit(this, context);\n    ast.trueExp.visit(this, context);\n    ast.falseExp.visit(this, context);\n    return null;\n  }\n  visitPipe(ast: BindingPipe, context: any): any {\n    ast.exp.visit(this, context);\n    this.visitAll(ast.args, context);\n    return null;\n  }\n  visitFunctionCall(ast: FunctionCall, context: any): any {\n    ast.target !.visit(this, context);\n    this.visitAll(ast.args, context);\n    return null;\n  }\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any): any { return null; }\n  visitInterpolation(ast: Interpolation, context: any): any {\n    return this.visitAll(ast.expressions, context);\n  }\n  visitKeyedRead(ast: KeyedRead, context: any): any {\n    ast.obj.visit(this, context);\n    ast.key.visit(this, context);\n    return null;\n  }\n  visitKeyedWrite(ast: KeyedWrite, context: any): any {\n    ast.obj.visit(this, context);\n    ast.key.visit(this, context);\n    ast.value.visit(this, context);\n    return null;\n  }\n  visitLiteralArray(ast: LiteralArray, context: any): any {\n    return this.visitAll(ast.expressions, context);\n  }\n  visitLiteralMap(ast: LiteralMap, context: any): any { return this.visitAll(ast.values, context); }\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any { return null; }\n  visitMethodCall(ast: MethodCall, context: any): any {\n    ast.receiver.visit(this, context);\n    return this.visitAll(ast.args, context);\n  }\n  visitPrefixNot(ast: PrefixNot, context: any): any {\n    ast.expression.visit(this, context);\n    return null;\n  }\n  visitNonNullAssert(ast: NonNullAssert, context: any): any {\n    ast.expression.visit(this, context);\n    return null;\n  }\n  visitPropertyRead(ast: PropertyRead, context: any): any {\n    ast.receiver.visit(this, context);\n    return null;\n  }\n  visitPropertyWrite(ast: PropertyWrite, context: any): any {\n    ast.receiver.visit(this, context);\n    ast.value.visit(this, context);\n    return null;\n  }\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): any {\n    ast.receiver.visit(this, context);\n    return null;\n  }\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): any {\n    ast.receiver.visit(this, context);\n    return this.visitAll(ast.args, context);\n  }\n  visitAll(asts: AST[], context: any): any {\n    asts.forEach(ast => ast.visit(this, context));\n    return null;\n  }\n  visitQuote(ast: Quote, context: any): any { return null; }\n}\n\nexport class AstTransformer implements AstVisitor {\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any): AST { return ast; }\n\n  visitInterpolation(ast: Interpolation, context: any): AST {\n    return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));\n  }\n\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): AST {\n    return new LiteralPrimitive(ast.span, ast.value);\n  }\n\n  visitPropertyRead(ast: PropertyRead, context: any): AST {\n    return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n  }\n\n  visitPropertyWrite(ast: PropertyWrite, context: any): AST {\n    return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n  }\n\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): AST {\n    return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n  }\n\n  visitMethodCall(ast: MethodCall, context: any): AST {\n    return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n  }\n\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): AST {\n    return new SafeMethodCall(\n        ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n  }\n\n  visitFunctionCall(ast: FunctionCall, context: any): AST {\n    return new FunctionCall(ast.span, ast.target !.visit(this), this.visitAll(ast.args));\n  }\n\n  visitLiteralArray(ast: LiteralArray, context: any): AST {\n    return new LiteralArray(ast.span, this.visitAll(ast.expressions));\n  }\n\n  visitLiteralMap(ast: LiteralMap, context: any): AST {\n    return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));\n  }\n\n  visitBinary(ast: Binary, context: any): AST {\n    return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));\n  }\n\n  visitPrefixNot(ast: PrefixNot, context: any): AST {\n    return new PrefixNot(ast.span, ast.expression.visit(this));\n  }\n\n  visitNonNullAssert(ast: NonNullAssert, context: any): AST {\n    return new NonNullAssert(ast.span, ast.expression.visit(this));\n  }\n\n  visitConditional(ast: Conditional, context: any): AST {\n    return new Conditional(\n        ast.span, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n  }\n\n  visitPipe(ast: BindingPipe, context: any): AST {\n    return new BindingPipe(ast.span, ast.exp.visit(this), ast.name, this.visitAll(ast.args));\n  }\n\n  visitKeyedRead(ast: KeyedRead, context: any): AST {\n    return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));\n  }\n\n  visitKeyedWrite(ast: KeyedWrite, context: any): AST {\n    return new KeyedWrite(\n        ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));\n  }\n\n  visitAll(asts: any[]): any[] {\n    const res = new Array(asts.length);\n    for (let i = 0; i < asts.length; ++i) {\n      res[i] = asts[i].visit(this);\n    }\n    return res;\n  }\n\n  visitChain(ast: Chain, context: any): AST {\n    return new Chain(ast.span, this.visitAll(ast.expressions));\n  }\n\n  visitQuote(ast: Quote, context: any): AST {\n    return new Quote(ast.span, ast.prefix, ast.uninterpretedExpression, ast.location);\n  }\n}\n\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nexport class AstMemoryEfficientTransformer implements AstVisitor {\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any): AST { return ast; }\n\n  visitInterpolation(ast: Interpolation, context: any): Interpolation {\n    const expressions = this.visitAll(ast.expressions);\n    if (expressions !== ast.expressions)\n      return new Interpolation(ast.span, ast.strings, expressions);\n    return ast;\n  }\n\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): AST { return ast; }\n\n  visitPropertyRead(ast: PropertyRead, context: any): AST {\n    const receiver = ast.receiver.visit(this);\n    if (receiver !== ast.receiver) {\n      return new PropertyRead(ast.span, receiver, ast.name);\n    }\n    return ast;\n  }\n\n  visitPropertyWrite(ast: PropertyWrite, context: any): AST {\n    const receiver = ast.receiver.visit(this);\n    const value = ast.value.visit(this);\n    if (receiver !== ast.receiver || value !== ast.value) {\n      return new PropertyWrite(ast.span, receiver, ast.name, value);\n    }\n    return ast;\n  }\n\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): AST {\n    const receiver = ast.receiver.visit(this);\n    if (receiver !== ast.receiver) {\n      return new SafePropertyRead(ast.span, receiver, ast.name);\n    }\n    return ast;\n  }\n\n  visitMethodCall(ast: MethodCall, context: any): AST {\n    const receiver = ast.receiver.visit(this);\n    const args = this.visitAll(ast.args);\n    if (receiver !== ast.receiver || args !== ast.args) {\n      return new MethodCall(ast.span, receiver, ast.name, args);\n    }\n    return ast;\n  }\n\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): AST {\n    const receiver = ast.receiver.visit(this);\n    const args = this.visitAll(ast.args);\n    if (receiver !== ast.receiver || args !== ast.args) {\n      return new SafeMethodCall(ast.span, receiver, ast.name, args);\n    }\n    return ast;\n  }\n\n  visitFunctionCall(ast: FunctionCall, context: any): AST {\n    const target = ast.target && ast.target.visit(this);\n    const args = this.visitAll(ast.args);\n    if (target !== ast.target || args !== ast.args) {\n      return new FunctionCall(ast.span, target, args);\n    }\n    return ast;\n  }\n\n  visitLiteralArray(ast: LiteralArray, context: any): AST {\n    const expressions = this.visitAll(ast.expressions);\n    if (expressions !== ast.expressions) {\n      return new LiteralArray(ast.span, expressions);\n    }\n    return ast;\n  }\n\n  visitLiteralMap(ast: LiteralMap, context: any): AST {\n    const values = this.visitAll(ast.values);\n    if (values !== ast.values) {\n      return new LiteralMap(ast.span, ast.keys, values);\n    }\n    return ast;\n  }\n\n  visitBinary(ast: Binary, context: any): AST {\n    const left = ast.left.visit(this);\n    const right = ast.right.visit(this);\n    if (left !== ast.left || right !== ast.right) {\n      return new Binary(ast.span, ast.operation, left, right);\n    }\n    return ast;\n  }\n\n  visitPrefixNot(ast: PrefixNot, context: any): AST {\n    const expression = ast.expression.visit(this);\n    if (expression !== ast.expression) {\n      return new PrefixNot(ast.span, expression);\n    }\n    return ast;\n  }\n\n  visitNonNullAssert(ast: NonNullAssert, context: any): AST {\n    const expression = ast.expression.visit(this);\n    if (expression !== ast.expression) {\n      return new NonNullAssert(ast.span, expression);\n    }\n    return ast;\n  }\n\n  visitConditional(ast: Conditional, context: any): AST {\n    const condition = ast.condition.visit(this);\n    const trueExp = ast.trueExp.visit(this);\n    const falseExp = ast.falseExp.visit(this);\n    if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {\n      return new Conditional(ast.span, condition, trueExp, falseExp);\n    }\n    return ast;\n  }\n\n  visitPipe(ast: BindingPipe, context: any): AST {\n    const exp = ast.exp.visit(this);\n    const args = this.visitAll(ast.args);\n    if (exp !== ast.exp || args !== ast.args) {\n      return new BindingPipe(ast.span, exp, ast.name, args);\n    }\n    return ast;\n  }\n\n  visitKeyedRead(ast: KeyedRead, context: any): AST {\n    const obj = ast.obj.visit(this);\n    const key = ast.key.visit(this);\n    if (obj !== ast.obj || key !== ast.key) {\n      return new KeyedRead(ast.span, obj, key);\n    }\n    return ast;\n  }\n\n  visitKeyedWrite(ast: KeyedWrite, context: any): AST {\n    const obj = ast.obj.visit(this);\n    const key = ast.key.visit(this);\n    const value = ast.value.visit(this);\n    if (obj !== ast.obj || key !== ast.key || value !== ast.value) {\n      return new KeyedWrite(ast.span, obj, key, value);\n    }\n    return ast;\n  }\n\n  visitAll(asts: any[]): any[] {\n    const res = new Array(asts.length);\n    let modified = false;\n    for (let i = 0; i < asts.length; ++i) {\n      const original = asts[i];\n      const value = original.visit(this);\n      res[i] = value;\n      modified = modified || value !== original;\n    }\n    return modified ? res : asts;\n  }\n\n  visitChain(ast: Chain, context: any): AST {\n    const expressions = this.visitAll(ast.expressions);\n    if (expressions !== ast.expressions) {\n      return new Chain(ast.span, expressions);\n    }\n    return ast;\n  }\n\n  visitQuote(ast: Quote, context: any): AST { return ast; }\n}\n\nexport function visitAstChildren(ast: AST, visitor: AstVisitor, context?: any) {\n  function visit(ast: AST) {\n    visitor.visit && visitor.visit(ast, context) || ast.visit(visitor, context);\n  }\n\n  function visitAll<T extends AST>(asts: T[]) { asts.forEach(visit); }\n\n  ast.visit({\n    visitBinary(ast) {\n      visit(ast.left);\n      visit(ast.right);\n    },\n    visitChain(ast) { visitAll(ast.expressions); },\n    visitConditional(ast) {\n      visit(ast.condition);\n      visit(ast.trueExp);\n      visit(ast.falseExp);\n    },\n    visitFunctionCall(ast) {\n      if (ast.target) {\n        visit(ast.target);\n      }\n      visitAll(ast.args);\n    },\n    visitImplicitReceiver(ast) {},\n    visitInterpolation(ast) { visitAll(ast.expressions); },\n    visitKeyedRead(ast) {\n      visit(ast.obj);\n      visit(ast.key);\n    },\n    visitKeyedWrite(ast) {\n      visit(ast.obj);\n      visit(ast.key);\n      visit(ast.obj);\n    },\n    visitLiteralArray(ast) { visitAll(ast.expressions); },\n    visitLiteralMap(ast) {},\n    visitLiteralPrimitive(ast) {},\n    visitMethodCall(ast) {\n      visit(ast.receiver);\n      visitAll(ast.args);\n    },\n    visitPipe(ast) {\n      visit(ast.exp);\n      visitAll(ast.args);\n    },\n    visitPrefixNot(ast) { visit(ast.expression); },\n    visitNonNullAssert(ast) { visit(ast.expression); },\n    visitPropertyRead(ast) { visit(ast.receiver); },\n    visitPropertyWrite(ast) {\n      visit(ast.receiver);\n      visit(ast.value);\n    },\n    visitQuote(ast) {},\n    visitSafeMethodCall(ast) {\n      visit(ast.receiver);\n      visitAll(ast.args);\n    },\n    visitSafePropertyRead(ast) { visit(ast.receiver); },\n  });\n}\n\n\n// Bindings\n\nexport class ParsedProperty {\n  public readonly isLiteral: boolean;\n  public readonly isAnimation: boolean;\n\n  constructor(\n      public name: string, public expression: ASTWithSource, public type: ParsedPropertyType,\n      public sourceSpan: ParseSourceSpan, public valueSpan?: ParseSourceSpan) {\n    this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;\n    this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n  }\n}\n\nexport enum ParsedPropertyType {\n  DEFAULT,\n  LITERAL_ATTR,\n  ANIMATION\n}\n\nexport const enum ParsedEventType {\n  // DOM or Directive event\n  Regular,\n  // Animation specific event\n  Animation,\n}\n\nexport class ParsedEvent {\n  // Regular events have a target\n  // Animation events have a phase\n  constructor(\n      public name: string, public targetOrPhase: string, public type: ParsedEventType,\n      public handler: AST, public sourceSpan: ParseSourceSpan,\n      public handlerSpan: ParseSourceSpan) {}\n}\n\nexport class ParsedVariable {\n  constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {}\n}\n\nexport const enum BindingType {\n  // A regular binding to a property (e.g. `[property]=\"expression\"`).\n  Property,\n  // A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n  Attribute,\n  // A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n  Class,\n  // A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n  Style,\n  // A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n  Animation,\n}\n\nexport class BoundElementProperty {\n  constructor(\n      public name: string, public type: BindingType, public securityContext: SecurityContext,\n      public value: AST, public unit: string|null, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as cdAst from '../expression_parser/ast';\nimport {Identifiers} from '../identifiers';\nimport * as o from '../output/output_ast';\nimport {ParseSourceSpan} from '../parse_util';\n\nexport class EventHandlerVars { static event = o.variable('$event'); }\n\nexport interface LocalResolver {\n  getLocal(name: string): o.Expression|null;\n  notifyImplicitReceiverUse(): void;\n}\n\nexport class ConvertActionBindingResult {\n  /**\n   * Store statements which are render3 compatible.\n   */\n  render3Stmts: o.Statement[];\n  constructor(\n      /**\n       * Render2 compatible statements,\n       */\n      public stmts: o.Statement[],\n      /**\n       * Variable name used with render2 compatible statements.\n       */\n      public allowDefault: o.ReadVarExpr) {\n    /**\n     * This is bit of a hack. It converts statements which render2 expects to statements which are\n     * expected by render3.\n     *\n     * Example: `<div click=\"doSomething($event)\">` will generate:\n     *\n     * Render3:\n     * ```\n     * const pd_b:any = ((<any>ctx.doSomething($event)) !== false);\n     * return pd_b;\n     * ```\n     *\n     * but render2 expects:\n     * ```\n     * return ctx.doSomething($event);\n     * ```\n     */\n    // TODO(misko): remove this hack once we no longer support ViewEngine.\n    this.render3Stmts = stmts.map((statement: o.Statement) => {\n      if (statement instanceof o.DeclareVarStmt && statement.name == allowDefault.name &&\n          statement.value instanceof o.BinaryOperatorExpr) {\n        const lhs = statement.value.lhs as o.CastExpr;\n        return new o.ReturnStatement(lhs.value);\n      }\n      return statement;\n    });\n  }\n}\n\nexport type InterpolationFunction = (args: o.Expression[]) => o.Expression;\n\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nexport function convertActionBinding(\n    localResolver: LocalResolver | null, implicitReceiver: o.Expression, action: cdAst.AST,\n    bindingId: string, interpolationFunction?: InterpolationFunction,\n    baseSourceSpan?: ParseSourceSpan): ConvertActionBindingResult {\n  if (!localResolver) {\n    localResolver = new DefaultLocalResolver();\n  }\n  const actionWithoutBuiltins = convertPropertyBindingBuiltins(\n      {\n        createLiteralArrayConverter: (argCount: number) => {\n          // Note: no caching for literal arrays in actions.\n          return (args: o.Expression[]) => o.literalArr(args);\n        },\n        createLiteralMapConverter: (keys: {key: string, quoted: boolean}[]) => {\n          // Note: no caching for literal maps in actions.\n          return (values: o.Expression[]) => {\n            const entries = keys.map((k, i) => ({\n                                       key: k.key,\n                                       value: values[i],\n                                       quoted: k.quoted,\n                                     }));\n            return o.literalMap(entries);\n          };\n        },\n        createPipeConverter: (name: string) => {\n          throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);\n        }\n      },\n      action);\n\n  const visitor = new _AstToIrVisitor(\n      localResolver, implicitReceiver, bindingId, interpolationFunction, baseSourceSpan);\n  const actionStmts: o.Statement[] = [];\n  flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n  prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  const lastIndex = actionStmts.length - 1;\n  let preventDefaultVar: o.ReadVarExpr = null !;\n  if (lastIndex >= 0) {\n    const lastStatement = actionStmts[lastIndex];\n    const returnExpr = convertStmtIntoExpression(lastStatement);\n    if (returnExpr) {\n      // Note: We need to cast the result of the method call to dynamic,\n      // as it might be a void method!\n      preventDefaultVar = createPreventDefaultVar(bindingId);\n      actionStmts[lastIndex] =\n          preventDefaultVar.set(returnExpr.cast(o.DYNAMIC_TYPE).notIdentical(o.literal(false)))\n              .toDeclStmt(null, [o.StmtModifier.Final]);\n    }\n  }\n  return new ConvertActionBindingResult(actionStmts, preventDefaultVar);\n}\n\nexport interface BuiltinConverter { (args: o.Expression[]): o.Expression; }\n\nexport interface BuiltinConverterFactory {\n  createLiteralArrayConverter(argCount: number): BuiltinConverter;\n  createLiteralMapConverter(keys: {key: string, quoted: boolean}[]): BuiltinConverter;\n  createPipeConverter(name: string, argCount: number): BuiltinConverter;\n}\n\nexport function convertPropertyBindingBuiltins(\n    converterFactory: BuiltinConverterFactory, ast: cdAst.AST): cdAst.AST {\n  return convertBuiltins(converterFactory, ast);\n}\n\nexport class ConvertPropertyBindingResult {\n  constructor(public stmts: o.Statement[], public currValExpr: o.Expression) {}\n}\n\nexport enum BindingForm {\n  // The general form of binding expression, supports all expressions.\n  General,\n\n  // Try to generate a simple binding (no temporaries or statements)\n  // otherwise generate a general binding\n  TrySimple,\n}\n\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nexport function convertPropertyBinding(\n    localResolver: LocalResolver | null, implicitReceiver: o.Expression,\n    expressionWithoutBuiltins: cdAst.AST, bindingId: string, form: BindingForm,\n    interpolationFunction?: InterpolationFunction): ConvertPropertyBindingResult {\n  if (!localResolver) {\n    localResolver = new DefaultLocalResolver();\n  }\n  const currValExpr = createCurrValueExpr(bindingId);\n  const visitor =\n      new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);\n  const outputExpr: o.Expression = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n  const stmts: o.Statement[] = getStatementsFromVisitor(visitor, bindingId);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  if (visitor.temporaryCount === 0 && form == BindingForm.TrySimple) {\n    return new ConvertPropertyBindingResult([], outputExpr);\n  }\n\n  stmts.push(currValExpr.set(outputExpr).toDeclStmt(o.DYNAMIC_TYPE, [o.StmtModifier.Final]));\n  return new ConvertPropertyBindingResult(stmts, currValExpr);\n}\n\n/**\n * Given some expression, such as a binding or interpolation expression, and a context expression to\n * look values up on, visit each facet of the given expression resolving values from the context\n * expression such that a list of arguments can be derived from the found values that can be used as\n * arguments to an external update instruction.\n *\n * @param localResolver The resolver to use to look up expressions by name appropriately\n * @param contextVariableExpression The expression representing the context variable used to create\n * the final argument expressions\n * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to\n * be resolved and what arguments list to build.\n * @param bindingId A name prefix used to create temporary variable names if they're needed for the\n * arguments generated\n * @returns An array of expressions that can be passed as arguments to instruction expressions like\n * `o.importExpr(R3.propertyInterpolate).callFn(result)`\n */\nexport function convertUpdateArguments(\n    localResolver: LocalResolver, contextVariableExpression: o.Expression,\n    expressionWithArgumentsToExtract: cdAst.AST, bindingId: string) {\n  const visitor =\n      new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, undefined);\n  const outputExpr: o.InvokeFunctionExpr =\n      expressionWithArgumentsToExtract.visit(visitor, _Mode.Expression);\n\n  if (visitor.usesImplicitReceiver) {\n    localResolver.notifyImplicitReceiverUse();\n  }\n\n  const stmts = getStatementsFromVisitor(visitor, bindingId);\n\n  // Removing the first argument, because it was a length for ViewEngine, not Ivy.\n  let args = outputExpr.args.slice(1);\n  if (expressionWithArgumentsToExtract instanceof cdAst.Interpolation) {\n    // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the\n    // args returned to just the value, because we're going to pass it to a special instruction.\n    const strings = expressionWithArgumentsToExtract.strings;\n    if (args.length === 3 && strings[0] === '' && strings[1] === '') {\n      // Single argument interpolate instructions.\n      args = [args[1]];\n    } else if (args.length >= 19) {\n      // 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept\n      // an array of arguments\n      args = [o.literalArr(args)];\n    }\n  }\n  return {stmts, args};\n}\n\nfunction getStatementsFromVisitor(visitor: _AstToIrVisitor, bindingId: string) {\n  const stmts: o.Statement[] = [];\n  for (let i = 0; i < visitor.temporaryCount; i++) {\n    stmts.push(temporaryDeclaration(bindingId, i));\n  }\n  return stmts;\n}\n\nfunction convertBuiltins(converterFactory: BuiltinConverterFactory, ast: cdAst.AST): cdAst.AST {\n  const visitor = new _BuiltinAstConverter(converterFactory);\n  return ast.visit(visitor);\n}\n\nfunction temporaryName(bindingId: string, temporaryNumber: number): string {\n  return `tmp_${bindingId}_${temporaryNumber}`;\n}\n\nexport function temporaryDeclaration(bindingId: string, temporaryNumber: number): o.Statement {\n  return new o.DeclareVarStmt(temporaryName(bindingId, temporaryNumber), o.NULL_EXPR);\n}\n\nfunction prependTemporaryDecls(\n    temporaryCount: number, bindingId: string, statements: o.Statement[]) {\n  for (let i = temporaryCount - 1; i >= 0; i--) {\n    statements.unshift(temporaryDeclaration(bindingId, i));\n  }\n}\n\nenum _Mode {\n  Statement,\n  Expression\n}\n\nfunction ensureStatementMode(mode: _Mode, ast: cdAst.AST) {\n  if (mode !== _Mode.Statement) {\n    throw new Error(`Expected a statement, but saw ${ast}`);\n  }\n}\n\nfunction ensureExpressionMode(mode: _Mode, ast: cdAst.AST) {\n  if (mode !== _Mode.Expression) {\n    throw new Error(`Expected an expression, but saw ${ast}`);\n  }\n}\n\nfunction convertToStatementIfNeeded(mode: _Mode, expr: o.Expression): o.Expression|o.Statement {\n  if (mode === _Mode.Statement) {\n    return expr.toStmt();\n  } else {\n    return expr;\n  }\n}\n\nclass _BuiltinAstConverter extends cdAst.AstTransformer {\n  constructor(private _converterFactory: BuiltinConverterFactory) { super(); }\n  visitPipe(ast: cdAst.BindingPipe, context: any): any {\n    const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context));\n    return new BuiltinFunctionCall(\n        ast.span, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n  }\n  visitLiteralArray(ast: cdAst.LiteralArray, context: any): any {\n    const args = ast.expressions.map(ast => ast.visit(this, context));\n    return new BuiltinFunctionCall(\n        ast.span, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n  }\n  visitLiteralMap(ast: cdAst.LiteralMap, context: any): any {\n    const args = ast.values.map(ast => ast.visit(this, context));\n\n    return new BuiltinFunctionCall(\n        ast.span, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n  }\n}\n\nclass _AstToIrVisitor implements cdAst.AstVisitor {\n  private _nodeMap = new Map<cdAst.AST, cdAst.AST>();\n  private _resultMap = new Map<cdAst.AST, o.Expression>();\n  private _currentTemporary: number = 0;\n  public temporaryCount: number = 0;\n  public usesImplicitReceiver: boolean = false;\n\n  constructor(\n      private _localResolver: LocalResolver, private _implicitReceiver: o.Expression,\n      private bindingId: string, private interpolationFunction: InterpolationFunction|undefined,\n      private baseSourceSpan?: ParseSourceSpan) {}\n\n  visitBinary(ast: cdAst.Binary, mode: _Mode): any {\n    let op: o.BinaryOperator;\n    switch (ast.operation) {\n      case '+':\n        op = o.BinaryOperator.Plus;\n        break;\n      case '-':\n        op = o.BinaryOperator.Minus;\n        break;\n      case '*':\n        op = o.BinaryOperator.Multiply;\n        break;\n      case '/':\n        op = o.BinaryOperator.Divide;\n        break;\n      case '%':\n        op = o.BinaryOperator.Modulo;\n        break;\n      case '&&':\n        op = o.BinaryOperator.And;\n        break;\n      case '||':\n        op = o.BinaryOperator.Or;\n        break;\n      case '==':\n        op = o.BinaryOperator.Equals;\n        break;\n      case '!=':\n        op = o.BinaryOperator.NotEquals;\n        break;\n      case '===':\n        op = o.BinaryOperator.Identical;\n        break;\n      case '!==':\n        op = o.BinaryOperator.NotIdentical;\n        break;\n      case '<':\n        op = o.BinaryOperator.Lower;\n        break;\n      case '>':\n        op = o.BinaryOperator.Bigger;\n        break;\n      case '<=':\n        op = o.BinaryOperator.LowerEquals;\n        break;\n      case '>=':\n        op = o.BinaryOperator.BiggerEquals;\n        break;\n      default:\n        throw new Error(`Unsupported operation ${ast.operation}`);\n    }\n\n    return convertToStatementIfNeeded(\n        mode,\n        new o.BinaryOperatorExpr(\n            op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression),\n            undefined, this.convertSourceSpan(ast.span)));\n  }\n\n  visitChain(ast: cdAst.Chain, mode: _Mode): any {\n    ensureStatementMode(mode, ast);\n    return this.visitAll(ast.expressions, mode);\n  }\n\n  visitConditional(ast: cdAst.Conditional, mode: _Mode): any {\n    const value: o.Expression = this._visit(ast.condition, _Mode.Expression);\n    return convertToStatementIfNeeded(\n        mode, value.conditional(\n                  this._visit(ast.trueExp, _Mode.Expression),\n                  this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));\n  }\n\n  visitPipe(ast: cdAst.BindingPipe, mode: _Mode): any {\n    throw new Error(\n        `Illegal state: Pipes should have been converted into functions. Pipe: ${ast.name}`);\n  }\n\n  visitFunctionCall(ast: cdAst.FunctionCall, mode: _Mode): any {\n    const convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n    let fnResult: o.Expression;\n    if (ast instanceof BuiltinFunctionCall) {\n      fnResult = ast.converter(convertedArgs);\n    } else {\n      fnResult = this._visit(ast.target !, _Mode.Expression)\n                     .callFn(convertedArgs, this.convertSourceSpan(ast.span));\n    }\n    return convertToStatementIfNeeded(mode, fnResult);\n  }\n\n  visitImplicitReceiver(ast: cdAst.ImplicitReceiver, mode: _Mode): any {\n    ensureExpressionMode(mode, ast);\n    this.usesImplicitReceiver = true;\n    return this._implicitReceiver;\n  }\n\n  visitInterpolation(ast: cdAst.Interpolation, mode: _Mode): any {\n    ensureExpressionMode(mode, ast);\n    const args = [o.literal(ast.expressions.length)];\n    for (let i = 0; i < ast.strings.length - 1; i++) {\n      args.push(o.literal(ast.strings[i]));\n      args.push(this._visit(ast.expressions[i], _Mode.Expression));\n    }\n    args.push(o.literal(ast.strings[ast.strings.length - 1]));\n\n    if (this.interpolationFunction) {\n      return this.interpolationFunction(args);\n    }\n    return ast.expressions.length <= 9 ?\n        o.importExpr(Identifiers.inlineInterpolate).callFn(args) :\n        o.importExpr(Identifiers.interpolate).callFn([\n          args[0], o.literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))\n        ]);\n  }\n\n  visitKeyedRead(ast: cdAst.KeyedRead, mode: _Mode): any {\n    const leftMostSafe = this.leftMostSafeNode(ast);\n    if (leftMostSafe) {\n      return this.convertSafeAccess(ast, leftMostSafe, mode);\n    } else {\n      return convertToStatementIfNeeded(\n          mode, this._visit(ast.obj, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n    }\n  }\n\n  visitKeyedWrite(ast: cdAst.KeyedWrite, mode: _Mode): any {\n    const obj: o.Expression = this._visit(ast.obj, _Mode.Expression);\n    const key: o.Expression = this._visit(ast.key, _Mode.Expression);\n    const value: o.Expression = this._visit(ast.value, _Mode.Expression);\n    return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n  }\n\n  visitLiteralArray(ast: cdAst.LiteralArray, mode: _Mode): any {\n    throw new Error(`Illegal State: literal arrays should have been converted into functions`);\n  }\n\n  visitLiteralMap(ast: cdAst.LiteralMap, mode: _Mode): any {\n    throw new Error(`Illegal State: literal maps should have been converted into functions`);\n  }\n\n  visitLiteralPrimitive(ast: cdAst.LiteralPrimitive, mode: _Mode): any {\n    // For literal values of null, undefined, true, or false allow type interference\n    // to infer the type.\n    const type =\n        ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?\n        o.INFERRED_TYPE :\n        undefined;\n    return convertToStatementIfNeeded(\n        mode, o.literal(ast.value, type, this.convertSourceSpan(ast.span)));\n  }\n\n  private _getLocal(name: string): o.Expression|null { return this._localResolver.getLocal(name); }\n\n  visitMethodCall(ast: cdAst.MethodCall, mode: _Mode): any {\n    if (ast.receiver instanceof cdAst.ImplicitReceiver && ast.name == '$any') {\n      const args = this.visitAll(ast.args, _Mode.Expression) as any[];\n      if (args.length != 1) {\n        throw new Error(\n            `Invalid call to $any, expected 1 argument but received ${args.length || 'none'}`);\n      }\n      return (args[0] as o.Expression).cast(o.DYNAMIC_TYPE, this.convertSourceSpan(ast.span));\n    }\n\n    const leftMostSafe = this.leftMostSafeNode(ast);\n    if (leftMostSafe) {\n      return this.convertSafeAccess(ast, leftMostSafe, mode);\n    } else {\n      const args = this.visitAll(ast.args, _Mode.Expression);\n      const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n      let result: any = null;\n      const receiver = this._visit(ast.receiver, _Mode.Expression);\n      if (receiver === this._implicitReceiver) {\n        const varExpr = this._getLocal(ast.name);\n        if (varExpr) {\n          // Restore the previous \"usesImplicitReceiver\" state since the implicit\n          // receiver has been replaced with a resolved local expression.\n          this.usesImplicitReceiver = prevUsesImplicitReceiver;\n          result = varExpr.callFn(args);\n        }\n      }\n      if (result == null) {\n        result = receiver.callMethod(ast.name, args, this.convertSourceSpan(ast.span));\n      }\n      return convertToStatementIfNeeded(mode, result);\n    }\n  }\n\n  visitPrefixNot(ast: cdAst.PrefixNot, mode: _Mode): any {\n    return convertToStatementIfNeeded(mode, o.not(this._visit(ast.expression, _Mode.Expression)));\n  }\n\n  visitNonNullAssert(ast: cdAst.NonNullAssert, mode: _Mode): any {\n    return convertToStatementIfNeeded(\n        mode, o.assertNotNull(this._visit(ast.expression, _Mode.Expression)));\n  }\n\n  visitPropertyRead(ast: cdAst.PropertyRead, mode: _Mode): any {\n    const leftMostSafe = this.leftMostSafeNode(ast);\n    if (leftMostSafe) {\n      return this.convertSafeAccess(ast, leftMostSafe, mode);\n    } else {\n      let result: any = null;\n      const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n      const receiver = this._visit(ast.receiver, _Mode.Expression);\n      if (receiver === this._implicitReceiver) {\n        result = this._getLocal(ast.name);\n        if (result) {\n          // Restore the previous \"usesImplicitReceiver\" state since the implicit\n          // receiver has been replaced with a resolved local expression.\n          this.usesImplicitReceiver = prevUsesImplicitReceiver;\n        }\n      }\n      if (result == null) {\n        result = receiver.prop(ast.name);\n      }\n      return convertToStatementIfNeeded(mode, result);\n    }\n  }\n\n  visitPropertyWrite(ast: cdAst.PropertyWrite, mode: _Mode): any {\n    const receiver: o.Expression = this._visit(ast.receiver, _Mode.Expression);\n    const prevUsesImplicitReceiver = this.usesImplicitReceiver;\n\n    let varExpr: o.ReadPropExpr|null = null;\n    if (receiver === this._implicitReceiver) {\n      const localExpr = this._getLocal(ast.name);\n      if (localExpr) {\n        if (localExpr instanceof o.ReadPropExpr) {\n          // If the local variable is a property read expression, it's a reference\n          // to a 'context.property' value and will be used as the target of the\n          // write expression.\n          varExpr = localExpr;\n          // Restore the previous \"usesImplicitReceiver\" state since the implicit\n          // receiver has been replaced with a resolved local expression.\n          this.usesImplicitReceiver = prevUsesImplicitReceiver;\n        } else {\n          // Otherwise it's an error.\n          throw new Error('Cannot assign to a reference or variable!');\n        }\n      }\n    }\n    // If no local expression could be produced, use the original receiver's\n    // property as the target.\n    if (varExpr === null) {\n      varExpr = receiver.prop(ast.name);\n    }\n    return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));\n  }\n\n  visitSafePropertyRead(ast: cdAst.SafePropertyRead, mode: _Mode): any {\n    return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n  }\n\n  visitSafeMethodCall(ast: cdAst.SafeMethodCall, mode: _Mode): any {\n    return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n  }\n\n  visitAll(asts: cdAst.AST[], mode: _Mode): any { return asts.map(ast => this._visit(ast, mode)); }\n\n  visitQuote(ast: cdAst.Quote, mode: _Mode): any {\n    throw new Error(`Quotes are not supported for evaluation!\n        Statement: ${ast.uninterpretedExpression} located at ${ast.location}`);\n  }\n\n  private _visit(ast: cdAst.AST, mode: _Mode): any {\n    const result = this._resultMap.get(ast);\n    if (result) return result;\n    return (this._nodeMap.get(ast) || ast).visit(this, mode);\n  }\n\n  private convertSafeAccess(\n      ast: cdAst.AST, leftMostSafe: cdAst.SafeMethodCall|cdAst.SafePropertyRead, mode: _Mode): any {\n    // If the expression contains a safe access node on the left it needs to be converted to\n    // an expression that guards the access to the member by checking the receiver for blank. As\n    // execution proceeds from left to right, the left most part of the expression must be guarded\n    // first but, because member access is left associative, the right side of the expression is at\n    // the top of the AST. The desired result requires lifting a copy of the the left part of the\n    // expression up to test it for blank before generating the unguarded version.\n\n    // Consider, for example the following expression: a?.b.c?.d.e\n\n    // This results in the ast:\n    //         .\n    //        / \\\n    //       ?.   e\n    //      /  \\\n    //     .    d\n    //    / \\\n    //   ?.  c\n    //  /  \\\n    // a    b\n\n    // The following tree should be generated:\n    //\n    //        /---- ? ----\\\n    //       /      |      \\\n    //     a   /--- ? ---\\  null\n    //        /     |     \\\n    //       .      .     null\n    //      / \\    / \\\n    //     .  c   .   e\n    //    / \\    / \\\n    //   a   b  .   d\n    //         / \\\n    //        .   c\n    //       / \\\n    //      a   b\n    //\n    // Notice that the first guard condition is the left hand of the left most safe access node\n    // which comes in as leftMostSafe to this routine.\n\n    let guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n    let temporary: o.ReadVarExpr = undefined !;\n    if (this.needsTemporary(leftMostSafe.receiver)) {\n      // If the expression has method calls or pipes then we need to save the result into a\n      // temporary variable to avoid calling stateful or impure code more than once.\n      temporary = this.allocateTemporary();\n\n      // Preserve the result in the temporary variable\n      guardedExpression = temporary.set(guardedExpression);\n\n      // Ensure all further references to the guarded expression refer to the temporary instead.\n      this._resultMap.set(leftMostSafe.receiver, temporary);\n    }\n    const condition = guardedExpression.isBlank();\n\n    // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n    // leftMostNode with its unguarded version in the call to `this.visit()`.\n    if (leftMostSafe instanceof cdAst.SafeMethodCall) {\n      this._nodeMap.set(\n          leftMostSafe,\n          new cdAst.MethodCall(\n              leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args));\n    } else {\n      this._nodeMap.set(\n          leftMostSafe,\n          new cdAst.PropertyRead(leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name));\n    }\n\n    // Recursively convert the node now without the guarded member access.\n    const access = this._visit(ast, _Mode.Expression);\n\n    // Remove the mapping. This is not strictly required as the converter only traverses each node\n    // once but is safer if the conversion is changed to traverse the nodes more than once.\n    this._nodeMap.delete(leftMostSafe);\n\n    // If we allocated a temporary, release it.\n    if (temporary) {\n      this.releaseTemporary(temporary);\n    }\n\n    // Produce the conditional\n    return convertToStatementIfNeeded(mode, condition.conditional(o.literal(null), access));\n  }\n\n  // Given a expression of the form a?.b.c?.d.e the the left most safe node is\n  // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n  // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n  // safe method call as this needs be transform initially to:\n  //   a == null ? null : a.c.b.c?.d.e\n  // then to:\n  //   a == null ? null : a.b.c == null ? null : a.b.c.d.e\n  private leftMostSafeNode(ast: cdAst.AST): cdAst.SafePropertyRead|cdAst.SafeMethodCall {\n    const visit = (visitor: cdAst.AstVisitor, ast: cdAst.AST): any => {\n      return (this._nodeMap.get(ast) || ast).visit(visitor);\n    };\n    return ast.visit({\n      visitBinary(ast: cdAst.Binary) { return null; },\n      visitChain(ast: cdAst.Chain) { return null; },\n      visitConditional(ast: cdAst.Conditional) { return null; },\n      visitFunctionCall(ast: cdAst.FunctionCall) { return null; },\n      visitImplicitReceiver(ast: cdAst.ImplicitReceiver) { return null; },\n      visitInterpolation(ast: cdAst.Interpolation) { return null; },\n      visitKeyedRead(ast: cdAst.KeyedRead) { return visit(this, ast.obj); },\n      visitKeyedWrite(ast: cdAst.KeyedWrite) { return null; },\n      visitLiteralArray(ast: cdAst.LiteralArray) { return null; },\n      visitLiteralMap(ast: cdAst.LiteralMap) { return null; },\n      visitLiteralPrimitive(ast: cdAst.LiteralPrimitive) { return null; },\n      visitMethodCall(ast: cdAst.MethodCall) { return visit(this, ast.receiver); },\n      visitPipe(ast: cdAst.BindingPipe) { return null; },\n      visitPrefixNot(ast: cdAst.PrefixNot) { return null; },\n      visitNonNullAssert(ast: cdAst.NonNullAssert) { return null; },\n      visitPropertyRead(ast: cdAst.PropertyRead) { return visit(this, ast.receiver); },\n      visitPropertyWrite(ast: cdAst.PropertyWrite) { return null; },\n      visitQuote(ast: cdAst.Quote) { return null; },\n      visitSafeMethodCall(ast: cdAst.SafeMethodCall) { return visit(this, ast.receiver) || ast; },\n      visitSafePropertyRead(ast: cdAst.SafePropertyRead) {\n        return visit(this, ast.receiver) || ast;\n      }\n    });\n  }\n\n  // Returns true of the AST includes a method or a pipe indicating that, if the\n  // expression is used as the target of a safe property or method access then\n  // the expression should be stored into a temporary variable.\n  private needsTemporary(ast: cdAst.AST): boolean {\n    const visit = (visitor: cdAst.AstVisitor, ast: cdAst.AST): boolean => {\n      return ast && (this._nodeMap.get(ast) || ast).visit(visitor);\n    };\n    const visitSome = (visitor: cdAst.AstVisitor, ast: cdAst.AST[]): boolean => {\n      return ast.some(ast => visit(visitor, ast));\n    };\n    return ast.visit({\n      visitBinary(ast: cdAst.Binary):\n          boolean{return visit(this, ast.left) || visit(this, ast.right);},\n      visitChain(ast: cdAst.Chain) { return false; },\n      visitConditional(ast: cdAst.Conditional):\n          boolean{return visit(this, ast.condition) || visit(this, ast.trueExp) ||\n                      visit(this, ast.falseExp);},\n      visitFunctionCall(ast: cdAst.FunctionCall) { return true; },\n      visitImplicitReceiver(ast: cdAst.ImplicitReceiver) { return false; },\n      visitInterpolation(ast: cdAst.Interpolation) { return visitSome(this, ast.expressions); },\n      visitKeyedRead(ast: cdAst.KeyedRead) { return false; },\n      visitKeyedWrite(ast: cdAst.KeyedWrite) { return false; },\n      visitLiteralArray(ast: cdAst.LiteralArray) { return true; },\n      visitLiteralMap(ast: cdAst.LiteralMap) { return true; },\n      visitLiteralPrimitive(ast: cdAst.LiteralPrimitive) { return false; },\n      visitMethodCall(ast: cdAst.MethodCall) { return true; },\n      visitPipe(ast: cdAst.BindingPipe) { return true; },\n      visitPrefixNot(ast: cdAst.PrefixNot) { return visit(this, ast.expression); },\n      visitNonNullAssert(ast: cdAst.PrefixNot) { return visit(this, ast.expression); },\n      visitPropertyRead(ast: cdAst.PropertyRead) { return false; },\n      visitPropertyWrite(ast: cdAst.PropertyWrite) { return false; },\n      visitQuote(ast: cdAst.Quote) { return false; },\n      visitSafeMethodCall(ast: cdAst.SafeMethodCall) { return true; },\n      visitSafePropertyRead(ast: cdAst.SafePropertyRead) { return false; }\n    });\n  }\n\n  private allocateTemporary(): o.ReadVarExpr {\n    const tempNumber = this._currentTemporary++;\n    this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n    return new o.ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n  }\n\n  private releaseTemporary(temporary: o.ReadVarExpr) {\n    this._currentTemporary--;\n    if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n      throw new Error(`Temporary ${temporary.name} released out of order`);\n    }\n  }\n\n  /**\n   * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.\n   *\n   * `ParseSpan` objects are relative to the start of the expression.\n   * This method converts these to full `ParseSourceSpan` objects that\n   * show where the span is within the overall source file.\n   *\n   * @param span the relative span to convert.\n   * @returns a `ParseSourceSpan` for the the given span or null if no\n   * `baseSourceSpan` was provided to this class.\n   */\n  private convertSourceSpan(span: cdAst.ParseSpan) {\n    if (this.baseSourceSpan) {\n      const start = this.baseSourceSpan.start.moveBy(span.start);\n      const end = this.baseSourceSpan.start.moveBy(span.end);\n      return new ParseSourceSpan(start, end);\n    } else {\n      return null;\n    }\n  }\n}\n\nfunction flattenStatements(arg: any, output: o.Statement[]) {\n  if (Array.isArray(arg)) {\n    (<any[]>arg).forEach((entry) => flattenStatements(entry, output));\n  } else {\n    output.push(arg);\n  }\n}\n\nclass DefaultLocalResolver implements LocalResolver {\n  notifyImplicitReceiverUse(): void {}\n  getLocal(name: string): o.Expression|null {\n    if (name === EventHandlerVars.event.name) {\n      return EventHandlerVars.event;\n    }\n    return null;\n  }\n}\n\nfunction createCurrValueExpr(bindingId: string): o.ReadVarExpr {\n  return o.variable(`currVal_${bindingId}`);  // fix syntax highlighting: `\n}\n\nfunction createPreventDefaultVar(bindingId: string): o.ReadVarExpr {\n  return o.variable(`pd_${bindingId}`);\n}\n\nfunction convertStmtIntoExpression(stmt: o.Statement): o.Expression|null {\n  if (stmt instanceof o.ExpressionStatement) {\n    return stmt.expr;\n  } else if (stmt instanceof o.ReturnStatement) {\n    return stmt.value;\n  }\n  return null;\n}\n\nexport class BuiltinFunctionCall extends cdAst.FunctionCall {\n  constructor(span: cdAst.ParseSpan, public args: cdAst.AST[], public converter: BuiltinConverter) {\n    super(span, null, args);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n\n/*\n  This is a limited shim for ShadowDOM css styling.\n  https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n  The intention here is to support only the styling features which can be\n  relatively simply implemented. The goal is to allow users to avoid the\n  most obvious pitfalls and do so without compromising performance significantly.\n  For ShadowDOM styling that's not covered here, a set of best practices\n  can be provided that should allow users to accomplish more complex styling.\n\n  The following is a list of specific ShadowDOM styling features and a brief\n  discussion of the approach used to shim.\n\n  Shimmed features:\n\n  * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n  element using the :host rule. To shim this feature, the :host styles are\n  reformatted and prefixed with a given scope name and promoted to a\n  document level stylesheet.\n  For example, given a scope name of .foo, a rule like this:\n\n    :host {\n        background: red;\n      }\n    }\n\n  becomes:\n\n    .foo {\n      background: red;\n    }\n\n  * encapsulation: Styles defined within ShadowDOM, apply only to\n  dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n  this feature.\n\n  By default, rules are prefixed with the host element tag name\n  as a descendant selector. This ensures styling does not leak out of the 'top'\n  of the element's ShadowDOM. For example,\n\n  div {\n      font-weight: bold;\n    }\n\n  becomes:\n\n  x-foo div {\n      font-weight: bold;\n    }\n\n  becomes:\n\n\n  Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n  selectors are scoped by adding an attribute selector suffix to each\n  simple selector that contains the host element tag name. Each element\n  in the element's ShadowDOM template is also given the scope attribute.\n  Thus, these rules match only elements that have the scope attribute.\n  For example, given a scope name of x-foo, a rule like this:\n\n    div {\n      font-weight: bold;\n    }\n\n  becomes:\n\n    div[x-foo] {\n      font-weight: bold;\n    }\n\n  Note that elements that are dynamically added to a scope must have the scope\n  selector added to them manually.\n\n  * upper/lower bound encapsulation: Styles which are defined outside a\n  shadowRoot should not cross the ShadowDOM boundary and should not apply\n  inside a shadowRoot.\n\n  This styling behavior is not emulated. Some possible ways to do this that\n  were rejected due to complexity and/or performance concerns include: (1) reset\n  every possible property for every possible selector for a given scope name;\n  (2) re-implement css in javascript.\n\n  As an alternative, users should make sure to use selectors\n  specific to the scope in which they are working.\n\n  * ::distributed: This behavior is not emulated. It's often not necessary\n  to style the contents of a specific insertion point and instead, descendants\n  of the host element can be styled selectively. Users can also create an\n  extra node around an insertion point and style that node's contents\n  via descendent selectors. For example, with a shadowRoot like this:\n\n    <style>\n      ::content(div) {\n        background: red;\n      }\n    </style>\n    <content></content>\n\n  could become:\n\n    <style>\n      / *@polyfill .content-container div * /\n      ::content(div) {\n        background: red;\n      }\n    </style>\n    <div class=\"content-container\">\n      <content></content>\n    </div>\n\n  Note the use of @polyfill in the comment above a ShadowDOM specific style\n  declaration. This is a directive to the styling shim to use the selector\n  in comments in lieu of the next selector when running under polyfill.\n*/\n\nexport class ShadowCss {\n  strictStyling: boolean = true;\n\n  constructor() {}\n\n  /*\n  * Shim some cssText with the given selector. Returns cssText that can\n  * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n  *\n  * When strictStyling is true:\n  * - selector is the attribute added to all elements inside the host,\n  * - hostSelector is the attribute added to the host itself.\n  */\n  shimCssText(cssText: string, selector: string, hostSelector: string = ''): string {\n    const commentsWithHash = extractCommentsWithHash(cssText);\n    cssText = stripComments(cssText);\n    cssText = this._insertDirectives(cssText);\n\n    const scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n    return [scopedCssText, ...commentsWithHash].join('\\n');\n  }\n\n  private _insertDirectives(cssText: string): string {\n    cssText = this._insertPolyfillDirectivesInCssText(cssText);\n    return this._insertPolyfillRulesInCssText(cssText);\n  }\n\n  /*\n   * Process styles to convert native ShadowDOM rules that will trip\n   * up the css parser; we rely on decorating the stylesheet with inert rules.\n   *\n   * For example, we convert this rule:\n   *\n   * polyfill-next-selector { content: ':host menu-item'; }\n   * ::content menu-item {\n   *\n   * to this:\n   *\n   * scopeName menu-item {\n   *\n  **/\n  private _insertPolyfillDirectivesInCssText(cssText: string): string {\n    // Difference with webcomponents.js: does not handle comments\n    return cssText.replace(\n        _cssContentNextSelectorRe, function(...m: string[]) { return m[2] + '{'; });\n  }\n\n  /*\n   * Process styles to add rules which will only apply under the polyfill\n   *\n   * For example, we convert this rule:\n   *\n   * polyfill-rule {\n   *   content: ':host menu-item';\n   * ...\n   * }\n   *\n   * to this:\n   *\n   * scopeName menu-item {...}\n   *\n  **/\n  private _insertPolyfillRulesInCssText(cssText: string): string {\n    // Difference with webcomponents.js: does not handle comments\n    return cssText.replace(_cssContentRuleRe, (...m: string[]) => {\n      const rule = m[0].replace(m[1], '').replace(m[2], '');\n      return m[4] + rule;\n    });\n  }\n\n  /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n   *\n   *  .foo {... }\n   *\n   *  and converts this to\n   *\n   *  scopeName .foo { ... }\n  */\n  private _scopeCssText(cssText: string, scopeSelector: string, hostSelector: string): string {\n    const unscopedRules = this._extractUnscopedRulesFromCssText(cssText);\n    // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n    cssText = this._insertPolyfillHostInCssText(cssText);\n    cssText = this._convertColonHost(cssText);\n    cssText = this._convertColonHostContext(cssText);\n    cssText = this._convertShadowDOMSelectors(cssText);\n    if (scopeSelector) {\n      cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n    }\n    cssText = cssText + '\\n' + unscopedRules;\n    return cssText.trim();\n  }\n\n  /*\n   * Process styles to add rules which will only apply under the polyfill\n   * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n   * occasions, e.g. -webkit-calc on Safari.)\n   * For example, we convert this rule:\n   *\n   * @polyfill-unscoped-rule {\n   *   content: 'menu-item';\n   * ... }\n   *\n   * to this:\n   *\n   * menu-item {...}\n   *\n  **/\n  private _extractUnscopedRulesFromCssText(cssText: string): string {\n    // Difference with webcomponents.js: does not handle comments\n    let r = '';\n    let m: RegExpExecArray|null;\n    _cssContentUnscopedRuleRe.lastIndex = 0;\n    while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n      const rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n      r += rule + '\\n\\n';\n    }\n    return r;\n  }\n\n  /*\n   * convert a rule like :host(.foo) > .bar { }\n   *\n   * to\n   *\n   * .foo<scopeName> > .bar\n  */\n  private _convertColonHost(cssText: string): string {\n    return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);\n  }\n\n  /*\n   * convert a rule like :host-context(.foo) > .bar { }\n   *\n   * to\n   *\n   * .foo<scopeName> > .bar, .foo scopeName > .bar { }\n   *\n   * and\n   *\n   * :host-context(.foo:host) .bar { ... }\n   *\n   * to\n   *\n   * .foo<scopeName> .bar { ... }\n  */\n  private _convertColonHostContext(cssText: string): string {\n    return this._convertColonRule(\n        cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);\n  }\n\n  private _convertColonRule(cssText: string, regExp: RegExp, partReplacer: Function): string {\n    // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n    return cssText.replace(regExp, function(...m: string[]) {\n      if (m[2]) {\n        const parts = m[2].split(',');\n        const r: string[] = [];\n        for (let i = 0; i < parts.length; i++) {\n          const p = parts[i].trim();\n          if (!p) break;\n          r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n        }\n        return r.join(',');\n      } else {\n        return _polyfillHostNoCombinator + m[3];\n      }\n    });\n  }\n\n  private _colonHostContextPartReplacer(host: string, part: string, suffix: string): string {\n    if (part.indexOf(_polyfillHost) > -1) {\n      return this._colonHostPartReplacer(host, part, suffix);\n    } else {\n      return host + part + suffix + ', ' + part + ' ' + host + suffix;\n    }\n  }\n\n  private _colonHostPartReplacer(host: string, part: string, suffix: string): string {\n    return host + part.replace(_polyfillHost, '') + suffix;\n  }\n\n  /*\n   * Convert combinators like ::shadow and pseudo-elements like ::content\n   * by replacing with space.\n  */\n  private _convertShadowDOMSelectors(cssText: string): string {\n    return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n  }\n\n  // change a selector like 'div' to 'name div'\n  private _scopeSelectors(cssText: string, scopeSelector: string, hostSelector: string): string {\n    return processRules(cssText, (rule: CssRule) => {\n      let selector = rule.selector;\n      let content = rule.content;\n      if (rule.selector[0] != '@') {\n        selector =\n            this._scopeSelector(rule.selector, scopeSelector, hostSelector, this.strictStyling);\n      } else if (\n          rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n          rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n        content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n      }\n      return new CssRule(selector, content);\n    });\n  }\n\n  private _scopeSelector(\n      selector: string, scopeSelector: string, hostSelector: string, strict: boolean): string {\n    return selector.split(',')\n        .map(part => part.trim().split(_shadowDeepSelectors))\n        .map((deepParts) => {\n          const [shallowPart, ...otherParts] = deepParts;\n          const applyScope = (shallowPart: string) => {\n            if (this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n              return strict ?\n                  this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :\n                  this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n            } else {\n              return shallowPart;\n            }\n          };\n          return [applyScope(shallowPart), ...otherParts].join(' ');\n        })\n        .join(', ');\n  }\n\n  private _selectorNeedsScoping(selector: string, scopeSelector: string): boolean {\n    const re = this._makeScopeMatcher(scopeSelector);\n    return !re.test(selector);\n  }\n\n  private _makeScopeMatcher(scopeSelector: string): RegExp {\n    const lre = /\\[/g;\n    const rre = /\\]/g;\n    scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n    return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n  }\n\n  private _applySelectorScope(selector: string, scopeSelector: string, hostSelector: string):\n      string {\n    // Difference from webcomponents.js: scopeSelector could not be an array\n    return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n  }\n\n  // scope via name and [is=name]\n  private _applySimpleSelectorScope(selector: string, scopeSelector: string, hostSelector: string):\n      string {\n    // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n    _polyfillHostRe.lastIndex = 0;\n    if (_polyfillHostRe.test(selector)) {\n      const replaceBy = this.strictStyling ? `[${hostSelector}]` : scopeSelector;\n      return selector\n          .replace(\n              _polyfillHostNoCombinatorRe,\n              (hnc, selector) => {\n                return selector.replace(\n                    /([^:]*)(:*)(.*)/,\n                    (_: string, before: string, colon: string, after: string) => {\n                      return before + replaceBy + colon + after;\n                    });\n              })\n          .replace(_polyfillHostRe, replaceBy + ' ');\n    }\n\n    return scopeSelector + ' ' + selector;\n  }\n\n  // return a selector with [name] suffix on each simple selector\n  // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]  /** @internal */\n  private _applyStrictSelectorScope(selector: string, scopeSelector: string, hostSelector: string):\n      string {\n    const isRe = /\\[is=([^\\]]*)\\]/g;\n    scopeSelector = scopeSelector.replace(isRe, (_: string, ...parts: string[]) => parts[0]);\n\n    const attrName = '[' + scopeSelector + ']';\n\n    const _scopeSelectorPart = (p: string) => {\n      let scopedP = p.trim();\n\n      if (!scopedP) {\n        return '';\n      }\n\n      if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n        scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n      } else {\n        // remove :host since it should be unnecessary\n        const t = p.replace(_polyfillHostRe, '');\n        if (t.length > 0) {\n          const matches = t.match(/([^:]*)(:*)(.*)/);\n          if (matches) {\n            scopedP = matches[1] + attrName + matches[2] + matches[3];\n          }\n        }\n      }\n\n      return scopedP;\n    };\n\n    const safeContent = new SafeSelector(selector);\n    selector = safeContent.content();\n\n    let scopedSelector = '';\n    let startIndex = 0;\n    let res: RegExpExecArray|null;\n    const sep = /( |>|\\+|~(?!=))\\s*/g;\n\n    // If a selector appears before :host it should not be shimmed as it\n    // matches on ancestor elements and not on elements in the host's shadow\n    // `:host-context(div)` is transformed to\n    // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n    // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n    // Historically `component-tag:host` was matching the component so we also want to preserve\n    // this behavior to avoid breaking legacy apps (it should not match).\n    // The behavior should be:\n    // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n    // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n    //   `:host-context(tag)`)\n    const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n    // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n    let shouldScope = !hasHost;\n\n    while ((res = sep.exec(selector)) !== null) {\n      const separator = res[1];\n      const part = selector.slice(startIndex, res.index).trim();\n      shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n      const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n      scopedSelector += `${scopedPart} ${separator} `;\n      startIndex = sep.lastIndex;\n    }\n\n    const part = selector.substring(startIndex);\n    shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n    scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n\n    // replace the placeholders with their original values\n    return safeContent.restore(scopedSelector);\n  }\n\n  private _insertPolyfillHostInCssText(selector: string): string {\n    return selector.replace(_colonHostContextRe, _polyfillHostContext)\n        .replace(_colonHostRe, _polyfillHost);\n  }\n}\n\nclass SafeSelector {\n  private placeholders: string[] = [];\n  private index = 0;\n  private _content: string;\n\n  constructor(selector: string) {\n    // Replaces attribute selectors with placeholders.\n    // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n    selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n      const replaceBy = `__ph-${this.index}__`;\n      this.placeholders.push(keep);\n      this.index++;\n      return replaceBy;\n    });\n\n    // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n    // WS and \"+\" would otherwise be interpreted as selector separators.\n    this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n      const replaceBy = `__ph-${this.index}__`;\n      this.placeholders.push(exp);\n      this.index++;\n      return pseudo + replaceBy;\n    });\n  }\n\n  restore(content: string): string {\n    return content.replace(/__ph-(\\d+)__/g, (ph, index) => this.placeholders[+index]);\n  }\n\n  content(): string { return this._content; }\n}\n\nconst _cssContentNextSelectorRe =\n    /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nconst _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _cssContentUnscopedRuleRe =\n    /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nconst _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' +\n    '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n    ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [\n  /::shadow/g,\n  /::content/g,\n  // Deprecated selectors\n  /\\/shadow-deep\\//g,\n  /\\/shadow\\//g,\n];\n\n// The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\nconst _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nconst _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonHostContextRe = /:host-context/gim;\n\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\n\nfunction stripComments(input: string): string {\n  return input.replace(_commentRe, '');\n}\n\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\n\nfunction extractCommentsWithHash(input: string): string[] {\n  return input.match(_commentWithHashRe) || [];\n}\n\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\n\nexport class CssRule {\n  constructor(public selector: string, public content: string) {}\n}\n\nexport function processRules(input: string, ruleCallback: (rule: CssRule) => CssRule): string {\n  const inputWithEscapedBlocks = escapeBlocks(input);\n  let nextBlockIndex = 0;\n  return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function(...m: string[]) {\n    const selector = m[2];\n    let content = '';\n    let suffix = m[4];\n    let contentPrefix = '';\n    if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n      content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n      suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n      contentPrefix = '{';\n    }\n    const rule = ruleCallback(new CssRule(selector, content));\n    return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n  });\n}\n\nclass StringWithEscapedBlocks {\n  constructor(public escapedString: string, public blocks: string[]) {}\n}\n\nfunction escapeBlocks(input: string): StringWithEscapedBlocks {\n  const inputParts = input.split(_curlyRe);\n  const resultParts: string[] = [];\n  const escapedBlocks: string[] = [];\n  let bracketCount = 0;\n  let currentBlockParts: string[] = [];\n  for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n    const part = inputParts[partIndex];\n    if (part == CLOSE_CURLY) {\n      bracketCount--;\n    }\n    if (bracketCount > 0) {\n      currentBlockParts.push(part);\n    } else {\n      if (currentBlockParts.length > 0) {\n        escapedBlocks.push(currentBlockParts.join(''));\n        resultParts.push(BLOCK_PLACEHOLDER);\n        currentBlockParts = [];\n      }\n      resultParts.push(part);\n    }\n    if (part == OPEN_CURLY) {\n      bracketCount++;\n    }\n  }\n  if (currentBlockParts.length > 0) {\n    escapedBlocks.push(currentBlockParts.join(''));\n    resultParts.push(BLOCK_PLACEHOLDER);\n  }\n  return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileStylesheetMetadata, identifierModuleUrl, identifierName} from './compile_metadata';\nimport {ViewEncapsulation} from './core';\nimport * as o from './output/output_ast';\nimport {ShadowCss} from './shadow_css';\nimport {UrlResolver} from './url_resolver';\nimport {OutputContext} from './util';\n\nconst COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nexport class StylesCompileDependency {\n  constructor(\n      public name: string, public moduleUrl: string, public setValue: (value: any) => void) {}\n}\n\nexport class CompiledStylesheet {\n  constructor(\n      public outputCtx: OutputContext, public stylesVar: string,\n      public dependencies: StylesCompileDependency[], public isShimmed: boolean,\n      public meta: CompileStylesheetMetadata) {}\n}\n\nexport class StyleCompiler {\n  private _shadowCss: ShadowCss = new ShadowCss();\n\n  constructor(private _urlResolver: UrlResolver) {}\n\n  compileComponent(outputCtx: OutputContext, comp: CompileDirectiveMetadata): CompiledStylesheet {\n    const template = comp.template !;\n    return this._compileStyles(\n        outputCtx, comp, new CompileStylesheetMetadata({\n          styles: template.styles,\n          styleUrls: template.styleUrls,\n          moduleUrl: identifierModuleUrl(comp.type)\n        }),\n        this.needsStyleShim(comp), true);\n  }\n\n  compileStyles(\n      outputCtx: OutputContext, comp: CompileDirectiveMetadata,\n      stylesheet: CompileStylesheetMetadata,\n      shim: boolean = this.needsStyleShim(comp)): CompiledStylesheet {\n    return this._compileStyles(outputCtx, comp, stylesheet, shim, false);\n  }\n\n  needsStyleShim(comp: CompileDirectiveMetadata): boolean {\n    return comp.template !.encapsulation === ViewEncapsulation.Emulated;\n  }\n\n  private _compileStyles(\n      outputCtx: OutputContext, comp: CompileDirectiveMetadata,\n      stylesheet: CompileStylesheetMetadata, shim: boolean,\n      isComponentStylesheet: boolean): CompiledStylesheet {\n    const styleExpressions: o.Expression[] =\n        stylesheet.styles.map(plainStyle => o.literal(this._shimIfNeeded(plainStyle, shim)));\n    const dependencies: StylesCompileDependency[] = [];\n    stylesheet.styleUrls.forEach((styleUrl) => {\n      const exprIndex = styleExpressions.length;\n      // Note: This placeholder will be filled later.\n      styleExpressions.push(null !);\n      dependencies.push(new StylesCompileDependency(\n          getStylesVarName(null), styleUrl,\n          (value) => styleExpressions[exprIndex] = outputCtx.importExpr(value)));\n    });\n    // styles variable contains plain strings and arrays of other styles arrays (recursive),\n    // so we set its type to dynamic.\n    const stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);\n    const stmt = o.variable(stylesVar)\n                     .set(o.literalArr(\n                         styleExpressions, new o.ArrayType(o.DYNAMIC_TYPE, [o.TypeModifier.Const])))\n                     .toDeclStmt(null, isComponentStylesheet ? [o.StmtModifier.Final] : [\n                       o.StmtModifier.Final, o.StmtModifier.Exported\n                     ]);\n    outputCtx.statements.push(stmt);\n    return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);\n  }\n\n  private _shimIfNeeded(style: string, shim: boolean): string {\n    return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;\n  }\n}\n\nfunction getStylesVarName(component: CompileDirectiveMetadata | null): string {\n  let result = `styles`;\n  if (component) {\n    result += `_${identifierName(component.type)}`;\n  }\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A path is an ordered set of elements. Typically a path is to  a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expression `a + b + c` might have an ast that looks\n * like:\n *     +\n *    / \\\n *   a   +\n *      / \\\n *     b   c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n */\nexport class AstPath<T> {\n  constructor(private path: T[], public position: number = -1) {}\n\n  get empty(): boolean { return !this.path || !this.path.length; }\n  get head(): T|undefined { return this.path[0]; }\n  get tail(): T|undefined { return this.path[this.path.length - 1]; }\n\n  parentOf(node: T|undefined): T|undefined {\n    return node && this.path[this.path.indexOf(node) - 1];\n  }\n  childOf(node: T): T|undefined { return this.path[this.path.indexOf(node) + 1]; }\n\n  first<N extends T>(ctor: {new (...args: any[]): N}): N|undefined {\n    for (let i = this.path.length - 1; i >= 0; i--) {\n      let item = this.path[i];\n      if (item instanceof ctor) return <N>item;\n    }\n  }\n\n  push(node: T) { this.path.push(node); }\n\n  pop(): T { return this.path.pop() !; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AstPath} from '../ast_path';\nimport {AST as I18nAST} from '../i18n/i18n_ast';\nimport {ParseSourceSpan} from '../parse_util';\n\nexport interface Node {\n  sourceSpan: ParseSourceSpan;\n  visit(visitor: Visitor, context: any): any;\n}\n\nexport class Text implements Node {\n  constructor(public value: string, public sourceSpan: ParseSourceSpan, public i18n?: I18nAST) {}\n  visit(visitor: Visitor, context: any): any { return visitor.visitText(this, context); }\n}\n\nexport class Expansion implements Node {\n  constructor(\n      public switchValue: string, public type: string, public cases: ExpansionCase[],\n      public sourceSpan: ParseSourceSpan, public switchValueSourceSpan: ParseSourceSpan,\n      public i18n?: I18nAST) {}\n  visit(visitor: Visitor, context: any): any { return visitor.visitExpansion(this, context); }\n}\n\nexport class ExpansionCase implements Node {\n  constructor(\n      public value: string, public expression: Node[], public sourceSpan: ParseSourceSpan,\n      public valueSourceSpan: ParseSourceSpan, public expSourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: Visitor, context: any): any { return visitor.visitExpansionCase(this, context); }\n}\n\nexport class Attribute implements Node {\n  constructor(\n      public name: string, public value: string, public sourceSpan: ParseSourceSpan,\n      public valueSpan?: ParseSourceSpan, public i18n?: I18nAST) {}\n  visit(visitor: Visitor, context: any): any { return visitor.visitAttribute(this, context); }\n}\n\nexport class Element implements Node {\n  constructor(\n      public name: string, public attrs: Attribute[], public children: Node[],\n      public sourceSpan: ParseSourceSpan, public startSourceSpan: ParseSourceSpan|null = null,\n      public endSourceSpan: ParseSourceSpan|null = null, public i18n?: I18nAST) {}\n  visit(visitor: Visitor, context: any): any { return visitor.visitElement(this, context); }\n}\n\nexport class Comment implements Node {\n  constructor(public value: string|null, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: Visitor, context: any): any { return visitor.visitComment(this, context); }\n}\n\nexport interface Visitor {\n  // Returning a truthy value from `visit()` will prevent `visitAll()` from the call to the typed\n  // method and result returned will become the result included in `visitAll()`s result array.\n  visit?(node: Node, context: any): any;\n\n  visitElement(element: Element, context: any): any;\n  visitAttribute(attribute: Attribute, context: any): any;\n  visitText(text: Text, context: any): any;\n  visitComment(comment: Comment, context: any): any;\n  visitExpansion(expansion: Expansion, context: any): any;\n  visitExpansionCase(expansionCase: ExpansionCase, context: any): any;\n}\n\nexport function visitAll(visitor: Visitor, nodes: Node[], context: any = null): any[] {\n  const result: any[] = [];\n\n  const visit = visitor.visit ?\n      (ast: Node) => visitor.visit !(ast, context) || ast.visit(visitor, context) :\n      (ast: Node) => ast.visit(visitor, context);\n  nodes.forEach(ast => {\n    const astResult = visit(ast);\n    if (astResult) {\n      result.push(astResult);\n    }\n  });\n  return result;\n}\n\nexport class RecursiveVisitor implements Visitor {\n  constructor() {}\n\n  visitElement(ast: Element, context: any): any {\n    this.visitChildren(context, visit => {\n      visit(ast.attrs);\n      visit(ast.children);\n    });\n  }\n\n  visitAttribute(ast: Attribute, context: any): any {}\n  visitText(ast: Text, context: any): any {}\n  visitComment(ast: Comment, context: any): any {}\n\n  visitExpansion(ast: Expansion, context: any): any {\n    return this.visitChildren(context, visit => { visit(ast.cases); });\n  }\n\n  visitExpansionCase(ast: ExpansionCase, context: any): any {}\n\n  private visitChildren<T extends Node>(\n      context: any, cb: (visit: (<V extends Node>(children: V[]|undefined) => void)) => void) {\n    let results: any[][] = [];\n    let t = this;\n    function visit<T extends Node>(children: T[] | undefined) {\n      if (children) results.push(visitAll(t, children, context));\n    }\n    cb(visit);\n    return Array.prototype.concat.apply([], results);\n  }\n}\n\nexport type HtmlAstPath = AstPath<Node>;\n\nfunction spanOf(ast: Node) {\n  const start = ast.sourceSpan.start.offset;\n  let end = ast.sourceSpan.end.offset;\n  if (ast instanceof Element) {\n    if (ast.endSourceSpan) {\n      end = ast.endSourceSpan.end.offset;\n    } else if (ast.children && ast.children.length) {\n      end = spanOf(ast.children[ast.children.length - 1]).end;\n    }\n  }\n  return {start, end};\n}\n\nexport function findNode(nodes: Node[], position: number): HtmlAstPath {\n  const path: Node[] = [];\n\n  const visitor = new class extends RecursiveVisitor {\n    visit(ast: Node, context: any): any {\n      const span = spanOf(ast);\n      if (span.start <= position && position < span.end) {\n        path.push(ast);\n      } else {\n        // Returning a value here will result in the children being skipped.\n        return true;\n      }\n    }\n  };\n\n  visitAll(visitor, nodes);\n\n  return new AstPath<Node>(path, position);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as chars from '../chars';\nimport {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from '../parse_util';\n\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config';\nimport {NAMED_ENTITIES, TagContentType, TagDefinition} from './tags';\n\nexport enum TokenType {\n  TAG_OPEN_START,\n  TAG_OPEN_END,\n  TAG_OPEN_END_VOID,\n  TAG_CLOSE,\n  TEXT,\n  ESCAPABLE_RAW_TEXT,\n  RAW_TEXT,\n  COMMENT_START,\n  COMMENT_END,\n  CDATA_START,\n  CDATA_END,\n  ATTR_NAME,\n  ATTR_QUOTE,\n  ATTR_VALUE,\n  DOC_TYPE,\n  EXPANSION_FORM_START,\n  EXPANSION_CASE_VALUE,\n  EXPANSION_CASE_EXP_START,\n  EXPANSION_CASE_EXP_END,\n  EXPANSION_FORM_END,\n  EOF\n}\n\nexport class Token {\n  constructor(\n      public type: TokenType|null, public parts: string[], public sourceSpan: ParseSourceSpan) {}\n}\n\nexport class TokenError extends ParseError {\n  constructor(errorMsg: string, public tokenType: TokenType|null, span: ParseSourceSpan) {\n    super(span, errorMsg);\n  }\n}\n\nexport class TokenizeResult {\n  constructor(public tokens: Token[], public errors: TokenError[]) {}\n}\n\nexport interface LexerRange {\n  startPos: number;\n  startLine: number;\n  startCol: number;\n  endPos: number;\n}\n\n/**\n * Options that modify how the text is tokenized.\n */\nexport interface TokenizeOptions {\n  /** Whether to tokenize ICU messages (considered as text nodes when false). */\n  tokenizeExpansionForms?: boolean;\n  /** How to tokenize interpolation markers. */\n  interpolationConfig?: InterpolationConfig;\n  /**\n   * The start and end point of the text to parse within the `source` string.\n   * The entire `source` string is parsed if this is not provided.\n   * */\n  range?: LexerRange;\n  /**\n   * If this text is stored in a JavaScript string, then we have to deal with escape sequences.\n   *\n   * **Example 1:**\n   *\n   * ```\n   * \"abc\\\"def\\nghi\"\n   * ```\n   *\n   * - The `\\\"` must be converted to `\"`.\n   * - The `\\n` must be converted to a new line character in a token,\n   *   but it should not increment the current line for source mapping.\n   *\n   * **Example 2:**\n   *\n   * ```\n   * \"abc\\\n   *  def\"\n   * ```\n   *\n   * The line continuation (`\\` followed by a newline) should be removed from a token\n   * but the new line should increment the current line for source mapping.\n   */\n  escapedString?: boolean;\n  /**\n   * An array of characters that should be considered as leading trivia.\n   * Leading trivia are characters that are not important to the developer, and so should not be\n   * included in source-map segments.  A common example is whitespace.\n   */\n  leadingTriviaChars?: string[];\n}\n\nexport function tokenize(\n    source: string, url: string, getTagDefinition: (tagName: string) => TagDefinition,\n    options: TokenizeOptions = {}): TokenizeResult {\n  return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options).tokenize();\n}\n\nconst _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\n\nfunction _unexpectedCharacterErrorMsg(charCode: number): string {\n  const char = charCode === chars.$EOF ? 'EOF' : String.fromCharCode(charCode);\n  return `Unexpected character \"${char}\"`;\n}\n\nfunction _unknownEntityErrorMsg(entitySrc: string): string {\n  return `Unknown entity \"${entitySrc}\" - use the \"&#<decimal>;\" or  \"&#x<hex>;\" syntax`;\n}\n\nclass _ControlFlowError {\n  constructor(public error: TokenError) {}\n}\n\n// See http://www.w3.org/TR/html51/syntax.html#writing\nclass _Tokenizer {\n  private _cursor: CharacterCursor;\n  private _tokenizeIcu: boolean;\n  private _interpolationConfig: InterpolationConfig;\n  private _leadingTriviaCodePoints: number[]|undefined;\n  private _currentTokenStart: CharacterCursor|null = null;\n  private _currentTokenType: TokenType|null = null;\n  private _expansionCaseStack: TokenType[] = [];\n  private _inInterpolation: boolean = false;\n  tokens: Token[] = [];\n  errors: TokenError[] = [];\n\n  /**\n   * @param _file The html source file being tokenized.\n   * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.\n   * @param options Configuration of the tokenization.\n   */\n  constructor(\n      _file: ParseSourceFile, private _getTagDefinition: (tagName: string) => TagDefinition,\n      options: TokenizeOptions) {\n    this._tokenizeIcu = options.tokenizeExpansionForms || false;\n    this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n    this._leadingTriviaCodePoints =\n        options.leadingTriviaChars && options.leadingTriviaChars.map(c => c.codePointAt(0) || 0);\n    const range =\n        options.range || {endPos: _file.content.length, startPos: 0, startLine: 0, startCol: 0};\n    this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) :\n                                           new PlainCharacterCursor(_file, range);\n    try {\n      this._cursor.init();\n    } catch (e) {\n      this.handleError(e);\n    }\n  }\n\n  private _processCarriageReturns(content: string): string {\n    // http://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream\n    // In order to keep the original position in the source, we can not\n    // pre-process it.\n    // Instead CRs are processed right before instantiating the tokens.\n    return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n  }\n\n  tokenize(): TokenizeResult {\n    while (this._cursor.peek() !== chars.$EOF) {\n      const start = this._cursor.clone();\n      try {\n        if (this._attemptCharCode(chars.$LT)) {\n          if (this._attemptCharCode(chars.$BANG)) {\n            if (this._attemptCharCode(chars.$LBRACKET)) {\n              this._consumeCdata(start);\n            } else if (this._attemptCharCode(chars.$MINUS)) {\n              this._consumeComment(start);\n            } else {\n              this._consumeDocType(start);\n            }\n          } else if (this._attemptCharCode(chars.$SLASH)) {\n            this._consumeTagClose(start);\n          } else {\n            this._consumeTagOpen(start);\n          }\n        } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n          this._consumeText();\n        }\n      } catch (e) {\n        this.handleError(e);\n      }\n    }\n    this._beginToken(TokenType.EOF);\n    this._endToken([]);\n    return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);\n  }\n\n  /**\n   * @returns whether an ICU token has been created\n   * @internal\n   */\n  private _tokenizeExpansionForm(): boolean {\n    if (this.isExpansionFormStart()) {\n      this._consumeExpansionFormStart();\n      return true;\n    }\n\n    if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {\n      this._consumeExpansionCaseStart();\n      return true;\n    }\n\n    if (this._cursor.peek() === chars.$RBRACE) {\n      if (this._isInExpansionCase()) {\n        this._consumeExpansionCaseEnd();\n        return true;\n      }\n\n      if (this._isInExpansionForm()) {\n        this._consumeExpansionFormEnd();\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  private _beginToken(type: TokenType, start = this._cursor.clone()) {\n    this._currentTokenStart = start;\n    this._currentTokenType = type;\n  }\n\n  private _endToken(parts: string[], end = this._cursor.clone()): Token {\n    if (this._currentTokenStart === null) {\n      throw new TokenError(\n          'Programming error - attempted to end a token when there was no start to the token',\n          this._currentTokenType, this._cursor.getSpan(end));\n    }\n    if (this._currentTokenType === null) {\n      throw new TokenError(\n          'Programming error - attempted to end a token which has no token type', null,\n          this._cursor.getSpan(this._currentTokenStart));\n    }\n    const token = new Token(\n        this._currentTokenType, parts,\n        this._cursor.getSpan(this._currentTokenStart, this._leadingTriviaCodePoints));\n    this.tokens.push(token);\n    this._currentTokenStart = null;\n    this._currentTokenType = null;\n    return token;\n  }\n\n  private _createError(msg: string, span: ParseSourceSpan): _ControlFlowError {\n    if (this._isInExpansionForm()) {\n      msg += ` (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)`;\n    }\n    const error = new TokenError(msg, this._currentTokenType, span);\n    this._currentTokenStart = null;\n    this._currentTokenType = null;\n    return new _ControlFlowError(error);\n  }\n\n  private handleError(e: any) {\n    if (e instanceof CursorError) {\n      e = this._createError(e.msg, this._cursor.getSpan(e.cursor));\n    }\n    if (e instanceof _ControlFlowError) {\n      this.errors.push(e.error);\n    } else {\n      throw e;\n    }\n  }\n\n  private _attemptCharCode(charCode: number): boolean {\n    if (this._cursor.peek() === charCode) {\n      this._cursor.advance();\n      return true;\n    }\n    return false;\n  }\n\n  private _attemptCharCodeCaseInsensitive(charCode: number): boolean {\n    if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {\n      this._cursor.advance();\n      return true;\n    }\n    return false;\n  }\n\n  private _requireCharCode(charCode: number) {\n    const location = this._cursor.clone();\n    if (!this._attemptCharCode(charCode)) {\n      throw this._createError(\n          _unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n    }\n  }\n\n  private _attemptStr(chars: string): boolean {\n    const len = chars.length;\n    if (this._cursor.charsLeft() < len) {\n      return false;\n    }\n    const initialPosition = this._cursor.clone();\n    for (let i = 0; i < len; i++) {\n      if (!this._attemptCharCode(chars.charCodeAt(i))) {\n        // If attempting to parse the string fails, we want to reset the parser\n        // to where it was before the attempt\n        this._cursor = initialPosition;\n        return false;\n      }\n    }\n    return true;\n  }\n\n  private _attemptStrCaseInsensitive(chars: string): boolean {\n    for (let i = 0; i < chars.length; i++) {\n      if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  private _requireStr(chars: string) {\n    const location = this._cursor.clone();\n    if (!this._attemptStr(chars)) {\n      throw this._createError(\n          _unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));\n    }\n  }\n\n  private _attemptCharCodeUntilFn(predicate: (code: number) => boolean) {\n    while (!predicate(this._cursor.peek())) {\n      this._cursor.advance();\n    }\n  }\n\n  private _requireCharCodeUntilFn(predicate: (code: number) => boolean, len: number) {\n    const start = this._cursor.clone();\n    this._attemptCharCodeUntilFn(predicate);\n    const end = this._cursor.clone();\n    if (end.diff(start) < len) {\n      throw this._createError(\n          _unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n    }\n  }\n\n  private _attemptUntilChar(char: number) {\n    while (this._cursor.peek() !== char) {\n      this._cursor.advance();\n    }\n  }\n\n  private _readChar(decodeEntities: boolean): string {\n    if (decodeEntities && this._cursor.peek() === chars.$AMPERSAND) {\n      return this._decodeEntity();\n    } else {\n      // Don't rely upon reading directly from `_input` as the actual char value\n      // may have been generated from an escape sequence.\n      const char = String.fromCodePoint(this._cursor.peek());\n      this._cursor.advance();\n      return char;\n    }\n  }\n\n  private _decodeEntity(): string {\n    const start = this._cursor.clone();\n    this._cursor.advance();\n    if (this._attemptCharCode(chars.$HASH)) {\n      const isHex = this._attemptCharCode(chars.$x) || this._attemptCharCode(chars.$X);\n      const codeStart = this._cursor.clone();\n      this._attemptCharCodeUntilFn(isDigitEntityEnd);\n      if (this._cursor.peek() != chars.$SEMICOLON) {\n        throw this._createError(\n            _unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan());\n      }\n      const strNum = this._cursor.getChars(codeStart);\n      this._cursor.advance();\n      try {\n        const charCode = parseInt(strNum, isHex ? 16 : 10);\n        return String.fromCharCode(charCode);\n      } catch {\n        throw this._createError(\n            _unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());\n      }\n    } else {\n      const nameStart = this._cursor.clone();\n      this._attemptCharCodeUntilFn(isNamedEntityEnd);\n      if (this._cursor.peek() != chars.$SEMICOLON) {\n        this._cursor = nameStart;\n        return '&';\n      }\n      const name = this._cursor.getChars(nameStart);\n      this._cursor.advance();\n      const char = NAMED_ENTITIES[name];\n      if (!char) {\n        throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));\n      }\n      return char;\n    }\n  }\n\n  private _consumeRawText(decodeEntities: boolean, endMarkerPredicate: () => boolean): Token {\n    this._beginToken(decodeEntities ? TokenType.ESCAPABLE_RAW_TEXT : TokenType.RAW_TEXT);\n    const parts: string[] = [];\n    while (true) {\n      const tagCloseStart = this._cursor.clone();\n      const foundEndMarker = endMarkerPredicate();\n      this._cursor = tagCloseStart;\n      if (foundEndMarker) {\n        break;\n      }\n      parts.push(this._readChar(decodeEntities));\n    }\n    return this._endToken([this._processCarriageReturns(parts.join(''))]);\n  }\n\n  private _consumeComment(start: CharacterCursor) {\n    this._beginToken(TokenType.COMMENT_START, start);\n    this._requireCharCode(chars.$MINUS);\n    this._endToken([]);\n    this._consumeRawText(false, () => this._attemptStr('-->'));\n    this._beginToken(TokenType.COMMENT_END);\n    this._requireStr('-->');\n    this._endToken([]);\n  }\n\n  private _consumeCdata(start: CharacterCursor) {\n    this._beginToken(TokenType.CDATA_START, start);\n    this._requireStr('CDATA[');\n    this._endToken([]);\n    this._consumeRawText(false, () => this._attemptStr(']]>'));\n    this._beginToken(TokenType.CDATA_END);\n    this._requireStr(']]>');\n    this._endToken([]);\n  }\n\n  private _consumeDocType(start: CharacterCursor) {\n    this._beginToken(TokenType.DOC_TYPE, start);\n    const contentStart = this._cursor.clone();\n    this._attemptUntilChar(chars.$GT);\n    const content = this._cursor.getChars(contentStart);\n    this._cursor.advance();\n    this._endToken([content]);\n  }\n\n  private _consumePrefixAndName(): string[] {\n    const nameOrPrefixStart = this._cursor.clone();\n    let prefix: string = '';\n    while (this._cursor.peek() !== chars.$COLON && !isPrefixEnd(this._cursor.peek())) {\n      this._cursor.advance();\n    }\n    let nameStart: CharacterCursor;\n    if (this._cursor.peek() === chars.$COLON) {\n      prefix = this._cursor.getChars(nameOrPrefixStart);\n      this._cursor.advance();\n      nameStart = this._cursor.clone();\n    } else {\n      nameStart = nameOrPrefixStart;\n    }\n    this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);\n    const name = this._cursor.getChars(nameStart);\n    return [prefix, name];\n  }\n\n  private _consumeTagOpen(start: CharacterCursor) {\n    let tagName: string;\n    let prefix: string;\n    let openTagToken: Token|undefined;\n    let tokensBeforeTagOpen = this.tokens.length;\n    const innerStart = this._cursor.clone();\n    try {\n      if (!chars.isAsciiLetter(this._cursor.peek())) {\n        throw this._createError(\n            _unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));\n      }\n\n      openTagToken = this._consumeTagOpenStart(start);\n      prefix = openTagToken.parts[0];\n      tagName = openTagToken.parts[1];\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n      while (this._cursor.peek() !== chars.$SLASH && this._cursor.peek() !== chars.$GT) {\n        this._consumeAttributeName();\n        this._attemptCharCodeUntilFn(isNotWhitespace);\n        if (this._attemptCharCode(chars.$EQ)) {\n          this._attemptCharCodeUntilFn(isNotWhitespace);\n          this._consumeAttributeValue();\n        }\n        this._attemptCharCodeUntilFn(isNotWhitespace);\n      }\n      this._consumeTagOpenEnd();\n    } catch (e) {\n      if (e instanceof _ControlFlowError) {\n        // When the start tag is invalid (including invalid \"attributes\"), assume we want a \"<\"\n        this._cursor = innerStart;\n        if (openTagToken) {\n          this.tokens.length = tokensBeforeTagOpen;\n        }\n        // Back to back text tokens are merged at the end\n        this._beginToken(TokenType.TEXT, start);\n        this._endToken(['<']);\n        return;\n      }\n\n      throw e;\n    }\n\n    const contentTokenType = this._getTagDefinition(tagName).contentType;\n\n    if (contentTokenType === TagContentType.RAW_TEXT) {\n      this._consumeRawTextWithTagClose(prefix, tagName, false);\n    } else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n      this._consumeRawTextWithTagClose(prefix, tagName, true);\n    }\n  }\n\n  private _consumeRawTextWithTagClose(prefix: string, tagName: string, decodeEntities: boolean) {\n    const textToken = this._consumeRawText(decodeEntities, () => {\n      if (!this._attemptCharCode(chars.$LT)) return false;\n      if (!this._attemptCharCode(chars.$SLASH)) return false;\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n      if (!this._attemptStrCaseInsensitive(tagName)) return false;\n      this._attemptCharCodeUntilFn(isNotWhitespace);\n      return this._attemptCharCode(chars.$GT);\n    });\n    this._beginToken(TokenType.TAG_CLOSE);\n    this._requireCharCodeUntilFn(code => code === chars.$GT, 3);\n    this._cursor.advance();  // Consume the `>`\n    this._endToken([prefix, tagName]);\n  }\n\n  private _consumeTagOpenStart(start: CharacterCursor) {\n    this._beginToken(TokenType.TAG_OPEN_START, start);\n    const parts = this._consumePrefixAndName();\n    return this._endToken(parts);\n  }\n\n  private _consumeAttributeName() {\n    const attrNameStart = this._cursor.peek();\n    if (attrNameStart === chars.$SQ || attrNameStart === chars.$DQ) {\n      throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());\n    }\n    this._beginToken(TokenType.ATTR_NAME);\n    const prefixAndName = this._consumePrefixAndName();\n    this._endToken(prefixAndName);\n  }\n\n  private _consumeAttributeValue() {\n    let value: string;\n    if (this._cursor.peek() === chars.$SQ || this._cursor.peek() === chars.$DQ) {\n      this._beginToken(TokenType.ATTR_QUOTE);\n      const quoteChar = this._cursor.peek();\n      this._cursor.advance();\n      this._endToken([String.fromCodePoint(quoteChar)]);\n      this._beginToken(TokenType.ATTR_VALUE);\n      const parts: string[] = [];\n      while (this._cursor.peek() !== quoteChar) {\n        parts.push(this._readChar(true));\n      }\n      value = parts.join('');\n      this._endToken([this._processCarriageReturns(value)]);\n      this._beginToken(TokenType.ATTR_QUOTE);\n      this._cursor.advance();\n      this._endToken([String.fromCodePoint(quoteChar)]);\n    } else {\n      this._beginToken(TokenType.ATTR_VALUE);\n      const valueStart = this._cursor.clone();\n      this._requireCharCodeUntilFn(isNameEnd, 1);\n      value = this._cursor.getChars(valueStart);\n      this._endToken([this._processCarriageReturns(value)]);\n    }\n  }\n\n  private _consumeTagOpenEnd() {\n    const tokenType =\n        this._attemptCharCode(chars.$SLASH) ? TokenType.TAG_OPEN_END_VOID : TokenType.TAG_OPEN_END;\n    this._beginToken(tokenType);\n    this._requireCharCode(chars.$GT);\n    this._endToken([]);\n  }\n\n  private _consumeTagClose(start: CharacterCursor) {\n    this._beginToken(TokenType.TAG_CLOSE, start);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n    const prefixAndName = this._consumePrefixAndName();\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n    this._requireCharCode(chars.$GT);\n    this._endToken(prefixAndName);\n  }\n\n  private _consumeExpansionFormStart() {\n    this._beginToken(TokenType.EXPANSION_FORM_START);\n    this._requireCharCode(chars.$LBRACE);\n    this._endToken([]);\n\n    this._expansionCaseStack.push(TokenType.EXPANSION_FORM_START);\n\n    this._beginToken(TokenType.RAW_TEXT);\n    const condition = this._readUntil(chars.$COMMA);\n    this._endToken([condition]);\n    this._requireCharCode(chars.$COMMA);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n\n    this._beginToken(TokenType.RAW_TEXT);\n    const type = this._readUntil(chars.$COMMA);\n    this._endToken([type]);\n    this._requireCharCode(chars.$COMMA);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n  }\n\n  private _consumeExpansionCaseStart() {\n    this._beginToken(TokenType.EXPANSION_CASE_VALUE);\n    const value = this._readUntil(chars.$LBRACE).trim();\n    this._endToken([value]);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n\n    this._beginToken(TokenType.EXPANSION_CASE_EXP_START);\n    this._requireCharCode(chars.$LBRACE);\n    this._endToken([]);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n\n    this._expansionCaseStack.push(TokenType.EXPANSION_CASE_EXP_START);\n  }\n\n  private _consumeExpansionCaseEnd() {\n    this._beginToken(TokenType.EXPANSION_CASE_EXP_END);\n    this._requireCharCode(chars.$RBRACE);\n    this._endToken([]);\n    this._attemptCharCodeUntilFn(isNotWhitespace);\n\n    this._expansionCaseStack.pop();\n  }\n\n  private _consumeExpansionFormEnd() {\n    this._beginToken(TokenType.EXPANSION_FORM_END);\n    this._requireCharCode(chars.$RBRACE);\n    this._endToken([]);\n\n    this._expansionCaseStack.pop();\n  }\n\n  private _consumeText() {\n    const start = this._cursor.clone();\n    this._beginToken(TokenType.TEXT, start);\n    const parts: string[] = [];\n\n    do {\n      if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n        parts.push(this._interpolationConfig.start);\n        this._inInterpolation = true;\n      } else if (\n          this._interpolationConfig && this._inInterpolation &&\n          this._attemptStr(this._interpolationConfig.end)) {\n        parts.push(this._interpolationConfig.end);\n        this._inInterpolation = false;\n      } else {\n        parts.push(this._readChar(true));\n      }\n    } while (!this._isTextEnd());\n\n    this._endToken([this._processCarriageReturns(parts.join(''))]);\n  }\n\n  private _isTextEnd(): boolean {\n    if (this._cursor.peek() === chars.$LT || this._cursor.peek() === chars.$EOF) {\n      return true;\n    }\n\n    if (this._tokenizeIcu && !this._inInterpolation) {\n      if (this.isExpansionFormStart()) {\n        // start of an expansion form\n        return true;\n      }\n\n      if (this._cursor.peek() === chars.$RBRACE && this._isInExpansionCase()) {\n        // end of and expansion case\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  private _readUntil(char: number): string {\n    const start = this._cursor.clone();\n    this._attemptUntilChar(char);\n    return this._cursor.getChars(start);\n  }\n\n  private _isInExpansionCase(): boolean {\n    return this._expansionCaseStack.length > 0 &&\n        this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n        TokenType.EXPANSION_CASE_EXP_START;\n  }\n\n  private _isInExpansionForm(): boolean {\n    return this._expansionCaseStack.length > 0 &&\n        this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n        TokenType.EXPANSION_FORM_START;\n  }\n\n  private isExpansionFormStart(): boolean {\n    if (this._cursor.peek() !== chars.$LBRACE) {\n      return false;\n    }\n    if (this._interpolationConfig) {\n      const start = this._cursor.clone();\n      const isInterpolation = this._attemptStr(this._interpolationConfig.start);\n      this._cursor = start;\n      return !isInterpolation;\n    }\n    return true;\n  }\n}\n\nfunction isNotWhitespace(code: number): boolean {\n  return !chars.isWhitespace(code) || code === chars.$EOF;\n}\n\nfunction isNameEnd(code: number): boolean {\n  return chars.isWhitespace(code) || code === chars.$GT || code === chars.$SLASH ||\n      code === chars.$SQ || code === chars.$DQ || code === chars.$EQ;\n}\n\nfunction isPrefixEnd(code: number): boolean {\n  return (code < chars.$a || chars.$z < code) && (code < chars.$A || chars.$Z < code) &&\n      (code < chars.$0 || code > chars.$9);\n}\n\nfunction isDigitEntityEnd(code: number): boolean {\n  return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiHexDigit(code);\n}\n\nfunction isNamedEntityEnd(code: number): boolean {\n  return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiLetter(code);\n}\n\nfunction isExpansionCaseStart(peek: number): boolean {\n  return peek === chars.$EQ || chars.isAsciiLetter(peek) || chars.isDigit(peek);\n}\n\nfunction compareCharCodeCaseInsensitive(code1: number, code2: number): boolean {\n  return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);\n}\n\nfunction toUpperCaseCharCode(code: number): number {\n  return code >= chars.$a && code <= chars.$z ? code - chars.$a + chars.$A : code;\n}\n\nfunction mergeTextTokens(srcTokens: Token[]): Token[] {\n  const dstTokens: Token[] = [];\n  let lastDstToken: Token|undefined = undefined;\n  for (let i = 0; i < srcTokens.length; i++) {\n    const token = srcTokens[i];\n    if (lastDstToken && lastDstToken.type == TokenType.TEXT && token.type == TokenType.TEXT) {\n      lastDstToken.parts[0] ! += token.parts[0];\n      lastDstToken.sourceSpan.end = token.sourceSpan.end;\n    } else {\n      lastDstToken = token;\n      dstTokens.push(lastDstToken);\n    }\n  }\n\n  return dstTokens;\n}\n\n\n/**\n * The _Tokenizer uses objects of this type to move through the input text,\n * extracting \"parsed characters\". These could be more than one actual character\n * if the text contains escape sequences.\n */\ninterface CharacterCursor {\n  /** Initialize the cursor. */\n  init(): void;\n  /** The parsed character at the current cursor position. */\n  peek(): number;\n  /** Advance the cursor by one parsed character. */\n  advance(): void;\n  /** Get a span from the marked start point to the current point. */\n  getSpan(start?: this, leadingTriviaCodePoints?: number[]): ParseSourceSpan;\n  /** Get the parsed characters from the marked start point to the current point. */\n  getChars(start: this): string;\n  /** The number of characters left before the end of the cursor. */\n  charsLeft(): number;\n  /** The number of characters between `this` cursor and `other` cursor. */\n  diff(other: this): number;\n  /** Make a copy of this cursor */\n  clone(): CharacterCursor;\n}\n\ninterface CursorState {\n  peek: number;\n  offset: number;\n  line: number;\n  column: number;\n}\n\nclass PlainCharacterCursor implements CharacterCursor {\n  protected state: CursorState;\n  protected file: ParseSourceFile;\n  protected input: string;\n  protected end: number;\n\n  constructor(fileOrCursor: PlainCharacterCursor);\n  constructor(fileOrCursor: ParseSourceFile, range: LexerRange);\n  constructor(fileOrCursor: ParseSourceFile|PlainCharacterCursor, range?: LexerRange) {\n    if (fileOrCursor instanceof PlainCharacterCursor) {\n      this.file = fileOrCursor.file;\n      this.input = fileOrCursor.input;\n      this.end = fileOrCursor.end;\n      this.state = {...fileOrCursor.state};\n    } else {\n      if (!range) {\n        throw new Error(\n            'Programming error: the range argument must be provided with a file argument.');\n      }\n      this.file = fileOrCursor;\n      this.input = fileOrCursor.content;\n      this.end = range.endPos;\n      this.state = {\n        peek: -1,\n        offset: range.startPos,\n        line: range.startLine,\n        column: range.startCol,\n      };\n    }\n  }\n\n  clone(): PlainCharacterCursor { return new PlainCharacterCursor(this); }\n\n  peek() { return this.state.peek; }\n  charsLeft() { return this.end - this.state.offset; }\n  diff(other: this) { return this.state.offset - other.state.offset; }\n\n  advance(): void { this.advanceState(this.state); }\n\n  init(): void { this.updatePeek(this.state); }\n\n  getSpan(start?: this, leadingTriviaCodePoints?: number[]): ParseSourceSpan {\n    start = start || this;\n    if (leadingTriviaCodePoints) {\n      start = start.clone() as this;\n      while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {\n        start.advance();\n      }\n    }\n    return new ParseSourceSpan(\n        new ParseLocation(start.file, start.state.offset, start.state.line, start.state.column),\n        new ParseLocation(this.file, this.state.offset, this.state.line, this.state.column));\n  }\n\n  getChars(start: this): string {\n    return this.input.substring(start.state.offset, this.state.offset);\n  }\n\n  charAt(pos: number): number { return this.input.charCodeAt(pos); }\n\n  protected advanceState(state: CursorState) {\n    if (state.offset >= this.end) {\n      this.state = state;\n      throw new CursorError('Unexpected character \"EOF\"', this);\n    }\n    const currentChar = this.charAt(state.offset);\n    if (currentChar === chars.$LF) {\n      state.line++;\n      state.column = 0;\n    } else if (!chars.isNewLine(currentChar)) {\n      state.column++;\n    }\n    state.offset++;\n    this.updatePeek(state);\n  }\n\n  protected updatePeek(state: CursorState): void {\n    state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset);\n  }\n}\n\nclass EscapedCharacterCursor extends PlainCharacterCursor {\n  protected internalState: CursorState;\n\n  constructor(fileOrCursor: EscapedCharacterCursor);\n  constructor(fileOrCursor: ParseSourceFile, range: LexerRange);\n  constructor(fileOrCursor: ParseSourceFile|EscapedCharacterCursor, range?: LexerRange) {\n    if (fileOrCursor instanceof EscapedCharacterCursor) {\n      super(fileOrCursor);\n      this.internalState = {...fileOrCursor.internalState};\n    } else {\n      super(fileOrCursor, range !);\n      this.internalState = this.state;\n    }\n  }\n\n  advance(): void {\n    this.state = this.internalState;\n    super.advance();\n    this.processEscapeSequence();\n  }\n\n  init(): void {\n    super.init();\n    this.processEscapeSequence();\n  }\n\n  clone(): EscapedCharacterCursor { return new EscapedCharacterCursor(this); }\n\n  getChars(start: this): string {\n    const cursor = start.clone();\n    let chars = '';\n    while (cursor.internalState.offset < this.internalState.offset) {\n      chars += String.fromCodePoint(cursor.peek());\n      cursor.advance();\n    }\n    return chars;\n  }\n\n  /**\n   * Process the escape sequence that starts at the current position in the text.\n   *\n   * This method is called to ensure that `peek` has the unescaped value of escape sequences.\n   */\n  protected processEscapeSequence(): void {\n    const peek = () => this.internalState.peek;\n\n    if (peek() === chars.$BACKSLASH) {\n      // We have hit an escape sequence so we need the internal state to become independent\n      // of the external state.\n      this.internalState = {...this.state};\n\n      // Move past the backslash\n      this.advanceState(this.internalState);\n\n      // First check for standard control char sequences\n      if (peek() === chars.$n) {\n        this.state.peek = chars.$LF;\n      } else if (peek() === chars.$r) {\n        this.state.peek = chars.$CR;\n      } else if (peek() === chars.$v) {\n        this.state.peek = chars.$VTAB;\n      } else if (peek() === chars.$t) {\n        this.state.peek = chars.$TAB;\n      } else if (peek() === chars.$b) {\n        this.state.peek = chars.$BSPACE;\n      } else if (peek() === chars.$f) {\n        this.state.peek = chars.$FF;\n      }\n\n      // Now consider more complex sequences\n      else if (peek() === chars.$u) {\n        // Unicode code-point sequence\n        this.advanceState(this.internalState);  // advance past the `u` char\n        if (peek() === chars.$LBRACE) {\n          // Variable length Unicode, e.g. `\\x{123}`\n          this.advanceState(this.internalState);  // advance past the `{` char\n          // Advance past the variable number of hex digits until we hit a `}` char\n          const digitStart = this.clone();\n          let length = 0;\n          while (peek() !== chars.$RBRACE) {\n            this.advanceState(this.internalState);\n            length++;\n          }\n          this.state.peek = this.decodeHexDigits(digitStart, length);\n        } else {\n          // Fixed length Unicode, e.g. `\\u1234`\n          const digitStart = this.clone();\n          this.advanceState(this.internalState);\n          this.advanceState(this.internalState);\n          this.advanceState(this.internalState);\n          this.state.peek = this.decodeHexDigits(digitStart, 4);\n        }\n      }\n\n      else if (peek() === chars.$x) {\n        // Hex char code, e.g. `\\x2F`\n        this.advanceState(this.internalState);  // advance past the `x` char\n        const digitStart = this.clone();\n        this.advanceState(this.internalState);\n        this.state.peek = this.decodeHexDigits(digitStart, 2);\n      }\n\n      else if (chars.isOctalDigit(peek())) {\n        // Octal char code, e.g. `\\012`,\n        let octal = '';\n        let length = 0;\n        let previous = this.clone();\n        while (chars.isOctalDigit(peek()) && length < 3) {\n          previous = this.clone();\n          octal += String.fromCodePoint(peek());\n          this.advanceState(this.internalState);\n          length++;\n        }\n        this.state.peek = parseInt(octal, 8);\n        // Backup one char\n        this.internalState = previous.internalState;\n      }\n\n      else if (chars.isNewLine(this.internalState.peek)) {\n        // Line continuation `\\` followed by a new line\n        this.advanceState(this.internalState);  // advance over the newline\n        this.state = this.internalState;\n      }\n\n      else {\n        // If none of the `if` blocks were executed then we just have an escaped normal character.\n        // In that case we just, effectively, skip the backslash from the character.\n        this.state.peek = this.internalState.peek;\n      }\n    }\n  }\n\n  protected decodeHexDigits(start: EscapedCharacterCursor, length: number): number {\n    const hex = this.input.substr(start.internalState.offset, length);\n    const charCode = parseInt(hex, 16);\n    if (!isNaN(charCode)) {\n      return charCode;\n    } else {\n      start.state = start.internalState;\n      throw new CursorError('Invalid hexadecimal escape sequence', start);\n    }\n  }\n}\n\nexport class CursorError {\n  constructor(public msg: string, public cursor: CharacterCursor) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParseError, ParseSourceSpan} from '../parse_util';\n\nimport * as html from './ast';\nimport * as lex from './lexer';\nimport {TagDefinition, getNsPrefix, isNgContainer, mergeNsAndName} from './tags';\n\nexport class TreeError extends ParseError {\n  static create(elementName: string|null, span: ParseSourceSpan, msg: string): TreeError {\n    return new TreeError(elementName, span, msg);\n  }\n\n  constructor(public elementName: string|null, span: ParseSourceSpan, msg: string) {\n    super(span, msg);\n  }\n}\n\nexport class ParseTreeResult {\n  constructor(public rootNodes: html.Node[], public errors: ParseError[]) {}\n}\n\nexport class Parser {\n  constructor(public getTagDefinition: (tagName: string) => TagDefinition) {}\n\n  parse(source: string, url: string, options?: lex.TokenizeOptions): ParseTreeResult {\n    const tokensAndErrors = lex.tokenize(source, url, this.getTagDefinition, options);\n\n    const treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();\n\n    return new ParseTreeResult(\n        treeAndErrors.rootNodes,\n        (<ParseError[]>tokensAndErrors.errors).concat(treeAndErrors.errors));\n  }\n}\n\nclass _TreeBuilder {\n  private _index: number = -1;\n  // TODO(issue/24571): remove '!'.\n  private _peek !: lex.Token;\n\n  private _rootNodes: html.Node[] = [];\n  private _errors: TreeError[] = [];\n\n  private _elementStack: html.Element[] = [];\n\n  constructor(\n      private tokens: lex.Token[], private getTagDefinition: (tagName: string) => TagDefinition) {\n    this._advance();\n  }\n\n  build(): ParseTreeResult {\n    while (this._peek.type !== lex.TokenType.EOF) {\n      if (this._peek.type === lex.TokenType.TAG_OPEN_START) {\n        this._consumeStartTag(this._advance());\n      } else if (this._peek.type === lex.TokenType.TAG_CLOSE) {\n        this._consumeEndTag(this._advance());\n      } else if (this._peek.type === lex.TokenType.CDATA_START) {\n        this._closeVoidElement();\n        this._consumeCdata(this._advance());\n      } else if (this._peek.type === lex.TokenType.COMMENT_START) {\n        this._closeVoidElement();\n        this._consumeComment(this._advance());\n      } else if (\n          this._peek.type === lex.TokenType.TEXT || this._peek.type === lex.TokenType.RAW_TEXT ||\n          this._peek.type === lex.TokenType.ESCAPABLE_RAW_TEXT) {\n        this._closeVoidElement();\n        this._consumeText(this._advance());\n      } else if (this._peek.type === lex.TokenType.EXPANSION_FORM_START) {\n        this._consumeExpansion(this._advance());\n      } else {\n        // Skip all other tokens...\n        this._advance();\n      }\n    }\n    return new ParseTreeResult(this._rootNodes, this._errors);\n  }\n\n  private _advance(): lex.Token {\n    const prev = this._peek;\n    if (this._index < this.tokens.length - 1) {\n      // Note: there is always an EOF token at the end\n      this._index++;\n    }\n    this._peek = this.tokens[this._index];\n    return prev;\n  }\n\n  private _advanceIf(type: lex.TokenType): lex.Token|null {\n    if (this._peek.type === type) {\n      return this._advance();\n    }\n    return null;\n  }\n\n  private _consumeCdata(startToken: lex.Token) {\n    this._consumeText(this._advance());\n    this._advanceIf(lex.TokenType.CDATA_END);\n  }\n\n  private _consumeComment(token: lex.Token) {\n    const text = this._advanceIf(lex.TokenType.RAW_TEXT);\n    this._advanceIf(lex.TokenType.COMMENT_END);\n    const value = text != null ? text.parts[0].trim() : null;\n    this._addToParent(new html.Comment(value, token.sourceSpan));\n  }\n\n  private _consumeExpansion(token: lex.Token) {\n    const switchValue = this._advance();\n\n    const type = this._advance();\n    const cases: html.ExpansionCase[] = [];\n\n    // read =\n    while (this._peek.type === lex.TokenType.EXPANSION_CASE_VALUE) {\n      const expCase = this._parseExpansionCase();\n      if (!expCase) return;  // error\n      cases.push(expCase);\n    }\n\n    // read the final }\n    if (this._peek.type !== lex.TokenType.EXPANSION_FORM_END) {\n      this._errors.push(\n          TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));\n      return;\n    }\n    const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end);\n    this._addToParent(new html.Expansion(\n        switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n\n    this._advance();\n  }\n\n  private _parseExpansionCase(): html.ExpansionCase|null {\n    const value = this._advance();\n\n    // read {\n    if (this._peek.type !== lex.TokenType.EXPANSION_CASE_EXP_START) {\n      this._errors.push(\n          TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`));\n      return null;\n    }\n\n    // read until }\n    const start = this._advance();\n\n    const exp = this._collectExpansionExpTokens(start);\n    if (!exp) return null;\n\n    const end = this._advance();\n    exp.push(new lex.Token(lex.TokenType.EOF, [], end.sourceSpan));\n\n    // parse everything in between { and }\n    const parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();\n    if (parsedExp.errors.length > 0) {\n      this._errors = this._errors.concat(<TreeError[]>parsedExp.errors);\n      return null;\n    }\n\n    const sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);\n    const expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);\n    return new html.ExpansionCase(\n        value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n  }\n\n  private _collectExpansionExpTokens(start: lex.Token): lex.Token[]|null {\n    const exp: lex.Token[] = [];\n    const expansionFormStack = [lex.TokenType.EXPANSION_CASE_EXP_START];\n\n    while (true) {\n      if (this._peek.type === lex.TokenType.EXPANSION_FORM_START ||\n          this._peek.type === lex.TokenType.EXPANSION_CASE_EXP_START) {\n        expansionFormStack.push(this._peek.type);\n      }\n\n      if (this._peek.type === lex.TokenType.EXPANSION_CASE_EXP_END) {\n        if (lastOnStack(expansionFormStack, lex.TokenType.EXPANSION_CASE_EXP_START)) {\n          expansionFormStack.pop();\n          if (expansionFormStack.length == 0) return exp;\n\n        } else {\n          this._errors.push(\n              TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n          return null;\n        }\n      }\n\n      if (this._peek.type === lex.TokenType.EXPANSION_FORM_END) {\n        if (lastOnStack(expansionFormStack, lex.TokenType.EXPANSION_FORM_START)) {\n          expansionFormStack.pop();\n        } else {\n          this._errors.push(\n              TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n          return null;\n        }\n      }\n\n      if (this._peek.type === lex.TokenType.EOF) {\n        this._errors.push(\n            TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));\n        return null;\n      }\n\n      exp.push(this._advance());\n    }\n  }\n\n  private _consumeText(token: lex.Token) {\n    let text = token.parts[0];\n    if (text.length > 0 && text[0] == '\\n') {\n      const parent = this._getParentElement();\n      if (parent != null && parent.children.length == 0 &&\n          this.getTagDefinition(parent.name).ignoreFirstLf) {\n        text = text.substring(1);\n      }\n    }\n\n    if (text.length > 0) {\n      this._addToParent(new html.Text(text, token.sourceSpan));\n    }\n  }\n\n  private _closeVoidElement(): void {\n    const el = this._getParentElement();\n    if (el && this.getTagDefinition(el.name).isVoid) {\n      this._elementStack.pop();\n    }\n  }\n\n  private _consumeStartTag(startTagToken: lex.Token) {\n    const prefix = startTagToken.parts[0];\n    const name = startTagToken.parts[1];\n    const attrs: html.Attribute[] = [];\n    while (this._peek.type === lex.TokenType.ATTR_NAME) {\n      attrs.push(this._consumeAttr(this._advance()));\n    }\n    const fullName = this._getElementFullName(prefix, name, this._getParentElement());\n    let selfClosing = false;\n    // Note: There could have been a tokenizer error\n    // so that we don't get a token for the end tag...\n    if (this._peek.type === lex.TokenType.TAG_OPEN_END_VOID) {\n      this._advance();\n      selfClosing = true;\n      const tagDef = this.getTagDefinition(fullName);\n      if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n        this._errors.push(TreeError.create(\n            fullName, startTagToken.sourceSpan,\n            `Only void and foreign elements can be self closed \"${startTagToken.parts[1]}\"`));\n      }\n    } else if (this._peek.type === lex.TokenType.TAG_OPEN_END) {\n      this._advance();\n      selfClosing = false;\n    }\n    const end = this._peek.sourceSpan.start;\n    const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end);\n    const el = new html.Element(fullName, attrs, [], span, span, undefined);\n    this._pushElement(el);\n    if (selfClosing) {\n      this._popElement(fullName);\n      el.endSourceSpan = span;\n    }\n  }\n\n  private _pushElement(el: html.Element) {\n    const parentEl = this._getParentElement();\n\n    if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n      this._elementStack.pop();\n    }\n\n    this._addToParent(el);\n    this._elementStack.push(el);\n  }\n\n  private _consumeEndTag(endTagToken: lex.Token) {\n    const fullName = this._getElementFullName(\n        endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n\n    if (this._getParentElement()) {\n      this._getParentElement() !.endSourceSpan = endTagToken.sourceSpan;\n    }\n\n    if (this.getTagDefinition(fullName).isVoid) {\n      this._errors.push(TreeError.create(\n          fullName, endTagToken.sourceSpan,\n          `Void elements do not have end tags \"${endTagToken.parts[1]}\"`));\n    } else if (!this._popElement(fullName)) {\n      const errMsg =\n          `Unexpected closing tag \"${fullName}\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;\n      this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n    }\n  }\n\n  private _popElement(fullName: string): boolean {\n    for (let stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n      const el = this._elementStack[stackIndex];\n      if (el.name == fullName) {\n        this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n        return true;\n      }\n\n      if (!this.getTagDefinition(el.name).closedByParent) {\n        return false;\n      }\n    }\n    return false;\n  }\n\n  private _consumeAttr(attrName: lex.Token): html.Attribute {\n    const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n    let end = attrName.sourceSpan.end;\n    let value = '';\n    let valueSpan: ParseSourceSpan = undefined !;\n    if (this._peek.type === lex.TokenType.ATTR_QUOTE) {\n      this._advance();\n    }\n    if (this._peek.type === lex.TokenType.ATTR_VALUE) {\n      const valueToken = this._advance();\n      value = valueToken.parts[0];\n      end = valueToken.sourceSpan.end;\n      valueSpan = valueToken.sourceSpan;\n    }\n    if (this._peek.type === lex.TokenType.ATTR_QUOTE) {\n      const quoteToken = this._advance();\n      end = quoteToken.sourceSpan.end;\n    }\n    return new html.Attribute(\n        fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);\n  }\n\n  private _getParentElement(): html.Element|null {\n    return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n  }\n\n  /**\n   * Returns the parent in the DOM and the container.\n   *\n   * `<ng-container>` elements are skipped as they are not rendered as DOM element.\n   */\n  private _getParentElementSkippingContainers():\n      {parent: html.Element | null, container: html.Element|null} {\n    let container: html.Element|null = null;\n\n    for (let i = this._elementStack.length - 1; i >= 0; i--) {\n      if (!isNgContainer(this._elementStack[i].name)) {\n        return {parent: this._elementStack[i], container};\n      }\n      container = this._elementStack[i];\n    }\n\n    return {parent: null, container};\n  }\n\n  private _addToParent(node: html.Node) {\n    const parent = this._getParentElement();\n    if (parent != null) {\n      parent.children.push(node);\n    } else {\n      this._rootNodes.push(node);\n    }\n  }\n\n  /**\n   * Insert a node between the parent and the container.\n   * When no container is given, the node is appended as a child of the parent.\n   * Also updates the element stack accordingly.\n   *\n   * @internal\n   */\n  private _insertBeforeContainer(\n      parent: html.Element, container: html.Element|null, node: html.Element) {\n    if (!container) {\n      this._addToParent(node);\n      this._elementStack.push(node);\n    } else {\n      if (parent) {\n        // replace the container with the new node in the children\n        const index = parent.children.indexOf(container);\n        parent.children[index] = node;\n      } else {\n        this._rootNodes.push(node);\n      }\n      node.children.push(container);\n      this._elementStack.splice(this._elementStack.indexOf(container), 0, node);\n    }\n  }\n\n  private _getElementFullName(prefix: string, localName: string, parentElement: html.Element|null):\n      string {\n    if (prefix === '') {\n      prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';\n      if (prefix === '' && parentElement != null) {\n        prefix = getNsPrefix(parentElement.name);\n      }\n    }\n\n    return mergeNsAndName(prefix, localName);\n  }\n}\n\nfunction lastOnStack(stack: any[], element: any): boolean {\n  return stack.length > 0 && stack[stack.length - 1] === element;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getHtmlTagDefinition} from './html_tags';\nimport {TokenizeOptions} from './lexer';\nimport {ParseTreeResult, Parser} from './parser';\n\nexport {ParseTreeResult, TreeError} from './parser';\n\nexport class HtmlParser extends Parser {\n  constructor() { super(getHtmlTagDefinition); }\n\n  parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult {\n    return super.parse(source, url, options);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as html from './ast';\nimport {ParseTreeResult} from './parser';\nimport {NGSP_UNICODE} from './tags';\n\nexport const PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\n\nconst SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);\n\n// Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nconst WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nconst NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);\nconst WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, 'g');\n\nfunction hasPreserveWhitespacesAttr(attrs: html.Attribute[]): boolean {\n  return attrs.some((attr: html.Attribute) => attr.name === PRESERVE_WS_ATTR_NAME);\n}\n\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here.\n */\nexport function replaceNgsp(value: string): string {\n  // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n  return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nexport class WhitespaceVisitor implements html.Visitor {\n  visitElement(element: html.Element, context: any): any {\n    if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n      // don't descent into elements where we need to preserve whitespaces\n      // but still visit all attributes to eliminate one used as a market to preserve WS\n      return new html.Element(\n          element.name, html.visitAll(this, element.attrs), element.children, element.sourceSpan,\n          element.startSourceSpan, element.endSourceSpan, element.i18n);\n    }\n\n    return new html.Element(\n        element.name, element.attrs, html.visitAll(this, element.children), element.sourceSpan,\n        element.startSourceSpan, element.endSourceSpan, element.i18n);\n  }\n\n  visitAttribute(attribute: html.Attribute, context: any): any {\n    return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n  }\n\n  visitText(text: html.Text, context: any): any {\n    const isNotBlank = text.value.match(NO_WS_REGEXP);\n\n    if (isNotBlank) {\n      return new html.Text(\n          replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan, text.i18n);\n    }\n\n    return null;\n  }\n\n  visitComment(comment: html.Comment, context: any): any { return comment; }\n\n  visitExpansion(expansion: html.Expansion, context: any): any { return expansion; }\n\n  visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any { return expansionCase; }\n}\n\nexport function removeWhitespaces(htmlAstWithErrors: ParseTreeResult): ParseTreeResult {\n  return new ParseTreeResult(\n      html.visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes),\n      htmlAstWithErrors.errors);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParseError, ParseSourceSpan} from '../parse_util';\n\nimport * as html from './ast';\n\n// http://cldr.unicode.org/index/cldr-spec/plural-rules\nconst PLURAL_CASES: string[] = ['zero', 'one', 'two', 'few', 'many', 'other'];\n\n/**\n * Expands special forms into elements.\n *\n * For example,\n *\n * ```\n * { messages.length, plural,\n *   =0 {zero}\n *   =1 {one}\n *   other {more than one}\n * }\n * ```\n *\n * will be expanded into\n *\n * ```\n * <ng-container [ngPlural]=\"messages.length\">\n *   <ng-template ngPluralCase=\"=0\">zero</ng-template>\n *   <ng-template ngPluralCase=\"=1\">one</ng-template>\n *   <ng-template ngPluralCase=\"other\">more than one</ng-template>\n * </ng-container>\n * ```\n */\nexport function expandNodes(nodes: html.Node[]): ExpansionResult {\n  const expander = new _Expander();\n  return new ExpansionResult(html.visitAll(expander, nodes), expander.isExpanded, expander.errors);\n}\n\nexport class ExpansionResult {\n  constructor(public nodes: html.Node[], public expanded: boolean, public errors: ParseError[]) {}\n}\n\nexport class ExpansionError extends ParseError {\n  constructor(span: ParseSourceSpan, errorMsg: string) { super(span, errorMsg); }\n}\n\n/**\n * Expand expansion forms (plural, select) to directives\n *\n * @internal\n */\nclass _Expander implements html.Visitor {\n  isExpanded: boolean = false;\n  errors: ParseError[] = [];\n\n  visitElement(element: html.Element, context: any): any {\n    return new html.Element(\n        element.name, element.attrs, html.visitAll(this, element.children), element.sourceSpan,\n        element.startSourceSpan, element.endSourceSpan);\n  }\n\n  visitAttribute(attribute: html.Attribute, context: any): any { return attribute; }\n\n  visitText(text: html.Text, context: any): any { return text; }\n\n  visitComment(comment: html.Comment, context: any): any { return comment; }\n\n  visitExpansion(icu: html.Expansion, context: any): any {\n    this.isExpanded = true;\n    return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) :\n                                  _expandDefaultForm(icu, this.errors);\n  }\n\n  visitExpansionCase(icuCase: html.ExpansionCase, context: any): any {\n    throw new Error('Should not be reached');\n  }\n}\n\n// Plural forms are expanded to `NgPlural` and `NgPluralCase`s\nfunction _expandPluralForm(ast: html.Expansion, errors: ParseError[]): html.Element {\n  const children = ast.cases.map(c => {\n    if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\\d+$/)) {\n      errors.push(new ExpansionError(\n          c.valueSourceSpan,\n          `Plural cases should be \"=<number>\" or one of ${PLURAL_CASES.join(\", \")}`));\n    }\n\n    const expansionResult = expandNodes(c.expression);\n    errors.push(...expansionResult.errors);\n\n    return new html.Element(\n        `ng-template`, [new html.Attribute('ngPluralCase', `${c.value}`, c.valueSourceSpan)],\n        expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n  });\n  const switchAttr = new html.Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);\n  return new html.Element(\n      'ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n\n// ICU messages (excluding plural form) are expanded to `NgSwitch`  and `NgSwitchCase`s\nfunction _expandDefaultForm(ast: html.Expansion, errors: ParseError[]): html.Element {\n  const children = ast.cases.map(c => {\n    const expansionResult = expandNodes(c.expression);\n    errors.push(...expansionResult.errors);\n\n    if (c.value === 'other') {\n      // other is the default case when no values match\n      return new html.Element(\n          `ng-template`, [new html.Attribute('ngSwitchDefault', '', c.valueSourceSpan)],\n          expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n    }\n\n    return new html.Element(\n        `ng-template`, [new html.Attribute('ngSwitchCase', `${c.value}`, c.valueSourceSpan)],\n        expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n  });\n  const switchAttr = new html.Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);\n  return new html.Element(\n      'ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AstPath} from '../ast_path';\nimport {CompileDirectiveSummary, CompileProviderMetadata, CompileTokenMetadata} from '../compile_metadata';\nimport {SecurityContext} from '../core';\nimport {AST, BindingType, BoundElementProperty, ParsedEvent, ParsedEventType, ParsedVariable} from '../expression_parser/ast';\nimport {LifecycleHooks} from '../lifecycle_reflector';\nimport {ParseSourceSpan} from '../parse_util';\n\n\n\n/**\n * An Abstract Syntax Tree node representing part of a parsed Angular template.\n */\nexport interface TemplateAst {\n  /**\n   * The source span from which this node was parsed.\n   */\n  sourceSpan: ParseSourceSpan;\n\n  /**\n   * Visit this node and possibly transform it.\n   */\n  visit(visitor: TemplateAstVisitor, context: any): any;\n}\n\n/**\n * A segment of text within the template.\n */\nexport class TextAst implements TemplateAst {\n  constructor(\n      public value: string, public ngContentIndex: number, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any { return visitor.visitText(this, context); }\n}\n\n/**\n * A bound expression within the text of a template.\n */\nexport class BoundTextAst implements TemplateAst {\n  constructor(\n      public value: AST, public ngContentIndex: number, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitBoundText(this, context);\n  }\n}\n\n/**\n * A plain attribute on an element.\n */\nexport class AttrAst implements TemplateAst {\n  constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any { return visitor.visitAttr(this, context); }\n}\n\nexport const enum PropertyBindingType {\n  // A normal binding to a property (e.g. `[property]=\"expression\"`).\n  Property,\n  // A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n  Attribute,\n  // A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n  Class,\n  // A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n  Style,\n  // A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n  Animation,\n}\n\nconst BoundPropertyMapping = {\n  [BindingType.Animation]: PropertyBindingType.Animation,\n  [BindingType.Attribute]: PropertyBindingType.Attribute,\n  [BindingType.Class]: PropertyBindingType.Class,\n  [BindingType.Property]: PropertyBindingType.Property,\n  [BindingType.Style]: PropertyBindingType.Style,\n};\n\n/**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[@trigger]=\"stateExp\"`)\n */\nexport class BoundElementPropertyAst implements TemplateAst {\n  readonly isAnimation: boolean;\n\n  constructor(\n      public name: string, public type: PropertyBindingType,\n      public securityContext: SecurityContext, public value: AST, public unit: string|null,\n      public sourceSpan: ParseSourceSpan) {\n    this.isAnimation = this.type === PropertyBindingType.Animation;\n  }\n\n  static fromBoundProperty(prop: BoundElementProperty) {\n    const type = BoundPropertyMapping[prop.type];\n    return new BoundElementPropertyAst(\n        prop.name, type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);\n  }\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitElementProperty(this, context);\n  }\n}\n\n/**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(@trigger.phase)=\"callback($event)\"`).\n */\nexport class BoundEventAst implements TemplateAst {\n  readonly fullName: string;\n  readonly isAnimation: boolean;\n\n  constructor(\n      public name: string, public target: string|null, public phase: string|null,\n      public handler: AST, public sourceSpan: ParseSourceSpan,\n      public handlerSpan: ParseSourceSpan) {\n    this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);\n    this.isAnimation = !!this.phase;\n  }\n\n  static calcFullName(name: string, target: string|null, phase: string|null): string {\n    if (target) {\n      return `${target}:${name}`;\n    }\n    if (phase) {\n      return `@${name}.${phase}`;\n    }\n\n    return name;\n  }\n\n  static fromParsedEvent(event: ParsedEvent) {\n    const target: string|null = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;\n    const phase: string|null =\n        event.type === ParsedEventType.Animation ? event.targetOrPhase : null;\n    return new BoundEventAst(\n        event.name, target, phase, event.handler, event.sourceSpan, event.handlerSpan);\n  }\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitEvent(this, context);\n  }\n}\n\n/**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\nexport class ReferenceAst implements TemplateAst {\n  constructor(\n      public name: string, public value: CompileTokenMetadata, public originalValue: string,\n      public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitReference(this, context);\n  }\n}\n\n/**\n * A variable declaration on a <ng-template> (e.g. `var-someName=\"someLocalName\"`).\n */\nexport class VariableAst implements TemplateAst {\n  constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {}\n\n  static fromParsedVariable(v: ParsedVariable) {\n    return new VariableAst(v.name, v.value, v.sourceSpan);\n  }\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitVariable(this, context);\n  }\n}\n\n/**\n * An element declaration in a template.\n */\nexport class ElementAst implements TemplateAst {\n  constructor(\n      public name: string, public attrs: AttrAst[], public inputs: BoundElementPropertyAst[],\n      public outputs: BoundEventAst[], public references: ReferenceAst[],\n      public directives: DirectiveAst[], public providers: ProviderAst[],\n      public hasViewContainer: boolean, public queryMatches: QueryMatch[],\n      public children: TemplateAst[], public ngContentIndex: number|null,\n      public sourceSpan: ParseSourceSpan, public endSourceSpan: ParseSourceSpan|null) {}\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitElement(this, context);\n  }\n}\n\n/**\n * A `<ng-template>` element included in an Angular template.\n */\nexport class EmbeddedTemplateAst implements TemplateAst {\n  constructor(\n      public attrs: AttrAst[], public outputs: BoundEventAst[], public references: ReferenceAst[],\n      public variables: VariableAst[], public directives: DirectiveAst[],\n      public providers: ProviderAst[], public hasViewContainer: boolean,\n      public queryMatches: QueryMatch[], public children: TemplateAst[],\n      public ngContentIndex: number, public sourceSpan: ParseSourceSpan) {}\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitEmbeddedTemplate(this, context);\n  }\n}\n\n/**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\nexport class BoundDirectivePropertyAst implements TemplateAst {\n  constructor(\n      public directiveName: string, public templateName: string, public value: AST,\n      public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitDirectiveProperty(this, context);\n  }\n}\n\n/**\n * A directive declared on an element.\n */\nexport class DirectiveAst implements TemplateAst {\n  constructor(\n      public directive: CompileDirectiveSummary, public inputs: BoundDirectivePropertyAst[],\n      public hostProperties: BoundElementPropertyAst[], public hostEvents: BoundEventAst[],\n      public contentQueryStartId: number, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitDirective(this, context);\n  }\n}\n\n/**\n * A provider declared on an element\n */\nexport class ProviderAst implements TemplateAst {\n  constructor(\n      public token: CompileTokenMetadata, public multiProvider: boolean, public eager: boolean,\n      public providers: CompileProviderMetadata[], public providerType: ProviderAstType,\n      public lifecycleHooks: LifecycleHooks[], public sourceSpan: ParseSourceSpan,\n      readonly isModule: boolean) {}\n\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    // No visit method in the visitor for now...\n    return null;\n  }\n}\n\nexport enum ProviderAstType {\n  PublicService,\n  PrivateService,\n  Component,\n  Directive,\n  Builtin\n}\n\n/**\n * Position where content is to be projected (instance of `<ng-content>` in a template).\n */\nexport class NgContentAst implements TemplateAst {\n  constructor(\n      public index: number, public ngContentIndex: number, public sourceSpan: ParseSourceSpan) {}\n  visit(visitor: TemplateAstVisitor, context: any): any {\n    return visitor.visitNgContent(this, context);\n  }\n}\n\nexport interface QueryMatch {\n  queryId: number;\n  value: CompileTokenMetadata;\n}\n\n/**\n * A visitor for {@link TemplateAst} trees that will process each node.\n */\nexport interface TemplateAstVisitor {\n  // Returning a truthy value from `visit()` will prevent `templateVisitAll()` from the call to\n  // the typed method and result returned will become the result included in `visitAll()`s\n  // result array.\n  visit?(ast: TemplateAst, context: any): any;\n\n  visitNgContent(ast: NgContentAst, context: any): any;\n  visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any;\n  visitElement(ast: ElementAst, context: any): any;\n  visitReference(ast: ReferenceAst, context: any): any;\n  visitVariable(ast: VariableAst, context: any): any;\n  visitEvent(ast: BoundEventAst, context: any): any;\n  visitElementProperty(ast: BoundElementPropertyAst, context: any): any;\n  visitAttr(ast: AttrAst, context: any): any;\n  visitBoundText(ast: BoundTextAst, context: any): any;\n  visitText(ast: TextAst, context: any): any;\n  visitDirective(ast: DirectiveAst, context: any): any;\n  visitDirectiveProperty(ast: BoundDirectivePropertyAst, context: any): any;\n}\n\n/**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\nexport class NullTemplateVisitor implements TemplateAstVisitor {\n  visitNgContent(ast: NgContentAst, context: any): void {}\n  visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): void {}\n  visitElement(ast: ElementAst, context: any): void {}\n  visitReference(ast: ReferenceAst, context: any): void {}\n  visitVariable(ast: VariableAst, context: any): void {}\n  visitEvent(ast: BoundEventAst, context: any): void {}\n  visitElementProperty(ast: BoundElementPropertyAst, context: any): void {}\n  visitAttr(ast: AttrAst, context: any): void {}\n  visitBoundText(ast: BoundTextAst, context: any): void {}\n  visitText(ast: TextAst, context: any): void {}\n  visitDirective(ast: DirectiveAst, context: any): void {}\n  visitDirectiveProperty(ast: BoundDirectivePropertyAst, context: any): void {}\n}\n\n/**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\nexport class RecursiveTemplateAstVisitor extends NullTemplateVisitor implements TemplateAstVisitor {\n  constructor() { super(); }\n\n  // Nodes with children\n  visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any {\n    return this.visitChildren(context, visit => {\n      visit(ast.attrs);\n      visit(ast.references);\n      visit(ast.variables);\n      visit(ast.directives);\n      visit(ast.providers);\n      visit(ast.children);\n    });\n  }\n\n  visitElement(ast: ElementAst, context: any): any {\n    return this.visitChildren(context, visit => {\n      visit(ast.attrs);\n      visit(ast.inputs);\n      visit(ast.outputs);\n      visit(ast.references);\n      visit(ast.directives);\n      visit(ast.providers);\n      visit(ast.children);\n    });\n  }\n\n  visitDirective(ast: DirectiveAst, context: any): any {\n    return this.visitChildren(context, visit => {\n      visit(ast.inputs);\n      visit(ast.hostProperties);\n      visit(ast.hostEvents);\n    });\n  }\n\n  protected visitChildren<T extends TemplateAst>(\n      context: any,\n      cb: (visit: (<V extends TemplateAst>(children: V[]|undefined) => void)) => void) {\n    let results: any[][] = [];\n    let t = this;\n    function visit<T extends TemplateAst>(children: T[] | undefined) {\n      if (children && children.length) results.push(templateVisitAll(t, children, context));\n    }\n    cb(visit);\n    return Array.prototype.concat.apply([], results);\n  }\n}\n\n/**\n * Visit every node in a list of {@link TemplateAst}s with the given {@link TemplateAstVisitor}.\n */\nexport function templateVisitAll(\n    visitor: TemplateAstVisitor, asts: TemplateAst[], context: any = null): any[] {\n  const result: any[] = [];\n  const visit = visitor.visit ?\n      (ast: TemplateAst) => visitor.visit !(ast, context) || ast.visit(visitor, context) :\n      (ast: TemplateAst) => ast.visit(visitor, context);\n  asts.forEach(ast => {\n    const astResult = visit(ast);\n    if (astResult) {\n      result.push(astResult);\n    }\n  });\n  return result;\n}\n\nexport type TemplateAstPath = AstPath<TemplateAst>;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileDirectiveSummary, CompileNgModuleMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTokenMetadata, CompileTypeMetadata, tokenName, tokenReference} from './compile_metadata';\nimport {CompileReflector} from './compile_reflector';\nimport {Identifiers, createTokenForExternalReference} from './identifiers';\nimport {ParseError, ParseSourceSpan} from './parse_util';\nimport {AttrAst, DirectiveAst, ProviderAst, ProviderAstType, QueryMatch, ReferenceAst} from './template_parser/template_ast';\n\nexport class ProviderError extends ParseError {\n  constructor(message: string, span: ParseSourceSpan) { super(span, message); }\n}\n\nexport interface QueryWithId {\n  meta: CompileQueryMetadata;\n  queryId: number;\n}\n\nexport class ProviderViewContext {\n  /**\n   * @internal\n   */\n  viewQueries: Map<any, QueryWithId[]>;\n  /**\n   * @internal\n   */\n  viewProviders: Map<any, boolean>;\n  errors: ProviderError[] = [];\n\n  constructor(public reflector: CompileReflector, public component: CompileDirectiveMetadata) {\n    this.viewQueries = _getViewQueries(component);\n    this.viewProviders = new Map<any, boolean>();\n    component.viewProviders.forEach((provider) => {\n      if (this.viewProviders.get(tokenReference(provider.token)) == null) {\n        this.viewProviders.set(tokenReference(provider.token), true);\n      }\n    });\n  }\n}\n\nexport class ProviderElementContext {\n  private _contentQueries: Map<any, QueryWithId[]>;\n\n  private _transformedProviders = new Map<any, ProviderAst>();\n  private _seenProviders = new Map<any, boolean>();\n  private _allProviders: Map<any, ProviderAst>;\n  private _attrs: {[key: string]: string};\n  private _queriedTokens = new Map<any, QueryMatch[]>();\n\n  public readonly transformedHasViewContainer: boolean = false;\n\n  constructor(\n      public viewContext: ProviderViewContext, private _parent: ProviderElementContext,\n      private _isViewRoot: boolean, private _directiveAsts: DirectiveAst[], attrs: AttrAst[],\n      refs: ReferenceAst[], isTemplate: boolean, contentQueryStartId: number,\n      private _sourceSpan: ParseSourceSpan) {\n    this._attrs = {};\n    attrs.forEach((attrAst) => this._attrs[attrAst.name] = attrAst.value);\n    const directivesMeta = _directiveAsts.map(directiveAst => directiveAst.directive);\n    this._allProviders =\n        _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);\n    this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);\n    Array.from(this._allProviders.values()).forEach((provider) => {\n      this._addQueryReadsTo(provider.token, provider.token, this._queriedTokens);\n    });\n    if (isTemplate) {\n      const templateRefId =\n          createTokenForExternalReference(this.viewContext.reflector, Identifiers.TemplateRef);\n      this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);\n    }\n    refs.forEach((refAst) => {\n      let defaultQueryValue = refAst.value ||\n          createTokenForExternalReference(this.viewContext.reflector, Identifiers.ElementRef);\n      this._addQueryReadsTo({value: refAst.name}, defaultQueryValue, this._queriedTokens);\n    });\n    if (this._queriedTokens.get(\n            this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {\n      this.transformedHasViewContainer = true;\n    }\n\n    // create the providers that we know are eager first\n    Array.from(this._allProviders.values()).forEach((provider) => {\n      const eager = provider.eager || this._queriedTokens.get(tokenReference(provider.token));\n      if (eager) {\n        this._getOrCreateLocalProvider(provider.providerType, provider.token, true);\n      }\n    });\n  }\n\n  afterElement() {\n    // collect lazy providers\n    Array.from(this._allProviders.values()).forEach((provider) => {\n      this._getOrCreateLocalProvider(provider.providerType, provider.token, false);\n    });\n  }\n\n  get transformProviders(): ProviderAst[] {\n    // Note: Maps keep their insertion order.\n    const lazyProviders: ProviderAst[] = [];\n    const eagerProviders: ProviderAst[] = [];\n    this._transformedProviders.forEach(provider => {\n      if (provider.eager) {\n        eagerProviders.push(provider);\n      } else {\n        lazyProviders.push(provider);\n      }\n    });\n    return lazyProviders.concat(eagerProviders);\n  }\n\n  get transformedDirectiveAsts(): DirectiveAst[] {\n    const sortedProviderTypes = this.transformProviders.map(provider => provider.token.identifier);\n    const sortedDirectives = this._directiveAsts.slice();\n    sortedDirectives.sort(\n        (dir1, dir2) => sortedProviderTypes.indexOf(dir1.directive.type) -\n            sortedProviderTypes.indexOf(dir2.directive.type));\n    return sortedDirectives;\n  }\n\n  get queryMatches(): QueryMatch[] {\n    const allMatches: QueryMatch[] = [];\n    this._queriedTokens.forEach((matches: QueryMatch[]) => { allMatches.push(...matches); });\n    return allMatches;\n  }\n\n  private _addQueryReadsTo(\n      token: CompileTokenMetadata, defaultValue: CompileTokenMetadata,\n      queryReadTokens: Map<any, QueryMatch[]>) {\n    this._getQueriesFor(token).forEach((query) => {\n      const queryValue = query.meta.read || defaultValue;\n      const tokenRef = tokenReference(queryValue);\n      let queryMatches = queryReadTokens.get(tokenRef);\n      if (!queryMatches) {\n        queryMatches = [];\n        queryReadTokens.set(tokenRef, queryMatches);\n      }\n      queryMatches.push({queryId: query.queryId, value: queryValue});\n    });\n  }\n\n  private _getQueriesFor(token: CompileTokenMetadata): QueryWithId[] {\n    const result: QueryWithId[] = [];\n    let currentEl: ProviderElementContext = this;\n    let distance = 0;\n    let queries: QueryWithId[]|undefined;\n    while (currentEl !== null) {\n      queries = currentEl._contentQueries.get(tokenReference(token));\n      if (queries) {\n        result.push(...queries.filter((query) => query.meta.descendants || distance <= 1));\n      }\n      if (currentEl._directiveAsts.length > 0) {\n        distance++;\n      }\n      currentEl = currentEl._parent;\n    }\n    queries = this.viewContext.viewQueries.get(tokenReference(token));\n    if (queries) {\n      result.push(...queries);\n    }\n    return result;\n  }\n\n\n  private _getOrCreateLocalProvider(\n      requestingProviderType: ProviderAstType, token: CompileTokenMetadata,\n      eager: boolean): ProviderAst|null {\n    const resolvedProvider = this._allProviders.get(tokenReference(token));\n    if (!resolvedProvider || ((requestingProviderType === ProviderAstType.Directive ||\n                               requestingProviderType === ProviderAstType.PublicService) &&\n                              resolvedProvider.providerType === ProviderAstType.PrivateService) ||\n        ((requestingProviderType === ProviderAstType.PrivateService ||\n          requestingProviderType === ProviderAstType.PublicService) &&\n         resolvedProvider.providerType === ProviderAstType.Builtin)) {\n      return null;\n    }\n    let transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n    if (transformedProviderAst) {\n      return transformedProviderAst;\n    }\n    if (this._seenProviders.get(tokenReference(token)) != null) {\n      this.viewContext.errors.push(new ProviderError(\n          `Cannot instantiate cyclic dependency! ${tokenName(token)}`, this._sourceSpan));\n      return null;\n    }\n    this._seenProviders.set(tokenReference(token), true);\n    const transformedProviders = resolvedProvider.providers.map((provider) => {\n      let transformedUseValue = provider.useValue;\n      let transformedUseExisting = provider.useExisting !;\n      let transformedDeps: CompileDiDependencyMetadata[] = undefined !;\n      if (provider.useExisting != null) {\n        const existingDiDep = this._getDependency(\n            resolvedProvider.providerType, {token: provider.useExisting}, eager) !;\n        if (existingDiDep.token != null) {\n          transformedUseExisting = existingDiDep.token;\n        } else {\n          transformedUseExisting = null !;\n          transformedUseValue = existingDiDep.value;\n        }\n      } else if (provider.useFactory) {\n        const deps = provider.deps || provider.useFactory.diDeps;\n        transformedDeps =\n            deps.map((dep) => this._getDependency(resolvedProvider.providerType, dep, eager) !);\n      } else if (provider.useClass) {\n        const deps = provider.deps || provider.useClass.diDeps;\n        transformedDeps =\n            deps.map((dep) => this._getDependency(resolvedProvider.providerType, dep, eager) !);\n      }\n      return _transformProvider(provider, {\n        useExisting: transformedUseExisting,\n        useValue: transformedUseValue,\n        deps: transformedDeps\n      });\n    });\n    transformedProviderAst =\n        _transformProviderAst(resolvedProvider, {eager: eager, providers: transformedProviders});\n    this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n    return transformedProviderAst;\n  }\n\n  private _getLocalDependency(\n      requestingProviderType: ProviderAstType, dep: CompileDiDependencyMetadata,\n      eager: boolean = false): CompileDiDependencyMetadata|null {\n    if (dep.isAttribute) {\n      const attrValue = this._attrs[dep.token !.value];\n      return {isValue: true, value: attrValue == null ? null : attrValue};\n    }\n\n    if (dep.token != null) {\n      // access builtints\n      if ((requestingProviderType === ProviderAstType.Directive ||\n           requestingProviderType === ProviderAstType.Component)) {\n        if (tokenReference(dep.token) ===\n                this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer) ||\n            tokenReference(dep.token) ===\n                this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef) ||\n            tokenReference(dep.token) ===\n                this.viewContext.reflector.resolveExternalReference(\n                    Identifiers.ChangeDetectorRef) ||\n            tokenReference(dep.token) ===\n                this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n          return dep;\n        }\n        if (tokenReference(dep.token) ===\n            this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {\n          (this as{transformedHasViewContainer: boolean}).transformedHasViewContainer = true;\n        }\n      }\n      // access the injector\n      if (tokenReference(dep.token) ===\n          this.viewContext.reflector.resolveExternalReference(Identifiers.Injector)) {\n        return dep;\n      }\n      // access providers\n      if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {\n        return dep;\n      }\n    }\n    return null;\n  }\n\n  private _getDependency(\n      requestingProviderType: ProviderAstType, dep: CompileDiDependencyMetadata,\n      eager: boolean = false): CompileDiDependencyMetadata|null {\n    let currElement: ProviderElementContext = this;\n    let currEager: boolean = eager;\n    let result: CompileDiDependencyMetadata|null = null;\n    if (!dep.isSkipSelf) {\n      result = this._getLocalDependency(requestingProviderType, dep, eager);\n    }\n    if (dep.isSelf) {\n      if (!result && dep.isOptional) {\n        result = {isValue: true, value: null};\n      }\n    } else {\n      // check parent elements\n      while (!result && currElement._parent) {\n        const prevElement = currElement;\n        currElement = currElement._parent;\n        if (prevElement._isViewRoot) {\n          currEager = false;\n        }\n        result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);\n      }\n      // check @Host restriction\n      if (!result) {\n        if (!dep.isHost || this.viewContext.component.isHost ||\n            this.viewContext.component.type.reference === tokenReference(dep.token !) ||\n            this.viewContext.viewProviders.get(tokenReference(dep.token !)) != null) {\n          result = dep;\n        } else {\n          result = dep.isOptional ? {isValue: true, value: null} : null;\n        }\n      }\n    }\n    if (!result) {\n      this.viewContext.errors.push(\n          new ProviderError(`No provider for ${tokenName(dep.token!)}`, this._sourceSpan));\n    }\n    return result;\n  }\n}\n\n\nexport class NgModuleProviderAnalyzer {\n  private _transformedProviders = new Map<any, ProviderAst>();\n  private _seenProviders = new Map<any, boolean>();\n  private _allProviders: Map<any, ProviderAst>;\n  private _errors: ProviderError[] = [];\n\n  constructor(\n      private reflector: CompileReflector, ngModule: CompileNgModuleMetadata,\n      extraProviders: CompileProviderMetadata[], sourceSpan: ParseSourceSpan) {\n    this._allProviders = new Map<any, ProviderAst>();\n    ngModule.transitiveModule.modules.forEach((ngModuleType: CompileTypeMetadata) => {\n      const ngModuleProvider = {token: {identifier: ngModuleType}, useClass: ngModuleType};\n      _resolveProviders(\n          [ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, this._errors,\n          this._allProviders, /* isModule */ true);\n    });\n    _resolveProviders(\n        ngModule.transitiveModule.providers.map(entry => entry.provider).concat(extraProviders),\n        ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders,\n        /* isModule */ false);\n  }\n\n  parse(): ProviderAst[] {\n    Array.from(this._allProviders.values()).forEach((provider) => {\n      this._getOrCreateLocalProvider(provider.token, provider.eager);\n    });\n    if (this._errors.length > 0) {\n      const errorString = this._errors.join('\\n');\n      throw new Error(`Provider parse errors:\\n${errorString}`);\n    }\n    // Note: Maps keep their insertion order.\n    const lazyProviders: ProviderAst[] = [];\n    const eagerProviders: ProviderAst[] = [];\n    this._transformedProviders.forEach(provider => {\n      if (provider.eager) {\n        eagerProviders.push(provider);\n      } else {\n        lazyProviders.push(provider);\n      }\n    });\n    return lazyProviders.concat(eagerProviders);\n  }\n\n  private _getOrCreateLocalProvider(token: CompileTokenMetadata, eager: boolean): ProviderAst|null {\n    const resolvedProvider = this._allProviders.get(tokenReference(token));\n    if (!resolvedProvider) {\n      return null;\n    }\n    let transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n    if (transformedProviderAst) {\n      return transformedProviderAst;\n    }\n    if (this._seenProviders.get(tokenReference(token)) != null) {\n      this._errors.push(new ProviderError(\n          `Cannot instantiate cyclic dependency! ${tokenName(token)}`,\n          resolvedProvider.sourceSpan));\n      return null;\n    }\n    this._seenProviders.set(tokenReference(token), true);\n    const transformedProviders = resolvedProvider.providers.map((provider) => {\n      let transformedUseValue = provider.useValue;\n      let transformedUseExisting = provider.useExisting !;\n      let transformedDeps: CompileDiDependencyMetadata[] = undefined !;\n      if (provider.useExisting != null) {\n        const existingDiDep =\n            this._getDependency({token: provider.useExisting}, eager, resolvedProvider.sourceSpan);\n        if (existingDiDep.token != null) {\n          transformedUseExisting = existingDiDep.token;\n        } else {\n          transformedUseExisting = null !;\n          transformedUseValue = existingDiDep.value;\n        }\n      } else if (provider.useFactory) {\n        const deps = provider.deps || provider.useFactory.diDeps;\n        transformedDeps =\n            deps.map((dep) => this._getDependency(dep, eager, resolvedProvider.sourceSpan));\n      } else if (provider.useClass) {\n        const deps = provider.deps || provider.useClass.diDeps;\n        transformedDeps =\n            deps.map((dep) => this._getDependency(dep, eager, resolvedProvider.sourceSpan));\n      }\n      return _transformProvider(provider, {\n        useExisting: transformedUseExisting,\n        useValue: transformedUseValue,\n        deps: transformedDeps\n      });\n    });\n    transformedProviderAst =\n        _transformProviderAst(resolvedProvider, {eager: eager, providers: transformedProviders});\n    this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n    return transformedProviderAst;\n  }\n\n  private _getDependency(\n      dep: CompileDiDependencyMetadata, eager: boolean = false,\n      requestorSourceSpan: ParseSourceSpan): CompileDiDependencyMetadata {\n    let foundLocal = false;\n    if (!dep.isSkipSelf && dep.token != null) {\n      // access the injector\n      if (tokenReference(dep.token) ===\n              this.reflector.resolveExternalReference(Identifiers.Injector) ||\n          tokenReference(dep.token) ===\n              this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)) {\n        foundLocal = true;\n        // access providers\n      } else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {\n        foundLocal = true;\n      }\n    }\n    return dep;\n  }\n}\n\nfunction _transformProvider(\n    provider: CompileProviderMetadata,\n    {useExisting, useValue, deps}:\n        {useExisting: CompileTokenMetadata, useValue: any, deps: CompileDiDependencyMetadata[]}) {\n  return {\n    token: provider.token,\n    useClass: provider.useClass,\n    useExisting: useExisting,\n    useFactory: provider.useFactory,\n    useValue: useValue,\n    deps: deps,\n    multi: provider.multi\n  };\n}\n\nfunction _transformProviderAst(\n    provider: ProviderAst,\n    {eager, providers}: {eager: boolean, providers: CompileProviderMetadata[]}): ProviderAst {\n  return new ProviderAst(\n      provider.token, provider.multiProvider, provider.eager || eager, providers,\n      provider.providerType, provider.lifecycleHooks, provider.sourceSpan, provider.isModule);\n}\n\nfunction _resolveProvidersFromDirectives(\n    directives: CompileDirectiveSummary[], sourceSpan: ParseSourceSpan,\n    targetErrors: ParseError[]): Map<any, ProviderAst> {\n  const providersByToken = new Map<any, ProviderAst>();\n  directives.forEach((directive) => {\n    const dirProvider:\n        CompileProviderMetadata = {token: {identifier: directive.type}, useClass: directive.type};\n    _resolveProviders(\n        [dirProvider],\n        directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true,\n        sourceSpan, targetErrors, providersByToken, /* isModule */ false);\n  });\n\n  // Note: directives need to be able to overwrite providers of a component!\n  const directivesWithComponentFirst =\n      directives.filter(dir => dir.isComponent).concat(directives.filter(dir => !dir.isComponent));\n  directivesWithComponentFirst.forEach((directive) => {\n    _resolveProviders(\n        directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors,\n        providersByToken, /* isModule */ false);\n    _resolveProviders(\n        directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors,\n        providersByToken, /* isModule */ false);\n  });\n  return providersByToken;\n}\n\nfunction _resolveProviders(\n    providers: CompileProviderMetadata[], providerType: ProviderAstType, eager: boolean,\n    sourceSpan: ParseSourceSpan, targetErrors: ParseError[],\n    targetProvidersByToken: Map<any, ProviderAst>, isModule: boolean) {\n  providers.forEach((provider) => {\n    let resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));\n    if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {\n      targetErrors.push(new ProviderError(\n          `Mixing multi and non multi provider is not possible for token ${tokenName(resolvedProvider.token)}`,\n          sourceSpan));\n    }\n    if (!resolvedProvider) {\n      const lifecycleHooks = provider.token.identifier &&\n              (<CompileTypeMetadata>provider.token.identifier).lifecycleHooks ?\n          (<CompileTypeMetadata>provider.token.identifier).lifecycleHooks :\n          [];\n      const isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);\n      resolvedProvider = new ProviderAst(\n          provider.token, !!provider.multi, eager || isUseValue, [provider], providerType,\n          lifecycleHooks, sourceSpan, isModule);\n      targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);\n    } else {\n      if (!provider.multi) {\n        resolvedProvider.providers.length = 0;\n      }\n      resolvedProvider.providers.push(provider);\n    }\n  });\n}\n\n\nfunction _getViewQueries(component: CompileDirectiveMetadata): Map<any, QueryWithId[]> {\n  // Note: queries start with id 1 so we can use the number in a Bloom filter!\n  let viewQueryId = 1;\n  const viewQueries = new Map<any, QueryWithId[]>();\n  if (component.viewQueries) {\n    component.viewQueries.forEach(\n        (query) => _addQueryToTokenMap(viewQueries, {meta: query, queryId: viewQueryId++}));\n  }\n  return viewQueries;\n}\n\nfunction _getContentQueries(\n    contentQueryStartId: number, directives: CompileDirectiveSummary[]): Map<any, QueryWithId[]> {\n  let contentQueryId = contentQueryStartId;\n  const contentQueries = new Map<any, QueryWithId[]>();\n  directives.forEach((directive, directiveIndex) => {\n    if (directive.queries) {\n      directive.queries.forEach(\n          (query) => _addQueryToTokenMap(contentQueries, {meta: query, queryId: contentQueryId++}));\n    }\n  });\n  return contentQueries;\n}\n\nfunction _addQueryToTokenMap(map: Map<any, QueryWithId[]>, query: QueryWithId) {\n  query.meta.selectors.forEach((token: CompileTokenMetadata) => {\n    let entry = map.get(tokenReference(token));\n    if (!entry) {\n      entry = [];\n      map.set(tokenReference(token), entry);\n    }\n    entry.push(query);\n  });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Some of the code comes from WebComponents.JS\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/HTMLImports/path.js\n\nimport {UrlResolver} from './url_resolver';\n\nexport class StyleWithImports {\n  constructor(public style: string, public styleUrls: string[]) {}\n}\n\nexport function isStyleUrlResolvable(url: string): boolean {\n  if (url == null || url.length === 0 || url[0] == '/') return false;\n  const schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n  return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\n\n/**\n * Rewrites stylesheets by resolving and removing the @import urls that\n * are either relative or don't have a `package:` scheme\n */\nexport function extractStyleUrls(\n    resolver: UrlResolver, baseUrl: string, cssText: string): StyleWithImports {\n  const foundUrls: string[] = [];\n\n  const modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '')\n                              .replace(CSS_IMPORT_REGEXP, (...m: string[]) => {\n                                const url = m[1] || m[2];\n                                if (!isStyleUrlResolvable(url)) {\n                                  // Do not attempt to resolve non-package absolute URLs with URI\n                                  // scheme\n                                  return m[0];\n                                }\n                                foundUrls.push(resolver.resolve(baseUrl, url));\n                                return '';\n                              });\n  return new StyleWithImports(modifiedCssText, foundUrls);\n}\n\nconst CSS_IMPORT_REGEXP = /@import\\s+(?:url\\()?\\s*(?:(?:['\"]([^'\"]*))|([^;\\)\\s]*))[^;]*;?/g;\nconst CSS_STRIPPABLE_COMMENT_REGEXP = /\\/\\*(?!#\\s*(?:sourceURL|sourceMappingURL)=)[\\s\\S]+?\\*\\//g;\nconst URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveSummary, CompilePipeSummary} from '../compile_metadata';\nimport {SecurityContext} from '../core';\nimport {ASTWithSource, BindingPipe, BindingType, BoundElementProperty, EmptyExpr, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, ParserError, RecursiveAstVisitor, TemplateBinding} from '../expression_parser/ast';\nimport {Parser} from '../expression_parser/parser';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {mergeNsAndName} from '../ml_parser/tags';\nimport {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util';\nimport {ElementSchemaRegistry} from '../schema/element_schema_registry';\nimport {CssSelector} from '../selector';\nimport {splitAtColon, splitAtPeriod} from '../util';\n\nconst PROPERTY_PARTS_SEPARATOR = '.';\nconst ATTRIBUTE_PREFIX = 'attr';\nconst CLASS_PREFIX = 'class';\nconst STYLE_PREFIX = 'style';\n\nconst ANIMATE_PROP_PREFIX = 'animate-';\n\n/**\n * Parses bindings in templates and in the directive host area.\n */\nexport class BindingParser {\n  pipesByName: Map<string, CompilePipeSummary>|null = null;\n\n  private _usedPipes: Map<string, CompilePipeSummary> = new Map();\n\n  constructor(\n      private _exprParser: Parser, private _interpolationConfig: InterpolationConfig,\n      private _schemaRegistry: ElementSchemaRegistry, pipes: CompilePipeSummary[]|null,\n      public errors: ParseError[]) {\n    // When the `pipes` parameter is `null`, do not check for used pipes\n    // This is used in IVY when we might not know the available pipes at compile time\n    if (pipes) {\n      const pipesByName: Map<string, CompilePipeSummary> = new Map();\n      pipes.forEach(pipe => pipesByName.set(pipe.name, pipe));\n      this.pipesByName = pipesByName;\n    }\n  }\n\n  get interpolationConfig(): InterpolationConfig { return this._interpolationConfig; }\n\n  getUsedPipes(): CompilePipeSummary[] { return Array.from(this._usedPipes.values()); }\n\n  createBoundHostProperties(dirMeta: CompileDirectiveSummary, sourceSpan: ParseSourceSpan):\n      ParsedProperty[]|null {\n    if (dirMeta.hostProperties) {\n      const boundProps: ParsedProperty[] = [];\n      Object.keys(dirMeta.hostProperties).forEach(propName => {\n        const expression = dirMeta.hostProperties[propName];\n        if (typeof expression === 'string') {\n          this.parsePropertyBinding(\n              propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [],\n              boundProps);\n        } else {\n          this._reportError(\n              `Value of the host property binding \"${propName}\" needs to be a string representing an expression but got \"${expression}\" (${typeof expression})`,\n              sourceSpan);\n        }\n      });\n      return boundProps;\n    }\n    return null;\n  }\n\n  createDirectiveHostPropertyAsts(\n      dirMeta: CompileDirectiveSummary, elementSelector: string,\n      sourceSpan: ParseSourceSpan): BoundElementProperty[]|null {\n    const boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);\n    return boundProps &&\n        boundProps.map((prop) => this.createBoundElementProperty(elementSelector, prop));\n  }\n\n  createDirectiveHostEventAsts(dirMeta: CompileDirectiveSummary, sourceSpan: ParseSourceSpan):\n      ParsedEvent[]|null {\n    if (dirMeta.hostListeners) {\n      const targetEvents: ParsedEvent[] = [];\n      Object.keys(dirMeta.hostListeners).forEach(propName => {\n        const expression = dirMeta.hostListeners[propName];\n        if (typeof expression === 'string') {\n          // TODO: pass a more accurate handlerSpan for this event.\n          this.parseEvent(propName, expression, sourceSpan, sourceSpan, [], targetEvents);\n        } else {\n          this._reportError(\n              `Value of the host listener \"${propName}\" needs to be a string representing an expression but got \"${expression}\" (${typeof expression})`,\n              sourceSpan);\n        }\n      });\n      return targetEvents;\n    }\n    return null;\n  }\n\n  parseInterpolation(value: string, sourceSpan: ParseSourceSpan): ASTWithSource {\n    const sourceInfo = sourceSpan.start.toString();\n\n    try {\n      const ast = this._exprParser.parseInterpolation(\n          value, sourceInfo, sourceSpan.start.offset, this._interpolationConfig) !;\n      if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n      this._checkPipes(ast, sourceSpan);\n      return ast;\n    } catch (e) {\n      this._reportError(`${e}`, sourceSpan);\n      return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, sourceSpan.start.offset);\n    }\n  }\n\n  // Parse an inline template binding. ie `<tag *tplKey=\"<tplValue>\">`\n  parseInlineTemplateBinding(\n      tplKey: string, tplValue: string, sourceSpan: ParseSourceSpan, absoluteOffset: number,\n      targetMatchableAttrs: string[][], targetProps: ParsedProperty[],\n      targetVars: ParsedVariable[]) {\n    const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n\n    for (let i = 0; i < bindings.length; i++) {\n      const binding = bindings[i];\n      if (binding.keyIsVar) {\n        targetVars.push(new ParsedVariable(binding.key, binding.name, sourceSpan));\n      } else if (binding.expression) {\n        this._parsePropertyAst(\n            binding.key, binding.expression, sourceSpan, undefined, targetMatchableAttrs,\n            targetProps);\n      } else {\n        targetMatchableAttrs.push([binding.key, '']);\n        this.parseLiteralAttr(\n            binding.key, null, sourceSpan, absoluteOffset, undefined, targetMatchableAttrs,\n            targetProps);\n      }\n    }\n  }\n\n  private _parseTemplateBindings(tplKey: string, tplValue: string, sourceSpan: ParseSourceSpan):\n      TemplateBinding[] {\n    const sourceInfo = sourceSpan.start.toString();\n\n    try {\n      const bindingsResult = this._exprParser.parseTemplateBindings(\n          tplKey, tplValue, sourceInfo, sourceSpan.start.offset);\n      this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n      bindingsResult.templateBindings.forEach((binding) => {\n        if (binding.expression) {\n          this._checkPipes(binding.expression, sourceSpan);\n        }\n      });\n      bindingsResult.warnings.forEach(\n          (warning) => { this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });\n      return bindingsResult.templateBindings;\n    } catch (e) {\n      this._reportError(`${e}`, sourceSpan);\n      return [];\n    }\n  }\n\n  parseLiteralAttr(\n      name: string, value: string|null, sourceSpan: ParseSourceSpan, absoluteOffset: number,\n      valueSpan: ParseSourceSpan|undefined, targetMatchableAttrs: string[][],\n      targetProps: ParsedProperty[]) {\n    if (isAnimationLabel(name)) {\n      name = name.substring(1);\n      if (value) {\n        this._reportError(\n            `Assigning animation triggers via @prop=\"exp\" attributes with an expression is invalid.` +\n                ` Use property bindings (e.g. [@prop]=\"exp\") or use an attribute without a value (e.g. @prop) instead.`,\n            sourceSpan, ParseErrorLevel.ERROR);\n      }\n      this._parseAnimation(\n          name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps);\n    } else {\n      targetProps.push(new ParsedProperty(\n          name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset),\n          ParsedPropertyType.LITERAL_ATTR, sourceSpan, valueSpan));\n    }\n  }\n\n  parsePropertyBinding(\n      name: string, expression: string, isHost: boolean, sourceSpan: ParseSourceSpan,\n      absoluteOffset: number, valueSpan: ParseSourceSpan|undefined,\n      targetMatchableAttrs: string[][], targetProps: ParsedProperty[]) {\n    let isAnimationProp = false;\n    if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n      isAnimationProp = true;\n      name = name.substring(ANIMATE_PROP_PREFIX.length);\n    } else if (isAnimationLabel(name)) {\n      isAnimationProp = true;\n      name = name.substring(1);\n    }\n\n    if (isAnimationProp) {\n      this._parseAnimation(\n          name, expression, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs,\n          targetProps);\n    } else {\n      this._parsePropertyAst(\n          name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset),\n          sourceSpan, valueSpan, targetMatchableAttrs, targetProps);\n    }\n  }\n\n  parsePropertyInterpolation(\n      name: string, value: string, sourceSpan: ParseSourceSpan,\n      valueSpan: ParseSourceSpan|undefined, targetMatchableAttrs: string[][],\n      targetProps: ParsedProperty[]): boolean {\n    const expr = this.parseInterpolation(value, valueSpan || sourceSpan);\n    if (expr) {\n      this._parsePropertyAst(name, expr, sourceSpan, valueSpan, targetMatchableAttrs, targetProps);\n      return true;\n    }\n    return false;\n  }\n\n  private _parsePropertyAst(\n      name: string, ast: ASTWithSource, sourceSpan: ParseSourceSpan,\n      valueSpan: ParseSourceSpan|undefined, targetMatchableAttrs: string[][],\n      targetProps: ParsedProperty[]) {\n    targetMatchableAttrs.push([name, ast.source !]);\n    targetProps.push(\n        new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, valueSpan));\n  }\n\n  private _parseAnimation(\n      name: string, expression: string|null, sourceSpan: ParseSourceSpan, absoluteOffset: number,\n      valueSpan: ParseSourceSpan|undefined, targetMatchableAttrs: string[][],\n      targetProps: ParsedProperty[]) {\n    // This will occur when a @trigger is not paired with an expression.\n    // For animations it is valid to not have an expression since */void\n    // states will be applied by angular when the element is attached/detached\n    const ast = this._parseBinding(\n        expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);\n    targetMatchableAttrs.push([name, ast.source !]);\n    targetProps.push(\n        new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, valueSpan));\n  }\n\n  private _parseBinding(\n      value: string, isHostBinding: boolean, sourceSpan: ParseSourceSpan,\n      absoluteOffset: number): ASTWithSource {\n    const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n\n    try {\n      const ast = isHostBinding ?\n          this._exprParser.parseSimpleBinding(\n              value, sourceInfo, absoluteOffset, this._interpolationConfig) :\n          this._exprParser.parseBinding(\n              value, sourceInfo, absoluteOffset, this._interpolationConfig);\n      if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);\n      this._checkPipes(ast, sourceSpan);\n      return ast;\n    } catch (e) {\n      this._reportError(`${e}`, sourceSpan);\n      return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n    }\n  }\n\n  createBoundElementProperty(\n      elementSelector: string, boundProp: ParsedProperty, skipValidation: boolean = false,\n      mapPropertyName: boolean = true): BoundElementProperty {\n    if (boundProp.isAnimation) {\n      return new BoundElementProperty(\n          boundProp.name, BindingType.Animation, SecurityContext.NONE, boundProp.expression, null,\n          boundProp.sourceSpan, boundProp.valueSpan);\n    }\n\n    let unit: string|null = null;\n    let bindingType: BindingType = undefined !;\n    let boundPropertyName: string|null = null;\n    const parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n    let securityContexts: SecurityContext[] = undefined !;\n\n    // Check for special cases (prefix style, attr, class)\n    if (parts.length > 1) {\n      if (parts[0] == ATTRIBUTE_PREFIX) {\n        boundPropertyName = parts[1];\n        if (!skipValidation) {\n          this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n        }\n        securityContexts = calcPossibleSecurityContexts(\n            this._schemaRegistry, elementSelector, boundPropertyName, true);\n\n        const nsSeparatorIdx = boundPropertyName.indexOf(':');\n        if (nsSeparatorIdx > -1) {\n          const ns = boundPropertyName.substring(0, nsSeparatorIdx);\n          const name = boundPropertyName.substring(nsSeparatorIdx + 1);\n          boundPropertyName = mergeNsAndName(ns, name);\n        }\n\n        bindingType = BindingType.Attribute;\n      } else if (parts[0] == CLASS_PREFIX) {\n        boundPropertyName = parts[1];\n        bindingType = BindingType.Class;\n        securityContexts = [SecurityContext.NONE];\n      } else if (parts[0] == STYLE_PREFIX) {\n        unit = parts.length > 2 ? parts[2] : null;\n        boundPropertyName = parts[1];\n        bindingType = BindingType.Style;\n        securityContexts = [SecurityContext.STYLE];\n      }\n    }\n\n    // If not a special case, use the full property name\n    if (boundPropertyName === null) {\n      const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);\n      boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;\n      securityContexts = calcPossibleSecurityContexts(\n          this._schemaRegistry, elementSelector, mappedPropName, false);\n      bindingType = BindingType.Property;\n      if (!skipValidation) {\n        this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);\n      }\n    }\n\n    return new BoundElementProperty(\n        boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit,\n        boundProp.sourceSpan, boundProp.valueSpan);\n  }\n\n  parseEvent(\n      name: string, expression: string, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan,\n      targetMatchableAttrs: string[][], targetEvents: ParsedEvent[]) {\n    if (isAnimationLabel(name)) {\n      name = name.substr(1);\n      this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents);\n    } else {\n      this._parseRegularEvent(\n          name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents);\n    }\n  }\n\n  calcPossibleSecurityContexts(selector: string, propName: string, isAttribute: boolean):\n      SecurityContext[] {\n    const prop = this._schemaRegistry.getMappedPropName(propName);\n    return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);\n  }\n\n  private _parseAnimationEvent(\n      name: string, expression: string, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan,\n      targetEvents: ParsedEvent[]) {\n    const matches = splitAtPeriod(name, [name, '']);\n    const eventName = matches[0];\n    const phase = matches[1].toLowerCase();\n    if (phase) {\n      switch (phase) {\n        case 'start':\n        case 'done':\n          const ast = this._parseAction(expression, handlerSpan);\n          targetEvents.push(new ParsedEvent(\n              eventName, phase, ParsedEventType.Animation, ast, sourceSpan, handlerSpan));\n          break;\n\n        default:\n          this._reportError(\n              `The provided animation output phase value \"${phase}\" for \"@${eventName}\" is not supported (use start or done)`,\n              sourceSpan);\n          break;\n      }\n    } else {\n      this._reportError(\n          `The animation trigger output event (@${eventName}) is missing its phase value name (start or done are currently supported)`,\n          sourceSpan);\n    }\n  }\n\n  private _parseRegularEvent(\n      name: string, expression: string, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan,\n      targetMatchableAttrs: string[][], targetEvents: ParsedEvent[]) {\n    // long format: 'target: eventName'\n    const [target, eventName] = splitAtColon(name, [null !, name]);\n    const ast = this._parseAction(expression, handlerSpan);\n    targetMatchableAttrs.push([name !, ast.source !]);\n    targetEvents.push(\n        new ParsedEvent(eventName, target, ParsedEventType.Regular, ast, sourceSpan, handlerSpan));\n    // Don't detect directives for event names for now,\n    // so don't add the event name to the matchableAttrs\n  }\n\n  private _parseAction(value: string, sourceSpan: ParseSourceSpan): ASTWithSource {\n    const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n    const absoluteOffset = (sourceSpan && sourceSpan.start) ? sourceSpan.start.offset : 0;\n\n    try {\n      const ast = this._exprParser.parseAction(\n          value, sourceInfo, absoluteOffset, this._interpolationConfig);\n      if (ast) {\n        this._reportExpressionParserErrors(ast.errors, sourceSpan);\n      }\n      if (!ast || ast.ast instanceof EmptyExpr) {\n        this._reportError(`Empty expressions are not allowed`, sourceSpan);\n        return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n      }\n      this._checkPipes(ast, sourceSpan);\n      return ast;\n    } catch (e) {\n      this._reportError(`${e}`, sourceSpan);\n      return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);\n    }\n  }\n\n  private _reportError(\n      message: string, sourceSpan: ParseSourceSpan,\n      level: ParseErrorLevel = ParseErrorLevel.ERROR) {\n    this.errors.push(new ParseError(sourceSpan, message, level));\n  }\n\n  private _reportExpressionParserErrors(errors: ParserError[], sourceSpan: ParseSourceSpan) {\n    for (const error of errors) {\n      this._reportError(error.message, sourceSpan);\n    }\n  }\n\n  // Make sure all the used pipes are known in `this.pipesByName`\n  private _checkPipes(ast: ASTWithSource, sourceSpan: ParseSourceSpan): void {\n    if (ast && this.pipesByName) {\n      const collector = new PipeCollector();\n      ast.visit(collector);\n      collector.pipes.forEach((ast, pipeName) => {\n        const pipeMeta = this.pipesByName !.get(pipeName);\n        if (!pipeMeta) {\n          this._reportError(\n              `The pipe '${pipeName}' could not be found`,\n              new ParseSourceSpan(\n                  sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));\n        } else {\n          this._usedPipes.set(pipeName, pipeMeta);\n        }\n      });\n    }\n  }\n\n  /**\n   * @param propName the name of the property / attribute\n   * @param sourceSpan\n   * @param isAttr true when binding to an attribute\n   */\n  private _validatePropertyOrAttributeName(\n      propName: string, sourceSpan: ParseSourceSpan, isAttr: boolean): void {\n    const report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n                            this._schemaRegistry.validateProperty(propName);\n    if (report.error) {\n      this._reportError(report.msg !, sourceSpan, ParseErrorLevel.ERROR);\n    }\n  }\n}\n\nexport class PipeCollector extends RecursiveAstVisitor {\n  pipes = new Map<string, BindingPipe>();\n  visitPipe(ast: BindingPipe, context: any): any {\n    this.pipes.set(ast.name, ast);\n    ast.exp.visit(this);\n    this.visitAll(ast.args, context);\n    return null;\n  }\n}\n\nfunction isAnimationLabel(name: string): boolean {\n  return name[0] == '@';\n}\n\nexport function calcPossibleSecurityContexts(\n    registry: ElementSchemaRegistry, selector: string, propName: string,\n    isAttribute: boolean): SecurityContext[] {\n  const ctxs: SecurityContext[] = [];\n  CssSelector.parse(selector).forEach((selector) => {\n    const elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n    const notElementNames =\n        new Set(selector.notSelectors.filter(selector => selector.isElementSelector())\n                    .map((selector) => selector.element));\n    const possibleElementNames =\n        elementNames.filter(elementName => !notElementNames.has(elementName));\n\n    ctxs.push(...possibleElementNames.map(\n        elementName => registry.securityContext(elementName, propName, isAttribute)));\n  });\n  return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as html from '../ml_parser/ast';\nimport {isNgContent} from '../ml_parser/tags';\n\nconst NG_CONTENT_SELECT_ATTR = 'select';\nconst LINK_ELEMENT = 'link';\nconst LINK_STYLE_REL_ATTR = 'rel';\nconst LINK_STYLE_HREF_ATTR = 'href';\nconst LINK_STYLE_REL_VALUE = 'stylesheet';\nconst STYLE_ELEMENT = 'style';\nconst SCRIPT_ELEMENT = 'script';\nconst NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nconst NG_PROJECT_AS = 'ngProjectAs';\n\nexport function preparseElement(ast: html.Element): PreparsedElement {\n  let selectAttr: string = null !;\n  let hrefAttr: string = null !;\n  let relAttr: string = null !;\n  let nonBindable = false;\n  let projectAs = '';\n  ast.attrs.forEach(attr => {\n    const lcAttrName = attr.name.toLowerCase();\n    if (lcAttrName == NG_CONTENT_SELECT_ATTR) {\n      selectAttr = attr.value;\n    } else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n      hrefAttr = attr.value;\n    } else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n      relAttr = attr.value;\n    } else if (attr.name == NG_NON_BINDABLE_ATTR) {\n      nonBindable = true;\n    } else if (attr.name == NG_PROJECT_AS) {\n      if (attr.value.length > 0) {\n        projectAs = attr.value;\n      }\n    }\n  });\n  selectAttr = normalizeNgContentSelect(selectAttr);\n  const nodeName = ast.name.toLowerCase();\n  let type = PreparsedElementType.OTHER;\n  if (isNgContent(nodeName)) {\n    type = PreparsedElementType.NG_CONTENT;\n  } else if (nodeName == STYLE_ELEMENT) {\n    type = PreparsedElementType.STYLE;\n  } else if (nodeName == SCRIPT_ELEMENT) {\n    type = PreparsedElementType.SCRIPT;\n  } else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n    type = PreparsedElementType.STYLESHEET;\n  }\n  return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\n\nexport enum PreparsedElementType {\n  NG_CONTENT,\n  STYLE,\n  STYLESHEET,\n  SCRIPT,\n  OTHER\n}\n\nexport class PreparsedElement {\n  constructor(\n      public type: PreparsedElementType, public selectAttr: string, public hrefAttr: string,\n      public nonBindable: boolean, public projectAs: string) {}\n}\n\n\nfunction normalizeNgContentSelect(selectAttr: string): string {\n  if (selectAttr === null || selectAttr.length === 0) {\n    return '*';\n  }\n  return selectAttr;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileTokenMetadata, CompileTypeMetadata, identifierName} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {CompilerConfig} from '../config';\nimport {SchemaMetadata} from '../core';\nimport {AST, ASTWithSource, EmptyExpr, ParsedEvent, ParsedProperty, ParsedVariable} from '../expression_parser/ast';\nimport {Parser} from '../expression_parser/parser';\nimport {Identifiers, createTokenForExternalReference, createTokenForReference} from '../identifiers';\nimport * as html from '../ml_parser/ast';\nimport {HtmlParser, ParseTreeResult} from '../ml_parser/html_parser';\nimport {removeWhitespaces, replaceNgsp} from '../ml_parser/html_whitespaces';\nimport {expandNodes} from '../ml_parser/icu_ast_expander';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {isNgTemplate, splitNsName} from '../ml_parser/tags';\nimport {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util';\nimport {ProviderElementContext, ProviderViewContext} from '../provider_analyzer';\nimport {ElementSchemaRegistry} from '../schema/element_schema_registry';\nimport {CssSelector, SelectorMatcher} from '../selector';\nimport {isStyleUrlResolvable} from '../style_url_resolver';\nimport {Console, syntaxError} from '../util';\n\nimport {BindingParser} from './binding_parser';\nimport * as t from './template_ast';\nimport {PreparsedElementType, preparseElement} from './template_preparser';\n\nconst BIND_NAME_REGEXP =\n    /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n\n// Group 1 = \"bind-\"\nconst KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nconst KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nconst KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nconst KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nconst KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nconst KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nconst IDENT_KW_IDX = 7;\n// Group 8 = identifier inside [()]\nconst IDENT_BANANA_BOX_IDX = 8;\n// Group 9 = identifier inside []\nconst IDENT_PROPERTY_IDX = 9;\n// Group 10 = identifier inside ()\nconst IDENT_EVENT_IDX = 10;\n\nconst TEMPLATE_ATTR_PREFIX = '*';\nconst CLASS_ATTR = 'class';\n\nlet _TEXT_CSS_SELECTOR !: CssSelector;\nfunction TEXT_CSS_SELECTOR(): CssSelector {\n  if (!_TEXT_CSS_SELECTOR) {\n    _TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];\n  }\n  return _TEXT_CSS_SELECTOR;\n}\n\nexport class TemplateParseError extends ParseError {\n  constructor(message: string, span: ParseSourceSpan, level: ParseErrorLevel) {\n    super(span, message, level);\n  }\n}\n\nexport class TemplateParseResult {\n  constructor(\n      public templateAst?: t.TemplateAst[], public usedPipes?: CompilePipeSummary[],\n      public errors?: ParseError[]) {}\n}\n\nexport class TemplateParser {\n  constructor(\n      private _config: CompilerConfig, private _reflector: CompileReflector,\n      private _exprParser: Parser, private _schemaRegistry: ElementSchemaRegistry,\n      private _htmlParser: HtmlParser, private _console: Console,\n      public transforms: t.TemplateAstVisitor[]) {}\n\n  public get expressionParser() { return this._exprParser; }\n\n  parse(\n      component: CompileDirectiveMetadata, template: string|ParseTreeResult,\n      directives: CompileDirectiveSummary[], pipes: CompilePipeSummary[], schemas: SchemaMetadata[],\n      templateUrl: string,\n      preserveWhitespaces: boolean): {template: t.TemplateAst[], pipes: CompilePipeSummary[]} {\n    const result = this.tryParse(\n        component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces);\n    const warnings = result.errors !.filter(error => error.level === ParseErrorLevel.WARNING);\n\n    const errors = result.errors !.filter(error => error.level === ParseErrorLevel.ERROR);\n\n    if (warnings.length > 0) {\n      this._console.warn(`Template parse warnings:\\n${warnings.join('\\n')}`);\n    }\n\n    if (errors.length > 0) {\n      const errorString = errors.join('\\n');\n      throw syntaxError(`Template parse errors:\\n${errorString}`, errors);\n    }\n\n    return {template: result.templateAst !, pipes: result.usedPipes !};\n  }\n\n  tryParse(\n      component: CompileDirectiveMetadata, template: string|ParseTreeResult,\n      directives: CompileDirectiveSummary[], pipes: CompilePipeSummary[], schemas: SchemaMetadata[],\n      templateUrl: string, preserveWhitespaces: boolean): TemplateParseResult {\n    let htmlParseResult = typeof template === 'string' ?\n        this._htmlParser !.parse(template, templateUrl, {\n          tokenizeExpansionForms: true,\n          interpolationConfig: this.getInterpolationConfig(component)\n        }) :\n        template;\n\n    if (!preserveWhitespaces) {\n      htmlParseResult = removeWhitespaces(htmlParseResult);\n    }\n\n    return this.tryParseHtml(\n        this.expandHtml(htmlParseResult), component, directives, pipes, schemas);\n  }\n\n  tryParseHtml(\n      htmlAstWithErrors: ParseTreeResult, component: CompileDirectiveMetadata,\n      directives: CompileDirectiveSummary[], pipes: CompilePipeSummary[],\n      schemas: SchemaMetadata[]): TemplateParseResult {\n    let result: t.TemplateAst[];\n    const errors = htmlAstWithErrors.errors;\n    const usedPipes: CompilePipeSummary[] = [];\n    if (htmlAstWithErrors.rootNodes.length > 0) {\n      const uniqDirectives = removeSummaryDuplicates(directives);\n      const uniqPipes = removeSummaryDuplicates(pipes);\n      const providerViewContext = new ProviderViewContext(this._reflector, component);\n      let interpolationConfig: InterpolationConfig = undefined !;\n      if (component.template && component.template.interpolation) {\n        interpolationConfig = {\n          start: component.template.interpolation[0],\n          end: component.template.interpolation[1]\n        };\n      }\n      const bindingParser = new BindingParser(\n          this._exprParser, interpolationConfig !, this._schemaRegistry, uniqPipes, errors);\n      const parseVisitor = new TemplateParseVisitor(\n          this._reflector, this._config, providerViewContext, uniqDirectives, bindingParser,\n          this._schemaRegistry, schemas, errors);\n      result = html.visitAll(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);\n      errors.push(...providerViewContext.errors);\n      usedPipes.push(...bindingParser.getUsedPipes());\n    } else {\n      result = [];\n    }\n    this._assertNoReferenceDuplicationOnTemplate(result, errors);\n\n    if (errors.length > 0) {\n      return new TemplateParseResult(result, usedPipes, errors);\n    }\n\n    if (this.transforms) {\n      this.transforms.forEach(\n          (transform: t.TemplateAstVisitor) => { result = t.templateVisitAll(transform, result); });\n    }\n\n    return new TemplateParseResult(result, usedPipes, errors);\n  }\n\n  expandHtml(htmlAstWithErrors: ParseTreeResult, forced: boolean = false): ParseTreeResult {\n    const errors: ParseError[] = htmlAstWithErrors.errors;\n\n    if (errors.length == 0 || forced) {\n      // Transform ICU messages to angular directives\n      const expandedHtmlAst = expandNodes(htmlAstWithErrors.rootNodes);\n      errors.push(...expandedHtmlAst.errors);\n      htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);\n    }\n    return htmlAstWithErrors;\n  }\n\n  getInterpolationConfig(component: CompileDirectiveMetadata): InterpolationConfig|undefined {\n    if (component.template) {\n      return InterpolationConfig.fromArray(component.template.interpolation);\n    }\n    return undefined;\n  }\n\n  /** @internal */\n  _assertNoReferenceDuplicationOnTemplate(result: t.TemplateAst[], errors: TemplateParseError[]):\n      void {\n    const existingReferences: string[] = [];\n\n    result.filter(element => !!(<any>element).references)\n        .forEach(element => (<any>element).references.forEach((reference: t.ReferenceAst) => {\n          const name = reference.name;\n          if (existingReferences.indexOf(name) < 0) {\n            existingReferences.push(name);\n          } else {\n            const error = new TemplateParseError(\n                `Reference \"#${name}\" is defined several times`, reference.sourceSpan,\n                ParseErrorLevel.ERROR);\n            errors.push(error);\n          }\n        }));\n  }\n}\n\nclass TemplateParseVisitor implements html.Visitor {\n  selectorMatcher = new SelectorMatcher();\n  directivesIndex = new Map<CompileDirectiveSummary, number>();\n  ngContentCount = 0;\n  contentQueryStartId: number;\n\n  constructor(\n      private reflector: CompileReflector, private config: CompilerConfig,\n      public providerViewContext: ProviderViewContext, directives: CompileDirectiveSummary[],\n      private _bindingParser: BindingParser, private _schemaRegistry: ElementSchemaRegistry,\n      private _schemas: SchemaMetadata[], private _targetErrors: TemplateParseError[]) {\n    // Note: queries start with id 1 so we can use the number in a Bloom filter!\n    this.contentQueryStartId = providerViewContext.component.viewQueries.length + 1;\n    directives.forEach((directive, index) => {\n      const selector = CssSelector.parse(directive.selector !);\n      this.selectorMatcher.addSelectables(selector, directive);\n      this.directivesIndex.set(directive, index);\n    });\n  }\n\n  visitExpansion(expansion: html.Expansion, context: any): any { return null; }\n\n  visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any { return null; }\n\n  visitText(text: html.Text, parent: ElementContext): any {\n    const ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR()) !;\n    const valueNoNgsp = replaceNgsp(text.value);\n    const expr = this._bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan !);\n    return expr ? new t.BoundTextAst(expr, ngContentIndex, text.sourceSpan !) :\n                  new t.TextAst(valueNoNgsp, ngContentIndex, text.sourceSpan !);\n  }\n\n  visitAttribute(attribute: html.Attribute, context: any): any {\n    return new t.AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n  }\n\n  visitComment(comment: html.Comment, context: any): any { return null; }\n\n  visitElement(element: html.Element, parent: ElementContext): any {\n    const queryStartIndex = this.contentQueryStartId;\n    const elName = element.name;\n    const preparsedElement = preparseElement(element);\n    if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n        preparsedElement.type === PreparsedElementType.STYLE) {\n      // Skipping <script> for security reasons\n      // Skipping <style> as we already processed them\n      // in the StyleCompiler\n      return null;\n    }\n    if (preparsedElement.type === PreparsedElementType.STYLESHEET &&\n        isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n      // Skipping stylesheets with either relative urls or package scheme as we already processed\n      // them in the StyleCompiler\n      return null;\n    }\n\n    const matchableAttrs: [string, string][] = [];\n    const elementOrDirectiveProps: ParsedProperty[] = [];\n    const elementOrDirectiveRefs: ElementOrDirectiveRef[] = [];\n    const elementVars: t.VariableAst[] = [];\n    const events: t.BoundEventAst[] = [];\n\n    const templateElementOrDirectiveProps: ParsedProperty[] = [];\n    const templateMatchableAttrs: [string, string][] = [];\n    const templateElementVars: t.VariableAst[] = [];\n\n    let hasInlineTemplates = false;\n    const attrs: t.AttrAst[] = [];\n    const isTemplateElement = isNgTemplate(element.name);\n\n    element.attrs.forEach(attr => {\n      const parsedVariables: ParsedVariable[] = [];\n      const hasBinding = this._parseAttr(\n          isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events,\n          elementOrDirectiveRefs, elementVars);\n      elementVars.push(...parsedVariables.map(v => t.VariableAst.fromParsedVariable(v)));\n\n      let templateValue: string|undefined;\n      let templateKey: string|undefined;\n      const normalizedName = this._normalizeAttributeName(attr.name);\n\n      if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n        templateValue = attr.value;\n        templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n      }\n\n      const hasTemplateBinding = templateValue != null;\n      if (hasTemplateBinding) {\n        if (hasInlineTemplates) {\n          this._reportError(\n              `Can't have multiple template bindings on one element. Use only one attribute prefixed with *`,\n              attr.sourceSpan);\n        }\n        hasInlineTemplates = true;\n        const parsedVariables: ParsedVariable[] = [];\n        this._bindingParser.parseInlineTemplateBinding(\n            templateKey !, templateValue !, attr.sourceSpan, attr.sourceSpan.start.offset,\n            templateMatchableAttrs, templateElementOrDirectiveProps, parsedVariables);\n        templateElementVars.push(...parsedVariables.map(v => t.VariableAst.fromParsedVariable(v)));\n      }\n\n      if (!hasBinding && !hasTemplateBinding) {\n        // don't include the bindings as attributes as well in the AST\n        attrs.push(this.visitAttribute(attr, null));\n        matchableAttrs.push([attr.name, attr.value]);\n      }\n    });\n\n    const elementCssSelector = createElementCssSelector(elName, matchableAttrs);\n    const {directives: directiveMetas, matchElement} =\n        this._parseDirectives(this.selectorMatcher, elementCssSelector);\n    const references: t.ReferenceAst[] = [];\n    const boundDirectivePropNames = new Set<string>();\n    const directiveAsts = this._createDirectiveAsts(\n        isTemplateElement, element.name, directiveMetas, elementOrDirectiveProps,\n        elementOrDirectiveRefs, element.sourceSpan !, references, boundDirectivePropNames);\n    const elementProps: t.BoundElementPropertyAst[] = this._createElementPropertyAsts(\n        element.name, elementOrDirectiveProps, boundDirectivePropNames);\n    const isViewRoot = parent.isTemplateElement || hasInlineTemplates;\n\n    const providerContext = new ProviderElementContext(\n        this.providerViewContext, parent.providerContext !, isViewRoot, directiveAsts, attrs,\n        references, isTemplateElement, queryStartIndex, element.sourceSpan !);\n\n    const children: t.TemplateAst[] = html.visitAll(\n        preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children,\n        ElementContext.create(\n            isTemplateElement, directiveAsts,\n            isTemplateElement ? parent.providerContext ! : providerContext));\n    providerContext.afterElement();\n    // Override the actual selector when the `ngProjectAs` attribute is provided\n    const projectionSelector = preparsedElement.projectAs != '' ?\n        CssSelector.parse(preparsedElement.projectAs)[0] :\n        elementCssSelector;\n    const ngContentIndex = parent.findNgContentIndex(projectionSelector) !;\n    let parsedElement: t.TemplateAst;\n\n    if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n      // `<ng-content>` element\n      if (element.children && !element.children.every(_isEmptyTextNode)) {\n        this._reportError(`<ng-content> element cannot have content.`, element.sourceSpan !);\n      }\n\n      parsedElement = new t.NgContentAst(\n          this.ngContentCount++, hasInlineTemplates ? null ! : ngContentIndex,\n          element.sourceSpan !);\n    } else if (isTemplateElement) {\n      // `<ng-template>` element\n      this._assertAllEventsPublishedByDirectives(directiveAsts, events);\n      this._assertNoComponentsNorElementBindingsOnTemplate(\n          directiveAsts, elementProps, element.sourceSpan !);\n\n      parsedElement = new t.EmbeddedTemplateAst(\n          attrs, events, references, elementVars, providerContext.transformedDirectiveAsts,\n          providerContext.transformProviders, providerContext.transformedHasViewContainer,\n          providerContext.queryMatches, children, hasInlineTemplates ? null ! : ngContentIndex,\n          element.sourceSpan !);\n    } else {\n      // element other than `<ng-content>` and `<ng-template>`\n      this._assertElementExists(matchElement, element);\n      this._assertOnlyOneComponent(directiveAsts, element.sourceSpan !);\n\n      const ngContentIndex =\n          hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);\n      parsedElement = new t.ElementAst(\n          elName, attrs, elementProps, events, references, providerContext.transformedDirectiveAsts,\n          providerContext.transformProviders, providerContext.transformedHasViewContainer,\n          providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex,\n          element.sourceSpan, element.endSourceSpan || null);\n    }\n\n    if (hasInlineTemplates) {\n      // The element as a *-attribute\n      const templateQueryStartIndex = this.contentQueryStartId;\n      const templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);\n      const {directives} = this._parseDirectives(this.selectorMatcher, templateSelector);\n      const templateBoundDirectivePropNames = new Set<string>();\n      const templateDirectiveAsts = this._createDirectiveAsts(\n          true, elName, directives, templateElementOrDirectiveProps, [], element.sourceSpan !, [],\n          templateBoundDirectivePropNames);\n      const templateElementProps: t.BoundElementPropertyAst[] = this._createElementPropertyAsts(\n          elName, templateElementOrDirectiveProps, templateBoundDirectivePropNames);\n      this._assertNoComponentsNorElementBindingsOnTemplate(\n          templateDirectiveAsts, templateElementProps, element.sourceSpan !);\n      const templateProviderContext = new ProviderElementContext(\n          this.providerViewContext, parent.providerContext !, parent.isTemplateElement,\n          templateDirectiveAsts, [], [], true, templateQueryStartIndex, element.sourceSpan !);\n      templateProviderContext.afterElement();\n\n      parsedElement = new t.EmbeddedTemplateAst(\n          [], [], [], templateElementVars, templateProviderContext.transformedDirectiveAsts,\n          templateProviderContext.transformProviders,\n          templateProviderContext.transformedHasViewContainer, templateProviderContext.queryMatches,\n          [parsedElement], ngContentIndex, element.sourceSpan !);\n    }\n\n    return parsedElement;\n  }\n\n  private _parseAttr(\n      isTemplateElement: boolean, attr: html.Attribute, targetMatchableAttrs: string[][],\n      targetProps: ParsedProperty[], targetEvents: t.BoundEventAst[],\n      targetRefs: ElementOrDirectiveRef[], targetVars: t.VariableAst[]): boolean {\n    const name = this._normalizeAttributeName(attr.name);\n    const value = attr.value;\n    const srcSpan = attr.sourceSpan;\n    const absoluteOffset = attr.valueSpan ? attr.valueSpan.start.offset : srcSpan.start.offset;\n\n    const boundEvents: ParsedEvent[] = [];\n    const bindParts = name.match(BIND_NAME_REGEXP);\n    let hasBinding = false;\n\n    if (bindParts !== null) {\n      hasBinding = true;\n      if (bindParts[KW_BIND_IDX] != null) {\n        this._bindingParser.parsePropertyBinding(\n            bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan,\n            targetMatchableAttrs, targetProps);\n\n      } else if (bindParts[KW_LET_IDX]) {\n        if (isTemplateElement) {\n          const identifier = bindParts[IDENT_KW_IDX];\n          this._parseVariable(identifier, value, srcSpan, targetVars);\n        } else {\n          this._reportError(`\"let-\" is only supported on ng-template elements.`, srcSpan);\n        }\n\n      } else if (bindParts[KW_REF_IDX]) {\n        const identifier = bindParts[IDENT_KW_IDX];\n        this._parseReference(identifier, value, srcSpan, targetRefs);\n\n      } else if (bindParts[KW_ON_IDX]) {\n        this._bindingParser.parseEvent(\n            bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan,\n            targetMatchableAttrs, boundEvents);\n\n      } else if (bindParts[KW_BINDON_IDX]) {\n        this._bindingParser.parsePropertyBinding(\n            bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan,\n            targetMatchableAttrs, targetProps);\n        this._parseAssignmentEvent(\n            bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan,\n            targetMatchableAttrs, boundEvents);\n\n      } else if (bindParts[KW_AT_IDX]) {\n        this._bindingParser.parseLiteralAttr(\n            name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs,\n            targetProps);\n\n      } else if (bindParts[IDENT_BANANA_BOX_IDX]) {\n        this._bindingParser.parsePropertyBinding(\n            bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan,\n            targetMatchableAttrs, targetProps);\n        this._parseAssignmentEvent(\n            bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, attr.valueSpan || srcSpan,\n            targetMatchableAttrs, boundEvents);\n\n      } else if (bindParts[IDENT_PROPERTY_IDX]) {\n        this._bindingParser.parsePropertyBinding(\n            bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan,\n            targetMatchableAttrs, targetProps);\n\n      } else if (bindParts[IDENT_EVENT_IDX]) {\n        this._bindingParser.parseEvent(\n            bindParts[IDENT_EVENT_IDX], value, srcSpan, attr.valueSpan || srcSpan,\n            targetMatchableAttrs, boundEvents);\n      }\n    } else {\n      hasBinding = this._bindingParser.parsePropertyInterpolation(\n          name, value, srcSpan, attr.valueSpan, targetMatchableAttrs, targetProps);\n    }\n\n    if (!hasBinding) {\n      this._bindingParser.parseLiteralAttr(\n          name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);\n    }\n\n    targetEvents.push(...boundEvents.map(e => t.BoundEventAst.fromParsedEvent(e)));\n\n    return hasBinding;\n  }\n\n  private _normalizeAttributeName(attrName: string): string {\n    return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n  }\n\n  private _parseVariable(\n      identifier: string, value: string, sourceSpan: ParseSourceSpan, targetVars: t.VariableAst[]) {\n    if (identifier.indexOf('-') > -1) {\n      this._reportError(`\"-\" is not allowed in variable names`, sourceSpan);\n    }\n\n    targetVars.push(new t.VariableAst(identifier, value, sourceSpan));\n  }\n\n  private _parseReference(\n      identifier: string, value: string, sourceSpan: ParseSourceSpan,\n      targetRefs: ElementOrDirectiveRef[]) {\n    if (identifier.indexOf('-') > -1) {\n      this._reportError(`\"-\" is not allowed in reference names`, sourceSpan);\n    }\n\n    targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));\n  }\n\n  private _parseAssignmentEvent(\n      name: string, expression: string, sourceSpan: ParseSourceSpan, valueSpan: ParseSourceSpan,\n      targetMatchableAttrs: string[][], targetEvents: ParsedEvent[]) {\n    this._bindingParser.parseEvent(\n        `${name}Change`, `${expression}=$event`, sourceSpan, valueSpan, targetMatchableAttrs,\n        targetEvents);\n  }\n\n  private _parseDirectives(selectorMatcher: SelectorMatcher, elementCssSelector: CssSelector):\n      {directives: CompileDirectiveSummary[], matchElement: boolean} {\n    // Need to sort the directives so that we get consistent results throughout,\n    // as selectorMatcher uses Maps inside.\n    // Also deduplicate directives as they might match more than one time!\n    const directives = new Array(this.directivesIndex.size);\n    // Whether any directive selector matches on the element name\n    let matchElement = false;\n\n    selectorMatcher.match(elementCssSelector, (selector, directive) => {\n      directives[this.directivesIndex.get(directive) !] = directive;\n      matchElement = matchElement || selector.hasElementSelector();\n    });\n\n    return {\n      directives: directives.filter(dir => !!dir),\n      matchElement,\n    };\n  }\n\n  private _createDirectiveAsts(\n      isTemplateElement: boolean, elementName: string, directives: CompileDirectiveSummary[],\n      props: ParsedProperty[], elementOrDirectiveRefs: ElementOrDirectiveRef[],\n      elementSourceSpan: ParseSourceSpan, targetReferences: t.ReferenceAst[],\n      targetBoundDirectivePropNames: Set<string>): t.DirectiveAst[] {\n    const matchedReferences = new Set<string>();\n    let component: CompileDirectiveSummary = null !;\n\n    const directiveAsts = directives.map((directive) => {\n      const sourceSpan = new ParseSourceSpan(\n          elementSourceSpan.start, elementSourceSpan.end,\n          `Directive ${identifierName(directive.type)}`);\n\n      if (directive.isComponent) {\n        component = directive;\n      }\n      const directiveProperties: t.BoundDirectivePropertyAst[] = [];\n      const boundProperties =\n          this._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan) !;\n\n      let hostProperties =\n          boundProperties.map(prop => t.BoundElementPropertyAst.fromBoundProperty(prop));\n      // Note: We need to check the host properties here as well,\n      // as we don't know the element name in the DirectiveWrapperCompiler yet.\n      hostProperties = this._checkPropertiesInSchema(elementName, hostProperties);\n      const parsedEvents =\n          this._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan) !;\n      this._createDirectivePropertyAsts(\n          directive.inputs, props, directiveProperties, targetBoundDirectivePropNames);\n      elementOrDirectiveRefs.forEach((elOrDirRef) => {\n        if ((elOrDirRef.value.length === 0 && directive.isComponent) ||\n            (elOrDirRef.isReferenceToDirective(directive))) {\n          targetReferences.push(new t.ReferenceAst(\n              elOrDirRef.name, createTokenForReference(directive.type.reference), elOrDirRef.value,\n              elOrDirRef.sourceSpan));\n          matchedReferences.add(elOrDirRef.name);\n        }\n      });\n      const hostEvents = parsedEvents.map(e => t.BoundEventAst.fromParsedEvent(e));\n      const contentQueryStartId = this.contentQueryStartId;\n      this.contentQueryStartId += directive.queries.length;\n      return new t.DirectiveAst(\n          directive, directiveProperties, hostProperties, hostEvents, contentQueryStartId,\n          sourceSpan);\n    });\n\n    elementOrDirectiveRefs.forEach((elOrDirRef) => {\n      if (elOrDirRef.value.length > 0) {\n        if (!matchedReferences.has(elOrDirRef.name)) {\n          this._reportError(\n              `There is no directive with \"exportAs\" set to \"${elOrDirRef.value}\"`,\n              elOrDirRef.sourceSpan);\n        }\n      } else if (!component) {\n        let refToken: CompileTokenMetadata = null !;\n        if (isTemplateElement) {\n          refToken = createTokenForExternalReference(this.reflector, Identifiers.TemplateRef);\n        }\n        targetReferences.push(\n            new t.ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));\n      }\n    });\n    return directiveAsts;\n  }\n\n  private _createDirectivePropertyAsts(\n      directiveProperties: {[key: string]: string}, boundProps: ParsedProperty[],\n      targetBoundDirectiveProps: t.BoundDirectivePropertyAst[],\n      targetBoundDirectivePropNames: Set<string>) {\n    if (directiveProperties) {\n      const boundPropsByName = new Map<string, ParsedProperty>();\n      boundProps.forEach(boundProp => {\n        const prevValue = boundPropsByName.get(boundProp.name);\n        if (!prevValue || prevValue.isLiteral) {\n          // give [a]=\"b\" a higher precedence than a=\"b\" on the same element\n          boundPropsByName.set(boundProp.name, boundProp);\n        }\n      });\n\n      Object.keys(directiveProperties).forEach(dirProp => {\n        const elProp = directiveProperties[dirProp];\n        const boundProp = boundPropsByName.get(elProp);\n\n        // Bindings are optional, so this binding only needs to be set up if an expression is given.\n        if (boundProp) {\n          targetBoundDirectivePropNames.add(boundProp.name);\n          if (!isEmptyExpression(boundProp.expression)) {\n            targetBoundDirectiveProps.push(new t.BoundDirectivePropertyAst(\n                dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));\n          }\n        }\n      });\n    }\n  }\n\n  private _createElementPropertyAsts(\n      elementName: string, props: ParsedProperty[],\n      boundDirectivePropNames: Set<string>): t.BoundElementPropertyAst[] {\n    const boundElementProps: t.BoundElementPropertyAst[] = [];\n\n    props.forEach((prop: ParsedProperty) => {\n      if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {\n        const boundProp = this._bindingParser.createBoundElementProperty(elementName, prop);\n        boundElementProps.push(t.BoundElementPropertyAst.fromBoundProperty(boundProp));\n      }\n    });\n    return this._checkPropertiesInSchema(elementName, boundElementProps);\n  }\n\n  private _findComponentDirectives(directives: t.DirectiveAst[]): t.DirectiveAst[] {\n    return directives.filter(directive => directive.directive.isComponent);\n  }\n\n  private _findComponentDirectiveNames(directives: t.DirectiveAst[]): string[] {\n    return this._findComponentDirectives(directives)\n        .map(directive => identifierName(directive.directive.type) !);\n  }\n\n  private _assertOnlyOneComponent(directives: t.DirectiveAst[], sourceSpan: ParseSourceSpan) {\n    const componentTypeNames = this._findComponentDirectiveNames(directives);\n    if (componentTypeNames.length > 1) {\n      this._reportError(\n          `More than one component matched on this element.\\n` +\n              `Make sure that only one component's selector can match a given element.\\n` +\n              `Conflicting components: ${componentTypeNames.join(',')}`,\n          sourceSpan);\n    }\n  }\n\n  /**\n   * Make sure that non-angular tags conform to the schemas.\n   *\n   * Note: An element is considered an angular tag when at least one directive selector matches the\n   * tag name.\n   *\n   * @param matchElement Whether any directive has matched on the tag name\n   * @param element the html element\n   */\n  private _assertElementExists(matchElement: boolean, element: html.Element) {\n    const elName = element.name.replace(/^:xhtml:/, '');\n\n    if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {\n      let errorMsg = `'${elName}' is not a known element:\\n`;\n      errorMsg +=\n          `1. If '${elName}' is an Angular component, then verify that it is part of this module.\\n`;\n      if (elName.indexOf('-') > -1) {\n        errorMsg +=\n            `2. If '${elName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`;\n      } else {\n        errorMsg +=\n            `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n      }\n      this._reportError(errorMsg, element.sourceSpan !);\n    }\n  }\n\n  private _assertNoComponentsNorElementBindingsOnTemplate(\n      directives: t.DirectiveAst[], elementProps: t.BoundElementPropertyAst[],\n      sourceSpan: ParseSourceSpan) {\n    const componentTypeNames: string[] = this._findComponentDirectiveNames(directives);\n    if (componentTypeNames.length > 0) {\n      this._reportError(\n          `Components on an embedded template: ${componentTypeNames.join(',')}`, sourceSpan);\n    }\n    elementProps.forEach(prop => {\n      this._reportError(\n          `Property binding ${prop.name} not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the \"@NgModule.declarations\".`,\n          sourceSpan);\n    });\n  }\n\n  private _assertAllEventsPublishedByDirectives(\n      directives: t.DirectiveAst[], events: t.BoundEventAst[]) {\n    const allDirectiveEvents = new Set<string>();\n\n    directives.forEach(directive => {\n      Object.keys(directive.directive.outputs).forEach(k => {\n        const eventName = directive.directive.outputs[k];\n        allDirectiveEvents.add(eventName);\n      });\n    });\n\n    events.forEach(event => {\n      if (event.target != null || !allDirectiveEvents.has(event.name)) {\n        this._reportError(\n            `Event binding ${event.fullName} not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the \"@NgModule.declarations\".`,\n            event.sourceSpan);\n      }\n    });\n  }\n\n  private _checkPropertiesInSchema(elementName: string, boundProps: t.BoundElementPropertyAst[]):\n      t.BoundElementPropertyAst[] {\n    // Note: We can't filter out empty expressions before this method,\n    // as we still want to validate them!\n    return boundProps.filter((boundProp) => {\n      if (boundProp.type === t.PropertyBindingType.Property &&\n          !this._schemaRegistry.hasProperty(elementName, boundProp.name, this._schemas)) {\n        let errorMsg =\n            `Can't bind to '${boundProp.name}' since it isn't a known property of '${elementName}'.`;\n        if (elementName.startsWith('ng-')) {\n          errorMsg +=\n              `\\n1. If '${boundProp.name}' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.` +\n              `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n        } else if (elementName.indexOf('-') > -1) {\n          errorMsg +=\n              `\\n1. If '${elementName}' is an Angular component and it has '${boundProp.name}' input, then verify that it is part of this module.` +\n              `\\n2. If '${elementName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.` +\n              `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n        }\n        this._reportError(errorMsg, boundProp.sourceSpan);\n      }\n      return !isEmptyExpression(boundProp.value);\n    });\n  }\n\n  private _reportError(\n      message: string, sourceSpan: ParseSourceSpan,\n      level: ParseErrorLevel = ParseErrorLevel.ERROR) {\n    this._targetErrors.push(new ParseError(sourceSpan, message, level));\n  }\n}\n\nclass NonBindableVisitor implements html.Visitor {\n  visitElement(ast: html.Element, parent: ElementContext): t.ElementAst|null {\n    const preparsedElement = preparseElement(ast);\n    if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n        preparsedElement.type === PreparsedElementType.STYLE ||\n        preparsedElement.type === PreparsedElementType.STYLESHEET) {\n      // Skipping <script> for security reasons\n      // Skipping <style> and stylesheets as we already processed them\n      // in the StyleCompiler\n      return null;\n    }\n\n    const attrNameAndValues = ast.attrs.map((attr): [string, string] => [attr.name, attr.value]);\n    const selector = createElementCssSelector(ast.name, attrNameAndValues);\n    const ngContentIndex = parent.findNgContentIndex(selector);\n    const children: t.TemplateAst[] = html.visitAll(this, ast.children, EMPTY_ELEMENT_CONTEXT);\n    return new t.ElementAst(\n        ast.name, html.visitAll(this, ast.attrs), [], [], [], [], [], false, [], children,\n        ngContentIndex, ast.sourceSpan, ast.endSourceSpan);\n  }\n  visitComment(comment: html.Comment, context: any): any { return null; }\n\n  visitAttribute(attribute: html.Attribute, context: any): t.AttrAst {\n    return new t.AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n  }\n\n  visitText(text: html.Text, parent: ElementContext): t.TextAst {\n    const ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR()) !;\n    return new t.TextAst(text.value, ngContentIndex, text.sourceSpan !);\n  }\n\n  visitExpansion(expansion: html.Expansion, context: any): any { return expansion; }\n\n  visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any { return expansionCase; }\n}\n\n/**\n * A reference to an element or directive in a template. E.g., the reference in this template:\n *\n * <div #myMenu=\"coolMenu\">\n *\n * would be {name: 'myMenu', value: 'coolMenu', sourceSpan: ...}\n */\nclass ElementOrDirectiveRef {\n  constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {}\n\n  /** Gets whether this is a reference to the given directive. */\n  isReferenceToDirective(directive: CompileDirectiveSummary) {\n    return splitExportAs(directive.exportAs).indexOf(this.value) !== -1;\n  }\n}\n\n/** Splits a raw, potentially comma-delimited `exportAs` value into an array of names. */\nfunction splitExportAs(exportAs: string | null): string[] {\n  return exportAs ? exportAs.split(',').map(e => e.trim()) : [];\n}\n\nexport function splitClasses(classAttrValue: string): string[] {\n  return classAttrValue.trim().split(/\\s+/g);\n}\n\nclass ElementContext {\n  static create(\n      isTemplateElement: boolean, directives: t.DirectiveAst[],\n      providerContext: ProviderElementContext): ElementContext {\n    const matcher = new SelectorMatcher();\n    let wildcardNgContentIndex: number = null !;\n    const component = directives.find(directive => directive.directive.isComponent);\n    if (component) {\n      const ngContentSelectors = component.directive.template !.ngContentSelectors;\n      for (let i = 0; i < ngContentSelectors.length; i++) {\n        const selector = ngContentSelectors[i];\n        if (selector === '*') {\n          wildcardNgContentIndex = i;\n        } else {\n          matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]), i);\n        }\n      }\n    }\n    return new ElementContext(isTemplateElement, matcher, wildcardNgContentIndex, providerContext);\n  }\n  constructor(\n      public isTemplateElement: boolean, private _ngContentIndexMatcher: SelectorMatcher,\n      private _wildcardNgContentIndex: number|null,\n      public providerContext: ProviderElementContext|null) {}\n\n  findNgContentIndex(selector: CssSelector): number|null {\n    const ngContentIndices: number[] = [];\n    this._ngContentIndexMatcher.match(\n        selector, (selector, ngContentIndex) => { ngContentIndices.push(ngContentIndex); });\n    ngContentIndices.sort();\n    if (this._wildcardNgContentIndex != null) {\n      ngContentIndices.push(this._wildcardNgContentIndex);\n    }\n    return ngContentIndices.length > 0 ? ngContentIndices[0] : null;\n  }\n}\n\nexport function createElementCssSelector(\n    elementName: string, attributes: [string, string][]): CssSelector {\n  const cssSelector = new CssSelector();\n  const elNameNoNs = splitNsName(elementName)[1];\n\n  cssSelector.setElement(elNameNoNs);\n\n  for (let i = 0; i < attributes.length; i++) {\n    const attrName = attributes[i][0];\n    const attrNameNoNs = splitNsName(attrName)[1];\n    const attrValue = attributes[i][1];\n\n    cssSelector.addAttribute(attrNameNoNs, attrValue);\n    if (attrName.toLowerCase() == CLASS_ATTR) {\n      const classes = splitClasses(attrValue);\n      classes.forEach(className => cssSelector.addClassName(className));\n    }\n  }\n  return cssSelector;\n}\n\nconst EMPTY_ELEMENT_CONTEXT = new ElementContext(true, new SelectorMatcher(), null, null);\nconst NON_BINDABLE_VISITOR = new NonBindableVisitor();\n\nfunction _isEmptyTextNode(node: html.Node): boolean {\n  return node instanceof html.Text && node.value.trim().length == 0;\n}\n\nexport function removeSummaryDuplicates<T extends{type: CompileTypeMetadata}>(items: T[]): T[] {\n  const map = new Map<any, T>();\n\n  items.forEach((item) => {\n    if (!map.get(item.type.reference)) {\n      map.set(item.type.reference, item);\n    }\n  });\n\n  return Array.from(map.values());\n}\n\nexport function isEmptyExpression(ast: AST): boolean {\n  if (ast instanceof ASTWithSource) {\n    ast = ast.ast;\n  }\n  return ast instanceof EmptyExpr;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst enum Char {\n  OpenParen = 40,\n  CloseParen = 41,\n  Colon = 58,\n  Semicolon = 59,\n  BackSlash = 92,\n  QuoteNone = 0,  // indicating we are not inside a quote\n  QuoteDouble = 34,\n  QuoteSingle = 39,\n}\n\n\n/**\n * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n *   Example: `color: red; height: auto`.\n * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',\n * 'auto']`\n */\nexport function parse(value: string): string[] {\n  // we use a string array here instead of a string map\n  // because a string-map is not guaranteed to retain the\n  // order of the entries whereas a string array can be\n  // construted in a [key, value, key, value] format.\n  const styles: string[] = [];\n\n  let i = 0;\n  let parenDepth = 0;\n  let quote: Char = Char.QuoteNone;\n  let valueStart = 0;\n  let propStart = 0;\n  let currentProp: string|null = null;\n  let valueHasQuotes = false;\n  while (i < value.length) {\n    const token = value.charCodeAt(i++) as Char;\n    switch (token) {\n      case Char.OpenParen:\n        parenDepth++;\n        break;\n      case Char.CloseParen:\n        parenDepth--;\n        break;\n      case Char.QuoteSingle:\n        // valueStart needs to be there since prop values don't\n        // have quotes in CSS\n        valueHasQuotes = valueHasQuotes || valueStart > 0;\n        if (quote === Char.QuoteNone) {\n          quote = Char.QuoteSingle;\n        } else if (quote === Char.QuoteSingle && value.charCodeAt(i - 1) !== Char.BackSlash) {\n          quote = Char.QuoteNone;\n        }\n        break;\n      case Char.QuoteDouble:\n        // same logic as above\n        valueHasQuotes = valueHasQuotes || valueStart > 0;\n        if (quote === Char.QuoteNone) {\n          quote = Char.QuoteDouble;\n        } else if (quote === Char.QuoteDouble && value.charCodeAt(i - 1) !== Char.BackSlash) {\n          quote = Char.QuoteNone;\n        }\n        break;\n      case Char.Colon:\n        if (!currentProp && parenDepth === 0 && quote === Char.QuoteNone) {\n          currentProp = hyphenate(value.substring(propStart, i - 1).trim());\n          valueStart = i;\n        }\n        break;\n      case Char.Semicolon:\n        if (currentProp && valueStart > 0 && parenDepth === 0 && quote === Char.QuoteNone) {\n          const styleVal = value.substring(valueStart, i - 1).trim();\n          styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);\n          propStart = i;\n          valueStart = 0;\n          currentProp = null;\n          valueHasQuotes = false;\n        }\n        break;\n    }\n  }\n\n  if (currentProp && valueStart) {\n    const styleVal = value.substr(valueStart).trim();\n    styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);\n  }\n\n  return styles;\n}\n\nexport function stripUnnecessaryQuotes(value: string): string {\n  const qS = value.charCodeAt(0);\n  const qE = value.charCodeAt(value.length - 1);\n  if (qS == qE && (qS == Char.QuoteSingle || qS == Char.QuoteDouble)) {\n    const tempValue = value.substring(1, value.length - 1);\n    // special case to avoid using a multi-quoted string that was just chomped\n    // (e.g. `font-family: \"Verdana\", \"sans-serif\"`)\n    if (tempValue.indexOf('\\'') == -1 && tempValue.indexOf('\"') == -1) {\n      value = tempValue;\n    }\n  }\n  return value;\n}\n\nexport function hyphenate(value: string): string {\n  return value.replace(/[a-z][A-Z]/g, v => {\n                return v.charAt(0) + '-' + v.charAt(1);\n              }).toLowerCase();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ConstantPool} from '../../constant_pool';\nimport {AttributeMarker} from '../../core';\nimport {AST, BindingType, Interpolation} from '../../expression_parser/ast';\nimport * as o from '../../output/output_ast';\nimport {ParseSourceSpan} from '../../parse_util';\nimport {isEmptyExpression} from '../../template_parser/template_parser';\nimport {error} from '../../util';\nimport * as t from '../r3_ast';\nimport {Identifiers as R3} from '../r3_identifiers';\n\nimport {hyphenate, parse as parseStyle} from './style_parser';\nimport {ValueConverter} from './template';\nimport {getInterpolationArgsLength} from './util';\n\nconst IMPORTANT_FLAG = '!important';\n\n/**\n * A styling expression summary that is to be processed by the compiler\n */\nexport interface StylingInstruction {\n  sourceSpan: ParseSourceSpan|null;\n  reference: o.ExternalReference;\n  allocateBindingSlots: number;\n  supportsInterpolation?: boolean;\n  params: ((convertFn: (value: any) => o.Expression | o.Expression[]) => o.Expression[]);\n}\n\n/**\n * An internal record of the input data for a styling binding\n */\ninterface BoundStylingEntry {\n  hasOverrideFlag: boolean;\n  name: string|null;\n  unit: string|null;\n  sourceSpan: ParseSourceSpan;\n  value: AST;\n}\n\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * It also produces the creation instruction to register all initial styling values\n * (which are all the static class=\"...\" and style=\"...\" attribute values that exist\n * on an element within a template).\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n *   styling(...)\n * }\n * if (updateMode) {\n *   styleMap(...)\n *   classMap(...)\n *   styleProp(...)\n *   classProp(...)\n *   stylingApply(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\nexport class StylingBuilder {\n  /** Whether or not there are any static styling values present */\n  private _hasInitialValues = false;\n  /**\n   *  Whether or not there are any styling bindings present\n   *  (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)\n   */\n  public hasBindings = false;\n\n  /** the input for [class] (if it exists) */\n  private _classMapInput: BoundStylingEntry|null = null;\n  /** the input for [style] (if it exists) */\n  private _styleMapInput: BoundStylingEntry|null = null;\n  /** an array of each [style.prop] input */\n  private _singleStyleInputs: BoundStylingEntry[]|null = null;\n  /** an array of each [class.name] input */\n  private _singleClassInputs: BoundStylingEntry[]|null = null;\n  private _lastStylingInput: BoundStylingEntry|null = null;\n  private _firstStylingInput: BoundStylingEntry|null = null;\n\n  // maps are used instead of hash maps because a Map will\n  // retain the ordering of the keys\n\n  /**\n   * Represents the location of each style binding in the template\n   * (e.g. `<div [style.width]=\"w\" [style.height]=\"h\">` implies\n   * that `width=0` and `height=1`)\n   */\n  private _stylesIndex = new Map<string, number>();\n\n  /**\n   * Represents the location of each class binding in the template\n   * (e.g. `<div [class.big]=\"b\" [class.hidden]=\"h\">` implies\n   * that `big=0` and `hidden=1`)\n   */\n  private _classesIndex = new Map<string, number>();\n  private _initialStyleValues: string[] = [];\n  private _initialClassValues: string[] = [];\n\n  // certain style properties ALWAYS need sanitization\n  // this is checked each time new styles are encountered\n  private _useDefaultSanitizer = false;\n\n  constructor(private _elementIndexExpr: o.Expression, private _directiveExpr: o.Expression|null) {}\n\n  /**\n   * Registers a given input to the styling builder to be later used when producing AOT code.\n   *\n   * The code below will only accept the input if it is somehow tied to styling (whether it be\n   * style/class bindings or static style/class attributes).\n   */\n  registerBoundInput(input: t.BoundAttribute): boolean {\n    // [attr.style] or [attr.class] are skipped in the code below,\n    // they should not be treated as styling-based bindings since\n    // they are intended to be written directly to the attr and\n    // will therefore skip all style/class resolution that is present\n    // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n    // [class.prop]=\"\". [class]=\"\" assignments\n    let binding: BoundStylingEntry|null = null;\n    let name = input.name;\n    switch (input.type) {\n      case BindingType.Property:\n        binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);\n        break;\n      case BindingType.Style:\n        binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);\n        break;\n      case BindingType.Class:\n        binding = this.registerClassInput(name, false, input.value, input.sourceSpan);\n        break;\n    }\n    return binding ? true : false;\n  }\n\n  registerInputBasedOnName(name: string, expression: AST, sourceSpan: ParseSourceSpan) {\n    let binding: BoundStylingEntry|null = null;\n    const nameToMatch = name.substring(0, 5);  // class | style\n    const isStyle = nameToMatch === 'style';\n    const isClass = isStyle ? false : (nameToMatch === 'class');\n    if (isStyle || isClass) {\n      const isMapBased = name.charAt(5) !== '.';         // style.prop or class.prop makes this a no\n      const property = name.substr(isMapBased ? 5 : 6);  // the dot explains why there's a +1\n      if (isStyle) {\n        binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);\n      } else {\n        binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);\n      }\n    }\n    return binding;\n  }\n\n  registerStyleInput(\n      name: string, isMapBased: boolean, value: AST, sourceSpan: ParseSourceSpan,\n      unit?: string|null): BoundStylingEntry|null {\n    if (isEmptyExpression(value)) {\n      return null;\n    }\n    name = normalizePropName(name);\n    const {property, hasOverrideFlag, unit: bindingUnit} = parseProperty(name);\n    const entry: BoundStylingEntry = {\n      name: property,\n      unit: unit || bindingUnit, value, sourceSpan, hasOverrideFlag\n    };\n    if (isMapBased) {\n      this._useDefaultSanitizer = true;\n      this._styleMapInput = entry;\n    } else {\n      (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n      this._useDefaultSanitizer = this._useDefaultSanitizer || isStyleSanitizable(name);\n      registerIntoMap(this._stylesIndex, property);\n    }\n    this._lastStylingInput = entry;\n    this._firstStylingInput = this._firstStylingInput || entry;\n    this.hasBindings = true;\n    return entry;\n  }\n\n  registerClassInput(name: string, isMapBased: boolean, value: AST, sourceSpan: ParseSourceSpan):\n      BoundStylingEntry|null {\n    if (isEmptyExpression(value)) {\n      return null;\n    }\n    const {property, hasOverrideFlag} = parseProperty(name);\n    const entry:\n        BoundStylingEntry = {name: property, value, sourceSpan, hasOverrideFlag, unit: null};\n    if (isMapBased) {\n      this._classMapInput = entry;\n    } else {\n      (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n      registerIntoMap(this._classesIndex, property);\n    }\n    this._lastStylingInput = entry;\n    this._firstStylingInput = this._firstStylingInput || entry;\n    this.hasBindings = true;\n    return entry;\n  }\n\n  /**\n   * Registers the element's static style string value to the builder.\n   *\n   * @param value the style string (e.g. `width:100px; height:200px;`)\n   */\n  registerStyleAttr(value: string) {\n    this._initialStyleValues = parseStyle(value);\n    this._hasInitialValues = true;\n  }\n\n  /**\n   * Registers the element's static class string value to the builder.\n   *\n   * @param value the className string (e.g. `disabled gold zoom`)\n   */\n  registerClassAttr(value: string) {\n    this._initialClassValues = value.trim().split(/\\s+/g);\n    this._hasInitialValues = true;\n  }\n\n  /**\n   * Appends all styling-related expressions to the provided attrs array.\n   *\n   * @param attrs an existing array where each of the styling expressions\n   * will be inserted into.\n   */\n  populateInitialStylingAttrs(attrs: o.Expression[]): void {\n    // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]\n    if (this._initialClassValues.length) {\n      attrs.push(o.literal(AttributeMarker.Classes));\n      for (let i = 0; i < this._initialClassValues.length; i++) {\n        attrs.push(o.literal(this._initialClassValues[i]));\n      }\n    }\n\n    // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]\n    if (this._initialStyleValues.length) {\n      attrs.push(o.literal(AttributeMarker.Styles));\n      for (let i = 0; i < this._initialStyleValues.length; i += 2) {\n        attrs.push(\n            o.literal(this._initialStyleValues[i]), o.literal(this._initialStyleValues[i + 1]));\n      }\n    }\n  }\n\n  /**\n   * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.\n   *\n   * The instruction generation code below is used for producing the AOT statement code which is\n   * responsible for registering initial styles (within a directive hostBindings' creation block),\n   * as well as any of the provided attribute values, to the directive host element.\n   */\n  buildHostAttrsInstruction(\n      sourceSpan: ParseSourceSpan|null, attrs: o.Expression[],\n      constantPool: ConstantPool): StylingInstruction|null {\n    if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {\n      return {\n        sourceSpan,\n        reference: R3.elementHostAttrs,\n        allocateBindingSlots: 0,\n        params: () => {\n          // params => elementHostAttrs(attrs)\n          this.populateInitialStylingAttrs(attrs);\n          const attrArray = !attrs.some(attr => attr instanceof o.WrappedNodeExpr) ?\n              getConstantLiteralFromArray(constantPool, attrs) :\n              o.literalArr(attrs);\n          return [attrArray];\n        }\n      };\n    }\n    return null;\n  }\n\n  /**\n   * Builds an instruction with all the expressions and parameters for `styling`.\n   *\n   * The instruction generation code below is used for producing the AOT statement code which is\n   * responsible for registering style/class bindings to an element.\n   */\n  buildStylingInstruction(sourceSpan: ParseSourceSpan|null, constantPool: ConstantPool):\n      StylingInstruction|null {\n    if (this.hasBindings) {\n      return {\n        sourceSpan,\n        allocateBindingSlots: 0,\n        reference: R3.styling,\n        params: () => [],\n      };\n    }\n    return null;\n  }\n\n  /**\n   * Builds an instruction with all the expressions and parameters for `classMap`.\n   *\n   * The instruction data will contain all expressions for `classMap` to function\n   * which includes the `[class]` expression params.\n   */\n  buildClassMapInstruction(valueConverter: ValueConverter): StylingInstruction|null {\n    if (this._classMapInput) {\n      return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);\n    }\n    return null;\n  }\n\n  /**\n   * Builds an instruction with all the expressions and parameters for `styleMap`.\n   *\n   * The instruction data will contain all expressions for `styleMap` to function\n   * which includes the `[style]` expression params.\n   */\n  buildStyleMapInstruction(valueConverter: ValueConverter): StylingInstruction|null {\n    if (this._styleMapInput) {\n      return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);\n    }\n    return null;\n  }\n\n  private _buildMapBasedInstruction(\n      valueConverter: ValueConverter, isClassBased: boolean,\n      stylingInput: BoundStylingEntry): StylingInstruction {\n    // each styling binding value is stored in the LView\n    let totalBindingSlotsRequired = 1;\n\n    // these values must be outside of the update block so that they can\n    // be evaluated (the AST visit call) during creation time so that any\n    // pipes can be picked up in time before the template is built\n    const mapValue = stylingInput.value.visit(valueConverter);\n    let reference: o.ExternalReference;\n    if (mapValue instanceof Interpolation && isClassBased) {\n      totalBindingSlotsRequired += mapValue.expressions.length;\n      reference = getClassMapInterpolationExpression(mapValue);\n    } else {\n      reference = isClassBased ? R3.classMap : R3.styleMap;\n    }\n\n    return {\n      sourceSpan: stylingInput.sourceSpan,\n      reference,\n      allocateBindingSlots: totalBindingSlotsRequired,\n      supportsInterpolation: isClassBased,\n      params: (convertFn: (value: any) => o.Expression | o.Expression[]) => {\n        const convertResult = convertFn(mapValue);\n        return Array.isArray(convertResult) ? convertResult : [convertResult];\n      }\n    };\n  }\n\n  private _buildSingleInputs(\n      reference: o.ExternalReference, inputs: BoundStylingEntry[], mapIndex: Map<string, number>,\n      allowUnits: boolean, valueConverter: ValueConverter,\n      getInterpolationExpressionFn?: (value: Interpolation) => o.ExternalReference):\n      StylingInstruction[] {\n    let totalBindingSlotsRequired = 0;\n    return inputs.map(input => {\n      const value = input.value.visit(valueConverter);\n\n      // each styling binding value is stored in the LView\n      let totalBindingSlotsRequired = 1;\n\n      if (value instanceof Interpolation) {\n        totalBindingSlotsRequired += value.expressions.length;\n\n        if (getInterpolationExpressionFn) {\n          reference = getInterpolationExpressionFn(value);\n        }\n      }\n\n      return {\n        sourceSpan: input.sourceSpan,\n        supportsInterpolation: !!getInterpolationExpressionFn,\n        allocateBindingSlots: totalBindingSlotsRequired, reference,\n        params: (convertFn: (value: any) => o.Expression | o.Expression[]) => {\n          // params => stylingProp(propName, value)\n          const params: o.Expression[] = [];\n          params.push(o.literal(input.name));\n\n          const convertResult = convertFn(value);\n          if (Array.isArray(convertResult)) {\n            params.push(...convertResult);\n          } else {\n            params.push(convertResult);\n          }\n\n          if (allowUnits && input.unit) {\n            params.push(o.literal(input.unit));\n          }\n\n          return params;\n        }\n      };\n    });\n  }\n\n  private _buildClassInputs(valueConverter: ValueConverter): StylingInstruction[] {\n    if (this._singleClassInputs) {\n      return this._buildSingleInputs(\n          R3.classProp, this._singleClassInputs, this._classesIndex, false, valueConverter);\n    }\n    return [];\n  }\n\n  private _buildStyleInputs(valueConverter: ValueConverter): StylingInstruction[] {\n    if (this._singleStyleInputs) {\n      return this._buildSingleInputs(\n          R3.styleProp, this._singleStyleInputs, this._stylesIndex, true, valueConverter,\n          getStylePropInterpolationExpression);\n    }\n    return [];\n  }\n\n  private _buildApplyFn(): StylingInstruction {\n    return {\n      sourceSpan: this._lastStylingInput ? this._lastStylingInput.sourceSpan : null,\n      reference: R3.stylingApply,\n      allocateBindingSlots: 0,\n      params: () => { return []; }\n    };\n  }\n\n  private _buildSanitizerFn(): StylingInstruction {\n    return {\n      sourceSpan: this._firstStylingInput ? this._firstStylingInput.sourceSpan : null,\n      reference: R3.styleSanitizer,\n      allocateBindingSlots: 0,\n      params: () => [o.importExpr(R3.defaultStyleSanitizer)]\n    };\n  }\n\n  /**\n   * Constructs all instructions which contain the expressions that will be placed\n   * into the update block of a template function or a directive hostBindings function.\n   */\n  buildUpdateLevelInstructions(valueConverter: ValueConverter) {\n    const instructions: StylingInstruction[] = [];\n    if (this.hasBindings) {\n      if (this._useDefaultSanitizer) {\n        instructions.push(this._buildSanitizerFn());\n      }\n      const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);\n      if (styleMapInstruction) {\n        instructions.push(styleMapInstruction);\n      }\n      const classMapInstruction = this.buildClassMapInstruction(valueConverter);\n      if (classMapInstruction) {\n        instructions.push(classMapInstruction);\n      }\n      instructions.push(...this._buildStyleInputs(valueConverter));\n      instructions.push(...this._buildClassInputs(valueConverter));\n      instructions.push(this._buildApplyFn());\n    }\n    return instructions;\n  }\n}\n\nfunction registerIntoMap(map: Map<string, number>, key: string) {\n  if (!map.has(key)) {\n    map.set(key, map.size);\n  }\n}\n\nfunction isStyleSanitizable(prop: string): boolean {\n  // Note that browsers support both the dash case and\n  // camel case property names when setting through JS.\n  return prop === 'background-image' || prop === 'backgroundImage' || prop === 'background' ||\n      prop === 'border-image' || prop === 'borderImage' || prop === 'filter' ||\n      prop === 'list-style' || prop === 'listStyle' || prop === 'list-style-image' ||\n      prop === 'listStyleImage' || prop === 'clip-path' || prop === 'clipPath';\n}\n\n/**\n * Simple helper function to either provide the constant literal that will house the value\n * here or a null value if the provided values are empty.\n */\nfunction getConstantLiteralFromArray(\n    constantPool: ConstantPool, values: o.Expression[]): o.Expression {\n  return values.length ? constantPool.getConstLiteral(o.literalArr(values), true) : o.NULL_EXPR;\n}\n\n/**\n * Simple helper function that adds a parameter or does nothing at all depending on the provided\n * predicate and totalExpectedArgs values\n */\nfunction addParam(\n    params: o.Expression[], predicate: any, value: o.Expression | null, argNumber: number,\n    totalExpectedArgs: number) {\n  if (predicate && value) {\n    params.push(value);\n  } else if (argNumber < totalExpectedArgs) {\n    params.push(o.NULL_EXPR);\n  }\n}\n\nexport function parseProperty(name: string):\n    {property: string, unit: string, hasOverrideFlag: boolean} {\n  let hasOverrideFlag = false;\n  const overrideIndex = name.indexOf(IMPORTANT_FLAG);\n  if (overrideIndex !== -1) {\n    name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';\n    hasOverrideFlag = true;\n  }\n\n  let unit = '';\n  let property = name;\n  const unitIndex = name.lastIndexOf('.');\n  if (unitIndex > 0) {\n    unit = name.substr(unitIndex + 1);\n    property = name.substring(0, unitIndex);\n  }\n\n  return {property, unit, hasOverrideFlag};\n}\n\n/**\n * Gets the instruction to generate for an interpolated class map.\n * @param interpolation An Interpolation AST\n */\nfunction getClassMapInterpolationExpression(interpolation: Interpolation): o.ExternalReference {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return R3.classMap;\n    case 3:\n      return R3.classMapInterpolate1;\n    case 5:\n      return R3.classMapInterpolate2;\n    case 7:\n      return R3.classMapInterpolate3;\n    case 9:\n      return R3.classMapInterpolate4;\n    case 11:\n      return R3.classMapInterpolate5;\n    case 13:\n      return R3.classMapInterpolate6;\n    case 15:\n      return R3.classMapInterpolate7;\n    case 17:\n      return R3.classMapInterpolate8;\n    default:\n      return R3.classMapInterpolateV;\n  }\n}\n\n/**\n * Gets the instruction to generate for an interpolated style prop.\n * @param interpolation An Interpolation AST\n */\nfunction getStylePropInterpolationExpression(interpolation: Interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return R3.styleProp;\n    case 3:\n      return R3.stylePropInterpolate1;\n    case 5:\n      return R3.stylePropInterpolate2;\n    case 7:\n      return R3.stylePropInterpolate3;\n    case 9:\n      return R3.stylePropInterpolate4;\n    case 11:\n      return R3.stylePropInterpolate5;\n    case 13:\n      return R3.stylePropInterpolate6;\n    case 15:\n      return R3.stylePropInterpolate7;\n    case 17:\n      return R3.stylePropInterpolate8;\n    default:\n      return R3.stylePropInterpolateV;\n  }\n}\n\nfunction normalizePropName(prop: string): string {\n  return hyphenate(prop);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as chars from '../chars';\n\nexport enum TokenType {\n  Character,\n  Identifier,\n  Keyword,\n  String,\n  Operator,\n  Number,\n  Error\n}\n\nconst KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\n\nexport class Lexer {\n  tokenize(text: string): Token[] {\n    const scanner = new _Scanner(text);\n    const tokens: Token[] = [];\n    let token = scanner.scanToken();\n    while (token != null) {\n      tokens.push(token);\n      token = scanner.scanToken();\n    }\n    return tokens;\n  }\n}\n\nexport class Token {\n  constructor(\n      public index: number, public type: TokenType, public numValue: number,\n      public strValue: string) {}\n\n  isCharacter(code: number): boolean {\n    return this.type == TokenType.Character && this.numValue == code;\n  }\n\n  isNumber(): boolean { return this.type == TokenType.Number; }\n\n  isString(): boolean { return this.type == TokenType.String; }\n\n  isOperator(operator: string): boolean {\n    return this.type == TokenType.Operator && this.strValue == operator;\n  }\n\n  isIdentifier(): boolean { return this.type == TokenType.Identifier; }\n\n  isKeyword(): boolean { return this.type == TokenType.Keyword; }\n\n  isKeywordLet(): boolean { return this.type == TokenType.Keyword && this.strValue == 'let'; }\n\n  isKeywordAs(): boolean { return this.type == TokenType.Keyword && this.strValue == 'as'; }\n\n  isKeywordNull(): boolean { return this.type == TokenType.Keyword && this.strValue == 'null'; }\n\n  isKeywordUndefined(): boolean {\n    return this.type == TokenType.Keyword && this.strValue == 'undefined';\n  }\n\n  isKeywordTrue(): boolean { return this.type == TokenType.Keyword && this.strValue == 'true'; }\n\n  isKeywordFalse(): boolean { return this.type == TokenType.Keyword && this.strValue == 'false'; }\n\n  isKeywordThis(): boolean { return this.type == TokenType.Keyword && this.strValue == 'this'; }\n\n  isError(): boolean { return this.type == TokenType.Error; }\n\n  toNumber(): number { return this.type == TokenType.Number ? this.numValue : -1; }\n\n  toString(): string|null {\n    switch (this.type) {\n      case TokenType.Character:\n      case TokenType.Identifier:\n      case TokenType.Keyword:\n      case TokenType.Operator:\n      case TokenType.String:\n      case TokenType.Error:\n        return this.strValue;\n      case TokenType.Number:\n        return this.numValue.toString();\n      default:\n        return null;\n    }\n  }\n}\n\nfunction newCharacterToken(index: number, code: number): Token {\n  return new Token(index, TokenType.Character, code, String.fromCharCode(code));\n}\n\nfunction newIdentifierToken(index: number, text: string): Token {\n  return new Token(index, TokenType.Identifier, 0, text);\n}\n\nfunction newKeywordToken(index: number, text: string): Token {\n  return new Token(index, TokenType.Keyword, 0, text);\n}\n\nfunction newOperatorToken(index: number, text: string): Token {\n  return new Token(index, TokenType.Operator, 0, text);\n}\n\nfunction newStringToken(index: number, text: string): Token {\n  return new Token(index, TokenType.String, 0, text);\n}\n\nfunction newNumberToken(index: number, n: number): Token {\n  return new Token(index, TokenType.Number, n, '');\n}\n\nfunction newErrorToken(index: number, message: string): Token {\n  return new Token(index, TokenType.Error, 0, message);\n}\n\nexport const EOF: Token = new Token(-1, TokenType.Character, 0, '');\n\nclass _Scanner {\n  length: number;\n  peek: number = 0;\n  index: number = -1;\n\n  constructor(public input: string) {\n    this.length = input.length;\n    this.advance();\n  }\n\n  advance() {\n    this.peek = ++this.index >= this.length ? chars.$EOF : this.input.charCodeAt(this.index);\n  }\n\n  scanToken(): Token|null {\n    const input = this.input, length = this.length;\n    let peek = this.peek, index = this.index;\n\n    // Skip whitespace.\n    while (peek <= chars.$SPACE) {\n      if (++index >= length) {\n        peek = chars.$EOF;\n        break;\n      } else {\n        peek = input.charCodeAt(index);\n      }\n    }\n\n    this.peek = peek;\n    this.index = index;\n\n    if (index >= length) {\n      return null;\n    }\n\n    // Handle identifiers and numbers.\n    if (isIdentifierStart(peek)) return this.scanIdentifier();\n    if (chars.isDigit(peek)) return this.scanNumber(index);\n\n    const start: number = index;\n    switch (peek) {\n      case chars.$PERIOD:\n        this.advance();\n        return chars.isDigit(this.peek) ? this.scanNumber(start) :\n                                          newCharacterToken(start, chars.$PERIOD);\n      case chars.$LPAREN:\n      case chars.$RPAREN:\n      case chars.$LBRACE:\n      case chars.$RBRACE:\n      case chars.$LBRACKET:\n      case chars.$RBRACKET:\n      case chars.$COMMA:\n      case chars.$COLON:\n      case chars.$SEMICOLON:\n        return this.scanCharacter(start, peek);\n      case chars.$SQ:\n      case chars.$DQ:\n        return this.scanString();\n      case chars.$HASH:\n      case chars.$PLUS:\n      case chars.$MINUS:\n      case chars.$STAR:\n      case chars.$SLASH:\n      case chars.$PERCENT:\n      case chars.$CARET:\n        return this.scanOperator(start, String.fromCharCode(peek));\n      case chars.$QUESTION:\n        return this.scanComplexOperator(start, '?', chars.$PERIOD, '.');\n      case chars.$LT:\n      case chars.$GT:\n        return this.scanComplexOperator(start, String.fromCharCode(peek), chars.$EQ, '=');\n      case chars.$BANG:\n      case chars.$EQ:\n        return this.scanComplexOperator(\n            start, String.fromCharCode(peek), chars.$EQ, '=', chars.$EQ, '=');\n      case chars.$AMPERSAND:\n        return this.scanComplexOperator(start, '&', chars.$AMPERSAND, '&');\n      case chars.$BAR:\n        return this.scanComplexOperator(start, '|', chars.$BAR, '|');\n      case chars.$NBSP:\n        while (chars.isWhitespace(this.peek)) this.advance();\n        return this.scanToken();\n    }\n\n    this.advance();\n    return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0);\n  }\n\n  scanCharacter(start: number, code: number): Token {\n    this.advance();\n    return newCharacterToken(start, code);\n  }\n\n\n  scanOperator(start: number, str: string): Token {\n    this.advance();\n    return newOperatorToken(start, str);\n  }\n\n  /**\n   * Tokenize a 2/3 char long operator\n   *\n   * @param start start index in the expression\n   * @param one first symbol (always part of the operator)\n   * @param twoCode code point for the second symbol\n   * @param two second symbol (part of the operator when the second code point matches)\n   * @param threeCode code point for the third symbol\n   * @param three third symbol (part of the operator when provided and matches source expression)\n   */\n  scanComplexOperator(\n      start: number, one: string, twoCode: number, two: string, threeCode?: number,\n      three?: string): Token {\n    this.advance();\n    let str: string = one;\n    if (this.peek == twoCode) {\n      this.advance();\n      str += two;\n    }\n    if (threeCode != null && this.peek == threeCode) {\n      this.advance();\n      str += three;\n    }\n    return newOperatorToken(start, str);\n  }\n\n  scanIdentifier(): Token {\n    const start: number = this.index;\n    this.advance();\n    while (isIdentifierPart(this.peek)) this.advance();\n    const str: string = this.input.substring(start, this.index);\n    return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :\n                                        newIdentifierToken(start, str);\n  }\n\n  scanNumber(start: number): Token {\n    let simple: boolean = (this.index === start);\n    this.advance();  // Skip initial digit.\n    while (true) {\n      if (chars.isDigit(this.peek)) {\n        // Do nothing.\n      } else if (this.peek == chars.$PERIOD) {\n        simple = false;\n      } else if (isExponentStart(this.peek)) {\n        this.advance();\n        if (isExponentSign(this.peek)) this.advance();\n        if (!chars.isDigit(this.peek)) return this.error('Invalid exponent', -1);\n        simple = false;\n      } else {\n        break;\n      }\n      this.advance();\n    }\n    const str: string = this.input.substring(start, this.index);\n    const value: number = simple ? parseIntAutoRadix(str) : parseFloat(str);\n    return newNumberToken(start, value);\n  }\n\n  scanString(): Token {\n    const start: number = this.index;\n    const quote: number = this.peek;\n    this.advance();  // Skip initial quote.\n\n    let buffer: string = '';\n    let marker: number = this.index;\n    const input: string = this.input;\n\n    while (this.peek != quote) {\n      if (this.peek == chars.$BACKSLASH) {\n        buffer += input.substring(marker, this.index);\n        this.advance();\n        let unescapedCode: number;\n        // Workaround for TS2.1-introduced type strictness\n        this.peek = this.peek;\n        if (this.peek == chars.$u) {\n          // 4 character hex code for unicode character.\n          const hex: string = input.substring(this.index + 1, this.index + 5);\n          if (/^[0-9a-f]+$/i.test(hex)) {\n            unescapedCode = parseInt(hex, 16);\n          } else {\n            return this.error(`Invalid unicode escape [\\\\u${hex}]`, 0);\n          }\n          for (let i: number = 0; i < 5; i++) {\n            this.advance();\n          }\n        } else {\n          unescapedCode = unescape(this.peek);\n          this.advance();\n        }\n        buffer += String.fromCharCode(unescapedCode);\n        marker = this.index;\n      } else if (this.peek == chars.$EOF) {\n        return this.error('Unterminated quote', 0);\n      } else {\n        this.advance();\n      }\n    }\n\n    const last: string = input.substring(marker, this.index);\n    this.advance();  // Skip terminating quote.\n\n    return newStringToken(start, buffer + last);\n  }\n\n  error(message: string, offset: number): Token {\n    const position: number = this.index + offset;\n    return newErrorToken(\n        position, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`);\n  }\n}\n\nfunction isIdentifierStart(code: number): boolean {\n  return (chars.$a <= code && code <= chars.$z) || (chars.$A <= code && code <= chars.$Z) ||\n      (code == chars.$_) || (code == chars.$$);\n}\n\nexport function isIdentifier(input: string): boolean {\n  if (input.length == 0) return false;\n  const scanner = new _Scanner(input);\n  if (!isIdentifierStart(scanner.peek)) return false;\n  scanner.advance();\n  while (scanner.peek !== chars.$EOF) {\n    if (!isIdentifierPart(scanner.peek)) return false;\n    scanner.advance();\n  }\n  return true;\n}\n\nfunction isIdentifierPart(code: number): boolean {\n  return chars.isAsciiLetter(code) || chars.isDigit(code) || (code == chars.$_) ||\n      (code == chars.$$);\n}\n\nfunction isExponentStart(code: number): boolean {\n  return code == chars.$e || code == chars.$E;\n}\n\nfunction isExponentSign(code: number): boolean {\n  return code == chars.$MINUS || code == chars.$PLUS;\n}\n\nexport function isQuote(code: number): boolean {\n  return code === chars.$SQ || code === chars.$DQ || code === chars.$BT;\n}\n\nfunction unescape(code: number): number {\n  switch (code) {\n    case chars.$n:\n      return chars.$LF;\n    case chars.$f:\n      return chars.$FF;\n    case chars.$r:\n      return chars.$CR;\n    case chars.$t:\n      return chars.$TAB;\n    case chars.$v:\n      return chars.$VTAB;\n    default:\n      return code;\n  }\n}\n\nfunction parseIntAutoRadix(text: string): number {\n  const result: number = parseInt(text);\n  if (isNaN(result)) {\n    throw new Error('Invalid integer literal when parsing ' + text);\n  }\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as chars from '../chars';\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {escapeRegExp} from '../util';\n\nimport {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralMapKey, LiteralPrimitive, MethodCall, NonNullAssert, ParseSpan, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead, TemplateBinding} from './ast';\nimport {EOF, Lexer, Token, TokenType, isIdentifier, isQuote} from './lexer';\n\nexport class SplitInterpolation {\n  constructor(public strings: string[], public expressions: string[], public offsets: number[]) {}\n}\n\nexport class TemplateBindingParseResult {\n  constructor(\n      public templateBindings: TemplateBinding[], public warnings: string[],\n      public errors: ParserError[]) {}\n}\n\nfunction _createInterpolateRegExp(config: InterpolationConfig): RegExp {\n  const pattern = escapeRegExp(config.start) + '([\\\\s\\\\S]*?)' + escapeRegExp(config.end);\n  return new RegExp(pattern, 'g');\n}\n\nexport class Parser {\n  private errors: ParserError[] = [];\n\n  constructor(private _lexer: Lexer) {}\n\n  parseAction(\n      input: string, location: any, absoluteOffset: number,\n      interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ASTWithSource {\n    this._checkNoInterpolation(input, location, interpolationConfig);\n    const sourceToLex = this._stripComments(input);\n    const tokens = this._lexer.tokenize(this._stripComments(input));\n    const ast = new _ParseAST(\n                    input, location, absoluteOffset, tokens, sourceToLex.length, true, this.errors,\n                    input.length - sourceToLex.length)\n                    .parseChain();\n    return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n  }\n\n  parseBinding(\n      input: string, location: any, absoluteOffset: number,\n      interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ASTWithSource {\n    const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n    return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n  }\n\n  parseSimpleBinding(\n      input: string, location: string, absoluteOffset: number,\n      interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ASTWithSource {\n    const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);\n    const errors = SimpleExpressionChecker.check(ast);\n    if (errors.length > 0) {\n      this._reportError(\n          `Host binding expression cannot contain ${errors.join(' ')}`, input, location);\n    }\n    return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);\n  }\n\n  private _reportError(message: string, input: string, errLocation: string, ctxLocation?: any) {\n    this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n  }\n\n  private _parseBindingAst(\n      input: string, location: string, absoluteOffset: number,\n      interpolationConfig: InterpolationConfig): AST {\n    // Quotes expressions use 3rd-party expression language. We don't want to use\n    // our lexer or parser for that, so we check for that ahead of time.\n    const quote = this._parseQuote(input, location);\n\n    if (quote != null) {\n      return quote;\n    }\n\n    this._checkNoInterpolation(input, location, interpolationConfig);\n    const sourceToLex = this._stripComments(input);\n    const tokens = this._lexer.tokenize(sourceToLex);\n    return new _ParseAST(\n               input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors,\n               input.length - sourceToLex.length)\n        .parseChain();\n  }\n\n  private _parseQuote(input: string|null, location: any): AST|null {\n    if (input == null) return null;\n    const prefixSeparatorIndex = input.indexOf(':');\n    if (prefixSeparatorIndex == -1) return null;\n    const prefix = input.substring(0, prefixSeparatorIndex).trim();\n    if (!isIdentifier(prefix)) return null;\n    const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);\n    return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);\n  }\n\n  parseTemplateBindings(tplKey: string, tplValue: string, location: any, absoluteOffset: number):\n      TemplateBindingParseResult {\n    const tokens = this._lexer.tokenize(tplValue);\n    return new _ParseAST(\n               tplValue, location, absoluteOffset, tokens, tplValue.length, false, this.errors, 0)\n        .parseTemplateBindings(tplKey);\n  }\n\n  parseInterpolation(\n      input: string, location: any, absoluteOffset: number,\n      interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ASTWithSource|null {\n    const split = this.splitInterpolation(input, location, interpolationConfig);\n    if (split == null) return null;\n\n    const expressions: AST[] = [];\n\n    for (let i = 0; i < split.expressions.length; ++i) {\n      const expressionText = split.expressions[i];\n      const sourceToLex = this._stripComments(expressionText);\n      const tokens = this._lexer.tokenize(sourceToLex);\n      const ast = new _ParseAST(\n                      input, location, absoluteOffset, tokens, sourceToLex.length, false,\n                      this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))\n                      .parseChain();\n      expressions.push(ast);\n    }\n\n    return new ASTWithSource(\n        new Interpolation(\n            new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions),\n        input, location, absoluteOffset, this.errors);\n  }\n\n  splitInterpolation(\n      input: string, location: string,\n      interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): SplitInterpolation\n      |null {\n    const regexp = _createInterpolateRegExp(interpolationConfig);\n    const parts = input.split(regexp);\n    if (parts.length <= 1) {\n      return null;\n    }\n    const strings: string[] = [];\n    const expressions: string[] = [];\n    const offsets: number[] = [];\n    let offset = 0;\n    for (let i = 0; i < parts.length; i++) {\n      const part: string = parts[i];\n      if (i % 2 === 0) {\n        // fixed string\n        strings.push(part);\n        offset += part.length;\n      } else if (part.trim().length > 0) {\n        offset += interpolationConfig.start.length;\n        expressions.push(part);\n        offsets.push(offset);\n        offset += part.length + interpolationConfig.end.length;\n      } else {\n        this._reportError(\n            'Blank expressions are not allowed in interpolated strings', input,\n            `at column ${this._findInterpolationErrorColumn(parts, i, interpolationConfig)} in`,\n            location);\n        expressions.push('$implict');\n        offsets.push(offset);\n      }\n    }\n    return new SplitInterpolation(strings, expressions, offsets);\n  }\n\n  wrapLiteralPrimitive(input: string|null, location: any, absoluteOffset: number): ASTWithSource {\n    return new ASTWithSource(\n        new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input,\n        location, absoluteOffset, this.errors);\n  }\n\n  private _stripComments(input: string): string {\n    const i = this._commentStart(input);\n    return i != null ? input.substring(0, i).trim() : input;\n  }\n\n  private _commentStart(input: string): number|null {\n    let outerQuote: number|null = null;\n    for (let i = 0; i < input.length - 1; i++) {\n      const char = input.charCodeAt(i);\n      const nextChar = input.charCodeAt(i + 1);\n\n      if (char === chars.$SLASH && nextChar == chars.$SLASH && outerQuote == null) return i;\n\n      if (outerQuote === char) {\n        outerQuote = null;\n      } else if (outerQuote == null && isQuote(char)) {\n        outerQuote = char;\n      }\n    }\n    return null;\n  }\n\n  private _checkNoInterpolation(\n      input: string, location: any, interpolationConfig: InterpolationConfig): void {\n    const regexp = _createInterpolateRegExp(interpolationConfig);\n    const parts = input.split(regexp);\n    if (parts.length > 1) {\n      this._reportError(\n          `Got interpolation (${interpolationConfig.start}${interpolationConfig.end}) where expression was expected`,\n          input,\n          `at column ${this._findInterpolationErrorColumn(parts, 1, interpolationConfig)} in`,\n          location);\n    }\n  }\n\n  private _findInterpolationErrorColumn(\n      parts: string[], partInErrIdx: number, interpolationConfig: InterpolationConfig): number {\n    let errLocation = '';\n    for (let j = 0; j < partInErrIdx; j++) {\n      errLocation += j % 2 === 0 ?\n          parts[j] :\n          `${interpolationConfig.start}${parts[j]}${interpolationConfig.end}`;\n    }\n\n    return errLocation.length;\n  }\n}\n\nexport class _ParseAST {\n  private rparensExpected = 0;\n  private rbracketsExpected = 0;\n  private rbracesExpected = 0;\n\n  index: number = 0;\n\n  constructor(\n      public input: string, public location: any, public absoluteOffset: number,\n      public tokens: Token[], public inputLength: number, public parseAction: boolean,\n      private errors: ParserError[], private offset: number) {}\n\n  peek(offset: number): Token {\n    const i = this.index + offset;\n    return i < this.tokens.length ? this.tokens[i] : EOF;\n  }\n\n  get next(): Token { return this.peek(0); }\n\n  get inputIndex(): number {\n    return (this.index < this.tokens.length) ? this.next.index + this.offset :\n                                               this.inputLength + this.offset;\n  }\n\n  span(start: number) { return new ParseSpan(start, this.inputIndex); }\n\n  advance() { this.index++; }\n\n  optionalCharacter(code: number): boolean {\n    if (this.next.isCharacter(code)) {\n      this.advance();\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  peekKeywordLet(): boolean { return this.next.isKeywordLet(); }\n  peekKeywordAs(): boolean { return this.next.isKeywordAs(); }\n\n  expectCharacter(code: number) {\n    if (this.optionalCharacter(code)) return;\n    this.error(`Missing expected ${String.fromCharCode(code)}`);\n  }\n\n  optionalOperator(op: string): boolean {\n    if (this.next.isOperator(op)) {\n      this.advance();\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  expectOperator(operator: string) {\n    if (this.optionalOperator(operator)) return;\n    this.error(`Missing expected operator ${operator}`);\n  }\n\n  expectIdentifierOrKeyword(): string {\n    const n = this.next;\n    if (!n.isIdentifier() && !n.isKeyword()) {\n      this.error(`Unexpected token ${n}, expected identifier or keyword`);\n      return '';\n    }\n    this.advance();\n    return n.toString() as string;\n  }\n\n  expectIdentifierOrKeywordOrString(): string {\n    const n = this.next;\n    if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n      this.error(`Unexpected token ${n}, expected identifier, keyword, or string`);\n      return '';\n    }\n    this.advance();\n    return n.toString() as string;\n  }\n\n  parseChain(): AST {\n    const exprs: AST[] = [];\n    const start = this.inputIndex;\n    while (this.index < this.tokens.length) {\n      const expr = this.parsePipe();\n      exprs.push(expr);\n\n      if (this.optionalCharacter(chars.$SEMICOLON)) {\n        if (!this.parseAction) {\n          this.error('Binding expression cannot contain chained expression');\n        }\n        while (this.optionalCharacter(chars.$SEMICOLON)) {\n        }  // read all semicolons\n      } else if (this.index < this.tokens.length) {\n        this.error(`Unexpected token '${this.next}'`);\n      }\n    }\n    if (exprs.length == 0) return new EmptyExpr(this.span(start));\n    if (exprs.length == 1) return exprs[0];\n    return new Chain(this.span(start), exprs);\n  }\n\n  parsePipe(): AST {\n    let result = this.parseExpression();\n    if (this.optionalOperator('|')) {\n      if (this.parseAction) {\n        this.error('Cannot have a pipe in an action expression');\n      }\n\n      do {\n        const name = this.expectIdentifierOrKeyword();\n        const args: AST[] = [];\n        while (this.optionalCharacter(chars.$COLON)) {\n          args.push(this.parseExpression());\n        }\n        result = new BindingPipe(this.span(result.span.start), result, name, args);\n      } while (this.optionalOperator('|'));\n    }\n\n    return result;\n  }\n\n  parseExpression(): AST { return this.parseConditional(); }\n\n  parseConditional(): AST {\n    const start = this.inputIndex;\n    const result = this.parseLogicalOr();\n\n    if (this.optionalOperator('?')) {\n      const yes = this.parsePipe();\n      let no: AST;\n      if (!this.optionalCharacter(chars.$COLON)) {\n        const end = this.inputIndex;\n        const expression = this.input.substring(start, end);\n        this.error(`Conditional expression ${expression} requires all 3 expressions`);\n        no = new EmptyExpr(this.span(start));\n      } else {\n        no = this.parsePipe();\n      }\n      return new Conditional(this.span(start), result, yes, no);\n    } else {\n      return result;\n    }\n  }\n\n  parseLogicalOr(): AST {\n    // '||'\n    let result = this.parseLogicalAnd();\n    while (this.optionalOperator('||')) {\n      const right = this.parseLogicalAnd();\n      result = new Binary(this.span(result.span.start), '||', result, right);\n    }\n    return result;\n  }\n\n  parseLogicalAnd(): AST {\n    // '&&'\n    let result = this.parseEquality();\n    while (this.optionalOperator('&&')) {\n      const right = this.parseEquality();\n      result = new Binary(this.span(result.span.start), '&&', result, right);\n    }\n    return result;\n  }\n\n  parseEquality(): AST {\n    // '==','!=','===','!=='\n    let result = this.parseRelational();\n    while (this.next.type == TokenType.Operator) {\n      const operator = this.next.strValue;\n      switch (operator) {\n        case '==':\n        case '===':\n        case '!=':\n        case '!==':\n          this.advance();\n          const right = this.parseRelational();\n          result = new Binary(this.span(result.span.start), operator, result, right);\n          continue;\n      }\n      break;\n    }\n    return result;\n  }\n\n  parseRelational(): AST {\n    // '<', '>', '<=', '>='\n    let result = this.parseAdditive();\n    while (this.next.type == TokenType.Operator) {\n      const operator = this.next.strValue;\n      switch (operator) {\n        case '<':\n        case '>':\n        case '<=':\n        case '>=':\n          this.advance();\n          const right = this.parseAdditive();\n          result = new Binary(this.span(result.span.start), operator, result, right);\n          continue;\n      }\n      break;\n    }\n    return result;\n  }\n\n  parseAdditive(): AST {\n    // '+', '-'\n    let result = this.parseMultiplicative();\n    while (this.next.type == TokenType.Operator) {\n      const operator = this.next.strValue;\n      switch (operator) {\n        case '+':\n        case '-':\n          this.advance();\n          let right = this.parseMultiplicative();\n          result = new Binary(this.span(result.span.start), operator, result, right);\n          continue;\n      }\n      break;\n    }\n    return result;\n  }\n\n  parseMultiplicative(): AST {\n    // '*', '%', '/'\n    let result = this.parsePrefix();\n    while (this.next.type == TokenType.Operator) {\n      const operator = this.next.strValue;\n      switch (operator) {\n        case '*':\n        case '%':\n        case '/':\n          this.advance();\n          let right = this.parsePrefix();\n          result = new Binary(this.span(result.span.start), operator, result, right);\n          continue;\n      }\n      break;\n    }\n    return result;\n  }\n\n  parsePrefix(): AST {\n    if (this.next.type == TokenType.Operator) {\n      const start = this.inputIndex;\n      const operator = this.next.strValue;\n      let result: AST;\n      switch (operator) {\n        case '+':\n          this.advance();\n          result = this.parsePrefix();\n          return new Binary(\n              this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));\n        case '-':\n          this.advance();\n          result = this.parsePrefix();\n          return new Binary(\n              this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0),\n              result);\n        case '!':\n          this.advance();\n          result = this.parsePrefix();\n          return new PrefixNot(this.span(start), result);\n      }\n    }\n    return this.parseCallChain();\n  }\n\n  parseCallChain(): AST {\n    let result = this.parsePrimary();\n    while (true) {\n      if (this.optionalCharacter(chars.$PERIOD)) {\n        result = this.parseAccessMemberOrMethodCall(result, false);\n\n      } else if (this.optionalOperator('?.')) {\n        result = this.parseAccessMemberOrMethodCall(result, true);\n\n      } else if (this.optionalCharacter(chars.$LBRACKET)) {\n        this.rbracketsExpected++;\n        const key = this.parsePipe();\n        this.rbracketsExpected--;\n        this.expectCharacter(chars.$RBRACKET);\n        if (this.optionalOperator('=')) {\n          const value = this.parseConditional();\n          result = new KeyedWrite(this.span(result.span.start), result, key, value);\n        } else {\n          result = new KeyedRead(this.span(result.span.start), result, key);\n        }\n\n      } else if (this.optionalCharacter(chars.$LPAREN)) {\n        this.rparensExpected++;\n        const args = this.parseCallArguments();\n        this.rparensExpected--;\n        this.expectCharacter(chars.$RPAREN);\n        result = new FunctionCall(this.span(result.span.start), result, args);\n\n      } else if (this.optionalOperator('!')) {\n        result = new NonNullAssert(this.span(result.span.start), result);\n\n      } else {\n        return result;\n      }\n    }\n  }\n\n  parsePrimary(): AST {\n    const start = this.inputIndex;\n    if (this.optionalCharacter(chars.$LPAREN)) {\n      this.rparensExpected++;\n      const result = this.parsePipe();\n      this.rparensExpected--;\n      this.expectCharacter(chars.$RPAREN);\n      return result;\n\n    } else if (this.next.isKeywordNull()) {\n      this.advance();\n      return new LiteralPrimitive(this.span(start), null);\n\n    } else if (this.next.isKeywordUndefined()) {\n      this.advance();\n      return new LiteralPrimitive(this.span(start), void 0);\n\n    } else if (this.next.isKeywordTrue()) {\n      this.advance();\n      return new LiteralPrimitive(this.span(start), true);\n\n    } else if (this.next.isKeywordFalse()) {\n      this.advance();\n      return new LiteralPrimitive(this.span(start), false);\n\n    } else if (this.next.isKeywordThis()) {\n      this.advance();\n      return new ImplicitReceiver(this.span(start));\n\n    } else if (this.optionalCharacter(chars.$LBRACKET)) {\n      this.rbracketsExpected++;\n      const elements = this.parseExpressionList(chars.$RBRACKET);\n      this.rbracketsExpected--;\n      this.expectCharacter(chars.$RBRACKET);\n      return new LiteralArray(this.span(start), elements);\n\n    } else if (this.next.isCharacter(chars.$LBRACE)) {\n      return this.parseLiteralMap();\n\n    } else if (this.next.isIdentifier()) {\n      return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);\n\n    } else if (this.next.isNumber()) {\n      const value = this.next.toNumber();\n      this.advance();\n      return new LiteralPrimitive(this.span(start), value);\n\n    } else if (this.next.isString()) {\n      const literalValue = this.next.toString();\n      this.advance();\n      return new LiteralPrimitive(this.span(start), literalValue);\n\n    } else if (this.index >= this.tokens.length) {\n      this.error(`Unexpected end of expression: ${this.input}`);\n      return new EmptyExpr(this.span(start));\n    } else {\n      this.error(`Unexpected token ${this.next}`);\n      return new EmptyExpr(this.span(start));\n    }\n  }\n\n  parseExpressionList(terminator: number): AST[] {\n    const result: AST[] = [];\n    if (!this.next.isCharacter(terminator)) {\n      do {\n        result.push(this.parsePipe());\n      } while (this.optionalCharacter(chars.$COMMA));\n    }\n    return result;\n  }\n\n  parseLiteralMap(): LiteralMap {\n    const keys: LiteralMapKey[] = [];\n    const values: AST[] = [];\n    const start = this.inputIndex;\n    this.expectCharacter(chars.$LBRACE);\n    if (!this.optionalCharacter(chars.$RBRACE)) {\n      this.rbracesExpected++;\n      do {\n        const quoted = this.next.isString();\n        const key = this.expectIdentifierOrKeywordOrString();\n        keys.push({key, quoted});\n        this.expectCharacter(chars.$COLON);\n        values.push(this.parsePipe());\n      } while (this.optionalCharacter(chars.$COMMA));\n      this.rbracesExpected--;\n      this.expectCharacter(chars.$RBRACE);\n    }\n    return new LiteralMap(this.span(start), keys, values);\n  }\n\n  parseAccessMemberOrMethodCall(receiver: AST, isSafe: boolean = false): AST {\n    const start = receiver.span.start;\n    const id = this.expectIdentifierOrKeyword();\n\n    if (this.optionalCharacter(chars.$LPAREN)) {\n      this.rparensExpected++;\n      const args = this.parseCallArguments();\n      this.expectCharacter(chars.$RPAREN);\n      this.rparensExpected--;\n      const span = this.span(start);\n      return isSafe ? new SafeMethodCall(span, receiver, id, args) :\n                      new MethodCall(span, receiver, id, args);\n\n    } else {\n      if (isSafe) {\n        if (this.optionalOperator('=')) {\n          this.error('The \\'?.\\' operator cannot be used in the assignment');\n          return new EmptyExpr(this.span(start));\n        } else {\n          return new SafePropertyRead(this.span(start), receiver, id);\n        }\n      } else {\n        if (this.optionalOperator('=')) {\n          if (!this.parseAction) {\n            this.error('Bindings cannot contain assignments');\n            return new EmptyExpr(this.span(start));\n          }\n\n          const value = this.parseConditional();\n          return new PropertyWrite(this.span(start), receiver, id, value);\n        } else {\n          return new PropertyRead(this.span(start), receiver, id);\n        }\n      }\n    }\n  }\n\n  parseCallArguments(): BindingPipe[] {\n    if (this.next.isCharacter(chars.$RPAREN)) return [];\n    const positionals: AST[] = [];\n    do {\n      positionals.push(this.parsePipe());\n    } while (this.optionalCharacter(chars.$COMMA));\n    return positionals as BindingPipe[];\n  }\n\n  /**\n   * An identifier, a keyword, a string with an optional `-` in between.\n   */\n  expectTemplateBindingKey(): string {\n    let result = '';\n    let operatorFound = false;\n    do {\n      result += this.expectIdentifierOrKeywordOrString();\n      operatorFound = this.optionalOperator('-');\n      if (operatorFound) {\n        result += '-';\n      }\n    } while (operatorFound);\n\n    return result.toString();\n  }\n\n  // Parses the AST for `<some-tag *tplKey=AST>`\n  parseTemplateBindings(tplKey: string): TemplateBindingParseResult {\n    let firstBinding = true;\n    const bindings: TemplateBinding[] = [];\n    const warnings: string[] = [];\n    do {\n      const start = this.inputIndex;\n      let rawKey: string;\n      let key: string;\n      let isVar: boolean = false;\n      if (firstBinding) {\n        rawKey = key = tplKey;\n        firstBinding = false;\n      } else {\n        isVar = this.peekKeywordLet();\n        if (isVar) this.advance();\n        rawKey = this.expectTemplateBindingKey();\n        key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);\n        this.optionalCharacter(chars.$COLON);\n      }\n\n      let name: string = null !;\n      let expression: ASTWithSource|null = null;\n      if (isVar) {\n        if (this.optionalOperator('=')) {\n          name = this.expectTemplateBindingKey();\n        } else {\n          name = '\\$implicit';\n        }\n      } else if (this.peekKeywordAs()) {\n        this.advance();  // consume `as`\n        name = rawKey;\n        key = this.expectTemplateBindingKey();  // read local var name\n        isVar = true;\n      } else if (this.next !== EOF && !this.peekKeywordLet()) {\n        const start = this.inputIndex;\n        const ast = this.parsePipe();\n        const source = this.input.substring(start - this.offset, this.inputIndex - this.offset);\n        expression =\n            new ASTWithSource(ast, source, this.location, this.absoluteOffset, this.errors);\n      }\n\n      bindings.push(new TemplateBinding(this.span(start), key, isVar, name, expression));\n      if (this.peekKeywordAs() && !isVar) {\n        const letStart = this.inputIndex;\n        this.advance();                                   // consume `as`\n        const letName = this.expectTemplateBindingKey();  // read local var name\n        bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null !));\n      }\n      if (!this.optionalCharacter(chars.$SEMICOLON)) {\n        this.optionalCharacter(chars.$COMMA);\n      }\n    } while (this.index < this.tokens.length);\n\n    return new TemplateBindingParseResult(bindings, warnings, this.errors);\n  }\n\n  error(message: string, index: number|null = null) {\n    this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n    this.skip();\n  }\n\n  private locationText(index: number|null = null) {\n    if (index == null) index = this.index;\n    return (index < this.tokens.length) ? `at column ${this.tokens[index].index + 1} in` :\n                                          `at the end of the expression`;\n  }\n\n  // Error recovery should skip tokens until it encounters a recovery point. skip() treats\n  // the end of input and a ';' as unconditionally a recovery point. It also treats ')',\n  // '}' and ']' as conditional recovery points if one of calling productions is expecting\n  // one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing\n  // more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because\n  // of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols\n  // must be conditional as they must be skipped if none of the calling productions are not\n  // expecting the closing token else we will never make progress in the case of an\n  // extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because\n  // parseChain() is always the root production and it expects a ';'.\n\n  // If a production expects one of these token it increments the corresponding nesting count,\n  // and then decrements it just prior to checking if the token is in the input.\n  private skip() {\n    let n = this.next;\n    while (this.index < this.tokens.length && !n.isCharacter(chars.$SEMICOLON) &&\n           (this.rparensExpected <= 0 || !n.isCharacter(chars.$RPAREN)) &&\n           (this.rbracesExpected <= 0 || !n.isCharacter(chars.$RBRACE)) &&\n           (this.rbracketsExpected <= 0 || !n.isCharacter(chars.$RBRACKET))) {\n      if (this.next.isError()) {\n        this.errors.push(new ParserError(\n            this.next.toString() !, this.input, this.locationText(), this.location));\n      }\n      this.advance();\n      n = this.next;\n    }\n  }\n}\n\nclass SimpleExpressionChecker implements AstVisitor {\n  static check(ast: AST): string[] {\n    const s = new SimpleExpressionChecker();\n    ast.visit(s);\n    return s.errors;\n  }\n\n  errors: string[] = [];\n\n  visitImplicitReceiver(ast: ImplicitReceiver, context: any) {}\n\n  visitInterpolation(ast: Interpolation, context: any) {}\n\n  visitLiteralPrimitive(ast: LiteralPrimitive, context: any) {}\n\n  visitPropertyRead(ast: PropertyRead, context: any) {}\n\n  visitPropertyWrite(ast: PropertyWrite, context: any) {}\n\n  visitSafePropertyRead(ast: SafePropertyRead, context: any) {}\n\n  visitMethodCall(ast: MethodCall, context: any) {}\n\n  visitSafeMethodCall(ast: SafeMethodCall, context: any) {}\n\n  visitFunctionCall(ast: FunctionCall, context: any) {}\n\n  visitLiteralArray(ast: LiteralArray, context: any) { this.visitAll(ast.expressions); }\n\n  visitLiteralMap(ast: LiteralMap, context: any) { this.visitAll(ast.values); }\n\n  visitBinary(ast: Binary, context: any) {}\n\n  visitPrefixNot(ast: PrefixNot, context: any) {}\n\n  visitNonNullAssert(ast: NonNullAssert, context: any) {}\n\n  visitConditional(ast: Conditional, context: any) {}\n\n  visitPipe(ast: BindingPipe, context: any) { this.errors.push('pipes'); }\n\n  visitKeyedRead(ast: KeyedRead, context: any) {}\n\n  visitKeyedWrite(ast: KeyedWrite, context: any) {}\n\n  visitAll(asts: any[]): any[] { return asts.map(node => node.visit(this)); }\n\n  visitChain(ast: Chain, context: any) {}\n\n  visitQuote(ast: Quote, context: any) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SecurityContext} from '../core';\n\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========\n// =================================================================================================\n// =================================================================================================\n//\n//        DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n//                               Reach out to mprobst for details.\n//\n// =================================================================================================\n\n/** Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'. */\nlet _SECURITY_SCHEMA !: {[k: string]: SecurityContext};\n\nexport function SECURITY_SCHEMA(): {[k: string]: SecurityContext} {\n  if (!_SECURITY_SCHEMA) {\n    _SECURITY_SCHEMA = {};\n    // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n\n    registerContext(SecurityContext.HTML, [\n      'iframe|srcdoc',\n      '*|innerHTML',\n      '*|outerHTML',\n    ]);\n    registerContext(SecurityContext.STYLE, ['*|style']);\n    // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n    registerContext(SecurityContext.URL, [\n      '*|formAction', 'area|href',       'area|ping',       'audio|src',    'a|href',\n      'a|ping',       'blockquote|cite', 'body|background', 'del|cite',     'form|action',\n      'img|src',      'img|srcset',      'input|src',       'ins|cite',     'q|cite',\n      'source|src',   'source|srcset',   'track|src',       'video|poster', 'video|src',\n    ]);\n    registerContext(SecurityContext.RESOURCE_URL, [\n      'applet|code',\n      'applet|codebase',\n      'base|href',\n      'embed|src',\n      'frame|src',\n      'head|profile',\n      'html|manifest',\n      'iframe|src',\n      'link|href',\n      'media|src',\n      'object|codebase',\n      'object|data',\n      'script|src',\n    ]);\n  }\n  return _SECURITY_SCHEMA;\n}\n\nfunction registerContext(ctx: SecurityContext, specs: string[]) {\n  for (const spec of specs) _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SchemaMetadata, SecurityContext} from '../core';\n\nexport abstract class ElementSchemaRegistry {\n  abstract hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;\n  abstract hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;\n  abstract securityContext(elementName: string, propName: string, isAttribute: boolean):\n      SecurityContext;\n  abstract allKnownElementNames(): string[];\n  abstract getMappedPropName(propName: string): string;\n  abstract getDefaultComponentElementName(): string;\n  abstract validateProperty(name: string): {error: boolean, msg?: string};\n  abstract validateAttribute(name: string): {error: boolean, msg?: string};\n  abstract normalizeAnimationStyleProperty(propName: string): string;\n  abstract normalizeAnimationStyleValue(\n      camelCaseProp: string, userProvidedProp: string,\n      val: string|number): {error: string, value: string};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata, SecurityContext} from '../core';\n\nimport {isNgContainer, isNgContent} from '../ml_parser/tags';\nimport {dashCaseToCamelCase} from '../util';\n\nimport {SECURITY_SCHEMA} from './dom_security_schema';\nimport {ElementSchemaRegistry} from './element_schema_registry';\n\nconst BOOLEAN = 'boolean';\nconst NUMBER = 'number';\nconst STRING = 'string';\nconst OBJECT = 'object';\n\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n *       see dom_element_schema_registry_spec.ts\n */\n\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========\n// =================================================================================================\n// =================================================================================================\n//\n//                       DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\n\nconst SCHEMA: string[] = [\n  '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n      /* added manually to avoid breaking changes */\n      ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n  '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n  'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n  'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',\n  ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',\n  ':svg:graphics^:svg:|',\n  ':svg:animation^:svg:|*begin,*end,*repeat',\n  ':svg:geometry^:svg:|',\n  ':svg:componentTransferFunction^:svg:|',\n  ':svg:gradient^:svg:|',\n  ':svg:textContent^:svg:graphics|',\n  ':svg:textPositioning^:svg:textContent|',\n  'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',\n  'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',\n  'audio^media|',\n  'br^[HTMLElement]|clear',\n  'base^[HTMLElement]|href,target',\n  'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n  'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n  'canvas^[HTMLElement]|#height,#width',\n  'content^[HTMLElement]|select',\n  'dl^[HTMLElement]|!compact',\n  'datalist^[HTMLElement]|',\n  'details^[HTMLElement]|!open',\n  'dialog^[HTMLElement]|!open,returnValue',\n  'dir^[HTMLElement]|!compact',\n  'div^[HTMLElement]|align',\n  'embed^[HTMLElement]|align,height,name,src,type,width',\n  'fieldset^[HTMLElement]|!disabled,name',\n  'font^[HTMLElement]|color,face,size',\n  'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',\n  'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',\n  'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',\n  'hr^[HTMLElement]|align,color,!noShade,size,width',\n  'head^[HTMLElement]|',\n  'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',\n  'html^[HTMLElement]|version',\n  'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n  'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n  'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',\n  'li^[HTMLElement]|type,#value',\n  'label^[HTMLElement]|htmlFor',\n  'legend^[HTMLElement]|align',\n  'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',\n  'map^[HTMLElement]|name',\n  'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',\n  'menu^[HTMLElement]|!compact',\n  'meta^[HTMLElement]|content,httpEquiv,name,scheme',\n  'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',\n  'ins,del^[HTMLElement]|cite,dateTime',\n  'ol^[HTMLElement]|!compact,!reversed,#start,type',\n  'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',\n  'optgroup^[HTMLElement]|!disabled,label',\n  'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',\n  'output^[HTMLElement]|defaultValue,%htmlFor,name,value',\n  'p^[HTMLElement]|align',\n  'param^[HTMLElement]|name,type,value,valueType',\n  'picture^[HTMLElement]|',\n  'pre^[HTMLElement]|#width',\n  'progress^[HTMLElement]|#max,#value',\n  'q,blockquote,cite^[HTMLElement]|',\n  'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',\n  'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n  'shadow^[HTMLElement]|',\n  'slot^[HTMLElement]|name',\n  'source^[HTMLElement]|media,sizes,src,srcset,type',\n  'span^[HTMLElement]|',\n  'style^[HTMLElement]|!disabled,media,type',\n  'caption^[HTMLElement]|align',\n  'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',\n  'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',\n  'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',\n  'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',\n  'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',\n  'template^[HTMLElement]|',\n  'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n  'title^[HTMLElement]|text',\n  'track^[HTMLElement]|!default,kind,label,src,srclang',\n  'ul^[HTMLElement]|!compact,type',\n  'unknown^[HTMLElement]|',\n  'video^media|#height,poster,#width',\n  ':svg:a^:svg:graphics|',\n  ':svg:animate^:svg:animation|',\n  ':svg:animateMotion^:svg:animation|',\n  ':svg:animateTransform^:svg:animation|',\n  ':svg:circle^:svg:geometry|',\n  ':svg:clipPath^:svg:graphics|',\n  ':svg:defs^:svg:graphics|',\n  ':svg:desc^:svg:|',\n  ':svg:discard^:svg:|',\n  ':svg:ellipse^:svg:geometry|',\n  ':svg:feBlend^:svg:|',\n  ':svg:feColorMatrix^:svg:|',\n  ':svg:feComponentTransfer^:svg:|',\n  ':svg:feComposite^:svg:|',\n  ':svg:feConvolveMatrix^:svg:|',\n  ':svg:feDiffuseLighting^:svg:|',\n  ':svg:feDisplacementMap^:svg:|',\n  ':svg:feDistantLight^:svg:|',\n  ':svg:feDropShadow^:svg:|',\n  ':svg:feFlood^:svg:|',\n  ':svg:feFuncA^:svg:componentTransferFunction|',\n  ':svg:feFuncB^:svg:componentTransferFunction|',\n  ':svg:feFuncG^:svg:componentTransferFunction|',\n  ':svg:feFuncR^:svg:componentTransferFunction|',\n  ':svg:feGaussianBlur^:svg:|',\n  ':svg:feImage^:svg:|',\n  ':svg:feMerge^:svg:|',\n  ':svg:feMergeNode^:svg:|',\n  ':svg:feMorphology^:svg:|',\n  ':svg:feOffset^:svg:|',\n  ':svg:fePointLight^:svg:|',\n  ':svg:feSpecularLighting^:svg:|',\n  ':svg:feSpotLight^:svg:|',\n  ':svg:feTile^:svg:|',\n  ':svg:feTurbulence^:svg:|',\n  ':svg:filter^:svg:|',\n  ':svg:foreignObject^:svg:graphics|',\n  ':svg:g^:svg:graphics|',\n  ':svg:image^:svg:graphics|',\n  ':svg:line^:svg:geometry|',\n  ':svg:linearGradient^:svg:gradient|',\n  ':svg:mpath^:svg:|',\n  ':svg:marker^:svg:|',\n  ':svg:mask^:svg:|',\n  ':svg:metadata^:svg:|',\n  ':svg:path^:svg:geometry|',\n  ':svg:pattern^:svg:|',\n  ':svg:polygon^:svg:geometry|',\n  ':svg:polyline^:svg:geometry|',\n  ':svg:radialGradient^:svg:gradient|',\n  ':svg:rect^:svg:geometry|',\n  ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',\n  ':svg:script^:svg:|type',\n  ':svg:set^:svg:animation|',\n  ':svg:stop^:svg:|',\n  ':svg:style^:svg:|!disabled,media,title,type',\n  ':svg:switch^:svg:graphics|',\n  ':svg:symbol^:svg:|',\n  ':svg:tspan^:svg:textPositioning|',\n  ':svg:text^:svg:textPositioning|',\n  ':svg:textPath^:svg:textContent|',\n  ':svg:title^:svg:|',\n  ':svg:use^:svg:graphics|',\n  ':svg:view^:svg:|#zoomAndPan',\n  'data^[HTMLElement]|value',\n  'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',\n  'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',\n  'summary^[HTMLElement]|',\n  'time^[HTMLElement]|dateTime',\n  ':svg:cursor^:svg:|',\n];\n\nconst _ATTR_TO_PROP: {[name: string]: string} = {\n  'class': 'className',\n  'for': 'htmlFor',\n  'formaction': 'formAction',\n  'innerHtml': 'innerHTML',\n  'readonly': 'readOnly',\n  'tabindex': 'tabIndex',\n};\n\nexport class DomElementSchemaRegistry extends ElementSchemaRegistry {\n  private _schema: {[element: string]: {[property: string]: string}} = {};\n\n  constructor() {\n    super();\n    SCHEMA.forEach(encodedType => {\n      const type: {[property: string]: string} = {};\n      const [strType, strProperties] = encodedType.split('|');\n      const properties = strProperties.split(',');\n      const [typeNames, superName] = strType.split('^');\n      typeNames.split(',').forEach(tag => this._schema[tag.toLowerCase()] = type);\n      const superType = superName && this._schema[superName.toLowerCase()];\n      if (superType) {\n        Object.keys(superType).forEach((prop: string) => { type[prop] = superType[prop]; });\n      }\n      properties.forEach((property: string) => {\n        if (property.length > 0) {\n          switch (property[0]) {\n            case '*':\n              // We don't yet support events.\n              // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events\n              // will\n              // almost certainly introduce bad XSS vulnerabilities.\n              // type[property.substring(1)] = EVENT;\n              break;\n            case '!':\n              type[property.substring(1)] = BOOLEAN;\n              break;\n            case '#':\n              type[property.substring(1)] = NUMBER;\n              break;\n            case '%':\n              type[property.substring(1)] = OBJECT;\n              break;\n            default:\n              type[property] = STRING;\n          }\n        }\n      });\n    });\n  }\n\n  hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean {\n    if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {\n      return true;\n    }\n\n    if (tagName.indexOf('-') > -1) {\n      if (isNgContainer(tagName) || isNgContent(tagName)) {\n        return false;\n      }\n\n      if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n        // Can't tell now as we don't know which properties a custom element will get\n        // once it is instantiated\n        return true;\n      }\n    }\n\n    const elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n    return !!elementProperties[propName];\n  }\n\n  hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean {\n    if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {\n      return true;\n    }\n\n    if (tagName.indexOf('-') > -1) {\n      if (isNgContainer(tagName) || isNgContent(tagName)) {\n        return true;\n      }\n\n      if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {\n        // Allow any custom elements\n        return true;\n      }\n    }\n\n    return !!this._schema[tagName.toLowerCase()];\n  }\n\n  /**\n   * securityContext returns the security context for the given property on the given DOM tag.\n   *\n   * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n   * possible to bind a value into a changing attribute or tag name.\n   *\n   * The filtering is based on a list of allowed tags|attributes. All attributes in the schema\n   * above are assumed to have the 'NONE' security context, i.e. that they are safe inert\n   * string values. Only specific well known attack vectors are assigned their appropriate context.\n   */\n  securityContext(tagName: string, propName: string, isAttribute: boolean): SecurityContext {\n    if (isAttribute) {\n      // NB: For security purposes, use the mapped property name, not the attribute name.\n      propName = this.getMappedPropName(propName);\n    }\n\n    // Make sure comparisons are case insensitive, so that case differences between attribute and\n    // property names do not have a security impact.\n    tagName = tagName.toLowerCase();\n    propName = propName.toLowerCase();\n    let ctx = SECURITY_SCHEMA()[tagName + '|' + propName];\n    if (ctx) {\n      return ctx;\n    }\n    ctx = SECURITY_SCHEMA()['*|' + propName];\n    return ctx ? ctx : SecurityContext.NONE;\n  }\n\n  getMappedPropName(propName: string): string { return _ATTR_TO_PROP[propName] || propName; }\n\n  getDefaultComponentElementName(): string { return 'ng-component'; }\n\n  validateProperty(name: string): {error: boolean, msg?: string} {\n    if (name.toLowerCase().startsWith('on')) {\n      const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n          `please use (${name.slice(2)})=...` +\n          `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n          ` current module.`;\n      return {error: true, msg: msg};\n    } else {\n      return {error: false};\n    }\n  }\n\n  validateAttribute(name: string): {error: boolean, msg?: string} {\n    if (name.toLowerCase().startsWith('on')) {\n      const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n          `please use (${name.slice(2)})=...`;\n      return {error: true, msg: msg};\n    } else {\n      return {error: false};\n    }\n  }\n\n  allKnownElementNames(): string[] { return Object.keys(this._schema); }\n\n  normalizeAnimationStyleProperty(propName: string): string {\n    return dashCaseToCamelCase(propName);\n  }\n\n  normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string|number):\n      {error: string, value: string} {\n    let unit: string = '';\n    const strVal = val.toString().trim();\n    let errorMsg: string = null !;\n\n    if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n      if (typeof val === 'number') {\n        unit = 'px';\n      } else {\n        const valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n        if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n          errorMsg = `Please provide a CSS unit value for ${userProvidedProp}:${val}`;\n        }\n      }\n    }\n    return {error: errorMsg, value: strVal + unit};\n  }\n}\n\nfunction _isPixelDimensionStyle(prop: string): boolean {\n  switch (prop) {\n    case 'width':\n    case 'height':\n    case 'minWidth':\n    case 'minHeight':\n    case 'maxWidth':\n    case 'maxHeight':\n    case 'left':\n    case 'top':\n    case 'bottom':\n    case 'right':\n    case 'fontSize':\n    case 'outlineWidth':\n    case 'outlineOffset':\n    case 'paddingTop':\n    case 'paddingLeft':\n    case 'paddingBottom':\n    case 'paddingRight':\n    case 'marginTop':\n    case 'marginLeft':\n    case 'marginBottom':\n    case 'marginRight':\n    case 'borderRadius':\n    case 'borderWidth':\n    case 'borderTopWidth':\n    case 'borderLeftWidth':\n    case 'borderRightWidth':\n    case 'borderBottomWidth':\n    case 'textIndent':\n      return true;\n\n    default:\n      return false;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParsedEvent, ParsedProperty, ParsedVariable} from '../expression_parser/ast';\nimport * as i18n from '../i18n/i18n_ast';\nimport * as html from '../ml_parser/ast';\nimport {replaceNgsp} from '../ml_parser/html_whitespaces';\nimport {isNgTemplate} from '../ml_parser/tags';\nimport {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util';\nimport {isStyleUrlResolvable} from '../style_url_resolver';\nimport {BindingParser} from '../template_parser/binding_parser';\nimport {PreparsedElementType, preparseElement} from '../template_parser/template_preparser';\nimport {syntaxError} from '../util';\n\nimport * as t from './r3_ast';\nimport {I18N_ICU_VAR_PREFIX} from './view/i18n/util';\n\nconst BIND_NAME_REGEXP =\n    /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n\n// Group 1 = \"bind-\"\nconst KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nconst KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nconst KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nconst KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nconst KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nconst KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nconst IDENT_KW_IDX = 7;\n// Group 8 = identifier inside [()]\nconst IDENT_BANANA_BOX_IDX = 8;\n// Group 9 = identifier inside []\nconst IDENT_PROPERTY_IDX = 9;\n// Group 10 = identifier inside ()\nconst IDENT_EVENT_IDX = 10;\n\nconst TEMPLATE_ATTR_PREFIX = '*';\n\n// Result of the html AST to Ivy AST transformation\nexport interface Render3ParseResult {\n  nodes: t.Node[];\n  errors: ParseError[];\n  styles: string[];\n  styleUrls: string[];\n}\n\nexport function htmlAstToRender3Ast(\n    htmlNodes: html.Node[], bindingParser: BindingParser): Render3ParseResult {\n  const transformer = new HtmlAstToIvyAst(bindingParser);\n  const ivyNodes = html.visitAll(transformer, htmlNodes);\n\n  // Errors might originate in either the binding parser or the html to ivy transformer\n  const allErrors = bindingParser.errors.concat(transformer.errors);\n  const errors: ParseError[] = allErrors.filter(e => e.level === ParseErrorLevel.ERROR);\n\n  if (errors.length > 0) {\n    const errorString = errors.join('\\n');\n    throw syntaxError(`Template parse errors:\\n${errorString}`, errors);\n  }\n\n  return {\n    nodes: ivyNodes,\n    errors: allErrors,\n    styleUrls: transformer.styleUrls,\n    styles: transformer.styles,\n  };\n}\n\nclass HtmlAstToIvyAst implements html.Visitor {\n  errors: ParseError[] = [];\n  styles: string[] = [];\n  styleUrls: string[] = [];\n\n  constructor(private bindingParser: BindingParser) {}\n\n  // HTML visitor\n  visitElement(element: html.Element): t.Node|null {\n    const preparsedElement = preparseElement(element);\n    if (preparsedElement.type === PreparsedElementType.SCRIPT) {\n      return null;\n    } else if (preparsedElement.type === PreparsedElementType.STYLE) {\n      const contents = textContents(element);\n      if (contents !== null) {\n        this.styles.push(contents);\n      }\n      return null;\n    } else if (\n        preparsedElement.type === PreparsedElementType.STYLESHEET &&\n        isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n      this.styleUrls.push(preparsedElement.hrefAttr);\n      return null;\n    }\n\n    // Whether the element is a `<ng-template>`\n    const isTemplateElement = isNgTemplate(element.name);\n\n    const parsedProperties: ParsedProperty[] = [];\n    const boundEvents: t.BoundEvent[] = [];\n    const variables: t.Variable[] = [];\n    const references: t.Reference[] = [];\n    const attributes: t.TextAttribute[] = [];\n    const i18nAttrsMeta: {[key: string]: i18n.AST} = {};\n\n    const templateParsedProperties: ParsedProperty[] = [];\n    const templateVariables: t.Variable[] = [];\n\n    // Whether the element has any *-attribute\n    let elementHasInlineTemplate = false;\n\n    for (const attribute of element.attrs) {\n      let hasBinding = false;\n      const normalizedName = normalizeAttributeName(attribute.name);\n\n      // `*attr` defines template bindings\n      let isTemplateBinding = false;\n\n      if (attribute.i18n) {\n        i18nAttrsMeta[attribute.name] = attribute.i18n;\n      }\n\n      if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n        // *-attributes\n        if (elementHasInlineTemplate) {\n          this.reportError(\n              `Can't have multiple template bindings on one element. Use only one attribute prefixed with *`,\n              attribute.sourceSpan);\n        }\n        isTemplateBinding = true;\n        elementHasInlineTemplate = true;\n        const templateValue = attribute.value;\n        const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n\n        const parsedVariables: ParsedVariable[] = [];\n        const absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset :\n                                                     attribute.sourceSpan.start.offset;\n        this.bindingParser.parseInlineTemplateBinding(\n            templateKey, templateValue, attribute.sourceSpan, absoluteOffset, [],\n            templateParsedProperties, parsedVariables);\n        templateVariables.push(\n            ...parsedVariables.map(v => new t.Variable(v.name, v.value, v.sourceSpan)));\n      } else {\n        // Check for variables, events, property bindings, interpolation\n        hasBinding = this.parseAttribute(\n            isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);\n      }\n\n      if (!hasBinding && !isTemplateBinding) {\n        // don't include the bindings as attributes as well in the AST\n        attributes.push(this.visitAttribute(attribute) as t.TextAttribute);\n      }\n    }\n\n    const children: t.Node[] =\n        html.visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children);\n\n    let parsedElement: t.Node|undefined;\n    if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n      // `<ng-content>`\n      if (element.children &&\n          !element.children.every(\n              (node: html.Node) => isEmptyTextNode(node) || isCommentNode(node))) {\n        this.reportError(`<ng-content> element cannot have content.`, element.sourceSpan);\n      }\n      const selector = preparsedElement.selectAttr;\n      const attrs: t.TextAttribute[] = element.attrs.map(attr => this.visitAttribute(attr));\n      parsedElement = new t.Content(selector, attrs, element.sourceSpan, element.i18n);\n    } else if (isTemplateElement) {\n      // `<ng-template>`\n      const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n\n      parsedElement = new t.Template(\n          element.name, attributes, attrs.bound, boundEvents, [/* no template attributes */],\n          children, references, variables, element.sourceSpan, element.startSourceSpan,\n          element.endSourceSpan, element.i18n);\n    } else {\n      const attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);\n      parsedElement = new t.Element(\n          element.name, attributes, attrs.bound, boundEvents, children, references,\n          element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n    }\n\n    if (elementHasInlineTemplate) {\n      // If this node is an inline-template (e.g. has *ngFor) then we need to create a template\n      // node that contains this node.\n      // Moreover, if the node is an element, then we need to hoist its attributes to the template\n      // node for matching against content projection selectors.\n      const attrs = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);\n      const templateAttrs: (t.TextAttribute | t.BoundAttribute)[] = [];\n      attrs.literal.forEach(attr => templateAttrs.push(attr));\n      attrs.bound.forEach(attr => templateAttrs.push(attr));\n      const hoistedAttrs = parsedElement instanceof t.Element ?\n          {\n            attributes: parsedElement.attributes,\n            inputs: parsedElement.inputs,\n            outputs: parsedElement.outputs,\n          } :\n          {attributes: [], inputs: [], outputs: []};\n      // TODO(pk): test for this case\n      parsedElement = new t.Template(\n          (parsedElement as t.Element).name, hoistedAttrs.attributes, hoistedAttrs.inputs,\n          hoistedAttrs.outputs, templateAttrs, [parsedElement], [/* no references */],\n          templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan,\n          element.i18n);\n    }\n    return parsedElement;\n  }\n\n  visitAttribute(attribute: html.Attribute): t.TextAttribute {\n    return new t.TextAttribute(\n        attribute.name, attribute.value, attribute.sourceSpan, attribute.valueSpan, attribute.i18n);\n  }\n\n  visitText(text: html.Text): t.Node {\n    return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.i18n);\n  }\n\n  visitExpansion(expansion: html.Expansion): t.Icu|null {\n    const meta = expansion.i18n as i18n.Message;\n    // do not generate Icu in case it was created\n    // outside of i18n block in a template\n    if (!meta) {\n      return null;\n    }\n    const vars: {[name: string]: t.BoundText} = {};\n    const placeholders: {[name: string]: t.Text | t.BoundText} = {};\n    // extract VARs from ICUs - we process them separately while\n    // assembling resulting message via goog.getMsg function, since\n    // we need to pass them to top-level goog.getMsg call\n    Object.keys(meta.placeholders).forEach(key => {\n      const value = meta.placeholders[key];\n      if (key.startsWith(I18N_ICU_VAR_PREFIX)) {\n        const config = this.bindingParser.interpolationConfig;\n        // ICU expression is a plain string, not wrapped into start\n        // and end tags, so we wrap it before passing to binding parser\n        const wrapped = `${config.start}${value}${config.end}`;\n        vars[key] = this._visitTextWithInterpolation(wrapped, expansion.sourceSpan) as t.BoundText;\n      } else {\n        placeholders[key] = this._visitTextWithInterpolation(value, expansion.sourceSpan);\n      }\n    });\n    return new t.Icu(vars, placeholders, expansion.sourceSpan, meta);\n  }\n\n  visitExpansionCase(expansionCase: html.ExpansionCase): null { return null; }\n\n  visitComment(comment: html.Comment): null { return null; }\n\n  // convert view engine `ParsedProperty` to a format suitable for IVY\n  private extractAttributes(\n      elementName: string, properties: ParsedProperty[], i18nPropsMeta: {[key: string]: i18n.AST}):\n      {bound: t.BoundAttribute[], literal: t.TextAttribute[]} {\n    const bound: t.BoundAttribute[] = [];\n    const literal: t.TextAttribute[] = [];\n\n    properties.forEach(prop => {\n      const i18n = i18nPropsMeta[prop.name];\n      if (prop.isLiteral) {\n        literal.push(new t.TextAttribute(\n            prop.name, prop.expression.source || '', prop.sourceSpan, undefined, i18n));\n      } else {\n        // Note that validation is skipped and property mapping is disabled\n        // due to the fact that we need to make sure a given prop is not an\n        // input of a directive and directive matching happens at runtime.\n        const bep = this.bindingParser.createBoundElementProperty(\n            elementName, prop, /* skipValidation */ true, /* mapPropertyName */ false);\n        bound.push(t.BoundAttribute.fromBoundElementProperty(bep, i18n));\n      }\n    });\n\n    return {bound, literal};\n  }\n\n  private parseAttribute(\n      isTemplateElement: boolean, attribute: html.Attribute, matchableAttributes: string[][],\n      parsedProperties: ParsedProperty[], boundEvents: t.BoundEvent[], variables: t.Variable[],\n      references: t.Reference[]) {\n    const name = normalizeAttributeName(attribute.name);\n    const value = attribute.value;\n    const srcSpan = attribute.sourceSpan;\n    const absoluteOffset =\n        attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;\n\n    const bindParts = name.match(BIND_NAME_REGEXP);\n    let hasBinding = false;\n\n    if (bindParts) {\n      hasBinding = true;\n      if (bindParts[KW_BIND_IDX] != null) {\n        this.bindingParser.parsePropertyBinding(\n            bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attribute.valueSpan,\n            matchableAttributes, parsedProperties);\n\n      } else if (bindParts[KW_LET_IDX]) {\n        if (isTemplateElement) {\n          const identifier = bindParts[IDENT_KW_IDX];\n          this.parseVariable(identifier, value, srcSpan, attribute.valueSpan, variables);\n        } else {\n          this.reportError(`\"let-\" is only supported on ng-template elements.`, srcSpan);\n        }\n\n      } else if (bindParts[KW_REF_IDX]) {\n        const identifier = bindParts[IDENT_KW_IDX];\n        this.parseReference(identifier, value, srcSpan, attribute.valueSpan, references);\n\n      } else if (bindParts[KW_ON_IDX]) {\n        const events: ParsedEvent[] = [];\n        this.bindingParser.parseEvent(\n            bindParts[IDENT_KW_IDX], value, srcSpan, attribute.valueSpan || srcSpan,\n            matchableAttributes, events);\n        addEvents(events, boundEvents);\n      } else if (bindParts[KW_BINDON_IDX]) {\n        this.bindingParser.parsePropertyBinding(\n            bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attribute.valueSpan,\n            matchableAttributes, parsedProperties);\n        this.parseAssignmentEvent(\n            bindParts[IDENT_KW_IDX], value, srcSpan, attribute.valueSpan, matchableAttributes,\n            boundEvents);\n      } else if (bindParts[KW_AT_IDX]) {\n        this.bindingParser.parseLiteralAttr(\n            name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes,\n            parsedProperties);\n\n      } else if (bindParts[IDENT_BANANA_BOX_IDX]) {\n        this.bindingParser.parsePropertyBinding(\n            bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, absoluteOffset,\n            attribute.valueSpan, matchableAttributes, parsedProperties);\n        this.parseAssignmentEvent(\n            bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, attribute.valueSpan,\n            matchableAttributes, boundEvents);\n\n      } else if (bindParts[IDENT_PROPERTY_IDX]) {\n        this.bindingParser.parsePropertyBinding(\n            bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, absoluteOffset,\n            attribute.valueSpan, matchableAttributes, parsedProperties);\n\n      } else if (bindParts[IDENT_EVENT_IDX]) {\n        const events: ParsedEvent[] = [];\n        this.bindingParser.parseEvent(\n            bindParts[IDENT_EVENT_IDX], value, srcSpan, attribute.valueSpan || srcSpan,\n            matchableAttributes, events);\n        addEvents(events, boundEvents);\n      }\n    } else {\n      hasBinding = this.bindingParser.parsePropertyInterpolation(\n          name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties);\n    }\n\n    return hasBinding;\n  }\n\n  private _visitTextWithInterpolation(value: string, sourceSpan: ParseSourceSpan, i18n?: i18n.AST):\n      t.Text|t.BoundText {\n    const valueNoNgsp = replaceNgsp(value);\n    const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan);\n    return expr ? new t.BoundText(expr, sourceSpan, i18n) : new t.Text(valueNoNgsp, sourceSpan);\n  }\n\n  private parseVariable(\n      identifier: string, value: string, sourceSpan: ParseSourceSpan,\n      valueSpan: ParseSourceSpan|undefined, variables: t.Variable[]) {\n    if (identifier.indexOf('-') > -1) {\n      this.reportError(`\"-\" is not allowed in variable names`, sourceSpan);\n    }\n    variables.push(new t.Variable(identifier, value, sourceSpan, valueSpan));\n  }\n\n  private parseReference(\n      identifier: string, value: string, sourceSpan: ParseSourceSpan,\n      valueSpan: ParseSourceSpan|undefined, references: t.Reference[]) {\n    if (identifier.indexOf('-') > -1) {\n      this.reportError(`\"-\" is not allowed in reference names`, sourceSpan);\n    }\n\n    references.push(new t.Reference(identifier, value, sourceSpan, valueSpan));\n  }\n\n  private parseAssignmentEvent(\n      name: string, expression: string, sourceSpan: ParseSourceSpan,\n      valueSpan: ParseSourceSpan|undefined, targetMatchableAttrs: string[][],\n      boundEvents: t.BoundEvent[]) {\n    const events: ParsedEvent[] = [];\n    this.bindingParser.parseEvent(\n        `${name}Change`, `${expression}=$event`, sourceSpan, valueSpan || sourceSpan,\n        targetMatchableAttrs, events);\n    addEvents(events, boundEvents);\n  }\n\n  private reportError(\n      message: string, sourceSpan: ParseSourceSpan,\n      level: ParseErrorLevel = ParseErrorLevel.ERROR) {\n    this.errors.push(new ParseError(sourceSpan, message, level));\n  }\n}\n\nclass NonBindableVisitor implements html.Visitor {\n  visitElement(ast: html.Element): t.Element|null {\n    const preparsedElement = preparseElement(ast);\n    if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n        preparsedElement.type === PreparsedElementType.STYLE ||\n        preparsedElement.type === PreparsedElementType.STYLESHEET) {\n      // Skipping <script> for security reasons\n      // Skipping <style> and stylesheets as we already processed them\n      // in the StyleCompiler\n      return null;\n    }\n\n    const children: t.Node[] = html.visitAll(this, ast.children, null);\n    return new t.Element(\n        ast.name, html.visitAll(this, ast.attrs) as t.TextAttribute[],\n        /* inputs */[], /* outputs */[], children,Â  /* references */[], ast.sourceSpan,\n        ast.startSourceSpan, ast.endSourceSpan);\n  }\n\n  visitComment(comment: html.Comment): any { return null; }\n\n  visitAttribute(attribute: html.Attribute): t.TextAttribute {\n    return new t.TextAttribute(\n        attribute.name, attribute.value, attribute.sourceSpan, undefined, attribute.i18n);\n  }\n\n  visitText(text: html.Text): t.Text { return new t.Text(text.value, text.sourceSpan); }\n\n  visitExpansion(expansion: html.Expansion): any { return null; }\n\n  visitExpansionCase(expansionCase: html.ExpansionCase): any { return null; }\n}\n\nconst NON_BINDABLE_VISITOR = new NonBindableVisitor();\n\nfunction normalizeAttributeName(attrName: string): string {\n  return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\n\nfunction addEvents(events: ParsedEvent[], boundEvents: t.BoundEvent[]) {\n  boundEvents.push(...events.map(e => t.BoundEvent.fromParsedEvent(e)));\n}\n\nfunction isEmptyTextNode(node: html.Node): boolean {\n  return node instanceof html.Text && node.value.trim().length == 0;\n}\n\nfunction isCommentNode(node: html.Node): boolean {\n  return node instanceof html.Comment;\n}\n\nfunction textContents(node: html.Element): string|null {\n  if (node.children.length !== 1 || !(node.children[0] instanceof html.Text)) {\n    return null;\n  } else {\n    return (node.children[0] as html.Text).value;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AST} from '../../../expression_parser/ast';\nimport * as i18n from '../../../i18n/i18n_ast';\nimport * as o from '../../../output/output_ast';\n\nimport {assembleBoundTextPlaceholders, findIndex, getSeqNumberGenerator, updatePlaceholderMap, wrapI18nPlaceholder} from './util';\n\nenum TagType {\n  ELEMENT,\n  TEMPLATE,\n  PROJECTION\n}\n\n/**\n * Generates an object that is used as a shared state between parent and all child contexts.\n */\nfunction setupRegistry() {\n  return {getUniqueId: getSeqNumberGenerator(), icus: new Map<string, any[]>()};\n}\n\n/**\n * I18nContext is a helper class which keeps track of all i18n-related aspects\n * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.\n *\n * When we enter a nested template, the top-level context is being passed down\n * to the nested component, which uses this context to generate a child instance\n * of I18nContext class (to handle nested template) and at the end, reconciles it back\n * with the parent context.\n *\n * @param index Instruction index of i18nStart, which initiates this context\n * @param ref Reference to a translation const that represents the content if thus context\n * @param level Nestng level defined for child contexts\n * @param templateIndex Instruction index of a template which this context belongs to\n * @param meta Meta information (id, meaning, description, etc) associated with this context\n */\nexport class I18nContext {\n  public readonly id: number;\n  public bindings = new Set<AST>();\n  public placeholders = new Map<string, any[]>();\n  public isEmitted: boolean = false;\n\n  private _registry !: any;\n  private _unresolvedCtxCount: number = 0;\n\n  constructor(\n      readonly index: number, readonly ref: o.ReadVarExpr, readonly level: number = 0,\n      readonly templateIndex: number|null = null, readonly meta: i18n.AST, private registry?: any) {\n    this._registry = registry || setupRegistry();\n    this.id = this._registry.getUniqueId();\n  }\n\n  private appendTag(type: TagType, node: i18n.TagPlaceholder, index: number, closed?: boolean) {\n    if (node.isVoid && closed) {\n      return;  // ignore \"close\" for void tags\n    }\n    const ph = node.isVoid || !closed ? node.startName : node.closeName;\n    const content = {type, index, ctx: this.id, isVoid: node.isVoid, closed};\n    updatePlaceholderMap(this.placeholders, ph, content);\n  }\n\n  get icus() { return this._registry.icus; }\n  get isRoot() { return this.level === 0; }\n  get isResolved() { return this._unresolvedCtxCount === 0; }\n\n  getSerializedPlaceholders() {\n    const result = new Map<string, any[]>();\n    this.placeholders.forEach(\n        (values, key) => result.set(key, values.map(serializePlaceholderValue)));\n    return result;\n  }\n\n  // public API to accumulate i18n-related content\n  appendBinding(binding: AST) { this.bindings.add(binding); }\n  appendIcu(name: string, ref: o.Expression) {\n    updatePlaceholderMap(this._registry.icus, name, ref);\n  }\n  appendBoundText(node: i18n.AST) {\n    const phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);\n    phs.forEach((values, key) => updatePlaceholderMap(this.placeholders, key, ...values));\n  }\n  appendTemplate(node: i18n.AST, index: number) {\n    // add open and close tags at the same time,\n    // since we process nested templates separately\n    this.appendTag(TagType.TEMPLATE, node as i18n.TagPlaceholder, index, false);\n    this.appendTag(TagType.TEMPLATE, node as i18n.TagPlaceholder, index, true);\n    this._unresolvedCtxCount++;\n  }\n  appendElement(node: i18n.AST, index: number, closed?: boolean) {\n    this.appendTag(TagType.ELEMENT, node as i18n.TagPlaceholder, index, closed);\n  }\n  appendProjection(node: i18n.AST, index: number) {\n    // add open and close tags at the same time,\n    // since we process projected content separately\n    this.appendTag(TagType.PROJECTION, node as i18n.TagPlaceholder, index, false);\n    this.appendTag(TagType.PROJECTION, node as i18n.TagPlaceholder, index, true);\n  }\n\n  /**\n   * Generates an instance of a child context based on the root one,\n   * when we enter a nested template within I18n section.\n   *\n   * @param index Instruction index of corresponding i18nStart, which initiates this context\n   * @param templateIndex Instruction index of a template which this context belongs to\n   * @param meta Meta information (id, meaning, description, etc) associated with this context\n   *\n   * @returns I18nContext instance\n   */\n  forkChildContext(index: number, templateIndex: number, meta: i18n.AST) {\n    return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);\n  }\n\n  /**\n   * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).\n   *\n   * @param context Child I18nContext instance to be reconciled with parent context.\n   */\n  reconcileChildContext(context: I18nContext) {\n    // set the right context id for open and close\n    // template tags, so we can use it as sub-block ids\n    ['start', 'close'].forEach((op: string) => {\n      const key = (context.meta as any)[`${op}Name`];\n      const phs = this.placeholders.get(key) || [];\n      const tag = phs.find(findTemplateFn(this.id, context.templateIndex));\n      if (tag) {\n        tag.ctx = context.id;\n      }\n    });\n\n    // reconcile placeholders\n    const childPhs = context.placeholders;\n    childPhs.forEach((values: any[], key: string) => {\n      const phs = this.placeholders.get(key);\n      if (!phs) {\n        this.placeholders.set(key, values);\n        return;\n      }\n      // try to find matching template...\n      const tmplIdx = findIndex(phs, findTemplateFn(context.id, context.templateIndex));\n      if (tmplIdx >= 0) {\n        // ... if found - replace it with nested template content\n        const isCloseTag = key.startsWith('CLOSE');\n        const isTemplateTag = key.endsWith('NG-TEMPLATE');\n        if (isTemplateTag) {\n          // current template's content is placed before or after\n          // parent template tag, depending on the open/close atrribute\n          phs.splice(tmplIdx + (isCloseTag ? 0 : 1), 0, ...values);\n        } else {\n          const idx = isCloseTag ? values.length - 1 : 0;\n          values[idx].tmpl = phs[tmplIdx];\n          phs.splice(tmplIdx, 1, ...values);\n        }\n      } else {\n        // ... otherwise just append content to placeholder value\n        phs.push(...values);\n      }\n      this.placeholders.set(key, phs);\n    });\n    this._unresolvedCtxCount--;\n  }\n}\n\n//\n// Helper methods\n//\n\nfunction wrap(symbol: string, index: number, contextId: number, closed?: boolean): string {\n  const state = closed ? '/' : '';\n  return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);\n}\n\nfunction wrapTag(symbol: string, {index, ctx, isVoid}: any, closed?: boolean): string {\n  return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) :\n                  wrap(symbol, index, ctx, closed);\n}\n\nfunction findTemplateFn(ctx: number, templateIndex: number | null) {\n  return (token: any) => typeof token === 'object' && token.type === TagType.TEMPLATE &&\n      token.index === templateIndex && token.ctx === ctx;\n}\n\nfunction serializePlaceholderValue(value: any): string {\n  const element = (data: any, closed?: boolean) => wrapTag('#', data, closed);\n  const template = (data: any, closed?: boolean) => wrapTag('*', data, closed);\n  const projection = (data: any, closed?: boolean) => wrapTag('!', data, closed);\n\n  switch (value.type) {\n    case TagType.ELEMENT:\n      // close element tag\n      if (value.closed) {\n        return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');\n      }\n      // open element tag that also initiates a template\n      if (value.tmpl) {\n        return template(value.tmpl) + element(value) +\n            (value.isVoid ? template(value.tmpl, true) : '');\n      }\n      return element(value);\n\n    case TagType.TEMPLATE:\n      return template(value, value.closed);\n\n    case TagType.PROJECTION:\n      return projection(value, value.closed);\n\n    default:\n      return value;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst TAG_TO_PLACEHOLDER_NAMES: {[k: string]: string} = {\n  'A': 'LINK',\n  'B': 'BOLD_TEXT',\n  'BR': 'LINE_BREAK',\n  'EM': 'EMPHASISED_TEXT',\n  'H1': 'HEADING_LEVEL1',\n  'H2': 'HEADING_LEVEL2',\n  'H3': 'HEADING_LEVEL3',\n  'H4': 'HEADING_LEVEL4',\n  'H5': 'HEADING_LEVEL5',\n  'H6': 'HEADING_LEVEL6',\n  'HR': 'HORIZONTAL_RULE',\n  'I': 'ITALIC_TEXT',\n  'LI': 'LIST_ITEM',\n  'LINK': 'MEDIA_LINK',\n  'OL': 'ORDERED_LIST',\n  'P': 'PARAGRAPH',\n  'Q': 'QUOTATION',\n  'S': 'STRIKETHROUGH_TEXT',\n  'SMALL': 'SMALL_TEXT',\n  'SUB': 'SUBSTRIPT',\n  'SUP': 'SUPERSCRIPT',\n  'TBODY': 'TABLE_BODY',\n  'TD': 'TABLE_CELL',\n  'TFOOT': 'TABLE_FOOTER',\n  'TH': 'TABLE_HEADER_CELL',\n  'THEAD': 'TABLE_HEADER',\n  'TR': 'TABLE_ROW',\n  'TT': 'MONOSPACED_TEXT',\n  'U': 'UNDERLINED_TEXT',\n  'UL': 'UNORDERED_LIST',\n};\n\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nexport class PlaceholderRegistry {\n  // Count the occurrence of the base name top generate a unique name\n  private _placeHolderNameCounts: {[k: string]: number} = {};\n  // Maps signature to placeholder names\n  private _signatureToName: {[k: string]: string} = {};\n\n  getStartTagPlaceholderName(tag: string, attrs: {[k: string]: string}, isVoid: boolean): string {\n    const signature = this._hashTag(tag, attrs, isVoid);\n    if (this._signatureToName[signature]) {\n      return this._signatureToName[signature];\n    }\n\n    const upperTag = tag.toUpperCase();\n    const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n    const name = this._generateUniqueName(isVoid ? baseName : `START_${baseName}`);\n\n    this._signatureToName[signature] = name;\n\n    return name;\n  }\n\n  getCloseTagPlaceholderName(tag: string): string {\n    const signature = this._hashClosingTag(tag);\n    if (this._signatureToName[signature]) {\n      return this._signatureToName[signature];\n    }\n\n    const upperTag = tag.toUpperCase();\n    const baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || `TAG_${upperTag}`;\n    const name = this._generateUniqueName(`CLOSE_${baseName}`);\n\n    this._signatureToName[signature] = name;\n\n    return name;\n  }\n\n  getPlaceholderName(name: string, content: string): string {\n    const upperName = name.toUpperCase();\n    const signature = `PH: ${upperName}=${content}`;\n    if (this._signatureToName[signature]) {\n      return this._signatureToName[signature];\n    }\n\n    const uniqueName = this._generateUniqueName(upperName);\n    this._signatureToName[signature] = uniqueName;\n\n    return uniqueName;\n  }\n\n  getUniquePlaceholder(name: string): string {\n    return this._generateUniqueName(name.toUpperCase());\n  }\n\n  // Generate a hash for a tag - does not take attribute order into account\n  private _hashTag(tag: string, attrs: {[k: string]: string}, isVoid: boolean): string {\n    const start = `<${tag}`;\n    const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join('');\n    const end = isVoid ? '/>' : `></${tag}>`;\n\n    return start + strAttrs + end;\n  }\n\n  private _hashClosingTag(tag: string): string { return this._hashTag(`/${tag}`, {}, false); }\n\n  private _generateUniqueName(base: string): string {\n    const seen = this._placeHolderNameCounts.hasOwnProperty(base);\n    if (!seen) {\n      this._placeHolderNameCounts[base] = 1;\n      return base;\n    }\n\n    const id = this._placeHolderNameCounts[base];\n    this._placeHolderNameCounts[base] = id + 1;\n    return `${base}_${id}`;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Lexer as ExpressionLexer} from '../expression_parser/lexer';\nimport {Parser as ExpressionParser} from '../expression_parser/parser';\nimport * as html from '../ml_parser/ast';\nimport {getHtmlTagDefinition} from '../ml_parser/html_tags';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {ParseSourceSpan} from '../parse_util';\n\nimport * as i18n from './i18n_ast';\nimport {PlaceholderRegistry} from './serializers/placeholder';\n\nconst _expParser = new ExpressionParser(new ExpressionLexer());\n\ntype VisitNodeFn = (html: html.Node, i18n: i18n.Node) => void;\n\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nexport function createI18nMessageFactory(interpolationConfig: InterpolationConfig): (\n    nodes: html.Node[], meaning: string, description: string, id: string,\n    visitNodeFn?: VisitNodeFn) => i18n.Message {\n  const visitor = new _I18nVisitor(_expParser, interpolationConfig);\n\n  return (nodes: html.Node[], meaning: string, description: string, id: string,\n          visitNodeFn?: VisitNodeFn) =>\n             visitor.toI18nMessage(nodes, meaning, description, id, visitNodeFn);\n}\n\nclass _I18nVisitor implements html.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _isIcu !: boolean;\n  // TODO(issue/24571): remove '!'.\n  private _icuDepth !: number;\n  // TODO(issue/24571): remove '!'.\n  private _placeholderRegistry !: PlaceholderRegistry;\n  // TODO(issue/24571): remove '!'.\n  private _placeholderToContent !: {[phName: string]: string};\n  // TODO(issue/24571): remove '!'.\n  private _placeholderToMessage !: {[phName: string]: i18n.Message};\n  private _visitNodeFn: VisitNodeFn|undefined;\n\n  constructor(\n      private _expressionParser: ExpressionParser,\n      private _interpolationConfig: InterpolationConfig) {}\n\n  public toI18nMessage(\n      nodes: html.Node[], meaning: string, description: string, id: string,\n      visitNodeFn?: VisitNodeFn): i18n.Message {\n    this._isIcu = nodes.length == 1 && nodes[0] instanceof html.Expansion;\n    this._icuDepth = 0;\n    this._placeholderRegistry = new PlaceholderRegistry();\n    this._placeholderToContent = {};\n    this._placeholderToMessage = {};\n    this._visitNodeFn = visitNodeFn;\n\n    const i18nodes: i18n.Node[] = html.visitAll(this, nodes, {});\n\n    return new i18n.Message(\n        i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);\n  }\n\n  private _visitNode(html: html.Node, i18n: i18n.Node): i18n.Node {\n    if (this._visitNodeFn) {\n      this._visitNodeFn(html, i18n);\n    }\n    return i18n;\n  }\n\n  visitElement(el: html.Element, context: any): i18n.Node {\n    const children = html.visitAll(this, el.children);\n    const attrs: {[k: string]: string} = {};\n    el.attrs.forEach(attr => {\n      // Do not visit the attributes, translatable ones are top-level ASTs\n      attrs[attr.name] = attr.value;\n    });\n\n    const isVoid: boolean = getHtmlTagDefinition(el.name).isVoid;\n    const startPhName =\n        this._placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n    this._placeholderToContent[startPhName] = el.sourceSpan !.toString();\n\n    let closePhName = '';\n\n    if (!isVoid) {\n      closePhName = this._placeholderRegistry.getCloseTagPlaceholderName(el.name);\n      this._placeholderToContent[closePhName] = `</${el.name}>`;\n    }\n\n    const node = new i18n.TagPlaceholder(\n        el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan !);\n    return this._visitNode(el, node);\n  }\n\n  visitAttribute(attribute: html.Attribute, context: any): i18n.Node {\n    const node = this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);\n    return this._visitNode(attribute, node);\n  }\n\n  visitText(text: html.Text, context: any): i18n.Node {\n    const node = this._visitTextWithInterpolation(text.value, text.sourceSpan !);\n    return this._visitNode(text, node);\n  }\n\n  visitComment(comment: html.Comment, context: any): i18n.Node|null { return null; }\n\n  visitExpansion(icu: html.Expansion, context: any): i18n.Node {\n    this._icuDepth++;\n    const i18nIcuCases: {[k: string]: i18n.Node} = {};\n    const i18nIcu = new i18n.Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n    icu.cases.forEach((caze): void => {\n      i18nIcuCases[caze.value] = new i18n.Container(\n          caze.expression.map((node) => node.visit(this, {})), caze.expSourceSpan);\n    });\n    this._icuDepth--;\n\n    if (this._isIcu || this._icuDepth > 0) {\n      // Returns an ICU node when:\n      // - the message (vs a part of the message) is an ICU message, or\n      // - the ICU message is nested.\n      const expPh = this._placeholderRegistry.getUniquePlaceholder(`VAR_${icu.type}`);\n      i18nIcu.expressionPlaceholder = expPh;\n      this._placeholderToContent[expPh] = icu.switchValue;\n      return this._visitNode(icu, i18nIcu);\n    }\n\n    // Else returns a placeholder\n    // ICU placeholders should not be replaced with their original content but with the their\n    // translations. We need to create a new visitor (they are not re-entrant) to compute the\n    // message id.\n    // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n    const phName = this._placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n    const visitor = new _I18nVisitor(this._expressionParser, this._interpolationConfig);\n    this._placeholderToMessage[phName] = visitor.toI18nMessage([icu], '', '', '');\n    const node = new i18n.IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n    return this._visitNode(icu, node);\n  }\n\n  visitExpansionCase(icuCase: html.ExpansionCase, context: any): i18n.Node {\n    throw new Error('Unreachable code');\n  }\n\n  private _visitTextWithInterpolation(text: string, sourceSpan: ParseSourceSpan): i18n.Node {\n    const splitInterpolation = this._expressionParser.splitInterpolation(\n        text, sourceSpan.start.toString(), this._interpolationConfig);\n\n    if (!splitInterpolation) {\n      // No expression, return a single text\n      return new i18n.Text(text, sourceSpan);\n    }\n\n    // Return a group of text + expressions\n    const nodes: i18n.Node[] = [];\n    const container = new i18n.Container(nodes, sourceSpan);\n    const {start: sDelimiter, end: eDelimiter} = this._interpolationConfig;\n\n    for (let i = 0; i < splitInterpolation.strings.length - 1; i++) {\n      const expression = splitInterpolation.expressions[i];\n      const baseName = _extractPlaceholderName(expression) || 'INTERPOLATION';\n      const phName = this._placeholderRegistry.getPlaceholderName(baseName, expression);\n\n      if (splitInterpolation.strings[i].length) {\n        // No need to add empty strings\n        nodes.push(new i18n.Text(splitInterpolation.strings[i], sourceSpan));\n      }\n\n      nodes.push(new i18n.Placeholder(expression, phName, sourceSpan));\n      this._placeholderToContent[phName] = sDelimiter + expression + eDelimiter;\n    }\n\n    // The last index contains no expression\n    const lastStringIdx = splitInterpolation.strings.length - 1;\n    if (splitInterpolation.strings[lastStringIdx].length) {\n      nodes.push(new i18n.Text(splitInterpolation.strings[lastStringIdx], sourceSpan));\n    }\n    return container;\n  }\n}\n\nconst _CUSTOM_PH_EXP =\n    /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\n\nfunction _extractPlaceholderName(input: string): string {\n  return input.split(_CUSTOM_PH_EXP)[2];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {decimalDigest} from '../../../i18n/digest';\nimport * as i18n from '../../../i18n/i18n_ast';\nimport {createI18nMessageFactory} from '../../../i18n/i18n_parser';\nimport * as html from '../../../ml_parser/ast';\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../../ml_parser/interpolation_config';\nimport {ParseTreeResult} from '../../../ml_parser/parser';\n\nimport {I18N_ATTR, I18N_ATTR_PREFIX, I18nMeta, hasI18nAttrs, icuFromI18nMessage, metaFromI18nMessage, parseI18nMeta} from './util';\n\nfunction setI18nRefs(html: html.Node & {i18n?: i18n.AST}, i18n: i18n.Node) {\n  html.i18n = i18n;\n}\n\n/**\n * This visitor walks over HTML parse tree and converts information stored in\n * i18n-related attributes (\"i18n\" and \"i18n-*\") into i18n meta object that is\n * stored with other element's and attribute's information.\n */\nexport class I18nMetaVisitor implements html.Visitor {\n  private _createI18nMessage: any;\n\n  constructor(\n      private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG,\n      private keepI18nAttrs: boolean = false) {\n    // i18n message generation factory\n    this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n  }\n\n  private _generateI18nMessage(\n      nodes: html.Node[], meta: string|i18n.AST = '',\n      visitNodeFn?: (html: html.Node, i18n: i18n.Node) => void): i18n.Message {\n    const parsed: I18nMeta =\n        typeof meta === 'string' ? parseI18nMeta(meta) : metaFromI18nMessage(meta as i18n.Message);\n    const message = this._createI18nMessage(\n        nodes, parsed.meaning || '', parsed.description || '', parsed.id || '', visitNodeFn);\n    if (!message.id) {\n      // generate (or restore) message id if not specified in template\n      message.id = typeof meta !== 'string' && (meta as i18n.Message).id || decimalDigest(message);\n    }\n    return message;\n  }\n\n  visitElement(element: html.Element, context: any): any {\n    if (hasI18nAttrs(element)) {\n      const attrs: html.Attribute[] = [];\n      const attrsMeta: {[key: string]: string} = {};\n\n      for (const attr of element.attrs) {\n        if (attr.name === I18N_ATTR) {\n          // root 'i18n' node attribute\n          const i18n = element.i18n || attr.value;\n          const message = this._generateI18nMessage(element.children, i18n, setI18nRefs);\n          // do not assign empty i18n meta\n          if (message.nodes.length) {\n            element.i18n = message;\n          }\n\n        } else if (attr.name.startsWith(I18N_ATTR_PREFIX)) {\n          // 'i18n-*' attributes\n          const key = attr.name.slice(I18N_ATTR_PREFIX.length);\n          attrsMeta[key] = attr.value;\n\n        } else {\n          // non-i18n attributes\n          attrs.push(attr);\n        }\n      }\n\n      // set i18n meta for attributes\n      if (Object.keys(attrsMeta).length) {\n        for (const attr of attrs) {\n          const meta = attrsMeta[attr.name];\n          // do not create translation for empty attributes\n          if (meta !== undefined && attr.value) {\n            attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);\n          }\n        }\n      }\n\n      if (!this.keepI18nAttrs) {\n        // update element's attributes,\n        // keeping only non-i18n related ones\n        element.attrs = attrs;\n      }\n    }\n    html.visitAll(this, element.children);\n    return element;\n  }\n\n  visitExpansion(expansion: html.Expansion, context: any): any {\n    let message;\n    const meta = expansion.i18n;\n    if (meta instanceof i18n.IcuPlaceholder) {\n      // set ICU placeholder name (e.g. \"ICU_1\"),\n      // generated while processing root element contents,\n      // so we can reference it when we output translation\n      const name = meta.name;\n      message = this._generateI18nMessage([expansion], meta);\n      const icu = icuFromI18nMessage(message);\n      icu.name = name;\n    } else {\n      // when ICU is a root level translation\n      message = this._generateI18nMessage([expansion], meta);\n    }\n    expansion.i18n = message;\n    return expansion;\n  }\n\n  visitText(text: html.Text, context: any): any { return text; }\n  visitAttribute(attribute: html.Attribute, context: any): any { return attribute; }\n  visitComment(comment: html.Comment, context: any): any { return comment; }\n  visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any { return expansionCase; }\n}\n\nexport function processI18nMeta(\n    htmlAstWithErrors: ParseTreeResult,\n    interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ParseTreeResult {\n  return new ParseTreeResult(\n      html.visitAll(\n          new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ false),\n          htmlAstWithErrors.rootNodes),\n      htmlAstWithErrors.errors);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as i18n from '../../../i18n/i18n_ast';\n\nimport {formatI18nPlaceholderName} from './util';\n\n/**\n * This visitor walks over i18n tree and generates its string representation, including ICUs and\n * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.\n */\nclass SerializerVisitor implements i18n.Visitor {\n  /**\n   * Keeps track of ICU nesting level, allowing to detect that we are processing elements of an ICU.\n   *\n   * This is needed due to the fact that placeholders in ICUs and in other messages are represented\n   * differently in Closure:\n   * - {$placeholder} in non-ICU case\n   * - {PLACEHOLDER} inside ICU\n   */\n  private icuNestingLevel = 0;\n\n  private formatPh(value: string): string {\n    const isInsideIcu = this.icuNestingLevel > 0;\n    const formatted = formatI18nPlaceholderName(value, /* useCamelCase */ !isInsideIcu);\n    return isInsideIcu ? `{${formatted}}` : `{$${formatted}}`;\n  }\n\n  visitText(text: i18n.Text, context: any): any { return text.value; }\n\n  visitContainer(container: i18n.Container, context: any): any {\n    return container.children.map(child => child.visit(this)).join('');\n  }\n\n  visitIcu(icu: i18n.Icu, context: any): any {\n    this.icuNestingLevel++;\n    const strCases =\n        Object.keys(icu.cases).map((k: string) => `${k} {${icu.cases[k].visit(this)}}`);\n    const result = `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`;\n    this.icuNestingLevel--;\n    return result;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context: any): any {\n    return ph.isVoid ?\n        this.formatPh(ph.startName) :\n        `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`;\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context: any): any { return this.formatPh(ph.name); }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any {\n    return this.formatPh(ph.name);\n  }\n}\n\nconst serializerVisitor = new SerializerVisitor();\n\nexport function getSerializedI18nContent(message: i18n.Message): string {\n  return message.nodes.map(node => node.visit(serializerVisitor, null)).join('');\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {flatten, sanitizeIdentifier} from '../../compile_metadata';\nimport {BindingForm, BuiltinFunctionCall, LocalResolver, convertActionBinding, convertPropertyBinding, convertUpdateArguments} from '../../compiler_util/expression_converter';\nimport {ConstantPool} from '../../constant_pool';\nimport * as core from '../../core';\nimport {AST, AstMemoryEfficientTransformer, BindingPipe, BindingType, FunctionCall, ImplicitReceiver, Interpolation, LiteralArray, LiteralMap, LiteralPrimitive, ParsedEventType, PropertyRead} from '../../expression_parser/ast';\nimport {Lexer} from '../../expression_parser/lexer';\nimport {Parser} from '../../expression_parser/parser';\nimport * as i18n from '../../i18n/i18n_ast';\nimport * as html from '../../ml_parser/ast';\nimport {HtmlParser} from '../../ml_parser/html_parser';\nimport {WhitespaceVisitor} from '../../ml_parser/html_whitespaces';\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../ml_parser/interpolation_config';\nimport {LexerRange} from '../../ml_parser/lexer';\nimport {isNgContainer as checkIsNgContainer, splitNsName} from '../../ml_parser/tags';\nimport {mapLiteral} from '../../output/map_util';\nimport * as o from '../../output/output_ast';\nimport {ParseError, ParseSourceSpan} from '../../parse_util';\nimport {DomElementSchemaRegistry} from '../../schema/dom_element_schema_registry';\nimport {CssSelector, SelectorMatcher} from '../../selector';\nimport {BindingParser} from '../../template_parser/binding_parser';\nimport {error} from '../../util';\nimport * as t from '../r3_ast';\nimport {Identifiers as R3} from '../r3_identifiers';\nimport {htmlAstToRender3Ast} from '../r3_template_transform';\nimport {prepareSyntheticListenerFunctionName, prepareSyntheticListenerName, prepareSyntheticPropertyName} from '../util';\n\nimport {I18nContext} from './i18n/context';\nimport {I18nMetaVisitor} from './i18n/meta';\nimport {getSerializedI18nContent} from './i18n/serializer';\nimport {I18N_ICU_MAPPING_PREFIX, TRANSLATION_PREFIX, assembleBoundTextPlaceholders, assembleI18nBoundString, formatI18nPlaceholderName, getTranslationConstPrefix, getTranslationDeclStmts, icuFromI18nMessage, isI18nRootNode, isSingleI18nIcu, metaFromI18nMessage, placeholdersToParams, wrapI18nPlaceholder} from './i18n/util';\nimport {StylingBuilder, StylingInstruction} from './styling_builder';\nimport {CONTEXT_NAME, IMPLICIT_REFERENCE, NON_BINDABLE_ATTR, REFERENCE_PREFIX, RENDER_FLAGS, asLiteral, chainedInstruction, getAttrsForDirectiveMatching, getInterpolationArgsLength, invalid, trimTrailingNulls, unsupported} from './util';\n\n\n\n// Selector attribute name of `<ng-content>`\nconst NG_CONTENT_SELECT_ATTR = 'select';\n\n// Attribute name of `ngProjectAs`.\nconst NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n\n// List of supported global targets for event listeners\nconst GLOBAL_TARGET_RESOLVERS = new Map<string, o.ExternalReference>(\n    [['window', R3.resolveWindow], ['document', R3.resolveDocument], ['body', R3.resolveBody]]);\n\nconst LEADING_TRIVIA_CHARS = [' ', '\\n', '\\r', '\\t'];\n\n//  if (rf & flags) { .. }\nexport function renderFlagCheckIfStmt(\n    flags: core.RenderFlags, statements: o.Statement[]): o.IfStmt {\n  return o.ifStmt(o.variable(RENDER_FLAGS).bitwiseAnd(o.literal(flags), null, false), statements);\n}\n\nexport function prepareEventListenerParameters(\n    eventAst: t.BoundEvent, handlerName: string | null = null,\n    scope: BindingScope | null = null): o.Expression[] {\n  const {type, name, target, phase, handler} = eventAst;\n  if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {\n    throw new Error(`Unexpected global target '${target}' defined for '${name}' event.\n        Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS.keys())}.`);\n  }\n\n  const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?\n      o.variable(CONTEXT_NAME) :\n      scope.getOrCreateSharedContextVar(0);\n  const bindingExpr = convertActionBinding(\n      scope, implicitReceiverExpr, handler, 'b', () => error('Unexpected interpolation'),\n      eventAst.handlerSpan);\n\n  const statements = [];\n  if (scope) {\n    statements.push(...scope.restoreViewStatement());\n    statements.push(...scope.variableDeclarations());\n  }\n  statements.push(...bindingExpr.render3Stmts);\n\n  const eventName: string =\n      type === ParsedEventType.Animation ? prepareSyntheticListenerName(name, phase !) : name;\n  const fnName = handlerName && sanitizeIdentifier(handlerName);\n  const fnArgs = [new o.FnParam('$event', o.DYNAMIC_TYPE)];\n  const handlerFn = o.fn(fnArgs, statements, o.INFERRED_TYPE, null, fnName);\n\n  const params: o.Expression[] = [o.literal(eventName), handlerFn];\n  if (target) {\n    params.push(\n        o.literal(false),  // `useCapture` flag, defaults to `false`\n        o.importExpr(GLOBAL_TARGET_RESOLVERS.get(target) !));\n  }\n  return params;\n}\n\nexport class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver {\n  private _dataIndex = 0;\n  private _bindingContext = 0;\n  private _prefixCode: o.Statement[] = [];\n  /**\n   * List of callbacks to generate creation mode instructions. We store them here as we process\n   * the template so bindings in listeners are resolved only once all nodes have been visited.\n   * This ensures all local refs and context variables are available for matching.\n   */\n  private _creationCodeFns: (() => o.Statement)[] = [];\n  /**\n   * List of callbacks to generate update mode instructions. We store them here as we process\n   * the template so bindings are resolved only once all nodes have been visited. This ensures\n   * all local refs and context variables are available for matching.\n   */\n  private _updateCodeFns: (() => o.Statement)[] = [];\n  /**\n   * Memorizes the last node index for which a select instruction has been generated.\n   * We're initializing this to -1 to ensure the `select(0)` instruction is generated before any\n   * relevant update instructions.\n   */\n  private _lastNodeIndexWithFlush: number = -1;\n  /** Temporary variable declarations generated from visiting pipes, literals, etc. */\n  private _tempVariables: o.Statement[] = [];\n  /**\n   * List of callbacks to build nested templates. Nested templates must not be visited until\n   * after the parent template has finished visiting all of its nodes. This ensures that all\n   * local ref bindings in nested templates are able to find local ref values if the refs\n   * are defined after the template declaration.\n   */\n  private _nestedTemplateFns: (() => void)[] = [];\n  /**\n   * This scope contains local variables declared in the update mode block of the template.\n   * (e.g. refs and context vars in bindings)\n   */\n  private _bindingScope: BindingScope;\n  private _valueConverter: ValueConverter;\n  private _unsupported = unsupported;\n\n  // i18n context local to this template\n  private i18n: I18nContext|null = null;\n\n  // Number of slots to reserve for pureFunctions\n  private _pureFunctionSlots = 0;\n\n  // Number of binding slots\n  private _bindingSlots = 0;\n\n  private fileBasedI18nSuffix: string;\n\n  // Projection slots found in the template. Projection slots can distribute projected\n  // nodes based on a selector, or can just use the wildcard selector to match\n  // all nodes which aren't matching any selector.\n  private _ngContentReservedSlots: (string|'*')[] = [];\n\n  // Number of non-default selectors found in all parent templates of this template. We need to\n  // track it to properly adjust projection slot index in the `projection` instruction.\n  private _ngContentSelectorsOffset = 0;\n\n  // Expression that should be used as implicit receiver when converting template\n  // expressions to output AST.\n  private _implicitReceiverExpr: o.ReadVarExpr|null = null;\n\n  constructor(\n      private constantPool: ConstantPool, parentBindingScope: BindingScope, private level = 0,\n      private contextName: string|null, private i18nContext: I18nContext|null,\n      private templateIndex: number|null, private templateName: string|null,\n      private directiveMatcher: SelectorMatcher|null, private directives: Set<o.Expression>,\n      private pipeTypeByName: Map<string, o.Expression>, private pipes: Set<o.Expression>,\n      private _namespace: o.ExternalReference, private relativeContextFilePath: string,\n      private i18nUseExternalIds: boolean) {\n    this._bindingScope = parentBindingScope.nestedScope(level);\n\n    // Turn the relative context file path into an identifier by replacing non-alphanumeric\n    // characters with underscores.\n    this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';\n\n    this._valueConverter = new ValueConverter(\n        constantPool, () => this.allocateDataSlot(),\n        (numSlots: number) => this.allocatePureFunctionSlots(numSlots),\n        (name, localName, slot, value: o.Expression) => {\n          const pipeType = pipeTypeByName.get(name);\n          if (pipeType) {\n            this.pipes.add(pipeType);\n          }\n          this._bindingScope.set(this.level, localName, value);\n          this.creationInstruction(null, R3.pipe, [o.literal(slot), o.literal(name)]);\n        });\n  }\n\n  registerContextVariables(variable: t.Variable) {\n    const scopedName = this._bindingScope.freshReferenceName();\n    const retrievalLevel = this.level;\n    const lhs = o.variable(variable.name + scopedName);\n    this._bindingScope.set(\n        retrievalLevel, variable.name, lhs, DeclarationPriority.CONTEXT,\n        (scope: BindingScope, relativeLevel: number) => {\n          let rhs: o.Expression;\n          if (scope.bindingLevel === retrievalLevel) {\n            // e.g. ctx\n            rhs = o.variable(CONTEXT_NAME);\n          } else {\n            const sharedCtxVar = scope.getSharedContextName(retrievalLevel);\n            // e.g. ctx_r0   OR  x(2);\n            rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);\n          }\n          // e.g. const $item$ = x(2).$implicit;\n          return [lhs.set(rhs.prop(variable.value || IMPLICIT_REFERENCE)).toConstDecl()];\n        });\n  }\n\n  buildTemplateFunction(\n      nodes: t.Node[], variables: t.Variable[], ngContentSelectorsOffset: number = 0,\n      i18n?: i18n.AST): o.FunctionExpr {\n    this._ngContentSelectorsOffset = ngContentSelectorsOffset;\n\n    if (this._namespace !== R3.namespaceHTML) {\n      this.creationInstruction(null, this._namespace);\n    }\n\n    // Create variable bindings\n    variables.forEach(v => this.registerContextVariables(v));\n\n    // Initiate i18n context in case:\n    // - this template has parent i18n context\n    // - or the template has i18n meta associated with it,\n    //   but it's not initiated by the Element (e.g. <ng-template i18n>)\n    const initI18nContext =\n        this.i18nContext || (isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) &&\n                             !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n));\n    const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);\n    if (initI18nContext) {\n      this.i18nStart(null, i18n !, selfClosingI18nInstruction);\n    }\n\n    // This is the initial pass through the nodes of this template. In this pass, we\n    // queue all creation mode and update mode instructions for generation in the second\n    // pass. It's necessary to separate the passes to ensure local refs are defined before\n    // resolving bindings. We also count bindings in this pass as we walk bound expressions.\n    t.visitAll(this, nodes);\n\n    // Add total binding count to pure function count so pure function instructions are\n    // generated with the correct slot offset when update instructions are processed.\n    this._pureFunctionSlots += this._bindingSlots;\n\n    // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and\n    // `pipeBind` update instructions), so we have to update the slot offsets manually\n    // to account for bindings.\n    this._valueConverter.updatePipeSlotOffsets(this._bindingSlots);\n\n    // Nested templates must be processed before creation instructions so template()\n    // instructions can be generated with the correct internal const count.\n    this._nestedTemplateFns.forEach(buildTemplateFn => buildTemplateFn());\n\n    // Output the `projectionDef` instruction when some `<ng-content>` tags are present.\n    // The `projectionDef` instruction is only emitted for the component template and\n    // is skipped for nested templates (<ng-template> tags).\n    if (this.level === 0 && this._ngContentReservedSlots.length) {\n      const parameters: o.Expression[] = [];\n\n      // By default the `projectionDef` instructions creates one slot for the wildcard\n      // selector if no parameters are passed. Therefore we only want to allocate a new\n      // array for the projection slots if the default projection slot is not sufficient.\n      if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {\n        const r3ReservedSlots = this._ngContentReservedSlots.map(\n            s => s !== '*' ? core.parseSelectorToR3Selector(s) : s);\n        parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));\n      }\n\n      // Since we accumulate ngContent selectors while processing template elements,\n      // we *prepend* `projectionDef` to creation instructions block, to put it before\n      // any `projection` instructions\n      this.creationInstruction(null, R3.projectionDef, parameters, /* prepend */ true);\n    }\n\n    if (initI18nContext) {\n      this.i18nEnd(null, selfClosingI18nInstruction);\n    }\n\n    // Generate all the creation mode instructions (e.g. resolve bindings in listeners)\n    const creationStatements = this._creationCodeFns.map((fn: () => o.Statement) => fn());\n\n    // Generate all the update mode instructions (e.g. resolve property or text bindings)\n    const updateStatements = this._updateCodeFns.map((fn: () => o.Statement) => fn());\n\n    //  Variable declaration must occur after binding resolution so we can generate context\n    //  instructions that build on each other.\n    // e.g. const b = nextContext().$implicit(); const b = nextContext();\n    const creationVariables = this._bindingScope.viewSnapshotStatements();\n    const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);\n\n    const creationBlock = creationStatements.length > 0 ?\n        [renderFlagCheckIfStmt(\n            core.RenderFlags.Create, creationVariables.concat(creationStatements))] :\n        [];\n\n    const updateBlock = updateStatements.length > 0 ?\n        [renderFlagCheckIfStmt(core.RenderFlags.Update, updateVariables.concat(updateStatements))] :\n        [];\n\n    return o.fn(\n        // i.e. (rf: RenderFlags, ctx: any)\n        [new o.FnParam(RENDER_FLAGS, o.NUMBER_TYPE), new o.FnParam(CONTEXT_NAME, null)],\n        [\n          // Temporary variable declarations for query refresh (i.e. let _t: any;)\n          ...this._prefixCode,\n          // Creating mode (i.e. if (rf & RenderFlags.Create) { ... })\n          ...creationBlock,\n          // Binding and refresh mode (i.e. if (rf & RenderFlags.Update) {...})\n          ...updateBlock,\n        ],\n        o.INFERRED_TYPE, null, this.templateName);\n  }\n\n  // LocalResolver\n  getLocal(name: string): o.Expression|null { return this._bindingScope.get(name); }\n\n  // LocalResolver\n  notifyImplicitReceiverUse(): void { this._bindingScope.notifyImplicitReceiverUse(); }\n\n  i18nTranslate(\n      message: i18n.Message, params: {[name: string]: o.Expression} = {}, ref?: o.ReadVarExpr,\n      transformFn?: (raw: o.ReadVarExpr) => o.Expression): o.ReadVarExpr {\n    const _ref = ref || o.variable(this.constantPool.uniqueName(TRANSLATION_PREFIX));\n    // Closure Compiler requires const names to start with `MSG_` but disallows any other const to\n    // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call\n    const closureVar = this.i18nGenerateClosureVar(message.id);\n    const formattedParams = this.i18nFormatPlaceholderNames(params, /* useCamelCase */ true);\n    const meta = metaFromI18nMessage(message);\n    const content = getSerializedI18nContent(message);\n    const statements =\n        getTranslationDeclStmts(_ref, closureVar, content, meta, formattedParams, transformFn);\n    this.constantPool.statements.push(...statements);\n    return _ref;\n  }\n\n  i18nFormatPlaceholderNames(params: {[name: string]: o.Expression} = {}, useCamelCase: boolean) {\n    const _params: {[key: string]: o.Expression} = {};\n    if (params && Object.keys(params).length) {\n      Object.keys(params).forEach(\n          key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);\n    }\n    return _params;\n  }\n\n  i18nAppendBindings(expressions: AST[]) {\n    if (expressions.length > 0) {\n      expressions.forEach(expression => this.i18n !.appendBinding(expression));\n    }\n  }\n\n  i18nBindProps(props: {[key: string]: t.Text | t.BoundText}): {[key: string]: o.Expression} {\n    const bound: {[key: string]: o.Expression} = {};\n    Object.keys(props).forEach(key => {\n      const prop = props[key];\n      if (prop instanceof t.Text) {\n        bound[key] = o.literal(prop.value);\n      } else {\n        const value = prop.value.visit(this._valueConverter);\n        this.allocateBindingSlots(value);\n        if (value instanceof Interpolation) {\n          const {strings, expressions} = value;\n          const {id, bindings} = this.i18n !;\n          const label = assembleI18nBoundString(strings, bindings.size, id);\n          this.i18nAppendBindings(expressions);\n          bound[key] = o.literal(label);\n        }\n      }\n    });\n    return bound;\n  }\n\n  i18nGenerateClosureVar(messageId: string): o.ReadVarExpr {\n    let name: string;\n    const suffix = this.fileBasedI18nSuffix.toUpperCase();\n    if (this.i18nUseExternalIds) {\n      const prefix = getTranslationConstPrefix(`EXTERNAL_`);\n      const uniqueSuffix = this.constantPool.uniqueName(suffix);\n      name = `${prefix}${sanitizeIdentifier(messageId)}$$${uniqueSuffix}`;\n    } else {\n      const prefix = getTranslationConstPrefix(suffix);\n      name = this.constantPool.uniqueName(prefix);\n    }\n    return o.variable(name);\n  }\n\n  i18nUpdateRef(context: I18nContext): void {\n    const {icus, meta, isRoot, isResolved, isEmitted} = context;\n    if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {\n      context.isEmitted = true;\n      const placeholders = context.getSerializedPlaceholders();\n      let icuMapping: {[name: string]: o.Expression} = {};\n      let params: {[name: string]: o.Expression} =\n          placeholders.size ? placeholdersToParams(placeholders) : {};\n      if (icus.size) {\n        icus.forEach((refs: o.Expression[], key: string) => {\n          if (refs.length === 1) {\n            // if we have one ICU defined for a given\n            // placeholder - just output its reference\n            params[key] = refs[0];\n          } else {\n            // ... otherwise we need to activate post-processing\n            // to replace ICU placeholders with proper values\n            const placeholder: string = wrapI18nPlaceholder(`${I18N_ICU_MAPPING_PREFIX}${key}`);\n            params[key] = o.literal(placeholder);\n            icuMapping[key] = o.literalArr(refs);\n          }\n        });\n      }\n\n      // translation requires post processing in 2 cases:\n      // - if we have placeholders with multiple values (ex. `START_DIV`: [ï¿½#1ï¿½, ï¿½#2ï¿½, ...])\n      // - if we have multiple ICUs that refer to the same placeholder name\n      const needsPostprocessing =\n          Array.from(placeholders.values()).some((value: string[]) => value.length > 1) ||\n          Object.keys(icuMapping).length;\n\n      let transformFn;\n      if (needsPostprocessing) {\n        transformFn = (raw: o.ReadVarExpr) => {\n          const args: o.Expression[] = [raw];\n          if (Object.keys(icuMapping).length) {\n            args.push(mapLiteral(icuMapping, true));\n          }\n          return instruction(null, R3.i18nPostprocess, args);\n        };\n      }\n      this.i18nTranslate(meta as i18n.Message, params, context.ref, transformFn);\n    }\n  }\n\n  i18nStart(span: ParseSourceSpan|null = null, meta: i18n.AST, selfClosing?: boolean): void {\n    const index = this.allocateDataSlot();\n    if (this.i18nContext) {\n      this.i18n = this.i18nContext.forkChildContext(index, this.templateIndex !, meta);\n    } else {\n      const ref = o.variable(this.constantPool.uniqueName(TRANSLATION_PREFIX));\n      this.i18n = new I18nContext(index, ref, 0, this.templateIndex, meta);\n    }\n\n    // generate i18nStart instruction\n    const {id, ref} = this.i18n;\n    const params: o.Expression[] = [o.literal(index), ref];\n    if (id > 0) {\n      // do not push 3rd argument (sub-block id)\n      // into i18nStart call for top level i18n context\n      params.push(o.literal(id));\n    }\n    this.creationInstruction(span, selfClosing ? R3.i18n : R3.i18nStart, params);\n  }\n\n  i18nEnd(span: ParseSourceSpan|null = null, selfClosing?: boolean): void {\n    if (!this.i18n) {\n      throw new Error('i18nEnd is executed with no i18n context present');\n    }\n\n    if (this.i18nContext) {\n      this.i18nContext.reconcileChildContext(this.i18n);\n      this.i18nUpdateRef(this.i18nContext);\n    } else {\n      this.i18nUpdateRef(this.i18n);\n    }\n\n    // setup accumulated bindings\n    const {index, bindings} = this.i18n;\n    if (bindings.size) {\n      const chainBindings: ChainableBindingInstruction[] = [];\n      bindings.forEach(binding => {\n        chainBindings.push({sourceSpan: span, value: () => this.convertPropertyBinding(binding)});\n      });\n      this.updateInstructionChain(index, R3.i18nExp, chainBindings);\n      this.updateInstruction(index, span, R3.i18nApply, [o.literal(index)]);\n    }\n    if (!selfClosing) {\n      this.creationInstruction(span, R3.i18nEnd);\n    }\n    this.i18n = null;  // reset local i18n context\n  }\n\n  visitContent(ngContent: t.Content) {\n    const slot = this.allocateDataSlot();\n    const projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;\n    const parameters: o.Expression[] = [o.literal(slot)];\n    const attributes: o.Expression[] = [];\n\n    this._ngContentReservedSlots.push(ngContent.selector);\n\n    ngContent.attributes.forEach((attribute) => {\n      const {name, value} = attribute;\n      if (name === NG_PROJECT_AS_ATTR_NAME) {\n        attributes.push(...getNgProjectAsLiteral(attribute));\n      } else if (name.toLowerCase() !== NG_CONTENT_SELECT_ATTR) {\n        attributes.push(o.literal(name), o.literal(value));\n      }\n    });\n\n    if (attributes.length > 0) {\n      parameters.push(o.literal(projectionSlotIdx), o.literalArr(attributes));\n    } else if (projectionSlotIdx !== 0) {\n      parameters.push(o.literal(projectionSlotIdx));\n    }\n\n    this.creationInstruction(ngContent.sourceSpan, R3.projection, parameters);\n    if (this.i18n) {\n      this.i18n.appendProjection(ngContent.i18n !, slot);\n    }\n  }\n\n\n  getNamespaceInstruction(namespaceKey: string|null) {\n    switch (namespaceKey) {\n      case 'math':\n        return R3.namespaceMathML;\n      case 'svg':\n        return R3.namespaceSVG;\n      default:\n        return R3.namespaceHTML;\n    }\n  }\n\n  addNamespaceInstruction(nsInstruction: o.ExternalReference, element: t.Element) {\n    this._namespace = nsInstruction;\n    this.creationInstruction(element.sourceSpan, nsInstruction);\n  }\n\n  visitElement(element: t.Element) {\n    const elementIndex = this.allocateDataSlot();\n    const stylingBuilder = new StylingBuilder(o.literal(elementIndex), null);\n\n    let isNonBindableMode: boolean = false;\n    const isI18nRootElement: boolean =\n        isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);\n\n    if (isI18nRootElement && this.i18n) {\n      throw new Error(`Could not mark an element as translatable inside of a translatable section`);\n    }\n\n    const i18nAttrs: (t.TextAttribute | t.BoundAttribute)[] = [];\n    const outputAttrs: t.TextAttribute[] = [];\n\n    const [namespaceKey, elementName] = splitNsName(element.name);\n    const isNgContainer = checkIsNgContainer(element.name);\n\n    // Handle styling, i18n, ngNonBindable attributes\n    for (const attr of element.attributes) {\n      const {name, value} = attr;\n      if (name === NON_BINDABLE_ATTR) {\n        isNonBindableMode = true;\n      } else if (name === 'style') {\n        stylingBuilder.registerStyleAttr(value);\n      } else if (name === 'class') {\n        stylingBuilder.registerClassAttr(value);\n      } else {\n        if (attr.i18n) {\n          // Place attributes into a separate array for i18n processing, but also keep such\n          // attributes in the main list to make them available for directive matching at runtime.\n          // TODO(FW-1248): prevent attributes duplication in `i18nAttributes` and `elementStart`\n          // arguments\n          i18nAttrs.push(attr);\n        } else {\n          outputAttrs.push(attr);\n        }\n      }\n    }\n\n    // Match directives on non i18n attributes\n    this.matchDirectives(element.name, element);\n\n    // Regular element or ng-container creation mode\n    const parameters: o.Expression[] = [o.literal(elementIndex)];\n    if (!isNgContainer) {\n      parameters.push(o.literal(elementName));\n    }\n\n    // Add the attributes\n    const attributes: o.Expression[] = [];\n    const allOtherInputs: t.BoundAttribute[] = [];\n\n    element.inputs.forEach((input: t.BoundAttribute) => {\n      const stylingInputWasSet = stylingBuilder.registerBoundInput(input);\n      if (!stylingInputWasSet) {\n        if (input.type === BindingType.Property && input.i18n) {\n          // Place attributes into a separate array for i18n processing, but also keep such\n          // attributes in the main list to make them available for directive matching at runtime.\n          // TODO(FW-1248): prevent attributes duplication in `i18nAttributes` and `elementStart`\n          // arguments\n          i18nAttrs.push(input);\n        } else {\n          allOtherInputs.push(input);\n        }\n      }\n    });\n\n    outputAttrs.forEach(attr => {\n      if (attr.name === NG_PROJECT_AS_ATTR_NAME) {\n        attributes.push(...getNgProjectAsLiteral(attr));\n      } else {\n        attributes.push(...getAttributeNameLiterals(attr.name), o.literal(attr.value));\n      }\n    });\n\n    // add attributes for directive and projection matching purposes\n    attributes.push(...this.prepareNonRenderAttrs(\n        allOtherInputs, element.outputs, stylingBuilder, [], i18nAttrs));\n    parameters.push(this.toAttrsParam(attributes));\n\n    // local refs (ex.: <div #foo #bar=\"baz\">)\n    parameters.push(this.prepareRefsParameter(element.references));\n\n    const wasInNamespace = this._namespace;\n    const currentNamespace = this.getNamespaceInstruction(namespaceKey);\n\n    // If the namespace is changing now, include an instruction to change it\n    // during element creation.\n    if (currentNamespace !== wasInNamespace) {\n      this.addNamespaceInstruction(currentNamespace, element);\n    }\n\n    if (this.i18n) {\n      this.i18n.appendElement(element.i18n !, elementIndex);\n    }\n\n    // Note that we do not append text node instructions and ICUs inside i18n section,\n    // so we exclude them while calculating whether current element has children\n    const hasChildren = (!isI18nRootElement && this.i18n) ? !hasTextChildrenOnly(element.children) :\n                                                            element.children.length > 0;\n\n    const createSelfClosingInstruction = !stylingBuilder.hasBindings &&\n        element.outputs.length === 0 && i18nAttrs.length === 0 && !hasChildren;\n\n    const createSelfClosingI18nInstruction = !createSelfClosingInstruction &&\n        !stylingBuilder.hasBindings && hasTextChildrenOnly(element.children);\n\n    if (createSelfClosingInstruction) {\n      this.creationInstruction(\n          element.sourceSpan, isNgContainer ? R3.elementContainer : R3.element,\n          trimTrailingNulls(parameters));\n    } else {\n      this.creationInstruction(\n          element.sourceSpan, isNgContainer ? R3.elementContainerStart : R3.elementStart,\n          trimTrailingNulls(parameters));\n\n      if (isNonBindableMode) {\n        this.creationInstruction(element.sourceSpan, R3.disableBindings);\n      }\n\n      // process i18n element attributes\n      if (i18nAttrs.length) {\n        let hasBindings: boolean = false;\n        const i18nAttrArgs: o.Expression[] = [];\n        const bindings: ChainableBindingInstruction[] = [];\n        i18nAttrs.forEach(attr => {\n          const message = attr.i18n !as i18n.Message;\n          if (attr instanceof t.TextAttribute) {\n            i18nAttrArgs.push(o.literal(attr.name), this.i18nTranslate(message));\n          } else {\n            const converted = attr.value.visit(this._valueConverter);\n            this.allocateBindingSlots(converted);\n            if (converted instanceof Interpolation) {\n              const placeholders = assembleBoundTextPlaceholders(message);\n              const params = placeholdersToParams(placeholders);\n              i18nAttrArgs.push(o.literal(attr.name), this.i18nTranslate(message, params));\n              converted.expressions.forEach(expression => {\n                hasBindings = true;\n                bindings.push({\n                  sourceSpan: element.sourceSpan,\n                  value: () => this.convertExpressionBinding(expression)\n                });\n              });\n            }\n          }\n        });\n        if (bindings.length) {\n          this.updateInstructionChain(elementIndex, R3.i18nExp, bindings);\n        }\n        if (i18nAttrArgs.length) {\n          const index: o.Expression = o.literal(this.allocateDataSlot());\n          const args = this.constantPool.getConstLiteral(o.literalArr(i18nAttrArgs), true);\n          this.creationInstruction(element.sourceSpan, R3.i18nAttributes, [index, args]);\n          if (hasBindings) {\n            this.updateInstruction(elementIndex, element.sourceSpan, R3.i18nApply, [index]);\n          }\n        }\n      }\n\n      // The style bindings code is placed into two distinct blocks within the template function AOT\n      // code: creation and update. The creation code contains the `styling` instructions\n      // which will apply the collected binding values to the element. `styling` is\n      // designed to run inside of `elementStart` and `elementEnd`. The update instructions\n      // (things like `styleProp`, `classProp`, etc..) are applied later on in this\n      // file\n      this.processStylingInstruction(\n          elementIndex,\n          stylingBuilder.buildStylingInstruction(element.sourceSpan, this.constantPool), true);\n\n      // Generate Listeners (outputs)\n      element.outputs.forEach((outputAst: t.BoundEvent) => {\n        this.creationInstruction(\n            outputAst.sourceSpan, R3.listener,\n            this.prepareListenerParameter(element.name, outputAst, elementIndex));\n      });\n\n      // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and\n      // listeners, to make sure i18nAttributes instruction targets current element at runtime.\n      if (isI18nRootElement) {\n        this.i18nStart(element.sourceSpan, element.i18n !, createSelfClosingI18nInstruction);\n      }\n    }\n\n    // the code here will collect all update-level styling instructions and add them to the\n    // update block of the template function AOT code. Instructions like `styleProp`,\n    // `styleMap`, `classMap`, `classProp` and `stylingApply`\n    // are all generated and assigned in the code below.\n    const stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);\n    const limit = stylingInstructions.length - 1;\n    for (let i = 0; i <= limit; i++) {\n      const instruction = stylingInstructions[i];\n      this._bindingSlots += instruction.allocateBindingSlots;\n      this.processStylingInstruction(elementIndex, instruction, false);\n    }\n\n    // the reason why `undefined` is used is because the renderer understands this as a\n    // special value to symbolize that there is no RHS to this binding\n    // TODO (matsko): revisit this once FW-959 is approached\n    const emptyValueBindInstruction = o.literal(undefined);\n    const propertyBindings: ChainableBindingInstruction[] = [];\n    const attributeBindings: ChainableBindingInstruction[] = [];\n\n    // Generate element input bindings\n    allOtherInputs.forEach((input: t.BoundAttribute) => {\n      const inputType = input.type;\n      if (inputType === BindingType.Animation) {\n        const value = input.value.visit(this._valueConverter);\n        // animation bindings can be presented in the following formats:\n        // 1. [@binding]=\"fooExp\"\n        // 2. [@binding]=\"{value:fooExp, params:{...}}\"\n        // 3. [@binding]\n        // 4. @binding\n        // All formats will be valid for when a synthetic binding is created.\n        // The reasoning for this is because the renderer should get each\n        // synthetic binding value in the order of the array that they are\n        // defined in...\n        const hasValue = value instanceof LiteralPrimitive ? !!value.value : true;\n        this.allocateBindingSlots(value);\n\n        propertyBindings.push({\n          name: prepareSyntheticPropertyName(input.name),\n          sourceSpan: input.sourceSpan,\n          value: () => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction\n        });\n      } else {\n        // we must skip attributes with associated i18n context, since these attributes are handled\n        // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated\n        if (input.i18n) return;\n\n        const value = input.value.visit(this._valueConverter);\n        if (value !== undefined) {\n          const params: any[] = [];\n          const [attrNamespace, attrName] = splitNsName(input.name);\n          const isAttributeBinding = inputType === BindingType.Attribute;\n          const sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);\n          if (sanitizationRef) params.push(sanitizationRef);\n          if (attrNamespace) {\n            const namespaceLiteral = o.literal(attrNamespace);\n\n            if (sanitizationRef) {\n              params.push(namespaceLiteral);\n            } else {\n              // If there wasn't a sanitization ref, we need to add\n              // an extra param so that we can pass in the namespace.\n              params.push(o.literal(null), namespaceLiteral);\n            }\n          }\n          this.allocateBindingSlots(value);\n\n          if (inputType === BindingType.Property) {\n            if (value instanceof Interpolation) {\n              // prop=\"{{value}}\" and friends\n              this.interpolatedUpdateInstruction(\n                  getPropertyInterpolationExpression(value), elementIndex, attrName, input, value,\n                  params);\n            } else {\n              // [prop]=\"value\"\n              // Collect all the properties so that we can chain into a single function at the end.\n              propertyBindings.push({\n                name: attrName,\n                sourceSpan: input.sourceSpan,\n                value: () => this.convertPropertyBinding(value), params\n              });\n            }\n          } else if (inputType === BindingType.Attribute) {\n            if (value instanceof Interpolation && getInterpolationArgsLength(value) > 1) {\n              // attr.name=\"text{{value}}\" and friends\n              this.interpolatedUpdateInstruction(\n                  getAttributeInterpolationExpression(value), elementIndex, attrName, input, value,\n                  params);\n            } else {\n              const boundValue = value instanceof Interpolation ? value.expressions[0] : value;\n              // [attr.name]=\"value\" or attr.name=\"{{value}}\"\n              // Collect the attribute bindings so that they can be chained at the end.\n              attributeBindings.push({\n                name: attrName,\n                sourceSpan: input.sourceSpan,\n                value: () => this.convertPropertyBinding(boundValue), params\n              });\n            }\n          } else {\n            // class prop\n            this.updateInstruction(elementIndex, input.sourceSpan, R3.classProp, () => {\n              return [\n                o.literal(elementIndex), o.literal(attrName), this.convertPropertyBinding(value),\n                ...params\n              ];\n            });\n          }\n        }\n      }\n    });\n\n    if (propertyBindings.length > 0) {\n      this.updateInstructionChain(elementIndex, R3.property, propertyBindings);\n    }\n\n    if (attributeBindings.length > 0) {\n      this.updateInstructionChain(elementIndex, R3.attribute, attributeBindings);\n    }\n\n    // Traverse element child nodes\n    t.visitAll(this, element.children);\n\n    if (!isI18nRootElement && this.i18n) {\n      this.i18n.appendElement(element.i18n !, elementIndex, true);\n    }\n\n    if (!createSelfClosingInstruction) {\n      // Finish element construction mode.\n      const span = element.endSourceSpan || element.sourceSpan;\n      if (isI18nRootElement) {\n        this.i18nEnd(span, createSelfClosingI18nInstruction);\n      }\n      if (isNonBindableMode) {\n        this.creationInstruction(span, R3.enableBindings);\n      }\n      this.creationInstruction(span, isNgContainer ? R3.elementContainerEnd : R3.elementEnd);\n    }\n  }\n\n  /**\n   * Adds an update instruction for an interpolated property or attribute, such as\n   * `prop=\"{{value}}\"` or `attr.title=\"{{value}}\"`\n   */\n  interpolatedUpdateInstruction(\n      instruction: o.ExternalReference, elementIndex: number, attrName: string,\n      input: t.BoundAttribute, value: any, params: any[]) {\n    this.updateInstruction(\n        elementIndex, input.sourceSpan, instruction,\n        () => [o.literal(attrName), ...this.getUpdateInstructionArguments(value), ...params]);\n  }\n\n  visitTemplate(template: t.Template) {\n    const NG_TEMPLATE_TAG_NAME = 'ng-template';\n    const templateIndex = this.allocateDataSlot();\n\n    if (this.i18n) {\n      this.i18n.appendTemplate(template.i18n !, templateIndex);\n    }\n\n    const tagName = sanitizeIdentifier(template.tagName || '');\n    const contextName = `${this.contextName}${tagName ? '_' + tagName : ''}_${templateIndex}`;\n    const templateName = `${contextName}_Template`;\n\n    const parameters: o.Expression[] = [\n      o.literal(templateIndex),\n      o.variable(templateName),\n\n      // We don't care about the tag's namespace here, because we infer\n      // it based on the parent nodes inside the template instruction.\n      o.literal(template.tagName ? splitNsName(template.tagName)[1] : template.tagName),\n    ];\n\n    // find directives matching on a given <ng-template> node\n    this.matchDirectives(NG_TEMPLATE_TAG_NAME, template);\n\n    // prepare attributes parameter (including attributes used for directive matching)\n    const attrsExprs: o.Expression[] = [];\n    template.attributes.forEach(\n        (a: t.TextAttribute) => { attrsExprs.push(asLiteral(a.name), asLiteral(a.value)); });\n    attrsExprs.push(...this.prepareNonRenderAttrs(\n        template.inputs, template.outputs, undefined, template.templateAttrs));\n    parameters.push(this.toAttrsParam(attrsExprs));\n\n    // local refs (ex.: <ng-template #foo>)\n    if (template.references && template.references.length) {\n      parameters.push(this.prepareRefsParameter(template.references));\n      parameters.push(o.importExpr(R3.templateRefExtractor));\n    }\n\n    // Create the template function\n    const templateVisitor = new TemplateDefinitionBuilder(\n        this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n,\n        templateIndex, templateName, this.directiveMatcher, this.directives, this.pipeTypeByName,\n        this.pipes, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds);\n\n    // Nested templates must not be visited until after their parent templates have completed\n    // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't\n    // be able to support bindings in nested templates to local refs that occur after the\n    // template definition. e.g. <div *ngIf=\"showing\">{{ foo }}</div>  <div #foo></div>\n    this._nestedTemplateFns.push(() => {\n      const templateFunctionExpr = templateVisitor.buildTemplateFunction(\n          template.children, template.variables,\n          this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, template.i18n);\n      this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName, null));\n      if (templateVisitor._ngContentReservedSlots.length) {\n        this._ngContentReservedSlots.push(...templateVisitor._ngContentReservedSlots);\n      }\n    });\n\n    // e.g. template(1, MyComp_Template_1)\n    this.creationInstruction(template.sourceSpan, R3.templateCreate, () => {\n      parameters.splice(\n          2, 0, o.literal(templateVisitor.getConstCount()),\n          o.literal(templateVisitor.getVarCount()));\n      return trimTrailingNulls(parameters);\n    });\n\n    // handle property bindings e.g. ÉµÉµproperty('ngForOf', ctx.items), et al;\n    this.templatePropertyBindings(templateIndex, template.templateAttrs);\n\n    // Only add normal input/output binding instructions on explicit ng-template elements.\n    if (template.tagName === NG_TEMPLATE_TAG_NAME) {\n      // Add the input bindings\n      this.templatePropertyBindings(templateIndex, template.inputs);\n      // Generate listeners for directive output\n      template.outputs.forEach((outputAst: t.BoundEvent) => {\n        this.creationInstruction(\n            outputAst.sourceSpan, R3.listener,\n            this.prepareListenerParameter('ng_template', outputAst, templateIndex));\n      });\n    }\n  }\n\n  // These should be handled in the template or element directly.\n  readonly visitReference = invalid;\n  readonly visitVariable = invalid;\n  readonly visitTextAttribute = invalid;\n  readonly visitBoundAttribute = invalid;\n  readonly visitBoundEvent = invalid;\n\n  visitBoundText(text: t.BoundText) {\n    if (this.i18n) {\n      const value = text.value.visit(this._valueConverter);\n      this.allocateBindingSlots(value);\n      if (value instanceof Interpolation) {\n        this.i18n.appendBoundText(text.i18n !);\n        this.i18nAppendBindings(value.expressions);\n      }\n      return;\n    }\n\n    const nodeIndex = this.allocateDataSlot();\n\n    this.creationInstruction(text.sourceSpan, R3.text, [o.literal(nodeIndex)]);\n\n    const value = text.value.visit(this._valueConverter);\n    this.allocateBindingSlots(value);\n\n    if (value instanceof Interpolation) {\n      this.updateInstruction(\n          nodeIndex, text.sourceSpan, getTextInterpolationExpression(value),\n          () => this.getUpdateInstructionArguments(value));\n    } else {\n      this.updateInstruction(\n          nodeIndex, text.sourceSpan, R3.textBinding, () => [this.convertPropertyBinding(value)]);\n    }\n  }\n\n  visitText(text: t.Text) {\n    // when a text element is located within a translatable\n    // block, we exclude this text element from instructions set,\n    // since it will be captured in i18n content and processed at runtime\n    if (!this.i18n) {\n      this.creationInstruction(\n          text.sourceSpan, R3.text, [o.literal(this.allocateDataSlot()), o.literal(text.value)]);\n    }\n  }\n\n  visitIcu(icu: t.Icu) {\n    let initWasInvoked = false;\n\n    // if an ICU was created outside of i18n block, we still treat\n    // it as a translatable entity and invoke i18nStart and i18nEnd\n    // to generate i18n context and the necessary instructions\n    if (!this.i18n) {\n      initWasInvoked = true;\n      this.i18nStart(null, icu.i18n !, true);\n    }\n\n    const i18n = this.i18n !;\n    const vars = this.i18nBindProps(icu.vars);\n    const placeholders = this.i18nBindProps(icu.placeholders);\n\n    // output ICU directly and keep ICU reference in context\n    const message = icu.i18n !as i18n.Message;\n\n    // we always need post-processing function for ICUs, to make sure that:\n    // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:\n    // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders\n    // inside ICUs)\n    // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values\n    const transformFn = (raw: o.ReadVarExpr) => {\n      const params = {...vars, ...placeholders};\n      const formatted = this.i18nFormatPlaceholderNames(params, /* useCamelCase */ false);\n      return instruction(null, R3.i18nPostprocess, [raw, mapLiteral(formatted, true)]);\n    };\n\n    // in case the whole i18n message is a single ICU - we do not need to\n    // create a separate top-level translation, we can use the root ref instead\n    // and make this ICU a top-level translation\n    // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function\n    // separately, so we do not pass placeholders into `i18nTranslate` function.\n    if (isSingleI18nIcu(i18n.meta)) {\n      this.i18nTranslate(message, /* placeholders */ {}, i18n.ref, transformFn);\n    } else {\n      // output ICU directly and keep ICU reference in context\n      const ref =\n          this.i18nTranslate(message, /* placeholders */ {}, /* ref */ undefined, transformFn);\n      i18n.appendIcu(icuFromI18nMessage(message).name, ref);\n    }\n\n    if (initWasInvoked) {\n      this.i18nEnd(null, true);\n    }\n    return null;\n  }\n\n  private allocateDataSlot() { return this._dataIndex++; }\n\n  getConstCount() { return this._dataIndex; }\n\n  getVarCount() { return this._pureFunctionSlots; }\n\n  getNgContentSelectors(): o.Expression|null {\n    return this._ngContentReservedSlots.length ?\n        this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) :\n        null;\n  }\n\n  private bindingContext() { return `${this._bindingContext++}`; }\n\n  private templatePropertyBindings(\n      templateIndex: number, attrs: (t.BoundAttribute|t.TextAttribute)[]) {\n    const propertyBindings: ChainableBindingInstruction[] = [];\n    attrs.forEach(input => {\n      if (input instanceof t.BoundAttribute) {\n        const value = input.value.visit(this._valueConverter);\n\n        if (value !== undefined) {\n          this.allocateBindingSlots(value);\n          propertyBindings.push({\n            name: input.name,\n            sourceSpan: input.sourceSpan,\n            value: () => this.convertPropertyBinding(value)\n          });\n        }\n      }\n    });\n\n    if (propertyBindings.length > 0) {\n      this.updateInstructionChain(templateIndex, R3.property, propertyBindings);\n    }\n  }\n\n  // Bindings must only be resolved after all local refs have been visited, so all\n  // instructions are queued in callbacks that execute once the initial pass has completed.\n  // Otherwise, we wouldn't be able to support local refs that are defined after their\n  // bindings. e.g. {{ foo }} <div #foo></div>\n  private instructionFn(\n      fns: (() => o.Statement)[], span: ParseSourceSpan|null, reference: o.ExternalReference,\n      paramsOrFn: o.Expression[]|(() => o.Expression[]), prepend: boolean = false): void {\n    fns[prepend ? 'unshift' : 'push'](() => {\n      const params = Array.isArray(paramsOrFn) ? paramsOrFn : paramsOrFn();\n      return instruction(span, reference, params).toStmt();\n    });\n  }\n\n  private processStylingInstruction(\n      elementIndex: number, instruction: StylingInstruction|null, createMode: boolean) {\n    if (instruction) {\n      if (createMode) {\n        this.creationInstruction(instruction.sourceSpan, instruction.reference, () => {\n          return instruction.params(value => this.convertPropertyBinding(value)) as o.Expression[];\n        });\n      } else {\n        this.updateInstruction(elementIndex, instruction.sourceSpan, instruction.reference, () => {\n          return instruction\n              .params(value => {\n                return (instruction.supportsInterpolation && value instanceof Interpolation) ?\n                    this.getUpdateInstructionArguments(value) :\n                    this.convertPropertyBinding(value);\n              }) as o.Expression[];\n        });\n      }\n    }\n  }\n\n  private creationInstruction(\n      span: ParseSourceSpan|null, reference: o.ExternalReference,\n      paramsOrFn?: o.Expression[]|(() => o.Expression[]), prepend?: boolean) {\n    this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);\n  }\n\n  private updateInstruction(\n      nodeIndex: number, span: ParseSourceSpan|null, reference: o.ExternalReference,\n      paramsOrFn?: o.Expression[]|(() => o.Expression[])) {\n    this.addSelectInstructionIfNecessary(nodeIndex, span);\n    this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);\n  }\n\n  private updateInstructionChain(\n      nodeIndex: number, reference: o.ExternalReference, bindings: ChainableBindingInstruction[]) {\n    const span = bindings.length ? bindings[0].sourceSpan : null;\n\n    this.addSelectInstructionIfNecessary(nodeIndex, span);\n    this._updateCodeFns.push(() => {\n      const calls = bindings.map(property => {\n        const fnParams = [property.value(), ...(property.params || [])];\n        if (property.name) {\n          fnParams.unshift(o.literal(property.name));\n        }\n        return fnParams;\n      });\n\n      return chainedInstruction(reference, calls, span).toStmt();\n    });\n  }\n\n  private addSelectInstructionIfNecessary(nodeIndex: number, span: ParseSourceSpan|null) {\n    if (this._lastNodeIndexWithFlush < nodeIndex) {\n      if (nodeIndex > 0) {\n        this.instructionFn(this._updateCodeFns, span, R3.select, [o.literal(nodeIndex)]);\n      }\n      this._lastNodeIndexWithFlush = nodeIndex;\n    }\n  }\n\n  private allocatePureFunctionSlots(numSlots: number): number {\n    const originalSlots = this._pureFunctionSlots;\n    this._pureFunctionSlots += numSlots;\n    return originalSlots;\n  }\n\n  private allocateBindingSlots(value: AST|null) {\n    this._bindingSlots += value instanceof Interpolation ? value.expressions.length : 1;\n  }\n\n  /**\n   * Gets an expression that refers to the implicit receiver. The implicit\n   * receiver is always the root level context.\n   */\n  private getImplicitReceiverExpr(): o.ReadVarExpr {\n    if (this._implicitReceiverExpr) {\n      return this._implicitReceiverExpr;\n    }\n\n    return this._implicitReceiverExpr = this.level === 0 ?\n        o.variable(CONTEXT_NAME) :\n        this._bindingScope.getOrCreateSharedContextVar(0);\n  }\n\n  private convertExpressionBinding(value: AST): o.Expression {\n    const convertedPropertyBinding = convertPropertyBinding(\n        this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.TrySimple);\n    return convertedPropertyBinding.currValExpr;\n  }\n\n  private convertPropertyBinding(value: AST): o.Expression {\n    const convertedPropertyBinding = convertPropertyBinding(\n        this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.TrySimple,\n        () => error('Unexpected interpolation'));\n    const valExpr = convertedPropertyBinding.currValExpr;\n    this._tempVariables.push(...convertedPropertyBinding.stmts);\n\n    return valExpr;\n  }\n\n  /**\n   * Gets a list of argument expressions to pass to an update instruction expression. Also updates\n   * the temp variables state with temp variables that were identified as needing to be created\n   * while visiting the arguments.\n   * @param value The original expression we will be resolving an arguments list from.\n   */\n  private getUpdateInstructionArguments(value: AST): o.Expression[] {\n    const {args, stmts} =\n        convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext());\n\n    this._tempVariables.push(...stmts);\n    return args;\n  }\n\n  private matchDirectives(tagName: string, elOrTpl: t.Element|t.Template) {\n    if (this.directiveMatcher) {\n      const selector = createCssSelector(tagName, getAttrsForDirectiveMatching(elOrTpl));\n      this.directiveMatcher.match(\n          selector, (cssSelector, staticType) => { this.directives.add(staticType); });\n    }\n  }\n\n  /**\n   * Prepares all attribute expression values for the `TAttributes` array.\n   *\n   * The purpose of this function is to properly construct an attributes array that\n   * is passed into the `elementStart` (or just `element`) functions. Because there\n   * are many different types of attributes, the array needs to be constructed in a\n   * special way so that `elementStart` can properly evaluate them.\n   *\n   * The format looks like this:\n   *\n   * ```\n   * attrs = [prop, value, prop2, value2,\n   *   CLASSES, class1, class2,\n   *   STYLES, style1, value1, style2, value2,\n   *   BINDINGS, name1, name2, name3,\n   *   TEMPLATE, name4, name5, name6,\n   *   I18N, name7, name8, ...]\n   * ```\n   *\n   * Note that this function will fully ignore all synthetic (@foo) attribute values\n   * because those values are intended to always be generated as property instructions.\n   */\n  private prepareNonRenderAttrs(\n      inputs: t.BoundAttribute[], outputs: t.BoundEvent[], styles?: StylingBuilder,\n      templateAttrs: (t.BoundAttribute|t.TextAttribute)[] = [],\n      i18nAttrs: (t.BoundAttribute|t.TextAttribute)[] = []): o.Expression[] {\n    const alreadySeen = new Set<string>();\n    const attrExprs: o.Expression[] = [];\n\n    function addAttrExpr(key: string | number, value?: o.Expression): void {\n      if (typeof key === 'string') {\n        if (!alreadySeen.has(key)) {\n          attrExprs.push(...getAttributeNameLiterals(key));\n          value !== undefined && attrExprs.push(value);\n          alreadySeen.add(key);\n        }\n      } else {\n        attrExprs.push(o.literal(key));\n      }\n    }\n\n    // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`\n    // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as\n    // as single property value cell by cell.\n    if (styles) {\n      styles.populateInitialStylingAttrs(attrExprs);\n    }\n\n    if (inputs.length || outputs.length) {\n      const attrsLengthBeforeInputs = attrExprs.length;\n\n      for (let i = 0; i < inputs.length; i++) {\n        const input = inputs[i];\n        // We don't want the animation and attribute bindings in the\n        // attributes array since they aren't used for directive matching.\n        if (input.type !== BindingType.Animation && input.type !== BindingType.Attribute) {\n          addAttrExpr(input.name);\n        }\n      }\n\n      for (let i = 0; i < outputs.length; i++) {\n        const output = outputs[i];\n        if (output.type !== ParsedEventType.Animation) {\n          addAttrExpr(output.name);\n        }\n      }\n\n      // this is a cheap way of adding the marker only after all the input/output\n      // values have been filtered (by not including the animation ones) and added\n      // to the expressions. The marker is important because it tells the runtime\n      // code that this is where attributes without values start...\n      if (attrExprs.length !== attrsLengthBeforeInputs) {\n        attrExprs.splice(attrsLengthBeforeInputs, 0, o.literal(core.AttributeMarker.Bindings));\n      }\n    }\n\n    if (templateAttrs.length) {\n      attrExprs.push(o.literal(core.AttributeMarker.Template));\n      templateAttrs.forEach(attr => addAttrExpr(attr.name));\n    }\n\n    if (i18nAttrs.length) {\n      attrExprs.push(o.literal(core.AttributeMarker.I18n));\n      i18nAttrs.forEach(attr => addAttrExpr(attr.name));\n    }\n\n    return attrExprs;\n  }\n\n  private toAttrsParam(attrsExprs: o.Expression[]): o.Expression {\n    return attrsExprs.length > 0 ?\n        this.constantPool.getConstLiteral(o.literalArr(attrsExprs), true) :\n        o.TYPED_NULL_EXPR;\n  }\n\n  private prepareRefsParameter(references: t.Reference[]): o.Expression {\n    if (!references || references.length === 0) {\n      return o.TYPED_NULL_EXPR;\n    }\n\n    const refsParam = flatten(references.map(reference => {\n      const slot = this.allocateDataSlot();\n      // Generate the update temporary.\n      const variableName = this._bindingScope.freshReferenceName();\n      const retrievalLevel = this.level;\n      const lhs = o.variable(variableName);\n      this._bindingScope.set(\n          retrievalLevel, reference.name, lhs,\n          DeclarationPriority.DEFAULT, (scope: BindingScope, relativeLevel: number) => {\n            // e.g. nextContext(2);\n            const nextContextStmt =\n                relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];\n\n            // e.g. const $foo$ = reference(1);\n            const refExpr = lhs.set(o.importExpr(R3.reference).callFn([o.literal(slot)]));\n            return nextContextStmt.concat(refExpr.toConstDecl());\n          }, true);\n      return [reference.name, reference.value];\n    }));\n\n    return this.constantPool.getConstLiteral(asLiteral(refsParam), true);\n  }\n\n  private prepareListenerParameter(tagName: string, outputAst: t.BoundEvent, index: number):\n      () => o.Expression[] {\n    return () => {\n      const eventName: string = outputAst.name;\n      const bindingFnName = outputAst.type === ParsedEventType.Animation ?\n          // synthetic @listener.foo values are treated the exact same as are standard listeners\n          prepareSyntheticListenerFunctionName(eventName, outputAst.phase !) :\n          sanitizeIdentifier(eventName);\n      const handlerName = `${this.templateName}_${tagName}_${bindingFnName}_${index}_listener`;\n      const scope = this._bindingScope.nestedScope(this._bindingScope.bindingLevel);\n      return prepareEventListenerParameters(outputAst, handlerName, scope);\n    };\n  }\n}\n\nexport class ValueConverter extends AstMemoryEfficientTransformer {\n  private _pipeBindExprs: FunctionCall[] = [];\n\n  constructor(\n      private constantPool: ConstantPool, private allocateSlot: () => number,\n      private allocatePureFunctionSlots: (numSlots: number) => number,\n      private definePipe:\n          (name: string, localName: string, slot: number, value: o.Expression) => void) {\n    super();\n  }\n\n  // AstMemoryEfficientTransformer\n  visitPipe(pipe: BindingPipe, context: any): AST {\n    // Allocate a slot to create the pipe\n    const slot = this.allocateSlot();\n    const slotPseudoLocal = `PIPE:${slot}`;\n    // Allocate one slot for the result plus one slot per pipe argument\n    const pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n    const target = new PropertyRead(pipe.span, new ImplicitReceiver(pipe.span), slotPseudoLocal);\n    const {identifier, isVarLength} = pipeBindingCallInfo(pipe.args);\n    this.definePipe(pipe.name, slotPseudoLocal, slot, o.importExpr(identifier));\n    const args: AST[] = [pipe.exp, ...pipe.args];\n    const convertedArgs: AST[] =\n        isVarLength ? this.visitAll([new LiteralArray(pipe.span, args)]) : this.visitAll(args);\n\n    const pipeBindExpr = new FunctionCall(pipe.span, target, [\n      new LiteralPrimitive(pipe.span, slot),\n      new LiteralPrimitive(pipe.span, pureFunctionSlot),\n      ...convertedArgs,\n    ]);\n    this._pipeBindExprs.push(pipeBindExpr);\n    return pipeBindExpr;\n  }\n\n  updatePipeSlotOffsets(bindingSlots: number) {\n    this._pipeBindExprs.forEach((pipe: FunctionCall) => {\n      // update the slot offset arg (index 1) to account for binding slots\n      const slotOffset = pipe.args[1] as LiteralPrimitive;\n      (slotOffset.value as number) += bindingSlots;\n    });\n  }\n\n  visitLiteralArray(array: LiteralArray, context: any): AST {\n    return new BuiltinFunctionCall(array.span, this.visitAll(array.expressions), values => {\n      // If the literal has calculated (non-literal) elements transform it into\n      // calls to literal factories that compose the literal and will cache intermediate\n      // values. Otherwise, just return an literal array that contains the values.\n      const literal = o.literalArr(values);\n      return values.every(a => a.isConstant()) ?\n          this.constantPool.getConstLiteral(literal, true) :\n          getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n    });\n  }\n\n  visitLiteralMap(map: LiteralMap, context: any): AST {\n    return new BuiltinFunctionCall(map.span, this.visitAll(map.values), values => {\n      // If the literal has calculated (non-literal) elements  transform it into\n      // calls to literal factories that compose the literal and will cache intermediate\n      // values. Otherwise, just return an literal array that contains the values.\n      const literal = o.literalMap(values.map(\n          (value, index) => ({key: map.keys[index].key, value, quoted: map.keys[index].quoted})));\n      return values.every(a => a.isConstant()) ?\n          this.constantPool.getConstLiteral(literal, true) :\n          getLiteralFactory(this.constantPool, literal, this.allocatePureFunctionSlots);\n    });\n  }\n}\n\n// Pipes always have at least one parameter, the value they operate on\nconst pipeBindingIdentifiers = [R3.pipeBind1, R3.pipeBind2, R3.pipeBind3, R3.pipeBind4];\n\nfunction pipeBindingCallInfo(args: o.Expression[]) {\n  const identifier = pipeBindingIdentifiers[args.length];\n  return {\n    identifier: identifier || R3.pipeBindV,\n    isVarLength: !identifier,\n  };\n}\n\nconst pureFunctionIdentifiers = [\n  R3.pureFunction0, R3.pureFunction1, R3.pureFunction2, R3.pureFunction3, R3.pureFunction4,\n  R3.pureFunction5, R3.pureFunction6, R3.pureFunction7, R3.pureFunction8\n];\n\nfunction pureFunctionCallInfo(args: o.Expression[]) {\n  const identifier = pureFunctionIdentifiers[args.length];\n  return {\n    identifier: identifier || R3.pureFunctionV,\n    isVarLength: !identifier,\n  };\n}\n\nfunction instruction(\n    span: ParseSourceSpan | null, reference: o.ExternalReference,\n    params: o.Expression[]): o.Expression {\n  return o.importExpr(reference, null, span).callFn(params, span);\n}\n\n// e.g. x(2);\nfunction generateNextContextExpr(relativeLevelDiff: number): o.Expression {\n  return o.importExpr(R3.nextContext)\n      .callFn(relativeLevelDiff > 1 ? [o.literal(relativeLevelDiff)] : []);\n}\n\nfunction getLiteralFactory(\n    constantPool: ConstantPool, literal: o.LiteralArrayExpr | o.LiteralMapExpr,\n    allocateSlots: (numSlots: number) => number): o.Expression {\n  const {literalFactory, literalFactoryArguments} = constantPool.getLiteralFactory(literal);\n  // Allocate 1 slot for the result plus 1 per argument\n  const startSlot = allocateSlots(1 + literalFactoryArguments.length);\n  literalFactoryArguments.length > 0 || error(`Expected arguments to a literal factory function`);\n  const {identifier, isVarLength} = pureFunctionCallInfo(literalFactoryArguments);\n\n  // Literal factories are pure functions that only need to be re-invoked when the parameters\n  // change.\n  const args = [\n    o.literal(startSlot),\n    literalFactory,\n  ];\n\n  if (isVarLength) {\n    args.push(o.literalArr(literalFactoryArguments));\n  } else {\n    args.push(...literalFactoryArguments);\n  }\n\n  return o.importExpr(identifier).callFn(args);\n}\n\n/**\n * Gets an array of literals that can be added to an expression\n * to represent the name and namespace of an attribute. E.g.\n * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.\n *\n * @param name Name of the attribute, including the namespace.\n */\nfunction getAttributeNameLiterals(name: string): o.LiteralExpr[] {\n  const [attributeNamespace, attributeName] = splitNsName(name);\n  const nameLiteral = o.literal(attributeName);\n\n  if (attributeNamespace) {\n    return [\n      o.literal(core.AttributeMarker.NamespaceURI), o.literal(attributeNamespace), nameLiteral\n    ];\n  }\n\n  return [nameLiteral];\n}\n\n/**\n * Function which is executed whenever a variable is referenced for the first time in a given\n * scope.\n *\n * It is expected that the function creates the `const localName = expression`; statement.\n */\nexport type DeclareLocalVarCallback = (scope: BindingScope, relativeLevel: number) => o.Statement[];\n\n/** The prefix used to get a shared context in BindingScope's map. */\nconst SHARED_CONTEXT_KEY = '$$shared_ctx$$';\n\n/**\n * This is used when one refers to variable such as: 'let abc = nextContext(2).$implicit`.\n * - key to the map is the string literal `\"abc\"`.\n * - value `retrievalLevel` is the level from which this value can be retrieved, which is 2 levels\n * up in example.\n * - value `lhs` is the left hand side which is an AST representing `abc`.\n * - value `declareLocalCallback` is a callback that is invoked when declaring the local.\n * - value `declare` is true if this value needs to be declared.\n * - value `localRef` is true if we are storing a local reference\n * - value `priority` dictates the sorting priority of this var declaration compared\n * to other var declarations on the same retrieval level. For example, if there is a\n * context variable and a local ref accessing the same parent view, the context var\n * declaration should always come before the local ref declaration.\n */\ntype BindingData = {\n  retrievalLevel: number; lhs: o.Expression; declareLocalCallback?: DeclareLocalVarCallback;\n  declare: boolean;\n  priority: number;\n  localRef: boolean;\n};\n\n/**\n * The sorting priority of a local variable declaration. Higher numbers\n * mean the declaration will appear first in the generated code.\n */\nconst enum DeclarationPriority { DEFAULT = 0, CONTEXT = 1, SHARED_CONTEXT = 2 }\n\nexport class BindingScope implements LocalResolver {\n  /** Keeps a map from local variables to their BindingData. */\n  private map = new Map<string, BindingData>();\n  private referenceNameIndex = 0;\n  private restoreViewVariable: o.ReadVarExpr|null = null;\n  private static _ROOT_SCOPE: BindingScope;\n\n  static get ROOT_SCOPE(): BindingScope {\n    if (!BindingScope._ROOT_SCOPE) {\n      BindingScope._ROOT_SCOPE = new BindingScope().set(0, '$event', o.variable('$event'));\n    }\n    return BindingScope._ROOT_SCOPE;\n  }\n\n  private constructor(public bindingLevel: number = 0, private parent: BindingScope|null = null) {}\n\n  get(name: string): o.Expression|null {\n    let current: BindingScope|null = this;\n    while (current) {\n      let value = current.map.get(name);\n      if (value != null) {\n        if (current !== this) {\n          // make a local copy and reset the `declare` state\n          value = {\n            retrievalLevel: value.retrievalLevel,\n            lhs: value.lhs,\n            declareLocalCallback: value.declareLocalCallback,\n            declare: false,\n            priority: value.priority,\n            localRef: value.localRef\n          };\n\n          // Cache the value locally.\n          this.map.set(name, value);\n          // Possibly generate a shared context var\n          this.maybeGenerateSharedContextVar(value);\n          this.maybeRestoreView(value.retrievalLevel, value.localRef);\n        }\n\n        if (value.declareLocalCallback && !value.declare) {\n          value.declare = true;\n        }\n        return value.lhs;\n      }\n      current = current.parent;\n    }\n\n    // If we get to this point, we are looking for a property on the top level component\n    // - If level === 0, we are on the top and don't need to re-declare `ctx`.\n    // - If level > 0, we are in an embedded view. We need to retrieve the name of the\n    // local var we used to store the component context, e.g. const $comp$ = x();\n    return this.bindingLevel === 0 ? null : this.getComponentProperty(name);\n  }\n\n  /**\n   * Create a local variable for later reference.\n   *\n   * @param retrievalLevel The level from which this value can be retrieved\n   * @param name Name of the variable.\n   * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n   * @param priority The sorting priority of this var\n   * @param declareLocalCallback The callback to invoke when declaring this local var\n   * @param localRef Whether or not this is a local ref\n   */\n  set(retrievalLevel: number, name: string, lhs: o.Expression,\n      priority: number = DeclarationPriority.DEFAULT,\n      declareLocalCallback?: DeclareLocalVarCallback, localRef?: true): BindingScope {\n    if (this.map.has(name)) {\n      if (localRef) {\n        // Do not throw an error if it's a local ref and do not update existing value,\n        // so the first defined ref is always returned.\n        return this;\n      }\n      error(`The name ${name} is already defined in scope to be ${this.map.get(name)}`);\n    }\n    this.map.set(name, {\n      retrievalLevel: retrievalLevel,\n      lhs: lhs,\n      declare: false,\n      declareLocalCallback: declareLocalCallback,\n      priority: priority,\n      localRef: localRef || false\n    });\n    return this;\n  }\n\n  // Implemented as part of LocalResolver.\n  getLocal(name: string): (o.Expression|null) { return this.get(name); }\n\n  // Implemented as part of LocalResolver.\n  notifyImplicitReceiverUse(): void {\n    if (this.bindingLevel !== 0) {\n      // Since the implicit receiver is accessed in an embedded view, we need to\n      // ensure that we declare a shared context variable for the current template\n      // in the update variables.\n      this.map.get(SHARED_CONTEXT_KEY + 0) !.declare = true;\n    }\n  }\n\n  nestedScope(level: number): BindingScope {\n    const newScope = new BindingScope(level, this);\n    if (level > 0) newScope.generateSharedContextVar(0);\n    return newScope;\n  }\n\n  /**\n   * Gets or creates a shared context variable and returns its expression. Note that\n   * this does not mean that the shared variable will be declared. Variables in the\n   * binding scope will be only declared if they are used.\n   */\n  getOrCreateSharedContextVar(retrievalLevel: number): o.ReadVarExpr {\n    const bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;\n    if (!this.map.has(bindingKey)) {\n      this.generateSharedContextVar(retrievalLevel);\n    }\n    // Shared context variables are always generated as \"ReadVarExpr\".\n    return this.map.get(bindingKey) !.lhs as o.ReadVarExpr;\n  }\n\n  getSharedContextName(retrievalLevel: number): o.ReadVarExpr|null {\n    const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel);\n    // Shared context variables are always generated as \"ReadVarExpr\".\n    return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs as o.ReadVarExpr : null;\n  }\n\n  maybeGenerateSharedContextVar(value: BindingData) {\n    if (value.priority === DeclarationPriority.CONTEXT &&\n        value.retrievalLevel < this.bindingLevel) {\n      const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);\n      if (sharedCtxObj) {\n        sharedCtxObj.declare = true;\n      } else {\n        this.generateSharedContextVar(value.retrievalLevel);\n      }\n    }\n  }\n\n  generateSharedContextVar(retrievalLevel: number) {\n    const lhs = o.variable(CONTEXT_NAME + this.freshReferenceName());\n    this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {\n      retrievalLevel: retrievalLevel,\n      lhs: lhs,\n      declareLocalCallback: (scope: BindingScope, relativeLevel: number) => {\n        // const ctx_r0 = nextContext(2);\n        return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];\n      },\n      declare: false,\n      priority: DeclarationPriority.SHARED_CONTEXT,\n      localRef: false\n    });\n  }\n\n  getComponentProperty(name: string): o.Expression {\n    const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0) !;\n    componentValue.declare = true;\n    this.maybeRestoreView(0, false);\n    return componentValue.lhs.prop(name);\n  }\n\n  maybeRestoreView(retrievalLevel: number, localRefLookup: boolean) {\n    // We want to restore the current view in listener fns if:\n    // 1 - we are accessing a value in a parent view, which requires walking the view tree rather\n    // than using the ctx arg. In this case, the retrieval and binding level will be different.\n    // 2 - we are looking up a local ref, which requires restoring the view where the local\n    // ref is stored\n    if (this.isListenerScope() && (retrievalLevel < this.bindingLevel || localRefLookup)) {\n      if (!this.parent !.restoreViewVariable) {\n        // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction\n        this.parent !.restoreViewVariable = o.variable(this.parent !.freshReferenceName());\n      }\n      this.restoreViewVariable = this.parent !.restoreViewVariable;\n    }\n  }\n\n  restoreViewStatement(): o.Statement[] {\n    // restoreView($state$);\n    return this.restoreViewVariable ?\n        [instruction(null, R3.restoreView, [this.restoreViewVariable]).toStmt()] :\n        [];\n  }\n\n  viewSnapshotStatements(): o.Statement[] {\n    // const $state$ = getCurrentView();\n    const getCurrentViewInstruction = instruction(null, R3.getCurrentView, []);\n    return this.restoreViewVariable ?\n        [this.restoreViewVariable.set(getCurrentViewInstruction).toConstDecl()] :\n        [];\n  }\n\n  isListenerScope() { return this.parent && this.parent.bindingLevel === this.bindingLevel; }\n\n  variableDeclarations(): o.Statement[] {\n    let currentContextLevel = 0;\n    return Array.from(this.map.values())\n        .filter(value => value.declare)\n        .sort((a, b) => b.retrievalLevel - a.retrievalLevel || b.priority - a.priority)\n        .reduce((stmts: o.Statement[], value: BindingData) => {\n          const levelDiff = this.bindingLevel - value.retrievalLevel;\n          const currStmts = value.declareLocalCallback !(this, levelDiff - currentContextLevel);\n          currentContextLevel = levelDiff;\n          return stmts.concat(currStmts);\n        }, []) as o.Statement[];\n  }\n\n\n  freshReferenceName(): string {\n    let current: BindingScope = this;\n    // Find the top scope as it maintains the global reference count\n    while (current.parent) current = current.parent;\n    const ref = `${REFERENCE_PREFIX}${current.referenceNameIndex++}`;\n    return ref;\n  }\n}\n\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\nfunction createCssSelector(tag: string, attributes: {[name: string]: string}): CssSelector {\n  const cssSelector = new CssSelector();\n\n  cssSelector.setElement(tag);\n\n  Object.getOwnPropertyNames(attributes).forEach((name) => {\n    const value = attributes[name];\n\n    cssSelector.addAttribute(name, value);\n    if (name.toLowerCase() === 'class') {\n      const classes = value.trim().split(/\\s+/);\n      classes.forEach(className => cssSelector.addClassName(className));\n    }\n  });\n\n  return cssSelector;\n}\n\n/**\n * Creates an array of expressions out of an `ngProjectAs` attributes\n * which can be added to the instruction parameters.\n */\nfunction getNgProjectAsLiteral(attribute: t.TextAttribute): o.Expression[] {\n  // Parse the attribute value into a CssSelectorList. Note that we only take the\n  // first selector, because we don't support multiple selectors in ngProjectAs.\n  const parsedR3Selector = core.parseSelectorToR3Selector(attribute.value)[0];\n  return [o.literal(core.AttributeMarker.ProjectAs), asLiteral(parsedR3Selector)];\n}\n\n/**\n * Gets the instruction to generate for an interpolated property\n * @param interpolation An Interpolation AST\n */\nfunction getPropertyInterpolationExpression(interpolation: Interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return R3.propertyInterpolate;\n    case 3:\n      return R3.propertyInterpolate1;\n    case 5:\n      return R3.propertyInterpolate2;\n    case 7:\n      return R3.propertyInterpolate3;\n    case 9:\n      return R3.propertyInterpolate4;\n    case 11:\n      return R3.propertyInterpolate5;\n    case 13:\n      return R3.propertyInterpolate6;\n    case 15:\n      return R3.propertyInterpolate7;\n    case 17:\n      return R3.propertyInterpolate8;\n    default:\n      return R3.propertyInterpolateV;\n  }\n}\n\n/**\n * Gets the instruction to generate for an interpolated attribute\n * @param interpolation An Interpolation AST\n */\nfunction getAttributeInterpolationExpression(interpolation: Interpolation) {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 3:\n      return R3.attributeInterpolate1;\n    case 5:\n      return R3.attributeInterpolate2;\n    case 7:\n      return R3.attributeInterpolate3;\n    case 9:\n      return R3.attributeInterpolate4;\n    case 11:\n      return R3.attributeInterpolate5;\n    case 13:\n      return R3.attributeInterpolate6;\n    case 15:\n      return R3.attributeInterpolate7;\n    case 17:\n      return R3.attributeInterpolate8;\n    default:\n      return R3.attributeInterpolateV;\n  }\n}\n\n/**\n * Gets the instruction to generate for interpolated text.\n * @param interpolation An Interpolation AST\n */\nfunction getTextInterpolationExpression(interpolation: Interpolation): o.ExternalReference {\n  switch (getInterpolationArgsLength(interpolation)) {\n    case 1:\n      return R3.textInterpolate;\n    case 3:\n      return R3.textInterpolate1;\n    case 5:\n      return R3.textInterpolate2;\n    case 7:\n      return R3.textInterpolate3;\n    case 9:\n      return R3.textInterpolate4;\n    case 11:\n      return R3.textInterpolate5;\n    case 13:\n      return R3.textInterpolate6;\n    case 15:\n      return R3.textInterpolate7;\n    case 17:\n      return R3.textInterpolate8;\n    default:\n      return R3.textInterpolateV;\n  }\n}\n\n/**\n * Options that can be used to modify how a template is parsed by `parseTemplate()`.\n */\nexport interface ParseTemplateOptions {\n  /**\n   * Include whitespace nodes in the parsed output.\n   */\n  preserveWhitespaces?: boolean;\n  /**\n   * How to parse interpolation markers.\n   */\n  interpolationConfig?: InterpolationConfig;\n  /**\n   * The start and end point of the text to parse within the `source` string.\n   * The entire `source` string is parsed if this is not provided.\n   * */\n  range?: LexerRange;\n  /**\n   * If this text is stored in a JavaScript string, then we have to deal with escape sequences.\n   *\n   * **Example 1:**\n   *\n   * ```\n   * \"abc\\\"def\\nghi\"\n   * ```\n   *\n   * - The `\\\"` must be converted to `\"`.\n   * - The `\\n` must be converted to a new line character in a token,\n   *   but it should not increment the current line for source mapping.\n   *\n   * **Example 2:**\n   *\n   * ```\n   * \"abc\\\n   *  def\"\n   * ```\n   *\n   * The line continuation (`\\` followed by a newline) should be removed from a token\n   * but the new line should increment the current line for source mapping.\n   */\n  escapedString?: boolean;\n  /**\n   * An array of characters that should be considered as leading trivia.\n   * Leading trivia are characters that are not important to the developer, and so should not be\n   * included in source-map segments.  A common example is whitespace.\n   */\n  leadingTriviaChars?: string[];\n}\n\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n * @param options options to modify how the template is parsed\n */\nexport function parseTemplate(\n    template: string, templateUrl: string, options: ParseTemplateOptions = {}):\n    {errors?: ParseError[], nodes: t.Node[], styleUrls: string[], styles: string[]} {\n  const {interpolationConfig, preserveWhitespaces} = options;\n  const bindingParser = makeBindingParser(interpolationConfig);\n  const htmlParser = new HtmlParser();\n  const parseResult = htmlParser.parse(\n      template, templateUrl,\n      {leadingTriviaChars: LEADING_TRIVIA_CHARS, ...options, tokenizeExpansionForms: true});\n\n  if (parseResult.errors && parseResult.errors.length > 0) {\n    return {errors: parseResult.errors, nodes: [], styleUrls: [], styles: []};\n  }\n\n  let rootNodes: html.Node[] = parseResult.rootNodes;\n\n  // process i18n meta information (scan attributes, generate ids)\n  // before we run whitespace removal process, because existing i18n\n  // extraction process (ng xi18n) relies on a raw content to generate\n  // message ids\n  rootNodes =\n      html.visitAll(new I18nMetaVisitor(interpolationConfig, !preserveWhitespaces), rootNodes);\n\n  if (!preserveWhitespaces) {\n    rootNodes = html.visitAll(new WhitespaceVisitor(), rootNodes);\n\n    // run i18n meta visitor again in case we remove whitespaces, because\n    // that might affect generated i18n message content. During this pass\n    // i18n IDs generated at the first pass will be preserved, so we can mimic\n    // existing extraction process (ng xi18n)\n    rootNodes = html.visitAll(\n        new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ false), rootNodes);\n  }\n\n  const {nodes, errors, styleUrls, styles} = htmlAstToRender3Ast(rootNodes, bindingParser);\n  if (errors && errors.length > 0) {\n    return {errors, nodes: [], styleUrls: [], styles: []};\n  }\n\n  return {nodes, styleUrls, styles};\n}\n\n/**\n * Construct a `BindingParser` with a default configuration.\n */\nexport function makeBindingParser(\n    interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): BindingParser {\n  return new BindingParser(\n      new Parser(new Lexer()), interpolationConfig, new DomElementSchemaRegistry(), null, []);\n}\n\nexport function resolveSanitizationFn(context: core.SecurityContext, isAttribute?: boolean) {\n  switch (context) {\n    case core.SecurityContext.HTML:\n      return o.importExpr(R3.sanitizeHtml);\n    case core.SecurityContext.SCRIPT:\n      return o.importExpr(R3.sanitizeScript);\n    case core.SecurityContext.STYLE:\n      // the compiler does not fill in an instruction for [style.prop?] binding\n      // values because the style algorithm knows internally what props are subject\n      // to sanitization (only [attr.style] values are explicitly sanitized)\n      return isAttribute ? o.importExpr(R3.sanitizeStyle) : null;\n    case core.SecurityContext.URL:\n      return o.importExpr(R3.sanitizeUrl);\n    case core.SecurityContext.RESOURCE_URL:\n      return o.importExpr(R3.sanitizeResourceUrl);\n    default:\n      return null;\n  }\n}\n\nfunction isSingleElementTemplate(children: t.Node[]): children is[t.Element] {\n  return children.length === 1 && children[0] instanceof t.Element;\n}\n\nfunction isTextNode(node: t.Node): boolean {\n  return node instanceof t.Text || node instanceof t.BoundText || node instanceof t.Icu;\n}\n\nfunction hasTextChildrenOnly(children: t.Node[]): boolean {\n  return children.every(isTextNode);\n}\n\ninterface ChainableBindingInstruction {\n  name?: string;\n  sourceSpan: ParseSourceSpan|null;\n  value: () => o.Expression;\n  params?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol} from '../../aot/static_symbol';\nimport {CompileDirectiveMetadata, CompileDirectiveSummary, CompileQueryMetadata, CompileTokenMetadata, identifierName, sanitizeIdentifier} from '../../compile_metadata';\nimport {CompileReflector} from '../../compile_reflector';\nimport {BindingForm, convertPropertyBinding} from '../../compiler_util/expression_converter';\nimport {ConstantPool, DefinitionKind} from '../../constant_pool';\nimport * as core from '../../core';\nimport {AST, Interpolation, ParsedEvent, ParsedEventType, ParsedProperty} from '../../expression_parser/ast';\nimport {DEFAULT_INTERPOLATION_CONFIG} from '../../ml_parser/interpolation_config';\nimport * as o from '../../output/output_ast';\nimport {ParseError, ParseSourceSpan, typeSourceSpan} from '../../parse_util';\nimport {CssSelector, SelectorMatcher} from '../../selector';\nimport {ShadowCss} from '../../shadow_css';\nimport {CONTENT_ATTR, HOST_ATTR} from '../../style_compiler';\nimport {BindingParser} from '../../template_parser/binding_parser';\nimport {OutputContext, error} from '../../util';\nimport {BoundEvent} from '../r3_ast';\nimport {compileFactoryFunction, dependenciesFromGlobalMetadata} from '../r3_factory';\nimport {Identifiers as R3} from '../r3_identifiers';\nimport {Render3ParseResult} from '../r3_template_transform';\nimport {prepareSyntheticListenerFunctionName, prepareSyntheticPropertyName, typeWithParameters} from '../util';\n\nimport {R3ComponentDef, R3ComponentMetadata, R3DirectiveDef, R3DirectiveMetadata, R3HostMetadata, R3QueryMetadata} from './api';\nimport {StylingBuilder, StylingInstruction} from './styling_builder';\nimport {BindingScope, TemplateDefinitionBuilder, ValueConverter, makeBindingParser, prepareEventListenerParameters, renderFlagCheckIfStmt, resolveSanitizationFn} from './template';\nimport {CONTEXT_NAME, DefinitionMap, RENDER_FLAGS, TEMPORARY_NAME, asLiteral, chainedInstruction, conditionallyCreateMapObjectLiteral, getQueryPredicate, temporaryAllocator} from './util';\n\nconst EMPTY_ARRAY: any[] = [];\n\n// This regex matches any binding names that contain the \"attr.\" prefix, e.g. \"attr.required\"\n// If there is a match, the first matching group will contain the attribute name to bind.\nconst ATTR_REGEX = /attr\\.([^\\]]+)/;\n\nfunction getStylingPrefix(name: string): string {\n  return name.substring(0, 5);  // style or class\n}\n\nfunction baseDirectiveFields(\n    meta: R3DirectiveMetadata, constantPool: ConstantPool,\n    bindingParser: BindingParser): {definitionMap: DefinitionMap, statements: o.Statement[]} {\n  const definitionMap = new DefinitionMap();\n\n  // e.g. `type: MyDirective`\n  definitionMap.set('type', meta.type);\n\n  // e.g. `selectors: [['', 'someDir', '']]`\n  definitionMap.set('selectors', createDirectiveSelector(meta.selector));\n\n\n  // e.g. `factory: () => new MyApp(directiveInject(ElementRef))`\n  const result = compileFactoryFunction({\n    name: meta.name,\n    type: meta.type,\n    deps: meta.deps,\n    injectFn: R3.directiveInject,\n  });\n  definitionMap.set('factory', result.factory);\n\n  if (meta.queries.length > 0) {\n    // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }\n    definitionMap.set(\n        'contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));\n  }\n\n  if (meta.viewQueries.length) {\n    definitionMap.set(\n        'viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));\n  }\n\n  // e.g. `hostBindings: (rf, ctx, elIndex) => { ... }\n  definitionMap.set(\n      'hostBindings', createHostBindingsFunction(\n                          meta.host, meta.typeSourceSpan, bindingParser, constantPool,\n                          meta.selector || '', meta.name));\n\n  // e.g 'inputs: {a: 'a'}`\n  definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true));\n\n  // e.g 'outputs: {a: 'a'}`\n  definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n\n  if (meta.exportAs !== null) {\n    definitionMap.set('exportAs', o.literalArr(meta.exportAs.map(e => o.literal(e))));\n  }\n\n  return {definitionMap, statements: result.statements};\n}\n\n/**\n * Add features to the definition map.\n */\nfunction addFeatures(\n    definitionMap: DefinitionMap, meta: R3DirectiveMetadata | R3ComponentMetadata) {\n  // e.g. `features: [NgOnChangesFeature()]`\n  const features: o.Expression[] = [];\n\n  const providers = meta.providers;\n  const viewProviders = (meta as R3ComponentMetadata).viewProviders;\n  if (providers || viewProviders) {\n    const args = [providers || new o.LiteralArrayExpr([])];\n    if (viewProviders) {\n      args.push(viewProviders);\n    }\n    features.push(o.importExpr(R3.ProvidersFeature).callFn(args));\n  }\n\n  if (meta.usesInheritance) {\n    features.push(o.importExpr(R3.InheritDefinitionFeature));\n  }\n  if (meta.lifecycle.usesOnChanges) {\n    features.push(o.importExpr(R3.NgOnChangesFeature).callFn(EMPTY_ARRAY));\n  }\n  if (features.length) {\n    definitionMap.set('features', o.literalArr(features));\n  }\n}\n\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\nexport function compileDirectiveFromMetadata(\n    meta: R3DirectiveMetadata, constantPool: ConstantPool,\n    bindingParser: BindingParser): R3DirectiveDef {\n  const {definitionMap, statements} = baseDirectiveFields(meta, constantPool, bindingParser);\n  addFeatures(definitionMap, meta);\n  const expression = o.importExpr(R3.defineDirective).callFn([definitionMap.toLiteralMap()]);\n\n  if (!meta.selector) {\n    throw new Error(`Directive ${meta.name} has no selector, please add it!`);\n  }\n\n  const type = createTypeForDef(meta, R3.DirectiveDefWithMeta);\n  return {expression, type, statements};\n}\n\nexport interface R3BaseRefMetaData {\n  name: string;\n  type: o.Expression;\n  typeSourceSpan: ParseSourceSpan;\n  inputs?: {[key: string]: string | [string, string]};\n  outputs?: {[key: string]: string};\n  viewQueries?: R3QueryMetadata[];\n  queries?: R3QueryMetadata[];\n  host?: R3HostMetadata;\n}\n\n/**\n * Compile a base definition for the render3 runtime as defined by {@link R3BaseRefMetadata}\n * @param meta the metadata used for compilation.\n */\nexport function compileBaseDefFromMetadata(\n    meta: R3BaseRefMetaData, constantPool: ConstantPool, bindingParser: BindingParser) {\n  const definitionMap = new DefinitionMap();\n  if (meta.inputs) {\n    const inputs = meta.inputs;\n    const inputsMap = Object.keys(inputs).map(key => {\n      const v = inputs[key];\n      const value = Array.isArray(v) ? o.literalArr(v.map(vx => o.literal(vx))) : o.literal(v);\n      return {key, value, quoted: false};\n    });\n    definitionMap.set('inputs', o.literalMap(inputsMap));\n  }\n  if (meta.outputs) {\n    const outputs = meta.outputs;\n    const outputsMap = Object.keys(outputs).map(key => {\n      const value = o.literal(outputs[key]);\n      return {key, value, quoted: false};\n    });\n    definitionMap.set('outputs', o.literalMap(outputsMap));\n  }\n  if (meta.viewQueries && meta.viewQueries.length > 0) {\n    definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool));\n  }\n  if (meta.queries && meta.queries.length > 0) {\n    definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool));\n  }\n  if (meta.host) {\n    definitionMap.set(\n        'hostBindings',\n        createHostBindingsFunction(\n            meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.name));\n  }\n\n  const expression = o.importExpr(R3.defineBase).callFn([definitionMap.toLiteralMap()]);\n  const type = new o.ExpressionType(\n      o.importExpr(R3.BaseDef), /* modifiers */ null, [o.expressionType(meta.type)]);\n\n  return {expression, type};\n}\n\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\nexport function compileComponentFromMetadata(\n    meta: R3ComponentMetadata, constantPool: ConstantPool,\n    bindingParser: BindingParser): R3ComponentDef {\n  const {definitionMap, statements} = baseDirectiveFields(meta, constantPool, bindingParser);\n  addFeatures(definitionMap, meta);\n\n  const selector = meta.selector && CssSelector.parse(meta.selector);\n  const firstSelector = selector && selector[0];\n\n  // e.g. `attr: [\"class\", \".my.app\"]`\n  // This is optional an only included if the first selector of a component specifies attributes.\n  if (firstSelector) {\n    const selectorAttributes = firstSelector.getAttrs();\n    if (selectorAttributes.length) {\n      definitionMap.set(\n          'attrs', constantPool.getConstLiteral(\n                       o.literalArr(selectorAttributes.map(\n                           value => value != null ? o.literal(value) : o.literal(undefined))),\n                       /* forceShared */ true));\n    }\n  }\n\n  // Generate the CSS matcher that recognize directive\n  let directiveMatcher: SelectorMatcher|null = null;\n\n  if (meta.directives.length > 0) {\n    const matcher = new SelectorMatcher();\n    for (const {selector, expression} of meta.directives) {\n      matcher.addSelectables(CssSelector.parse(selector), expression);\n    }\n    directiveMatcher = matcher;\n  }\n\n  // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n  const templateTypeName = meta.name;\n  const templateName = templateTypeName ? `${templateTypeName}_Template` : null;\n\n  const directivesUsed = new Set<o.Expression>();\n  const pipesUsed = new Set<o.Expression>();\n  const changeDetection = meta.changeDetection;\n\n  const template = meta.template;\n  const templateBuilder = new TemplateDefinitionBuilder(\n      constantPool, BindingScope.ROOT_SCOPE, 0, templateTypeName, null, null, templateName,\n      directiveMatcher, directivesUsed, meta.pipes, pipesUsed, R3.namespaceHTML,\n      meta.relativeContextFilePath, meta.i18nUseExternalIds);\n\n  const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);\n\n  // We need to provide this so that dynamically generated components know what\n  // projected content blocks to pass through to the component when it is instantiated.\n  const ngContentSelectors = templateBuilder.getNgContentSelectors();\n  if (ngContentSelectors) {\n    definitionMap.set('ngContentSelectors', ngContentSelectors);\n  }\n\n  // e.g. `consts: 2`\n  definitionMap.set('consts', o.literal(templateBuilder.getConstCount()));\n\n  // e.g. `vars: 2`\n  definitionMap.set('vars', o.literal(templateBuilder.getVarCount()));\n\n  definitionMap.set('template', templateFunctionExpression);\n\n  // e.g. `directives: [MyDirective]`\n  if (directivesUsed.size) {\n    let directivesExpr: o.Expression = o.literalArr(Array.from(directivesUsed));\n    if (meta.wrapDirectivesAndPipesInClosure) {\n      directivesExpr = o.fn([], [new o.ReturnStatement(directivesExpr)]);\n    }\n    definitionMap.set('directives', directivesExpr);\n  }\n\n  // e.g. `pipes: [MyPipe]`\n  if (pipesUsed.size) {\n    let pipesExpr: o.Expression = o.literalArr(Array.from(pipesUsed));\n    if (meta.wrapDirectivesAndPipesInClosure) {\n      pipesExpr = o.fn([], [new o.ReturnStatement(pipesExpr)]);\n    }\n    definitionMap.set('pipes', pipesExpr);\n  }\n\n  if (meta.encapsulation === null) {\n    meta.encapsulation = core.ViewEncapsulation.Emulated;\n  }\n\n  // e.g. `styles: [str1, str2]`\n  if (meta.styles && meta.styles.length) {\n    const styleValues = meta.encapsulation == core.ViewEncapsulation.Emulated ?\n        compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) :\n        meta.styles;\n    const strings = styleValues.map(str => o.literal(str));\n    definitionMap.set('styles', o.literalArr(strings));\n  } else if (meta.encapsulation === core.ViewEncapsulation.Emulated) {\n    // If there is no style, don't generate css selectors on elements\n    meta.encapsulation = core.ViewEncapsulation.None;\n  }\n\n  // Only set view encapsulation if it's not the default value\n  if (meta.encapsulation !== core.ViewEncapsulation.Emulated) {\n    definitionMap.set('encapsulation', o.literal(meta.encapsulation));\n  }\n\n  // e.g. `animation: [trigger('123', [])]`\n  if (meta.animations !== null) {\n    definitionMap.set(\n        'data', o.literalMap([{key: 'animation', value: meta.animations, quoted: false}]));\n  }\n\n  // Only set the change detection flag if it's defined and it's not the default.\n  if (changeDetection != null && changeDetection !== core.ChangeDetectionStrategy.Default) {\n    definitionMap.set('changeDetection', o.literal(changeDetection));\n  }\n\n  // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n  // string literal, which must be on one line.\n  const selectorForType = (meta.selector || '').replace(/\\n/g, '');\n\n  const expression = o.importExpr(R3.defineComponent).callFn([definitionMap.toLiteralMap()]);\n  const type = createTypeForDef(meta, R3.ComponentDefWithMeta);\n\n  return {expression, type, statements};\n}\n\n/**\n * A wrapper around `compileDirective` which depends on render2 global analysis data as its input\n * instead of the `R3DirectiveMetadata`.\n *\n * `R3DirectiveMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected\n * information.\n */\nexport function compileDirectiveFromRender2(\n    outputCtx: OutputContext, directive: CompileDirectiveMetadata, reflector: CompileReflector,\n    bindingParser: BindingParser) {\n  const name = identifierName(directive.type) !;\n  name || error(`Cannot resolver the name of ${directive.type}`);\n\n  const definitionField = outputCtx.constantPool.propertyNameOf(DefinitionKind.Directive);\n\n  const meta = directiveMetadataFromGlobalMetadata(directive, outputCtx, reflector);\n  const res = compileDirectiveFromMetadata(meta, outputCtx.constantPool, bindingParser);\n\n  // Create the partial class to be merged with the actual class.\n  outputCtx.statements.push(new o.ClassStmt(\n      name, null,\n      [new o.ClassField(definitionField, o.INFERRED_TYPE, [o.StmtModifier.Static], res.expression)],\n      [], new o.ClassMethod(null, [], []), []));\n}\n\n/**\n * A wrapper around `compileComponent` which depends on render2 global analysis data as its input\n * instead of the `R3DirectiveMetadata`.\n *\n * `R3ComponentMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected\n * information.\n */\nexport function compileComponentFromRender2(\n    outputCtx: OutputContext, component: CompileDirectiveMetadata, render3Ast: Render3ParseResult,\n    reflector: CompileReflector, bindingParser: BindingParser, directiveTypeBySel: Map<string, any>,\n    pipeTypeByName: Map<string, any>) {\n  const name = identifierName(component.type) !;\n  name || error(`Cannot resolver the name of ${component.type}`);\n\n  const definitionField = outputCtx.constantPool.propertyNameOf(DefinitionKind.Component);\n\n  const summary = component.toSummary();\n\n  // Compute the R3ComponentMetadata from the CompileDirectiveMetadata\n  const meta: R3ComponentMetadata = {\n    ...directiveMetadataFromGlobalMetadata(component, outputCtx, reflector),\n    selector: component.selector,\n    template: {nodes: render3Ast.nodes},\n    directives: [],\n    pipes: typeMapToExpressionMap(pipeTypeByName, outputCtx),\n    viewQueries: queriesFromGlobalMetadata(component.viewQueries, outputCtx),\n    wrapDirectivesAndPipesInClosure: false,\n    styles: (summary.template && summary.template.styles) || EMPTY_ARRAY,\n    encapsulation:\n        (summary.template && summary.template.encapsulation) || core.ViewEncapsulation.Emulated,\n    interpolation: DEFAULT_INTERPOLATION_CONFIG,\n    animations: null,\n    viewProviders:\n        component.viewProviders.length > 0 ? new o.WrappedNodeExpr(component.viewProviders) : null,\n    relativeContextFilePath: '',\n    i18nUseExternalIds: true,\n  };\n  const res = compileComponentFromMetadata(meta, outputCtx.constantPool, bindingParser);\n\n  // Create the partial class to be merged with the actual class.\n  outputCtx.statements.push(new o.ClassStmt(\n      name, null,\n      [new o.ClassField(definitionField, o.INFERRED_TYPE, [o.StmtModifier.Static], res.expression)],\n      [], new o.ClassMethod(null, [], []), []));\n}\n\n/**\n * Compute `R3DirectiveMetadata` given `CompileDirectiveMetadata` and a `CompileReflector`.\n */\nfunction directiveMetadataFromGlobalMetadata(\n    directive: CompileDirectiveMetadata, outputCtx: OutputContext,\n    reflector: CompileReflector): R3DirectiveMetadata {\n  // The global-analysis based Ivy mode in ngc is no longer utilized/supported.\n  throw new Error('unsupported');\n}\n\n/**\n * Convert `CompileQueryMetadata` into `R3QueryMetadata`.\n */\nfunction queriesFromGlobalMetadata(\n    queries: CompileQueryMetadata[], outputCtx: OutputContext): R3QueryMetadata[] {\n  return queries.map(query => {\n    let read: o.Expression|null = null;\n    if (query.read && query.read.identifier) {\n      read = outputCtx.importExpr(query.read.identifier.reference);\n    }\n    return {\n      propertyName: query.propertyName,\n      first: query.first,\n      predicate: selectorsFromGlobalMetadata(query.selectors, outputCtx),\n      descendants: query.descendants, read,\n      static: !!query.static\n    };\n  });\n}\n\n/**\n * Convert `CompileTokenMetadata` for query selectors into either an expression for a predicate\n * type, or a list of string predicates.\n */\nfunction selectorsFromGlobalMetadata(\n    selectors: CompileTokenMetadata[], outputCtx: OutputContext): o.Expression|string[] {\n  if (selectors.length > 1 || (selectors.length == 1 && selectors[0].value)) {\n    const selectorStrings = selectors.map(value => value.value as string);\n    selectorStrings.some(value => !value) &&\n        error('Found a type among the string selectors expected');\n    return outputCtx.constantPool.getConstLiteral(\n        o.literalArr(selectorStrings.map(value => o.literal(value))));\n  }\n\n  if (selectors.length == 1) {\n    const first = selectors[0];\n    if (first.identifier) {\n      return outputCtx.importExpr(first.identifier.reference);\n    }\n  }\n\n  error('Unexpected query form');\n  return o.NULL_EXPR;\n}\n\nfunction prepareQueryParams(query: R3QueryMetadata, constantPool: ConstantPool): o.Expression[] {\n  const parameters = [getQueryPredicate(query, constantPool), o.literal(query.descendants)];\n  if (query.read) {\n    parameters.push(query.read);\n  }\n  return parameters;\n}\n\n// Turn a directive selector into an R3-compatible selector for directive def\nfunction createDirectiveSelector(selector: string | null): o.Expression {\n  return asLiteral(core.parseSelectorToR3Selector(selector));\n}\n\nfunction convertAttributesToExpressions(attributes: {[name: string]: o.Expression}):\n    o.Expression[] {\n  const values: o.Expression[] = [];\n  for (let key of Object.getOwnPropertyNames(attributes)) {\n    const value = attributes[key];\n    values.push(o.literal(key), value);\n  }\n  return values;\n}\n\n// Define and update any content queries\nfunction createContentQueriesFunction(\n    queries: R3QueryMetadata[], constantPool: ConstantPool, name?: string): o.Expression {\n  const createStatements: o.Statement[] = [];\n  const updateStatements: o.Statement[] = [];\n  const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n\n  for (const query of queries) {\n    const queryInstruction = query.static ? R3.staticContentQuery : R3.contentQuery;\n\n    // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n    createStatements.push(\n        o.importExpr(queryInstruction)\n            .callFn([o.variable('dirIndex'), ...prepareQueryParams(query, constantPool) as any])\n            .toStmt());\n\n    // update, e.g. (r3.queryRefresh(tmp = r3.loadContentQuery()) && (ctx.someDir = tmp));\n    const temporary = tempAllocator();\n    const getQueryList = o.importExpr(R3.loadContentQuery).callFn([]);\n    const refresh = o.importExpr(R3.queryRefresh).callFn([temporary.set(getQueryList)]);\n    const updateDirective = o.variable(CONTEXT_NAME)\n                                .prop(query.propertyName)\n                                .set(query.first ? temporary.prop('first') : temporary);\n    updateStatements.push(refresh.and(updateDirective).toStmt());\n  }\n\n  const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n  return o.fn(\n      [\n        new o.FnParam(RENDER_FLAGS, o.NUMBER_TYPE), new o.FnParam(CONTEXT_NAME, null),\n        new o.FnParam('dirIndex', null)\n      ],\n      [\n        renderFlagCheckIfStmt(core.RenderFlags.Create, createStatements),\n        renderFlagCheckIfStmt(core.RenderFlags.Update, updateStatements)\n      ],\n      o.INFERRED_TYPE, null, contentQueriesFnName);\n}\n\nfunction stringAsType(str: string): o.Type {\n  return o.expressionType(o.literal(str));\n}\n\nfunction stringMapAsType(map: {[key: string]: string | string[]}): o.Type {\n  const mapValues = Object.keys(map).map(key => {\n    const value = Array.isArray(map[key]) ? map[key][0] : map[key];\n    return {\n      key,\n      value: o.literal(value),\n      quoted: true,\n    };\n  });\n  return o.expressionType(o.literalMap(mapValues));\n}\n\nfunction stringArrayAsType(arr: string[]): o.Type {\n  return arr.length > 0 ? o.expressionType(o.literalArr(arr.map(value => o.literal(value)))) :\n                          o.NONE_TYPE;\n}\n\nfunction createTypeForDef(meta: R3DirectiveMetadata, typeBase: o.ExternalReference): o.Type {\n  // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n  // string literal, which must be on one line.\n  const selectorForType = (meta.selector || '').replace(/\\n/g, '');\n\n  return o.expressionType(o.importExpr(typeBase, [\n    typeWithParameters(meta.type, meta.typeArgumentCount),\n    stringAsType(selectorForType),\n    meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : o.NONE_TYPE,\n    stringMapAsType(meta.inputs),\n    stringMapAsType(meta.outputs),\n    stringArrayAsType(meta.queries.map(q => q.propertyName)),\n  ]));\n}\n\n// Define and update any view queries\nfunction createViewQueriesFunction(\n    viewQueries: R3QueryMetadata[], constantPool: ConstantPool, name?: string): o.Expression {\n  const createStatements: o.Statement[] = [];\n  const updateStatements: o.Statement[] = [];\n  const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n\n  viewQueries.forEach((query: R3QueryMetadata) => {\n    const queryInstruction = query.static ? R3.staticViewQuery : R3.viewQuery;\n\n    // creation, e.g. r3.viewQuery(somePredicate, true);\n    const queryDefinition =\n        o.importExpr(queryInstruction).callFn(prepareQueryParams(query, constantPool));\n    createStatements.push(queryDefinition.toStmt());\n\n    // update, e.g. (r3.queryRefresh(tmp = r3.loadViewQuery()) && (ctx.someDir = tmp));\n    const temporary = tempAllocator();\n    const getQueryList = o.importExpr(R3.loadViewQuery).callFn([]);\n    const refresh = o.importExpr(R3.queryRefresh).callFn([temporary.set(getQueryList)]);\n    const updateDirective = o.variable(CONTEXT_NAME)\n                                .prop(query.propertyName)\n                                .set(query.first ? temporary.prop('first') : temporary);\n    updateStatements.push(refresh.and(updateDirective).toStmt());\n  });\n\n  const viewQueryFnName = name ? `${name}_Query` : null;\n  return o.fn(\n      [new o.FnParam(RENDER_FLAGS, o.NUMBER_TYPE), new o.FnParam(CONTEXT_NAME, null)],\n      [\n        renderFlagCheckIfStmt(core.RenderFlags.Create, createStatements),\n        renderFlagCheckIfStmt(core.RenderFlags.Update, updateStatements)\n      ],\n      o.INFERRED_TYPE, null, viewQueryFnName);\n}\n\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(\n    hostBindingsMetadata: R3HostMetadata, typeSourceSpan: ParseSourceSpan,\n    bindingParser: BindingParser, constantPool: ConstantPool, selector: string,\n    name?: string): o.Expression|null {\n  // Initialize hostVarsCount to number of bound host properties (interpolations illegal)\n  const hostVarsCount = Object.keys(hostBindingsMetadata.properties).length;\n  const elVarExp = o.variable('elIndex');\n  const bindingContext = o.variable(CONTEXT_NAME);\n  const styleBuilder = new StylingBuilder(elVarExp, bindingContext);\n\n  const {styleAttr, classAttr} = hostBindingsMetadata.specialAttributes;\n  if (styleAttr !== undefined) {\n    styleBuilder.registerStyleAttr(styleAttr);\n  }\n  if (classAttr !== undefined) {\n    styleBuilder.registerClassAttr(classAttr);\n  }\n\n  const createStatements: o.Statement[] = [];\n  const updateStatements: o.Statement[] = [];\n\n  let totalHostVarsCount = hostVarsCount;\n  const hostBindingSourceSpan = typeSourceSpan;\n  const directiveSummary = metadataAsSummary(hostBindingsMetadata);\n\n  let valueConverter: ValueConverter;\n  const getValueConverter = () => {\n    if (!valueConverter) {\n      const hostVarsCountFn = (numSlots: number): number => {\n        const originalVarsCount = totalHostVarsCount;\n        totalHostVarsCount += numSlots;\n        return originalVarsCount;\n      };\n      valueConverter = new ValueConverter(\n          constantPool,\n          () => error('Unexpected node'),  // new nodes are illegal here\n          hostVarsCountFn,\n          () => error('Unexpected pipe'));  // pipes are illegal here\n    }\n    return valueConverter;\n  };\n\n  // Calculate host event bindings\n  const eventBindings =\n      bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);\n  if (eventBindings && eventBindings.length) {\n    const listeners = createHostListeners(eventBindings, name);\n    createStatements.push(...listeners);\n  }\n\n  // Calculate the host property bindings\n  const bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);\n  const propertyBindings: o.Expression[][] = [];\n  const attributeBindings: o.Expression[][] = [];\n  const syntheticHostBindings: o.Expression[][] = [];\n\n  bindings && bindings.forEach((binding: ParsedProperty) => {\n    const name = binding.name;\n    const stylingInputWasSet =\n        styleBuilder.registerInputBasedOnName(name, binding.expression, binding.sourceSpan);\n    if (!stylingInputWasSet) {\n      // resolve literal arrays and literal objects\n      const value = binding.expression.visit(getValueConverter());\n      const bindingExpr = bindingFn(bindingContext, value);\n\n      const {bindingName, instruction, isAttribute} = getBindingNameAndInstruction(binding);\n\n      const securityContexts =\n          bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute)\n              .filter(context => context !== core.SecurityContext.NONE);\n\n      let sanitizerFn: o.ExternalExpr|null = null;\n      if (securityContexts.length) {\n        if (securityContexts.length === 2 &&\n            securityContexts.indexOf(core.SecurityContext.URL) > -1 &&\n            securityContexts.indexOf(core.SecurityContext.RESOURCE_URL) > -1) {\n          // Special case for some URL attributes (such as \"src\" and \"href\") that may be a part\n          // of different security contexts. In this case we use special santitization function and\n          // select the actual sanitizer at runtime based on a tag name that is provided while\n          // invoking sanitization function.\n          sanitizerFn = o.importExpr(R3.sanitizeUrlOrResourceUrl);\n        } else {\n          sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);\n        }\n      }\n      const instructionParams = [o.literal(bindingName), bindingExpr.currValExpr];\n      if (sanitizerFn) {\n        instructionParams.push(sanitizerFn);\n      }\n\n      updateStatements.push(...bindingExpr.stmts);\n\n      if (instruction === R3.hostProperty) {\n        propertyBindings.push(instructionParams);\n      } else if (instruction === R3.attribute) {\n        attributeBindings.push(instructionParams);\n      } else if (instruction === R3.updateSyntheticHostBinding) {\n        syntheticHostBindings.push(instructionParams);\n      } else {\n        updateStatements.push(o.importExpr(instruction).callFn(instructionParams).toStmt());\n      }\n    }\n  });\n\n  if (propertyBindings.length > 0) {\n    updateStatements.push(chainedInstruction(R3.hostProperty, propertyBindings).toStmt());\n  }\n\n  if (attributeBindings.length > 0) {\n    updateStatements.push(chainedInstruction(R3.attribute, attributeBindings).toStmt());\n  }\n\n  if (syntheticHostBindings.length > 0) {\n    updateStatements.push(\n        chainedInstruction(R3.updateSyntheticHostBinding, syntheticHostBindings).toStmt());\n  }\n\n  // since we're dealing with directives/components and both have hostBinding\n  // functions, we need to generate a special hostAttrs instruction that deals\n  // with both the assignment of styling as well as static attributes to the host\n  // element. The instruction below will instruct all initial styling (styling\n  // that is inside of a host binding within a directive/component) to be attached\n  // to the host element alongside any of the provided host attributes that were\n  // collected earlier.\n  const hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);\n  const hostInstruction = styleBuilder.buildHostAttrsInstruction(null, hostAttrs, constantPool);\n  if (hostInstruction) {\n    createStatements.push(createStylingStmt(hostInstruction, bindingContext, bindingFn));\n  }\n\n  if (styleBuilder.hasBindings) {\n    // singular style/class bindings (things like `[style.prop]` and `[class.name]`)\n    // MUST be registered on a given element within the component/directive\n    // templateFn/hostBindingsFn functions. The instruction below will figure out\n    // what all the bindings are and then generate the statements required to register\n    // those bindings to the element via `styling`.\n    const stylingInstruction = styleBuilder.buildStylingInstruction(null, constantPool);\n    if (stylingInstruction) {\n      createStatements.push(createStylingStmt(stylingInstruction, bindingContext, bindingFn));\n    }\n\n    // finally each binding that was registered in the statement above will need to be added to\n    // the update block of a component/directive templateFn/hostBindingsFn so that the bindings\n    // are evaluated and updated for the element.\n    styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(instruction => {\n      // we subtract a value of `1` here because the binding slot was already\n      // allocated at the top of this method when all the input bindings were\n      // counted.\n      totalHostVarsCount += Math.max(instruction.allocateBindingSlots - 1, 0);\n      updateStatements.push(createStylingStmt(instruction, bindingContext, bindingFn));\n    });\n  }\n\n  if (totalHostVarsCount) {\n    createStatements.unshift(\n        o.importExpr(R3.allocHostVars).callFn([o.literal(totalHostVarsCount)]).toStmt());\n  }\n\n  if (createStatements.length > 0 || updateStatements.length > 0) {\n    const hostBindingsFnName = name ? `${name}_HostBindings` : null;\n    const statements: o.Statement[] = [];\n    if (createStatements.length > 0) {\n      statements.push(renderFlagCheckIfStmt(core.RenderFlags.Create, createStatements));\n    }\n    if (updateStatements.length > 0) {\n      statements.push(renderFlagCheckIfStmt(core.RenderFlags.Update, updateStatements));\n    }\n    return o.fn(\n        [\n          new o.FnParam(RENDER_FLAGS, o.NUMBER_TYPE), new o.FnParam(CONTEXT_NAME, null),\n          new o.FnParam(elVarExp.name !, o.NUMBER_TYPE)\n        ],\n        statements, o.INFERRED_TYPE, null, hostBindingsFnName);\n  }\n\n  return null;\n}\n\nfunction bindingFn(implicit: any, value: AST) {\n  return convertPropertyBinding(\n      null, implicit, value, 'b', BindingForm.TrySimple, () => error('Unexpected interpolation'));\n}\n\nfunction createStylingStmt(\n    instruction: StylingInstruction, bindingContext: any, bindingFn: Function): o.Statement {\n  const params = instruction.params(value => bindingFn(bindingContext, value).currValExpr);\n  return o.importExpr(instruction.reference, null, instruction.sourceSpan)\n      .callFn(params, instruction.sourceSpan)\n      .toStmt();\n}\n\nfunction getBindingNameAndInstruction(binding: ParsedProperty):\n    {bindingName: string, instruction: o.ExternalReference, isAttribute: boolean} {\n  let bindingName = binding.name;\n  let instruction !: o.ExternalReference;\n\n  // Check to see if this is an attr binding or a property binding\n  const attrMatches = bindingName.match(ATTR_REGEX);\n  if (attrMatches) {\n    bindingName = attrMatches[1];\n    instruction = R3.attribute;\n  } else {\n    if (binding.isAnimation) {\n      bindingName = prepareSyntheticPropertyName(bindingName);\n      // host bindings that have a synthetic property (e.g. @foo) should always be rendered\n      // in the context of the component and not the parent. Therefore there is a special\n      // compatibility instruction available for this purpose.\n      instruction = R3.updateSyntheticHostBinding;\n    } else {\n      instruction = R3.hostProperty;\n    }\n  }\n\n  return {bindingName, instruction, isAttribute: !!attrMatches};\n}\n\nfunction createHostListeners(eventBindings: ParsedEvent[], name?: string): o.Statement[] {\n  return eventBindings.map(binding => {\n    let bindingName = binding.name && sanitizeIdentifier(binding.name);\n    const bindingFnName = binding.type === ParsedEventType.Animation ?\n        prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :\n        bindingName;\n    const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;\n    const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);\n    const instruction =\n        binding.type == ParsedEventType.Animation ? R3.componentHostSyntheticListener : R3.listener;\n    return o.importExpr(instruction).callFn(params).toStmt();\n  });\n}\n\nfunction metadataAsSummary(meta: R3HostMetadata): CompileDirectiveSummary {\n  // clang-format off\n  return {\n    // This is used by the BindingParser, which only deals with listeners and properties. There's no\n    // need to pass attributes to it.\n    hostAttributes: {},\n    hostListeners: meta.listeners,\n    hostProperties: meta.properties,\n  } as CompileDirectiveSummary;\n  // clang-format on\n}\n\n\nfunction typeMapToExpressionMap(\n    map: Map<string, StaticSymbol>, outputCtx: OutputContext): Map<string, o.Expression> {\n  // Convert each map entry into another entry where the value is an expression importing the type.\n  const entries = Array.from(map).map(\n      ([key, type]): [string, o.Expression] => [key, outputCtx.importExpr(type)]);\n  return new Map(entries);\n}\n\nconst HOST_REG_EXP = /^(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\))$/;\n// Represents the groups in the above regex.\nconst enum HostBindingGroup {\n  // group 1: \"prop\" from \"[prop]\", or \"attr.role\" from \"[attr.role]\", or @anim from [@anim]\n  Binding = 1,\n\n  // group 2: \"event\" from \"(event)\"\n  Event = 2,\n}\n\n// Defines Host Bindings structure that contains attributes, listeners, and properties,\n// parsed from the `host` object defined for a Type.\nexport interface ParsedHostBindings {\n  attributes: {[key: string]: o.Expression};\n  listeners: {[key: string]: string};\n  properties: {[key: string]: string};\n  specialAttributes: {styleAttr?: string; classAttr?: string;};\n}\n\nexport function parseHostBindings(host: {[key: string]: string | o.Expression}):\n    ParsedHostBindings {\n  const attributes: {[key: string]: o.Expression} = {};\n  const listeners: {[key: string]: string} = {};\n  const properties: {[key: string]: string} = {};\n  const specialAttributes: {styleAttr?: string; classAttr?: string;} = {};\n\n  for (const key of Object.keys(host)) {\n    const value = host[key];\n    const matches = key.match(HOST_REG_EXP);\n\n    if (matches === null) {\n      switch (key) {\n        case 'class':\n          if (typeof value !== 'string') {\n            // TODO(alxhub): make this a diagnostic.\n            throw new Error(`Class binding must be string`);\n          }\n          specialAttributes.classAttr = value;\n          break;\n        case 'style':\n          if (typeof value !== 'string') {\n            // TODO(alxhub): make this a diagnostic.\n            throw new Error(`Style binding must be string`);\n          }\n          specialAttributes.styleAttr = value;\n          break;\n        default:\n          if (typeof value === 'string') {\n            attributes[key] = o.literal(value);\n          } else {\n            attributes[key] = value;\n          }\n      }\n    } else if (matches[HostBindingGroup.Binding] != null) {\n      if (typeof value !== 'string') {\n        // TODO(alxhub): make this a diagnostic.\n        throw new Error(`Property binding must be string`);\n      }\n      // synthetic properties (the ones that have a `@` as a prefix)\n      // are still treated the same as regular properties. Therefore\n      // there is no point in storing them in a separate map.\n      properties[matches[HostBindingGroup.Binding]] = value;\n    } else if (matches[HostBindingGroup.Event] != null) {\n      if (typeof value !== 'string') {\n        // TODO(alxhub): make this a diagnostic.\n        throw new Error(`Event binding must be string`);\n      }\n      listeners[matches[HostBindingGroup.Event]] = value;\n    }\n  }\n\n  return {attributes, listeners, properties, specialAttributes};\n}\n\n/**\n * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a\n * given set of host bindings has no errors.\n *\n * @param bindings set of host bindings to verify.\n * @param sourceSpan source span where host bindings were defined.\n * @returns array of errors associated with a given set of host bindings.\n */\nexport function verifyHostBindings(\n    bindings: ParsedHostBindings, sourceSpan: ParseSourceSpan): ParseError[] {\n  const summary = metadataAsSummary(bindings);\n  // TODO: abstract out host bindings verification logic and use it instead of\n  // creating events and properties ASTs to detect errors (FW-996)\n  const bindingParser = makeBindingParser();\n  bindingParser.createDirectiveHostEventAsts(summary, sourceSpan);\n  bindingParser.createBoundHostProperties(summary, sourceSpan);\n  return bindingParser.errors;\n}\n\nfunction compileStyles(styles: string[], selector: string, hostSelector: string): string[] {\n  const shadowCss = new ShadowCss();\n  return styles.map(style => { return shadowCss !.shimCssText(style, selector, hostSelector); });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * An interface for retrieving documents by URL that the compiler uses\n * to load templates.\n */\nexport class ResourceLoader {\n  get(url: string): Promise<string>|string { return ''; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {CompilerFacade, CoreEnvironment, ExportedCompilerFacade, R3BaseMetadataFacade, R3ComponentMetadataFacade, R3DependencyMetadataFacade, R3DirectiveMetadataFacade, R3InjectableMetadataFacade, R3InjectorMetadataFacade, R3NgModuleMetadataFacade, R3PipeMetadataFacade, R3QueryMetadataFacade, StringMap, StringMapWithRename} from './compiler_facade_interface';\nimport {ConstantPool} from './constant_pool';\nimport {HostBinding, HostListener, Input, Output, Type} from './core';\nimport {compileInjectable} from './injectable_compiler_2';\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './ml_parser/interpolation_config';\nimport {DeclareVarStmt, Expression, LiteralExpr, Statement, StmtModifier, WrappedNodeExpr} from './output/output_ast';\nimport {JitEvaluator} from './output/output_jit';\nimport {ParseError, ParseSourceSpan, r3JitTypeSourceSpan} from './parse_util';\nimport {R3DependencyMetadata, R3ResolvedDependencyType} from './render3/r3_factory';\nimport {R3JitReflector} from './render3/r3_jit';\nimport {R3InjectorMetadata, R3NgModuleMetadata, compileInjector, compileNgModule} from './render3/r3_module_compiler';\nimport {compilePipeFromMetadata} from './render3/r3_pipe_compiler';\nimport {R3Reference} from './render3/util';\nimport {R3DirectiveMetadata, R3QueryMetadata} from './render3/view/api';\nimport {ParsedHostBindings, compileBaseDefFromMetadata, compileComponentFromMetadata, compileDirectiveFromMetadata, parseHostBindings, verifyHostBindings} from './render3/view/compiler';\nimport {makeBindingParser, parseTemplate} from './render3/view/template';\nimport {ResourceLoader} from './resource_loader';\nimport {DomElementSchemaRegistry} from './schema/dom_element_schema_registry';\n\nexport class CompilerFacadeImpl implements CompilerFacade {\n  R3ResolvedDependencyType = R3ResolvedDependencyType as any;\n  ResourceLoader = ResourceLoader;\n  private elementSchemaRegistry = new DomElementSchemaRegistry();\n\n  constructor(private jitEvaluator = new JitEvaluator()) {}\n\n  compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3PipeMetadataFacade):\n      any {\n    const res = compilePipeFromMetadata({\n      name: facade.name,\n      type: new WrappedNodeExpr(facade.type),\n      typeArgumentCount: facade.typeArgumentCount,\n      deps: convertR3DependencyMetadataArray(facade.deps),\n      pipeName: facade.pipeName,\n      pure: facade.pure,\n    });\n    return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);\n  }\n\n  compileInjectable(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n      facade: R3InjectableMetadataFacade): any {\n    const {expression, statements} = compileInjectable({\n      name: facade.name,\n      type: new WrappedNodeExpr(facade.type),\n      typeArgumentCount: facade.typeArgumentCount,\n      providedIn: computeProvidedIn(facade.providedIn),\n      useClass: wrapExpression(facade, USE_CLASS),\n      useFactory: wrapExpression(facade, USE_FACTORY),\n      useValue: wrapExpression(facade, USE_VALUE),\n      useExisting: wrapExpression(facade, USE_EXISTING),\n      ctorDeps: convertR3DependencyMetadataArray(facade.ctorDeps),\n      userDeps: convertR3DependencyMetadataArray(facade.userDeps) || undefined,\n    });\n\n    return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);\n  }\n\n  compileInjector(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n      facade: R3InjectorMetadataFacade): any {\n    const meta: R3InjectorMetadata = {\n      name: facade.name,\n      type: new WrappedNodeExpr(facade.type),\n      deps: convertR3DependencyMetadataArray(facade.deps),\n      providers: new WrappedNodeExpr(facade.providers),\n      imports: facade.imports.map(i => new WrappedNodeExpr(i)),\n    };\n    const res = compileInjector(meta);\n    return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);\n  }\n\n  compileNgModule(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n      facade: R3NgModuleMetadataFacade): any {\n    const meta: R3NgModuleMetadata = {\n      type: new WrappedNodeExpr(facade.type),\n      bootstrap: facade.bootstrap.map(wrapReference),\n      declarations: facade.declarations.map(wrapReference),\n      imports: facade.imports.map(wrapReference),\n      exports: facade.exports.map(wrapReference),\n      emitInline: true,\n      containsForwardDecls: false,\n      schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,\n      id: facade.id ? new WrappedNodeExpr(facade.id) : null,\n    };\n    const res = compileNgModule(meta);\n    return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);\n  }\n\n  compileDirective(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n      facade: R3DirectiveMetadataFacade): any {\n    const constantPool = new ConstantPool();\n    const bindingParser = makeBindingParser();\n\n    const meta: R3DirectiveMetadata = convertDirectiveFacadeToMetadata(facade);\n    const res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);\n    const preStatements = [...constantPool.statements, ...res.statements];\n    return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, preStatements);\n  }\n\n  compileComponent(\n      angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n      facade: R3ComponentMetadataFacade): any {\n    // The ConstantPool is a requirement of the JIT'er.\n    const constantPool = new ConstantPool();\n\n    const interpolationConfig = facade.interpolation ?\n        InterpolationConfig.fromArray(facade.interpolation) :\n        DEFAULT_INTERPOLATION_CONFIG;\n    // Parse the template and check for errors.\n    const template = parseTemplate(\n        facade.template, sourceMapUrl,\n        {preserveWhitespaces: facade.preserveWhitespaces, interpolationConfig});\n    if (template.errors !== undefined) {\n      const errors = template.errors.map(err => err.toString()).join(', ');\n      throw new Error(`Errors during JIT compilation of template for ${facade.name}: ${errors}`);\n    }\n\n    // Compile the component metadata, including template, into an expression.\n    // TODO(alxhub): implement inputs, outputs, queries, etc.\n    const res = compileComponentFromMetadata(\n        {\n          ...facade as R3ComponentMetadataFacadeNoPropAndWhitespace,\n          ...convertDirectiveFacadeToMetadata(facade),\n          selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),\n          template,\n          wrapDirectivesAndPipesInClosure: false,\n          styles: facade.styles || [],\n          encapsulation: facade.encapsulation as any,\n          interpolation: interpolationConfig,\n          changeDetection: facade.changeDetection,\n          animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,\n          viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :\n                                                        null,\n          relativeContextFilePath: '',\n          i18nUseExternalIds: true,\n        },\n        constantPool, makeBindingParser(interpolationConfig));\n    const preStatements = [...constantPool.statements, ...res.statements];\n    return this.jitExpression(\n        res.expression, angularCoreEnv, `ng:///${facade.name}.js`, preStatements);\n  }\n\n  compileBase(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3BaseMetadataFacade):\n      any {\n    const constantPool = new ConstantPool();\n    const typeSourceSpan =\n        this.createParseSourceSpan('Base', facade.name, `ng:///${facade.name}.js`);\n    const meta = {\n      ...facade,\n      typeSourceSpan,\n      viewQueries: facade.viewQueries ? facade.viewQueries.map(convertToR3QueryMetadata) :\n                                        facade.viewQueries,\n      queries: facade.queries ? facade.queries.map(convertToR3QueryMetadata) : facade.queries,\n      host: extractHostBindings(facade.propMetadata, typeSourceSpan)\n    };\n    const res = compileBaseDefFromMetadata(meta, constantPool, makeBindingParser());\n    return this.jitExpression(\n        res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);\n  }\n\n  createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan {\n    return r3JitTypeSourceSpan(kind, typeName, sourceUrl);\n  }\n\n  /**\n   * JIT compiles an expression and returns the result of executing that expression.\n   *\n   * @param def the definition which will be compiled and executed to get the value to patch\n   * @param context an object map of @angular/core symbol names to symbols which will be available\n   * in the context of the compiled expression\n   * @param sourceUrl a URL to use for the source map of the compiled expression\n   * @param preStatements a collection of statements that should be evaluated before the expression.\n   */\n  private jitExpression(\n      def: Expression, context: {[key: string]: any}, sourceUrl: string,\n      preStatements: Statement[]): any {\n    // The ConstantPool may contain Statements which declare variables used in the final expression.\n    // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n    // declaration of $def which is set to the expression being compiled.\n    const statements: Statement[] = [\n      ...preStatements,\n      new DeclareVarStmt('$def', def, undefined, [StmtModifier.Exported]),\n    ];\n\n    const res = this.jitEvaluator.evaluateStatements(\n        sourceUrl, statements, new R3JitReflector(context), /* enableSourceMaps */ true);\n    return res['$def'];\n  }\n}\n\n// This seems to be needed to placate TS v3.0 only\ntype R3ComponentMetadataFacadeNoPropAndWhitespace = Pick<\n    R3ComponentMetadataFacade,\n    Exclude<Exclude<keyof R3ComponentMetadataFacade, 'preserveWhitespaces'>, 'propMetadata'>>;\n\nconst USE_CLASS = Object.keys({useClass: null})[0];\nconst USE_FACTORY = Object.keys({useFactory: null})[0];\nconst USE_VALUE = Object.keys({useValue: null})[0];\nconst USE_EXISTING = Object.keys({useExisting: null})[0];\n\nconst wrapReference = function(value: any): R3Reference {\n  const wrapped = new WrappedNodeExpr(value);\n  return {value: wrapped, type: wrapped};\n};\n\nfunction convertToR3QueryMetadata(facade: R3QueryMetadataFacade): R3QueryMetadata {\n  return {\n    ...facade,\n    predicate: Array.isArray(facade.predicate) ? facade.predicate :\n                                                 new WrappedNodeExpr(facade.predicate),\n    read: facade.read ? new WrappedNodeExpr(facade.read) : null,\n    static: facade.static\n  };\n}\n\nfunction convertDirectiveFacadeToMetadata(facade: R3DirectiveMetadataFacade): R3DirectiveMetadata {\n  const inputsFromMetadata = parseInputOutputs(facade.inputs || []);\n  const outputsFromMetadata = parseInputOutputs(facade.outputs || []);\n  const propMetadata = facade.propMetadata;\n  const inputsFromType: StringMapWithRename = {};\n  const outputsFromType: StringMap = {};\n  for (const field in propMetadata) {\n    if (propMetadata.hasOwnProperty(field)) {\n      propMetadata[field].forEach(ann => {\n        if (isInput(ann)) {\n          inputsFromType[field] =\n              ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n        } else if (isOutput(ann)) {\n          outputsFromType[field] = ann.bindingPropertyName || field;\n        }\n      });\n    }\n  }\n\n  return {\n    ...facade as R3DirectiveMetadataFacadeNoPropAndWhitespace,\n    typeSourceSpan: facade.typeSourceSpan,\n    type: new WrappedNodeExpr(facade.type),\n    deps: convertR3DependencyMetadataArray(facade.deps),\n    host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),\n    inputs: {...inputsFromMetadata, ...inputsFromType},\n    outputs: {...outputsFromMetadata, ...outputsFromType},\n    queries: facade.queries.map(convertToR3QueryMetadata),\n    providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,\n    viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),\n  };\n}\n\n// This seems to be needed to placate TS v3.0 only\ntype R3DirectiveMetadataFacadeNoPropAndWhitespace =\n    Pick<R3DirectiveMetadataFacade, Exclude<keyof R3DirectiveMetadataFacade, 'propMetadata'>>;\n\nfunction wrapExpression(obj: any, property: string): WrappedNodeExpr<any>|undefined {\n  if (obj.hasOwnProperty(property)) {\n    return new WrappedNodeExpr(obj[property]);\n  } else {\n    return undefined;\n  }\n}\n\nfunction computeProvidedIn(providedIn: Type | string | null | undefined): Expression {\n  if (providedIn == null || typeof providedIn === 'string') {\n    return new LiteralExpr(providedIn);\n  } else {\n    return new WrappedNodeExpr(providedIn);\n  }\n}\n\nfunction convertR3DependencyMetadata(facade: R3DependencyMetadataFacade): R3DependencyMetadata {\n  let tokenExpr;\n  if (facade.token === null) {\n    tokenExpr = new LiteralExpr(null);\n  } else if (facade.resolved === R3ResolvedDependencyType.Attribute) {\n    tokenExpr = new LiteralExpr(facade.token);\n  } else {\n    tokenExpr = new WrappedNodeExpr(facade.token);\n  }\n  return {\n    token: tokenExpr,\n    resolved: facade.resolved,\n    host: facade.host,\n    optional: facade.optional,\n    self: facade.self,\n    skipSelf: facade.skipSelf\n  };\n}\n\nfunction convertR3DependencyMetadataArray(facades: R3DependencyMetadataFacade[] | null | undefined):\n    R3DependencyMetadata[]|null {\n  return facades == null ? null : facades.map(convertR3DependencyMetadata);\n}\n\nfunction extractHostBindings(\n    propMetadata: {[key: string]: any[]}, sourceSpan: ParseSourceSpan,\n    host?: {[key: string]: string}): ParsedHostBindings {\n  // First parse the declarations from the metadata.\n  const bindings = parseHostBindings(host || {});\n\n  // After that check host bindings for errors\n  const errors = verifyHostBindings(bindings, sourceSpan);\n  if (errors.length) {\n    throw new Error(errors.map((error: ParseError) => error.msg).join('\\n'));\n  }\n\n  // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.\n  for (const field in propMetadata) {\n    if (propMetadata.hasOwnProperty(field)) {\n      propMetadata[field].forEach(ann => {\n        if (isHostBinding(ann)) {\n          bindings.properties[ann.hostPropertyName || field] = field;\n        } else if (isHostListener(ann)) {\n          bindings.listeners[ann.eventName || field] = `${field}(${(ann.args || []).join(',')})`;\n        }\n      });\n    }\n  }\n\n  return bindings;\n}\n\nfunction isHostBinding(value: any): value is HostBinding {\n  return value.ngMetadataName === 'HostBinding';\n}\n\nfunction isHostListener(value: any): value is HostListener {\n  return value.ngMetadataName === 'HostListener';\n}\n\n\nfunction isInput(value: any): value is Input {\n  return value.ngMetadataName === 'Input';\n}\n\nfunction isOutput(value: any): value is Output {\n  return value.ngMetadataName === 'Output';\n}\n\nfunction parseInputOutputs(values: string[]): StringMap {\n  return values.reduce(\n      (map, value) => {\n        const [field, property] = value.split(',').map(piece => piece.trim());\n        map[field] = property || field;\n        return map;\n      },\n      {} as StringMap);\n}\n\nexport function publishFacade(global: any) {\n  const ng: ExportedCompilerFacade = global.ng || (global.ng = {});\n  ng.ÉµcompilerFacade = new CompilerFacadeImpl();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags} from './core';\nimport {Identifiers} from './identifiers';\nimport * as o from './output/output_ast';\nimport {R3DependencyMetadata, R3FactoryDelegateType, R3FactoryMetadata, compileFactoryFunction} from './render3/r3_factory';\nimport {mapToMapExpression, typeWithParameters} from './render3/util';\n\nexport interface InjectableDef {\n  expression: o.Expression;\n  type: o.Type;\n  statements: o.Statement[];\n}\n\nexport interface R3InjectableMetadata {\n  name: string;\n  type: o.Expression;\n  typeArgumentCount: number;\n  ctorDeps: R3DependencyMetadata[]|'invalid'|null;\n  providedIn: o.Expression;\n  useClass?: o.Expression;\n  useFactory?: o.Expression;\n  useExisting?: o.Expression;\n  useValue?: o.Expression;\n  userDeps?: R3DependencyMetadata[];\n}\n\nexport function compileInjectable(meta: R3InjectableMetadata): InjectableDef {\n  let result: {factory: o.Expression, statements: o.Statement[]}|null = null;\n\n  const factoryMeta = {\n    name: meta.name,\n    type: meta.type,\n    deps: meta.ctorDeps,\n    injectFn: Identifiers.inject,\n  };\n\n  if (meta.useClass !== undefined) {\n    // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is\n    // used to instantiate the class with dependencies injected, or deps are not specified and\n    // the factory of the class is used to instantiate it.\n    //\n    // A special case exists for useClass: Type where Type is the injectable type itself and no\n    // deps are specified, in which case 'useClass' is effectively ignored.\n\n    const useClassOnSelf = meta.useClass.isEquivalent(meta.type);\n    let deps: R3DependencyMetadata[]|undefined = undefined;\n    if (meta.userDeps !== undefined) {\n      deps = meta.userDeps;\n    }\n\n    if (deps !== undefined) {\n      // factory: () => new meta.useClass(...deps)\n      result = compileFactoryFunction({\n        ...factoryMeta,\n        delegate: meta.useClass,\n        delegateDeps: deps,\n        delegateType: R3FactoryDelegateType.Class,\n      });\n    } else if (useClassOnSelf) {\n      result = compileFactoryFunction(factoryMeta);\n    } else {\n      result = compileFactoryFunction({\n        ...factoryMeta,\n        delegate: meta.useClass,\n        delegateType: R3FactoryDelegateType.Factory,\n      });\n    }\n  } else if (meta.useFactory !== undefined) {\n    result = compileFactoryFunction({\n      ...factoryMeta,\n      delegate: meta.useFactory,\n      delegateDeps: meta.userDeps || [],\n      delegateType: R3FactoryDelegateType.Function,\n    });\n  } else if (meta.useValue !== undefined) {\n    // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n    // client code because meta.useValue is an Expression which will be defined even if the actual\n    // value is undefined.\n    result = compileFactoryFunction({\n      ...factoryMeta,\n      expression: meta.useValue,\n    });\n  } else if (meta.useExisting !== undefined) {\n    // useExisting is an `inject` call on the existing token.\n    result = compileFactoryFunction({\n      ...factoryMeta,\n      expression: o.importExpr(Identifiers.inject).callFn([meta.useExisting]),\n    });\n  } else {\n    result = compileFactoryFunction(factoryMeta);\n  }\n\n  const token = meta.type;\n  const providedIn = meta.providedIn;\n\n  const expression = o.importExpr(Identifiers.ÉµÉµdefineInjectable).callFn([mapToMapExpression(\n      {token, factory: result.factory, providedIn})]);\n  const type = new o.ExpressionType(o.importExpr(\n      Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)]));\n\n  return {\n    expression,\n    type,\n    statements: result.statements,\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from './util';\n\nexport const VERSION = new Version('8.2.14');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileIdentifierMetadata} from './compile_metadata';\nimport {MissingTranslationStrategy, ViewEncapsulation} from './core';\nimport {Identifiers} from './identifiers';\nimport * as o from './output/output_ast';\nimport {noUndefined} from './util';\n\nexport class CompilerConfig {\n  public defaultEncapsulation: ViewEncapsulation|null;\n  public useJit: boolean;\n  public jitDevMode: boolean;\n  public missingTranslation: MissingTranslationStrategy|null;\n  public preserveWhitespaces: boolean;\n  public strictInjectionParameters: boolean;\n\n  constructor(\n      {defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, jitDevMode = false,\n       missingTranslation = null, preserveWhitespaces, strictInjectionParameters}: {\n        defaultEncapsulation?: ViewEncapsulation,\n        useJit?: boolean,\n        jitDevMode?: boolean,\n        missingTranslation?: MissingTranslationStrategy|null,\n        preserveWhitespaces?: boolean,\n        strictInjectionParameters?: boolean,\n      } = {}) {\n    this.defaultEncapsulation = defaultEncapsulation;\n    this.useJit = !!useJit;\n    this.jitDevMode = !!jitDevMode;\n    this.missingTranslation = missingTranslation;\n    this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n    this.strictInjectionParameters = strictInjectionParameters === true;\n  }\n}\n\nexport function preserveWhitespacesDefault(\n    preserveWhitespacesOption: boolean | null, defaultSetting = false): boolean {\n  return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompileStylesheetMetadata, CompileTemplateMetadata, templateSourceUrl} from './compile_metadata';\nimport {CompilerConfig, preserveWhitespacesDefault} from './config';\nimport {ViewEncapsulation} from './core';\nimport * as html from './ml_parser/ast';\nimport {HtmlParser} from './ml_parser/html_parser';\nimport {InterpolationConfig} from './ml_parser/interpolation_config';\nimport {ParseTreeResult as HtmlParseTreeResult} from './ml_parser/parser';\nimport {ResourceLoader} from './resource_loader';\nimport {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';\nimport {PreparsedElementType, preparseElement} from './template_parser/template_preparser';\nimport {UrlResolver} from './url_resolver';\nimport {SyncAsync, isDefined, stringify, syntaxError} from './util';\n\nexport interface PrenormalizedTemplateMetadata {\n  ngModuleType: any;\n  componentType: any;\n  moduleUrl: string;\n  template: string|null;\n  templateUrl: string|null;\n  styles: string[];\n  styleUrls: string[];\n  interpolation: [string, string]|null;\n  encapsulation: ViewEncapsulation|null;\n  animations: any[];\n  preserveWhitespaces: boolean|null;\n}\n\nexport class DirectiveNormalizer {\n  private _resourceLoaderCache = new Map<string, SyncAsync<string>>();\n\n  constructor(\n      private _resourceLoader: ResourceLoader, private _urlResolver: UrlResolver,\n      private _htmlParser: HtmlParser, private _config: CompilerConfig) {}\n\n  clearCache(): void { this._resourceLoaderCache.clear(); }\n\n  clearCacheFor(normalizedDirective: CompileDirectiveMetadata): void {\n    if (!normalizedDirective.isComponent) {\n      return;\n    }\n    const template = normalizedDirective.template !;\n    this._resourceLoaderCache.delete(template.templateUrl !);\n    template.externalStylesheets.forEach(\n        (stylesheet) => { this._resourceLoaderCache.delete(stylesheet.moduleUrl !); });\n  }\n\n  private _fetch(url: string): SyncAsync<string> {\n    let result = this._resourceLoaderCache.get(url);\n    if (!result) {\n      result = this._resourceLoader.get(url);\n      this._resourceLoaderCache.set(url, result);\n    }\n    return result;\n  }\n\n  normalizeTemplate(prenormData: PrenormalizedTemplateMetadata):\n      SyncAsync<CompileTemplateMetadata> {\n    if (isDefined(prenormData.template)) {\n      if (isDefined(prenormData.templateUrl)) {\n        throw syntaxError(\n            `'${stringify(prenormData.componentType)}' component cannot define both template and templateUrl`);\n      }\n      if (typeof prenormData.template !== 'string') {\n        throw syntaxError(\n            `The template specified for component ${stringify(prenormData.componentType)} is not a string`);\n      }\n    } else if (isDefined(prenormData.templateUrl)) {\n      if (typeof prenormData.templateUrl !== 'string') {\n        throw syntaxError(\n            `The templateUrl specified for component ${stringify(prenormData.componentType)} is not a string`);\n      }\n    } else {\n      throw syntaxError(\n          `No template specified for component ${stringify(prenormData.componentType)}`);\n    }\n\n    if (isDefined(prenormData.preserveWhitespaces) &&\n        typeof prenormData.preserveWhitespaces !== 'boolean') {\n      throw syntaxError(\n          `The preserveWhitespaces option for component ${stringify(prenormData.componentType)} must be a boolean`);\n    }\n\n    return SyncAsync.then(\n        this._preParseTemplate(prenormData),\n        (preparsedTemplate) => this._normalizeTemplateMetadata(prenormData, preparsedTemplate));\n  }\n\n  private _preParseTemplate(prenomData: PrenormalizedTemplateMetadata):\n      SyncAsync<PreparsedTemplate> {\n    let template: SyncAsync<string>;\n    let templateUrl: string;\n    if (prenomData.template != null) {\n      template = prenomData.template;\n      templateUrl = prenomData.moduleUrl;\n    } else {\n      templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl !);\n      template = this._fetch(templateUrl);\n    }\n    return SyncAsync.then(\n        template, (template) => this._preparseLoadedTemplate(prenomData, template, templateUrl));\n  }\n\n  private _preparseLoadedTemplate(\n      prenormData: PrenormalizedTemplateMetadata, template: string,\n      templateAbsUrl: string): PreparsedTemplate {\n    const isInline = !!prenormData.template;\n    const interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation !);\n    const templateUrl = templateSourceUrl(\n        {reference: prenormData.ngModuleType}, {type: {reference: prenormData.componentType}},\n        {isInline, templateUrl: templateAbsUrl});\n    const rootNodesAndErrors = this._htmlParser.parse(\n        template, templateUrl, {tokenizeExpansionForms: true, interpolationConfig});\n    if (rootNodesAndErrors.errors.length > 0) {\n      const errorString = rootNodesAndErrors.errors.join('\\n');\n      throw syntaxError(`Template parse errors:\\n${errorString}`);\n    }\n\n    const templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata(\n        {styles: prenormData.styles, moduleUrl: prenormData.moduleUrl}));\n\n    const visitor = new TemplatePreparseVisitor();\n    html.visitAll(visitor, rootNodesAndErrors.rootNodes);\n    const templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata(\n        {styles: visitor.styles, styleUrls: visitor.styleUrls, moduleUrl: templateAbsUrl}));\n\n    const styles = templateMetadataStyles.styles.concat(templateStyles.styles);\n\n    const inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);\n    const styleUrls = this\n                          ._normalizeStylesheet(new CompileStylesheetMetadata(\n                              {styleUrls: prenormData.styleUrls, moduleUrl: prenormData.moduleUrl}))\n                          .styleUrls;\n    return {\n      template,\n      templateUrl: templateAbsUrl, isInline,\n      htmlAst: rootNodesAndErrors, styles, inlineStyleUrls, styleUrls,\n      ngContentSelectors: visitor.ngContentSelectors,\n    };\n  }\n\n  private _normalizeTemplateMetadata(\n      prenormData: PrenormalizedTemplateMetadata,\n      preparsedTemplate: PreparsedTemplate): SyncAsync<CompileTemplateMetadata> {\n    return SyncAsync.then(\n        this._loadMissingExternalStylesheets(\n            preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)),\n        (externalStylesheets) => this._normalizeLoadedTemplateMetadata(\n            prenormData, preparsedTemplate, externalStylesheets));\n  }\n\n  private _normalizeLoadedTemplateMetadata(\n      prenormData: PrenormalizedTemplateMetadata, preparsedTemplate: PreparsedTemplate,\n      stylesheets: Map<string, CompileStylesheetMetadata>): CompileTemplateMetadata {\n    // Algorithm:\n    // - produce exactly 1 entry per original styleUrl in\n    // CompileTemplateMetadata.externalStylesheets with all styles inlined\n    // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.\n    // Reason: be able to determine how many stylesheets there are even without loading\n    // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously\n    // (as resource loading may be async)\n\n    const styles = [...preparsedTemplate.styles];\n    this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);\n    const styleUrls = preparsedTemplate.styleUrls;\n\n    const externalStylesheets = styleUrls.map(styleUrl => {\n      const stylesheet = stylesheets.get(styleUrl) !;\n      const styles = [...stylesheet.styles];\n      this._inlineStyles(stylesheet.styleUrls, stylesheets, styles);\n      return new CompileStylesheetMetadata({moduleUrl: styleUrl, styles: styles});\n    });\n\n    let encapsulation = prenormData.encapsulation;\n    if (encapsulation == null) {\n      encapsulation = this._config.defaultEncapsulation;\n    }\n    if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 &&\n        styleUrls.length === 0) {\n      encapsulation = ViewEncapsulation.None;\n    }\n    return new CompileTemplateMetadata({\n      encapsulation,\n      template: preparsedTemplate.template,\n      templateUrl: preparsedTemplate.templateUrl,\n      htmlAst: preparsedTemplate.htmlAst, styles, styleUrls,\n      ngContentSelectors: preparsedTemplate.ngContentSelectors,\n      animations: prenormData.animations,\n      interpolation: prenormData.interpolation,\n      isInline: preparsedTemplate.isInline, externalStylesheets,\n      preserveWhitespaces: preserveWhitespacesDefault(\n          prenormData.preserveWhitespaces, this._config.preserveWhitespaces),\n    });\n  }\n\n  private _inlineStyles(\n      styleUrls: string[], stylesheets: Map<string, CompileStylesheetMetadata>,\n      targetStyles: string[]) {\n    styleUrls.forEach(styleUrl => {\n      const stylesheet = stylesheets.get(styleUrl) !;\n      stylesheet.styles.forEach(style => targetStyles.push(style));\n      this._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);\n    });\n  }\n\n  private _loadMissingExternalStylesheets(\n      styleUrls: string[],\n      loadedStylesheets:\n          Map<string, CompileStylesheetMetadata> = new Map<string, CompileStylesheetMetadata>()):\n      SyncAsync<Map<string, CompileStylesheetMetadata>> {\n    return SyncAsync.then(\n        SyncAsync.all(styleUrls.filter((styleUrl) => !loadedStylesheets.has(styleUrl))\n                          .map(\n                              styleUrl => SyncAsync.then(\n                                  this._fetch(styleUrl),\n                                  (loadedStyle) => {\n                                    const stylesheet =\n                                        this._normalizeStylesheet(new CompileStylesheetMetadata(\n                                            {styles: [loadedStyle], moduleUrl: styleUrl}));\n                                    loadedStylesheets.set(styleUrl, stylesheet);\n                                    return this._loadMissingExternalStylesheets(\n                                        stylesheet.styleUrls, loadedStylesheets);\n                                  }))),\n        (_) => loadedStylesheets);\n  }\n\n  private _normalizeStylesheet(stylesheet: CompileStylesheetMetadata): CompileStylesheetMetadata {\n    const moduleUrl = stylesheet.moduleUrl !;\n    const allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable)\n                             .map(url => this._urlResolver.resolve(moduleUrl, url));\n\n    const allStyles = stylesheet.styles.map(style => {\n      const styleWithImports = extractStyleUrls(this._urlResolver, moduleUrl, style);\n      allStyleUrls.push(...styleWithImports.styleUrls);\n      return styleWithImports.style;\n    });\n\n    return new CompileStylesheetMetadata(\n        {styles: allStyles, styleUrls: allStyleUrls, moduleUrl: moduleUrl});\n  }\n}\n\ninterface PreparsedTemplate {\n  template: string;\n  templateUrl: string;\n  isInline: boolean;\n  htmlAst: HtmlParseTreeResult;\n  styles: string[];\n  inlineStyleUrls: string[];\n  styleUrls: string[];\n  ngContentSelectors: string[];\n}\n\nclass TemplatePreparseVisitor implements html.Visitor {\n  ngContentSelectors: string[] = [];\n  styles: string[] = [];\n  styleUrls: string[] = [];\n  ngNonBindableStackCount: number = 0;\n\n  visitElement(ast: html.Element, context: any): any {\n    const preparsedElement = preparseElement(ast);\n    switch (preparsedElement.type) {\n      case PreparsedElementType.NG_CONTENT:\n        if (this.ngNonBindableStackCount === 0) {\n          this.ngContentSelectors.push(preparsedElement.selectAttr);\n        }\n        break;\n      case PreparsedElementType.STYLE:\n        let textContent = '';\n        ast.children.forEach(child => {\n          if (child instanceof html.Text) {\n            textContent += child.value;\n          }\n        });\n        this.styles.push(textContent);\n        break;\n      case PreparsedElementType.STYLESHEET:\n        this.styleUrls.push(preparsedElement.hrefAttr);\n        break;\n      default:\n        break;\n    }\n    if (preparsedElement.nonBindable) {\n      this.ngNonBindableStackCount++;\n    }\n    html.visitAll(this, ast.children);\n    if (preparsedElement.nonBindable) {\n      this.ngNonBindableStackCount--;\n    }\n    return null;\n  }\n\n  visitExpansion(ast: html.Expansion, context: any): any { html.visitAll(this, ast.cases); }\n\n  visitExpansionCase(ast: html.ExpansionCase, context: any): any {\n    html.visitAll(this, ast.expression);\n  }\n\n  visitComment(ast: html.Comment, context: any): any { return null; }\n  visitAttribute(ast: html.Attribute, context: any): any { return null; }\n  visitText(ast: html.Text, context: any): any { return null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector} from './compile_reflector';\nimport {Component, Directive, Type, createComponent, createContentChild, createContentChildren, createDirective, createHostBinding, createHostListener, createInput, createOutput, createViewChild, createViewChildren} from './core';\nimport {resolveForwardRef, splitAtColon, stringify} from './util';\n\nconst QUERY_METADATA_IDENTIFIERS = [\n  createViewChild,\n  createViewChildren,\n  createContentChild,\n  createContentChildren,\n];\n\n/*\n * Resolve a `Type` for {@link Directive}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\nexport class DirectiveResolver {\n  constructor(private _reflector: CompileReflector) {}\n\n  isDirective(type: Type) {\n    const typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n    return typeMetadata && typeMetadata.some(isDirectiveMetadata);\n  }\n\n  /**\n   * Return {@link Directive} for a given `Type`.\n   */\n  resolve(type: Type): Directive;\n  resolve(type: Type, throwIfNotFound: true): Directive;\n  resolve(type: Type, throwIfNotFound: boolean): Directive|null;\n  resolve(type: Type, throwIfNotFound = true): Directive|null {\n    const typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n    if (typeMetadata) {\n      const metadata = findLast(typeMetadata, isDirectiveMetadata);\n      if (metadata) {\n        const propertyMetadata = this._reflector.propMetadata(type);\n        const guards = this._reflector.guards(type);\n        return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);\n      }\n    }\n\n    if (throwIfNotFound) {\n      throw new Error(`No Directive annotation found on ${stringify(type)}`);\n    }\n\n    return null;\n  }\n\n  private _mergeWithPropertyMetadata(\n      dm: Directive, propertyMetadata: {[key: string]: any[]}, guards: {[key: string]: any},\n      directiveType: Type): Directive {\n    const inputs: string[] = [];\n    const outputs: string[] = [];\n    const host: {[key: string]: string} = {};\n    const queries: {[key: string]: any} = {};\n    Object.keys(propertyMetadata).forEach((propName: string) => {\n      const input = findLast(propertyMetadata[propName], (a) => createInput.isTypeOf(a));\n      if (input) {\n        if (input.bindingPropertyName) {\n          inputs.push(`${propName}: ${input.bindingPropertyName}`);\n        } else {\n          inputs.push(propName);\n        }\n      }\n      const output = findLast(propertyMetadata[propName], (a) => createOutput.isTypeOf(a));\n      if (output) {\n        if (output.bindingPropertyName) {\n          outputs.push(`${propName}: ${output.bindingPropertyName}`);\n        } else {\n          outputs.push(propName);\n        }\n      }\n      const hostBindings = propertyMetadata[propName].filter(a => createHostBinding.isTypeOf(a));\n      hostBindings.forEach(hostBinding => {\n        if (hostBinding.hostPropertyName) {\n          const startWith = hostBinding.hostPropertyName[0];\n          if (startWith === '(') {\n            throw new Error(`@HostBinding can not bind to events. Use @HostListener instead.`);\n          } else if (startWith === '[') {\n            throw new Error(\n                `@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.`);\n          }\n          host[`[${hostBinding.hostPropertyName}]`] = propName;\n        } else {\n          host[`[${propName}]`] = propName;\n        }\n      });\n      const hostListeners = propertyMetadata[propName].filter(a => createHostListener.isTypeOf(a));\n      hostListeners.forEach(hostListener => {\n        const args = hostListener.args || [];\n        host[`(${hostListener.eventName})`] = `${propName}(${args.join(',')})`;\n      });\n      const query = findLast(\n          propertyMetadata[propName], (a) => QUERY_METADATA_IDENTIFIERS.some(i => i.isTypeOf(a)));\n      if (query) {\n        queries[propName] = query;\n      }\n    });\n    return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);\n  }\n\n  private _extractPublicName(def: string) { return splitAtColon(def, [null !, def])[1].trim(); }\n\n  private _dedupeBindings(bindings: string[]): string[] {\n    const names = new Set<string>();\n    const publicNames = new Set<string>();\n    const reversedResult: string[] = [];\n    // go last to first to allow later entries to overwrite previous entries\n    for (let i = bindings.length - 1; i >= 0; i--) {\n      const binding = bindings[i];\n      const name = this._extractPublicName(binding);\n      publicNames.add(name);\n      if (!names.has(name)) {\n        names.add(name);\n        reversedResult.push(binding);\n      }\n    }\n    return reversedResult.reverse();\n  }\n\n  private _merge(\n      directive: Directive, inputs: string[], outputs: string[], host: {[key: string]: string},\n      queries: {[key: string]: any}, guards: {[key: string]: any}, directiveType: Type): Directive {\n    const mergedInputs =\n        this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);\n    const mergedOutputs =\n        this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);\n    const mergedHost = directive.host ? {...directive.host, ...host} : host;\n    const mergedQueries = directive.queries ? {...directive.queries, ...queries} : queries;\n    if (createComponent.isTypeOf(directive)) {\n      const comp = directive as Component;\n      return createComponent({\n        selector: comp.selector,\n        inputs: mergedInputs,\n        outputs: mergedOutputs,\n        host: mergedHost,\n        exportAs: comp.exportAs,\n        moduleId: comp.moduleId,\n        queries: mergedQueries,\n        changeDetection: comp.changeDetection,\n        providers: comp.providers,\n        viewProviders: comp.viewProviders,\n        entryComponents: comp.entryComponents,\n        template: comp.template,\n        templateUrl: comp.templateUrl,\n        styles: comp.styles,\n        styleUrls: comp.styleUrls,\n        encapsulation: comp.encapsulation,\n        animations: comp.animations,\n        interpolation: comp.interpolation,\n        preserveWhitespaces: directive.preserveWhitespaces,\n      });\n    } else {\n      return createDirective({\n        selector: directive.selector,\n        inputs: mergedInputs,\n        outputs: mergedOutputs,\n        host: mergedHost,\n        exportAs: directive.exportAs,\n        queries: mergedQueries,\n        providers: directive.providers, guards\n      });\n    }\n  }\n}\n\nfunction isDirectiveMetadata(type: any): type is Directive {\n  return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);\n}\n\nexport function findLast<T>(arr: T[], condition: (value: T) => boolean): T|null {\n  for (let i = arr.length - 1; i >= 0; i--) {\n    if (condition(arr[i])) {\n      return arr[i];\n    }\n  }\n  return null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ParseError, ParseSourceSpan} from '../parse_util';\n\n/**\n * An i18n error.\n */\nexport class I18nError extends ParseError {\n  constructor(span: ParseSourceSpan, msg: string) { super(span, msg); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as html from '../ml_parser/ast';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {ParseTreeResult} from '../ml_parser/parser';\nimport * as i18n from './i18n_ast';\nimport {createI18nMessageFactory} from './i18n_parser';\nimport {I18nError} from './parse_util';\nimport {TranslationBundle} from './translation_bundle';\n\nconst _I18N_ATTR = 'i18n';\nconst _I18N_ATTR_PREFIX = 'i18n-';\nconst _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nconst MEANING_SEPARATOR = '|';\nconst ID_SEPARATOR = '@@';\nlet i18nCommentsWarned = false;\n\n/**\n * Extract translatable messages from an html AST\n */\nexport function extractMessages(\n    nodes: html.Node[], interpolationConfig: InterpolationConfig, implicitTags: string[],\n    implicitAttrs: {[k: string]: string[]}): ExtractionResult {\n  const visitor = new _Visitor(implicitTags, implicitAttrs);\n  return visitor.extract(nodes, interpolationConfig);\n}\n\nexport function mergeTranslations(\n    nodes: html.Node[], translations: TranslationBundle, interpolationConfig: InterpolationConfig,\n    implicitTags: string[], implicitAttrs: {[k: string]: string[]}): ParseTreeResult {\n  const visitor = new _Visitor(implicitTags, implicitAttrs);\n  return visitor.merge(nodes, translations, interpolationConfig);\n}\n\nexport class ExtractionResult {\n  constructor(public messages: i18n.Message[], public errors: I18nError[]) {}\n}\n\nenum _VisitorMode {\n  Extract,\n  Merge\n}\n\n/**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * @internal\n */\nclass _Visitor implements html.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _depth !: number;\n\n  // <el i18n>...</el>\n  // TODO(issue/24571): remove '!'.\n  private _inI18nNode !: boolean;\n  // TODO(issue/24571): remove '!'.\n  private _inImplicitNode !: boolean;\n\n  // <!--i18n-->...<!--/i18n-->\n  // TODO(issue/24571): remove '!'.\n  private _inI18nBlock !: boolean;\n  // TODO(issue/24571): remove '!'.\n  private _blockMeaningAndDesc !: string;\n  // TODO(issue/24571): remove '!'.\n  private _blockChildren !: html.Node[];\n  // TODO(issue/24571): remove '!'.\n  private _blockStartDepth !: number;\n\n  // {<icu message>}\n  // TODO(issue/24571): remove '!'.\n  private _inIcu !: boolean;\n\n  // set to void 0 when not in a section\n  private _msgCountAtSectionStart: number|undefined;\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n  // TODO(issue/24571): remove '!'.\n  private _mode !: _VisitorMode;\n\n  // _VisitorMode.Extract only\n  // TODO(issue/24571): remove '!'.\n  private _messages !: i18n.Message[];\n\n  // _VisitorMode.Merge only\n  // TODO(issue/24571): remove '!'.\n  private _translations !: TranslationBundle;\n  // TODO(issue/24571): remove '!'.\n  private _createI18nMessage !: (\n      msg: html.Node[], meaning: string, description: string, id: string) => i18n.Message;\n\n\n  constructor(private _implicitTags: string[], private _implicitAttrs: {[k: string]: string[]}) {}\n\n  /**\n   * Extracts the messages from the tree\n   */\n  extract(nodes: html.Node[], interpolationConfig: InterpolationConfig): ExtractionResult {\n    this._init(_VisitorMode.Extract, interpolationConfig);\n\n    nodes.forEach(node => node.visit(this, null));\n\n    if (this._inI18nBlock) {\n      this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n    }\n\n    return new ExtractionResult(this._messages, this._errors);\n  }\n\n  /**\n   * Returns a tree where all translatable nodes are translated\n   */\n  merge(\n      nodes: html.Node[], translations: TranslationBundle,\n      interpolationConfig: InterpolationConfig): ParseTreeResult {\n    this._init(_VisitorMode.Merge, interpolationConfig);\n    this._translations = translations;\n\n    // Construct a single fake root element\n    const wrapper = new html.Element('wrapper', [], nodes, undefined !, undefined, undefined);\n\n    const translatedNode = wrapper.visit(this, null);\n\n    if (this._inI18nBlock) {\n      this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n    }\n\n    return new ParseTreeResult(translatedNode.children, this._errors);\n  }\n\n  visitExpansionCase(icuCase: html.ExpansionCase, context: any): any {\n    // Parse cases for translatable html attributes\n    const expression = html.visitAll(this, icuCase.expression, context);\n\n    if (this._mode === _VisitorMode.Merge) {\n      return new html.ExpansionCase(\n          icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan,\n          icuCase.expSourceSpan);\n    }\n  }\n\n  visitExpansion(icu: html.Expansion, context: any): html.Expansion {\n    this._mayBeAddBlockChildren(icu);\n\n    const wasInIcu = this._inIcu;\n\n    if (!this._inIcu) {\n      // nested ICU messages should not be extracted but top-level translated as a whole\n      if (this._isInTranslatableSection) {\n        this._addMessage([icu]);\n      }\n      this._inIcu = true;\n    }\n\n    const cases = html.visitAll(this, icu.cases, context);\n\n    if (this._mode === _VisitorMode.Merge) {\n      icu = new html.Expansion(\n          icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n    }\n\n    this._inIcu = wasInIcu;\n\n    return icu;\n  }\n\n  visitComment(comment: html.Comment, context: any): any {\n    const isOpening = _isOpeningComment(comment);\n\n    if (isOpening && this._isInTranslatableSection) {\n      this._reportError(comment, 'Could not start a block inside a translatable section');\n      return;\n    }\n\n    const isClosing = _isClosingComment(comment);\n\n    if (isClosing && !this._inI18nBlock) {\n      this._reportError(comment, 'Trying to close an unopened block');\n      return;\n    }\n\n    if (!this._inI18nNode && !this._inIcu) {\n      if (!this._inI18nBlock) {\n        if (isOpening) {\n          // deprecated from v5 you should use <ng-container i18n> instead of i18n comments\n          if (!i18nCommentsWarned && <any>console && <any>console.warn) {\n            i18nCommentsWarned = true;\n            const details = comment.sourceSpan.details ? `, ${comment.sourceSpan.details}` : '';\n            // TODO(ocombe): use a log service once there is a public one available\n            console.warn(\n                `I18n comments are deprecated, use an <ng-container> element instead (${comment.sourceSpan.start}${details})`);\n          }\n          this._inI18nBlock = true;\n          this._blockStartDepth = this._depth;\n          this._blockChildren = [];\n          this._blockMeaningAndDesc =\n              comment.value !.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n          this._openTranslatableSection(comment);\n        }\n      } else {\n        if (isClosing) {\n          if (this._depth == this._blockStartDepth) {\n            this._closeTranslatableSection(comment, this._blockChildren);\n            this._inI18nBlock = false;\n            const message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc) !;\n            // merge attributes in sections\n            const nodes = this._translateMessage(comment, message);\n            return html.visitAll(this, nodes);\n          } else {\n            this._reportError(comment, 'I18N blocks should not cross element boundaries');\n            return;\n          }\n        }\n      }\n    }\n  }\n\n  visitText(text: html.Text, context: any): html.Text {\n    if (this._isInTranslatableSection) {\n      this._mayBeAddBlockChildren(text);\n    }\n    return text;\n  }\n\n  visitElement(el: html.Element, context: any): html.Element|null {\n    this._mayBeAddBlockChildren(el);\n    this._depth++;\n    const wasInI18nNode = this._inI18nNode;\n    const wasInImplicitNode = this._inImplicitNode;\n    let childNodes: html.Node[] = [];\n    let translatedChildNodes: html.Node[] = undefined !;\n\n    // Extract:\n    // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n    // - ICU messages\n    const i18nAttr = _getI18nAttr(el);\n    const i18nMeta = i18nAttr ? i18nAttr.value : '';\n    const isImplicit = this._implicitTags.some(tag => el.name === tag) && !this._inIcu &&\n        !this._isInTranslatableSection;\n    const isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n    this._inImplicitNode = wasInImplicitNode || isImplicit;\n\n    if (!this._isInTranslatableSection && !this._inIcu) {\n      if (i18nAttr || isTopLevelImplicit) {\n        this._inI18nNode = true;\n        const message = this._addMessage(el.children, i18nMeta) !;\n        translatedChildNodes = this._translateMessage(el, message);\n      }\n\n      if (this._mode == _VisitorMode.Extract) {\n        const isTranslatable = i18nAttr || isTopLevelImplicit;\n        if (isTranslatable) this._openTranslatableSection(el);\n        html.visitAll(this, el.children);\n        if (isTranslatable) this._closeTranslatableSection(el, el.children);\n      }\n    } else {\n      if (i18nAttr || isTopLevelImplicit) {\n        this._reportError(\n            el, 'Could not mark an element as translatable inside a translatable section');\n      }\n\n      if (this._mode == _VisitorMode.Extract) {\n        // Descend into child nodes for extraction\n        html.visitAll(this, el.children);\n      }\n    }\n\n    if (this._mode === _VisitorMode.Merge) {\n      const visitNodes = translatedChildNodes || el.children;\n      visitNodes.forEach(child => {\n        const visited = child.visit(this, context);\n        if (visited && !this._isInTranslatableSection) {\n          // Do not add the children from translatable sections (= i18n blocks here)\n          // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)\n          childNodes = childNodes.concat(visited);\n        }\n      });\n    }\n\n    this._visitAttributesOf(el);\n\n    this._depth--;\n    this._inI18nNode = wasInI18nNode;\n    this._inImplicitNode = wasInImplicitNode;\n\n    if (this._mode === _VisitorMode.Merge) {\n      const translatedAttrs = this._translateAttributes(el);\n      return new html.Element(\n          el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan,\n          el.endSourceSpan);\n    }\n    return null;\n  }\n\n  visitAttribute(attribute: html.Attribute, context: any): any {\n    throw new Error('unreachable code');\n  }\n\n  private _init(mode: _VisitorMode, interpolationConfig: InterpolationConfig): void {\n    this._mode = mode;\n    this._inI18nBlock = false;\n    this._inI18nNode = false;\n    this._depth = 0;\n    this._inIcu = false;\n    this._msgCountAtSectionStart = undefined;\n    this._errors = [];\n    this._messages = [];\n    this._inImplicitNode = false;\n    this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n  }\n\n  // looks for translatable attributes\n  private _visitAttributesOf(el: html.Element): void {\n    const explicitAttrNameToValue: {[k: string]: string} = {};\n    const implicitAttrNames: string[] = this._implicitAttrs[el.name] || [];\n\n    el.attrs.filter(attr => attr.name.startsWith(_I18N_ATTR_PREFIX))\n        .forEach(\n            attr => explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n                attr.value);\n\n    el.attrs.forEach(attr => {\n      if (attr.name in explicitAttrNameToValue) {\n        this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n      } else if (implicitAttrNames.some(name => attr.name === name)) {\n        this._addMessage([attr]);\n      }\n    });\n  }\n\n  // add a translatable message\n  private _addMessage(ast: html.Node[], msgMeta?: string): i18n.Message|null {\n    if (ast.length == 0 ||\n        ast.length == 1 && ast[0] instanceof html.Attribute && !(<html.Attribute>ast[0]).value) {\n      // Do not create empty messages\n      return null;\n    }\n\n    const {meaning, description, id} = _parseMessageMeta(msgMeta);\n    const message = this._createI18nMessage(ast, meaning, description, id);\n    this._messages.push(message);\n    return message;\n  }\n\n  // Translates the given message given the `TranslationBundle`\n  // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n  // no-op when called in extraction mode (returns [])\n  private _translateMessage(el: html.Node, message: i18n.Message): html.Node[] {\n    if (message && this._mode === _VisitorMode.Merge) {\n      const nodes = this._translations.get(message);\n\n      if (nodes) {\n        return nodes;\n      }\n\n      this._reportError(\n          el, `Translation unavailable for message id=\"${this._translations.digest(message)}\"`);\n    }\n\n    return [];\n  }\n\n  // translate the attributes of an element and remove i18n specific attributes\n  private _translateAttributes(el: html.Element): html.Attribute[] {\n    const attributes = el.attrs;\n    const i18nParsedMessageMeta:\n        {[name: string]: {meaning: string, description: string, id: string}} = {};\n\n    attributes.forEach(attr => {\n      if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n        i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n            _parseMessageMeta(attr.value);\n      }\n    });\n\n    const translatedAttributes: html.Attribute[] = [];\n\n    attributes.forEach((attr) => {\n      if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n        // strip i18n specific attributes\n        return;\n      }\n\n      if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {\n        const {meaning, description, id} = i18nParsedMessageMeta[attr.name];\n        const message: i18n.Message = this._createI18nMessage([attr], meaning, description, id);\n        const nodes = this._translations.get(message);\n        if (nodes) {\n          if (nodes.length == 0) {\n            translatedAttributes.push(new html.Attribute(attr.name, '', attr.sourceSpan));\n          } else if (nodes[0] instanceof html.Text) {\n            const value = (nodes[0] as html.Text).value;\n            translatedAttributes.push(new html.Attribute(attr.name, value, attr.sourceSpan));\n          } else {\n            this._reportError(\n                el,\n                `Unexpected translation for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\n          }\n        } else {\n          this._reportError(\n              el,\n              `Translation unavailable for attribute \"${attr.name}\" (id=\"${id || this._translations.digest(message)}\")`);\n        }\n      } else {\n        translatedAttributes.push(attr);\n      }\n    });\n\n    return translatedAttributes;\n  }\n\n\n  /**\n   * Add the node as a child of the block when:\n   * - we are in a block,\n   * - we are not inside a ICU message (those are handled separately),\n   * - the node is a \"direct child\" of the block\n   */\n  private _mayBeAddBlockChildren(node: html.Node): void {\n    if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {\n      this._blockChildren.push(node);\n    }\n  }\n\n  /**\n   * Marks the start of a section, see `_closeTranslatableSection`\n   */\n  private _openTranslatableSection(node: html.Node): void {\n    if (this._isInTranslatableSection) {\n      this._reportError(node, 'Unexpected section start');\n    } else {\n      this._msgCountAtSectionStart = this._messages.length;\n    }\n  }\n\n  /**\n   * A translatable section could be:\n   * - the content of translatable element,\n   * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n   */\n  private get _isInTranslatableSection(): boolean {\n    return this._msgCountAtSectionStart !== void 0;\n  }\n\n  /**\n   * Terminates a section.\n   *\n   * If a section has only one significant children (comments not significant) then we should not\n   * keep the message from this children:\n   *\n   * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n   * - one for the <p> content with meaning and description,\n   * - another one for the ICU message.\n   *\n   * In this case the last message is discarded as it contains less information (the AST is\n   * otherwise identical).\n   *\n   * Note that we should still keep messages extracted from attributes inside the section (ie in the\n   * ICU message here)\n   */\n  private _closeTranslatableSection(node: html.Node, directChildren: html.Node[]): void {\n    if (!this._isInTranslatableSection) {\n      this._reportError(node, 'Unexpected section end');\n      return;\n    }\n\n    const startIndex = this._msgCountAtSectionStart;\n    const significantChildren: number = directChildren.reduce(\n        (count: number, node: html.Node): number => count + (node instanceof html.Comment ? 0 : 1),\n        0);\n\n    if (significantChildren == 1) {\n      for (let i = this._messages.length - 1; i >= startIndex !; i--) {\n        const ast = this._messages[i].nodes;\n        if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {\n          this._messages.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    this._msgCountAtSectionStart = undefined;\n  }\n\n  private _reportError(node: html.Node, msg: string): void {\n    this._errors.push(new I18nError(node.sourceSpan !, msg));\n  }\n}\n\nfunction _isOpeningComment(n: html.Node): boolean {\n  return !!(n instanceof html.Comment && n.value && n.value.startsWith('i18n'));\n}\n\nfunction _isClosingComment(n: html.Node): boolean {\n  return !!(n instanceof html.Comment && n.value && n.value === '/i18n');\n}\n\nfunction _getI18nAttr(p: html.Element): html.Attribute|null {\n  return p.attrs.find(attr => attr.name === _I18N_ATTR) || null;\n}\n\nfunction _parseMessageMeta(i18n?: string): {meaning: string, description: string, id: string} {\n  if (!i18n) return {meaning: '', description: '', id: ''};\n\n  const idIndex = i18n.indexOf(ID_SEPARATOR);\n  const descIndex = i18n.indexOf(MEANING_SEPARATOR);\n  const [meaningAndDesc, id] =\n      (idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''];\n  const [meaning, description] = (descIndex > -1) ?\n      [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n      ['', meaningAndDesc];\n\n  return {meaning, description, id};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TagContentType, TagDefinition} from './tags';\n\nexport class XmlTagDefinition implements TagDefinition {\n  closedByParent: boolean = false;\n  // TODO(issue/24571): remove '!'.\n  requiredParents !: {[key: string]: boolean};\n  // TODO(issue/24571): remove '!'.\n  parentToAdd !: string;\n  // TODO(issue/24571): remove '!'.\n  implicitNamespacePrefix !: string;\n  contentType: TagContentType = TagContentType.PARSABLE_DATA;\n  isVoid: boolean = false;\n  ignoreFirstLf: boolean = false;\n  canSelfClose: boolean = true;\n\n  requireExtraParent(currentParent: string): boolean { return false; }\n\n  isClosedByChild(name: string): boolean { return false; }\n}\n\nconst _TAG_DEFINITION = new XmlTagDefinition();\n\nexport function getXmlTagDefinition(tagName: string): XmlTagDefinition {\n  return _TAG_DEFINITION;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TokenizeOptions} from './lexer';\nimport {ParseTreeResult, Parser} from './parser';\nimport {getXmlTagDefinition} from './xml_tags';\n\nexport {ParseTreeResult, TreeError} from './parser';\n\nexport class XmlParser extends Parser {\n  constructor() { super(getXmlTagDefinition); }\n\n  parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult {\n    return super.parse(source, url, options);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as ml from '../../ml_parser/ast';\nimport {XmlParser} from '../../ml_parser/xml_parser';\nimport {digest} from '../digest';\nimport * as i18n from '../i18n_ast';\nimport {I18nError} from '../parse_util';\n\nimport {Serializer} from './serializer';\nimport * as xml from './xml_helper';\n\nconst _VERSION = '1.2';\nconst _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG = 'en';\nconst _PLACEHOLDER_TAG = 'x';\nconst _MARKER_TAG = 'mrk';\n\nconst _FILE_TAG = 'file';\nconst _SOURCE_TAG = 'source';\nconst _SEGMENT_SOURCE_TAG = 'seg-source';\nconst _ALT_TRANS_TAG = 'alt-trans';\nconst _TARGET_TAG = 'target';\nconst _UNIT_TAG = 'trans-unit';\nconst _CONTEXT_GROUP_TAG = 'context-group';\nconst _CONTEXT_TAG = 'context';\n\n// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\nexport class Xliff extends Serializer {\n  write(messages: i18n.Message[], locale: string|null): string {\n    const visitor = new _WriteVisitor();\n    const transUnits: xml.Node[] = [];\n\n    messages.forEach(message => {\n      let contextTags: xml.Node[] = [];\n      message.sources.forEach((source: i18n.MessageSpan) => {\n        let contextGroupTag = new xml.Tag(_CONTEXT_GROUP_TAG, {purpose: 'location'});\n        contextGroupTag.children.push(\n            new xml.CR(10),\n            new xml.Tag(\n                _CONTEXT_TAG, {'context-type': 'sourcefile'}, [new xml.Text(source.filePath)]),\n            new xml.CR(10), new xml.Tag(\n                                _CONTEXT_TAG, {'context-type': 'linenumber'},\n                                [new xml.Text(`${source.startLine}`)]),\n            new xml.CR(8));\n        contextTags.push(new xml.CR(8), contextGroupTag);\n      });\n\n      const transUnit = new xml.Tag(_UNIT_TAG, {id: message.id, datatype: 'html'});\n      transUnit.children.push(\n          new xml.CR(8), new xml.Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)),\n          ...contextTags);\n\n      if (message.description) {\n        transUnit.children.push(\n            new xml.CR(8),\n            new xml.Tag(\n                'note', {priority: '1', from: 'description'}, [new xml.Text(message.description)]));\n      }\n\n      if (message.meaning) {\n        transUnit.children.push(\n            new xml.CR(8),\n            new xml.Tag('note', {priority: '1', from: 'meaning'}, [new xml.Text(message.meaning)]));\n      }\n\n      transUnit.children.push(new xml.CR(6));\n\n      transUnits.push(new xml.CR(6), transUnit);\n    });\n\n    const body = new xml.Tag('body', {}, [...transUnits, new xml.CR(4)]);\n    const file = new xml.Tag(\n        'file', {\n          'source-language': locale || _DEFAULT_SOURCE_LANG,\n          datatype: 'plaintext',\n          original: 'ng2.template',\n        },\n        [new xml.CR(4), body, new xml.CR(2)]);\n    const xliff = new xml.Tag(\n        'xliff', {version: _VERSION, xmlns: _XMLNS}, [new xml.CR(2), file, new xml.CR()]);\n\n    return xml.serialize([\n      new xml.Declaration({version: '1.0', encoding: 'UTF-8'}), new xml.CR(), xliff, new xml.CR()\n    ]);\n  }\n\n  load(content: string, url: string):\n      {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} {\n    // xliff to xml nodes\n    const xliffParser = new XliffParser();\n    const {locale, msgIdToHtml, errors} = xliffParser.parse(content, url);\n\n    // xml nodes to i18n nodes\n    const i18nNodesByMsgId: {[msgId: string]: i18n.Node[]} = {};\n    const converter = new XmlToI18n();\n\n    Object.keys(msgIdToHtml).forEach(msgId => {\n      const {i18nNodes, errors: e} = converter.convert(msgIdToHtml[msgId], url);\n      errors.push(...e);\n      i18nNodesByMsgId[msgId] = i18nNodes;\n    });\n\n    if (errors.length) {\n      throw new Error(`xliff parse errors:\\n${errors.join('\\n')}`);\n    }\n\n    return {locale: locale !, i18nNodesByMsgId};\n  }\n\n  digest(message: i18n.Message): string { return digest(message); }\n}\n\nclass _WriteVisitor implements i18n.Visitor {\n  visitText(text: i18n.Text, context?: any): xml.Node[] { return [new xml.Text(text.value)]; }\n\n  visitContainer(container: i18n.Container, context?: any): xml.Node[] {\n    const nodes: xml.Node[] = [];\n    container.children.forEach((node: i18n.Node) => nodes.push(...node.visit(this)));\n    return nodes;\n  }\n\n  visitIcu(icu: i18n.Icu, context?: any): xml.Node[] {\n    const nodes = [new xml.Text(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n\n    Object.keys(icu.cases).forEach((c: string) => {\n      nodes.push(new xml.Text(`${c} {`), ...icu.cases[c].visit(this), new xml.Text(`} `));\n    });\n\n    nodes.push(new xml.Text(`}`));\n\n    return nodes;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): xml.Node[] {\n    const ctype = getCtypeForTag(ph.tag);\n\n    if (ph.isVoid) {\n      // void tags have no children nor closing tags\n      return [new xml.Tag(\n          _PLACEHOLDER_TAG, {id: ph.startName, ctype, 'equiv-text': `<${ph.tag}/>`})];\n    }\n\n    const startTagPh =\n        new xml.Tag(_PLACEHOLDER_TAG, {id: ph.startName, ctype, 'equiv-text': `<${ph.tag}>`});\n    const closeTagPh =\n        new xml.Tag(_PLACEHOLDER_TAG, {id: ph.closeName, ctype, 'equiv-text': `</${ph.tag}>`});\n\n    return [startTagPh, ...this.serialize(ph.children), closeTagPh];\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context?: any): xml.Node[] {\n    return [new xml.Tag(_PLACEHOLDER_TAG, {id: ph.name, 'equiv-text': `{{${ph.value}}}`})];\n  }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): xml.Node[] {\n    const equivText =\n        `{${ph.value.expression}, ${ph.value.type}, ${Object.keys(ph.value.cases).map((value: string) => value + ' {...}').join(' ')}}`;\n    return [new xml.Tag(_PLACEHOLDER_TAG, {id: ph.name, 'equiv-text': equivText})];\n  }\n\n  serialize(nodes: i18n.Node[]): xml.Node[] {\n    return [].concat(...nodes.map(node => node.visit(this)));\n  }\n}\n\n// TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\nclass XliffParser implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _unitMlString !: string | null;\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n  // TODO(issue/24571): remove '!'.\n  private _msgIdToHtml !: {[msgId: string]: string};\n  private _locale: string|null = null;\n\n  parse(xliff: string, url: string) {\n    this._unitMlString = null;\n    this._msgIdToHtml = {};\n\n    const xml = new XmlParser().parse(xliff, url);\n\n    this._errors = xml.errors;\n    ml.visitAll(this, xml.rootNodes, null);\n\n    return {\n      msgIdToHtml: this._msgIdToHtml,\n      errors: this._errors,\n      locale: this._locale,\n    };\n  }\n\n  visitElement(element: ml.Element, context: any): any {\n    switch (element.name) {\n      case _UNIT_TAG:\n        this._unitMlString = null !;\n        const idAttr = element.attrs.find((attr) => attr.name === 'id');\n        if (!idAttr) {\n          this._addError(element, `<${_UNIT_TAG}> misses the \"id\" attribute`);\n        } else {\n          const id = idAttr.value;\n          if (this._msgIdToHtml.hasOwnProperty(id)) {\n            this._addError(element, `Duplicated translations for msg ${id}`);\n          } else {\n            ml.visitAll(this, element.children, null);\n            if (typeof this._unitMlString === 'string') {\n              this._msgIdToHtml[id] = this._unitMlString;\n            } else {\n              this._addError(element, `Message ${id} misses a translation`);\n            }\n          }\n        }\n        break;\n\n      // ignore those tags\n      case _SOURCE_TAG:\n      case _SEGMENT_SOURCE_TAG:\n      case _ALT_TRANS_TAG:\n        break;\n\n      case _TARGET_TAG:\n        const innerTextStart = element.startSourceSpan !.end.offset;\n        const innerTextEnd = element.endSourceSpan !.start.offset;\n        const content = element.startSourceSpan !.start.file.content;\n        const innerText = content.slice(innerTextStart, innerTextEnd);\n        this._unitMlString = innerText;\n        break;\n\n      case _FILE_TAG:\n        const localeAttr = element.attrs.find((attr) => attr.name === 'target-language');\n        if (localeAttr) {\n          this._locale = localeAttr.value;\n        }\n        ml.visitAll(this, element.children, null);\n        break;\n\n      default:\n        // TODO(vicb): assert file structure, xliff version\n        // For now only recurse on unhandled nodes\n        ml.visitAll(this, element.children, null);\n    }\n  }\n\n  visitAttribute(attribute: ml.Attribute, context: any): any {}\n\n  visitText(text: ml.Text, context: any): any {}\n\n  visitComment(comment: ml.Comment, context: any): any {}\n\n  visitExpansion(expansion: ml.Expansion, context: any): any {}\n\n  visitExpansionCase(expansionCase: ml.ExpansionCase, context: any): any {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan !, message));\n  }\n}\n\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n\n  convert(message: string, url: string) {\n    const xmlIcu = new XmlParser().parse(message, url, {tokenizeExpansionForms: true});\n    this._errors = xmlIcu.errors;\n\n    const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n        [] :\n        [].concat(...ml.visitAll(this, xmlIcu.rootNodes));\n\n    return {\n      i18nNodes: i18nNodes,\n      errors: this._errors,\n    };\n  }\n\n  visitText(text: ml.Text, context: any) { return new i18n.Text(text.value, text.sourceSpan !); }\n\n  visitElement(el: ml.Element, context: any): i18n.Placeholder|ml.Node[]|null {\n    if (el.name === _PLACEHOLDER_TAG) {\n      const nameAttr = el.attrs.find((attr) => attr.name === 'id');\n      if (nameAttr) {\n        return new i18n.Placeholder('', nameAttr.value, el.sourceSpan !);\n      }\n\n      this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"id\" attribute`);\n      return null;\n    }\n\n    if (el.name === _MARKER_TAG) {\n      return [].concat(...ml.visitAll(this, el.children));\n    }\n\n    this._addError(el, `Unexpected tag`);\n    return null;\n  }\n\n  visitExpansion(icu: ml.Expansion, context: any) {\n    const caseMap: {[value: string]: i18n.Node} = {};\n\n    ml.visitAll(this, icu.cases).forEach((c: any) => {\n      caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n    });\n\n    return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n  }\n\n  visitExpansionCase(icuCase: ml.ExpansionCase, context: any): any {\n    return {\n      value: icuCase.value,\n      nodes: ml.visitAll(this, icuCase.expression),\n    };\n  }\n\n  visitComment(comment: ml.Comment, context: any) {}\n\n  visitAttribute(attribute: ml.Attribute, context: any) {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan !, message));\n  }\n}\n\nfunction getCtypeForTag(tag: string): string {\n  switch (tag.toLowerCase()) {\n    case 'br':\n      return 'lb';\n    case 'img':\n      return 'image';\n    default:\n      return `x-${tag}`;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as ml from '../../ml_parser/ast';\nimport {XmlParser} from '../../ml_parser/xml_parser';\nimport {decimalDigest} from '../digest';\nimport * as i18n from '../i18n_ast';\nimport {I18nError} from '../parse_util';\n\nimport {Serializer} from './serializer';\nimport * as xml from './xml_helper';\n\nconst _VERSION = '2.0';\nconst _XMLNS = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nconst _DEFAULT_SOURCE_LANG = 'en';\nconst _PLACEHOLDER_TAG = 'ph';\nconst _PLACEHOLDER_SPANNING_TAG = 'pc';\nconst _MARKER_TAG = 'mrk';\n\nconst _XLIFF_TAG = 'xliff';\nconst _SOURCE_TAG = 'source';\nconst _TARGET_TAG = 'target';\nconst _UNIT_TAG = 'unit';\n\n// http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\nexport class Xliff2 extends Serializer {\n  write(messages: i18n.Message[], locale: string|null): string {\n    const visitor = new _WriteVisitor();\n    const units: xml.Node[] = [];\n\n    messages.forEach(message => {\n      const unit = new xml.Tag(_UNIT_TAG, {id: message.id});\n      const notes = new xml.Tag('notes');\n\n      if (message.description || message.meaning) {\n        if (message.description) {\n          notes.children.push(\n              new xml.CR(8),\n              new xml.Tag('note', {category: 'description'}, [new xml.Text(message.description)]));\n        }\n\n        if (message.meaning) {\n          notes.children.push(\n              new xml.CR(8),\n              new xml.Tag('note', {category: 'meaning'}, [new xml.Text(message.meaning)]));\n        }\n      }\n\n      message.sources.forEach((source: i18n.MessageSpan) => {\n        notes.children.push(new xml.CR(8), new xml.Tag('note', {category: 'location'}, [\n          new xml.Text(\n              `${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)\n        ]));\n      });\n\n      notes.children.push(new xml.CR(6));\n      unit.children.push(new xml.CR(6), notes);\n\n      const segment = new xml.Tag('segment');\n\n      segment.children.push(\n          new xml.CR(8), new xml.Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)),\n          new xml.CR(6));\n\n      unit.children.push(new xml.CR(6), segment, new xml.CR(4));\n\n      units.push(new xml.CR(4), unit);\n    });\n\n    const file =\n        new xml.Tag('file', {'original': 'ng.template', id: 'ngi18n'}, [...units, new xml.CR(2)]);\n\n    const xliff = new xml.Tag(\n        _XLIFF_TAG, {version: _VERSION, xmlns: _XMLNS, srcLang: locale || _DEFAULT_SOURCE_LANG},\n        [new xml.CR(2), file, new xml.CR()]);\n\n    return xml.serialize([\n      new xml.Declaration({version: '1.0', encoding: 'UTF-8'}), new xml.CR(), xliff, new xml.CR()\n    ]);\n  }\n\n  load(content: string, url: string):\n      {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} {\n    // xliff to xml nodes\n    const xliff2Parser = new Xliff2Parser();\n    const {locale, msgIdToHtml, errors} = xliff2Parser.parse(content, url);\n\n    // xml nodes to i18n nodes\n    const i18nNodesByMsgId: {[msgId: string]: i18n.Node[]} = {};\n    const converter = new XmlToI18n();\n\n    Object.keys(msgIdToHtml).forEach(msgId => {\n      const {i18nNodes, errors: e} = converter.convert(msgIdToHtml[msgId], url);\n      errors.push(...e);\n      i18nNodesByMsgId[msgId] = i18nNodes;\n    });\n\n    if (errors.length) {\n      throw new Error(`xliff2 parse errors:\\n${errors.join('\\n')}`);\n    }\n\n    return {locale: locale !, i18nNodesByMsgId};\n  }\n\n  digest(message: i18n.Message): string { return decimalDigest(message); }\n}\n\nclass _WriteVisitor implements i18n.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _nextPlaceholderId !: number;\n\n  visitText(text: i18n.Text, context?: any): xml.Node[] { return [new xml.Text(text.value)]; }\n\n  visitContainer(container: i18n.Container, context?: any): xml.Node[] {\n    const nodes: xml.Node[] = [];\n    container.children.forEach((node: i18n.Node) => nodes.push(...node.visit(this)));\n    return nodes;\n  }\n\n  visitIcu(icu: i18n.Icu, context?: any): xml.Node[] {\n    const nodes = [new xml.Text(`{${icu.expressionPlaceholder}, ${icu.type}, `)];\n\n    Object.keys(icu.cases).forEach((c: string) => {\n      nodes.push(new xml.Text(`${c} {`), ...icu.cases[c].visit(this), new xml.Text(`} `));\n    });\n\n    nodes.push(new xml.Text(`}`));\n\n    return nodes;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): xml.Node[] {\n    const type = getTypeForTag(ph.tag);\n\n    if (ph.isVoid) {\n      const tagPh = new xml.Tag(_PLACEHOLDER_TAG, {\n        id: (this._nextPlaceholderId++).toString(),\n        equiv: ph.startName,\n        type: type,\n        disp: `<${ph.tag}/>`,\n      });\n      return [tagPh];\n    }\n\n    const tagPc = new xml.Tag(_PLACEHOLDER_SPANNING_TAG, {\n      id: (this._nextPlaceholderId++).toString(),\n      equivStart: ph.startName,\n      equivEnd: ph.closeName,\n      type: type,\n      dispStart: `<${ph.tag}>`,\n      dispEnd: `</${ph.tag}>`,\n    });\n    const nodes: xml.Node[] = [].concat(...ph.children.map(node => node.visit(this)));\n    if (nodes.length) {\n      nodes.forEach((node: xml.Node) => tagPc.children.push(node));\n    } else {\n      tagPc.children.push(new xml.Text(''));\n    }\n\n    return [tagPc];\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context?: any): xml.Node[] {\n    const idStr = (this._nextPlaceholderId++).toString();\n    return [new xml.Tag(_PLACEHOLDER_TAG, {\n      id: idStr,\n      equiv: ph.name,\n      disp: `{{${ph.value}}}`,\n    })];\n  }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): xml.Node[] {\n    const cases = Object.keys(ph.value.cases).map((value: string) => value + ' {...}').join(' ');\n    const idStr = (this._nextPlaceholderId++).toString();\n    return [new xml.Tag(\n        _PLACEHOLDER_TAG,\n        {id: idStr, equiv: ph.name, disp: `{${ph.value.expression}, ${ph.value.type}, ${cases}}`})];\n  }\n\n  serialize(nodes: i18n.Node[]): xml.Node[] {\n    this._nextPlaceholderId = 0;\n    return [].concat(...nodes.map(node => node.visit(this)));\n  }\n}\n\n// Extract messages as xml nodes from the xliff file\nclass Xliff2Parser implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _unitMlString !: string | null;\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n  // TODO(issue/24571): remove '!'.\n  private _msgIdToHtml !: {[msgId: string]: string};\n  private _locale: string|null = null;\n\n  parse(xliff: string, url: string) {\n    this._unitMlString = null;\n    this._msgIdToHtml = {};\n\n    const xml = new XmlParser().parse(xliff, url);\n\n    this._errors = xml.errors;\n    ml.visitAll(this, xml.rootNodes, null);\n\n    return {\n      msgIdToHtml: this._msgIdToHtml,\n      errors: this._errors,\n      locale: this._locale,\n    };\n  }\n\n  visitElement(element: ml.Element, context: any): any {\n    switch (element.name) {\n      case _UNIT_TAG:\n        this._unitMlString = null;\n        const idAttr = element.attrs.find((attr) => attr.name === 'id');\n        if (!idAttr) {\n          this._addError(element, `<${_UNIT_TAG}> misses the \"id\" attribute`);\n        } else {\n          const id = idAttr.value;\n          if (this._msgIdToHtml.hasOwnProperty(id)) {\n            this._addError(element, `Duplicated translations for msg ${id}`);\n          } else {\n            ml.visitAll(this, element.children, null);\n            if (typeof this._unitMlString === 'string') {\n              this._msgIdToHtml[id] = this._unitMlString;\n            } else {\n              this._addError(element, `Message ${id} misses a translation`);\n            }\n          }\n        }\n        break;\n\n      case _SOURCE_TAG:\n        // ignore source message\n        break;\n\n      case _TARGET_TAG:\n        const innerTextStart = element.startSourceSpan !.end.offset;\n        const innerTextEnd = element.endSourceSpan !.start.offset;\n        const content = element.startSourceSpan !.start.file.content;\n        const innerText = content.slice(innerTextStart, innerTextEnd);\n        this._unitMlString = innerText;\n        break;\n\n      case _XLIFF_TAG:\n        const localeAttr = element.attrs.find((attr) => attr.name === 'trgLang');\n        if (localeAttr) {\n          this._locale = localeAttr.value;\n        }\n\n        const versionAttr = element.attrs.find((attr) => attr.name === 'version');\n        if (versionAttr) {\n          const version = versionAttr.value;\n          if (version !== '2.0') {\n            this._addError(\n                element,\n                `The XLIFF file version ${version} is not compatible with XLIFF 2.0 serializer`);\n          } else {\n            ml.visitAll(this, element.children, null);\n          }\n        }\n        break;\n      default:\n        ml.visitAll(this, element.children, null);\n    }\n  }\n\n  visitAttribute(attribute: ml.Attribute, context: any): any {}\n\n  visitText(text: ml.Text, context: any): any {}\n\n  visitComment(comment: ml.Comment, context: any): any {}\n\n  visitExpansion(expansion: ml.Expansion, context: any): any {}\n\n  visitExpansionCase(expansionCase: ml.ExpansionCase, context: any): any {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan, message));\n  }\n}\n\n// Convert ml nodes (xliff syntax) to i18n nodes\nclass XmlToI18n implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n\n  convert(message: string, url: string) {\n    const xmlIcu = new XmlParser().parse(message, url, {tokenizeExpansionForms: true});\n    this._errors = xmlIcu.errors;\n\n    const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n        [] :\n        [].concat(...ml.visitAll(this, xmlIcu.rootNodes));\n\n    return {\n      i18nNodes,\n      errors: this._errors,\n    };\n  }\n\n  visitText(text: ml.Text, context: any) { return new i18n.Text(text.value, text.sourceSpan); }\n\n  visitElement(el: ml.Element, context: any): i18n.Node[]|null {\n    switch (el.name) {\n      case _PLACEHOLDER_TAG:\n        const nameAttr = el.attrs.find((attr) => attr.name === 'equiv');\n        if (nameAttr) {\n          return [new i18n.Placeholder('', nameAttr.value, el.sourceSpan)];\n        }\n\n        this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"equiv\" attribute`);\n        break;\n      case _PLACEHOLDER_SPANNING_TAG:\n        const startAttr = el.attrs.find((attr) => attr.name === 'equivStart');\n        const endAttr = el.attrs.find((attr) => attr.name === 'equivEnd');\n\n        if (!startAttr) {\n          this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"equivStart\" attribute`);\n        } else if (!endAttr) {\n          this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"equivEnd\" attribute`);\n        } else {\n          const startId = startAttr.value;\n          const endId = endAttr.value;\n\n          const nodes: i18n.Node[] = [];\n\n          return nodes.concat(\n              new i18n.Placeholder('', startId, el.sourceSpan),\n              ...el.children.map(node => node.visit(this, null)),\n              new i18n.Placeholder('', endId, el.sourceSpan));\n        }\n        break;\n      case _MARKER_TAG:\n        return [].concat(...ml.visitAll(this, el.children));\n      default:\n        this._addError(el, `Unexpected tag`);\n    }\n\n    return null;\n  }\n\n  visitExpansion(icu: ml.Expansion, context: any) {\n    const caseMap: {[value: string]: i18n.Node} = {};\n\n    ml.visitAll(this, icu.cases).forEach((c: any) => {\n      caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n    });\n\n    return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n  }\n\n  visitExpansionCase(icuCase: ml.ExpansionCase, context: any): any {\n    return {\n      value: icuCase.value,\n      nodes: [].concat(...ml.visitAll(this, icuCase.expression)),\n    };\n  }\n\n  visitComment(comment: ml.Comment, context: any) {}\n\n  visitAttribute(attribute: ml.Attribute, context: any) {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan, message));\n  }\n}\n\nfunction getTypeForTag(tag: string): string {\n  switch (tag.toLowerCase()) {\n    case 'br':\n    case 'b':\n    case 'i':\n    case 'u':\n      return 'fmt';\n    case 'img':\n      return 'image';\n    case 'a':\n      return 'link';\n    default:\n      return 'other';\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as ml from '../../ml_parser/ast';\nimport {XmlParser} from '../../ml_parser/xml_parser';\nimport * as i18n from '../i18n_ast';\nimport {I18nError} from '../parse_util';\n\nimport {PlaceholderMapper, Serializer, SimplePlaceholderMapper} from './serializer';\nimport {digest, toPublicName} from './xmb';\n\nconst _TRANSLATIONS_TAG = 'translationbundle';\nconst _TRANSLATION_TAG = 'translation';\nconst _PLACEHOLDER_TAG = 'ph';\n\nexport class Xtb extends Serializer {\n  write(messages: i18n.Message[], locale: string|null): string { throw new Error('Unsupported'); }\n\n  load(content: string, url: string):\n      {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} {\n    // xtb to xml nodes\n    const xtbParser = new XtbParser();\n    const {locale, msgIdToHtml, errors} = xtbParser.parse(content, url);\n\n    // xml nodes to i18n nodes\n    const i18nNodesByMsgId: {[msgId: string]: i18n.Node[]} = {};\n    const converter = new XmlToI18n();\n\n    // Because we should be able to load xtb files that rely on features not supported by angular,\n    // we need to delay the conversion of html to i18n nodes so that non angular messages are not\n    // converted\n    Object.keys(msgIdToHtml).forEach(msgId => {\n      const valueFn = function() {\n        const {i18nNodes, errors} = converter.convert(msgIdToHtml[msgId], url);\n        if (errors.length) {\n          throw new Error(`xtb parse errors:\\n${errors.join('\\n')}`);\n        }\n        return i18nNodes;\n      };\n      createLazyProperty(i18nNodesByMsgId, msgId, valueFn);\n    });\n\n    if (errors.length) {\n      throw new Error(`xtb parse errors:\\n${errors.join('\\n')}`);\n    }\n\n    return {locale: locale !, i18nNodesByMsgId};\n  }\n\n  digest(message: i18n.Message): string { return digest(message); }\n\n  createNameMapper(message: i18n.Message): PlaceholderMapper {\n    return new SimplePlaceholderMapper(message, toPublicName);\n  }\n}\n\nfunction createLazyProperty(messages: any, id: string, valueFn: () => any) {\n  Object.defineProperty(messages, id, {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      const value = valueFn();\n      Object.defineProperty(messages, id, {enumerable: true, value});\n      return value;\n    },\n    set: _ => { throw new Error('Could not overwrite an XTB translation'); },\n  });\n}\n\n// Extract messages as xml nodes from the xtb file\nclass XtbParser implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _bundleDepth !: number;\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n  // TODO(issue/24571): remove '!'.\n  private _msgIdToHtml !: {[msgId: string]: string};\n  private _locale: string|null = null;\n\n  parse(xtb: string, url: string) {\n    this._bundleDepth = 0;\n    this._msgIdToHtml = {};\n\n    // We can not parse the ICU messages at this point as some messages might not originate\n    // from Angular that could not be lex'd.\n    const xml = new XmlParser().parse(xtb, url);\n\n    this._errors = xml.errors;\n    ml.visitAll(this, xml.rootNodes);\n\n    return {\n      msgIdToHtml: this._msgIdToHtml,\n      errors: this._errors,\n      locale: this._locale,\n    };\n  }\n\n  visitElement(element: ml.Element, context: any): any {\n    switch (element.name) {\n      case _TRANSLATIONS_TAG:\n        this._bundleDepth++;\n        if (this._bundleDepth > 1) {\n          this._addError(element, `<${_TRANSLATIONS_TAG}> elements can not be nested`);\n        }\n        const langAttr = element.attrs.find((attr) => attr.name === 'lang');\n        if (langAttr) {\n          this._locale = langAttr.value;\n        }\n        ml.visitAll(this, element.children, null);\n        this._bundleDepth--;\n        break;\n\n      case _TRANSLATION_TAG:\n        const idAttr = element.attrs.find((attr) => attr.name === 'id');\n        if (!idAttr) {\n          this._addError(element, `<${_TRANSLATION_TAG}> misses the \"id\" attribute`);\n        } else {\n          const id = idAttr.value;\n          if (this._msgIdToHtml.hasOwnProperty(id)) {\n            this._addError(element, `Duplicated translations for msg ${id}`);\n          } else {\n            const innerTextStart = element.startSourceSpan !.end.offset;\n            const innerTextEnd = element.endSourceSpan !.start.offset;\n            const content = element.startSourceSpan !.start.file.content;\n            const innerText = content.slice(innerTextStart !, innerTextEnd !);\n            this._msgIdToHtml[id] = innerText;\n          }\n        }\n        break;\n\n      default:\n        this._addError(element, 'Unexpected tag');\n    }\n  }\n\n  visitAttribute(attribute: ml.Attribute, context: any): any {}\n\n  visitText(text: ml.Text, context: any): any {}\n\n  visitComment(comment: ml.Comment, context: any): any {}\n\n  visitExpansion(expansion: ml.Expansion, context: any): any {}\n\n  visitExpansionCase(expansionCase: ml.ExpansionCase, context: any): any {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan !, message));\n  }\n}\n\n// Convert ml nodes (xtb syntax) to i18n nodes\nclass XmlToI18n implements ml.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _errors !: I18nError[];\n\n  convert(message: string, url: string) {\n    const xmlIcu = new XmlParser().parse(message, url, {tokenizeExpansionForms: true});\n    this._errors = xmlIcu.errors;\n\n    const i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n        [] :\n        ml.visitAll(this, xmlIcu.rootNodes);\n\n    return {\n      i18nNodes,\n      errors: this._errors,\n    };\n  }\n\n  visitText(text: ml.Text, context: any) { return new i18n.Text(text.value, text.sourceSpan !); }\n\n  visitExpansion(icu: ml.Expansion, context: any) {\n    const caseMap: {[value: string]: i18n.Node} = {};\n\n    ml.visitAll(this, icu.cases).forEach(c => {\n      caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n    });\n\n    return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n  }\n\n  visitExpansionCase(icuCase: ml.ExpansionCase, context: any): any {\n    return {\n      value: icuCase.value,\n      nodes: ml.visitAll(this, icuCase.expression),\n    };\n  }\n\n  visitElement(el: ml.Element, context: any): i18n.Placeholder|null {\n    if (el.name === _PLACEHOLDER_TAG) {\n      const nameAttr = el.attrs.find((attr) => attr.name === 'name');\n      if (nameAttr) {\n        return new i18n.Placeholder('', nameAttr.value, el.sourceSpan !);\n      }\n\n      this._addError(el, `<${_PLACEHOLDER_TAG}> misses the \"name\" attribute`);\n    } else {\n      this._addError(el, `Unexpected tag`);\n    }\n    return null;\n  }\n\n  visitComment(comment: ml.Comment, context: any) {}\n\n  visitAttribute(attribute: ml.Attribute, context: any) {}\n\n  private _addError(node: ml.Node, message: string): void {\n    this._errors.push(new I18nError(node.sourceSpan !, message));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MissingTranslationStrategy} from '../core';\nimport * as html from '../ml_parser/ast';\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {Console} from '../util';\n\nimport * as i18n from './i18n_ast';\nimport {I18nError} from './parse_util';\nimport {PlaceholderMapper, Serializer} from './serializers/serializer';\nimport {escapeXml} from './serializers/xml_helper';\n\n\n/**\n * A container for translated messages\n */\nexport class TranslationBundle {\n  private _i18nToHtml: I18nToHtmlVisitor;\n\n  constructor(\n      private _i18nNodesByMsgId: {[msgId: string]: i18n.Node[]} = {}, locale: string|null,\n      public digest: (m: i18n.Message) => string,\n      public mapperFactory?: (m: i18n.Message) => PlaceholderMapper,\n      missingTranslationStrategy: MissingTranslationStrategy = MissingTranslationStrategy.Warning,\n      console?: Console) {\n    this._i18nToHtml = new I18nToHtmlVisitor(\n        _i18nNodesByMsgId, locale, digest, mapperFactory !, missingTranslationStrategy, console);\n  }\n\n  // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n  static load(\n      content: string, url: string, serializer: Serializer,\n      missingTranslationStrategy: MissingTranslationStrategy,\n      console?: Console): TranslationBundle {\n    const {locale, i18nNodesByMsgId} = serializer.load(content, url);\n    const digestFn = (m: i18n.Message) => serializer.digest(m);\n    const mapperFactory = (m: i18n.Message) => serializer.createNameMapper(m) !;\n    return new TranslationBundle(\n        i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);\n  }\n\n  // Returns the translation as HTML nodes from the given source message.\n  get(srcMsg: i18n.Message): html.Node[] {\n    const html = this._i18nToHtml.convert(srcMsg);\n\n    if (html.errors.length) {\n      throw new Error(html.errors.join('\\n'));\n    }\n\n    return html.nodes;\n  }\n\n  has(srcMsg: i18n.Message): boolean { return this.digest(srcMsg) in this._i18nNodesByMsgId; }\n}\n\nclass I18nToHtmlVisitor implements i18n.Visitor {\n  // TODO(issue/24571): remove '!'.\n  private _srcMsg !: i18n.Message;\n  private _contextStack: {msg: i18n.Message, mapper: (name: string) => string}[] = [];\n  private _errors: I18nError[] = [];\n  // TODO(issue/24571): remove '!'.\n  private _mapper !: (name: string) => string;\n\n  constructor(\n      private _i18nNodesByMsgId: {[msgId: string]: i18n.Node[]} = {}, private _locale: string|null,\n      private _digest: (m: i18n.Message) => string,\n      private _mapperFactory: (m: i18n.Message) => PlaceholderMapper,\n      private _missingTranslationStrategy: MissingTranslationStrategy, private _console?: Console) {\n  }\n\n  convert(srcMsg: i18n.Message): {nodes: html.Node[], errors: I18nError[]} {\n    this._contextStack.length = 0;\n    this._errors.length = 0;\n\n    // i18n to text\n    const text = this._convertToText(srcMsg);\n\n    // text to html\n    const url = srcMsg.nodes[0].sourceSpan.start.file.url;\n    const html = new HtmlParser().parse(text, url, {tokenizeExpansionForms: true});\n\n    return {\n      nodes: html.rootNodes,\n      errors: [...this._errors, ...html.errors],\n    };\n  }\n\n  visitText(text: i18n.Text, context?: any): string {\n    // `convert()` uses an `HtmlParser` to return `html.Node`s\n    // we should then make sure that any special characters are escaped\n    return escapeXml(text.value);\n  }\n\n  visitContainer(container: i18n.Container, context?: any): any {\n    return container.children.map(n => n.visit(this)).join('');\n  }\n\n  visitIcu(icu: i18n.Icu, context?: any): any {\n    const cases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`);\n\n    // TODO(vicb): Once all format switch to using expression placeholders\n    // we should throw when the placeholder is not in the source message\n    const exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?\n        this._srcMsg.placeholders[icu.expression] :\n        icu.expression;\n\n    return `{${exp}, ${icu.type}, ${cases.join(' ')}}`;\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, context?: any): string {\n    const phName = this._mapper(ph.name);\n    if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n      return this._srcMsg.placeholders[phName];\n    }\n\n    if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {\n      return this._convertToText(this._srcMsg.placeholderToMessage[phName]);\n    }\n\n    this._addError(ph, `Unknown placeholder \"${ph.name}\"`);\n    return '';\n  }\n\n  // Loaded message contains only placeholders (vs tag and icu placeholders).\n  // However when a translation can not be found, we need to serialize the source message\n  // which can contain tag placeholders\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): string {\n    const tag = `${ph.tag}`;\n    const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n    if (ph.isVoid) {\n      return `<${tag} ${attrs}/>`;\n    }\n    const children = ph.children.map((c: i18n.Node) => c.visit(this)).join('');\n    return `<${tag} ${attrs}>${children}</${tag}>`;\n  }\n\n  // Loaded message contains only placeholders (vs tag and icu placeholders).\n  // However when a translation can not be found, we need to serialize the source message\n  // which can contain tag placeholders\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): string {\n    // An ICU placeholder references the source message to be serialized\n    return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);\n  }\n\n  /**\n   * Convert a source message to a translated text string:\n   * - text nodes are replaced with their translation,\n   * - placeholders are replaced with their content,\n   * - ICU nodes are converted to ICU expressions.\n   */\n  private _convertToText(srcMsg: i18n.Message): string {\n    const id = this._digest(srcMsg);\n    const mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n    let nodes: i18n.Node[];\n\n    this._contextStack.push({msg: this._srcMsg, mapper: this._mapper});\n    this._srcMsg = srcMsg;\n\n    if (this._i18nNodesByMsgId.hasOwnProperty(id)) {\n      // When there is a translation use its nodes as the source\n      // And create a mapper to convert serialized placeholder names to internal names\n      nodes = this._i18nNodesByMsgId[id];\n      this._mapper = (name: string) => mapper ? mapper.toInternalName(name) ! : name;\n    } else {\n      // When no translation has been found\n      // - report an error / a warning / nothing,\n      // - use the nodes from the original message\n      // - placeholders are already internal and need no mapper\n      if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {\n        const ctx = this._locale ? ` for locale \"${this._locale}\"` : '';\n        this._addError(srcMsg.nodes[0], `Missing translation for message \"${id}\"${ctx}`);\n      } else if (\n          this._console &&\n          this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n        const ctx = this._locale ? ` for locale \"${this._locale}\"` : '';\n        this._console.warn(`Missing translation for message \"${id}\"${ctx}`);\n      }\n      nodes = srcMsg.nodes;\n      this._mapper = (name: string) => name;\n    }\n    const text = nodes.map(node => node.visit(this)).join('');\n    const context = this._contextStack.pop() !;\n    this._srcMsg = context.msg;\n    this._mapper = context.mapper;\n    return text;\n  }\n\n  private _addError(el: i18n.Node, msg: string) {\n    this._errors.push(new I18nError(el.sourceSpan, msg));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MissingTranslationStrategy} from '../core';\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {DEFAULT_INTERPOLATION_CONFIG} from '../ml_parser/interpolation_config';\nimport {TokenizeOptions} from '../ml_parser/lexer';\nimport {ParseTreeResult} from '../ml_parser/parser';\nimport {Console} from '../util';\n\nimport {digest} from './digest';\nimport {mergeTranslations} from './extractor_merger';\nimport {Serializer} from './serializers/serializer';\nimport {Xliff} from './serializers/xliff';\nimport {Xliff2} from './serializers/xliff2';\nimport {Xmb} from './serializers/xmb';\nimport {Xtb} from './serializers/xtb';\nimport {TranslationBundle} from './translation_bundle';\n\nexport class I18NHtmlParser implements HtmlParser {\n  // @override\n  getTagDefinition: any;\n\n  private _translationBundle: TranslationBundle;\n\n  constructor(\n      private _htmlParser: HtmlParser, translations?: string, translationsFormat?: string,\n      missingTranslation: MissingTranslationStrategy = MissingTranslationStrategy.Warning,\n      console?: Console) {\n    if (translations) {\n      const serializer = createSerializer(translationsFormat);\n      this._translationBundle =\n          TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n    } else {\n      this._translationBundle =\n          new TranslationBundle({}, null, digest, undefined, missingTranslation, console);\n    }\n  }\n\n  parse(source: string, url: string, options: TokenizeOptions = {}): ParseTreeResult {\n    const interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;\n    const parseResult = this._htmlParser.parse(source, url, {interpolationConfig, ...options});\n\n    if (parseResult.errors.length) {\n      return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n    }\n\n    return mergeTranslations(\n        parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n  }\n}\n\nfunction createSerializer(format?: string): Serializer {\n  format = (format || 'xlf').toLowerCase();\n\n  switch (format) {\n    case 'xmb':\n      return new Xmb();\n    case 'xtb':\n      return new Xtb();\n    case 'xliff2':\n    case 'xlf2':\n      return new Xliff2();\n    case 'xliff':\n    case 'xlf':\n    default:\n      return new Xliff();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {OutputContext, ValueTransformer, visitValue} from '../util';\n\nimport * as o from './output_ast';\n\nexport const QUOTED_KEYS = '$quoted$';\n\nexport function convertValueToOutputAst(\n    ctx: OutputContext, value: any, type: o.Type | null = null): o.Expression {\n  return visitValue(value, new _ValueOutputAstTransformer(ctx), type);\n}\n\nclass _ValueOutputAstTransformer implements ValueTransformer {\n  constructor(private ctx: OutputContext) {}\n  visitArray(arr: any[], type: o.Type): o.Expression {\n    return o.literalArr(arr.map(value => visitValue(value, this, null)), type);\n  }\n\n  visitStringMap(map: {[key: string]: any}, type: o.MapType): o.Expression {\n    const entries: o.LiteralMapEntry[] = [];\n    const quotedSet = new Set<string>(map && map[QUOTED_KEYS]);\n    Object.keys(map).forEach(key => {\n      entries.push(\n          new o.LiteralMapEntry(key, visitValue(map[key], this, null), quotedSet.has(key)));\n    });\n    return new o.LiteralMapExpr(entries, type);\n  }\n\n  visitPrimitive(value: any, type: o.Type): o.Expression { return o.literal(value, type); }\n\n  visitOther(value: any, type: o.Type): o.Expression {\n    if (value instanceof o.Expression) {\n      return value;\n    } else {\n      return this.ctx.importExpr(value);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol} from './aot/static_symbol';\nimport {CompileInjectableMetadata, CompileNgModuleMetadata, CompileProviderMetadata, identifierName} from './compile_metadata';\nimport {CompileReflector} from './compile_reflector';\nimport {InjectFlags, NodeFlags} from './core';\nimport {Identifiers} from './identifiers';\nimport * as o from './output/output_ast';\nimport {convertValueToOutputAst} from './output/value_util';\nimport {typeSourceSpan} from './parse_util';\nimport {NgModuleProviderAnalyzer} from './provider_analyzer';\nimport {OutputContext} from './util';\nimport {componentFactoryResolverProviderDef, depDef, providerDef} from './view_compiler/provider_compiler';\n\ntype MapEntry = {\n  key: string,\n  quoted: boolean,\n  value: o.Expression\n};\ntype MapLiteral = MapEntry[];\n\nfunction mapEntry(key: string, value: o.Expression): MapEntry {\n  return {key, value, quoted: false};\n}\n\nexport class InjectableCompiler {\n  private tokenInjector: StaticSymbol;\n  constructor(private reflector: CompileReflector, private alwaysGenerateDef: boolean) {\n    this.tokenInjector = reflector.resolveExternalReference(Identifiers.Injector);\n  }\n\n  private depsArray(deps: any[], ctx: OutputContext): o.Expression[] {\n    return deps.map(dep => {\n      let token = dep;\n      let args = [token];\n      let flags: InjectFlags = InjectFlags.Default;\n      if (Array.isArray(dep)) {\n        for (let i = 0; i < dep.length; i++) {\n          const v = dep[i];\n          if (v) {\n            if (v.ngMetadataName === 'Optional') {\n              flags |= InjectFlags.Optional;\n            } else if (v.ngMetadataName === 'SkipSelf') {\n              flags |= InjectFlags.SkipSelf;\n            } else if (v.ngMetadataName === 'Self') {\n              flags |= InjectFlags.Self;\n            } else if (v.ngMetadataName === 'Inject') {\n              token = v.token;\n            } else {\n              token = v;\n            }\n          }\n        }\n      }\n\n      let tokenExpr: o.Expression;\n      if (typeof token === 'string') {\n        tokenExpr = o.literal(token);\n      } else if (token === this.tokenInjector) {\n        tokenExpr = o.importExpr(Identifiers.INJECTOR);\n      } else {\n        tokenExpr = ctx.importExpr(token);\n      }\n\n      if (flags !== InjectFlags.Default) {\n        args = [tokenExpr, o.literal(flags)];\n      } else {\n        args = [tokenExpr];\n      }\n      return o.importExpr(Identifiers.inject).callFn(args);\n    });\n  }\n\n  factoryFor(injectable: CompileInjectableMetadata, ctx: OutputContext): o.Expression {\n    let retValue: o.Expression;\n    if (injectable.useExisting) {\n      retValue = o.importExpr(Identifiers.inject).callFn([ctx.importExpr(injectable.useExisting)]);\n    } else if (injectable.useFactory) {\n      const deps = injectable.deps || [];\n      if (deps.length > 0) {\n        retValue = ctx.importExpr(injectable.useFactory).callFn(this.depsArray(deps, ctx));\n      } else {\n        return ctx.importExpr(injectable.useFactory);\n      }\n    } else if (injectable.useValue) {\n      retValue = convertValueToOutputAst(ctx, injectable.useValue);\n    } else {\n      const clazz = injectable.useClass || injectable.symbol;\n      const depArgs = this.depsArray(this.reflector.parameters(clazz), ctx);\n      retValue = new o.InstantiateExpr(ctx.importExpr(clazz), depArgs);\n    }\n    return o.fn(\n        [], [new o.ReturnStatement(retValue)], undefined, undefined,\n        injectable.symbol.name + '_Factory');\n  }\n\n  injectableDef(injectable: CompileInjectableMetadata, ctx: OutputContext): o.Expression {\n    let providedIn: o.Expression = o.NULL_EXPR;\n    if (injectable.providedIn !== undefined) {\n      if (injectable.providedIn === null) {\n        providedIn = o.NULL_EXPR;\n      } else if (typeof injectable.providedIn === 'string') {\n        providedIn = o.literal(injectable.providedIn);\n      } else {\n        providedIn = ctx.importExpr(injectable.providedIn);\n      }\n    }\n    const def: MapLiteral = [\n      mapEntry('factory', this.factoryFor(injectable, ctx)),\n      mapEntry('token', ctx.importExpr(injectable.type.reference)),\n      mapEntry('providedIn', providedIn),\n    ];\n    return o.importExpr(Identifiers.ÉµÉµdefineInjectable).callFn([o.literalMap(def)]);\n  }\n\n  compile(injectable: CompileInjectableMetadata, ctx: OutputContext): void {\n    if (this.alwaysGenerateDef || injectable.providedIn !== undefined) {\n      const className = identifierName(injectable.type) !;\n      const clazz = new o.ClassStmt(\n          className, null,\n          [\n            new o.ClassField(\n                'ngInjectableDef', o.INFERRED_TYPE, [o.StmtModifier.Static],\n                this.injectableDef(injectable, ctx)),\n          ],\n          [], new o.ClassMethod(null, [], []), []);\n      ctx.statements.push(clazz);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst STRIP_SRC_FILE_SUFFIXES = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\nconst GENERATED_FILE = /\\.ngfactory\\.|\\.ngsummary\\./;\nconst JIT_SUMMARY_FILE = /\\.ngsummary\\./;\nconst JIT_SUMMARY_NAME = /NgSummary$/;\n\nexport function ngfactoryFilePath(filePath: string, forceSourceFile = false): string {\n  const urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);\n  return `${urlWithSuffix[0]}.ngfactory${normalizeGenFileSuffix(urlWithSuffix[1])}`;\n}\n\nexport function stripGeneratedFileSuffix(filePath: string): string {\n  return filePath.replace(GENERATED_FILE, '.');\n}\n\nexport function isGeneratedFile(filePath: string): boolean {\n  return GENERATED_FILE.test(filePath);\n}\n\nexport function splitTypescriptSuffix(path: string, forceSourceFile = false): string[] {\n  if (path.endsWith('.d.ts')) {\n    return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];\n  }\n\n  const lastDot = path.lastIndexOf('.');\n\n  if (lastDot !== -1) {\n    return [path.substring(0, lastDot), path.substring(lastDot)];\n  }\n\n  return [path, ''];\n}\n\nexport function normalizeGenFileSuffix(srcFileSuffix: string): string {\n  return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;\n}\n\nexport function summaryFileName(fileName: string): string {\n  const fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');\n  return `${fileNameWithoutSuffix}.ngsummary.json`;\n}\n\nexport function summaryForJitFileName(fileName: string, forceSourceFile = false): string {\n  const urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);\n  return `${urlWithSuffix[0]}.ngsummary${urlWithSuffix[1]}`;\n}\n\nexport function stripSummaryForJitFileSuffix(filePath: string): string {\n  return filePath.replace(JIT_SUMMARY_FILE, '.');\n}\n\nexport function summaryForJitName(symbolName: string): string {\n  return `${symbolName}NgSummary`;\n}\n\nexport function stripSummaryForJitNameSuffix(symbolName: string): string {\n  return symbolName.replace(JIT_SUMMARY_NAME, '');\n}\n\nconst LOWERED_SYMBOL = /\\u0275\\d+/;\n\nexport function isLoweredSymbol(name: string) {\n  return LOWERED_SYMBOL.test(name);\n}\n\nexport function createLoweredSymbol(id: number): string {\n  return `\\u0275${id}`;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector} from './compile_reflector';\n\nexport enum LifecycleHooks {\n  OnInit,\n  OnDestroy,\n  DoCheck,\n  OnChanges,\n  AfterContentInit,\n  AfterContentChecked,\n  AfterViewInit,\n  AfterViewChecked\n}\n\nexport const LIFECYCLE_HOOKS_VALUES = [\n  LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,\n  LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,\n  LifecycleHooks.AfterViewChecked\n];\n\nexport function hasLifecycleHook(\n    reflector: CompileReflector, hook: LifecycleHooks, token: any): boolean {\n  return reflector.hasLifecycleHook(token, getHookName(hook));\n}\n\nexport function getAllLifecycleHooks(reflector: CompileReflector, token: any): LifecycleHooks[] {\n  return LIFECYCLE_HOOKS_VALUES.filter(hook => hasLifecycleHook(reflector, hook, token));\n}\n\nfunction getHookName(hook: LifecycleHooks): string {\n  switch (hook) {\n    case LifecycleHooks.OnInit:\n      return 'ngOnInit';\n    case LifecycleHooks.OnDestroy:\n      return 'ngOnDestroy';\n    case LifecycleHooks.DoCheck:\n      return 'ngDoCheck';\n    case LifecycleHooks.OnChanges:\n      return 'ngOnChanges';\n    case LifecycleHooks.AfterContentInit:\n      return 'ngAfterContentInit';\n    case LifecycleHooks.AfterContentChecked:\n      return 'ngAfterContentChecked';\n    case LifecycleHooks.AfterViewInit:\n      return 'ngAfterViewInit';\n    case LifecycleHooks.AfterViewChecked:\n      return 'ngAfterViewChecked';\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      const unexpected: never = hook;\n      throw new Error(`unexpected ${unexpected}`);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StaticSymbol, StaticSymbolCache} from './aot/static_symbol';\nimport {ngfactoryFilePath} from './aot/util';\nimport {assertArrayOfStrings, assertInterpolationSymbols} from './assertions';\nimport * as cpl from './compile_metadata';\nimport {CompileReflector} from './compile_reflector';\nimport {CompilerConfig} from './config';\nimport {ChangeDetectionStrategy, Component, Directive, Injectable, ModuleWithProviders, Provider, Query, SchemaMetadata, Type, ViewEncapsulation, createAttribute, createComponent, createHost, createInject, createInjectable, createInjectionToken, createNgModule, createOptional, createSelf, createSkipSelf} from './core';\nimport {DirectiveNormalizer} from './directive_normalizer';\nimport {DirectiveResolver, findLast} from './directive_resolver';\nimport {Identifiers} from './identifiers';\nimport {getAllLifecycleHooks} from './lifecycle_reflector';\nimport {HtmlParser} from './ml_parser/html_parser';\nimport {NgModuleResolver} from './ng_module_resolver';\nimport {PipeResolver} from './pipe_resolver';\nimport {ElementSchemaRegistry} from './schema/element_schema_registry';\nimport {CssSelector} from './selector';\nimport {SummaryResolver} from './summary_resolver';\nimport {Console, SyncAsync, ValueTransformer, isPromise, noUndefined, resolveForwardRef, stringify, syntaxError, visitValue} from './util';\n\nexport type ErrorCollector = (error: any, type?: any) => void;\n\nexport const ERROR_COMPONENT_TYPE = 'ngComponentType';\n\n// Design notes:\n// - don't lazily create metadata:\n//   For some metadata, we need to do async work sometimes,\n//   so the user has to kick off this loading.\n//   But we want to report errors even when the async work is\n//   not required to check that the user would have been able\n//   to wait correctly.\nexport class CompileMetadataResolver {\n  private _nonNormalizedDirectiveCache =\n      new Map<Type, {annotation: Directive, metadata: cpl.CompileDirectiveMetadata}>();\n  private _directiveCache = new Map<Type, cpl.CompileDirectiveMetadata>();\n  private _summaryCache = new Map<Type, cpl.CompileTypeSummary|null>();\n  private _pipeCache = new Map<Type, cpl.CompilePipeMetadata>();\n  private _ngModuleCache = new Map<Type, cpl.CompileNgModuleMetadata>();\n  private _ngModuleOfTypes = new Map<Type, Type>();\n  private _shallowModuleCache = new Map<Type, cpl.CompileShallowModuleMetadata>();\n\n  constructor(\n      private _config: CompilerConfig, private _htmlParser: HtmlParser,\n      private _ngModuleResolver: NgModuleResolver, private _directiveResolver: DirectiveResolver,\n      private _pipeResolver: PipeResolver, private _summaryResolver: SummaryResolver<any>,\n      private _schemaRegistry: ElementSchemaRegistry,\n      private _directiveNormalizer: DirectiveNormalizer, private _console: Console,\n      private _staticSymbolCache: StaticSymbolCache, private _reflector: CompileReflector,\n      private _errorCollector?: ErrorCollector) {}\n\n  getReflector(): CompileReflector { return this._reflector; }\n\n  clearCacheFor(type: Type) {\n    const dirMeta = this._directiveCache.get(type);\n    this._directiveCache.delete(type);\n    this._nonNormalizedDirectiveCache.delete(type);\n    this._summaryCache.delete(type);\n    this._pipeCache.delete(type);\n    this._ngModuleOfTypes.delete(type);\n    // Clear all of the NgModule as they contain transitive information!\n    this._ngModuleCache.clear();\n    if (dirMeta) {\n      this._directiveNormalizer.clearCacheFor(dirMeta);\n    }\n  }\n\n  clearCache(): void {\n    this._directiveCache.clear();\n    this._nonNormalizedDirectiveCache.clear();\n    this._summaryCache.clear();\n    this._pipeCache.clear();\n    this._ngModuleCache.clear();\n    this._ngModuleOfTypes.clear();\n    this._directiveNormalizer.clearCache();\n  }\n\n  private _createProxyClass(baseType: any, name: string): cpl.ProxyClass {\n    let delegate: any = null;\n    const proxyClass: cpl.ProxyClass = <any>function(this: unknown) {\n      if (!delegate) {\n        throw new Error(\n            `Illegal state: Class ${name} for type ${stringify(baseType)} is not compiled yet!`);\n      }\n      return delegate.apply(this, arguments);\n    };\n    proxyClass.setDelegate = (d) => {\n      delegate = d;\n      (<any>proxyClass).prototype = d.prototype;\n    };\n    // Make stringify work correctly\n    (<any>proxyClass).overriddenName = name;\n    return proxyClass;\n  }\n\n  private getGeneratedClass(dirType: any, name: string): StaticSymbol|cpl.ProxyClass {\n    if (dirType instanceof StaticSymbol) {\n      return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);\n    } else {\n      return this._createProxyClass(dirType, name);\n    }\n  }\n\n  private getComponentViewClass(dirType: any): StaticSymbol|cpl.ProxyClass {\n    return this.getGeneratedClass(dirType, cpl.viewClassName(dirType, 0));\n  }\n\n  getHostComponentViewClass(dirType: any): StaticSymbol|cpl.ProxyClass {\n    return this.getGeneratedClass(dirType, cpl.hostViewClassName(dirType));\n  }\n\n  getHostComponentType(dirType: any): StaticSymbol|cpl.ProxyClass {\n    const name = `${cpl.identifierName({reference: dirType})}_Host`;\n    if (dirType instanceof StaticSymbol) {\n      return this._staticSymbolCache.get(dirType.filePath, name);\n    }\n\n    return this._createProxyClass(dirType, name);\n  }\n\n  private getRendererType(dirType: any): StaticSymbol|object {\n    if (dirType instanceof StaticSymbol) {\n      return this._staticSymbolCache.get(\n          ngfactoryFilePath(dirType.filePath), cpl.rendererTypeName(dirType));\n    } else {\n      // returning an object as proxy,\n      // that we fill later during runtime compilation.\n      return <any>{};\n    }\n  }\n\n  private getComponentFactory(\n      selector: string, dirType: any, inputs: {[key: string]: string}|null,\n      outputs: {[key: string]: string}): StaticSymbol|object {\n    if (dirType instanceof StaticSymbol) {\n      return this._staticSymbolCache.get(\n          ngfactoryFilePath(dirType.filePath), cpl.componentFactoryName(dirType));\n    } else {\n      const hostView = this.getHostComponentViewClass(dirType);\n      // Note: ngContentSelectors will be filled later once the template is\n      // loaded.\n      const createComponentFactory =\n          this._reflector.resolveExternalReference(Identifiers.createComponentFactory);\n      return createComponentFactory(selector, dirType, <any>hostView, inputs, outputs, []);\n    }\n  }\n\n  private initComponentFactory(factory: StaticSymbol|object, ngContentSelectors: string[]) {\n    if (!(factory instanceof StaticSymbol)) {\n      (factory as any).ngContentSelectors.push(...ngContentSelectors);\n    }\n  }\n\n  private _loadSummary(type: any, kind: cpl.CompileSummaryKind): cpl.CompileTypeSummary|null {\n    let typeSummary = this._summaryCache.get(type);\n    if (!typeSummary) {\n      const summary = this._summaryResolver.resolveSummary(type);\n      typeSummary = summary ? summary.type : null;\n      this._summaryCache.set(type, typeSummary || null);\n    }\n    return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;\n  }\n\n  getHostComponentMetadata(\n      compMeta: cpl.CompileDirectiveMetadata,\n      hostViewType?: StaticSymbol|cpl.ProxyClass): cpl.CompileDirectiveMetadata {\n    const hostType = this.getHostComponentType(compMeta.type.reference);\n    if (!hostViewType) {\n      hostViewType = this.getHostComponentViewClass(hostType);\n    }\n    // Note: ! is ok here as this method should only be called with normalized directive\n    // metadata, which always fills in the selector.\n    const template = CssSelector.parse(compMeta.selector !)[0].getMatchingElementTemplate();\n    const templateUrl = '';\n    const htmlAst = this._htmlParser.parse(template, templateUrl);\n    return cpl.CompileDirectiveMetadata.create({\n      isHost: true,\n      type: {reference: hostType, diDeps: [], lifecycleHooks: []},\n      template: new cpl.CompileTemplateMetadata({\n        encapsulation: ViewEncapsulation.None,\n        template,\n        templateUrl,\n        htmlAst,\n        styles: [],\n        styleUrls: [],\n        ngContentSelectors: [],\n        animations: [],\n        isInline: true,\n        externalStylesheets: [],\n        interpolation: null,\n        preserveWhitespaces: false,\n      }),\n      exportAs: null,\n      changeDetection: ChangeDetectionStrategy.Default,\n      inputs: [],\n      outputs: [],\n      host: {},\n      isComponent: true,\n      selector: '*',\n      providers: [],\n      viewProviders: [],\n      queries: [],\n      guards: {},\n      viewQueries: [],\n      componentViewType: hostViewType,\n      rendererType:\n          {id: '__Host__', encapsulation: ViewEncapsulation.None, styles: [], data: {}} as object,\n      entryComponents: [],\n      componentFactory: null\n    });\n  }\n\n  loadDirectiveMetadata(ngModuleType: any, directiveType: any, isSync: boolean): SyncAsync<null> {\n    if (this._directiveCache.has(directiveType)) {\n      return null;\n    }\n    directiveType = resolveForwardRef(directiveType);\n    const {annotation, metadata} = this.getNonNormalizedDirectiveMetadata(directiveType) !;\n\n    const createDirectiveMetadata = (templateMetadata: cpl.CompileTemplateMetadata | null) => {\n      const normalizedDirMeta = new cpl.CompileDirectiveMetadata({\n        isHost: false,\n        type: metadata.type,\n        isComponent: metadata.isComponent,\n        selector: metadata.selector,\n        exportAs: metadata.exportAs,\n        changeDetection: metadata.changeDetection,\n        inputs: metadata.inputs,\n        outputs: metadata.outputs,\n        hostListeners: metadata.hostListeners,\n        hostProperties: metadata.hostProperties,\n        hostAttributes: metadata.hostAttributes,\n        providers: metadata.providers,\n        viewProviders: metadata.viewProviders,\n        queries: metadata.queries,\n        guards: metadata.guards,\n        viewQueries: metadata.viewQueries,\n        entryComponents: metadata.entryComponents,\n        componentViewType: metadata.componentViewType,\n        rendererType: metadata.rendererType,\n        componentFactory: metadata.componentFactory,\n        template: templateMetadata\n      });\n      if (templateMetadata) {\n        this.initComponentFactory(metadata.componentFactory !, templateMetadata.ngContentSelectors);\n      }\n      this._directiveCache.set(directiveType, normalizedDirMeta);\n      this._summaryCache.set(directiveType, normalizedDirMeta.toSummary());\n      return null;\n    };\n\n    if (metadata.isComponent) {\n      const template = metadata.template !;\n      const templateMeta = this._directiveNormalizer.normalizeTemplate({\n        ngModuleType,\n        componentType: directiveType,\n        moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),\n        encapsulation: template.encapsulation,\n        template: template.template,\n        templateUrl: template.templateUrl,\n        styles: template.styles,\n        styleUrls: template.styleUrls,\n        animations: template.animations,\n        interpolation: template.interpolation,\n        preserveWhitespaces: template.preserveWhitespaces\n      });\n      if (isPromise(templateMeta) && isSync) {\n        this._reportError(componentStillLoadingError(directiveType), directiveType);\n        return null;\n      }\n      return SyncAsync.then(templateMeta, createDirectiveMetadata);\n    } else {\n      // directive\n      createDirectiveMetadata(null);\n      return null;\n    }\n  }\n\n  getNonNormalizedDirectiveMetadata(directiveType: any):\n      {annotation: Directive, metadata: cpl.CompileDirectiveMetadata}|null {\n    directiveType = resolveForwardRef(directiveType);\n    if (!directiveType) {\n      return null;\n    }\n    let cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);\n    if (cacheEntry) {\n      return cacheEntry;\n    }\n    const dirMeta = this._directiveResolver.resolve(directiveType, false);\n    if (!dirMeta) {\n      return null;\n    }\n    let nonNormalizedTemplateMetadata: cpl.CompileTemplateMetadata = undefined !;\n\n    if (createComponent.isTypeOf(dirMeta)) {\n      // component\n      const compMeta = dirMeta as Component;\n      assertArrayOfStrings('styles', compMeta.styles);\n      assertArrayOfStrings('styleUrls', compMeta.styleUrls);\n      assertInterpolationSymbols('interpolation', compMeta.interpolation);\n\n      const animations = compMeta.animations;\n\n      nonNormalizedTemplateMetadata = new cpl.CompileTemplateMetadata({\n        encapsulation: noUndefined(compMeta.encapsulation),\n        template: noUndefined(compMeta.template),\n        templateUrl: noUndefined(compMeta.templateUrl),\n        htmlAst: null,\n        styles: compMeta.styles || [],\n        styleUrls: compMeta.styleUrls || [],\n        animations: animations || [],\n        interpolation: noUndefined(compMeta.interpolation),\n        isInline: !!compMeta.template,\n        externalStylesheets: [],\n        ngContentSelectors: [],\n        preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces),\n      });\n    }\n\n    let changeDetectionStrategy: ChangeDetectionStrategy = null !;\n    let viewProviders: cpl.CompileProviderMetadata[] = [];\n    let entryComponentMetadata: cpl.CompileEntryComponentMetadata[] = [];\n    let selector = dirMeta.selector;\n\n    if (createComponent.isTypeOf(dirMeta)) {\n      // Component\n      const compMeta = dirMeta as Component;\n      changeDetectionStrategy = compMeta.changeDetection !;\n      if (compMeta.viewProviders) {\n        viewProviders = this._getProvidersMetadata(\n            compMeta.viewProviders, entryComponentMetadata,\n            `viewProviders for \"${stringifyType(directiveType)}\"`, [], directiveType);\n      }\n      if (compMeta.entryComponents) {\n        entryComponentMetadata = flattenAndDedupeArray(compMeta.entryComponents)\n                                     .map((type) => this._getEntryComponentMetadata(type) !)\n                                     .concat(entryComponentMetadata);\n      }\n      if (!selector) {\n        selector = this._schemaRegistry.getDefaultComponentElementName();\n      }\n    } else {\n      // Directive\n      if (!selector) {\n        this._reportError(\n            syntaxError(\n                `Directive ${stringifyType(directiveType)} has no selector, please add it!`),\n            directiveType);\n        selector = 'error';\n      }\n    }\n\n    let providers: cpl.CompileProviderMetadata[] = [];\n    if (dirMeta.providers != null) {\n      providers = this._getProvidersMetadata(\n          dirMeta.providers, entryComponentMetadata,\n          `providers for \"${stringifyType(directiveType)}\"`, [], directiveType);\n    }\n    let queries: cpl.CompileQueryMetadata[] = [];\n    let viewQueries: cpl.CompileQueryMetadata[] = [];\n    if (dirMeta.queries != null) {\n      queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);\n      viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);\n    }\n\n    const metadata = cpl.CompileDirectiveMetadata.create({\n      isHost: false,\n      selector: selector,\n      exportAs: noUndefined(dirMeta.exportAs),\n      isComponent: !!nonNormalizedTemplateMetadata,\n      type: this._getTypeMetadata(directiveType),\n      template: nonNormalizedTemplateMetadata,\n      changeDetection: changeDetectionStrategy,\n      inputs: dirMeta.inputs || [],\n      outputs: dirMeta.outputs || [],\n      host: dirMeta.host || {},\n      providers: providers || [],\n      viewProviders: viewProviders || [],\n      queries: queries || [],\n      guards: dirMeta.guards || {},\n      viewQueries: viewQueries || [],\n      entryComponents: entryComponentMetadata,\n      componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) :\n                                                         null,\n      rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,\n      componentFactory: null\n    });\n    if (nonNormalizedTemplateMetadata) {\n      metadata.componentFactory =\n          this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);\n    }\n    cacheEntry = {metadata, annotation: dirMeta};\n    this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);\n    return cacheEntry;\n  }\n\n  /**\n   * Gets the metadata for the given directive.\n   * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n   */\n  getDirectiveMetadata(directiveType: any): cpl.CompileDirectiveMetadata {\n    const dirMeta = this._directiveCache.get(directiveType) !;\n    if (!dirMeta) {\n      this._reportError(\n          syntaxError(\n              `Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive ${stringifyType(directiveType)}.`),\n          directiveType);\n    }\n    return dirMeta;\n  }\n\n  getDirectiveSummary(dirType: any): cpl.CompileDirectiveSummary {\n    const dirSummary =\n        <cpl.CompileDirectiveSummary>this._loadSummary(dirType, cpl.CompileSummaryKind.Directive);\n    if (!dirSummary) {\n      this._reportError(\n          syntaxError(\n              `Illegal state: Could not load the summary for directive ${stringifyType(dirType)}.`),\n          dirType);\n    }\n    return dirSummary;\n  }\n\n  isDirective(type: any) {\n    return !!this._loadSummary(type, cpl.CompileSummaryKind.Directive) ||\n        this._directiveResolver.isDirective(type);\n  }\n\n  isPipe(type: any) {\n    return !!this._loadSummary(type, cpl.CompileSummaryKind.Pipe) ||\n        this._pipeResolver.isPipe(type);\n  }\n\n  isNgModule(type: any) {\n    return !!this._loadSummary(type, cpl.CompileSummaryKind.NgModule) ||\n        this._ngModuleResolver.isNgModule(type);\n  }\n\n  getNgModuleSummary(moduleType: any, alreadyCollecting: Set<any>|null = null):\n      cpl.CompileNgModuleSummary|null {\n    let moduleSummary: cpl.CompileNgModuleSummary|null =\n        <cpl.CompileNgModuleSummary>this._loadSummary(moduleType, cpl.CompileSummaryKind.NgModule);\n    if (!moduleSummary) {\n      const moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);\n      moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;\n      if (moduleSummary) {\n        this._summaryCache.set(moduleType, moduleSummary);\n      }\n    }\n    return moduleSummary;\n  }\n\n  /**\n   * Loads the declared directives and pipes of an NgModule.\n   */\n  loadNgModuleDirectiveAndPipeMetadata(moduleType: any, isSync: boolean, throwIfNotFound = true):\n      Promise<any> {\n    const ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);\n    const loading: Promise<any>[] = [];\n    if (ngModule) {\n      ngModule.declaredDirectives.forEach((id) => {\n        const promise = this.loadDirectiveMetadata(moduleType, id.reference, isSync);\n        if (promise) {\n          loading.push(promise);\n        }\n      });\n      ngModule.declaredPipes.forEach((id) => this._loadPipeMetadata(id.reference));\n    }\n    return Promise.all(loading);\n  }\n\n  getShallowModuleMetadata(moduleType: any): cpl.CompileShallowModuleMetadata|null {\n    let compileMeta = this._shallowModuleCache.get(moduleType);\n    if (compileMeta) {\n      return compileMeta;\n    }\n\n    const ngModuleMeta =\n        findLast(this._reflector.shallowAnnotations(moduleType), createNgModule.isTypeOf);\n\n    compileMeta = {\n      type: this._getTypeMetadata(moduleType),\n      rawExports: ngModuleMeta.exports,\n      rawImports: ngModuleMeta.imports,\n      rawProviders: ngModuleMeta.providers,\n    };\n\n    this._shallowModuleCache.set(moduleType, compileMeta);\n    return compileMeta;\n  }\n\n  getNgModuleMetadata(\n      moduleType: any, throwIfNotFound = true,\n      alreadyCollecting: Set<any>|null = null): cpl.CompileNgModuleMetadata|null {\n    moduleType = resolveForwardRef(moduleType);\n    let compileMeta = this._ngModuleCache.get(moduleType);\n    if (compileMeta) {\n      return compileMeta;\n    }\n    const meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);\n    if (!meta) {\n      return null;\n    }\n    const declaredDirectives: cpl.CompileIdentifierMetadata[] = [];\n    const exportedNonModuleIdentifiers: cpl.CompileIdentifierMetadata[] = [];\n    const declaredPipes: cpl.CompileIdentifierMetadata[] = [];\n    const importedModules: cpl.CompileNgModuleSummary[] = [];\n    const exportedModules: cpl.CompileNgModuleSummary[] = [];\n    const providers: cpl.CompileProviderMetadata[] = [];\n    const entryComponents: cpl.CompileEntryComponentMetadata[] = [];\n    const bootstrapComponents: cpl.CompileIdentifierMetadata[] = [];\n    const schemas: SchemaMetadata[] = [];\n\n    if (meta.imports) {\n      flattenAndDedupeArray(meta.imports).forEach((importedType) => {\n        let importedModuleType: Type = undefined !;\n        if (isValidType(importedType)) {\n          importedModuleType = importedType;\n        } else if (importedType && importedType.ngModule) {\n          const moduleWithProviders: ModuleWithProviders = importedType;\n          importedModuleType = moduleWithProviders.ngModule;\n          if (moduleWithProviders.providers) {\n            providers.push(...this._getProvidersMetadata(\n                moduleWithProviders.providers, entryComponents,\n                `provider for the NgModule '${stringifyType(importedModuleType)}'`, [],\n                importedType));\n          }\n        }\n\n        if (importedModuleType) {\n          if (this._checkSelfImport(moduleType, importedModuleType)) return;\n          if (!alreadyCollecting) alreadyCollecting = new Set();\n          if (alreadyCollecting.has(importedModuleType)) {\n            this._reportError(\n                syntaxError(\n                    `${this._getTypeDescriptor(importedModuleType)} '${stringifyType(importedType)}' is imported recursively by the module '${stringifyType(moduleType)}'.`),\n                moduleType);\n            return;\n          }\n          alreadyCollecting.add(importedModuleType);\n          const importedModuleSummary =\n              this.getNgModuleSummary(importedModuleType, alreadyCollecting);\n          alreadyCollecting.delete(importedModuleType);\n          if (!importedModuleSummary) {\n            this._reportError(\n                syntaxError(\n                    `Unexpected ${this._getTypeDescriptor(importedType)} '${stringifyType(importedType)}' imported by the module '${stringifyType(moduleType)}'. Please add a @NgModule annotation.`),\n                moduleType);\n            return;\n          }\n          importedModules.push(importedModuleSummary);\n        } else {\n          this._reportError(\n              syntaxError(\n                  `Unexpected value '${stringifyType(importedType)}' imported by the module '${stringifyType(moduleType)}'`),\n              moduleType);\n          return;\n        }\n      });\n    }\n\n    if (meta.exports) {\n      flattenAndDedupeArray(meta.exports).forEach((exportedType) => {\n        if (!isValidType(exportedType)) {\n          this._reportError(\n              syntaxError(\n                  `Unexpected value '${stringifyType(exportedType)}' exported by the module '${stringifyType(moduleType)}'`),\n              moduleType);\n          return;\n        }\n        if (!alreadyCollecting) alreadyCollecting = new Set();\n        if (alreadyCollecting.has(exportedType)) {\n          this._reportError(\n              syntaxError(\n                  `${this._getTypeDescriptor(exportedType)} '${stringify(exportedType)}' is exported recursively by the module '${stringifyType(moduleType)}'`),\n              moduleType);\n          return;\n        }\n        alreadyCollecting.add(exportedType);\n        const exportedModuleSummary = this.getNgModuleSummary(exportedType, alreadyCollecting);\n        alreadyCollecting.delete(exportedType);\n        if (exportedModuleSummary) {\n          exportedModules.push(exportedModuleSummary);\n        } else {\n          exportedNonModuleIdentifiers.push(this._getIdentifierMetadata(exportedType));\n        }\n      });\n    }\n\n    // Note: This will be modified later, so we rely on\n    // getting a new instance every time!\n    const transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);\n    if (meta.declarations) {\n      flattenAndDedupeArray(meta.declarations).forEach((declaredType) => {\n        if (!isValidType(declaredType)) {\n          this._reportError(\n              syntaxError(\n                  `Unexpected value '${stringifyType(declaredType)}' declared by the module '${stringifyType(moduleType)}'`),\n              moduleType);\n          return;\n        }\n        const declaredIdentifier = this._getIdentifierMetadata(declaredType);\n        if (this.isDirective(declaredType)) {\n          transitiveModule.addDirective(declaredIdentifier);\n          declaredDirectives.push(declaredIdentifier);\n          this._addTypeToModule(declaredType, moduleType);\n        } else if (this.isPipe(declaredType)) {\n          transitiveModule.addPipe(declaredIdentifier);\n          transitiveModule.pipes.push(declaredIdentifier);\n          declaredPipes.push(declaredIdentifier);\n          this._addTypeToModule(declaredType, moduleType);\n        } else {\n          this._reportError(\n              syntaxError(\n                  `Unexpected ${this._getTypeDescriptor(declaredType)} '${stringifyType(declaredType)}' declared by the module '${stringifyType(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`),\n              moduleType);\n          return;\n        }\n      });\n    }\n\n    const exportedDirectives: cpl.CompileIdentifierMetadata[] = [];\n    const exportedPipes: cpl.CompileIdentifierMetadata[] = [];\n    exportedNonModuleIdentifiers.forEach((exportedId) => {\n      if (transitiveModule.directivesSet.has(exportedId.reference)) {\n        exportedDirectives.push(exportedId);\n        transitiveModule.addExportedDirective(exportedId);\n      } else if (transitiveModule.pipesSet.has(exportedId.reference)) {\n        exportedPipes.push(exportedId);\n        transitiveModule.addExportedPipe(exportedId);\n      } else {\n        this._reportError(\n            syntaxError(\n                `Can't export ${this._getTypeDescriptor(exportedId.reference)} ${stringifyType(exportedId.reference)} from ${stringifyType(moduleType)} as it was neither declared nor imported!`),\n            moduleType);\n        return;\n      }\n    });\n\n    // The providers of the module have to go last\n    // so that they overwrite any other provider we already added.\n    if (meta.providers) {\n      providers.push(...this._getProvidersMetadata(\n          meta.providers, entryComponents,\n          `provider for the NgModule '${stringifyType(moduleType)}'`, [], moduleType));\n    }\n\n    if (meta.entryComponents) {\n      entryComponents.push(...flattenAndDedupeArray(meta.entryComponents)\n                               .map(type => this._getEntryComponentMetadata(type) !));\n    }\n\n    if (meta.bootstrap) {\n      flattenAndDedupeArray(meta.bootstrap).forEach(type => {\n        if (!isValidType(type)) {\n          this._reportError(\n              syntaxError(\n                  `Unexpected value '${stringifyType(type)}' used in the bootstrap property of module '${stringifyType(moduleType)}'`),\n              moduleType);\n          return;\n        }\n        bootstrapComponents.push(this._getIdentifierMetadata(type));\n      });\n    }\n\n    entryComponents.push(\n        ...bootstrapComponents.map(type => this._getEntryComponentMetadata(type.reference) !));\n\n    if (meta.schemas) {\n      schemas.push(...flattenAndDedupeArray(meta.schemas));\n    }\n\n    compileMeta = new cpl.CompileNgModuleMetadata({\n      type: this._getTypeMetadata(moduleType),\n      providers,\n      entryComponents,\n      bootstrapComponents,\n      schemas,\n      declaredDirectives,\n      exportedDirectives,\n      declaredPipes,\n      exportedPipes,\n      importedModules,\n      exportedModules,\n      transitiveModule,\n      id: meta.id || null,\n    });\n\n    entryComponents.forEach((id) => transitiveModule.addEntryComponent(id));\n    providers.forEach((provider) => transitiveModule.addProvider(provider, compileMeta !.type));\n    transitiveModule.addModule(compileMeta.type);\n    this._ngModuleCache.set(moduleType, compileMeta);\n    return compileMeta;\n  }\n\n  private _checkSelfImport(moduleType: Type, importedModuleType: Type): boolean {\n    if (moduleType === importedModuleType) {\n      this._reportError(\n          syntaxError(`'${stringifyType(moduleType)}' module can't import itself`), moduleType);\n      return true;\n    }\n    return false;\n  }\n\n  private _getTypeDescriptor(type: Type): string {\n    if (isValidType(type)) {\n      if (this.isDirective(type)) {\n        return 'directive';\n      }\n\n      if (this.isPipe(type)) {\n        return 'pipe';\n      }\n\n      if (this.isNgModule(type)) {\n        return 'module';\n      }\n    }\n\n    if ((type as any).provide) {\n      return 'provider';\n    }\n\n    return 'value';\n  }\n\n\n  private _addTypeToModule(type: Type, moduleType: Type) {\n    const oldModule = this._ngModuleOfTypes.get(type);\n    if (oldModule && oldModule !== moduleType) {\n      this._reportError(\n          syntaxError(\n              `Type ${stringifyType(type)} is part of the declarations of 2 modules: ${stringifyType(oldModule)} and ${stringifyType(moduleType)}! ` +\n              `Please consider moving ${stringifyType(type)} to a higher module that imports ${stringifyType(oldModule)} and ${stringifyType(moduleType)}. ` +\n              `You can also create a new NgModule that exports and includes ${stringifyType(type)} then import that NgModule in ${stringifyType(oldModule)} and ${stringifyType(moduleType)}.`),\n          moduleType);\n      return;\n    }\n    this._ngModuleOfTypes.set(type, moduleType);\n  }\n\n  private _getTransitiveNgModuleMetadata(\n      importedModules: cpl.CompileNgModuleSummary[],\n      exportedModules: cpl.CompileNgModuleSummary[]): cpl.TransitiveCompileNgModuleMetadata {\n    // collect `providers` / `entryComponents` from all imported and all exported modules\n    const result = new cpl.TransitiveCompileNgModuleMetadata();\n    const modulesByToken = new Map<any, Set<any>>();\n    importedModules.concat(exportedModules).forEach((modSummary) => {\n      modSummary.modules.forEach((mod) => result.addModule(mod));\n      modSummary.entryComponents.forEach((comp) => result.addEntryComponent(comp));\n      const addedTokens = new Set<any>();\n      modSummary.providers.forEach((entry) => {\n        const tokenRef = cpl.tokenReference(entry.provider.token);\n        let prevModules = modulesByToken.get(tokenRef);\n        if (!prevModules) {\n          prevModules = new Set<any>();\n          modulesByToken.set(tokenRef, prevModules);\n        }\n        const moduleRef = entry.module.reference;\n        // Note: the providers of one module may still contain multiple providers\n        // per token (e.g. for multi providers), and we need to preserve these.\n        if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {\n          prevModules.add(moduleRef);\n          addedTokens.add(tokenRef);\n          result.addProvider(entry.provider, entry.module);\n        }\n      });\n    });\n    exportedModules.forEach((modSummary) => {\n      modSummary.exportedDirectives.forEach((id) => result.addExportedDirective(id));\n      modSummary.exportedPipes.forEach((id) => result.addExportedPipe(id));\n    });\n    importedModules.forEach((modSummary) => {\n      modSummary.exportedDirectives.forEach((id) => result.addDirective(id));\n      modSummary.exportedPipes.forEach((id) => result.addPipe(id));\n    });\n    return result;\n  }\n\n  private _getIdentifierMetadata(type: Type): cpl.CompileIdentifierMetadata {\n    type = resolveForwardRef(type);\n    return {reference: type};\n  }\n\n  isInjectable(type: any): boolean {\n    const annotations = this._reflector.tryAnnotations(type);\n    return annotations.some(ann => createInjectable.isTypeOf(ann));\n  }\n\n  getInjectableSummary(type: any): cpl.CompileTypeSummary {\n    return {\n      summaryKind: cpl.CompileSummaryKind.Injectable,\n      type: this._getTypeMetadata(type, null, false)\n    };\n  }\n\n  getInjectableMetadata(\n      type: any, dependencies: any[]|null = null,\n      throwOnUnknownDeps: boolean = true): cpl.CompileInjectableMetadata|null {\n    const typeSummary = this._loadSummary(type, cpl.CompileSummaryKind.Injectable);\n    const typeMetadata = typeSummary ?\n        typeSummary.type :\n        this._getTypeMetadata(type, dependencies, throwOnUnknownDeps);\n\n    const annotations: Injectable[] =\n        this._reflector.annotations(type).filter(ann => createInjectable.isTypeOf(ann));\n\n    if (annotations.length === 0) {\n      return null;\n    }\n\n    const meta = annotations[annotations.length - 1];\n    return {\n      symbol: type,\n      type: typeMetadata,\n      providedIn: meta.providedIn,\n      useValue: meta.useValue,\n      useClass: meta.useClass,\n      useExisting: meta.useExisting,\n      useFactory: meta.useFactory,\n      deps: meta.deps,\n    };\n  }\n\n  private _getTypeMetadata(type: Type, dependencies: any[]|null = null, throwOnUnknownDeps = true):\n      cpl.CompileTypeMetadata {\n    const identifier = this._getIdentifierMetadata(type);\n    return {\n      reference: identifier.reference,\n      diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),\n      lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),\n    };\n  }\n\n  private _getFactoryMetadata(factory: Function, dependencies: any[]|null = null):\n      cpl.CompileFactoryMetadata {\n    factory = resolveForwardRef(factory);\n    return {reference: factory, diDeps: this._getDependenciesMetadata(factory, dependencies)};\n  }\n\n  /**\n   * Gets the metadata for the given pipe.\n   * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n   */\n  getPipeMetadata(pipeType: any): cpl.CompilePipeMetadata|null {\n    const pipeMeta = this._pipeCache.get(pipeType);\n    if (!pipeMeta) {\n      this._reportError(\n          syntaxError(\n              `Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe ${stringifyType(pipeType)}.`),\n          pipeType);\n    }\n    return pipeMeta || null;\n  }\n\n  getPipeSummary(pipeType: any): cpl.CompilePipeSummary {\n    const pipeSummary =\n        <cpl.CompilePipeSummary>this._loadSummary(pipeType, cpl.CompileSummaryKind.Pipe);\n    if (!pipeSummary) {\n      this._reportError(\n          syntaxError(\n              `Illegal state: Could not load the summary for pipe ${stringifyType(pipeType)}.`),\n          pipeType);\n    }\n    return pipeSummary;\n  }\n\n  getOrLoadPipeMetadata(pipeType: any): cpl.CompilePipeMetadata {\n    let pipeMeta = this._pipeCache.get(pipeType);\n    if (!pipeMeta) {\n      pipeMeta = this._loadPipeMetadata(pipeType);\n    }\n    return pipeMeta;\n  }\n\n  private _loadPipeMetadata(pipeType: any): cpl.CompilePipeMetadata {\n    pipeType = resolveForwardRef(pipeType);\n    const pipeAnnotation = this._pipeResolver.resolve(pipeType) !;\n\n    const pipeMeta = new cpl.CompilePipeMetadata({\n      type: this._getTypeMetadata(pipeType),\n      name: pipeAnnotation.name,\n      pure: !!pipeAnnotation.pure\n    });\n    this._pipeCache.set(pipeType, pipeMeta);\n    this._summaryCache.set(pipeType, pipeMeta.toSummary());\n    return pipeMeta;\n  }\n\n  private _getDependenciesMetadata(\n      typeOrFunc: Type|Function, dependencies: any[]|null,\n      throwOnUnknownDeps = true): cpl.CompileDiDependencyMetadata[] {\n    let hasUnknownDeps = false;\n    const params = dependencies || this._reflector.parameters(typeOrFunc) || [];\n\n    const dependenciesMetadata: cpl.CompileDiDependencyMetadata[] = params.map((param) => {\n      let isAttribute = false;\n      let isHost = false;\n      let isSelf = false;\n      let isSkipSelf = false;\n      let isOptional = false;\n      let token: any = null;\n      if (Array.isArray(param)) {\n        param.forEach((paramEntry: any) => {\n          if (createHost.isTypeOf(paramEntry)) {\n            isHost = true;\n          } else if (createSelf.isTypeOf(paramEntry)) {\n            isSelf = true;\n          } else if (createSkipSelf.isTypeOf(paramEntry)) {\n            isSkipSelf = true;\n          } else if (createOptional.isTypeOf(paramEntry)) {\n            isOptional = true;\n          } else if (createAttribute.isTypeOf(paramEntry)) {\n            isAttribute = true;\n            token = (paramEntry as any).attributeName;\n          } else if (createInject.isTypeOf(paramEntry)) {\n            token = (paramEntry as any).token;\n          } else if (\n              createInjectionToken.isTypeOf(paramEntry) ||\n              (paramEntry as any) instanceof StaticSymbol) {\n            token = paramEntry;\n          } else if (isValidType(paramEntry) && token == null) {\n            token = paramEntry;\n          }\n        });\n      } else {\n        token = param;\n      }\n      if (token == null) {\n        hasUnknownDeps = true;\n        return {};\n      }\n\n      return {\n        isAttribute,\n        isHost,\n        isSelf,\n        isSkipSelf,\n        isOptional,\n        token: this._getTokenMetadata(token)\n      };\n\n    });\n\n    if (hasUnknownDeps) {\n      const depsTokens =\n          dependenciesMetadata.map((dep) => dep.token ? stringifyType(dep.token) : '?').join(', ');\n      const message =\n          `Can't resolve all parameters for ${stringifyType(typeOrFunc)}: (${depsTokens}).`;\n      if (throwOnUnknownDeps || this._config.strictInjectionParameters) {\n        this._reportError(syntaxError(message), typeOrFunc);\n      } else {\n        this._console.warn(`Warning: ${message} This will become an error in Angular v6.x`);\n      }\n    }\n\n    return dependenciesMetadata;\n  }\n\n  private _getTokenMetadata(token: any): cpl.CompileTokenMetadata {\n    token = resolveForwardRef(token);\n    let compileToken: cpl.CompileTokenMetadata;\n    if (typeof token === 'string') {\n      compileToken = {value: token};\n    } else {\n      compileToken = {identifier: {reference: token}};\n    }\n    return compileToken;\n  }\n\n  private _getProvidersMetadata(\n      providers: Provider[], targetEntryComponents: cpl.CompileEntryComponentMetadata[],\n      debugInfo?: string, compileProviders: cpl.CompileProviderMetadata[] = [],\n      type?: any): cpl.CompileProviderMetadata[] {\n    providers.forEach((provider: any, providerIdx: number) => {\n      if (Array.isArray(provider)) {\n        this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);\n      } else {\n        provider = resolveForwardRef(provider);\n        let providerMeta: cpl.ProviderMeta = undefined !;\n        if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {\n          this._validateProvider(provider);\n          providerMeta = new cpl.ProviderMeta(provider.provide, provider);\n        } else if (isValidType(provider)) {\n          providerMeta = new cpl.ProviderMeta(provider, {useClass: provider});\n        } else if (provider === void 0) {\n          this._reportError(syntaxError(\n              `Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files.`));\n          return;\n        } else {\n          const providersInfo =\n              (<string[]>providers.reduce(\n                   (soFar: string[], seenProvider: any, seenProviderIdx: number) => {\n                     if (seenProviderIdx < providerIdx) {\n                       soFar.push(`${stringifyType(seenProvider)}`);\n                     } else if (seenProviderIdx == providerIdx) {\n                       soFar.push(`?${stringifyType(seenProvider)}?`);\n                     } else if (seenProviderIdx == providerIdx + 1) {\n                       soFar.push('...');\n                     }\n                     return soFar;\n                   },\n                   []))\n                  .join(', ');\n          this._reportError(\n              syntaxError(\n                  `Invalid ${debugInfo ? debugInfo : 'provider'} - only instances of Provider and Type are allowed, got: [${providersInfo}]`),\n              type);\n          return;\n        }\n        if (providerMeta.token ===\n            this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {\n          targetEntryComponents.push(...this._getEntryComponentsFromProvider(providerMeta, type));\n        } else {\n          compileProviders.push(this.getProviderMetadata(providerMeta));\n        }\n      }\n    });\n    return compileProviders;\n  }\n\n  private _validateProvider(provider: any): void {\n    if (provider.hasOwnProperty('useClass') && provider.useClass == null) {\n      this._reportError(syntaxError(\n          `Invalid provider for ${stringifyType(provider.provide)}. useClass cannot be ${provider.useClass}.\n           Usually it happens when:\n           1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n           2. Class was used before it was declared. Use forwardRef in this case.`));\n    }\n  }\n\n  private _getEntryComponentsFromProvider(provider: cpl.ProviderMeta, type?: any):\n      cpl.CompileEntryComponentMetadata[] {\n    const components: cpl.CompileEntryComponentMetadata[] = [];\n    const collectedIdentifiers: cpl.CompileIdentifierMetadata[] = [];\n\n    if (provider.useFactory || provider.useExisting || provider.useClass) {\n      this._reportError(\n          syntaxError(`The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!`), type);\n      return [];\n    }\n\n    if (!provider.multi) {\n      this._reportError(\n          syntaxError(`The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!`),\n          type);\n      return [];\n    }\n\n    extractIdentifiers(provider.useValue, collectedIdentifiers);\n    collectedIdentifiers.forEach((identifier) => {\n      const entry = this._getEntryComponentMetadata(identifier.reference, false);\n      if (entry) {\n        components.push(entry);\n      }\n    });\n    return components;\n  }\n\n  private _getEntryComponentMetadata(dirType: any, throwIfNotFound = true):\n      cpl.CompileEntryComponentMetadata|null {\n    const dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);\n    if (dirMeta && dirMeta.metadata.isComponent) {\n      return {componentType: dirType, componentFactory: dirMeta.metadata.componentFactory !};\n    }\n    const dirSummary =\n        <cpl.CompileDirectiveSummary>this._loadSummary(dirType, cpl.CompileSummaryKind.Directive);\n    if (dirSummary && dirSummary.isComponent) {\n      return {componentType: dirType, componentFactory: dirSummary.componentFactory !};\n    }\n    if (throwIfNotFound) {\n      throw syntaxError(`${dirType.name} cannot be used as an entry component.`);\n    }\n    return null;\n  }\n\n  private _getInjectableTypeMetadata(type: Type, dependencies: any[]|null = null):\n      cpl.CompileTypeMetadata {\n    const typeSummary = this._loadSummary(type, cpl.CompileSummaryKind.Injectable);\n    if (typeSummary) {\n      return typeSummary.type;\n    }\n    return this._getTypeMetadata(type, dependencies);\n  }\n\n  getProviderMetadata(provider: cpl.ProviderMeta): cpl.CompileProviderMetadata {\n    let compileDeps: cpl.CompileDiDependencyMetadata[] = undefined !;\n    let compileTypeMetadata: cpl.CompileTypeMetadata = null !;\n    let compileFactoryMetadata: cpl.CompileFactoryMetadata = null !;\n    let token: cpl.CompileTokenMetadata = this._getTokenMetadata(provider.token);\n\n    if (provider.useClass) {\n      compileTypeMetadata =\n          this._getInjectableTypeMetadata(provider.useClass, provider.dependencies);\n      compileDeps = compileTypeMetadata.diDeps;\n      if (provider.token === provider.useClass) {\n        // use the compileTypeMetadata as it contains information about lifecycleHooks...\n        token = {identifier: compileTypeMetadata};\n      }\n    } else if (provider.useFactory) {\n      compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);\n      compileDeps = compileFactoryMetadata.diDeps;\n    }\n\n    return {\n      token: token,\n      useClass: compileTypeMetadata,\n      useValue: provider.useValue,\n      useFactory: compileFactoryMetadata,\n      useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,\n      deps: compileDeps,\n      multi: provider.multi\n    };\n  }\n\n  private _getQueriesMetadata(\n      queries: {[key: string]: Query}, isViewQuery: boolean,\n      directiveType: Type): cpl.CompileQueryMetadata[] {\n    const res: cpl.CompileQueryMetadata[] = [];\n\n    Object.keys(queries).forEach((propertyName: string) => {\n      const query = queries[propertyName];\n      if (query.isViewQuery === isViewQuery) {\n        res.push(this._getQueryMetadata(query, propertyName, directiveType));\n      }\n    });\n\n    return res;\n  }\n\n  private _queryVarBindings(selector: any): string[] { return selector.split(/\\s*,\\s*/); }\n\n  private _getQueryMetadata(q: Query, propertyName: string, typeOrFunc: Type|Function):\n      cpl.CompileQueryMetadata {\n    let selectors: cpl.CompileTokenMetadata[];\n    if (typeof q.selector === 'string') {\n      selectors =\n          this._queryVarBindings(q.selector).map(varName => this._getTokenMetadata(varName));\n    } else {\n      if (!q.selector) {\n        this._reportError(\n            syntaxError(\n                `Can't construct a query for the property \"${propertyName}\" of \"${stringifyType(typeOrFunc)}\" since the query selector wasn't defined.`),\n            typeOrFunc);\n        selectors = [];\n      } else {\n        selectors = [this._getTokenMetadata(q.selector)];\n      }\n    }\n\n    return {\n      selectors,\n      first: q.first,\n      descendants: q.descendants, propertyName,\n      read: q.read ? this._getTokenMetadata(q.read) : null !,\n      static: q.static\n    };\n  }\n\n  private _reportError(error: any, type?: any, otherType?: any) {\n    if (this._errorCollector) {\n      this._errorCollector(error, type);\n      if (otherType) {\n        this._errorCollector(error, otherType);\n      }\n    } else {\n      throw error;\n    }\n  }\n}\n\nfunction flattenArray(tree: any[], out: Array<any> = []): Array<any> {\n  if (tree) {\n    for (let i = 0; i < tree.length; i++) {\n      const item = resolveForwardRef(tree[i]);\n      if (Array.isArray(item)) {\n        flattenArray(item, out);\n      } else {\n        out.push(item);\n      }\n    }\n  }\n  return out;\n}\n\nfunction dedupeArray(array: any[]): Array<any> {\n  if (array) {\n    return Array.from(new Set(array));\n  }\n  return [];\n}\n\nfunction flattenAndDedupeArray(tree: any[]): Array<any> {\n  return dedupeArray(flattenArray(tree));\n}\n\nfunction isValidType(value: any): boolean {\n  return (value instanceof StaticSymbol) || (value instanceof Type);\n}\n\nfunction extractIdentifiers(value: any, targetIdentifiers: cpl.CompileIdentifierMetadata[]) {\n  visitValue(value, new _CompileValueConverter(), targetIdentifiers);\n}\n\nclass _CompileValueConverter extends ValueTransformer {\n  visitOther(value: any, targetIdentifiers: cpl.CompileIdentifierMetadata[]): any {\n    targetIdentifiers.push({reference: value});\n  }\n}\n\nfunction stringifyType(type: any): string {\n  if (type instanceof StaticSymbol) {\n    return `${type.name} in ${type.filePath}`;\n  } else {\n    return stringify(type);\n  }\n}\n\n/**\n * Indicates that a component is still being loaded in a synchronous compile.\n */\nfunction componentStillLoadingError(compType: Type) {\n  const error =\n      Error(`Can't compile synchronously as ${stringify(compType)} is still being loaded!`);\n  (error as any)[ERROR_COMPONENT_TYPE] = compType;\n  return error;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDiDependencyMetadata, CompileEntryComponentMetadata, CompileProviderMetadata, CompileTokenMetadata} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {DepFlags, NodeFlags} from '../core';\nimport {Identifiers, createTokenForExternalReference} from '../identifiers';\nimport {LifecycleHooks} from '../lifecycle_reflector';\nimport * as o from '../output/output_ast';\nimport {convertValueToOutputAst} from '../output/value_util';\nimport {ProviderAst, ProviderAstType} from '../template_parser/template_ast';\nimport {OutputContext} from '../util';\n\nexport function providerDef(ctx: OutputContext, providerAst: ProviderAst): {\n  providerExpr: o.Expression,\n  flags: NodeFlags,\n  depsExpr: o.Expression,\n  tokenExpr: o.Expression\n} {\n  let flags = NodeFlags.None;\n  if (!providerAst.eager) {\n    flags |= NodeFlags.LazyProvider;\n  }\n  if (providerAst.providerType === ProviderAstType.PrivateService) {\n    flags |= NodeFlags.PrivateProvider;\n  }\n  if (providerAst.isModule) {\n    flags |= NodeFlags.TypeModuleProvider;\n  }\n  providerAst.lifecycleHooks.forEach((lifecycleHook) => {\n    // for regular providers, we only support ngOnDestroy\n    if (lifecycleHook === LifecycleHooks.OnDestroy ||\n        providerAst.providerType === ProviderAstType.Directive ||\n        providerAst.providerType === ProviderAstType.Component) {\n      flags |= lifecycleHookToNodeFlag(lifecycleHook);\n    }\n  });\n  const {providerExpr, flags: providerFlags, depsExpr} = providerAst.multiProvider ?\n      multiProviderDef(ctx, flags, providerAst.providers) :\n      singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]);\n  return {\n    providerExpr,\n    flags: providerFlags, depsExpr,\n    tokenExpr: tokenExpr(ctx, providerAst.token),\n  };\n}\n\nfunction multiProviderDef(\n    ctx: OutputContext, flags: NodeFlags, providers: CompileProviderMetadata[]):\n    {providerExpr: o.Expression, flags: NodeFlags, depsExpr: o.Expression} {\n  const allDepDefs: o.Expression[] = [];\n  const allParams: o.FnParam[] = [];\n  const exprs = providers.map((provider, providerIndex) => {\n    let expr: o.Expression;\n    if (provider.useClass) {\n      const depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);\n      expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);\n    } else if (provider.useFactory) {\n      const depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);\n      expr = ctx.importExpr(provider.useFactory.reference).callFn(depExprs);\n    } else if (provider.useExisting) {\n      const depExprs = convertDeps(providerIndex, [{token: provider.useExisting}]);\n      expr = depExprs[0];\n    } else {\n      expr = convertValueToOutputAst(ctx, provider.useValue);\n    }\n    return expr;\n  });\n  const providerExpr =\n      o.fn(allParams, [new o.ReturnStatement(o.literalArr(exprs))], o.INFERRED_TYPE);\n  return {\n    providerExpr,\n    flags: flags | NodeFlags.TypeFactoryProvider,\n    depsExpr: o.literalArr(allDepDefs)\n  };\n\n  function convertDeps(providerIndex: number, deps: CompileDiDependencyMetadata[]) {\n    return deps.map((dep, depIndex) => {\n      const paramName = `p${providerIndex}_${depIndex}`;\n      allParams.push(new o.FnParam(paramName, o.DYNAMIC_TYPE));\n      allDepDefs.push(depDef(ctx, dep));\n      return o.variable(paramName);\n    });\n  }\n}\n\nfunction singleProviderDef(\n    ctx: OutputContext, flags: NodeFlags, providerType: ProviderAstType,\n    providerMeta: CompileProviderMetadata):\n    {providerExpr: o.Expression, flags: NodeFlags, depsExpr: o.Expression} {\n  let providerExpr: o.Expression;\n  let deps: CompileDiDependencyMetadata[];\n  if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {\n    providerExpr = ctx.importExpr(providerMeta.useClass !.reference);\n    flags |= NodeFlags.TypeDirective;\n    deps = providerMeta.deps || providerMeta.useClass !.diDeps;\n  } else {\n    if (providerMeta.useClass) {\n      providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n      flags |= NodeFlags.TypeClassProvider;\n      deps = providerMeta.deps || providerMeta.useClass.diDeps;\n    } else if (providerMeta.useFactory) {\n      providerExpr = ctx.importExpr(providerMeta.useFactory.reference);\n      flags |= NodeFlags.TypeFactoryProvider;\n      deps = providerMeta.deps || providerMeta.useFactory.diDeps;\n    } else if (providerMeta.useExisting) {\n      providerExpr = o.NULL_EXPR;\n      flags |= NodeFlags.TypeUseExistingProvider;\n      deps = [{token: providerMeta.useExisting}];\n    } else {\n      providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);\n      flags |= NodeFlags.TypeValueProvider;\n      deps = [];\n    }\n  }\n  const depsExpr = o.literalArr(deps.map(dep => depDef(ctx, dep)));\n  return {providerExpr, flags, depsExpr};\n}\n\nfunction tokenExpr(ctx: OutputContext, tokenMeta: CompileTokenMetadata): o.Expression {\n  return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) :\n                                o.literal(tokenMeta.value);\n}\n\nexport function depDef(ctx: OutputContext, dep: CompileDiDependencyMetadata): o.Expression {\n  // Note: the following fields have already been normalized out by provider_analyzer:\n  // - isAttribute, isHost\n  const expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, dep.token !);\n  let flags = DepFlags.None;\n  if (dep.isSkipSelf) {\n    flags |= DepFlags.SkipSelf;\n  }\n  if (dep.isOptional) {\n    flags |= DepFlags.Optional;\n  }\n  if (dep.isSelf) {\n    flags |= DepFlags.Self;\n  }\n  if (dep.isValue) {\n    flags |= DepFlags.Value;\n  }\n  return flags === DepFlags.None ? expr : o.literalArr([o.literal(flags), expr]);\n}\n\nexport function lifecycleHookToNodeFlag(lifecycleHook: LifecycleHooks): NodeFlags {\n  let nodeFlag = NodeFlags.None;\n  switch (lifecycleHook) {\n    case LifecycleHooks.AfterContentChecked:\n      nodeFlag = NodeFlags.AfterContentChecked;\n      break;\n    case LifecycleHooks.AfterContentInit:\n      nodeFlag = NodeFlags.AfterContentInit;\n      break;\n    case LifecycleHooks.AfterViewChecked:\n      nodeFlag = NodeFlags.AfterViewChecked;\n      break;\n    case LifecycleHooks.AfterViewInit:\n      nodeFlag = NodeFlags.AfterViewInit;\n      break;\n    case LifecycleHooks.DoCheck:\n      nodeFlag = NodeFlags.DoCheck;\n      break;\n    case LifecycleHooks.OnChanges:\n      nodeFlag = NodeFlags.OnChanges;\n      break;\n    case LifecycleHooks.OnDestroy:\n      nodeFlag = NodeFlags.OnDestroy;\n      break;\n    case LifecycleHooks.OnInit:\n      nodeFlag = NodeFlags.OnInit;\n      break;\n  }\n  return nodeFlag;\n}\n\nexport function componentFactoryResolverProviderDef(\n    reflector: CompileReflector, ctx: OutputContext, flags: NodeFlags,\n    entryComponents: CompileEntryComponentMetadata[]): {\n  providerExpr: o.Expression,\n  flags: NodeFlags,\n  depsExpr: o.Expression,\n  tokenExpr: o.Expression\n} {\n  const entryComponentFactories =\n      entryComponents.map((entryComponent) => ctx.importExpr(entryComponent.componentFactory));\n  const token = createTokenForExternalReference(reflector, Identifiers.ComponentFactoryResolver);\n  const classMeta = {\n    diDeps: [\n      {isValue: true, value: o.literalArr(entryComponentFactories)},\n      {token: token, isSkipSelf: true, isOptional: true},\n      {token: createTokenForExternalReference(reflector, Identifiers.NgModuleRef)},\n    ],\n    lifecycleHooks: [],\n    reference: reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)\n  };\n  const {providerExpr, flags: providerFlags, depsExpr} =\n      singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {\n        token,\n        multi: false,\n        useClass: classMeta,\n      });\n  return {providerExpr, flags: providerFlags, depsExpr, tokenExpr: tokenExpr(ctx, token)};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileNgModuleMetadata, CompileProviderMetadata, identifierName} from './compile_metadata';\nimport {CompileReflector} from './compile_reflector';\nimport {NodeFlags} from './core';\nimport {Identifiers} from './identifiers';\nimport * as o from './output/output_ast';\nimport {typeSourceSpan} from './parse_util';\nimport {NgModuleProviderAnalyzer} from './provider_analyzer';\nimport {OutputContext} from './util';\nimport {componentFactoryResolverProviderDef, depDef, providerDef} from './view_compiler/provider_compiler';\n\nexport class NgModuleCompileResult {\n  constructor(public ngModuleFactoryVar: string) {}\n}\n\nconst LOG_VAR = o.variable('_l');\n\nexport class NgModuleCompiler {\n  constructor(private reflector: CompileReflector) {}\n  compile(\n      ctx: OutputContext, ngModuleMeta: CompileNgModuleMetadata,\n      extraProviders: CompileProviderMetadata[]): NgModuleCompileResult {\n    const sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);\n    const entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;\n    const bootstrapComponents = ngModuleMeta.bootstrapComponents;\n    const providerParser =\n        new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);\n    const providerDefs =\n        [componentFactoryResolverProviderDef(\n             this.reflector, ctx, NodeFlags.None, entryComponentFactories)]\n            .concat(providerParser.parse().map((provider) => providerDef(ctx, provider)))\n            .map(({providerExpr, depsExpr, flags, tokenExpr}) => {\n              return o.importExpr(Identifiers.moduleProviderDef).callFn([\n                o.literal(flags), tokenExpr, providerExpr, depsExpr\n              ]);\n            });\n\n    const ngModuleDef = o.importExpr(Identifiers.moduleDef).callFn([o.literalArr(providerDefs)]);\n    const ngModuleDefFactory = o.fn(\n        [new o.FnParam(LOG_VAR.name !)], [new o.ReturnStatement(ngModuleDef)], o.INFERRED_TYPE);\n\n    const ngModuleFactoryVar = `${identifierName(ngModuleMeta.type)}NgFactory`;\n    this._createNgModuleFactory(\n        ctx, ngModuleMeta.type.reference, o.importExpr(Identifiers.createModuleFactory).callFn([\n          ctx.importExpr(ngModuleMeta.type.reference),\n          o.literalArr(bootstrapComponents.map(id => ctx.importExpr(id.reference))),\n          ngModuleDefFactory\n        ]));\n\n    if (ngModuleMeta.id) {\n      const id = typeof ngModuleMeta.id === 'string' ? o.literal(ngModuleMeta.id) :\n                                                       ctx.importExpr(ngModuleMeta.id);\n      const registerFactoryStmt = o.importExpr(Identifiers.RegisterModuleFactoryFn)\n                                      .callFn([id, o.variable(ngModuleFactoryVar)])\n                                      .toStmt();\n      ctx.statements.push(registerFactoryStmt);\n    }\n\n    return new NgModuleCompileResult(ngModuleFactoryVar);\n  }\n\n  createStub(ctx: OutputContext, ngModuleReference: any) {\n    this._createNgModuleFactory(ctx, ngModuleReference, o.NULL_EXPR);\n  }\n\n  private _createNgModuleFactory(ctx: OutputContext, reference: any, value: o.Expression) {\n    const ngModuleFactoryVar = `${identifierName({reference: reference})}NgFactory`;\n    const ngModuleFactoryStmt =\n        o.variable(ngModuleFactoryVar)\n            .set(value)\n            .toDeclStmt(\n                o.importType(\n                    Identifiers.NgModuleFactory, [o.expressionType(ctx.importExpr(reference)) !],\n                    [o.TypeModifier.Const]),\n                [o.StmtModifier.Final, o.StmtModifier.Exported]);\n\n    ctx.statements.push(ngModuleFactoryStmt);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector} from './compile_reflector';\nimport {NgModule, Type, createNgModule} from './core';\nimport {findLast} from './directive_resolver';\nimport {stringify} from './util';\n\n\n/**\n * Resolves types to {@link NgModule}.\n */\nexport class NgModuleResolver {\n  constructor(private _reflector: CompileReflector) {}\n\n  isNgModule(type: any) { return this._reflector.annotations(type).some(createNgModule.isTypeOf); }\n\n  resolve(type: Type, throwIfNotFound = true): NgModule|null {\n    const ngModuleMeta: NgModule =\n        findLast(this._reflector.annotations(type), createNgModule.isTypeOf);\n\n    if (ngModuleMeta) {\n      return ngModuleMeta;\n    } else {\n      if (throwIfNotFound) {\n        throw new Error(`No NgModule metadata found for '${stringify(type)}'.`);\n      }\n      return null;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {StaticSymbol} from '../aot/static_symbol';\nimport {CompileIdentifierMetadata} from '../compile_metadata';\n\nimport {AbstractEmitterVisitor, CATCH_ERROR_VAR, CATCH_STACK_VAR, EmitterVisitorContext, OutputEmitter} from './abstract_emitter';\nimport * as o from './output_ast';\n\nconst _debugFilePath = '/debug/lib';\n\nexport function debugOutputAstAsTypeScript(ast: o.Statement | o.Expression | o.Type | any[]):\n    string {\n  const converter = new _TsEmitterVisitor();\n  const ctx = EmitterVisitorContext.createRoot();\n  const asts: any[] = Array.isArray(ast) ? ast : [ast];\n\n  asts.forEach((ast) => {\n    if (ast instanceof o.Statement) {\n      ast.visitStatement(converter, ctx);\n    } else if (ast instanceof o.Expression) {\n      ast.visitExpression(converter, ctx);\n    } else if (ast instanceof o.Type) {\n      ast.visitType(converter, ctx);\n    } else {\n      throw new Error(`Don't know how to print debug info for ${ast}`);\n    }\n  });\n  return ctx.toSource();\n}\n\nexport type ReferenceFilter = (reference: o.ExternalReference) => boolean;\n\nexport class TypeScriptEmitter implements OutputEmitter {\n  emitStatementsAndContext(\n      genFilePath: string, stmts: o.Statement[], preamble: string = '',\n      emitSourceMaps: boolean = true, referenceFilter?: ReferenceFilter,\n      importFilter?: ReferenceFilter): {sourceText: string, context: EmitterVisitorContext} {\n    const converter = new _TsEmitterVisitor(referenceFilter, importFilter);\n\n    const ctx = EmitterVisitorContext.createRoot();\n\n    converter.visitAllStatements(stmts, ctx);\n\n    const preambleLines = preamble ? preamble.split('\\n') : [];\n    converter.reexports.forEach((reexports, exportedModuleName) => {\n      const reexportsCode =\n          reexports.map(reexport => `${reexport.name} as ${reexport.as}`).join(',');\n      preambleLines.push(`export {${reexportsCode}} from '${exportedModuleName}';`);\n    });\n\n    converter.importsWithPrefixes.forEach((prefix, importedModuleName) => {\n      // Note: can't write the real word for import as it screws up system.js auto detection...\n      preambleLines.push(\n          `imp` +\n          `ort * as ${prefix} from '${importedModuleName}';`);\n    });\n\n    const sm = emitSourceMaps ?\n        ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :\n        '';\n    const lines = [...preambleLines, ctx.toSource(), sm];\n    if (sm) {\n      // always add a newline at the end, as some tools have bugs without it.\n      lines.push('');\n    }\n    ctx.setPreambleLineCount(preambleLines.length);\n    return {sourceText: lines.join('\\n'), context: ctx};\n  }\n\n  emitStatements(genFilePath: string, stmts: o.Statement[], preamble: string = '') {\n    return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;\n  }\n}\n\n\nclass _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor {\n  private typeExpression = 0;\n\n  constructor(private referenceFilter?: ReferenceFilter, private importFilter?: ReferenceFilter) {\n    super(false);\n  }\n\n  importsWithPrefixes = new Map<string, string>();\n  reexports = new Map<string, {name: string, as: string}[]>();\n\n  visitType(t: o.Type|null, ctx: EmitterVisitorContext, defaultType: string = 'any') {\n    if (t) {\n      this.typeExpression++;\n      t.visitType(this, ctx);\n      this.typeExpression--;\n    } else {\n      ctx.print(null, defaultType);\n    }\n  }\n\n  visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any {\n    const value = ast.value;\n    if (value == null && ast.type != o.INFERRED_TYPE) {\n      ctx.print(ast, `(${value} as any)`);\n      return null;\n    }\n    return super.visitLiteralExpr(ast, ctx);\n  }\n\n\n  // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.\n  // In SNC mode, [] have the type never[], so we cast here to any[].\n  // TODO: narrow the cast to a more explicit type, or use a pattern that does not\n  // start with [].concat. see https://github.com/angular/angular/pull/11846\n  visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any {\n    if (ast.entries.length === 0) {\n      ctx.print(ast, '(');\n    }\n    const result = super.visitLiteralArrayExpr(ast, ctx);\n    if (ast.entries.length === 0) {\n      ctx.print(ast, ' as any[])');\n    }\n    return result;\n  }\n\n  visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any {\n    this._visitIdentifier(ast.value, ast.typeParams, ctx);\n    return null;\n  }\n\n  visitAssertNotNullExpr(ast: o.AssertNotNull, ctx: EmitterVisitorContext): any {\n    const result = super.visitAssertNotNullExpr(ast, ctx);\n    ctx.print(ast, '!');\n    return result;\n  }\n\n  visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.hasModifier(o.StmtModifier.Exported) && stmt.value instanceof o.ExternalExpr &&\n        !stmt.type) {\n      // check for a reexport\n      const {name, moduleName} = stmt.value.value;\n      if (moduleName) {\n        let reexports = this.reexports.get(moduleName);\n        if (!reexports) {\n          reexports = [];\n          this.reexports.set(moduleName, reexports);\n        }\n        reexports.push({name: name !, as: stmt.name});\n        return null;\n      }\n    }\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.print(stmt, `export `);\n    }\n    if (stmt.hasModifier(o.StmtModifier.Final)) {\n      ctx.print(stmt, `const`);\n    } else {\n      ctx.print(stmt, `var`);\n    }\n    ctx.print(stmt, ` ${stmt.name}`);\n    this._printColonType(stmt.type, ctx);\n    if (stmt.value) {\n      ctx.print(stmt, ` = `);\n      stmt.value.visitExpression(this, ctx);\n    }\n    ctx.println(stmt, `;`);\n    return null;\n  }\n\n  visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): never {\n    throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');\n  }\n\n  visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `(<`);\n    ast.type !.visitType(this, ctx);\n    ctx.print(ast, `>`);\n    ast.value.visitExpression(this, ctx);\n    ctx.print(ast, `)`);\n    return null;\n  }\n\n  visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any {\n    ctx.print(ast, `new `);\n    this.typeExpression++;\n    ast.classExpr.visitExpression(this, ctx);\n    this.typeExpression--;\n    ctx.print(ast, `(`);\n    this.visitAllExpressions(ast.args, ctx, ',');\n    ctx.print(ast, `)`);\n    return null;\n  }\n\n  visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any {\n    ctx.pushClass(stmt);\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.print(stmt, `export `);\n    }\n    ctx.print(stmt, `class ${stmt.name}`);\n    if (stmt.parent != null) {\n      ctx.print(stmt, ` extends `);\n      this.typeExpression++;\n      stmt.parent.visitExpression(this, ctx);\n      this.typeExpression--;\n    }\n    ctx.println(stmt, ` {`);\n    ctx.incIndent();\n    stmt.fields.forEach((field) => this._visitClassField(field, ctx));\n    if (stmt.constructorMethod != null) {\n      this._visitClassConstructor(stmt, ctx);\n    }\n    stmt.getters.forEach((getter) => this._visitClassGetter(getter, ctx));\n    stmt.methods.forEach((method) => this._visitClassMethod(method, ctx));\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n    ctx.popClass();\n    return null;\n  }\n\n  private _visitClassField(field: o.ClassField, ctx: EmitterVisitorContext) {\n    if (field.hasModifier(o.StmtModifier.Private)) {\n      // comment out as a workaround for #10967\n      ctx.print(null, `/*private*/ `);\n    }\n    if (field.hasModifier(o.StmtModifier.Static)) {\n      ctx.print(null, 'static ');\n    }\n    ctx.print(null, field.name);\n    this._printColonType(field.type, ctx);\n    if (field.initializer) {\n      ctx.print(null, ' = ');\n      field.initializer.visitExpression(this, ctx);\n    }\n    ctx.println(null, `;`);\n  }\n\n  private _visitClassGetter(getter: o.ClassGetter, ctx: EmitterVisitorContext) {\n    if (getter.hasModifier(o.StmtModifier.Private)) {\n      ctx.print(null, `private `);\n    }\n    ctx.print(null, `get ${getter.name}()`);\n    this._printColonType(getter.type, ctx);\n    ctx.println(null, ` {`);\n    ctx.incIndent();\n    this.visitAllStatements(getter.body, ctx);\n    ctx.decIndent();\n    ctx.println(null, `}`);\n  }\n\n  private _visitClassConstructor(stmt: o.ClassStmt, ctx: EmitterVisitorContext) {\n    ctx.print(stmt, `constructor(`);\n    this._visitParams(stmt.constructorMethod.params, ctx);\n    ctx.println(stmt, `) {`);\n    ctx.incIndent();\n    this.visitAllStatements(stmt.constructorMethod.body, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n  }\n\n  private _visitClassMethod(method: o.ClassMethod, ctx: EmitterVisitorContext) {\n    if (method.hasModifier(o.StmtModifier.Private)) {\n      ctx.print(null, `private `);\n    }\n    ctx.print(null, `${method.name}(`);\n    this._visitParams(method.params, ctx);\n    ctx.print(null, `)`);\n    this._printColonType(method.type, ctx, 'void');\n    ctx.println(null, ` {`);\n    ctx.incIndent();\n    this.visitAllStatements(method.body, ctx);\n    ctx.decIndent();\n    ctx.println(null, `}`);\n  }\n\n  visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any {\n    if (ast.name) {\n      ctx.print(ast, 'function ');\n      ctx.print(ast, ast.name);\n    }\n    ctx.print(ast, `(`);\n    this._visitParams(ast.params, ctx);\n    ctx.print(ast, `)`);\n    this._printColonType(ast.type, ctx, 'void');\n    if (!ast.name) {\n      ctx.print(ast, ` => `);\n    }\n    ctx.println(ast, '{');\n    ctx.incIndent();\n    this.visitAllStatements(ast.statements, ctx);\n    ctx.decIndent();\n    ctx.print(ast, `}`);\n\n    return null;\n  }\n\n  visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any {\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.print(stmt, `export `);\n    }\n    ctx.print(stmt, `function ${stmt.name}(`);\n    this._visitParams(stmt.params, ctx);\n    ctx.print(stmt, `)`);\n    this._printColonType(stmt.type, ctx, 'void');\n    ctx.println(stmt, ` {`);\n    ctx.incIndent();\n    this.visitAllStatements(stmt.statements, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n    return null;\n  }\n\n  visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any {\n    ctx.println(stmt, `try {`);\n    ctx.incIndent();\n    this.visitAllStatements(stmt.bodyStmts, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `} catch (${CATCH_ERROR_VAR.name}) {`);\n    ctx.incIndent();\n    const catchStmts =\n        [<o.Statement>CATCH_STACK_VAR.set(CATCH_ERROR_VAR.prop('stack', null)).toDeclStmt(null, [\n          o.StmtModifier.Final\n        ])].concat(stmt.catchStmts);\n    this.visitAllStatements(catchStmts, ctx);\n    ctx.decIndent();\n    ctx.println(stmt, `}`);\n    return null;\n  }\n\n  visitBuiltinType(type: o.BuiltinType, ctx: EmitterVisitorContext): any {\n    let typeStr: string;\n    switch (type.name) {\n      case o.BuiltinTypeName.Bool:\n        typeStr = 'boolean';\n        break;\n      case o.BuiltinTypeName.Dynamic:\n        typeStr = 'any';\n        break;\n      case o.BuiltinTypeName.Function:\n        typeStr = 'Function';\n        break;\n      case o.BuiltinTypeName.Number:\n        typeStr = 'number';\n        break;\n      case o.BuiltinTypeName.Int:\n        typeStr = 'number';\n        break;\n      case o.BuiltinTypeName.String:\n        typeStr = 'string';\n        break;\n      case o.BuiltinTypeName.None:\n        typeStr = 'never';\n        break;\n      default:\n        throw new Error(`Unsupported builtin type ${type.name}`);\n    }\n    ctx.print(null, typeStr);\n    return null;\n  }\n\n  visitExpressionType(ast: o.ExpressionType, ctx: EmitterVisitorContext): any {\n    ast.value.visitExpression(this, ctx);\n    if (ast.typeParams !== null) {\n      ctx.print(null, '<');\n      this.visitAllObjects(type => this.visitType(type, ctx), ast.typeParams, ctx, ',');\n      ctx.print(null, '>');\n    }\n    return null;\n  }\n\n  visitArrayType(type: o.ArrayType, ctx: EmitterVisitorContext): any {\n    this.visitType(type.of, ctx);\n    ctx.print(null, `[]`);\n    return null;\n  }\n\n  visitMapType(type: o.MapType, ctx: EmitterVisitorContext): any {\n    ctx.print(null, `{[key: string]:`);\n    this.visitType(type.valueType, ctx);\n    ctx.print(null, `}`);\n    return null;\n  }\n\n  getBuiltinMethodName(method: o.BuiltinMethod): string {\n    let name: string;\n    switch (method) {\n      case o.BuiltinMethod.ConcatArray:\n        name = 'concat';\n        break;\n      case o.BuiltinMethod.SubscribeObservable:\n        name = 'subscribe';\n        break;\n      case o.BuiltinMethod.Bind:\n        name = 'bind';\n        break;\n      default:\n        throw new Error(`Unknown builtin method: ${method}`);\n    }\n    return name;\n  }\n\n  private _visitParams(params: o.FnParam[], ctx: EmitterVisitorContext): void {\n    this.visitAllObjects(param => {\n      ctx.print(null, param.name);\n      this._printColonType(param.type, ctx);\n    }, params, ctx, ',');\n  }\n\n  private _visitIdentifier(\n      value: o.ExternalReference, typeParams: o.Type[]|null, ctx: EmitterVisitorContext): void {\n    const {name, moduleName} = value;\n    if (this.referenceFilter && this.referenceFilter(value)) {\n      ctx.print(null, '(null as any)');\n      return;\n    }\n    if (moduleName && (!this.importFilter || !this.importFilter(value))) {\n      let prefix = this.importsWithPrefixes.get(moduleName);\n      if (prefix == null) {\n        prefix = `i${this.importsWithPrefixes.size}`;\n        this.importsWithPrefixes.set(moduleName, prefix);\n      }\n      ctx.print(null, `${prefix}.`);\n    }\n    ctx.print(null, name !);\n\n    if (this.typeExpression > 0) {\n      // If we are in a type expression that refers to a generic type then supply\n      // the required type parameters. If there were not enough type parameters\n      // supplied, supply any as the type. Outside a type expression the reference\n      // should not supply type parameters and be treated as a simple value reference\n      // to the constructor function itself.\n      const suppliedParameters = typeParams || [];\n      if (suppliedParameters.length > 0) {\n        ctx.print(null, `<`);\n        this.visitAllObjects(type => type.visitType(this, ctx), typeParams !, ctx, ',');\n        ctx.print(null, `>`);\n      }\n    }\n  }\n\n  private _printColonType(type: o.Type|null, ctx: EmitterVisitorContext, defaultType?: string) {\n    if (type !== o.INFERRED_TYPE) {\n      ctx.print(null, ':');\n      this.visitType(type, ctx, defaultType);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector} from './compile_reflector';\nimport {Pipe, Type, createPipe} from './core';\nimport {findLast} from './directive_resolver';\nimport {resolveForwardRef, stringify} from './util';\n\n/**\n * Resolve a `Type` for {@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\nexport class PipeResolver {\n  constructor(private _reflector: CompileReflector) {}\n\n  isPipe(type: Type) {\n    const typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n    return typeMetadata && typeMetadata.some(createPipe.isTypeOf);\n  }\n\n  /**\n   * Return {@link Pipe} for a given `Type`.\n   */\n  resolve(type: Type, throwIfNotFound = true): Pipe|null {\n    const metas = this._reflector.annotations(resolveForwardRef(type));\n    if (metas) {\n      const annotation = findLast(metas, createPipe.isTypeOf);\n      if (annotation) {\n        return annotation;\n      }\n    }\n    if (throwIfNotFound) {\n      throw new Error(`No Pipe decorator found on ${stringify(type)}`);\n    }\n    return null;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AotCompilerOptions} from '../aot/compiler_options';\nimport {StaticReflector} from '../aot/static_reflector';\nimport {StaticSymbol} from '../aot/static_symbol';\nimport {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompilePipeSummary} from '../compile_metadata';\nimport {BindingForm, BuiltinConverter, EventHandlerVars, LocalResolver, convertActionBinding, convertPropertyBinding, convertPropertyBindingBuiltins} from '../compiler_util/expression_converter';\nimport {AST, ASTWithSource, Interpolation} from '../expression_parser/ast';\nimport {Identifiers} from '../identifiers';\nimport * as o from '../output/output_ast';\nimport {convertValueToOutputAst} from '../output/value_util';\nimport {ParseSourceSpan} from '../parse_util';\nimport {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAst, ProviderAstType, QueryMatch, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast';\nimport {OutputContext} from '../util';\n\n\n/**\n * Generates code that is used to type check templates.\n */\nexport class TypeCheckCompiler {\n  constructor(private options: AotCompilerOptions, private reflector: StaticReflector) {}\n\n  /**\n   * Important notes:\n   * - This must not produce new `import` statements, but only refer to types outside\n   *   of the file via the variables provided via externalReferenceVars.\n   *   This allows Typescript to reuse the old program's structure as no imports have changed.\n   * - This must not produce any exports, as this would pollute the .d.ts file\n   *   and also violate the point above.\n   */\n  compileComponent(\n      componentId: string, component: CompileDirectiveMetadata, template: TemplateAst[],\n      usedPipes: CompilePipeSummary[], externalReferenceVars: Map<StaticSymbol, string>,\n      ctx: OutputContext): o.Statement[] {\n    const pipes = new Map<string, StaticSymbol>();\n    usedPipes.forEach(p => pipes.set(p.name, p.type.reference));\n    let embeddedViewCount = 0;\n    const viewBuilderFactory =\n        (parent: ViewBuilder | null, guards: GuardExpression[]): ViewBuilder => {\n          const embeddedViewIndex = embeddedViewCount++;\n          return new ViewBuilder(\n              this.options, this.reflector, externalReferenceVars, parent, component.type.reference,\n              component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);\n        };\n\n    const visitor = viewBuilderFactory(null, []);\n    visitor.visitAll([], template);\n\n    return visitor.build(componentId);\n  }\n}\n\ninterface GuardExpression {\n  guard: StaticSymbol;\n  useIf: boolean;\n  expression: Expression;\n}\n\ninterface ViewBuilderFactory {\n  (parent: ViewBuilder, guards: GuardExpression[]): ViewBuilder;\n}\n\n// Note: This is used as key in Map and should therefore be\n// unique per value.\ntype OutputVarType = o.BuiltinTypeName | StaticSymbol;\n\ninterface Expression {\n  context: OutputVarType;\n  sourceSpan: ParseSourceSpan;\n  value: AST;\n}\n\nconst DYNAMIC_VAR_NAME = '_any';\n\nclass TypeCheckLocalResolver implements LocalResolver {\n  notifyImplicitReceiverUse(): void {}\n  getLocal(name: string): o.Expression|null {\n    if (name === EventHandlerVars.event.name) {\n      // References to the event should not be type-checked.\n      // TODO(chuckj): determine a better type for the event.\n      return o.variable(DYNAMIC_VAR_NAME);\n    }\n    return null;\n  }\n}\n\nconst defaultResolver = new TypeCheckLocalResolver();\n\nclass ViewBuilder implements TemplateAstVisitor, LocalResolver {\n  private refOutputVars = new Map<string, OutputVarType>();\n  private variables: VariableAst[] = [];\n  private children: ViewBuilder[] = [];\n  private updates: Expression[] = [];\n  private actions: Expression[] = [];\n\n  constructor(\n      private options: AotCompilerOptions, private reflector: StaticReflector,\n      private externalReferenceVars: Map<StaticSymbol, string>, private parent: ViewBuilder|null,\n      private component: StaticSymbol, private isHostComponent: boolean,\n      private embeddedViewIndex: number, private pipes: Map<string, StaticSymbol>,\n      private guards: GuardExpression[], private ctx: OutputContext,\n      private viewBuilderFactory: ViewBuilderFactory) {}\n\n  private getOutputVar(type: o.BuiltinTypeName|StaticSymbol): string {\n    let varName: string|undefined;\n    if (type === this.component && this.isHostComponent) {\n      varName = DYNAMIC_VAR_NAME;\n    } else if (type instanceof StaticSymbol) {\n      varName = this.externalReferenceVars.get(type);\n    } else {\n      varName = DYNAMIC_VAR_NAME;\n    }\n    if (!varName) {\n      throw new Error(\n          `Illegal State: referring to a type without a variable ${JSON.stringify(type)}`);\n    }\n    return varName;\n  }\n\n  private getTypeGuardExpressions(ast: EmbeddedTemplateAst): GuardExpression[] {\n    const result = [...this.guards];\n    for (let directive of ast.directives) {\n      for (let input of directive.inputs) {\n        const guard = directive.directive.guards[input.directiveName];\n        if (guard) {\n          const useIf = guard === 'UseIf';\n          result.push({\n            guard,\n            useIf,\n            expression: {context: this.component, value: input.value} as Expression\n          });\n        }\n      }\n    }\n    return result;\n  }\n\n  visitAll(variables: VariableAst[], astNodes: TemplateAst[]) {\n    this.variables = variables;\n    templateVisitAll(this, astNodes);\n  }\n\n  build(componentId: string, targetStatements: o.Statement[] = []): o.Statement[] {\n    this.children.forEach((child) => child.build(componentId, targetStatements));\n    let viewStmts: o.Statement[] =\n        [o.variable(DYNAMIC_VAR_NAME).set(o.NULL_EXPR).toDeclStmt(o.DYNAMIC_TYPE)];\n    let bindingCount = 0;\n    this.updates.forEach((expression) => {\n      const {sourceSpan, context, value} = this.preprocessUpdateExpression(expression);\n      const bindingId = `${bindingCount++}`;\n      const nameResolver = context === this.component ? this : defaultResolver;\n      const {stmts, currValExpr} = convertPropertyBinding(\n          nameResolver, o.variable(this.getOutputVar(context)), value, bindingId,\n          BindingForm.General);\n      stmts.push(new o.ExpressionStatement(currValExpr));\n      viewStmts.push(...stmts.map(\n          (stmt: o.Statement) => o.applySourceSpanToStatementIfNeeded(stmt, sourceSpan)));\n    });\n\n    this.actions.forEach(({sourceSpan, context, value}) => {\n      const bindingId = `${bindingCount++}`;\n      const nameResolver = context === this.component ? this : defaultResolver;\n      const {stmts} = convertActionBinding(\n          nameResolver, o.variable(this.getOutputVar(context)), value, bindingId);\n      viewStmts.push(...stmts.map(\n          (stmt: o.Statement) => o.applySourceSpanToStatementIfNeeded(stmt, sourceSpan)));\n    });\n\n    if (this.guards.length) {\n      let guardExpression: o.Expression|undefined = undefined;\n      for (const guard of this.guards) {\n        const {context, value} = this.preprocessUpdateExpression(guard.expression);\n        const bindingId = `${bindingCount++}`;\n        const nameResolver = context === this.component ? this : defaultResolver;\n        // We only support support simple expressions and ignore others as they\n        // are unlikely to affect type narrowing.\n        const {stmts, currValExpr} = convertPropertyBinding(\n            nameResolver, o.variable(this.getOutputVar(context)), value, bindingId,\n            BindingForm.TrySimple);\n        if (stmts.length == 0) {\n          const guardClause =\n              guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);\n          guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;\n        }\n      }\n      if (guardExpression) {\n        viewStmts = [new o.IfStmt(guardExpression, viewStmts)];\n      }\n    }\n\n    const viewName = `_View_${componentId}_${this.embeddedViewIndex}`;\n    const viewFactory = new o.DeclareFunctionStmt(viewName, [], viewStmts);\n    targetStatements.push(viewFactory);\n    return targetStatements;\n  }\n\n  visitBoundText(ast: BoundTextAst, context: any): any {\n    const astWithSource = <ASTWithSource>ast.value;\n    const inter = <Interpolation>astWithSource.ast;\n\n    inter.expressions.forEach(\n        (expr) =>\n            this.updates.push({context: this.component, value: expr, sourceSpan: ast.sourceSpan}));\n  }\n\n  visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any {\n    this.visitElementOrTemplate(ast);\n    // Note: The old view compiler used to use an `any` type\n    // for the context in any embedded view.\n    // We keep this behaivor behind a flag for now.\n    if (this.options.fullTemplateTypeCheck) {\n      // Find any applicable type guards. For example, NgIf has a type guard on ngIf\n      // (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only\n      // stamped out if ngIf is truthy so any bindings in the template can assume that,\n      // if a nullable type is used for ngIf, that expression is not null or undefined.\n      const guards = this.getTypeGuardExpressions(ast);\n      const childVisitor = this.viewBuilderFactory(this, guards);\n      this.children.push(childVisitor);\n      childVisitor.visitAll(ast.variables, ast.children);\n    }\n  }\n\n  visitElement(ast: ElementAst, context: any): any {\n    this.visitElementOrTemplate(ast);\n\n    let inputDefs: o.Expression[] = [];\n    let updateRendererExpressions: Expression[] = [];\n    let outputDefs: o.Expression[] = [];\n    ast.inputs.forEach((inputAst) => {\n      this.updates.push(\n          {context: this.component, value: inputAst.value, sourceSpan: inputAst.sourceSpan});\n    });\n\n    templateVisitAll(this, ast.children);\n  }\n\n  private visitElementOrTemplate(ast: {\n    outputs: BoundEventAst[],\n    directives: DirectiveAst[],\n    references: ReferenceAst[],\n  }) {\n    ast.directives.forEach((dirAst) => { this.visitDirective(dirAst); });\n\n    ast.references.forEach((ref) => {\n      let outputVarType: OutputVarType = null !;\n      // Note: The old view compiler used to use an `any` type\n      // for directives exposed via `exportAs`.\n      // We keep this behaivor behind a flag for now.\n      if (ref.value && ref.value.identifier && this.options.fullTemplateTypeCheck) {\n        outputVarType = ref.value.identifier.reference;\n      } else {\n        outputVarType = o.BuiltinTypeName.Dynamic;\n      }\n      this.refOutputVars.set(ref.name, outputVarType);\n    });\n    ast.outputs.forEach((outputAst) => {\n      this.actions.push(\n          {context: this.component, value: outputAst.handler, sourceSpan: outputAst.sourceSpan});\n    });\n  }\n\n  visitDirective(dirAst: DirectiveAst) {\n    const dirType = dirAst.directive.type.reference;\n    dirAst.inputs.forEach(\n        (input) => this.updates.push(\n            {context: this.component, value: input.value, sourceSpan: input.sourceSpan}));\n    // Note: The old view compiler used to use an `any` type\n    // for expressions in host properties / events.\n    // We keep this behaivor behind a flag for now.\n    if (this.options.fullTemplateTypeCheck) {\n      dirAst.hostProperties.forEach(\n          (inputAst) => this.updates.push(\n              {context: dirType, value: inputAst.value, sourceSpan: inputAst.sourceSpan}));\n      dirAst.hostEvents.forEach((hostEventAst) => this.actions.push({\n        context: dirType,\n        value: hostEventAst.handler,\n        sourceSpan: hostEventAst.sourceSpan\n      }));\n    }\n  }\n\n  notifyImplicitReceiverUse(): void {}\n  getLocal(name: string): o.Expression|null {\n    if (name == EventHandlerVars.event.name) {\n      return o.variable(this.getOutputVar(o.BuiltinTypeName.Dynamic));\n    }\n    for (let currBuilder: ViewBuilder|null = this; currBuilder; currBuilder = currBuilder.parent) {\n      let outputVarType: OutputVarType|undefined;\n      // check references\n      outputVarType = currBuilder.refOutputVars.get(name);\n      if (outputVarType == null) {\n        // check variables\n        const varAst = currBuilder.variables.find((varAst) => varAst.name === name);\n        if (varAst) {\n          outputVarType = o.BuiltinTypeName.Dynamic;\n        }\n      }\n      if (outputVarType != null) {\n        return o.variable(this.getOutputVar(outputVarType));\n      }\n    }\n    return null;\n  }\n\n  private pipeOutputVar(name: string): string {\n    const pipe = this.pipes.get(name);\n    if (!pipe) {\n      throw new Error(\n          `Illegal State: Could not find pipe ${name} in template of ${this.component}`);\n    }\n    return this.getOutputVar(pipe);\n  }\n\n  private preprocessUpdateExpression(expression: Expression): Expression {\n    return {\n      sourceSpan: expression.sourceSpan,\n      context: expression.context,\n      value: convertPropertyBindingBuiltins(\n          {\n            createLiteralArrayConverter: (argCount: number) => (args: o.Expression[]) => {\n              const arr = o.literalArr(args);\n              // Note: The old view compiler used to use an `any` type\n              // for arrays.\n              return this.options.fullTemplateTypeCheck ? arr : arr.cast(o.DYNAMIC_TYPE);\n            },\n            createLiteralMapConverter:\n                (keys: {key: string, quoted: boolean}[]) => (values: o.Expression[]) => {\n                  const entries = keys.map((k, i) => ({\n                                             key: k.key,\n                                             value: values[i],\n                                             quoted: k.quoted,\n                                           }));\n                  const map = o.literalMap(entries);\n                  // Note: The old view compiler used to use an `any` type\n                  // for maps.\n                  return this.options.fullTemplateTypeCheck ? map : map.cast(o.DYNAMIC_TYPE);\n                },\n            createPipeConverter: (name: string, argCount: number) => (args: o.Expression[]) => {\n              // Note: The old view compiler used to use an `any` type\n              // for pipes.\n              const pipeExpr = this.options.fullTemplateTypeCheck ?\n                  o.variable(this.pipeOutputVar(name)) :\n                  o.variable(this.getOutputVar(o.BuiltinTypeName.Dynamic));\n              return pipeExpr.callMethod('transform', args);\n            },\n          },\n          expression.value)\n    };\n  }\n\n  visitNgContent(ast: NgContentAst, context: any): any {}\n  visitText(ast: TextAst, context: any): any {}\n  visitDirectiveProperty(ast: BoundDirectivePropertyAst, context: any): any {}\n  visitReference(ast: ReferenceAst, context: any): any {}\n  visitVariable(ast: VariableAst, context: any): any {}\n  visitEvent(ast: BoundEventAst, context: any): any {}\n  visitElementProperty(ast: BoundElementPropertyAst, context: any): any {}\n  visitAttr(ast: AttrAst, context: any): any {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompilePipeSummary, CompileQueryMetadata, rendererTypeName, tokenReference, viewClassName} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {BindingForm, BuiltinConverter, EventHandlerVars, LocalResolver, convertActionBinding, convertPropertyBinding, convertPropertyBindingBuiltins} from '../compiler_util/expression_converter';\nimport {ArgumentType, BindingFlags, ChangeDetectionStrategy, NodeFlags, QueryBindingType, QueryValueType, ViewFlags} from '../core';\nimport {AST, ASTWithSource, Interpolation} from '../expression_parser/ast';\nimport {Identifiers} from '../identifiers';\nimport {LifecycleHooks} from '../lifecycle_reflector';\nimport {isNgContainer} from '../ml_parser/tags';\nimport * as o from '../output/output_ast';\nimport {convertValueToOutputAst} from '../output/value_util';\nimport {ParseSourceSpan} from '../parse_util';\nimport {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAst, QueryMatch, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast';\nimport {OutputContext} from '../util';\n\nimport {componentFactoryResolverProviderDef, depDef, lifecycleHookToNodeFlag, providerDef} from './provider_compiler';\n\nconst CLASS_ATTR = 'class';\nconst STYLE_ATTR = 'style';\nconst IMPLICIT_TEMPLATE_VAR = '\\$implicit';\n\nexport class ViewCompileResult {\n  constructor(public viewClassVar: string, public rendererTypeVar: string) {}\n}\n\nexport class ViewCompiler {\n  constructor(private _reflector: CompileReflector) {}\n\n  compileComponent(\n      outputCtx: OutputContext, component: CompileDirectiveMetadata, template: TemplateAst[],\n      styles: o.Expression, usedPipes: CompilePipeSummary[]): ViewCompileResult {\n    let embeddedViewCount = 0;\n    const staticQueryIds = findStaticQueryIds(template);\n\n    let renderComponentVarName: string = undefined !;\n    if (!component.isHost) {\n      const template = component.template !;\n      const customRenderData: o.LiteralMapEntry[] = [];\n      if (template.animations && template.animations.length) {\n        customRenderData.push(new o.LiteralMapEntry(\n            'animation', convertValueToOutputAst(outputCtx, template.animations), true));\n      }\n\n      const renderComponentVar = o.variable(rendererTypeName(component.type.reference));\n      renderComponentVarName = renderComponentVar.name !;\n      outputCtx.statements.push(\n          renderComponentVar\n              .set(o.importExpr(Identifiers.createRendererType2).callFn([new o.LiteralMapExpr([\n                new o.LiteralMapEntry('encapsulation', o.literal(template.encapsulation), false),\n                new o.LiteralMapEntry('styles', styles, false),\n                new o.LiteralMapEntry('data', new o.LiteralMapExpr(customRenderData), false)\n              ])]))\n              .toDeclStmt(\n                  o.importType(Identifiers.RendererType2),\n                  [o.StmtModifier.Final, o.StmtModifier.Exported]));\n    }\n\n    const viewBuilderFactory = (parent: ViewBuilder | null): ViewBuilder => {\n      const embeddedViewIndex = embeddedViewCount++;\n      return new ViewBuilder(\n          this._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes,\n          staticQueryIds, viewBuilderFactory);\n    };\n\n    const visitor = viewBuilderFactory(null);\n    visitor.visitAll([], template);\n\n    outputCtx.statements.push(...visitor.build());\n\n    return new ViewCompileResult(visitor.viewName, renderComponentVarName);\n  }\n}\n\ninterface ViewBuilderFactory {\n  (parent: ViewBuilder): ViewBuilder;\n}\n\ninterface UpdateExpression {\n  context: o.Expression;\n  nodeIndex: number;\n  bindingIndex: number;\n  sourceSpan: ParseSourceSpan;\n  value: AST;\n}\n\nconst LOG_VAR = o.variable('_l');\nconst VIEW_VAR = o.variable('_v');\nconst CHECK_VAR = o.variable('_ck');\nconst COMP_VAR = o.variable('_co');\nconst EVENT_NAME_VAR = o.variable('en');\nconst ALLOW_DEFAULT_VAR = o.variable(`ad`);\n\nclass ViewBuilder implements TemplateAstVisitor, LocalResolver {\n  private compType: o.Type;\n  private nodes: (() => {\n    sourceSpan: ParseSourceSpan | null,\n    nodeDef: o.Expression,\n    nodeFlags: NodeFlags, updateDirectives?: UpdateExpression[], updateRenderer?: UpdateExpression[]\n  })[] = [];\n  private purePipeNodeIndices: {[pipeName: string]: number} = Object.create(null);\n  // Need Object.create so that we don't have builtin values...\n  private refNodeIndices: {[refName: string]: number} = Object.create(null);\n  private variables: VariableAst[] = [];\n  private children: ViewBuilder[] = [];\n\n  public readonly viewName: string;\n\n  constructor(\n      private reflector: CompileReflector, private outputCtx: OutputContext,\n      private parent: ViewBuilder|null, private component: CompileDirectiveMetadata,\n      private embeddedViewIndex: number, private usedPipes: CompilePipeSummary[],\n      private staticQueryIds: Map<TemplateAst, StaticAndDynamicQueryIds>,\n      private viewBuilderFactory: ViewBuilderFactory) {\n    // TODO(tbosch): The old view compiler used to use an `any` type\n    // for the context in any embedded view. We keep this behaivor for now\n    // to be able to introduce the new view compiler without too many errors.\n    this.compType = this.embeddedViewIndex > 0 ?\n        o.DYNAMIC_TYPE :\n        o.expressionType(outputCtx.importExpr(this.component.type.reference)) !;\n    this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);\n  }\n\n  visitAll(variables: VariableAst[], astNodes: TemplateAst[]) {\n    this.variables = variables;\n    // create the pipes for the pure pipes immediately, so that we know their indices.\n    if (!this.parent) {\n      this.usedPipes.forEach((pipe) => {\n        if (pipe.pure) {\n          this.purePipeNodeIndices[pipe.name] = this._createPipe(null, pipe);\n        }\n      });\n    }\n\n    if (!this.parent) {\n      const queryIds = staticViewQueryIds(this.staticQueryIds);\n      this.component.viewQueries.forEach((query, queryIndex) => {\n        // Note: queries start with id 1 so we can use the number in a Bloom filter!\n        const queryId = queryIndex + 1;\n        const bindingType = query.first ? QueryBindingType.First : QueryBindingType.All;\n        const flags =\n            NodeFlags.TypeViewQuery | calcStaticDynamicQueryFlags(queryIds, queryId, query);\n        this.nodes.push(() => ({\n                          sourceSpan: null,\n                          nodeFlags: flags,\n                          nodeDef: o.importExpr(Identifiers.queryDef).callFn([\n                            o.literal(flags), o.literal(queryId),\n                            new o.LiteralMapExpr([new o.LiteralMapEntry(\n                                query.propertyName, o.literal(bindingType), false)])\n                          ])\n                        }));\n      });\n    }\n    templateVisitAll(this, astNodes);\n    if (this.parent && (astNodes.length === 0 || needsAdditionalRootNode(astNodes))) {\n      // if the view is an embedded view, then we need to add an additional root node in some cases\n      this.nodes.push(() => ({\n                        sourceSpan: null,\n                        nodeFlags: NodeFlags.TypeElement,\n                        nodeDef: o.importExpr(Identifiers.anchorDef).callFn([\n                          o.literal(NodeFlags.None), o.NULL_EXPR, o.NULL_EXPR, o.literal(0)\n                        ])\n                      }));\n    }\n  }\n\n  build(targetStatements: o.Statement[] = []): o.Statement[] {\n    this.children.forEach((child) => child.build(targetStatements));\n\n    const {updateRendererStmts, updateDirectivesStmts, nodeDefExprs} =\n        this._createNodeExpressions();\n\n    const updateRendererFn = this._createUpdateFn(updateRendererStmts);\n    const updateDirectivesFn = this._createUpdateFn(updateDirectivesStmts);\n\n\n    let viewFlags = ViewFlags.None;\n    if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {\n      viewFlags |= ViewFlags.OnPush;\n    }\n    const viewFactory = new o.DeclareFunctionStmt(\n        this.viewName, [new o.FnParam(LOG_VAR.name !)],\n        [new o.ReturnStatement(o.importExpr(Identifiers.viewDef).callFn([\n          o.literal(viewFlags),\n          o.literalArr(nodeDefExprs),\n          updateDirectivesFn,\n          updateRendererFn,\n        ]))],\n        o.importType(Identifiers.ViewDefinition),\n        this.embeddedViewIndex === 0 ? [o.StmtModifier.Exported] : []);\n\n    targetStatements.push(viewFactory);\n    return targetStatements;\n  }\n\n  private _createUpdateFn(updateStmts: o.Statement[]): o.Expression {\n    let updateFn: o.Expression;\n    if (updateStmts.length > 0) {\n      const preStmts: o.Statement[] = [];\n      if (!this.component.isHost && o.findReadVarNames(updateStmts).has(COMP_VAR.name !)) {\n        preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n      }\n      updateFn = o.fn(\n          [\n            new o.FnParam(CHECK_VAR.name !, o.INFERRED_TYPE),\n            new o.FnParam(VIEW_VAR.name !, o.INFERRED_TYPE)\n          ],\n          [...preStmts, ...updateStmts], o.INFERRED_TYPE);\n    } else {\n      updateFn = o.NULL_EXPR;\n    }\n    return updateFn;\n  }\n\n  visitNgContent(ast: NgContentAst, context: any): any {\n    // ngContentDef(ngContentIndex: number, index: number): NodeDef;\n    this.nodes.push(() => ({\n                      sourceSpan: ast.sourceSpan,\n                      nodeFlags: NodeFlags.TypeNgContent,\n                      nodeDef: o.importExpr(Identifiers.ngContentDef).callFn([\n                        o.literal(ast.ngContentIndex), o.literal(ast.index)\n                      ])\n                    }));\n  }\n\n  visitText(ast: TextAst, context: any): any {\n    // Static text nodes have no check function\n    const checkIndex = -1;\n    this.nodes.push(() => ({\n                      sourceSpan: ast.sourceSpan,\n                      nodeFlags: NodeFlags.TypeText,\n                      nodeDef: o.importExpr(Identifiers.textDef).callFn([\n                        o.literal(checkIndex),\n                        o.literal(ast.ngContentIndex),\n                        o.literalArr([o.literal(ast.value)]),\n                      ])\n                    }));\n  }\n\n  visitBoundText(ast: BoundTextAst, context: any): any {\n    const nodeIndex = this.nodes.length;\n    // reserve the space in the nodeDefs array\n    this.nodes.push(null !);\n\n    const astWithSource = <ASTWithSource>ast.value;\n    const inter = <Interpolation>astWithSource.ast;\n\n    const updateRendererExpressions = inter.expressions.map(\n        (expr, bindingIndex) => this._preprocessUpdateExpression(\n            {nodeIndex, bindingIndex, sourceSpan: ast.sourceSpan, context: COMP_VAR, value: expr}));\n\n    // Check index is the same as the node index during compilation\n    // They might only differ at runtime\n    const checkIndex = nodeIndex;\n\n    this.nodes[nodeIndex] = () => ({\n      sourceSpan: ast.sourceSpan,\n      nodeFlags: NodeFlags.TypeText,\n      nodeDef: o.importExpr(Identifiers.textDef).callFn([\n        o.literal(checkIndex),\n        o.literal(ast.ngContentIndex),\n        o.literalArr(inter.strings.map(s => o.literal(s))),\n      ]),\n      updateRenderer: updateRendererExpressions\n    });\n  }\n\n  visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any {\n    const nodeIndex = this.nodes.length;\n    // reserve the space in the nodeDefs array\n    this.nodes.push(null !);\n\n    const {flags, queryMatchesExpr, hostEvents} = this._visitElementOrTemplate(nodeIndex, ast);\n\n    const childVisitor = this.viewBuilderFactory(this);\n    this.children.push(childVisitor);\n    childVisitor.visitAll(ast.variables, ast.children);\n\n    const childCount = this.nodes.length - nodeIndex - 1;\n\n    // anchorDef(\n    //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], ngContentIndex: number,\n    //   childCount: number, handleEventFn?: ElementHandleEventFn, templateFactory?:\n    //   ViewDefinitionFactory): NodeDef;\n    this.nodes[nodeIndex] = () => ({\n      sourceSpan: ast.sourceSpan,\n      nodeFlags: NodeFlags.TypeElement | flags,\n      nodeDef: o.importExpr(Identifiers.anchorDef).callFn([\n        o.literal(flags),\n        queryMatchesExpr,\n        o.literal(ast.ngContentIndex),\n        o.literal(childCount),\n        this._createElementHandleEventFn(nodeIndex, hostEvents),\n        o.variable(childVisitor.viewName),\n      ])\n    });\n  }\n\n  visitElement(ast: ElementAst, context: any): any {\n    const nodeIndex = this.nodes.length;\n    // reserve the space in the nodeDefs array so we can add children\n    this.nodes.push(null !);\n\n    // Using a null element name creates an anchor.\n    const elName: string|null = isNgContainer(ast.name) ? null : ast.name;\n\n    const {flags, usedEvents, queryMatchesExpr, hostBindings: dirHostBindings, hostEvents} =\n        this._visitElementOrTemplate(nodeIndex, ast);\n\n    let inputDefs: o.Expression[] = [];\n    let updateRendererExpressions: UpdateExpression[] = [];\n    let outputDefs: o.Expression[] = [];\n    if (elName) {\n      const hostBindings: any[] = ast.inputs\n                                      .map((inputAst) => ({\n                                             context: COMP_VAR as o.Expression,\n                                             inputAst,\n                                             dirAst: null as any,\n                                           }))\n                                      .concat(dirHostBindings);\n      if (hostBindings.length) {\n        updateRendererExpressions =\n            hostBindings.map((hostBinding, bindingIndex) => this._preprocessUpdateExpression({\n              context: hostBinding.context,\n              nodeIndex,\n              bindingIndex,\n              sourceSpan: hostBinding.inputAst.sourceSpan,\n              value: hostBinding.inputAst.value\n            }));\n        inputDefs = hostBindings.map(\n            hostBinding => elementBindingDef(hostBinding.inputAst, hostBinding.dirAst));\n      }\n      outputDefs = usedEvents.map(\n          ([target, eventName]) => o.literalArr([o.literal(target), o.literal(eventName)]));\n    }\n\n    templateVisitAll(this, ast.children);\n\n    const childCount = this.nodes.length - nodeIndex - 1;\n\n    const compAst = ast.directives.find(dirAst => dirAst.directive.isComponent);\n    let compRendererType = o.NULL_EXPR as o.Expression;\n    let compView = o.NULL_EXPR as o.Expression;\n    if (compAst) {\n      compView = this.outputCtx.importExpr(compAst.directive.componentViewType);\n      compRendererType = this.outputCtx.importExpr(compAst.directive.rendererType);\n    }\n\n    // Check index is the same as the node index during compilation\n    // They might only differ at runtime\n    const checkIndex = nodeIndex;\n\n    this.nodes[nodeIndex] = () => ({\n      sourceSpan: ast.sourceSpan,\n      nodeFlags: NodeFlags.TypeElement | flags,\n      nodeDef: o.importExpr(Identifiers.elementDef).callFn([\n        o.literal(checkIndex),\n        o.literal(flags),\n        queryMatchesExpr,\n        o.literal(ast.ngContentIndex),\n        o.literal(childCount),\n        o.literal(elName),\n        elName ? fixedAttrsDef(ast) : o.NULL_EXPR,\n        inputDefs.length ? o.literalArr(inputDefs) : o.NULL_EXPR,\n        outputDefs.length ? o.literalArr(outputDefs) : o.NULL_EXPR,\n        this._createElementHandleEventFn(nodeIndex, hostEvents),\n        compView,\n        compRendererType,\n      ]),\n      updateRenderer: updateRendererExpressions\n    });\n  }\n\n  private _visitElementOrTemplate(nodeIndex: number, ast: {\n    hasViewContainer: boolean,\n    outputs: BoundEventAst[],\n    directives: DirectiveAst[],\n    providers: ProviderAst[],\n    references: ReferenceAst[],\n    queryMatches: QueryMatch[]\n  }): {\n    flags: NodeFlags,\n    usedEvents: [string | null, string][],\n    queryMatchesExpr: o.Expression,\n    hostBindings:\n        {context: o.Expression, inputAst: BoundElementPropertyAst, dirAst: DirectiveAst}[],\n    hostEvents: {context: o.Expression, eventAst: BoundEventAst, dirAst: DirectiveAst}[],\n  } {\n    let flags = NodeFlags.None;\n    if (ast.hasViewContainer) {\n      flags |= NodeFlags.EmbeddedViews;\n    }\n    const usedEvents = new Map<string, [string | null, string]>();\n    ast.outputs.forEach((event) => {\n      const {name, target} = elementEventNameAndTarget(event, null);\n      usedEvents.set(elementEventFullName(target, name), [target, name]);\n    });\n    ast.directives.forEach((dirAst) => {\n      dirAst.hostEvents.forEach((event) => {\n        const {name, target} = elementEventNameAndTarget(event, dirAst);\n        usedEvents.set(elementEventFullName(target, name), [target, name]);\n      });\n    });\n    const hostBindings:\n        {context: o.Expression, inputAst: BoundElementPropertyAst, dirAst: DirectiveAst}[] = [];\n    const hostEvents: {context: o.Expression, eventAst: BoundEventAst, dirAst: DirectiveAst}[] = [];\n    this._visitComponentFactoryResolverProvider(ast.directives);\n\n    ast.providers.forEach((providerAst, providerIndex) => {\n      let dirAst: DirectiveAst = undefined !;\n      let dirIndex: number = undefined !;\n      ast.directives.forEach((localDirAst, i) => {\n        if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {\n          dirAst = localDirAst;\n          dirIndex = i;\n        }\n      });\n      if (dirAst) {\n        const {hostBindings: dirHostBindings, hostEvents: dirHostEvents} = this._visitDirective(\n            providerAst, dirAst, dirIndex, nodeIndex, ast.references, ast.queryMatches, usedEvents,\n            this.staticQueryIds.get(<any>ast) !);\n        hostBindings.push(...dirHostBindings);\n        hostEvents.push(...dirHostEvents);\n      } else {\n        this._visitProvider(providerAst, ast.queryMatches);\n      }\n    });\n\n    let queryMatchExprs: o.Expression[] = [];\n    ast.queryMatches.forEach((match) => {\n      let valueType: QueryValueType = undefined !;\n      if (tokenReference(match.value) ===\n          this.reflector.resolveExternalReference(Identifiers.ElementRef)) {\n        valueType = QueryValueType.ElementRef;\n      } else if (\n          tokenReference(match.value) ===\n          this.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {\n        valueType = QueryValueType.ViewContainerRef;\n      } else if (\n          tokenReference(match.value) ===\n          this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n        valueType = QueryValueType.TemplateRef;\n      }\n      if (valueType != null) {\n        queryMatchExprs.push(o.literalArr([o.literal(match.queryId), o.literal(valueType)]));\n      }\n    });\n    ast.references.forEach((ref) => {\n      let valueType: QueryValueType = undefined !;\n      if (!ref.value) {\n        valueType = QueryValueType.RenderElement;\n      } else if (\n          tokenReference(ref.value) ===\n          this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n        valueType = QueryValueType.TemplateRef;\n      }\n      if (valueType != null) {\n        this.refNodeIndices[ref.name] = nodeIndex;\n        queryMatchExprs.push(o.literalArr([o.literal(ref.name), o.literal(valueType)]));\n      }\n    });\n    ast.outputs.forEach((outputAst) => {\n      hostEvents.push({context: COMP_VAR, eventAst: outputAst, dirAst: null !});\n    });\n\n    return {\n      flags,\n      usedEvents: Array.from(usedEvents.values()),\n      queryMatchesExpr: queryMatchExprs.length ? o.literalArr(queryMatchExprs) : o.NULL_EXPR,\n      hostBindings,\n      hostEvents: hostEvents\n    };\n  }\n\n  private _visitDirective(\n      providerAst: ProviderAst, dirAst: DirectiveAst, directiveIndex: number,\n      elementNodeIndex: number, refs: ReferenceAst[], queryMatches: QueryMatch[],\n      usedEvents: Map<string, any>, queryIds: StaticAndDynamicQueryIds): {\n    hostBindings:\n        {context: o.Expression, inputAst: BoundElementPropertyAst, dirAst: DirectiveAst}[],\n    hostEvents: {context: o.Expression, eventAst: BoundEventAst, dirAst: DirectiveAst}[]\n  } {\n    const nodeIndex = this.nodes.length;\n    // reserve the space in the nodeDefs array so we can add children\n    this.nodes.push(null !);\n\n    dirAst.directive.queries.forEach((query, queryIndex) => {\n      const queryId = dirAst.contentQueryStartId + queryIndex;\n      const flags =\n          NodeFlags.TypeContentQuery | calcStaticDynamicQueryFlags(queryIds, queryId, query);\n      const bindingType = query.first ? QueryBindingType.First : QueryBindingType.All;\n      this.nodes.push(() => ({\n                        sourceSpan: dirAst.sourceSpan,\n                        nodeFlags: flags,\n                        nodeDef: o.importExpr(Identifiers.queryDef).callFn([\n                          o.literal(flags), o.literal(queryId),\n                          new o.LiteralMapExpr([new o.LiteralMapEntry(\n                              query.propertyName, o.literal(bindingType), false)])\n                        ]),\n                      }));\n    });\n\n    // Note: the operation below might also create new nodeDefs,\n    // but we don't want them to be a child of a directive,\n    // as they might be a provider/pipe on their own.\n    // I.e. we only allow queries as children of directives nodes.\n    const childCount = this.nodes.length - nodeIndex - 1;\n\n    let {flags, queryMatchExprs, providerExpr, depsExpr} =\n        this._visitProviderOrDirective(providerAst, queryMatches);\n\n    refs.forEach((ref) => {\n      if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {\n        this.refNodeIndices[ref.name] = nodeIndex;\n        queryMatchExprs.push(\n            o.literalArr([o.literal(ref.name), o.literal(QueryValueType.Provider)]));\n      }\n    });\n\n    if (dirAst.directive.isComponent) {\n      flags |= NodeFlags.Component;\n    }\n\n    const inputDefs = dirAst.inputs.map((inputAst, inputIndex) => {\n      const mapValue = o.literalArr([o.literal(inputIndex), o.literal(inputAst.directiveName)]);\n      // Note: it's important to not quote the key so that we can capture renames by minifiers!\n      return new o.LiteralMapEntry(inputAst.directiveName, mapValue, false);\n    });\n\n    const outputDefs: o.LiteralMapEntry[] = [];\n    const dirMeta = dirAst.directive;\n    Object.keys(dirMeta.outputs).forEach((propName) => {\n      const eventName = dirMeta.outputs[propName];\n      if (usedEvents.has(eventName)) {\n        // Note: it's important to not quote the key so that we can capture renames by minifiers!\n        outputDefs.push(new o.LiteralMapEntry(propName, o.literal(eventName), false));\n      }\n    });\n    let updateDirectiveExpressions: UpdateExpression[] = [];\n    if (dirAst.inputs.length || (flags & (NodeFlags.DoCheck | NodeFlags.OnInit)) > 0) {\n      updateDirectiveExpressions =\n          dirAst.inputs.map((input, bindingIndex) => this._preprocessUpdateExpression({\n            nodeIndex,\n            bindingIndex,\n            sourceSpan: input.sourceSpan,\n            context: COMP_VAR,\n            value: input.value\n          }));\n    }\n\n    const dirContextExpr =\n        o.importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, o.literal(nodeIndex)]);\n    const hostBindings = dirAst.hostProperties.map((inputAst) => ({\n                                                     context: dirContextExpr,\n                                                     dirAst,\n                                                     inputAst,\n                                                   }));\n    const hostEvents = dirAst.hostEvents.map((hostEventAst) => ({\n                                               context: dirContextExpr,\n                                               eventAst: hostEventAst, dirAst,\n                                             }));\n\n    // Check index is the same as the node index during compilation\n    // They might only differ at runtime\n    const checkIndex = nodeIndex;\n\n    this.nodes[nodeIndex] = () => ({\n      sourceSpan: dirAst.sourceSpan,\n      nodeFlags: NodeFlags.TypeDirective | flags,\n      nodeDef: o.importExpr(Identifiers.directiveDef).callFn([\n        o.literal(checkIndex),\n        o.literal(flags),\n        queryMatchExprs.length ? o.literalArr(queryMatchExprs) : o.NULL_EXPR,\n        o.literal(childCount),\n        providerExpr,\n        depsExpr,\n        inputDefs.length ? new o.LiteralMapExpr(inputDefs) : o.NULL_EXPR,\n        outputDefs.length ? new o.LiteralMapExpr(outputDefs) : o.NULL_EXPR,\n      ]),\n      updateDirectives: updateDirectiveExpressions,\n      directive: dirAst.directive.type,\n    });\n\n    return {hostBindings, hostEvents};\n  }\n\n  private _visitProvider(providerAst: ProviderAst, queryMatches: QueryMatch[]): void {\n    this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));\n  }\n\n  private _visitComponentFactoryResolverProvider(directives: DirectiveAst[]) {\n    const componentDirMeta = directives.find(dirAst => dirAst.directive.isComponent);\n    if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {\n      const {providerExpr, depsExpr, flags, tokenExpr} = componentFactoryResolverProviderDef(\n          this.reflector, this.outputCtx, NodeFlags.PrivateProvider,\n          componentDirMeta.directive.entryComponents);\n      this._addProviderNode({\n        providerExpr,\n        depsExpr,\n        flags,\n        tokenExpr,\n        queryMatchExprs: [],\n        sourceSpan: componentDirMeta.sourceSpan\n      });\n    }\n  }\n\n  private _addProviderNode(data: {\n    flags: NodeFlags,\n    queryMatchExprs: o.Expression[],\n    providerExpr: o.Expression,\n    depsExpr: o.Expression,\n    tokenExpr: o.Expression,\n    sourceSpan: ParseSourceSpan\n  }) {\n    const nodeIndex = this.nodes.length;\n    // providerDef(\n    //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], token:any,\n    //   value: any, deps: ([DepFlags, any] | any)[]): NodeDef;\n    this.nodes.push(\n        () => ({\n          sourceSpan: data.sourceSpan,\n          nodeFlags: data.flags,\n          nodeDef: o.importExpr(Identifiers.providerDef).callFn([\n            o.literal(data.flags),\n            data.queryMatchExprs.length ? o.literalArr(data.queryMatchExprs) : o.NULL_EXPR,\n            data.tokenExpr, data.providerExpr, data.depsExpr\n          ])\n        }));\n  }\n\n  private _visitProviderOrDirective(providerAst: ProviderAst, queryMatches: QueryMatch[]): {\n    flags: NodeFlags,\n    tokenExpr: o.Expression,\n    sourceSpan: ParseSourceSpan,\n    queryMatchExprs: o.Expression[],\n    providerExpr: o.Expression,\n    depsExpr: o.Expression\n  } {\n    let flags = NodeFlags.None;\n    let queryMatchExprs: o.Expression[] = [];\n\n    queryMatches.forEach((match) => {\n      if (tokenReference(match.value) === tokenReference(providerAst.token)) {\n        queryMatchExprs.push(\n            o.literalArr([o.literal(match.queryId), o.literal(QueryValueType.Provider)]));\n      }\n    });\n    const {providerExpr, depsExpr, flags: providerFlags, tokenExpr} =\n        providerDef(this.outputCtx, providerAst);\n    return {\n      flags: flags | providerFlags,\n      queryMatchExprs,\n      providerExpr,\n      depsExpr,\n      tokenExpr,\n      sourceSpan: providerAst.sourceSpan\n    };\n  }\n\n  getLocal(name: string): o.Expression|null {\n    if (name == EventHandlerVars.event.name) {\n      return EventHandlerVars.event;\n    }\n    let currViewExpr: o.Expression = VIEW_VAR;\n    for (let currBuilder: ViewBuilder|null = this; currBuilder; currBuilder = currBuilder.parent,\n                          currViewExpr = currViewExpr.prop('parent').cast(o.DYNAMIC_TYPE)) {\n      // check references\n      const refNodeIndex = currBuilder.refNodeIndices[name];\n      if (refNodeIndex != null) {\n        return o.importExpr(Identifiers.nodeValue).callFn([currViewExpr, o.literal(refNodeIndex)]);\n      }\n\n      // check variables\n      const varAst = currBuilder.variables.find((varAst) => varAst.name === name);\n      if (varAst) {\n        const varValue = varAst.value || IMPLICIT_TEMPLATE_VAR;\n        return currViewExpr.prop('context').prop(varValue);\n      }\n    }\n    return null;\n  }\n\n  notifyImplicitReceiverUse(): void {\n    // Not needed in View Engine as View Engine walks through the generated\n    // expressions to figure out if the implicit receiver is used and needs\n    // to be generated as part of the pre-update statements.\n  }\n\n  private _createLiteralArrayConverter(sourceSpan: ParseSourceSpan, argCount: number):\n      BuiltinConverter {\n    if (argCount === 0) {\n      const valueExpr = o.importExpr(Identifiers.EMPTY_ARRAY);\n      return () => valueExpr;\n    }\n\n    const checkIndex = this.nodes.length;\n\n    this.nodes.push(() => ({\n                      sourceSpan,\n                      nodeFlags: NodeFlags.TypePureArray,\n                      nodeDef: o.importExpr(Identifiers.pureArrayDef).callFn([\n                        o.literal(checkIndex),\n                        o.literal(argCount),\n                      ])\n                    }));\n\n    return (args: o.Expression[]) => callCheckStmt(checkIndex, args);\n  }\n\n  private _createLiteralMapConverter(\n      sourceSpan: ParseSourceSpan, keys: {key: string, quoted: boolean}[]): BuiltinConverter {\n    if (keys.length === 0) {\n      const valueExpr = o.importExpr(Identifiers.EMPTY_MAP);\n      return () => valueExpr;\n    }\n\n    const map = o.literalMap(keys.map((e, i) => ({...e, value: o.literal(i)})));\n    const checkIndex = this.nodes.length;\n    this.nodes.push(() => ({\n                      sourceSpan,\n                      nodeFlags: NodeFlags.TypePureObject,\n                      nodeDef: o.importExpr(Identifiers.pureObjectDef).callFn([\n                        o.literal(checkIndex),\n                        map,\n                      ])\n                    }));\n\n    return (args: o.Expression[]) => callCheckStmt(checkIndex, args);\n  }\n\n  private _createPipeConverter(expression: UpdateExpression, name: string, argCount: number):\n      BuiltinConverter {\n    const pipe = this.usedPipes.find((pipeSummary) => pipeSummary.name === name) !;\n    if (pipe.pure) {\n      const checkIndex = this.nodes.length;\n      this.nodes.push(() => ({\n                        sourceSpan: expression.sourceSpan,\n                        nodeFlags: NodeFlags.TypePurePipe,\n                        nodeDef: o.importExpr(Identifiers.purePipeDef).callFn([\n                          o.literal(checkIndex),\n                          o.literal(argCount),\n                        ])\n                      }));\n\n      // find underlying pipe in the component view\n      let compViewExpr: o.Expression = VIEW_VAR;\n      let compBuilder: ViewBuilder = this;\n      while (compBuilder.parent) {\n        compBuilder = compBuilder.parent;\n        compViewExpr = compViewExpr.prop('parent').cast(o.DYNAMIC_TYPE);\n      }\n      const pipeNodeIndex = compBuilder.purePipeNodeIndices[name];\n      const pipeValueExpr: o.Expression =\n          o.importExpr(Identifiers.nodeValue).callFn([compViewExpr, o.literal(pipeNodeIndex)]);\n\n      return (args: o.Expression[]) => callUnwrapValue(\n                 expression.nodeIndex, expression.bindingIndex,\n                 callCheckStmt(checkIndex, [pipeValueExpr].concat(args)));\n    } else {\n      const nodeIndex = this._createPipe(expression.sourceSpan, pipe);\n      const nodeValueExpr =\n          o.importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, o.literal(nodeIndex)]);\n\n      return (args: o.Expression[]) => callUnwrapValue(\n                 expression.nodeIndex, expression.bindingIndex,\n                 nodeValueExpr.callMethod('transform', args));\n    }\n  }\n\n  private _createPipe(sourceSpan: ParseSourceSpan|null, pipe: CompilePipeSummary): number {\n    const nodeIndex = this.nodes.length;\n    let flags = NodeFlags.None;\n    pipe.type.lifecycleHooks.forEach((lifecycleHook) => {\n      // for pipes, we only support ngOnDestroy\n      if (lifecycleHook === LifecycleHooks.OnDestroy) {\n        flags |= lifecycleHookToNodeFlag(lifecycleHook);\n      }\n    });\n\n    const depExprs = pipe.type.diDeps.map((diDep) => depDef(this.outputCtx, diDep));\n    // function pipeDef(\n    //   flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef\n    this.nodes.push(\n        () => ({\n          sourceSpan,\n          nodeFlags: NodeFlags.TypePipe,\n          nodeDef: o.importExpr(Identifiers.pipeDef).callFn([\n            o.literal(flags), this.outputCtx.importExpr(pipe.type.reference), o.literalArr(depExprs)\n          ])\n        }));\n    return nodeIndex;\n  }\n\n  /**\n   * For the AST in `UpdateExpression.value`:\n   * - create nodes for pipes, literal arrays and, literal maps,\n   * - update the AST to replace pipes, literal arrays and, literal maps with calls to check fn.\n   *\n   * WARNING: This might create new nodeDefs (for pipes and literal arrays and literal maps)!\n   */\n  private _preprocessUpdateExpression(expression: UpdateExpression): UpdateExpression {\n    return {\n      nodeIndex: expression.nodeIndex,\n      bindingIndex: expression.bindingIndex,\n      sourceSpan: expression.sourceSpan,\n      context: expression.context,\n      value: convertPropertyBindingBuiltins(\n          {\n            createLiteralArrayConverter: (argCount: number) => this._createLiteralArrayConverter(\n                                             expression.sourceSpan, argCount),\n            createLiteralMapConverter:\n                (keys: {key: string, quoted: boolean}[]) =>\n                    this._createLiteralMapConverter(expression.sourceSpan, keys),\n            createPipeConverter: (name: string, argCount: number) =>\n                                     this._createPipeConverter(expression, name, argCount)\n          },\n          expression.value)\n    };\n  }\n\n  private _createNodeExpressions(): {\n    updateRendererStmts: o.Statement[],\n    updateDirectivesStmts: o.Statement[],\n    nodeDefExprs: o.Expression[]\n  } {\n    const self = this;\n    let updateBindingCount = 0;\n    const updateRendererStmts: o.Statement[] = [];\n    const updateDirectivesStmts: o.Statement[] = [];\n    const nodeDefExprs = this.nodes.map((factory, nodeIndex) => {\n      const {nodeDef, nodeFlags, updateDirectives, updateRenderer, sourceSpan} = factory();\n      if (updateRenderer) {\n        updateRendererStmts.push(\n            ...createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false));\n      }\n      if (updateDirectives) {\n        updateDirectivesStmts.push(...createUpdateStatements(\n            nodeIndex, sourceSpan, updateDirectives,\n            (nodeFlags & (NodeFlags.DoCheck | NodeFlags.OnInit)) > 0));\n      }\n      // We use a comma expression to call the log function before\n      // the nodeDef function, but still use the result of the nodeDef function\n      // as the value.\n      // Note: We only add the logger to elements / text nodes,\n      // so we don't generate too much code.\n      const logWithNodeDef = nodeFlags & NodeFlags.CatRenderNode ?\n          new o.CommaExpr([LOG_VAR.callFn([]).callFn([]), nodeDef]) :\n          nodeDef;\n      return o.applySourceSpanToExpressionIfNeeded(logWithNodeDef, sourceSpan);\n    });\n    return {updateRendererStmts, updateDirectivesStmts, nodeDefExprs};\n\n    function createUpdateStatements(\n        nodeIndex: number, sourceSpan: ParseSourceSpan | null, expressions: UpdateExpression[],\n        allowEmptyExprs: boolean): o.Statement[] {\n      const updateStmts: o.Statement[] = [];\n      const exprs = expressions.map(({sourceSpan, context, value}) => {\n        const bindingId = `${updateBindingCount++}`;\n        const nameResolver = context === COMP_VAR ? self : null;\n        const {stmts, currValExpr} =\n            convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General);\n        updateStmts.push(...stmts.map(\n            (stmt: o.Statement) => o.applySourceSpanToStatementIfNeeded(stmt, sourceSpan)));\n        return o.applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);\n      });\n      if (expressions.length || allowEmptyExprs) {\n        updateStmts.push(o.applySourceSpanToStatementIfNeeded(\n            callCheckStmt(nodeIndex, exprs).toStmt(), sourceSpan));\n      }\n      return updateStmts;\n    }\n  }\n\n  private _createElementHandleEventFn(\n      nodeIndex: number,\n      handlers: {context: o.Expression, eventAst: BoundEventAst, dirAst: DirectiveAst}[]) {\n    const handleEventStmts: o.Statement[] = [];\n    let handleEventBindingCount = 0;\n    handlers.forEach(({context, eventAst, dirAst}) => {\n      const bindingId = `${handleEventBindingCount++}`;\n      const nameResolver = context === COMP_VAR ? this : null;\n      const {stmts, allowDefault} =\n          convertActionBinding(nameResolver, context, eventAst.handler, bindingId);\n      const trueStmts = stmts;\n      if (allowDefault) {\n        trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());\n      }\n      const {target: eventTarget, name: eventName} = elementEventNameAndTarget(eventAst, dirAst);\n      const fullEventName = elementEventFullName(eventTarget, eventName);\n      handleEventStmts.push(o.applySourceSpanToStatementIfNeeded(\n          new o.IfStmt(o.literal(fullEventName).identical(EVENT_NAME_VAR), trueStmts),\n          eventAst.sourceSpan));\n    });\n    let handleEventFn: o.Expression;\n    if (handleEventStmts.length > 0) {\n      const preStmts: o.Statement[] =\n          [ALLOW_DEFAULT_VAR.set(o.literal(true)).toDeclStmt(o.BOOL_TYPE)];\n      if (!this.component.isHost && o.findReadVarNames(handleEventStmts).has(COMP_VAR.name !)) {\n        preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n      }\n      handleEventFn = o.fn(\n          [\n            new o.FnParam(VIEW_VAR.name !, o.INFERRED_TYPE),\n            new o.FnParam(EVENT_NAME_VAR.name !, o.INFERRED_TYPE),\n            new o.FnParam(EventHandlerVars.event.name !, o.INFERRED_TYPE)\n          ],\n          [...preStmts, ...handleEventStmts, new o.ReturnStatement(ALLOW_DEFAULT_VAR)],\n          o.INFERRED_TYPE);\n    } else {\n      handleEventFn = o.NULL_EXPR;\n    }\n    return handleEventFn;\n  }\n\n  visitDirective(ast: DirectiveAst, context: {usedEvents: Set<string>}): any {}\n  visitDirectiveProperty(ast: BoundDirectivePropertyAst, context: any): any {}\n  visitReference(ast: ReferenceAst, context: any): any {}\n  visitVariable(ast: VariableAst, context: any): any {}\n  visitEvent(ast: BoundEventAst, context: any): any {}\n  visitElementProperty(ast: BoundElementPropertyAst, context: any): any {}\n  visitAttr(ast: AttrAst, context: any): any {}\n}\n\nfunction needsAdditionalRootNode(astNodes: TemplateAst[]): boolean {\n  const lastAstNode = astNodes[astNodes.length - 1];\n  if (lastAstNode instanceof EmbeddedTemplateAst) {\n    return lastAstNode.hasViewContainer;\n  }\n\n  if (lastAstNode instanceof ElementAst) {\n    if (isNgContainer(lastAstNode.name) && lastAstNode.children.length) {\n      return needsAdditionalRootNode(lastAstNode.children);\n    }\n    return lastAstNode.hasViewContainer;\n  }\n\n  return lastAstNode instanceof NgContentAst;\n}\n\n\nfunction elementBindingDef(inputAst: BoundElementPropertyAst, dirAst: DirectiveAst): o.Expression {\n  const inputType = inputAst.type;\n  switch (inputType) {\n    case PropertyBindingType.Attribute:\n      return o.literalArr([\n        o.literal(BindingFlags.TypeElementAttribute), o.literal(inputAst.name),\n        o.literal(inputAst.securityContext)\n      ]);\n    case PropertyBindingType.Property:\n      return o.literalArr([\n        o.literal(BindingFlags.TypeProperty), o.literal(inputAst.name),\n        o.literal(inputAst.securityContext)\n      ]);\n    case PropertyBindingType.Animation:\n      const bindingType = BindingFlags.TypeProperty |\n          (dirAst && dirAst.directive.isComponent ? BindingFlags.SyntheticHostProperty :\n                                                    BindingFlags.SyntheticProperty);\n      return o.literalArr([\n        o.literal(bindingType), o.literal('@' + inputAst.name), o.literal(inputAst.securityContext)\n      ]);\n    case PropertyBindingType.Class:\n      return o.literalArr(\n          [o.literal(BindingFlags.TypeElementClass), o.literal(inputAst.name), o.NULL_EXPR]);\n    case PropertyBindingType.Style:\n      return o.literalArr([\n        o.literal(BindingFlags.TypeElementStyle), o.literal(inputAst.name), o.literal(inputAst.unit)\n      ]);\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      const unexpected: never = inputType;\n      throw new Error(`unexpected ${unexpected}`);\n  }\n}\n\n\nfunction fixedAttrsDef(elementAst: ElementAst): o.Expression {\n  const mapResult: {[key: string]: string} = Object.create(null);\n  elementAst.attrs.forEach(attrAst => { mapResult[attrAst.name] = attrAst.value; });\n  elementAst.directives.forEach(dirAst => {\n    Object.keys(dirAst.directive.hostAttributes).forEach(name => {\n      const value = dirAst.directive.hostAttributes[name];\n      const prevValue = mapResult[name];\n      mapResult[name] = prevValue != null ? mergeAttributeValue(name, prevValue, value) : value;\n    });\n  });\n  // Note: We need to sort to get a defined output order\n  // for tests and for caching generated artifacts...\n  return o.literalArr(Object.keys(mapResult).sort().map(\n      (attrName) => o.literalArr([o.literal(attrName), o.literal(mapResult[attrName])])));\n}\n\nfunction mergeAttributeValue(attrName: string, attrValue1: string, attrValue2: string): string {\n  if (attrName == CLASS_ATTR || attrName == STYLE_ATTR) {\n    return `${attrValue1} ${attrValue2}`;\n  } else {\n    return attrValue2;\n  }\n}\n\nfunction callCheckStmt(nodeIndex: number, exprs: o.Expression[]): o.Expression {\n  if (exprs.length > 10) {\n    return CHECK_VAR.callFn(\n        [VIEW_VAR, o.literal(nodeIndex), o.literal(ArgumentType.Dynamic), o.literalArr(exprs)]);\n  } else {\n    return CHECK_VAR.callFn(\n        [VIEW_VAR, o.literal(nodeIndex), o.literal(ArgumentType.Inline), ...exprs]);\n  }\n}\n\nfunction callUnwrapValue(nodeIndex: number, bindingIdx: number, expr: o.Expression): o.Expression {\n  return o.importExpr(Identifiers.unwrapValue).callFn([\n    VIEW_VAR, o.literal(nodeIndex), o.literal(bindingIdx), expr\n  ]);\n}\n\ninterface StaticAndDynamicQueryIds {\n  staticQueryIds: Set<number>;\n  dynamicQueryIds: Set<number>;\n}\n\n\nexport function findStaticQueryIds(\n    nodes: TemplateAst[], result = new Map<TemplateAst, StaticAndDynamicQueryIds>()):\n    Map<TemplateAst, StaticAndDynamicQueryIds> {\n  nodes.forEach((node) => {\n    const staticQueryIds = new Set<number>();\n    const dynamicQueryIds = new Set<number>();\n    let queryMatches: QueryMatch[] = undefined !;\n    if (node instanceof ElementAst) {\n      findStaticQueryIds(node.children, result);\n      node.children.forEach((child) => {\n        const childData = result.get(child) !;\n        childData.staticQueryIds.forEach(queryId => staticQueryIds.add(queryId));\n        childData.dynamicQueryIds.forEach(queryId => dynamicQueryIds.add(queryId));\n      });\n      queryMatches = node.queryMatches;\n    } else if (node instanceof EmbeddedTemplateAst) {\n      findStaticQueryIds(node.children, result);\n      node.children.forEach((child) => {\n        const childData = result.get(child) !;\n        childData.staticQueryIds.forEach(queryId => dynamicQueryIds.add(queryId));\n        childData.dynamicQueryIds.forEach(queryId => dynamicQueryIds.add(queryId));\n      });\n      queryMatches = node.queryMatches;\n    }\n    if (queryMatches) {\n      queryMatches.forEach((match) => staticQueryIds.add(match.queryId));\n    }\n    dynamicQueryIds.forEach(queryId => staticQueryIds.delete(queryId));\n    result.set(node, {staticQueryIds, dynamicQueryIds});\n  });\n  return result;\n}\n\nexport function staticViewQueryIds(nodeStaticQueryIds: Map<TemplateAst, StaticAndDynamicQueryIds>):\n    StaticAndDynamicQueryIds {\n  const staticQueryIds = new Set<number>();\n  const dynamicQueryIds = new Set<number>();\n  Array.from(nodeStaticQueryIds.values()).forEach((entry) => {\n    entry.staticQueryIds.forEach(queryId => staticQueryIds.add(queryId));\n    entry.dynamicQueryIds.forEach(queryId => dynamicQueryIds.add(queryId));\n  });\n  dynamicQueryIds.forEach(queryId => staticQueryIds.delete(queryId));\n  return {staticQueryIds, dynamicQueryIds};\n}\n\nfunction elementEventNameAndTarget(\n    eventAst: BoundEventAst, dirAst: DirectiveAst | null): {name: string, target: string | null} {\n  if (eventAst.isAnimation) {\n    return {\n      name: `@${eventAst.name}.${eventAst.phase}`,\n      target: dirAst && dirAst.directive.isComponent ? 'component' : null\n    };\n  } else {\n    return eventAst;\n  }\n}\n\nfunction calcStaticDynamicQueryFlags(\n    queryIds: StaticAndDynamicQueryIds, queryId: number, query: CompileQueryMetadata) {\n  let flags = NodeFlags.None;\n  // Note: We only make queries static that query for a single item.\n  // This is because of backwards compatibility with the old view compiler...\n  if (query.first && shouldResolveAsStaticQuery(queryIds, queryId, query)) {\n    flags |= NodeFlags.StaticQuery;\n  } else {\n    flags |= NodeFlags.DynamicQuery;\n  }\n  return flags;\n}\n\nfunction shouldResolveAsStaticQuery(\n    queryIds: StaticAndDynamicQueryIds, queryId: number, query: CompileQueryMetadata): boolean {\n  // If query.static has been set by the user, use that value to determine whether\n  // the query is static. If none has been set, sort the query into static/dynamic\n  // based on query results (i.e. dynamic if CD needs to run to get all results).\n  return query.static ||\n      query.static == null &&\n      (queryIds.staticQueryIds.has(queryId) || !queryIds.dynamicQueryIds.has(queryId));\n}\n\nexport function elementEventFullName(target: string | null, name: string): string {\n  return target ? `${target}:${name}` : name;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {ParseError} from '../parse_util';\n\nimport {extractMessages} from './extractor_merger';\nimport * as i18n from './i18n_ast';\nimport {PlaceholderMapper, Serializer} from './serializers/serializer';\n\n\n/**\n * A container for message extracted from the templates.\n */\nexport class MessageBundle {\n  private _messages: i18n.Message[] = [];\n\n  constructor(\n      private _htmlParser: HtmlParser, private _implicitTags: string[],\n      private _implicitAttrs: {[k: string]: string[]}, private _locale: string|null = null) {}\n\n  updateFromTemplate(html: string, url: string, interpolationConfig: InterpolationConfig):\n      ParseError[] {\n    const htmlParserResult =\n        this._htmlParser.parse(html, url, {tokenizeExpansionForms: true, interpolationConfig});\n\n    if (htmlParserResult.errors.length) {\n      return htmlParserResult.errors;\n    }\n\n    const i18nParserResult = extractMessages(\n        htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n\n    if (i18nParserResult.errors.length) {\n      return i18nParserResult.errors;\n    }\n\n    this._messages.push(...i18nParserResult.messages);\n    return [];\n  }\n\n  // Return the message in the internal format\n  // The public (serialized) format might be different, see the `write` method.\n  getMessages(): i18n.Message[] { return this._messages; }\n\n  write(serializer: Serializer, filterSources?: (path: string) => string): string {\n    const messages: {[id: string]: i18n.Message} = {};\n    const mapperVisitor = new MapPlaceholderNames();\n\n    // Deduplicate messages based on their ID\n    this._messages.forEach(message => {\n      const id = serializer.digest(message);\n      if (!messages.hasOwnProperty(id)) {\n        messages[id] = message;\n      } else {\n        messages[id].sources.push(...message.sources);\n      }\n    });\n\n    // Transform placeholder names using the serializer mapping\n    const msgList = Object.keys(messages).map(id => {\n      const mapper = serializer.createNameMapper(messages[id]);\n      const src = messages[id];\n      const nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n      let transformedMessage = new i18n.Message(nodes, {}, {}, src.meaning, src.description, id);\n      transformedMessage.sources = src.sources;\n      if (filterSources) {\n        transformedMessage.sources.forEach(\n            (source: i18n.MessageSpan) => source.filePath = filterSources(source.filePath));\n      }\n      return transformedMessage;\n    });\n\n    return serializer.write(msgList, this._locale);\n  }\n}\n\n// Transform an i18n AST by renaming the placeholder nodes with the given mapper\nclass MapPlaceholderNames extends i18n.CloneVisitor {\n  convert(nodes: i18n.Node[], mapper: PlaceholderMapper): i18n.Node[] {\n    return mapper ? nodes.map(n => n.visit(this, mapper)) : nodes;\n  }\n\n  visitTagPlaceholder(ph: i18n.TagPlaceholder, mapper: PlaceholderMapper): i18n.TagPlaceholder {\n    const startName = mapper.toPublicName(ph.startName) !;\n    const closeName = ph.closeName ? mapper.toPublicName(ph.closeName) ! : ph.closeName;\n    const children = ph.children.map(n => n.visit(this, mapper));\n    return new i18n.TagPlaceholder(\n        ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan);\n  }\n\n  visitPlaceholder(ph: i18n.Placeholder, mapper: PlaceholderMapper): i18n.Placeholder {\n    return new i18n.Placeholder(ph.value, mapper.toPublicName(ph.name) !, ph.sourceSpan);\n  }\n\n  visitIcuPlaceholder(ph: i18n.IcuPlaceholder, mapper: PlaceholderMapper): i18n.IcuPlaceholder {\n    return new i18n.IcuPlaceholder(ph.value, mapper.toPublicName(ph.name) !, ph.sourceSpan);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Statement, areAllEquivalent} from '../output/output_ast';\nimport {TypeScriptEmitter} from '../output/ts_emitter';\n\nexport class GeneratedFile {\n  public source: string|null;\n  public stmts: Statement[]|null;\n\n  constructor(\n      public srcFileUrl: string, public genFileUrl: string, sourceOrStmts: string|Statement[]) {\n    if (typeof sourceOrStmts === 'string') {\n      this.source = sourceOrStmts;\n      this.stmts = null;\n    } else {\n      this.source = null;\n      this.stmts = sourceOrStmts;\n    }\n  }\n\n  isEquivalent(other: GeneratedFile): boolean {\n    if (this.genFileUrl !== other.genFileUrl) {\n      return false;\n    }\n    if (this.source) {\n      return this.source === other.source;\n    }\n    if (other.stmts == null) {\n      return false;\n    }\n    // Note: the constructor guarantees that if this.source is not filled,\n    // then this.stmts is.\n    return areAllEquivalent(this.stmts !, other.stmts !);\n  }\n}\n\nexport function toTypeScript(file: GeneratedFile, preamble: string = ''): string {\n  if (!file.stmts) {\n    throw new Error(`Illegal state: No stmts present on GeneratedFile ${file.genFileUrl}`);\n  }\n  return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileNgModuleMetadata, tokenReference} from '../compile_metadata';\nimport {Route} from '../core';\nimport {CompileMetadataResolver} from '../metadata_resolver';\n\nimport {AotCompilerHost} from './compiler_host';\nimport {StaticReflector} from './static_reflector';\nimport {StaticSymbol} from './static_symbol';\n\nexport interface LazyRoute {\n  module: StaticSymbol;\n  route: string;\n  referencedModule: StaticSymbol;\n}\n\nexport function listLazyRoutes(\n    moduleMeta: CompileNgModuleMetadata, reflector: StaticReflector): LazyRoute[] {\n  const allLazyRoutes: LazyRoute[] = [];\n  for (const {provider, module} of moduleMeta.transitiveModule.providers) {\n    if (tokenReference(provider.token) === reflector.ROUTES) {\n      const loadChildren = _collectLoadChildren(provider.useValue);\n      for (const route of loadChildren) {\n        allLazyRoutes.push(parseLazyRoute(route, reflector, module.reference));\n      }\n    }\n  }\n  return allLazyRoutes;\n}\n\nfunction _collectLoadChildren(routes: string | Route | Route[], target: string[] = []): string[] {\n  if (typeof routes === 'string') {\n    target.push(routes);\n  } else if (Array.isArray(routes)) {\n    for (const route of routes) {\n      _collectLoadChildren(route, target);\n    }\n  } else if (routes.loadChildren) {\n    _collectLoadChildren(routes.loadChildren, target);\n  } else if (routes.children) {\n    _collectLoadChildren(routes.children, target);\n  }\n  return target;\n}\n\nexport function parseLazyRoute(\n    route: string, reflector: StaticReflector, module?: StaticSymbol): LazyRoute {\n  const [routePath, routeName] = route.split('#');\n  const referencedModule = reflector.resolveExternalReference(\n      {\n        moduleName: routePath,\n        name: routeName,\n      },\n      module ? module.filePath : undefined);\n  return {route: route, module: module || referencedModule, referencedModule};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SummaryResolver} from '../summary_resolver';\nimport {ValueTransformer, visitValue} from '../util';\n\nimport {StaticSymbol, StaticSymbolCache} from './static_symbol';\nimport {isGeneratedFile, stripSummaryForJitFileSuffix, stripSummaryForJitNameSuffix, summaryForJitFileName, summaryForJitName} from './util';\n\nconst TS = /^(?!.*\\.d\\.ts$).*\\.ts$/;\n\nexport class ResolvedStaticSymbol {\n  constructor(public symbol: StaticSymbol, public metadata: any) {}\n}\n\n/**\n * The host of the SymbolResolverHost disconnects the implementation from TypeScript / other\n * language\n * services and from underlying file systems.\n */\nexport interface StaticSymbolResolverHost {\n  /**\n   * Return a ModuleMetadata for the given module.\n   * Angular CLI will produce this metadata for a module whenever a .d.ts files is\n   * produced and the module has exported variables or classes with decorators. Module metadata can\n   * also be produced directly from TypeScript sources by using MetadataCollector in tools/metadata.\n   *\n   * @param modulePath is a string identifier for a module as an absolute path.\n   * @returns the metadata for the given module.\n   */\n  getMetadataFor(modulePath: string): {[key: string]: any}[]|undefined;\n\n  /**\n   * Converts a module name that is used in an `import` to a file path.\n   * I.e.\n   * `path/to/containingFile.ts` containing `import {...} from 'module-name'`.\n   */\n  moduleNameToFileName(moduleName: string, containingFile?: string): string|null;\n\n  /**\n   * Get a file suitable for display to the user that should be relative to the project directory\n   * or the current directory.\n   */\n  getOutputName(filePath: string): string;\n}\n\nconst SUPPORTED_SCHEMA_VERSION = 4;\n\n/**\n * This class is responsible for loading metadata per symbol,\n * and normalizing references between symbols.\n *\n * Internally, it only uses symbols without members,\n * and deduces the values for symbols with members based\n * on these symbols.\n */\nexport class StaticSymbolResolver {\n  private metadataCache = new Map<string, {[key: string]: any}>();\n  // Note: this will only contain StaticSymbols without members!\n  private resolvedSymbols = new Map<StaticSymbol, ResolvedStaticSymbol>();\n  private resolvedFilePaths = new Set<string>();\n  // Note: this will only contain StaticSymbols without members!\n  private importAs = new Map<StaticSymbol, StaticSymbol>();\n  private symbolResourcePaths = new Map<StaticSymbol, string>();\n  private symbolFromFile = new Map<string, StaticSymbol[]>();\n  private knownFileNameToModuleNames = new Map<string, string>();\n\n  constructor(\n      private host: StaticSymbolResolverHost, private staticSymbolCache: StaticSymbolCache,\n      private summaryResolver: SummaryResolver<StaticSymbol>,\n      private errorRecorder?: (error: any, fileName?: string) => void) {}\n\n  resolveSymbol(staticSymbol: StaticSymbol): ResolvedStaticSymbol {\n    if (staticSymbol.members.length > 0) {\n      return this._resolveSymbolMembers(staticSymbol) !;\n    }\n    // Note: always ask for a summary first,\n    // as we might have read shallow metadata via a .d.ts file\n    // for the symbol.\n    const resultFromSummary = this._resolveSymbolFromSummary(staticSymbol) !;\n    if (resultFromSummary) {\n      return resultFromSummary;\n    }\n    const resultFromCache = this.resolvedSymbols.get(staticSymbol);\n    if (resultFromCache) {\n      return resultFromCache;\n    }\n    // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n    // have summaries, only .d.ts files. So we always need to check both, the summary\n    // and metadata.\n    this._createSymbolsOf(staticSymbol.filePath);\n    return this.resolvedSymbols.get(staticSymbol) !;\n  }\n\n  /**\n   * getImportAs produces a symbol that can be used to import the given symbol.\n   * The import might be different than the symbol if the symbol is exported from\n   * a library with a summary; in which case we want to import the symbol from the\n   * ngfactory re-export instead of directly to avoid introducing a direct dependency\n   * on an otherwise indirect dependency.\n   *\n   * @param staticSymbol the symbol for which to generate a import symbol\n   */\n  getImportAs(staticSymbol: StaticSymbol, useSummaries: boolean = true): StaticSymbol|null {\n    if (staticSymbol.members.length) {\n      const baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);\n      const baseImportAs = this.getImportAs(baseSymbol, useSummaries);\n      return baseImportAs ?\n          this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) :\n          null;\n    }\n    const summarizedFileName = stripSummaryForJitFileSuffix(staticSymbol.filePath);\n    if (summarizedFileName !== staticSymbol.filePath) {\n      const summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);\n      const baseSymbol =\n          this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);\n      const baseImportAs = this.getImportAs(baseSymbol, useSummaries);\n      return baseImportAs ?\n          this.getStaticSymbol(\n              summaryForJitFileName(baseImportAs.filePath), summaryForJitName(baseImportAs.name),\n              baseSymbol.members) :\n          null;\n    }\n    let result = (useSummaries && this.summaryResolver.getImportAs(staticSymbol)) || null;\n    if (!result) {\n      result = this.importAs.get(staticSymbol) !;\n    }\n    return result;\n  }\n\n  /**\n   * getResourcePath produces the path to the original location of the symbol and should\n   * be used to determine the relative location of resource references recorded in\n   * symbol metadata.\n   */\n  getResourcePath(staticSymbol: StaticSymbol): string {\n    return this.symbolResourcePaths.get(staticSymbol) || staticSymbol.filePath;\n  }\n\n  /**\n   * getTypeArity returns the number of generic type parameters the given symbol\n   * has. If the symbol is not a type the result is null.\n   */\n  getTypeArity(staticSymbol: StaticSymbol): number|null {\n    // If the file is a factory/ngsummary file, don't resolve the symbol as doing so would\n    // cause the metadata for an factory/ngsummary file to be loaded which doesn't exist.\n    // All references to generated classes must include the correct arity whenever\n    // generating code.\n    if (isGeneratedFile(staticSymbol.filePath)) {\n      return null;\n    }\n    let resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(staticSymbol));\n    while (resolvedSymbol && resolvedSymbol.metadata instanceof StaticSymbol) {\n      resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(resolvedSymbol.metadata));\n    }\n    return (resolvedSymbol && resolvedSymbol.metadata && resolvedSymbol.metadata.arity) || null;\n  }\n\n  getKnownModuleName(filePath: string): string|null {\n    return this.knownFileNameToModuleNames.get(filePath) || null;\n  }\n\n  recordImportAs(sourceSymbol: StaticSymbol, targetSymbol: StaticSymbol) {\n    sourceSymbol.assertNoMembers();\n    targetSymbol.assertNoMembers();\n    this.importAs.set(sourceSymbol, targetSymbol);\n  }\n\n  recordModuleNameForFileName(fileName: string, moduleName: string) {\n    this.knownFileNameToModuleNames.set(fileName, moduleName);\n  }\n\n  /**\n   * Invalidate all information derived from the given file.\n   *\n   * @param fileName the file to invalidate\n   */\n  invalidateFile(fileName: string) {\n    this.metadataCache.delete(fileName);\n    this.resolvedFilePaths.delete(fileName);\n    const symbols = this.symbolFromFile.get(fileName);\n    if (symbols) {\n      this.symbolFromFile.delete(fileName);\n      for (const symbol of symbols) {\n        this.resolvedSymbols.delete(symbol);\n        this.importAs.delete(symbol);\n        this.symbolResourcePaths.delete(symbol);\n      }\n    }\n  }\n\n  /** @internal */\n  ignoreErrorsFor<T>(cb: () => T) {\n    const recorder = this.errorRecorder;\n    this.errorRecorder = () => {};\n    try {\n      return cb();\n    } finally {\n      this.errorRecorder = recorder;\n    }\n  }\n\n  private _resolveSymbolMembers(staticSymbol: StaticSymbol): ResolvedStaticSymbol|null {\n    const members = staticSymbol.members;\n    const baseResolvedSymbol =\n        this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name));\n    if (!baseResolvedSymbol) {\n      return null;\n    }\n    let baseMetadata = unwrapResolvedMetadata(baseResolvedSymbol.metadata);\n    if (baseMetadata instanceof StaticSymbol) {\n      return new ResolvedStaticSymbol(\n          staticSymbol, this.getStaticSymbol(baseMetadata.filePath, baseMetadata.name, members));\n    } else if (baseMetadata && baseMetadata.__symbolic === 'class') {\n      if (baseMetadata.statics && members.length === 1) {\n        return new ResolvedStaticSymbol(staticSymbol, baseMetadata.statics[members[0]]);\n      }\n    } else {\n      let value = baseMetadata;\n      for (let i = 0; i < members.length && value; i++) {\n        value = value[members[i]];\n      }\n      return new ResolvedStaticSymbol(staticSymbol, value);\n    }\n    return null;\n  }\n\n  private _resolveSymbolFromSummary(staticSymbol: StaticSymbol): ResolvedStaticSymbol|null {\n    const summary = this.summaryResolver.resolveSummary(staticSymbol);\n    return summary ? new ResolvedStaticSymbol(staticSymbol, summary.metadata) : null;\n  }\n\n  /**\n   * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n   * All types passed to the StaticResolver should be pseudo-types returned by this method.\n   *\n   * @param declarationFile the absolute path of the file where the symbol is declared\n   * @param name the name of the type.\n   * @param members a symbol for a static member of the named type\n   */\n  getStaticSymbol(declarationFile: string, name: string, members?: string[]): StaticSymbol {\n    return this.staticSymbolCache.get(declarationFile, name, members);\n  }\n\n  /**\n   * hasDecorators checks a file's metadata for the presence of decorators without evaluating the\n   * metadata.\n   *\n   * @param filePath the absolute path to examine for decorators.\n   * @returns true if any class in the file has a decorator.\n   */\n  hasDecorators(filePath: string): boolean {\n    const metadata = this.getModuleMetadata(filePath);\n    if (metadata['metadata']) {\n      return Object.keys(metadata['metadata']).some((metadataKey) => {\n        const entry = metadata['metadata'][metadataKey];\n        return entry && entry.__symbolic === 'class' && entry.decorators;\n      });\n    }\n    return false;\n  }\n\n  getSymbolsOf(filePath: string): StaticSymbol[] {\n    const summarySymbols = this.summaryResolver.getSymbolsOf(filePath);\n    if (summarySymbols) {\n      return summarySymbols;\n    }\n    // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n    // have summaries, only .d.ts files, but `summaryResolver.isLibraryFile` returns true.\n    this._createSymbolsOf(filePath);\n    const metadataSymbols: StaticSymbol[] = [];\n    this.resolvedSymbols.forEach((resolvedSymbol) => {\n      if (resolvedSymbol.symbol.filePath === filePath) {\n        metadataSymbols.push(resolvedSymbol.symbol);\n      }\n    });\n    return metadataSymbols;\n  }\n\n  private _createSymbolsOf(filePath: string) {\n    if (this.resolvedFilePaths.has(filePath)) {\n      return;\n    }\n    this.resolvedFilePaths.add(filePath);\n    const resolvedSymbols: ResolvedStaticSymbol[] = [];\n    const metadata = this.getModuleMetadata(filePath);\n    if (metadata['importAs']) {\n      // Index bundle indices should use the importAs module name defined\n      // in the bundle.\n      this.knownFileNameToModuleNames.set(filePath, metadata['importAs']);\n    }\n    // handle the symbols in one of the re-export location\n    if (metadata['exports']) {\n      for (const moduleExport of metadata['exports']) {\n        // handle the symbols in the list of explicitly re-exported symbols.\n        if (moduleExport.export) {\n          moduleExport.export.forEach((exportSymbol: any) => {\n            let symbolName: string;\n            if (typeof exportSymbol === 'string') {\n              symbolName = exportSymbol;\n            } else {\n              symbolName = exportSymbol.as;\n            }\n            symbolName = unescapeIdentifier(symbolName);\n            let symName = symbolName;\n            if (typeof exportSymbol !== 'string') {\n              symName = unescapeIdentifier(exportSymbol.name);\n            }\n            const resolvedModule = this.resolveModule(moduleExport.from, filePath);\n            if (resolvedModule) {\n              const targetSymbol = this.getStaticSymbol(resolvedModule, symName);\n              const sourceSymbol = this.getStaticSymbol(filePath, symbolName);\n              resolvedSymbols.push(this.createExport(sourceSymbol, targetSymbol));\n            }\n          });\n        } else {\n          // handle the symbols via export * directives.\n          const resolvedModule = this.resolveModule(moduleExport.from, filePath);\n          if (resolvedModule) {\n            const nestedExports = this.getSymbolsOf(resolvedModule);\n            nestedExports.forEach((targetSymbol) => {\n              const sourceSymbol = this.getStaticSymbol(filePath, targetSymbol.name);\n              resolvedSymbols.push(this.createExport(sourceSymbol, targetSymbol));\n            });\n          }\n        }\n      }\n    }\n\n    // handle the actual metadata. Has to be after the exports\n    // as there might be collisions in the names, and we want the symbols\n    // of the current module to win ofter reexports.\n    if (metadata['metadata']) {\n      // handle direct declarations of the symbol\n      const topLevelSymbolNames =\n          new Set<string>(Object.keys(metadata['metadata']).map(unescapeIdentifier));\n      const origins: {[index: string]: string} = metadata['origins'] || {};\n      Object.keys(metadata['metadata']).forEach((metadataKey) => {\n        const symbolMeta = metadata['metadata'][metadataKey];\n        const name = unescapeIdentifier(metadataKey);\n\n        const symbol = this.getStaticSymbol(filePath, name);\n\n        const origin = origins.hasOwnProperty(metadataKey) && origins[metadataKey];\n        if (origin) {\n          // If the symbol is from a bundled index, use the declaration location of the\n          // symbol so relative references (such as './my.html') will be calculated\n          // correctly.\n          const originFilePath = this.resolveModule(origin, filePath);\n          if (!originFilePath) {\n            this.reportError(new Error(\n                `Couldn't resolve original symbol for ${origin} from ${this.host.getOutputName(filePath)}`));\n          } else {\n            this.symbolResourcePaths.set(symbol, originFilePath);\n          }\n        }\n        resolvedSymbols.push(\n            this.createResolvedSymbol(symbol, filePath, topLevelSymbolNames, symbolMeta));\n      });\n    }\n    resolvedSymbols.forEach(\n        (resolvedSymbol) => this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol));\n    this.symbolFromFile.set(filePath, resolvedSymbols.map(resolvedSymbol => resolvedSymbol.symbol));\n  }\n\n  private createResolvedSymbol(\n      sourceSymbol: StaticSymbol, topLevelPath: string, topLevelSymbolNames: Set<string>,\n      metadata: any): ResolvedStaticSymbol {\n    // For classes that don't have Angular summaries / metadata,\n    // we only keep their arity, but nothing else\n    // (e.g. their constructor parameters).\n    // We do this to prevent introducing deep imports\n    // as we didn't generate .ngfactory.ts files with proper reexports.\n    const isTsFile = TS.test(sourceSymbol.filePath);\n    if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && !isTsFile && metadata &&\n        metadata['__symbolic'] === 'class') {\n      const transformedMeta = {__symbolic: 'class', arity: metadata.arity};\n      return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);\n    }\n\n    let _originalFileMemo: string|undefined;\n    const getOriginalName: () => string = () => {\n      if (!_originalFileMemo) {\n        // Guess what the original file name is from the reference. If it has a `.d.ts` extension\n        // replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have\n        // .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`\n        // location as it is not important to finding the file.\n        _originalFileMemo =\n            this.host.getOutputName(topLevelPath.replace(/((\\.ts)|(\\.d\\.ts)|)$/, '.ts')\n                                        .replace(/^.*node_modules[/\\\\]/, ''));\n      }\n      return _originalFileMemo;\n    };\n\n    const self = this;\n\n    class ReferenceTransformer extends ValueTransformer {\n      visitStringMap(map: {[key: string]: any}, functionParams: string[]): any {\n        const symbolic = map['__symbolic'];\n        if (symbolic === 'function') {\n          const oldLen = functionParams.length;\n          functionParams.push(...(map['parameters'] || []));\n          const result = super.visitStringMap(map, functionParams);\n          functionParams.length = oldLen;\n          return result;\n        } else if (symbolic === 'reference') {\n          const module = map['module'];\n          const name = map['name'] ? unescapeIdentifier(map['name']) : map['name'];\n          if (!name) {\n            return null;\n          }\n          let filePath: string;\n          if (module) {\n            filePath = self.resolveModule(module, sourceSymbol.filePath) !;\n            if (!filePath) {\n              return {\n                __symbolic: 'error',\n                message: `Could not resolve ${module} relative to ${\n                    self.host.getMetadataFor(sourceSymbol.filePath)}.`,\n                line: map['line'],\n                character: map['character'],\n                fileName: getOriginalName()\n              };\n            }\n            return {\n              __symbolic: 'resolved',\n              symbol: self.getStaticSymbol(filePath, name),\n              line: map['line'],\n              character: map['character'],\n              fileName: getOriginalName()\n            };\n          } else if (functionParams.indexOf(name) >= 0) {\n            // reference to a function parameter\n            return {__symbolic: 'reference', name: name};\n          } else {\n            if (topLevelSymbolNames.has(name)) {\n              return self.getStaticSymbol(topLevelPath, name);\n            }\n            // ambient value\n            null;\n          }\n        } else if (symbolic === 'error') {\n          return {...map, fileName: getOriginalName()};\n        } else {\n          return super.visitStringMap(map, functionParams);\n        }\n      }\n    }\n    const transformedMeta = visitValue(metadata, new ReferenceTransformer(), []);\n    let unwrappedTransformedMeta = unwrapResolvedMetadata(transformedMeta);\n    if (unwrappedTransformedMeta instanceof StaticSymbol) {\n      return this.createExport(sourceSymbol, unwrappedTransformedMeta);\n    }\n    return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);\n  }\n\n  private createExport(sourceSymbol: StaticSymbol, targetSymbol: StaticSymbol):\n      ResolvedStaticSymbol {\n    sourceSymbol.assertNoMembers();\n    targetSymbol.assertNoMembers();\n    if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) &&\n        this.summaryResolver.isLibraryFile(targetSymbol.filePath)) {\n      // This case is for an ng library importing symbols from a plain ts library\n      // transitively.\n      // Note: We rely on the fact that we discover symbols in the direction\n      // from source files to library files\n      this.importAs.set(targetSymbol, this.getImportAs(sourceSymbol) || sourceSymbol);\n    }\n    return new ResolvedStaticSymbol(sourceSymbol, targetSymbol);\n  }\n\n  private reportError(error: Error, context?: StaticSymbol, path?: string) {\n    if (this.errorRecorder) {\n      this.errorRecorder(error, (context && context.filePath) || path);\n    } else {\n      throw error;\n    }\n  }\n\n  /**\n   * @param module an absolute path to a module file.\n   */\n  private getModuleMetadata(module: string): {[key: string]: any} {\n    let moduleMetadata = this.metadataCache.get(module);\n    if (!moduleMetadata) {\n      const moduleMetadatas = this.host.getMetadataFor(module);\n      if (moduleMetadatas) {\n        let maxVersion = -1;\n        moduleMetadatas.forEach((md) => {\n          if (md && md['version'] > maxVersion) {\n            maxVersion = md['version'];\n            moduleMetadata = md;\n          }\n        });\n      }\n      if (!moduleMetadata) {\n        moduleMetadata =\n            {__symbolic: 'module', version: SUPPORTED_SCHEMA_VERSION, module: module, metadata: {}};\n      }\n      if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION) {\n        const errorMessage = moduleMetadata['version'] == 2 ?\n            `Unsupported metadata version ${moduleMetadata['version']} for module ${module}. This module should be compiled with a newer version of ngc` :\n            `Metadata version mismatch for module ${this.host.getOutputName(module)}, found version ${moduleMetadata['version']}, expected ${SUPPORTED_SCHEMA_VERSION}`;\n        this.reportError(new Error(errorMessage));\n      }\n      this.metadataCache.set(module, moduleMetadata);\n    }\n    return moduleMetadata;\n  }\n\n\n  getSymbolByModule(module: string, symbolName: string, containingFile?: string): StaticSymbol {\n    const filePath = this.resolveModule(module, containingFile);\n    if (!filePath) {\n      this.reportError(\n          new Error(`Could not resolve module ${module}${containingFile ? ' relative to ' +\n            this.host.getOutputName(containingFile) : ''}`));\n      return this.getStaticSymbol(`ERROR:${module}`, symbolName);\n    }\n    return this.getStaticSymbol(filePath, symbolName);\n  }\n\n  private resolveModule(module: string, containingFile?: string): string|null {\n    try {\n      return this.host.moduleNameToFileName(module, containingFile);\n    } catch (e) {\n      console.error(`Could not resolve module '${module}' relative to file ${containingFile}`);\n      this.reportError(e, undefined, containingFile);\n    }\n    return null;\n  }\n}\n\n// Remove extra underscore from escaped identifier.\n// See https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts\nexport function unescapeIdentifier(identifier: string): string {\n  return identifier.startsWith('___') ? identifier.substr(1) : identifier;\n}\n\nexport function unwrapResolvedMetadata(metadata: any): any {\n  if (metadata && metadata.__symbolic === 'resolved') {\n    return metadata.symbol;\n  }\n  return metadata;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CompileDirectiveMetadata, CompileDirectiveSummary, CompileNgModuleMetadata, CompileNgModuleSummary, CompilePipeMetadata, CompileProviderMetadata, CompileSummaryKind, CompileTypeMetadata, CompileTypeSummary} from '../compile_metadata';\nimport * as o from '../output/output_ast';\nimport {Summary, SummaryResolver} from '../summary_resolver';\nimport {OutputContext, ValueTransformer, ValueVisitor, visitValue} from '../util';\n\nimport {StaticSymbol, StaticSymbolCache} from './static_symbol';\nimport {ResolvedStaticSymbol, StaticSymbolResolver, unwrapResolvedMetadata} from './static_symbol_resolver';\nimport {isLoweredSymbol, ngfactoryFilePath, summaryForJitFileName, summaryForJitName} from './util';\n\nexport function serializeSummaries(\n    srcFileName: string, forJitCtx: OutputContext | null,\n    summaryResolver: SummaryResolver<StaticSymbol>, symbolResolver: StaticSymbolResolver,\n    symbols: ResolvedStaticSymbol[], types: {\n      summary: CompileTypeSummary,\n      metadata: CompileNgModuleMetadata | CompileDirectiveMetadata | CompilePipeMetadata |\n          CompileTypeMetadata\n    }[],\n    createExternalSymbolReexports =\n        false): {json: string, exportAs: {symbol: StaticSymbol, exportAs: string}[]} {\n  const toJsonSerializer = new ToJsonSerializer(symbolResolver, summaryResolver, srcFileName);\n\n  // for symbols, we use everything except for the class metadata itself\n  // (we keep the statics though), as the class metadata is contained in the\n  // CompileTypeSummary.\n  symbols.forEach(\n      (resolvedSymbol) => toJsonSerializer.addSummary(\n          {symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata}));\n\n  // Add type summaries.\n  types.forEach(({summary, metadata}) => {\n    toJsonSerializer.addSummary(\n        {symbol: summary.type.reference, metadata: undefined, type: summary});\n  });\n  const {json, exportAs} = toJsonSerializer.serialize(createExternalSymbolReexports);\n  if (forJitCtx) {\n    const forJitSerializer = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);\n    types.forEach(({summary, metadata}) => { forJitSerializer.addSourceType(summary, metadata); });\n    toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach((summary) => {\n      if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {\n        forJitSerializer.addLibType(summary.type);\n      }\n    });\n    forJitSerializer.serialize(exportAs);\n  }\n  return {json, exportAs};\n}\n\nexport function deserializeSummaries(\n    symbolCache: StaticSymbolCache, summaryResolver: SummaryResolver<StaticSymbol>,\n    libraryFileName: string, json: string): {\n  moduleName: string | null,\n  summaries: Summary<StaticSymbol>[],\n  importAs: {symbol: StaticSymbol, importAs: StaticSymbol}[]\n} {\n  const deserializer = new FromJsonDeserializer(symbolCache, summaryResolver);\n  return deserializer.deserialize(libraryFileName, json);\n}\n\nexport function createForJitStub(outputCtx: OutputContext, reference: StaticSymbol) {\n  return createSummaryForJitFunction(outputCtx, reference, o.NULL_EXPR);\n}\n\nfunction createSummaryForJitFunction(\n    outputCtx: OutputContext, reference: StaticSymbol, value: o.Expression) {\n  const fnName = summaryForJitName(reference.name);\n  outputCtx.statements.push(\n      o.fn([], [new o.ReturnStatement(value)], new o.ArrayType(o.DYNAMIC_TYPE)).toDeclStmt(fnName, [\n        o.StmtModifier.Final, o.StmtModifier.Exported\n      ]));\n}\n\nconst enum SerializationFlags {\n  None = 0,\n  ResolveValue = 1,\n}\n\nclass ToJsonSerializer extends ValueTransformer {\n  // Note: This only contains symbols without members.\n  private symbols: StaticSymbol[] = [];\n  private indexBySymbol = new Map<StaticSymbol, number>();\n  private reexportedBy = new Map<StaticSymbol, StaticSymbol>();\n  // This now contains a `__symbol: number` in the place of\n  // StaticSymbols, but otherwise has the same shape as the original objects.\n  private processedSummaryBySymbol = new Map<StaticSymbol, any>();\n  private processedSummaries: any[] = [];\n  private moduleName: string|null;\n\n  unprocessedSymbolSummariesBySymbol = new Map<StaticSymbol, Summary<StaticSymbol>>();\n\n  constructor(\n      private symbolResolver: StaticSymbolResolver,\n      private summaryResolver: SummaryResolver<StaticSymbol>, private srcFileName: string) {\n    super();\n    this.moduleName = symbolResolver.getKnownModuleName(srcFileName);\n  }\n\n  addSummary(summary: Summary<StaticSymbol>) {\n    let unprocessedSummary = this.unprocessedSymbolSummariesBySymbol.get(summary.symbol);\n    let processedSummary = this.processedSummaryBySymbol.get(summary.symbol);\n    if (!unprocessedSummary) {\n      unprocessedSummary = {symbol: summary.symbol, metadata: undefined};\n      this.unprocessedSymbolSummariesBySymbol.set(summary.symbol, unprocessedSummary);\n      processedSummary = {symbol: this.processValue(summary.symbol, SerializationFlags.None)};\n      this.processedSummaries.push(processedSummary);\n      this.processedSummaryBySymbol.set(summary.symbol, processedSummary);\n    }\n    if (!unprocessedSummary.metadata && summary.metadata) {\n      let metadata = summary.metadata || {};\n      if (metadata.__symbolic === 'class') {\n        // For classes, we keep everything except their class decorators.\n        // We need to keep e.g. the ctor args, method names, method decorators\n        // so that the class can be extended in another compilation unit.\n        // We don't keep the class decorators as\n        // 1) they refer to data\n        //   that should not cause a rebuild of downstream compilation units\n        //   (e.g. inline templates of @Component, or @NgModule.declarations)\n        // 2) their data is already captured in TypeSummaries, e.g. DirectiveSummary.\n        const clone: {[key: string]: any} = {};\n        Object.keys(metadata).forEach((propName) => {\n          if (propName !== 'decorators') {\n            clone[propName] = metadata[propName];\n          }\n        });\n        metadata = clone;\n      } else if (isCall(metadata)) {\n        if (!isFunctionCall(metadata) && !isMethodCallOnVariable(metadata)) {\n          // Don't store complex calls as we won't be able to simplify them anyways later on.\n          metadata = {\n            __symbolic: 'error',\n            message: 'Complex function calls are not supported.',\n          };\n        }\n      }\n      // Note: We need to keep storing ctor calls for e.g.\n      // `export const x = new InjectionToken(...)`\n      unprocessedSummary.metadata = metadata;\n      processedSummary.metadata = this.processValue(metadata, SerializationFlags.ResolveValue);\n      if (metadata instanceof StaticSymbol &&\n          this.summaryResolver.isLibraryFile(metadata.filePath)) {\n        const declarationSymbol = this.symbols[this.indexBySymbol.get(metadata) !];\n        if (!isLoweredSymbol(declarationSymbol.name)) {\n          // Note: symbols that were introduced during codegen in the user file can have a reexport\n          // if a user used `export *`. However, we can't rely on this as tsickle will change\n          // `export *` into named exports, using only the information from the typechecker.\n          // As we introduce the new symbols after typecheck, Tsickle does not know about them,\n          // and omits them when expanding `export *`.\n          // So we have to keep reexporting these symbols manually via .ngfactory files.\n          this.reexportedBy.set(declarationSymbol, summary.symbol);\n        }\n      }\n    }\n    if (!unprocessedSummary.type && summary.type) {\n      unprocessedSummary.type = summary.type;\n      // Note: We don't add the summaries of all referenced symbols as for the ResolvedSymbols,\n      // as the type summaries already contain the transitive data that they require\n      // (in a minimal way).\n      processedSummary.type = this.processValue(summary.type, SerializationFlags.None);\n      // except for reexported directives / pipes, so we need to store\n      // their summaries explicitly.\n      if (summary.type.summaryKind === CompileSummaryKind.NgModule) {\n        const ngModuleSummary = <CompileNgModuleSummary>summary.type;\n        ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach((id) => {\n          const symbol: StaticSymbol = id.reference;\n          if (this.summaryResolver.isLibraryFile(symbol.filePath) &&\n              !this.unprocessedSymbolSummariesBySymbol.has(symbol)) {\n            const summary = this.summaryResolver.resolveSummary(symbol);\n            if (summary) {\n              this.addSummary(summary);\n            }\n          }\n        });\n      }\n    }\n  }\n\n  /**\n   * @param createExternalSymbolReexports Whether external static symbols should be re-exported.\n   * This can be enabled if external symbols should be re-exported by the current module in\n   * order to avoid dynamically generated module dependencies which can break strict dependency\n   * enforcements (as in Google3). Read more here: https://github.com/angular/angular/issues/25644\n   */\n  serialize(createExternalSymbolReexports: boolean):\n      {json: string, exportAs: {symbol: StaticSymbol, exportAs: string}[]} {\n    const exportAs: {symbol: StaticSymbol, exportAs: string}[] = [];\n    const json = JSON.stringify({\n      moduleName: this.moduleName,\n      summaries: this.processedSummaries,\n      symbols: this.symbols.map((symbol, index) => {\n        symbol.assertNoMembers();\n        let importAs: string|number = undefined !;\n        if (this.summaryResolver.isLibraryFile(symbol.filePath)) {\n          const reexportSymbol = this.reexportedBy.get(symbol);\n          if (reexportSymbol) {\n            // In case the given external static symbol is already manually exported by the\n            // user, we just proxy the external static symbol reference to the manual export.\n            // This ensures that the AOT compiler imports the external symbol through the\n            // user export and does not introduce another dependency which is not needed.\n            importAs = this.indexBySymbol.get(reexportSymbol) !;\n          } else if (createExternalSymbolReexports) {\n            // In this case, the given external static symbol is *not* manually exported by\n            // the user, and we manually create a re-export in the factory file so that we\n            // don't introduce another module dependency. This is useful when running within\n            // Bazel so that the AOT compiler does not introduce any module dependencies\n            // which can break the strict dependency enforcement. (e.g. as in Google3)\n            // Read more about this here: https://github.com/angular/angular/issues/25644\n            const summary = this.unprocessedSymbolSummariesBySymbol.get(symbol);\n            if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {\n              importAs = `${symbol.name}_${index}`;\n              exportAs.push({symbol, exportAs: importAs});\n            }\n          }\n        }\n        return {\n          __symbol: index,\n          name: symbol.name,\n          filePath: this.summaryResolver.toSummaryFileName(symbol.filePath, this.srcFileName),\n          importAs: importAs\n        };\n      })\n    });\n    return {json, exportAs};\n  }\n\n  private processValue(value: any, flags: SerializationFlags): any {\n    return visitValue(value, this, flags);\n  }\n\n  visitOther(value: any, context: any): any {\n    if (value instanceof StaticSymbol) {\n      let baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name);\n      const index = this.visitStaticSymbol(baseSymbol, context);\n      return {__symbol: index, members: value.members};\n    }\n  }\n\n  /**\n   * Strip line and character numbers from ngsummaries.\n   * Emitting them causes white spaces changes to retrigger upstream\n   * recompilations in bazel.\n   * TODO: find out a way to have line and character numbers in errors without\n   * excessive recompilation in bazel.\n   */\n  visitStringMap(map: {[key: string]: any}, context: any): any {\n    if (map['__symbolic'] === 'resolved') {\n      return visitValue(map['symbol'], this, context);\n    }\n    if (map['__symbolic'] === 'error') {\n      delete map['line'];\n      delete map['character'];\n    }\n    return super.visitStringMap(map, context);\n  }\n\n  /**\n   * Returns null if the options.resolveValue is true, and the summary for the symbol\n   * resolved to a type or could not be resolved.\n   */\n  private visitStaticSymbol(baseSymbol: StaticSymbol, flags: SerializationFlags): number {\n    let index: number|undefined|null = this.indexBySymbol.get(baseSymbol);\n    let summary: Summary<StaticSymbol>|null = null;\n    if (flags & SerializationFlags.ResolveValue &&\n        this.summaryResolver.isLibraryFile(baseSymbol.filePath)) {\n      if (this.unprocessedSymbolSummariesBySymbol.has(baseSymbol)) {\n        // the summary for this symbol was already added\n        // -> nothing to do.\n        return index !;\n      }\n      summary = this.loadSummary(baseSymbol);\n      if (summary && summary.metadata instanceof StaticSymbol) {\n        // The summary is a reexport\n        index = this.visitStaticSymbol(summary.metadata, flags);\n        // reset the summary as it is just a reexport, so we don't want to store it.\n        summary = null;\n      }\n    } else if (index != null) {\n      // Note: == on purpose to compare with undefined!\n      // No summary and the symbol is already added -> nothing to do.\n      return index;\n    }\n    // Note: == on purpose to compare with undefined!\n    if (index == null) {\n      index = this.symbols.length;\n      this.symbols.push(baseSymbol);\n    }\n    this.indexBySymbol.set(baseSymbol, index);\n    if (summary) {\n      this.addSummary(summary);\n    }\n    return index;\n  }\n\n  private loadSummary(symbol: StaticSymbol): Summary<StaticSymbol>|null {\n    let summary = this.summaryResolver.resolveSummary(symbol);\n    if (!summary) {\n      // some symbols might originate from a plain typescript library\n      // that just exported .d.ts and .metadata.json files, i.e. where no summary\n      // files were created.\n      const resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n      if (resolvedSymbol) {\n        summary = {symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata};\n      }\n    }\n    return summary;\n  }\n}\n\nclass ForJitSerializer {\n  private data: Array<{\n    summary: CompileTypeSummary,\n    metadata: CompileNgModuleMetadata|CompileDirectiveMetadata|CompilePipeMetadata|\n    CompileTypeMetadata|null,\n    isLibrary: boolean\n  }> = [];\n\n  constructor(\n      private outputCtx: OutputContext, private symbolResolver: StaticSymbolResolver,\n      private summaryResolver: SummaryResolver<StaticSymbol>) {}\n\n  addSourceType(\n      summary: CompileTypeSummary, metadata: CompileNgModuleMetadata|CompileDirectiveMetadata|\n      CompilePipeMetadata|CompileTypeMetadata) {\n    this.data.push({summary, metadata, isLibrary: false});\n  }\n\n  addLibType(summary: CompileTypeSummary) {\n    this.data.push({summary, metadata: null, isLibrary: true});\n  }\n\n  serialize(exportAsArr: {symbol: StaticSymbol, exportAs: string}[]): void {\n    const exportAsBySymbol = new Map<StaticSymbol, string>();\n    for (const {symbol, exportAs} of exportAsArr) {\n      exportAsBySymbol.set(symbol, exportAs);\n    }\n    const ngModuleSymbols = new Set<StaticSymbol>();\n\n    for (const {summary, metadata, isLibrary} of this.data) {\n      if (summary.summaryKind === CompileSummaryKind.NgModule) {\n        // collect the symbols that refer to NgModule classes.\n        // Note: we can't just rely on `summary.type.summaryKind` to determine this as\n        // we don't add the summaries of all referenced symbols when we serialize type summaries.\n        // See serializeSummaries for details.\n        ngModuleSymbols.add(summary.type.reference);\n        const modSummary = <CompileNgModuleSummary>summary;\n        for (const mod of modSummary.modules) {\n          ngModuleSymbols.add(mod.reference);\n        }\n      }\n      if (!isLibrary) {\n        const fnName = summaryForJitName(summary.type.reference.name);\n        createSummaryForJitFunction(\n            this.outputCtx, summary.type.reference,\n            this.serializeSummaryWithDeps(summary, metadata !));\n      }\n    }\n\n    ngModuleSymbols.forEach((ngModuleSymbol) => {\n      if (this.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {\n        let exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;\n        const jitExportAsName = summaryForJitName(exportAs);\n        this.outputCtx.statements.push(o.variable(jitExportAsName)\n                                           .set(this.serializeSummaryRef(ngModuleSymbol))\n                                           .toDeclStmt(null, [o.StmtModifier.Exported]));\n      }\n    });\n  }\n\n  private serializeSummaryWithDeps(\n      summary: CompileTypeSummary, metadata: CompileNgModuleMetadata|CompileDirectiveMetadata|\n      CompilePipeMetadata|CompileTypeMetadata): o.Expression {\n    const expressions: o.Expression[] = [this.serializeSummary(summary)];\n    let providers: CompileProviderMetadata[] = [];\n    if (metadata instanceof CompileNgModuleMetadata) {\n      expressions.push(...\n                       // For directives / pipes, we only add the declared ones,\n                       // and rely on transitively importing NgModules to get the transitive\n                       // summaries.\n                       metadata.declaredDirectives.concat(metadata.declaredPipes)\n                           .map(type => type.reference)\n                           // For modules,\n                           // we also add the summaries for modules\n                           // from libraries.\n                           // This is ok as we produce reexports for all transitive modules.\n                           .concat(metadata.transitiveModule.modules.map(type => type.reference)\n                                       .filter(ref => ref !== metadata.type.reference))\n                           .map((ref) => this.serializeSummaryRef(ref)));\n      // Note: We don't use `NgModuleSummary.providers`, as that one is transitive,\n      // and we already have transitive modules.\n      providers = metadata.providers;\n    } else if (summary.summaryKind === CompileSummaryKind.Directive) {\n      const dirSummary = <CompileDirectiveSummary>summary;\n      providers = dirSummary.providers.concat(dirSummary.viewProviders);\n    }\n    // Note: We can't just refer to the `ngsummary.ts` files for `useClass` providers (as we do for\n    // declaredDirectives / declaredPipes), as we allow\n    // providers without ctor arguments to skip the `@Injectable` decorator,\n    // i.e. we didn't generate .ngsummary.ts files for these.\n    expressions.push(\n        ...providers.filter(provider => !!provider.useClass).map(provider => this.serializeSummary({\n          summaryKind: CompileSummaryKind.Injectable, type: provider.useClass\n        } as CompileTypeSummary)));\n    return o.literalArr(expressions);\n  }\n\n  private serializeSummaryRef(typeSymbol: StaticSymbol): o.Expression {\n    const jitImportedSymbol = this.symbolResolver.getStaticSymbol(\n        summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));\n    return this.outputCtx.importExpr(jitImportedSymbol);\n  }\n\n  private serializeSummary(data: {[key: string]: any}): o.Expression {\n    const outputCtx = this.outputCtx;\n\n    class Transformer implements ValueVisitor {\n      visitArray(arr: any[], context: any): any {\n        return o.literalArr(arr.map(entry => visitValue(entry, this, context)));\n      }\n      visitStringMap(map: {[key: string]: any}, context: any): any {\n        return new o.LiteralMapExpr(Object.keys(map).map(\n            (key) => new o.LiteralMapEntry(key, visitValue(map[key], this, context), false)));\n      }\n      visitPrimitive(value: any, context: any): any { return o.literal(value); }\n      visitOther(value: any, context: any): any {\n        if (value instanceof StaticSymbol) {\n          return outputCtx.importExpr(value);\n        } else {\n          throw new Error(`Illegal State: Encountered value ${value}`);\n        }\n      }\n    }\n\n    return visitValue(data, new Transformer(), null);\n  }\n}\n\nclass FromJsonDeserializer extends ValueTransformer {\n  // TODO(issue/24571): remove '!'.\n  private symbols !: StaticSymbol[];\n\n  constructor(\n      private symbolCache: StaticSymbolCache,\n      private summaryResolver: SummaryResolver<StaticSymbol>) {\n    super();\n  }\n\n  deserialize(libraryFileName: string, json: string): {\n    moduleName: string | null,\n    summaries: Summary<StaticSymbol>[],\n    importAs: {symbol: StaticSymbol, importAs: StaticSymbol}[]\n  } {\n    const data: {moduleName: string | null, summaries: any[], symbols: any[]} = JSON.parse(json);\n    const allImportAs: {symbol: StaticSymbol, importAs: StaticSymbol}[] = [];\n    this.symbols = data.symbols.map(\n        (serializedSymbol) => this.symbolCache.get(\n            this.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName),\n            serializedSymbol.name));\n    data.symbols.forEach((serializedSymbol, index) => {\n      const symbol = this.symbols[index];\n      const importAs = serializedSymbol.importAs;\n      if (typeof importAs === 'number') {\n        allImportAs.push({symbol, importAs: this.symbols[importAs]});\n      } else if (typeof importAs === 'string') {\n        allImportAs.push(\n            {symbol, importAs: this.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs)});\n      }\n    });\n    const summaries = visitValue(data.summaries, this, null) as Summary<StaticSymbol>[];\n    return {moduleName: data.moduleName, summaries, importAs: allImportAs};\n  }\n\n  visitStringMap(map: {[key: string]: any}, context: any): any {\n    if ('__symbol' in map) {\n      const baseSymbol = this.symbols[map['__symbol']];\n      const members = map['members'];\n      return members.length ? this.symbolCache.get(baseSymbol.filePath, baseSymbol.name, members) :\n                              baseSymbol;\n    } else {\n      return super.visitStringMap(map, context);\n    }\n  }\n}\n\nfunction isCall(metadata: any): boolean {\n  return metadata && metadata.__symbolic === 'call';\n}\n\nfunction isFunctionCall(metadata: any): boolean {\n  return isCall(metadata) && unwrapResolvedMetadata(metadata.expression) instanceof StaticSymbol;\n}\n\nfunction isMethodCallOnVariable(metadata: any): boolean {\n  return isCall(metadata) && metadata.expression && metadata.expression.__symbolic === 'select' &&\n      unwrapResolvedMetadata(metadata.expression.expression) instanceof StaticSymbol;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileInjectableMetadata, CompileNgModuleMetadata, CompilePipeMetadata, CompilePipeSummary, CompileProviderMetadata, CompileShallowModuleMetadata, CompileStylesheetMetadata, CompileTypeMetadata, CompileTypeSummary, componentFactoryName, flatten, identifierName, templateSourceUrl} from '../compile_metadata';\nimport {CompilerConfig} from '../config';\nimport {ConstantPool} from '../constant_pool';\nimport {ViewEncapsulation} from '../core';\nimport {MessageBundle} from '../i18n/message_bundle';\nimport {Identifiers, createTokenForExternalReference} from '../identifiers';\nimport {InjectableCompiler} from '../injectable_compiler';\nimport {CompileMetadataResolver} from '../metadata_resolver';\nimport * as html from '../ml_parser/ast';\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {removeWhitespaces} from '../ml_parser/html_whitespaces';\nimport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {NgModuleCompiler} from '../ng_module_compiler';\nimport {OutputEmitter} from '../output/abstract_emitter';\nimport * as o from '../output/output_ast';\nimport {ParseError} from '../parse_util';\nimport {compileNgModuleFromRender2 as compileR3Module} from '../render3/r3_module_compiler';\nimport {compilePipeFromRender2 as compileR3Pipe} from '../render3/r3_pipe_compiler';\nimport {htmlAstToRender3Ast} from '../render3/r3_template_transform';\nimport {compileComponentFromRender2 as compileR3Component, compileDirectiveFromRender2 as compileR3Directive} from '../render3/view/compiler';\nimport {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry';\nimport {CompiledStylesheet, StyleCompiler} from '../style_compiler';\nimport {SummaryResolver} from '../summary_resolver';\nimport {BindingParser} from '../template_parser/binding_parser';\nimport {TemplateAst} from '../template_parser/template_ast';\nimport {TemplateParser} from '../template_parser/template_parser';\nimport {OutputContext, ValueVisitor, error, syntaxError, visitValue} from '../util';\nimport {TypeCheckCompiler} from '../view_compiler/type_check_compiler';\nimport {ViewCompileResult, ViewCompiler} from '../view_compiler/view_compiler';\n\nimport {AotCompilerHost} from './compiler_host';\nimport {AotCompilerOptions} from './compiler_options';\nimport {GeneratedFile} from './generated_file';\nimport {LazyRoute, listLazyRoutes, parseLazyRoute} from './lazy_routes';\nimport {PartialModule} from './partial_module';\nimport {StaticReflector} from './static_reflector';\nimport {StaticSymbol} from './static_symbol';\nimport {StaticSymbolResolver} from './static_symbol_resolver';\nimport {createForJitStub, serializeSummaries} from './summary_serializer';\nimport {ngfactoryFilePath, normalizeGenFileSuffix, splitTypescriptSuffix, summaryFileName, summaryForJitFileName} from './util';\n\nconst enum StubEmitFlags { Basic = 1 << 0, TypeCheck = 1 << 1, All = TypeCheck | Basic }\n\nexport class AotCompiler {\n  private _templateAstCache =\n      new Map<StaticSymbol, {template: TemplateAst[], pipes: CompilePipeSummary[]}>();\n  private _analyzedFiles = new Map<string, NgAnalyzedFile>();\n  private _analyzedFilesForInjectables = new Map<string, NgAnalyzedFileWithInjectables>();\n\n  constructor(\n      private _config: CompilerConfig, private _options: AotCompilerOptions,\n      private _host: AotCompilerHost, readonly reflector: StaticReflector,\n      private _metadataResolver: CompileMetadataResolver, private _templateParser: TemplateParser,\n      private _styleCompiler: StyleCompiler, private _viewCompiler: ViewCompiler,\n      private _typeCheckCompiler: TypeCheckCompiler, private _ngModuleCompiler: NgModuleCompiler,\n      private _injectableCompiler: InjectableCompiler, private _outputEmitter: OutputEmitter,\n      private _summaryResolver: SummaryResolver<StaticSymbol>,\n      private _symbolResolver: StaticSymbolResolver) {}\n\n  clearCache() { this._metadataResolver.clearCache(); }\n\n  analyzeModulesSync(rootFiles: string[]): NgAnalyzedModules {\n    const analyzeResult = analyzeAndValidateNgModules(\n        rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n    analyzeResult.ngModules.forEach(\n        ngModule => this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(\n            ngModule.type.reference, true));\n    return analyzeResult;\n  }\n\n  analyzeModulesAsync(rootFiles: string[]): Promise<NgAnalyzedModules> {\n    const analyzeResult = analyzeAndValidateNgModules(\n        rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n    return Promise\n        .all(analyzeResult.ngModules.map(\n            ngModule => this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(\n                ngModule.type.reference, false)))\n        .then(() => analyzeResult);\n  }\n\n  private _analyzeFile(fileName: string): NgAnalyzedFile {\n    let analyzedFile = this._analyzedFiles.get(fileName);\n    if (!analyzedFile) {\n      analyzedFile =\n          analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);\n      this._analyzedFiles.set(fileName, analyzedFile);\n    }\n    return analyzedFile;\n  }\n\n  private _analyzeFileForInjectables(fileName: string): NgAnalyzedFileWithInjectables {\n    let analyzedFile = this._analyzedFilesForInjectables.get(fileName);\n    if (!analyzedFile) {\n      analyzedFile = analyzeFileForInjectables(\n          this._host, this._symbolResolver, this._metadataResolver, fileName);\n      this._analyzedFilesForInjectables.set(fileName, analyzedFile);\n    }\n    return analyzedFile;\n  }\n\n  findGeneratedFileNames(fileName: string): string[] {\n    const genFileNames: string[] = [];\n    const file = this._analyzeFile(fileName);\n    // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule\n    // or a reference to a non source file.\n    // Note: This is overestimating the required .ngfactory files as the real calculation is harder.\n    // Only do this for StubEmitFlags.Basic, as adding a type check block\n    // does not change this file (as we generate type check blocks based on NgModules).\n    if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length ||\n        file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {\n      genFileNames.push(ngfactoryFilePath(file.fileName, true));\n      if (this._options.enableSummariesForJit) {\n        genFileNames.push(summaryForJitFileName(file.fileName, true));\n      }\n    }\n    const fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(file.fileName, true)[1]);\n    file.directives.forEach((dirSymbol) => {\n      const compMeta =\n          this._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol) !.metadata;\n      if (!compMeta.isComponent) {\n        return;\n      }\n      // Note: compMeta is a component and therefore template is non null.\n      compMeta.template !.styleUrls.forEach((styleUrl) => {\n        const normalizedUrl = this._host.resourceNameToFileName(styleUrl, file.fileName);\n        if (!normalizedUrl) {\n          throw syntaxError(`Couldn't resolve resource ${styleUrl} relative to ${file.fileName}`);\n        }\n        const needsShim = (compMeta.template !.encapsulation ||\n                           this._config.defaultEncapsulation) === ViewEncapsulation.Emulated;\n        genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));\n        if (this._options.allowEmptyCodegenFiles) {\n          genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));\n        }\n      });\n    });\n    return genFileNames;\n  }\n\n  emitBasicStub(genFileName: string, originalFileName?: string): GeneratedFile {\n    const outputCtx = this._createOutputContext(genFileName);\n    if (genFileName.endsWith('.ngfactory.ts')) {\n      if (!originalFileName) {\n        throw new Error(\n            `Assertion error: require the original file for .ngfactory.ts stubs. File: ${genFileName}`);\n      }\n      const originalFile = this._analyzeFile(originalFileName);\n      this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.Basic);\n    } else if (genFileName.endsWith('.ngsummary.ts')) {\n      if (this._options.enableSummariesForJit) {\n        if (!originalFileName) {\n          throw new Error(\n              `Assertion error: require the original file for .ngsummary.ts stubs. File: ${genFileName}`);\n        }\n        const originalFile = this._analyzeFile(originalFileName);\n        _createEmptyStub(outputCtx);\n        originalFile.ngModules.forEach(ngModule => {\n          // create exports that user code can reference\n          createForJitStub(outputCtx, ngModule.type.reference);\n        });\n      }\n    } else if (genFileName.endsWith('.ngstyle.ts')) {\n      _createEmptyStub(outputCtx);\n    }\n    // Note: for the stubs, we don't need a property srcFileUrl,\n    // as later on in emitAllImpls we will create the proper GeneratedFiles with the\n    // correct srcFileUrl.\n    // This is good as e.g. for .ngstyle.ts files we can't derive\n    // the url of components based on the genFileUrl.\n    return this._codegenSourceModule('unknown', outputCtx);\n  }\n\n  emitTypeCheckStub(genFileName: string, originalFileName: string): GeneratedFile|null {\n    const originalFile = this._analyzeFile(originalFileName);\n    const outputCtx = this._createOutputContext(genFileName);\n    if (genFileName.endsWith('.ngfactory.ts')) {\n      this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.TypeCheck);\n    }\n    return outputCtx.statements.length > 0 ?\n        this._codegenSourceModule(originalFile.fileName, outputCtx) :\n        null;\n  }\n\n  loadFilesAsync(fileNames: string[], tsFiles: string[]): Promise<\n      {analyzedModules: NgAnalyzedModules, analyzedInjectables: NgAnalyzedFileWithInjectables[]}> {\n    const files = fileNames.map(fileName => this._analyzeFile(fileName));\n    const loadingPromises: Promise<NgAnalyzedModules>[] = [];\n    files.forEach(\n        file => file.ngModules.forEach(\n            ngModule =>\n                loadingPromises.push(this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(\n                    ngModule.type.reference, false))));\n    const analyzedInjectables = tsFiles.map(tsFile => this._analyzeFileForInjectables(tsFile));\n    return Promise.all(loadingPromises).then(_ => ({\n                                               analyzedModules: mergeAndValidateNgFiles(files),\n                                               analyzedInjectables: analyzedInjectables,\n                                             }));\n  }\n\n  loadFilesSync(fileNames: string[], tsFiles: string[]):\n      {analyzedModules: NgAnalyzedModules, analyzedInjectables: NgAnalyzedFileWithInjectables[]} {\n    const files = fileNames.map(fileName => this._analyzeFile(fileName));\n    files.forEach(\n        file => file.ngModules.forEach(\n            ngModule => this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(\n                ngModule.type.reference, true)));\n    const analyzedInjectables = tsFiles.map(tsFile => this._analyzeFileForInjectables(tsFile));\n    return {\n      analyzedModules: mergeAndValidateNgFiles(files),\n      analyzedInjectables: analyzedInjectables,\n    };\n  }\n\n  private _createNgFactoryStub(\n      outputCtx: OutputContext, file: NgAnalyzedFile, emitFlags: StubEmitFlags) {\n    let componentId = 0;\n    file.ngModules.forEach((ngModuleMeta, ngModuleIndex) => {\n      // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,\n      // so we don't change the .ngfactory file too much when adding the type-check block.\n\n      // create exports that user code can reference\n      this._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference);\n\n      // add references to the symbols from the metadata.\n      // These can be used by the type check block for components,\n      // and they also cause TypeScript to include these files into the program too,\n      // which will make them part of the analyzedFiles.\n      const externalReferences: StaticSymbol[] = [\n        // Add references that are available from all the modules and imports.\n        ...ngModuleMeta.transitiveModule.directives.map(d => d.reference),\n        ...ngModuleMeta.transitiveModule.pipes.map(d => d.reference),\n        ...ngModuleMeta.importedModules.map(m => m.type.reference),\n        ...ngModuleMeta.exportedModules.map(m => m.type.reference),\n\n        // Add references that might be inserted by the template compiler.\n        ...this._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef]),\n      ];\n\n      const externalReferenceVars = new Map<any, string>();\n      externalReferences.forEach((ref, typeIndex) => {\n        externalReferenceVars.set(ref, `_decl${ngModuleIndex}_${typeIndex}`);\n      });\n      externalReferenceVars.forEach((varName, reference) => {\n        outputCtx.statements.push(\n            o.variable(varName)\n                .set(o.NULL_EXPR.cast(o.DYNAMIC_TYPE))\n                .toDeclStmt(o.expressionType(outputCtx.importExpr(\n                    reference, /* typeParams */ null, /* useSummaries */ false))));\n      });\n\n      if (emitFlags & StubEmitFlags.TypeCheck) {\n        // add the type-check block for all components of the NgModule\n        ngModuleMeta.declaredDirectives.forEach((dirId) => {\n          const compMeta = this._metadataResolver.getDirectiveMetadata(dirId.reference);\n          if (!compMeta.isComponent) {\n            return;\n          }\n          componentId++;\n          this._createTypeCheckBlock(\n              outputCtx, `${compMeta.type.reference.name}_Host_${componentId}`, ngModuleMeta,\n              this._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type],\n              externalReferenceVars);\n          this._createTypeCheckBlock(\n              outputCtx, `${compMeta.type.reference.name}_${componentId}`, ngModuleMeta, compMeta,\n              ngModuleMeta.transitiveModule.directives, externalReferenceVars);\n        });\n      }\n    });\n\n    if (outputCtx.statements.length === 0) {\n      _createEmptyStub(outputCtx);\n    }\n  }\n\n  private _externalIdentifierReferences(references: o.ExternalReference[]): StaticSymbol[] {\n    const result: StaticSymbol[] = [];\n    for (let reference of references) {\n      const token = createTokenForExternalReference(this.reflector, reference);\n      if (token.identifier) {\n        result.push(token.identifier.reference);\n      }\n    }\n    return result;\n  }\n\n  private _createTypeCheckBlock(\n      ctx: OutputContext, componentId: string, moduleMeta: CompileNgModuleMetadata,\n      compMeta: CompileDirectiveMetadata, directives: CompileIdentifierMetadata[],\n      externalReferenceVars: Map<any, string>) {\n    const {template: parsedTemplate, pipes: usedPipes} =\n        this._parseTemplate(compMeta, moduleMeta, directives);\n    ctx.statements.push(...this._typeCheckCompiler.compileComponent(\n        componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx));\n  }\n\n  emitMessageBundle(analyzeResult: NgAnalyzedModules, locale: string|null): MessageBundle {\n    const errors: ParseError[] = [];\n    const htmlParser = new HtmlParser();\n\n    // TODO(vicb): implicit tags & attributes\n    const messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n\n    analyzeResult.files.forEach(file => {\n      const compMetas: CompileDirectiveMetadata[] = [];\n      file.directives.forEach(directiveType => {\n        const dirMeta = this._metadataResolver.getDirectiveMetadata(directiveType);\n        if (dirMeta && dirMeta.isComponent) {\n          compMetas.push(dirMeta);\n        }\n      });\n      compMetas.forEach(compMeta => {\n        const html = compMeta.template !.template !;\n        // Template URL points to either an HTML or TS file depending on whether\n        // the file is used with `templateUrl:` or `template:`, respectively.\n        const templateUrl = compMeta.template !.templateUrl !;\n        const interpolationConfig =\n            InterpolationConfig.fromArray(compMeta.template !.interpolation);\n        errors.push(...messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig) !);\n      });\n    });\n\n    if (errors.length) {\n      throw new Error(errors.map(e => e.toString()).join('\\n'));\n    }\n\n    return messageBundle;\n  }\n\n  emitAllPartialModules(\n      {ngModuleByPipeOrDirective, files}: NgAnalyzedModules,\n      r3Files: NgAnalyzedFileWithInjectables[]): PartialModule[] {\n    const contextMap = new Map<string, OutputContext>();\n\n    const getContext = (fileName: string): OutputContext => {\n      if (!contextMap.has(fileName)) {\n        contextMap.set(fileName, this._createOutputContext(fileName));\n      }\n      return contextMap.get(fileName) !;\n    };\n\n    files.forEach(\n        file => this._compilePartialModule(\n            file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules,\n            file.injectables, getContext(file.fileName)));\n    r3Files.forEach(\n        file => this._compileShallowModules(\n            file.fileName, file.shallowModules, getContext(file.fileName)));\n\n    return Array.from(contextMap.values())\n        .map(context => ({\n               fileName: context.genFilePath,\n               statements: [...context.constantPool.statements, ...context.statements],\n             }));\n  }\n\n  private _compileShallowModules(\n      fileName: string, shallowModules: CompileShallowModuleMetadata[],\n      context: OutputContext): void {\n    shallowModules.forEach(module => compileR3Module(context, module, this._injectableCompiler));\n  }\n\n  private _compilePartialModule(\n      fileName: string, ngModuleByPipeOrDirective: Map<StaticSymbol, CompileNgModuleMetadata>,\n      directives: StaticSymbol[], pipes: StaticSymbol[], ngModules: CompileNgModuleMetadata[],\n      injectables: CompileInjectableMetadata[], context: OutputContext): void {\n    const errors: ParseError[] = [];\n\n    const schemaRegistry = new DomElementSchemaRegistry();\n    const hostBindingParser = new BindingParser(\n        this._templateParser.expressionParser, DEFAULT_INTERPOLATION_CONFIG, schemaRegistry, [],\n        errors);\n\n    // Process all components and directives\n    directives.forEach(directiveType => {\n      const directiveMetadata = this._metadataResolver.getDirectiveMetadata(directiveType);\n      if (directiveMetadata.isComponent) {\n        const module = ngModuleByPipeOrDirective.get(directiveType) !;\n        module ||\n            error(\n                `Cannot determine the module for component '${identifierName(directiveMetadata.type)}'`);\n\n        let htmlAst = directiveMetadata.template !.htmlAst !;\n        const preserveWhitespaces = directiveMetadata !.template !.preserveWhitespaces;\n\n        if (!preserveWhitespaces) {\n          htmlAst = removeWhitespaces(htmlAst);\n        }\n        const render3Ast = htmlAstToRender3Ast(htmlAst.rootNodes, hostBindingParser);\n\n        // Map of StaticType by directive selectors\n        const directiveTypeBySel = new Map<string, any>();\n\n        const directives = module.transitiveModule.directives.map(\n            dir => this._metadataResolver.getDirectiveSummary(dir.reference));\n\n        directives.forEach(directive => {\n          if (directive.selector) {\n            directiveTypeBySel.set(directive.selector, directive.type.reference);\n          }\n        });\n\n        // Map of StaticType by pipe names\n        const pipeTypeByName = new Map<string, any>();\n\n        const pipes = module.transitiveModule.pipes.map(\n            pipe => this._metadataResolver.getPipeSummary(pipe.reference));\n\n        pipes.forEach(pipe => { pipeTypeByName.set(pipe.name, pipe.type.reference); });\n\n        compileR3Component(\n            context, directiveMetadata, render3Ast, this.reflector, hostBindingParser,\n            directiveTypeBySel, pipeTypeByName);\n      } else {\n        compileR3Directive(context, directiveMetadata, this.reflector, hostBindingParser);\n      }\n    });\n\n    pipes.forEach(pipeType => {\n      const pipeMetadata = this._metadataResolver.getPipeMetadata(pipeType);\n      if (pipeMetadata) {\n        compileR3Pipe(context, pipeMetadata, this.reflector);\n      }\n    });\n\n    injectables.forEach(injectable => this._injectableCompiler.compile(injectable, context));\n  }\n\n  emitAllPartialModules2(files: NgAnalyzedFileWithInjectables[]): PartialModule[] {\n    // Using reduce like this is a select many pattern (where map is a select pattern)\n    return files.reduce<PartialModule[]>((r, file) => {\n      r.push(...this._emitPartialModule2(file.fileName, file.injectables));\n      return r;\n    }, []);\n  }\n\n  private _emitPartialModule2(fileName: string, injectables: CompileInjectableMetadata[]):\n      PartialModule[] {\n    const context = this._createOutputContext(fileName);\n\n    injectables.forEach(injectable => this._injectableCompiler.compile(injectable, context));\n\n    if (context.statements && context.statements.length > 0) {\n      return [{fileName, statements: [...context.constantPool.statements, ...context.statements]}];\n    }\n    return [];\n  }\n\n  emitAllImpls(analyzeResult: NgAnalyzedModules): GeneratedFile[] {\n    const {ngModuleByPipeOrDirective, files} = analyzeResult;\n    const sourceModules = files.map(\n        file => this._compileImplFile(\n            file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules,\n            file.injectables));\n    return flatten(sourceModules);\n  }\n\n  private _compileImplFile(\n      srcFileUrl: string, ngModuleByPipeOrDirective: Map<StaticSymbol, CompileNgModuleMetadata>,\n      directives: StaticSymbol[], pipes: StaticSymbol[], ngModules: CompileNgModuleMetadata[],\n      injectables: CompileInjectableMetadata[]): GeneratedFile[] {\n    const fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);\n    const generatedFiles: GeneratedFile[] = [];\n\n    const outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));\n\n    generatedFiles.push(\n        ...this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx));\n\n    // compile all ng modules\n    ngModules.forEach((ngModuleMeta) => this._compileModule(outputCtx, ngModuleMeta));\n\n    // compile components\n    directives.forEach((dirType) => {\n      const compMeta = this._metadataResolver.getDirectiveMetadata(<any>dirType);\n      if (!compMeta.isComponent) {\n        return;\n      }\n      const ngModule = ngModuleByPipeOrDirective.get(dirType);\n      if (!ngModule) {\n        throw new Error(\n            `Internal Error: cannot determine the module for component ${identifierName(compMeta.type)}!`);\n      }\n\n      // compile styles\n      const componentStylesheet = this._styleCompiler.compileComponent(outputCtx, compMeta);\n      // Note: compMeta is a component and therefore template is non null.\n      compMeta.template !.externalStylesheets.forEach((stylesheetMeta) => {\n        // Note: fill non shim and shim style files as they might\n        // be shared by component with and without ViewEncapsulation.\n        const shim = this._styleCompiler.needsStyleShim(compMeta);\n        generatedFiles.push(\n            this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));\n        if (this._options.allowEmptyCodegenFiles) {\n          generatedFiles.push(\n              this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));\n        }\n      });\n\n      // compile components\n      const compViewVars = this._compileComponent(\n          outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet,\n          fileSuffix);\n      this._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);\n    });\n    if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {\n      const srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);\n      generatedFiles.unshift(srcModule);\n    }\n    return generatedFiles;\n  }\n\n  private _createSummary(\n      srcFileName: string, directives: StaticSymbol[], pipes: StaticSymbol[],\n      ngModules: CompileNgModuleMetadata[], injectables: CompileInjectableMetadata[],\n      ngFactoryCtx: OutputContext): GeneratedFile[] {\n    const symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName)\n                                .map(symbol => this._symbolResolver.resolveSymbol(symbol));\n    const typeData: {\n      summary: CompileTypeSummary,\n      metadata: CompileNgModuleMetadata | CompileDirectiveMetadata | CompilePipeMetadata |\n          CompileTypeMetadata\n    }[] =\n        [\n          ...ngModules.map(\n              meta => ({\n                summary: this._metadataResolver.getNgModuleSummary(meta.type.reference) !,\n                metadata: this._metadataResolver.getNgModuleMetadata(meta.type.reference) !\n              })),\n          ...directives.map(ref => ({\n                              summary: this._metadataResolver.getDirectiveSummary(ref) !,\n                              metadata: this._metadataResolver.getDirectiveMetadata(ref) !\n                            })),\n          ...pipes.map(ref => ({\n                         summary: this._metadataResolver.getPipeSummary(ref) !,\n                         metadata: this._metadataResolver.getPipeMetadata(ref) !\n                       })),\n          ...injectables.map(\n              ref => ({\n                summary: this._metadataResolver.getInjectableSummary(ref.symbol) !,\n                metadata: this._metadataResolver.getInjectableSummary(ref.symbol) !.type\n              }))\n        ];\n    const forJitOutputCtx = this._options.enableSummariesForJit ?\n        this._createOutputContext(summaryForJitFileName(srcFileName, true)) :\n        null;\n    const {json, exportAs} = serializeSummaries(\n        srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries,\n        typeData, this._options.createExternalSymbolFactoryReexports);\n    exportAs.forEach((entry) => {\n      ngFactoryCtx.statements.push(\n          o.variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [\n            o.StmtModifier.Exported\n          ]));\n    });\n    const summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);\n    const result = [summaryJson];\n    if (forJitOutputCtx) {\n      result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));\n    }\n    return result;\n  }\n\n  private _compileModule(outputCtx: OutputContext, ngModule: CompileNgModuleMetadata): void {\n    const providers: CompileProviderMetadata[] = [];\n\n    if (this._options.locale) {\n      const normalizedLocale = this._options.locale.replace(/_/g, '-');\n      providers.push({\n        token: createTokenForExternalReference(this.reflector, Identifiers.LOCALE_ID),\n        useValue: normalizedLocale,\n      });\n    }\n\n    if (this._options.i18nFormat) {\n      providers.push({\n        token: createTokenForExternalReference(this.reflector, Identifiers.TRANSLATIONS_FORMAT),\n        useValue: this._options.i18nFormat\n      });\n    }\n\n    this._ngModuleCompiler.compile(outputCtx, ngModule, providers);\n  }\n\n  private _compileComponentFactory(\n      outputCtx: OutputContext, compMeta: CompileDirectiveMetadata,\n      ngModule: CompileNgModuleMetadata, fileSuffix: string): void {\n    const hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);\n    const hostViewFactoryVar =\n        this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix)\n            .viewClassVar;\n    const compFactoryVar = componentFactoryName(compMeta.type.reference);\n    const inputsExprs: o.LiteralMapEntry[] = [];\n    for (let propName in compMeta.inputs) {\n      const templateName = compMeta.inputs[propName];\n      // Don't quote so that the key gets minified...\n      inputsExprs.push(new o.LiteralMapEntry(propName, o.literal(templateName), false));\n    }\n    const outputsExprs: o.LiteralMapEntry[] = [];\n    for (let propName in compMeta.outputs) {\n      const templateName = compMeta.outputs[propName];\n      // Don't quote so that the key gets minified...\n      outputsExprs.push(new o.LiteralMapEntry(propName, o.literal(templateName), false));\n    }\n\n    outputCtx.statements.push(\n        o.variable(compFactoryVar)\n            .set(o.importExpr(Identifiers.createComponentFactory).callFn([\n              o.literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference),\n              o.variable(hostViewFactoryVar), new o.LiteralMapExpr(inputsExprs),\n              new o.LiteralMapExpr(outputsExprs),\n              o.literalArr(\n                  compMeta.template !.ngContentSelectors.map(selector => o.literal(selector)))\n            ]))\n            .toDeclStmt(\n                o.importType(\n                    Identifiers.ComponentFactory,\n                    [o.expressionType(outputCtx.importExpr(compMeta.type.reference)) !],\n                    [o.TypeModifier.Const]),\n                [o.StmtModifier.Final, o.StmtModifier.Exported]));\n  }\n\n  private _compileComponent(\n      outputCtx: OutputContext, compMeta: CompileDirectiveMetadata,\n      ngModule: CompileNgModuleMetadata, directiveIdentifiers: CompileIdentifierMetadata[],\n      componentStyles: CompiledStylesheet|null, fileSuffix: string): ViewCompileResult {\n    const {template: parsedTemplate, pipes: usedPipes} =\n        this._parseTemplate(compMeta, ngModule, directiveIdentifiers);\n    const stylesExpr = componentStyles ? o.variable(componentStyles.stylesVar) : o.literalArr([]);\n    const viewResult = this._viewCompiler.compileComponent(\n        outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);\n    if (componentStyles) {\n      _resolveStyleStatements(\n          this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta),\n          fileSuffix);\n    }\n    return viewResult;\n  }\n\n  private _parseTemplate(\n      compMeta: CompileDirectiveMetadata, ngModule: CompileNgModuleMetadata,\n      directiveIdentifiers: CompileIdentifierMetadata[]):\n      {template: TemplateAst[], pipes: CompilePipeSummary[]} {\n    if (this._templateAstCache.has(compMeta.type.reference)) {\n      return this._templateAstCache.get(compMeta.type.reference) !;\n    }\n    const preserveWhitespaces = compMeta !.template !.preserveWhitespaces;\n    const directives =\n        directiveIdentifiers.map(dir => this._metadataResolver.getDirectiveSummary(dir.reference));\n    const pipes = ngModule.transitiveModule.pipes.map(\n        pipe => this._metadataResolver.getPipeSummary(pipe.reference));\n    const result = this._templateParser.parse(\n        compMeta, compMeta.template !.htmlAst !, directives, pipes, ngModule.schemas,\n        templateSourceUrl(ngModule.type, compMeta, compMeta.template !), preserveWhitespaces);\n    this._templateAstCache.set(compMeta.type.reference, result);\n    return result;\n  }\n\n  private _createOutputContext(genFilePath: string): OutputContext {\n    const importExpr =\n        (symbol: StaticSymbol, typeParams: o.Type[] | null = null,\n         useSummaries: boolean = true) => {\n          if (!(symbol instanceof StaticSymbol)) {\n            throw new Error(`Internal error: unknown identifier ${JSON.stringify(symbol)}`);\n          }\n          const arity = this._symbolResolver.getTypeArity(symbol) || 0;\n          const {filePath, name, members} =\n              this._symbolResolver.getImportAs(symbol, useSummaries) || symbol;\n          const importModule = this._fileNameToModuleName(filePath, genFilePath);\n\n          // It should be good enough to compare filePath to genFilePath and if they are equal\n          // there is a self reference. However, ngfactory files generate to .ts but their\n          // symbols have .d.ts so a simple compare is insufficient. They should be canonical\n          // and is tracked by #17705.\n          const selfReference = this._fileNameToModuleName(genFilePath, genFilePath);\n          const moduleName = importModule === selfReference ? null : importModule;\n\n          // If we are in a type expression that refers to a generic type then supply\n          // the required type parameters. If there were not enough type parameters\n          // supplied, supply any as the type. Outside a type expression the reference\n          // should not supply type parameters and be treated as a simple value reference\n          // to the constructor function itself.\n          const suppliedTypeParams = typeParams || [];\n          const missingTypeParamsCount = arity - suppliedTypeParams.length;\n          const allTypeParams =\n              suppliedTypeParams.concat(new Array(missingTypeParamsCount).fill(o.DYNAMIC_TYPE));\n          return members.reduce(\n              (expr, memberName) => expr.prop(memberName),\n              <o.Expression>o.importExpr(\n                  new o.ExternalReference(moduleName, name, null), allTypeParams));\n        };\n\n    return {statements: [], genFilePath, importExpr, constantPool: new ConstantPool()};\n  }\n\n  private _fileNameToModuleName(importedFilePath: string, containingFilePath: string): string {\n    return this._summaryResolver.getKnownModuleName(importedFilePath) ||\n        this._symbolResolver.getKnownModuleName(importedFilePath) ||\n        this._host.fileNameToModuleName(importedFilePath, containingFilePath);\n  }\n\n  private _codegenStyles(\n      srcFileUrl: string, compMeta: CompileDirectiveMetadata,\n      stylesheetMetadata: CompileStylesheetMetadata, isShimmed: boolean,\n      fileSuffix: string): GeneratedFile {\n    const outputCtx = this._createOutputContext(\n        _stylesModuleUrl(stylesheetMetadata.moduleUrl !, isShimmed, fileSuffix));\n    const compiledStylesheet =\n        this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);\n    _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);\n    return this._codegenSourceModule(srcFileUrl, outputCtx);\n  }\n\n  private _codegenSourceModule(srcFileUrl: string, ctx: OutputContext): GeneratedFile {\n    return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);\n  }\n\n  listLazyRoutes(entryRoute?: string, analyzedModules?: NgAnalyzedModules): LazyRoute[] {\n    const self = this;\n    if (entryRoute) {\n      const symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;\n      return visitLazyRoute(symbol);\n    } else if (analyzedModules) {\n      const allLazyRoutes: LazyRoute[] = [];\n      for (const ngModule of analyzedModules.ngModules) {\n        const lazyRoutes = listLazyRoutes(ngModule, this.reflector);\n        for (const lazyRoute of lazyRoutes) {\n          allLazyRoutes.push(lazyRoute);\n        }\n      }\n      return allLazyRoutes;\n    } else {\n      throw new Error(`Either route or analyzedModules has to be specified!`);\n    }\n\n    function visitLazyRoute(\n        symbol: StaticSymbol, seenRoutes = new Set<StaticSymbol>(),\n        allLazyRoutes: LazyRoute[] = []): LazyRoute[] {\n      // Support pointing to default exports, but stop recursing there,\n      // as the StaticReflector does not yet support default exports.\n      if (seenRoutes.has(symbol) || !symbol.name) {\n        return allLazyRoutes;\n      }\n      seenRoutes.add(symbol);\n      const lazyRoutes = listLazyRoutes(\n          self._metadataResolver.getNgModuleMetadata(symbol, true) !, self.reflector);\n      for (const lazyRoute of lazyRoutes) {\n        allLazyRoutes.push(lazyRoute);\n        visitLazyRoute(lazyRoute.referencedModule, seenRoutes, allLazyRoutes);\n      }\n      return allLazyRoutes;\n    }\n  }\n}\n\nfunction _createEmptyStub(outputCtx: OutputContext) {\n  // Note: We need to produce at least one import statement so that\n  // TypeScript knows that the file is an es6 module. Otherwise our generated\n  // exports / imports won't be emitted properly by TypeScript.\n  outputCtx.statements.push(o.importExpr(Identifiers.ComponentFactory).toStmt());\n}\n\n\nfunction _resolveStyleStatements(\n    symbolResolver: StaticSymbolResolver, compileResult: CompiledStylesheet, needsShim: boolean,\n    fileSuffix: string): void {\n  compileResult.dependencies.forEach((dep) => {\n    dep.setValue(symbolResolver.getStaticSymbol(\n        _stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));\n  });\n}\n\nfunction _stylesModuleUrl(stylesheetUrl: string, shim: boolean, suffix: string): string {\n  return `${stylesheetUrl}${shim ? '.shim' : ''}.ngstyle${suffix}`;\n}\n\nexport interface NgAnalyzedModules {\n  ngModules: CompileNgModuleMetadata[];\n  ngModuleByPipeOrDirective: Map<StaticSymbol, CompileNgModuleMetadata>;\n  files: NgAnalyzedFile[];\n  symbolsMissingModule?: StaticSymbol[];\n}\n\nexport interface NgAnalyzedFileWithInjectables {\n  fileName: string;\n  injectables: CompileInjectableMetadata[];\n  shallowModules: CompileShallowModuleMetadata[];\n}\n\nexport interface NgAnalyzedFile {\n  fileName: string;\n  directives: StaticSymbol[];\n  pipes: StaticSymbol[];\n  ngModules: CompileNgModuleMetadata[];\n  injectables: CompileInjectableMetadata[];\n  exportsNonSourceFiles: boolean;\n}\n\nexport interface NgAnalyzeModulesHost { isSourceFile(filePath: string): boolean; }\n\nexport function analyzeNgModules(\n    fileNames: string[], host: NgAnalyzeModulesHost, staticSymbolResolver: StaticSymbolResolver,\n    metadataResolver: CompileMetadataResolver): NgAnalyzedModules {\n  const files = _analyzeFilesIncludingNonProgramFiles(\n      fileNames, host, staticSymbolResolver, metadataResolver);\n  return mergeAnalyzedFiles(files);\n}\n\nexport function analyzeAndValidateNgModules(\n    fileNames: string[], host: NgAnalyzeModulesHost, staticSymbolResolver: StaticSymbolResolver,\n    metadataResolver: CompileMetadataResolver): NgAnalyzedModules {\n  return validateAnalyzedModules(\n      analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));\n}\n\nfunction validateAnalyzedModules(analyzedModules: NgAnalyzedModules): NgAnalyzedModules {\n  if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {\n    const messages = analyzedModules.symbolsMissingModule.map(\n        s =>\n            `Cannot determine the module for class ${s.name} in ${s.filePath}! Add ${s.name} to the NgModule to fix it.`);\n    throw syntaxError(messages.join('\\n'));\n  }\n  return analyzedModules;\n}\n\n// Analyzes all of the program files,\n// including files that are not part of the program\n// but are referenced by an NgModule.\nfunction _analyzeFilesIncludingNonProgramFiles(\n    fileNames: string[], host: NgAnalyzeModulesHost, staticSymbolResolver: StaticSymbolResolver,\n    metadataResolver: CompileMetadataResolver): NgAnalyzedFile[] {\n  const seenFiles = new Set<string>();\n  const files: NgAnalyzedFile[] = [];\n\n  const visitFile = (fileName: string) => {\n    if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {\n      return false;\n    }\n    seenFiles.add(fileName);\n    const analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);\n    files.push(analyzedFile);\n    analyzedFile.ngModules.forEach(ngModule => {\n      ngModule.transitiveModule.modules.forEach(modMeta => visitFile(modMeta.reference.filePath));\n    });\n  };\n  fileNames.forEach((fileName) => visitFile(fileName));\n  return files;\n}\n\nexport function analyzeFile(\n    host: NgAnalyzeModulesHost, staticSymbolResolver: StaticSymbolResolver,\n    metadataResolver: CompileMetadataResolver, fileName: string): NgAnalyzedFile {\n  const directives: StaticSymbol[] = [];\n  const pipes: StaticSymbol[] = [];\n  const injectables: CompileInjectableMetadata[] = [];\n  const ngModules: CompileNgModuleMetadata[] = [];\n  const hasDecorators = staticSymbolResolver.hasDecorators(fileName);\n  let exportsNonSourceFiles = false;\n  // Don't analyze .d.ts files that have no decorators as a shortcut\n  // to speed up the analysis. This prevents us from\n  // resolving the references in these files.\n  // Note: exportsNonSourceFiles is only needed when compiling with summaries,\n  // which is not the case when .d.ts files are treated as input files.\n  if (!fileName.endsWith('.d.ts') || hasDecorators) {\n    staticSymbolResolver.getSymbolsOf(fileName).forEach((symbol) => {\n      const resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n      const symbolMeta = resolvedSymbol.metadata;\n      if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n        return;\n      }\n      let isNgSymbol = false;\n      if (symbolMeta.__symbolic === 'class') {\n        if (metadataResolver.isDirective(symbol)) {\n          isNgSymbol = true;\n          directives.push(symbol);\n        } else if (metadataResolver.isPipe(symbol)) {\n          isNgSymbol = true;\n          pipes.push(symbol);\n        } else if (metadataResolver.isNgModule(symbol)) {\n          const ngModule = metadataResolver.getNgModuleMetadata(symbol, false);\n          if (ngModule) {\n            isNgSymbol = true;\n            ngModules.push(ngModule);\n          }\n        } else if (metadataResolver.isInjectable(symbol)) {\n          isNgSymbol = true;\n          const injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n          if (injectable) {\n            injectables.push(injectable);\n          }\n        }\n      }\n      if (!isNgSymbol) {\n        exportsNonSourceFiles =\n            exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);\n      }\n    });\n  }\n  return {\n      fileName, directives, pipes, ngModules, injectables, exportsNonSourceFiles,\n  };\n}\n\nexport function analyzeFileForInjectables(\n    host: NgAnalyzeModulesHost, staticSymbolResolver: StaticSymbolResolver,\n    metadataResolver: CompileMetadataResolver, fileName: string): NgAnalyzedFileWithInjectables {\n  const injectables: CompileInjectableMetadata[] = [];\n  const shallowModules: CompileShallowModuleMetadata[] = [];\n  if (staticSymbolResolver.hasDecorators(fileName)) {\n    staticSymbolResolver.getSymbolsOf(fileName).forEach((symbol) => {\n      const resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n      const symbolMeta = resolvedSymbol.metadata;\n      if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n        return;\n      }\n      if (symbolMeta.__symbolic === 'class') {\n        if (metadataResolver.isInjectable(symbol)) {\n          const injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n          if (injectable) {\n            injectables.push(injectable);\n          }\n        } else if (metadataResolver.isNgModule(symbol)) {\n          const module = metadataResolver.getShallowModuleMetadata(symbol);\n          if (module) {\n            shallowModules.push(module);\n          }\n        }\n      }\n    });\n  }\n  return {fileName, injectables, shallowModules};\n}\n\nfunction isValueExportingNonSourceFile(host: NgAnalyzeModulesHost, metadata: any): boolean {\n  let exportsNonSourceFiles = false;\n\n  class Visitor implements ValueVisitor {\n    visitArray(arr: any[], context: any): any { arr.forEach(v => visitValue(v, this, context)); }\n    visitStringMap(map: {[key: string]: any}, context: any): any {\n      Object.keys(map).forEach((key) => visitValue(map[key], this, context));\n    }\n    visitPrimitive(value: any, context: any): any {}\n    visitOther(value: any, context: any): any {\n      if (value instanceof StaticSymbol && !host.isSourceFile(value.filePath)) {\n        exportsNonSourceFiles = true;\n      }\n    }\n  }\n\n  visitValue(metadata, new Visitor(), null);\n  return exportsNonSourceFiles;\n}\n\nexport function mergeAnalyzedFiles(analyzedFiles: NgAnalyzedFile[]): NgAnalyzedModules {\n  const allNgModules: CompileNgModuleMetadata[] = [];\n  const ngModuleByPipeOrDirective = new Map<StaticSymbol, CompileNgModuleMetadata>();\n  const allPipesAndDirectives = new Set<StaticSymbol>();\n\n  analyzedFiles.forEach(af => {\n    af.ngModules.forEach(ngModule => {\n      allNgModules.push(ngModule);\n      ngModule.declaredDirectives.forEach(\n          d => ngModuleByPipeOrDirective.set(d.reference, ngModule));\n      ngModule.declaredPipes.forEach(p => ngModuleByPipeOrDirective.set(p.reference, ngModule));\n    });\n    af.directives.forEach(d => allPipesAndDirectives.add(d));\n    af.pipes.forEach(p => allPipesAndDirectives.add(p));\n  });\n\n  const symbolsMissingModule: StaticSymbol[] = [];\n  allPipesAndDirectives.forEach(ref => {\n    if (!ngModuleByPipeOrDirective.has(ref)) {\n      symbolsMissingModule.push(ref);\n    }\n  });\n  return {\n    ngModules: allNgModules,\n    ngModuleByPipeOrDirective,\n    symbolsMissingModule,\n    files: analyzedFiles\n  };\n}\n\nfunction mergeAndValidateNgFiles(files: NgAnalyzedFile[]): NgAnalyzedModules {\n  return validateAnalyzedModules(mergeAnalyzedFiles(files));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {syntaxError} from '../util';\n\nexport interface Position {\n  fileName: string;\n  line: number;\n  column: number;\n}\n\nexport interface FormattedMessageChain {\n  message: string;\n  position?: Position;\n  next?: FormattedMessageChain;\n}\n\nexport type FormattedError = Error & {\n  chain: FormattedMessageChain;\n  position?: Position;\n};\n\nconst FORMATTED_MESSAGE = 'ngFormattedMessage';\n\nfunction indentStr(level: number): string {\n  if (level <= 0) return '';\n  if (level < 6) return ['', ' ', '  ', '   ', '    ', '     '][level];\n  const half = indentStr(Math.floor(level / 2));\n  return half + half + (level % 2 === 1 ? ' ' : '');\n}\n\nfunction formatChain(chain: FormattedMessageChain | undefined, indent: number = 0): string {\n  if (!chain) return '';\n  const position = chain.position ?\n      `${chain.position.fileName}(${chain.position.line+1},${chain.position.column+1})` :\n      '';\n  const prefix = position && indent === 0 ? `${position}: ` : '';\n  const postfix = position && indent !== 0 ? ` at ${position}` : '';\n  const message = `${prefix}${chain.message}${postfix}`;\n\n  return `${indentStr(indent)}${message}${(chain.next && ('\\n' + formatChain(chain.next, indent + 2))) || ''}`;\n}\n\nexport function formattedError(chain: FormattedMessageChain): FormattedError {\n  const message = formatChain(chain) + '.';\n  const error = syntaxError(message) as FormattedError;\n  (error as any)[FORMATTED_MESSAGE] = true;\n  error.chain = chain;\n  error.position = chain.position;\n  return error;\n}\n\nexport function isFormattedError(error: Error): error is FormattedError {\n  return !!(error as any)[FORMATTED_MESSAGE];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileSummaryKind} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {MetadataFactory, createAttribute, createComponent, createContentChild, createContentChildren, createDirective, createHost, createHostBinding, createHostListener, createInject, createInjectable, createInput, createNgModule, createOptional, createOutput, createPipe, createSelf, createSkipSelf, createViewChild, createViewChildren} from '../core';\nimport * as o from '../output/output_ast';\nimport {SummaryResolver} from '../summary_resolver';\nimport {syntaxError} from '../util';\n\nimport {FormattedMessageChain, formattedError} from './formatted_error';\nimport {StaticSymbol} from './static_symbol';\nimport {StaticSymbolResolver} from './static_symbol_resolver';\n\nconst ANGULAR_CORE = '@angular/core';\nconst ANGULAR_ROUTER = '@angular/router';\n\nconst HIDDEN_KEY = /^\\$.*\\$$/;\n\nconst IGNORE = {\n  __symbolic: 'ignore'\n};\n\nconst USE_VALUE = 'useValue';\nconst PROVIDE = 'provide';\nconst REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data', 'id', 'loadChildren']);\nconst TYPEGUARD_POSTFIX = 'TypeGuard';\nconst USE_IF = 'UseIf';\n\nfunction shouldIgnore(value: any): boolean {\n  return value && value.__symbolic == 'ignore';\n}\n\n/**\n * A static reflector implements enough of the Reflector API that is necessary to compile\n * templates statically.\n */\nexport class StaticReflector implements CompileReflector {\n  private annotationCache = new Map<StaticSymbol, any[]>();\n  private shallowAnnotationCache = new Map<StaticSymbol, any[]>();\n  private propertyCache = new Map<StaticSymbol, {[key: string]: any[]}>();\n  private parameterCache = new Map<StaticSymbol, any[]>();\n  private methodCache = new Map<StaticSymbol, {[key: string]: boolean}>();\n  private staticCache = new Map<StaticSymbol, string[]>();\n  private conversionMap = new Map<StaticSymbol, (context: StaticSymbol, args: any[]) => any>();\n  private resolvedExternalReferences = new Map<string, StaticSymbol>();\n  // TODO(issue/24571): remove '!'.\n  private injectionToken !: StaticSymbol;\n  // TODO(issue/24571): remove '!'.\n  private opaqueToken !: StaticSymbol;\n  // TODO(issue/24571): remove '!'.\n  ROUTES !: StaticSymbol;\n  // TODO(issue/24571): remove '!'.\n  private ANALYZE_FOR_ENTRY_COMPONENTS !: StaticSymbol;\n  private annotationForParentClassWithSummaryKind =\n      new Map<CompileSummaryKind, MetadataFactory<any>[]>();\n\n  constructor(\n      private summaryResolver: SummaryResolver<StaticSymbol>,\n      private symbolResolver: StaticSymbolResolver,\n      knownMetadataClasses: {name: string, filePath: string, ctor: any}[] = [],\n      knownMetadataFunctions: {name: string, filePath: string, fn: any}[] = [],\n      private errorRecorder?: (error: any, fileName?: string) => void) {\n    this.initializeConversionMap();\n    knownMetadataClasses.forEach(\n        (kc) => this._registerDecoratorOrConstructor(\n            this.getStaticSymbol(kc.filePath, kc.name), kc.ctor));\n    knownMetadataFunctions.forEach(\n        (kf) => this._registerFunction(this.getStaticSymbol(kf.filePath, kf.name), kf.fn));\n    this.annotationForParentClassWithSummaryKind.set(\n        CompileSummaryKind.Directive, [createDirective, createComponent]);\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe, [createPipe]);\n    this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule, [createNgModule]);\n    this.annotationForParentClassWithSummaryKind.set(\n        CompileSummaryKind.Injectable,\n        [createInjectable, createPipe, createDirective, createComponent, createNgModule]);\n  }\n\n  componentModuleUrl(typeOrFunc: StaticSymbol): string {\n    const staticSymbol = this.findSymbolDeclaration(typeOrFunc);\n    return this.symbolResolver.getResourcePath(staticSymbol);\n  }\n\n  resolveExternalReference(ref: o.ExternalReference, containingFile?: string): StaticSymbol {\n    let key: string|undefined = undefined;\n    if (!containingFile) {\n      key = `${ref.moduleName}:${ref.name}`;\n      const declarationSymbol = this.resolvedExternalReferences.get(key);\n      if (declarationSymbol) return declarationSymbol;\n    }\n    const refSymbol =\n        this.symbolResolver.getSymbolByModule(ref.moduleName !, ref.name !, containingFile);\n    const declarationSymbol = this.findSymbolDeclaration(refSymbol);\n    if (!containingFile) {\n      this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName !);\n      this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);\n    }\n    if (key) {\n      this.resolvedExternalReferences.set(key, declarationSymbol);\n    }\n    return declarationSymbol;\n  }\n\n  findDeclaration(moduleUrl: string, name: string, containingFile?: string): StaticSymbol {\n    return this.findSymbolDeclaration(\n        this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));\n  }\n\n  tryFindDeclaration(moduleUrl: string, name: string, containingFile?: string): StaticSymbol {\n    return this.symbolResolver.ignoreErrorsFor(\n        () => this.findDeclaration(moduleUrl, name, containingFile));\n  }\n\n  findSymbolDeclaration(symbol: StaticSymbol): StaticSymbol {\n    const resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n    if (resolvedSymbol) {\n      let resolvedMetadata = resolvedSymbol.metadata;\n      if (resolvedMetadata && resolvedMetadata.__symbolic === 'resolved') {\n        resolvedMetadata = resolvedMetadata.symbol;\n      }\n      if (resolvedMetadata instanceof StaticSymbol) {\n        return this.findSymbolDeclaration(resolvedSymbol.metadata);\n      }\n    }\n    return symbol;\n  }\n\n  public tryAnnotations(type: StaticSymbol): any[] {\n    const originalRecorder = this.errorRecorder;\n    this.errorRecorder = (error: any, fileName?: string) => {};\n    try {\n      return this.annotations(type);\n    } finally {\n      this.errorRecorder = originalRecorder;\n    }\n  }\n\n  public annotations(type: StaticSymbol): any[] {\n    return this._annotations(\n        type, (type: StaticSymbol, decorators: any) => this.simplify(type, decorators),\n        this.annotationCache);\n  }\n\n  public shallowAnnotations(type: StaticSymbol): any[] {\n    return this._annotations(\n        type, (type: StaticSymbol, decorators: any) => this.simplify(type, decorators, true),\n        this.shallowAnnotationCache);\n  }\n\n  private _annotations(\n      type: StaticSymbol, simplify: (type: StaticSymbol, decorators: any) => any,\n      annotationCache: Map<StaticSymbol, any[]>): any[] {\n    let annotations = annotationCache.get(type);\n    if (!annotations) {\n      annotations = [];\n      const classMetadata = this.getTypeMetadata(type);\n      const parentType = this.findParentType(type, classMetadata);\n      if (parentType) {\n        const parentAnnotations = this.annotations(parentType);\n        annotations.push(...parentAnnotations);\n      }\n      let ownAnnotations: any[] = [];\n      if (classMetadata['decorators']) {\n        ownAnnotations = simplify(type, classMetadata['decorators']);\n        if (ownAnnotations) {\n          annotations.push(...ownAnnotations);\n        }\n      }\n      if (parentType && !this.summaryResolver.isLibraryFile(type.filePath) &&\n          this.summaryResolver.isLibraryFile(parentType.filePath)) {\n        const summary = this.summaryResolver.resolveSummary(parentType);\n        if (summary && summary.type) {\n          const requiredAnnotationTypes =\n              this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind !) !;\n          const typeHasRequiredAnnotation = requiredAnnotationTypes.some(\n              (requiredType) => ownAnnotations.some(ann => requiredType.isTypeOf(ann)));\n          if (!typeHasRequiredAnnotation) {\n            this.reportError(\n                formatMetadataError(\n                    metadataError(\n                        `Class ${type.name} in ${type.filePath} extends from a ${CompileSummaryKind[summary.type.summaryKind!]} in another compilation unit without duplicating the decorator`,\n                        /* summary */ undefined,\n                        `Please add a ${requiredAnnotationTypes.map((type) => type.ngMetadataName).join(' or ')} decorator to the class`),\n                    type),\n                type);\n          }\n        }\n      }\n      annotationCache.set(type, annotations.filter(ann => !!ann));\n    }\n    return annotations;\n  }\n\n  public propMetadata(type: StaticSymbol): {[key: string]: any[]} {\n    let propMetadata = this.propertyCache.get(type);\n    if (!propMetadata) {\n      const classMetadata = this.getTypeMetadata(type);\n      propMetadata = {};\n      const parentType = this.findParentType(type, classMetadata);\n      if (parentType) {\n        const parentPropMetadata = this.propMetadata(parentType);\n        Object.keys(parentPropMetadata).forEach((parentProp) => {\n          propMetadata ![parentProp] = parentPropMetadata[parentProp];\n        });\n      }\n\n      const members = classMetadata['members'] || {};\n      Object.keys(members).forEach((propName) => {\n        const propData = members[propName];\n        const prop = (<any[]>propData)\n                         .find(a => a['__symbolic'] == 'property' || a['__symbolic'] == 'method');\n        const decorators: any[] = [];\n        if (propMetadata ![propName]) {\n          decorators.push(...propMetadata ![propName]);\n        }\n        propMetadata ![propName] = decorators;\n        if (prop && prop['decorators']) {\n          decorators.push(...this.simplify(type, prop['decorators']));\n        }\n      });\n      this.propertyCache.set(type, propMetadata);\n    }\n    return propMetadata;\n  }\n\n  public parameters(type: StaticSymbol): any[] {\n    if (!(type instanceof StaticSymbol)) {\n      this.reportError(\n          new Error(`parameters received ${JSON.stringify(type)} which is not a StaticSymbol`),\n          type);\n      return [];\n    }\n    try {\n      let parameters = this.parameterCache.get(type);\n      if (!parameters) {\n        const classMetadata = this.getTypeMetadata(type);\n        const parentType = this.findParentType(type, classMetadata);\n        const members = classMetadata ? classMetadata['members'] : null;\n        const ctorData = members ? members['__ctor__'] : null;\n        if (ctorData) {\n          const ctor = (<any[]>ctorData).find(a => a['__symbolic'] == 'constructor');\n          const rawParameterTypes = <any[]>ctor['parameters'] || [];\n          const parameterDecorators = <any[]>this.simplify(type, ctor['parameterDecorators'] || []);\n          parameters = [];\n          rawParameterTypes.forEach((rawParamType, index) => {\n            const nestedResult: any[] = [];\n            const paramType = this.trySimplify(type, rawParamType);\n            if (paramType) nestedResult.push(paramType);\n            const decorators = parameterDecorators ? parameterDecorators[index] : null;\n            if (decorators) {\n              nestedResult.push(...decorators);\n            }\n            parameters !.push(nestedResult);\n          });\n        } else if (parentType) {\n          parameters = this.parameters(parentType);\n        }\n        if (!parameters) {\n          parameters = [];\n        }\n        this.parameterCache.set(type, parameters);\n      }\n      return parameters;\n    } catch (e) {\n      console.error(`Failed on type ${JSON.stringify(type)} with error ${e}`);\n      throw e;\n    }\n  }\n\n  private _methodNames(type: any): {[key: string]: boolean} {\n    let methodNames = this.methodCache.get(type);\n    if (!methodNames) {\n      const classMetadata = this.getTypeMetadata(type);\n      methodNames = {};\n      const parentType = this.findParentType(type, classMetadata);\n      if (parentType) {\n        const parentMethodNames = this._methodNames(parentType);\n        Object.keys(parentMethodNames).forEach((parentProp) => {\n          methodNames ![parentProp] = parentMethodNames[parentProp];\n        });\n      }\n\n      const members = classMetadata['members'] || {};\n      Object.keys(members).forEach((propName) => {\n        const propData = members[propName];\n        const isMethod = (<any[]>propData).some(a => a['__symbolic'] == 'method');\n        methodNames ![propName] = methodNames ![propName] || isMethod;\n      });\n      this.methodCache.set(type, methodNames);\n    }\n    return methodNames;\n  }\n\n  private _staticMembers(type: StaticSymbol): string[] {\n    let staticMembers = this.staticCache.get(type);\n    if (!staticMembers) {\n      const classMetadata = this.getTypeMetadata(type);\n      const staticMemberData = classMetadata['statics'] || {};\n      staticMembers = Object.keys(staticMemberData);\n      this.staticCache.set(type, staticMembers);\n    }\n    return staticMembers;\n  }\n\n\n  private findParentType(type: StaticSymbol, classMetadata: any): StaticSymbol|undefined {\n    const parentType = this.trySimplify(type, classMetadata['extends']);\n    if (parentType instanceof StaticSymbol) {\n      return parentType;\n    }\n  }\n\n  hasLifecycleHook(type: any, lcProperty: string): boolean {\n    if (!(type instanceof StaticSymbol)) {\n      this.reportError(\n          new Error(\n              `hasLifecycleHook received ${JSON.stringify(type)} which is not a StaticSymbol`),\n          type);\n    }\n    try {\n      return !!this._methodNames(type)[lcProperty];\n    } catch (e) {\n      console.error(`Failed on type ${JSON.stringify(type)} with error ${e}`);\n      throw e;\n    }\n  }\n\n  guards(type: any): {[key: string]: StaticSymbol} {\n    if (!(type instanceof StaticSymbol)) {\n      this.reportError(\n          new Error(`guards received ${JSON.stringify(type)} which is not a StaticSymbol`), type);\n      return {};\n    }\n    const staticMembers = this._staticMembers(type);\n    const result: {[key: string]: StaticSymbol} = {};\n    for (let name of staticMembers) {\n      if (name.endsWith(TYPEGUARD_POSTFIX)) {\n        let property = name.substr(0, name.length - TYPEGUARD_POSTFIX.length);\n        let value: any;\n        if (property.endsWith(USE_IF)) {\n          property = name.substr(0, property.length - USE_IF.length);\n          value = USE_IF;\n        } else {\n          value = this.getStaticSymbol(type.filePath, type.name, [name]);\n        }\n        result[property] = value;\n      }\n    }\n    return result;\n  }\n\n  private _registerDecoratorOrConstructor(type: StaticSymbol, ctor: any): void {\n    this.conversionMap.set(type, (context: StaticSymbol, args: any[]) => new ctor(...args));\n  }\n\n  private _registerFunction(type: StaticSymbol, fn: any): void {\n    this.conversionMap.set(type, (context: StaticSymbol, args: any[]) => fn.apply(undefined, args));\n  }\n\n  private initializeConversionMap(): void {\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Injectable'), createInjectable);\n    this.injectionToken = this.findDeclaration(ANGULAR_CORE, 'InjectionToken');\n    this.opaqueToken = this.findDeclaration(ANGULAR_CORE, 'OpaqueToken');\n    this.ROUTES = this.tryFindDeclaration(ANGULAR_ROUTER, 'ROUTES');\n    this.ANALYZE_FOR_ENTRY_COMPONENTS =\n        this.findDeclaration(ANGULAR_CORE, 'ANALYZE_FOR_ENTRY_COMPONENTS');\n\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Inject'), createInject);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Attribute'), createAttribute);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'ContentChild'), createContentChild);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'ContentChildren'), createContentChildren);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'ViewChild'), createViewChild);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'ViewChildren'), createViewChildren);\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Input'), createInput);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Output'), createOutput);\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Pipe'), createPipe);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'HostBinding'), createHostBinding);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'HostListener'), createHostListener);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Directive'), createDirective);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Component'), createComponent);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'NgModule'), createNgModule);\n\n    // Note: Some metadata classes can be used directly with Provider.deps.\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n    this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n    this._registerDecoratorOrConstructor(\n        this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n  }\n\n  /**\n   * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n   * All types passed to the StaticResolver should be pseudo-types returned by this method.\n   *\n   * @param declarationFile the absolute path of the file where the symbol is declared\n   * @param name the name of the type.\n   */\n  getStaticSymbol(declarationFile: string, name: string, members?: string[]): StaticSymbol {\n    return this.symbolResolver.getStaticSymbol(declarationFile, name, members);\n  }\n\n  /**\n   * Simplify but discard any errors\n   */\n  private trySimplify(context: StaticSymbol, value: any): any {\n    const originalRecorder = this.errorRecorder;\n    this.errorRecorder = (error: any, fileName?: string) => {};\n    const result = this.simplify(context, value);\n    this.errorRecorder = originalRecorder;\n    return result;\n  }\n\n  /** @internal */\n  public simplify(context: StaticSymbol, value: any, lazy: boolean = false): any {\n    const self = this;\n    let scope = BindingScope.empty;\n    const calling = new Map<StaticSymbol, boolean>();\n    const rootContext = context;\n\n    function simplifyInContext(\n        context: StaticSymbol, value: any, depth: number, references: number): any {\n      function resolveReferenceValue(staticSymbol: StaticSymbol): any {\n        const resolvedSymbol = self.symbolResolver.resolveSymbol(staticSymbol);\n        return resolvedSymbol ? resolvedSymbol.metadata : null;\n      }\n\n      function simplifyEagerly(value: any): any {\n        return simplifyInContext(context, value, depth, 0);\n      }\n\n      function simplifyLazily(value: any): any {\n        return simplifyInContext(context, value, depth, references + 1);\n      }\n\n      function simplifyNested(nestedContext: StaticSymbol, value: any): any {\n        if (nestedContext === context) {\n          // If the context hasn't changed let the exception propagate unmodified.\n          return simplifyInContext(nestedContext, value, depth + 1, references);\n        }\n        try {\n          return simplifyInContext(nestedContext, value, depth + 1, references);\n        } catch (e) {\n          if (isMetadataError(e)) {\n            // Propagate the message text up but add a message to the chain that explains how we got\n            // here.\n            // e.chain implies e.symbol\n            const summaryMsg = e.chain ? 'references \\'' + e.symbol !.name + '\\'' : errorSummary(e);\n            const summary = `'${nestedContext.name}' ${summaryMsg}`;\n            const chain = {message: summary, position: e.position, next: e.chain};\n            // TODO(chuckj): retrieve the position information indirectly from the collectors node\n            // map if the metadata is from a .ts file.\n            self.error(\n                {\n                  message: e.message,\n                  advise: e.advise,\n                  context: e.context, chain,\n                  symbol: nestedContext\n                },\n                context);\n          } else {\n            // It is probably an internal error.\n            throw e;\n          }\n        }\n      }\n\n      function simplifyCall(\n          functionSymbol: StaticSymbol, targetFunction: any, args: any[], targetExpression: any) {\n        if (targetFunction && targetFunction['__symbolic'] == 'function') {\n          if (calling.get(functionSymbol)) {\n            self.error(\n                {\n                  message: 'Recursion is not supported',\n                  summary: `called '${functionSymbol.name}' recursively`,\n                  value: targetFunction\n                },\n                functionSymbol);\n          }\n          try {\n            const value = targetFunction['value'];\n            if (value && (depth != 0 || value.__symbolic != 'error')) {\n              const parameters: string[] = targetFunction['parameters'];\n              const defaults: any[] = targetFunction.defaults;\n              args = args.map(arg => simplifyNested(context, arg))\n                         .map(arg => shouldIgnore(arg) ? undefined : arg);\n              if (defaults && defaults.length > args.length) {\n                args.push(...defaults.slice(args.length).map((value: any) => simplify(value)));\n              }\n              calling.set(functionSymbol, true);\n              const functionScope = BindingScope.build();\n              for (let i = 0; i < parameters.length; i++) {\n                functionScope.define(parameters[i], args[i]);\n              }\n              const oldScope = scope;\n              let result: any;\n              try {\n                scope = functionScope.done();\n                result = simplifyNested(functionSymbol, value);\n              } finally {\n                scope = oldScope;\n              }\n              return result;\n            }\n          } finally {\n            calling.delete(functionSymbol);\n          }\n        }\n\n        if (depth === 0) {\n          // If depth is 0 we are evaluating the top level expression that is describing element\n          // decorator. In this case, it is a decorator we don't understand, such as a custom\n          // non-angular decorator, and we should just ignore it.\n          return IGNORE;\n        }\n        let position: Position|undefined = undefined;\n        if (targetExpression && targetExpression.__symbolic == 'resolved') {\n          const line = targetExpression.line;\n          const character = targetExpression.character;\n          const fileName = targetExpression.fileName;\n          if (fileName != null && line != null && character != null) {\n            position = {fileName, line, column: character};\n          }\n        }\n        self.error(\n            {\n              message: FUNCTION_CALL_NOT_SUPPORTED,\n              context: functionSymbol,\n              value: targetFunction, position\n            },\n            context);\n      }\n\n      function simplify(expression: any): any {\n        if (isPrimitive(expression)) {\n          return expression;\n        }\n        if (expression instanceof Array) {\n          const result: any[] = [];\n          for (const item of (<any>expression)) {\n            // Check for a spread expression\n            if (item && item.__symbolic === 'spread') {\n              // We call with references as 0 because we require the actual value and cannot\n              // tolerate a reference here.\n              const spreadArray = simplifyEagerly(item.expression);\n              if (Array.isArray(spreadArray)) {\n                for (const spreadItem of spreadArray) {\n                  result.push(spreadItem);\n                }\n                continue;\n              }\n            }\n            const value = simplify(item);\n            if (shouldIgnore(value)) {\n              continue;\n            }\n            result.push(value);\n          }\n          return result;\n        }\n        if (expression instanceof StaticSymbol) {\n          // Stop simplification at builtin symbols or if we are in a reference context and\n          // the symbol doesn't have members.\n          if (expression === self.injectionToken || self.conversionMap.has(expression) ||\n              (references > 0 && !expression.members.length)) {\n            return expression;\n          } else {\n            const staticSymbol = expression;\n            const declarationValue = resolveReferenceValue(staticSymbol);\n            if (declarationValue != null) {\n              return simplifyNested(staticSymbol, declarationValue);\n            } else {\n              return staticSymbol;\n            }\n          }\n        }\n        if (expression) {\n          if (expression['__symbolic']) {\n            let staticSymbol: StaticSymbol;\n            switch (expression['__symbolic']) {\n              case 'binop':\n                let left = simplify(expression['left']);\n                if (shouldIgnore(left)) return left;\n                let right = simplify(expression['right']);\n                if (shouldIgnore(right)) return right;\n                switch (expression['operator']) {\n                  case '&&':\n                    return left && right;\n                  case '||':\n                    return left || right;\n                  case '|':\n                    return left | right;\n                  case '^':\n                    return left ^ right;\n                  case '&':\n                    return left & right;\n                  case '==':\n                    return left == right;\n                  case '!=':\n                    return left != right;\n                  case '===':\n                    return left === right;\n                  case '!==':\n                    return left !== right;\n                  case '<':\n                    return left < right;\n                  case '>':\n                    return left > right;\n                  case '<=':\n                    return left <= right;\n                  case '>=':\n                    return left >= right;\n                  case '<<':\n                    return left << right;\n                  case '>>':\n                    return left >> right;\n                  case '+':\n                    return left + right;\n                  case '-':\n                    return left - right;\n                  case '*':\n                    return left * right;\n                  case '/':\n                    return left / right;\n                  case '%':\n                    return left % right;\n                }\n                return null;\n              case 'if':\n                let condition = simplify(expression['condition']);\n                return condition ? simplify(expression['thenExpression']) :\n                                   simplify(expression['elseExpression']);\n              case 'pre':\n                let operand = simplify(expression['operand']);\n                if (shouldIgnore(operand)) return operand;\n                switch (expression['operator']) {\n                  case '+':\n                    return operand;\n                  case '-':\n                    return -operand;\n                  case '!':\n                    return !operand;\n                  case '~':\n                    return ~operand;\n                }\n                return null;\n              case 'index':\n                let indexTarget = simplifyEagerly(expression['expression']);\n                let index = simplifyEagerly(expression['index']);\n                if (indexTarget && isPrimitive(index)) return indexTarget[index];\n                return null;\n              case 'select':\n                const member = expression['member'];\n                let selectContext = context;\n                let selectTarget = simplify(expression['expression']);\n                if (selectTarget instanceof StaticSymbol) {\n                  const members = selectTarget.members.concat(member);\n                  selectContext =\n                      self.getStaticSymbol(selectTarget.filePath, selectTarget.name, members);\n                  const declarationValue = resolveReferenceValue(selectContext);\n                  if (declarationValue != null) {\n                    return simplifyNested(selectContext, declarationValue);\n                  } else {\n                    return selectContext;\n                  }\n                }\n                if (selectTarget && isPrimitive(member))\n                  return simplifyNested(selectContext, selectTarget[member]);\n                return null;\n              case 'reference':\n                // Note: This only has to deal with variable references, as symbol references have\n                // been converted into 'resolved'\n                // in the StaticSymbolResolver.\n                const name: string = expression['name'];\n                const localValue = scope.resolve(name);\n                if (localValue != BindingScope.missing) {\n                  return localValue;\n                }\n                break;\n              case 'resolved':\n                try {\n                  return simplify(expression.symbol);\n                } catch (e) {\n                  // If an error is reported evaluating the symbol record the position of the\n                  // reference in the error so it can\n                  // be reported in the error message generated from the exception.\n                  if (isMetadataError(e) && expression.fileName != null &&\n                      expression.line != null && expression.character != null) {\n                    e.position = {\n                      fileName: expression.fileName,\n                      line: expression.line,\n                      column: expression.character\n                    };\n                  }\n                  throw e;\n                }\n              case 'class':\n                return context;\n              case 'function':\n                return context;\n              case 'new':\n              case 'call':\n                // Determine if the function is a built-in conversion\n                staticSymbol = simplifyInContext(\n                    context, expression['expression'], depth + 1, /* references */ 0);\n                if (staticSymbol instanceof StaticSymbol) {\n                  if (staticSymbol === self.injectionToken || staticSymbol === self.opaqueToken) {\n                    // if somebody calls new InjectionToken, don't create an InjectionToken,\n                    // but rather return the symbol to which the InjectionToken is assigned to.\n\n                    // OpaqueToken is supported too as it is required by the language service to\n                    // support v4 and prior versions of Angular.\n                    return context;\n                  }\n                  const argExpressions: any[] = expression['arguments'] || [];\n                  let converter = self.conversionMap.get(staticSymbol);\n                  if (converter) {\n                    const args = argExpressions.map(arg => simplifyNested(context, arg))\n                                     .map(arg => shouldIgnore(arg) ? undefined : arg);\n                    return converter(context, args);\n                  } else {\n                    // Determine if the function is one we can simplify.\n                    const targetFunction = resolveReferenceValue(staticSymbol);\n                    return simplifyCall(\n                        staticSymbol, targetFunction, argExpressions, expression['expression']);\n                  }\n                }\n                return IGNORE;\n              case 'error':\n                let message = expression.message;\n                if (expression['line'] != null) {\n                  self.error(\n                      {\n                        message,\n                        context: expression.context,\n                        value: expression,\n                        position: {\n                          fileName: expression['fileName'],\n                          line: expression['line'],\n                          column: expression['character']\n                        }\n                      },\n                      context);\n                } else {\n                  self.error({message, context: expression.context}, context);\n                }\n                return IGNORE;\n              case 'ignore':\n                return expression;\n            }\n            return null;\n          }\n          return mapStringMap(expression, (value, name) => {\n            if (REFERENCE_SET.has(name)) {\n              if (name === USE_VALUE && PROVIDE in expression) {\n                // If this is a provider expression, check for special tokens that need the value\n                // during analysis.\n                const provide = simplify(expression.provide);\n                if (provide === self.ROUTES || provide == self.ANALYZE_FOR_ENTRY_COMPONENTS) {\n                  return simplify(value);\n                }\n              }\n              return simplifyLazily(value);\n            }\n            return simplify(value);\n          });\n        }\n        return IGNORE;\n      }\n\n      return simplify(value);\n    }\n\n    let result: any;\n    try {\n      result = simplifyInContext(context, value, 0, lazy ? 1 : 0);\n    } catch (e) {\n      if (this.errorRecorder) {\n        this.reportError(e, context);\n      } else {\n        throw formatMetadataError(e, context);\n      }\n    }\n    if (shouldIgnore(result)) {\n      return undefined;\n    }\n    return result;\n  }\n\n  private getTypeMetadata(type: StaticSymbol): {[key: string]: any} {\n    const resolvedSymbol = this.symbolResolver.resolveSymbol(type);\n    return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata :\n                                                       {__symbolic: 'class'};\n  }\n\n  private reportError(error: Error, context: StaticSymbol, path?: string) {\n    if (this.errorRecorder) {\n      this.errorRecorder(\n          formatMetadataError(error, context), (context && context.filePath) || path);\n    } else {\n      throw error;\n    }\n  }\n\n  private error(\n      {message, summary, advise, position, context, value, symbol, chain}: {\n        message: string,\n        summary?: string,\n        advise?: string,\n        position?: Position,\n        context?: any,\n        value?: any,\n        symbol?: StaticSymbol,\n        chain?: MetadataMessageChain\n      },\n      reportingContext: StaticSymbol) {\n    this.reportError(\n        metadataError(message, summary, advise, position, symbol, context, chain),\n        reportingContext);\n  }\n}\n\ninterface Position {\n  fileName: string;\n  line: number;\n  column: number;\n}\n\ninterface MetadataMessageChain {\n  message: string;\n  summary?: string;\n  position?: Position;\n  context?: any;\n  symbol?: StaticSymbol;\n  next?: MetadataMessageChain;\n}\n\ntype MetadataError = Error & {\n  position?: Position;\n  advise?: string;\n  summary?: string;\n  context?: any;\n  symbol?: StaticSymbol;\n  chain?: MetadataMessageChain;\n};\n\nconst METADATA_ERROR = 'ngMetadataError';\n\nfunction metadataError(\n    message: string, summary?: string, advise?: string, position?: Position, symbol?: StaticSymbol,\n    context?: any, chain?: MetadataMessageChain): MetadataError {\n  const error = syntaxError(message) as MetadataError;\n  (error as any)[METADATA_ERROR] = true;\n  if (advise) error.advise = advise;\n  if (position) error.position = position;\n  if (summary) error.summary = summary;\n  if (context) error.context = context;\n  if (chain) error.chain = chain;\n  if (symbol) error.symbol = symbol;\n  return error;\n}\n\nfunction isMetadataError(error: Error): error is MetadataError {\n  return !!(error as any)[METADATA_ERROR];\n}\n\nconst REFERENCE_TO_NONEXPORTED_CLASS = 'Reference to non-exported class';\nconst VARIABLE_NOT_INITIALIZED = 'Variable not initialized';\nconst DESTRUCTURE_NOT_SUPPORTED = 'Destructuring not supported';\nconst COULD_NOT_RESOLVE_TYPE = 'Could not resolve type';\nconst FUNCTION_CALL_NOT_SUPPORTED = 'Function call not supported';\nconst REFERENCE_TO_LOCAL_SYMBOL = 'Reference to a local symbol';\nconst LAMBDA_NOT_SUPPORTED = 'Lambda not supported';\n\nfunction expandedMessage(message: string, context: any): string {\n  switch (message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (context && context.className) {\n        return `References to a non-exported class are not supported in decorators but ${context.className} was referenced.`;\n      }\n      break;\n    case VARIABLE_NOT_INITIALIZED:\n      return 'Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler';\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler';\n    case COULD_NOT_RESOLVE_TYPE:\n      if (context && context.typeName) {\n        return `Could not resolve type ${context.typeName}`;\n      }\n      break;\n    case FUNCTION_CALL_NOT_SUPPORTED:\n      if (context && context.name) {\n        return `Function calls are not supported in decorators but '${context.name}' was called`;\n      }\n      return 'Function calls are not supported in decorators';\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (context && context.name) {\n        return `Reference to a local (non-exported) symbols are not supported in decorators but '${context.name}' was referenced`;\n      }\n      break;\n    case LAMBDA_NOT_SUPPORTED:\n      return `Function expressions are not supported in decorators`;\n  }\n  return message;\n}\n\nfunction messageAdvise(message: string, context: any): string|undefined {\n  switch (message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (context && context.className) {\n        return `Consider exporting '${context.className}'`;\n      }\n      break;\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'Consider simplifying to avoid destructuring';\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (context && context.name) {\n        return `Consider exporting '${context.name}'`;\n      }\n      break;\n    case LAMBDA_NOT_SUPPORTED:\n      return `Consider changing the function expression into an exported function`;\n  }\n  return undefined;\n}\n\nfunction errorSummary(error: MetadataError): string {\n  if (error.summary) {\n    return error.summary;\n  }\n  switch (error.message) {\n    case REFERENCE_TO_NONEXPORTED_CLASS:\n      if (error.context && error.context.className) {\n        return `references non-exported class ${error.context.className}`;\n      }\n      break;\n    case VARIABLE_NOT_INITIALIZED:\n      return 'is not initialized';\n    case DESTRUCTURE_NOT_SUPPORTED:\n      return 'is a destructured variable';\n    case COULD_NOT_RESOLVE_TYPE:\n      return 'could not be resolved';\n    case FUNCTION_CALL_NOT_SUPPORTED:\n      if (error.context && error.context.name) {\n        return `calls '${error.context.name}'`;\n      }\n      return `calls a function`;\n    case REFERENCE_TO_LOCAL_SYMBOL:\n      if (error.context && error.context.name) {\n        return `references local variable ${error.context.name}`;\n      }\n      return `references a local variable`;\n  }\n  return 'contains the error';\n}\n\nfunction mapStringMap(input: {[key: string]: any}, transform: (value: any, key: string) => any):\n    {[key: string]: any} {\n  if (!input) return {};\n  const result: {[key: string]: any} = {};\n  Object.keys(input).forEach((key) => {\n    const value = transform(input[key], key);\n    if (!shouldIgnore(value)) {\n      if (HIDDEN_KEY.test(key)) {\n        Object.defineProperty(result, key, {enumerable: false, configurable: true, value: value});\n      } else {\n        result[key] = value;\n      }\n    }\n  });\n  return result;\n}\n\nfunction isPrimitive(o: any): boolean {\n  return o === null || (typeof o !== 'function' && typeof o !== 'object');\n}\n\ninterface BindingScopeBuilder {\n  define(name: string, value: any): BindingScopeBuilder;\n  done(): BindingScope;\n}\n\nabstract class BindingScope {\n  abstract resolve(name: string): any;\n  public static missing = {};\n  public static empty: BindingScope = {resolve: name => BindingScope.missing};\n\n  public static build(): BindingScopeBuilder {\n    const current = new Map<string, any>();\n    return {\n      define: function(name, value) {\n        current.set(name, value);\n        return this;\n      },\n      done: function() {\n        return current.size > 0 ? new PopulatedScope(current) : BindingScope.empty;\n      }\n    };\n  }\n}\n\nclass PopulatedScope extends BindingScope {\n  constructor(private bindings: Map<string, any>) { super(); }\n\n  resolve(name: string): any {\n    return this.bindings.has(name) ? this.bindings.get(name) : BindingScope.missing;\n  }\n}\n\nfunction formatMetadataMessageChain(\n    chain: MetadataMessageChain, advise: string | undefined): FormattedMessageChain {\n  const expanded = expandedMessage(chain.message, chain.context);\n  const nesting = chain.symbol ? ` in '${chain.symbol.name}'` : '';\n  const message = `${expanded}${nesting}`;\n  const position = chain.position;\n  const next: FormattedMessageChain|undefined = chain.next ?\n      formatMetadataMessageChain(chain.next, advise) :\n      advise ? {message: advise} : undefined;\n  return {message, position, next};\n}\n\nfunction formatMetadataError(e: Error, context: StaticSymbol): Error {\n  if (isMetadataError(e)) {\n    // Produce a formatted version of the and leaving enough information in the original error\n    // to recover the formatting information to eventually produce a diagnostic error message.\n    const position = e.position;\n    const chain: MetadataMessageChain = {\n      message: `Error during template compile of '${context.name}'`,\n      position: position,\n      next: {message: e.message, next: e.chain, context: e.context, symbol: e.symbol}\n    };\n    const advise = e.advise || messageAdvise(e.message, e.context);\n    return formattedError(formatMetadataMessageChain(chain, advise));\n  }\n  return e;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Summary, SummaryResolver} from '../summary_resolver';\n\nimport {StaticSymbol, StaticSymbolCache} from './static_symbol';\nimport {deserializeSummaries} from './summary_serializer';\nimport {stripGeneratedFileSuffix, summaryFileName} from './util';\n\nexport interface AotSummaryResolverHost {\n  /**\n   * Loads an NgModule/Directive/Pipe summary file\n   */\n  loadSummary(filePath: string): string|null;\n\n  /**\n   * Returns whether a file is a source file or not.\n   */\n  isSourceFile(sourceFilePath: string): boolean;\n  /**\n   * Converts a file name into a representation that should be stored in a summary file.\n   * This has to include changing the suffix as well.\n   * E.g.\n   * `some_file.ts` -> `some_file.d.ts`\n   *\n   * @param referringSrcFileName the soure file that refers to fileName\n   */\n  toSummaryFileName(fileName: string, referringSrcFileName: string): string;\n\n  /**\n   * Converts a fileName that was processed by `toSummaryFileName` back into a real fileName\n   * given the fileName of the library that is referrig to it.\n   */\n  fromSummaryFileName(fileName: string, referringLibFileName: string): string;\n}\n\nexport class AotSummaryResolver implements SummaryResolver<StaticSymbol> {\n  // Note: this will only contain StaticSymbols without members!\n  private summaryCache = new Map<StaticSymbol, Summary<StaticSymbol>>();\n  private loadedFilePaths = new Map<string, boolean>();\n  // Note: this will only contain StaticSymbols without members!\n  private importAs = new Map<StaticSymbol, StaticSymbol>();\n  private knownFileNameToModuleNames = new Map<string, string>();\n\n  constructor(private host: AotSummaryResolverHost, private staticSymbolCache: StaticSymbolCache) {}\n\n  isLibraryFile(filePath: string): boolean {\n    // Note: We need to strip the .ngfactory. file path,\n    // so this method also works for generated files\n    // (for which host.isSourceFile will always return false).\n    return !this.host.isSourceFile(stripGeneratedFileSuffix(filePath));\n  }\n\n  toSummaryFileName(filePath: string, referringSrcFileName: string) {\n    return this.host.toSummaryFileName(filePath, referringSrcFileName);\n  }\n\n  fromSummaryFileName(fileName: string, referringLibFileName: string) {\n    return this.host.fromSummaryFileName(fileName, referringLibFileName);\n  }\n\n  resolveSummary(staticSymbol: StaticSymbol): Summary<StaticSymbol>|null {\n    const rootSymbol = staticSymbol.members.length ?\n        this.staticSymbolCache.get(staticSymbol.filePath, staticSymbol.name) :\n        staticSymbol;\n    let summary = this.summaryCache.get(rootSymbol);\n    if (!summary) {\n      this._loadSummaryFile(staticSymbol.filePath);\n      summary = this.summaryCache.get(staticSymbol) !;\n    }\n    return (rootSymbol === staticSymbol && summary) || null;\n  }\n\n  getSymbolsOf(filePath: string): StaticSymbol[]|null {\n    if (this._loadSummaryFile(filePath)) {\n      return Array.from(this.summaryCache.keys()).filter((symbol) => symbol.filePath === filePath);\n    }\n    return null;\n  }\n\n  getImportAs(staticSymbol: StaticSymbol): StaticSymbol {\n    staticSymbol.assertNoMembers();\n    return this.importAs.get(staticSymbol) !;\n  }\n\n  /**\n   * Converts a file path to a module name that can be used as an `import`.\n   */\n  getKnownModuleName(importedFilePath: string): string|null {\n    return this.knownFileNameToModuleNames.get(importedFilePath) || null;\n  }\n\n  addSummary(summary: Summary<StaticSymbol>) { this.summaryCache.set(summary.symbol, summary); }\n\n  private _loadSummaryFile(filePath: string): boolean {\n    let hasSummary = this.loadedFilePaths.get(filePath);\n    if (hasSummary != null) {\n      return hasSummary;\n    }\n    let json: string|null = null;\n    if (this.isLibraryFile(filePath)) {\n      const summaryFilePath = summaryFileName(filePath);\n      try {\n        json = this.host.loadSummary(summaryFilePath);\n      } catch (e) {\n        console.error(`Error loading summary file ${summaryFilePath}`);\n        throw e;\n      }\n    }\n    hasSummary = json != null;\n    this.loadedFilePaths.set(filePath, hasSummary);\n    if (json) {\n      const {moduleName, summaries, importAs} =\n          deserializeSummaries(this.staticSymbolCache, this, filePath, json);\n      summaries.forEach((summary) => this.summaryCache.set(summary.symbol, summary));\n      if (moduleName) {\n        this.knownFileNameToModuleNames.set(filePath, moduleName);\n      }\n      importAs.forEach((importAs) => { this.importAs.set(importAs.symbol, importAs.importAs); });\n    }\n    return hasSummary;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompilerConfig} from '../config';\nimport {MissingTranslationStrategy, ViewEncapsulation} from '../core';\nimport {DirectiveNormalizer} from '../directive_normalizer';\nimport {DirectiveResolver} from '../directive_resolver';\nimport {Lexer} from '../expression_parser/lexer';\nimport {Parser} from '../expression_parser/parser';\nimport {I18NHtmlParser} from '../i18n/i18n_html_parser';\nimport {InjectableCompiler} from '../injectable_compiler';\nimport {CompileMetadataResolver} from '../metadata_resolver';\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {NgModuleCompiler} from '../ng_module_compiler';\nimport {NgModuleResolver} from '../ng_module_resolver';\nimport {TypeScriptEmitter} from '../output/ts_emitter';\nimport {PipeResolver} from '../pipe_resolver';\nimport {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry';\nimport {StyleCompiler} from '../style_compiler';\nimport {TemplateParser} from '../template_parser/template_parser';\nimport {UrlResolver} from '../url_resolver';\nimport {syntaxError} from '../util';\nimport {TypeCheckCompiler} from '../view_compiler/type_check_compiler';\nimport {ViewCompiler} from '../view_compiler/view_compiler';\n\nimport {AotCompiler} from './compiler';\nimport {AotCompilerHost} from './compiler_host';\nimport {AotCompilerOptions} from './compiler_options';\nimport {StaticReflector} from './static_reflector';\nimport {StaticSymbol, StaticSymbolCache} from './static_symbol';\nimport {StaticSymbolResolver} from './static_symbol_resolver';\nimport {AotSummaryResolver} from './summary_resolver';\n\nexport function createAotUrlResolver(host: {\n  resourceNameToFileName(resourceName: string, containingFileName: string): string | null;\n}): UrlResolver {\n  return {\n    resolve: (basePath: string, url: string) => {\n      const filePath = host.resourceNameToFileName(url, basePath);\n      if (!filePath) {\n        throw syntaxError(`Couldn't resolve resource ${url} from ${basePath}`);\n      }\n      return filePath;\n    }\n  };\n}\n\n/**\n * Creates a new AotCompiler based on options and a host.\n */\nexport function createAotCompiler(\n    compilerHost: AotCompilerHost, options: AotCompilerOptions,\n    errorCollector?: (error: any, type?: any) =>\n        void): {compiler: AotCompiler, reflector: StaticReflector} {\n  let translations: string = options.translations || '';\n\n  const urlResolver = createAotUrlResolver(compilerHost);\n  const symbolCache = new StaticSymbolCache();\n  const summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);\n  const symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);\n  const staticReflector =\n      new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);\n  let htmlParser: I18NHtmlParser;\n  if (!!options.enableIvy) {\n    // Ivy handles i18n at the compiler level so we must use a regular parser\n    htmlParser = new HtmlParser() as I18NHtmlParser;\n  } else {\n    htmlParser = new I18NHtmlParser(\n        new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);\n  }\n  const config = new CompilerConfig({\n    defaultEncapsulation: ViewEncapsulation.Emulated,\n    useJit: false,\n    missingTranslation: options.missingTranslation,\n    preserveWhitespaces: options.preserveWhitespaces,\n    strictInjectionParameters: options.strictInjectionParameters,\n  });\n  const normalizer = new DirectiveNormalizer(\n      {get: (url: string) => compilerHost.loadResource(url)}, urlResolver, htmlParser, config);\n  const expressionParser = new Parser(new Lexer());\n  const elementSchemaRegistry = new DomElementSchemaRegistry();\n  const tmplParser = new TemplateParser(\n      config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);\n  const resolver = new CompileMetadataResolver(\n      config, htmlParser, new NgModuleResolver(staticReflector),\n      new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver,\n      elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector);\n  // TODO(vicb): do not pass options.i18nFormat here\n  const viewCompiler = new ViewCompiler(staticReflector);\n  const typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);\n  const compiler = new AotCompiler(\n      config, options, compilerHost, staticReflector, resolver, tmplParser,\n      new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler,\n      new NgModuleCompiler(staticReflector),\n      new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(),\n      summaryResolver, symbolResolver);\n  return {compiler, reflector: staticReflector};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CompileTypeSummary} from './compile_metadata';\nimport {Type} from './core';\n\nexport interface Summary<T> {\n  symbol: T;\n  metadata: any;\n  type?: CompileTypeSummary;\n}\n\nexport abstract class SummaryResolver<T> {\n  abstract isLibraryFile(fileName: string): boolean;\n  abstract toSummaryFileName(fileName: string, referringSrcFileName: string): string;\n  abstract fromSummaryFileName(fileName: string, referringLibFileName: string): string;\n  abstract resolveSummary(reference: T): Summary<T>|null;\n  abstract getSymbolsOf(filePath: string): T[]|null;\n  abstract getImportAs(reference: T): T;\n  abstract getKnownModuleName(fileName: string): string|null;\n  abstract addSummary(summary: Summary<T>): void;\n}\n\nexport class JitSummaryResolver implements SummaryResolver<Type> {\n  private _summaries = new Map<Type, Summary<Type>>();\n\n  isLibraryFile(): boolean { return false; }\n  toSummaryFileName(fileName: string): string { return fileName; }\n  fromSummaryFileName(fileName: string): string { return fileName; }\n  resolveSummary(reference: Type): Summary<Type>|null {\n    return this._summaries.get(reference) || null;\n  }\n  getSymbolsOf(): Type[] { return []; }\n  getImportAs(reference: Type): Type { return reference; }\n  getKnownModuleName(fileName: string) { return null; }\n  addSummary(summary: Summary<Type>) { this._summaries.set(summary.symbol, summary); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n\nimport {CompileReflector} from '../compile_reflector';\n\nimport * as o from './output_ast';\nimport {debugOutputAstAsTypeScript} from './ts_emitter';\n\nexport function interpretStatements(\n    statements: o.Statement[], reflector: CompileReflector): {[key: string]: any} {\n  const ctx = new _ExecutionContext(null, null, null, new Map<string, any>());\n  const visitor = new StatementInterpreter(reflector);\n  visitor.visitAllStatements(statements, ctx);\n  const result: {[key: string]: any} = {};\n  ctx.exports.forEach((exportName) => { result[exportName] = ctx.vars.get(exportName); });\n  return result;\n}\n\nfunction _executeFunctionStatements(\n    varNames: string[], varValues: any[], statements: o.Statement[], ctx: _ExecutionContext,\n    visitor: StatementInterpreter): any {\n  const childCtx = ctx.createChildWihtLocalVars();\n  for (let i = 0; i < varNames.length; i++) {\n    childCtx.vars.set(varNames[i], varValues[i]);\n  }\n  const result = visitor.visitAllStatements(statements, childCtx);\n  return result ? result.value : null;\n}\n\nclass _ExecutionContext {\n  exports: string[] = [];\n\n  constructor(\n      public parent: _ExecutionContext|null, public instance: Object|null,\n      public className: string|null, public vars: Map<string, any>) {}\n\n  createChildWihtLocalVars(): _ExecutionContext {\n    return new _ExecutionContext(this, this.instance, this.className, new Map<string, any>());\n  }\n}\n\nclass ReturnValue {\n  constructor(public value: any) {}\n}\n\nfunction createDynamicClass(\n    _classStmt: o.ClassStmt, _ctx: _ExecutionContext, _visitor: StatementInterpreter): Function {\n  const propertyDescriptors: {[key: string]: any} = {};\n\n  _classStmt.getters.forEach((getter: o.ClassGetter) => {\n    // Note: use `function` instead of arrow function to capture `this`\n    propertyDescriptors[getter.name] = {\n      configurable: false,\n      get: function() {\n        const instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n        return _executeFunctionStatements([], [], getter.body, instanceCtx, _visitor);\n      }\n    };\n  });\n  _classStmt.methods.forEach(function(method: o.ClassMethod) {\n    const paramNames = method.params.map(param => param.name);\n    // Note: use `function` instead of arrow function to capture `this`\n    propertyDescriptors[method.name !] = {\n      writable: false,\n      configurable: false,\n      value: function(...args: any[]) {\n        const instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n        return _executeFunctionStatements(paramNames, args, method.body, instanceCtx, _visitor);\n      }\n    };\n  });\n\n  const ctorParamNames = _classStmt.constructorMethod.params.map(param => param.name);\n  // Note: use `function` instead of arrow function to capture `this`\n  const ctor = function(this: Object, ...args: any[]) {\n    const instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n    _classStmt.fields.forEach((field) => { (this as any)[field.name] = undefined; });\n    _executeFunctionStatements(\n        ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);\n  };\n  const superClass = _classStmt.parent ? _classStmt.parent.visitExpression(_visitor, _ctx) : Object;\n  ctor.prototype = Object.create(superClass.prototype, propertyDescriptors);\n  return ctor;\n}\n\nclass StatementInterpreter implements o.StatementVisitor, o.ExpressionVisitor {\n  constructor(private reflector: CompileReflector) {}\n  debugAst(ast: o.Expression|o.Statement|o.Type): string { return debugOutputAstAsTypeScript(ast); }\n\n  visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: _ExecutionContext): any {\n    const initialValue = stmt.value ? stmt.value.visitExpression(this, ctx) : undefined;\n    ctx.vars.set(stmt.name, initialValue);\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.exports.push(stmt.name);\n    }\n    return null;\n  }\n  visitWriteVarExpr(expr: o.WriteVarExpr, ctx: _ExecutionContext): any {\n    const value = expr.value.visitExpression(this, ctx);\n    let currCtx = ctx;\n    while (currCtx != null) {\n      if (currCtx.vars.has(expr.name)) {\n        currCtx.vars.set(expr.name, value);\n        return value;\n      }\n      currCtx = currCtx.parent !;\n    }\n    throw new Error(`Not declared variable ${expr.name}`);\n  }\n  visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: _ExecutionContext): never {\n    throw new Error('Cannot interpret a WrappedNodeExpr.');\n  }\n  visitTypeofExpr(ast: o.TypeofExpr, ctx: _ExecutionContext): never {\n    throw new Error('Cannot interpret a TypeofExpr');\n  }\n  visitReadVarExpr(ast: o.ReadVarExpr, ctx: _ExecutionContext): any {\n    let varName = ast.name !;\n    if (ast.builtin != null) {\n      switch (ast.builtin) {\n        case o.BuiltinVar.Super:\n          return Object.getPrototypeOf(ctx.instance);\n        case o.BuiltinVar.This:\n          return ctx.instance;\n        case o.BuiltinVar.CatchError:\n          varName = CATCH_ERROR_VAR;\n          break;\n        case o.BuiltinVar.CatchStack:\n          varName = CATCH_STACK_VAR;\n          break;\n        default:\n          throw new Error(`Unknown builtin variable ${ast.builtin}`);\n      }\n    }\n    let currCtx = ctx;\n    while (currCtx != null) {\n      if (currCtx.vars.has(varName)) {\n        return currCtx.vars.get(varName);\n      }\n      currCtx = currCtx.parent !;\n    }\n    throw new Error(`Not declared variable ${varName}`);\n  }\n  visitWriteKeyExpr(expr: o.WriteKeyExpr, ctx: _ExecutionContext): any {\n    const receiver = expr.receiver.visitExpression(this, ctx);\n    const index = expr.index.visitExpression(this, ctx);\n    const value = expr.value.visitExpression(this, ctx);\n    receiver[index] = value;\n    return value;\n  }\n  visitWritePropExpr(expr: o.WritePropExpr, ctx: _ExecutionContext): any {\n    const receiver = expr.receiver.visitExpression(this, ctx);\n    const value = expr.value.visitExpression(this, ctx);\n    receiver[expr.name] = value;\n    return value;\n  }\n\n  visitInvokeMethodExpr(expr: o.InvokeMethodExpr, ctx: _ExecutionContext): any {\n    const receiver = expr.receiver.visitExpression(this, ctx);\n    const args = this.visitAllExpressions(expr.args, ctx);\n    let result: any;\n    if (expr.builtin != null) {\n      switch (expr.builtin) {\n        case o.BuiltinMethod.ConcatArray:\n          result = receiver.concat(...args);\n          break;\n        case o.BuiltinMethod.SubscribeObservable:\n          result = receiver.subscribe({next: args[0]});\n          break;\n        case o.BuiltinMethod.Bind:\n          result = receiver.bind(...args);\n          break;\n        default:\n          throw new Error(`Unknown builtin method ${expr.builtin}`);\n      }\n    } else {\n      result = receiver[expr.name !].apply(receiver, args);\n    }\n    return result;\n  }\n  visitInvokeFunctionExpr(stmt: o.InvokeFunctionExpr, ctx: _ExecutionContext): any {\n    const args = this.visitAllExpressions(stmt.args, ctx);\n    const fnExpr = stmt.fn;\n    if (fnExpr instanceof o.ReadVarExpr && fnExpr.builtin === o.BuiltinVar.Super) {\n      ctx.instance !.constructor.prototype.constructor.apply(ctx.instance, args);\n      return null;\n    } else {\n      const fn = stmt.fn.visitExpression(this, ctx);\n      return fn.apply(null, args);\n    }\n  }\n  visitReturnStmt(stmt: o.ReturnStatement, ctx: _ExecutionContext): any {\n    return new ReturnValue(stmt.value.visitExpression(this, ctx));\n  }\n  visitDeclareClassStmt(stmt: o.ClassStmt, ctx: _ExecutionContext): any {\n    const clazz = createDynamicClass(stmt, ctx, this);\n    ctx.vars.set(stmt.name, clazz);\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.exports.push(stmt.name);\n    }\n    return null;\n  }\n  visitExpressionStmt(stmt: o.ExpressionStatement, ctx: _ExecutionContext): any {\n    return stmt.expr.visitExpression(this, ctx);\n  }\n  visitIfStmt(stmt: o.IfStmt, ctx: _ExecutionContext): any {\n    const condition = stmt.condition.visitExpression(this, ctx);\n    if (condition) {\n      return this.visitAllStatements(stmt.trueCase, ctx);\n    } else if (stmt.falseCase != null) {\n      return this.visitAllStatements(stmt.falseCase, ctx);\n    }\n    return null;\n  }\n  visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: _ExecutionContext): any {\n    try {\n      return this.visitAllStatements(stmt.bodyStmts, ctx);\n    } catch (e) {\n      const childCtx = ctx.createChildWihtLocalVars();\n      childCtx.vars.set(CATCH_ERROR_VAR, e);\n      childCtx.vars.set(CATCH_STACK_VAR, e.stack);\n      return this.visitAllStatements(stmt.catchStmts, childCtx);\n    }\n  }\n  visitThrowStmt(stmt: o.ThrowStmt, ctx: _ExecutionContext): any {\n    throw stmt.error.visitExpression(this, ctx);\n  }\n  visitCommentStmt(stmt: o.CommentStmt, context?: any): any { return null; }\n  visitJSDocCommentStmt(stmt: o.JSDocCommentStmt, context?: any): any { return null; }\n  visitInstantiateExpr(ast: o.InstantiateExpr, ctx: _ExecutionContext): any {\n    const args = this.visitAllExpressions(ast.args, ctx);\n    const clazz = ast.classExpr.visitExpression(this, ctx);\n    return new clazz(...args);\n  }\n  visitLiteralExpr(ast: o.LiteralExpr, ctx: _ExecutionContext): any { return ast.value; }\n  visitExternalExpr(ast: o.ExternalExpr, ctx: _ExecutionContext): any {\n    return this.reflector.resolveExternalReference(ast.value);\n  }\n  visitConditionalExpr(ast: o.ConditionalExpr, ctx: _ExecutionContext): any {\n    if (ast.condition.visitExpression(this, ctx)) {\n      return ast.trueCase.visitExpression(this, ctx);\n    } else if (ast.falseCase != null) {\n      return ast.falseCase.visitExpression(this, ctx);\n    }\n    return null;\n  }\n  visitNotExpr(ast: o.NotExpr, ctx: _ExecutionContext): any {\n    return !ast.condition.visitExpression(this, ctx);\n  }\n  visitAssertNotNullExpr(ast: o.AssertNotNull, ctx: _ExecutionContext): any {\n    return ast.condition.visitExpression(this, ctx);\n  }\n  visitCastExpr(ast: o.CastExpr, ctx: _ExecutionContext): any {\n    return ast.value.visitExpression(this, ctx);\n  }\n  visitFunctionExpr(ast: o.FunctionExpr, ctx: _ExecutionContext): any {\n    const paramNames = ast.params.map((param) => param.name);\n    return _declareFn(paramNames, ast.statements, ctx, this);\n  }\n  visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: _ExecutionContext): any {\n    const paramNames = stmt.params.map((param) => param.name);\n    ctx.vars.set(stmt.name, _declareFn(paramNames, stmt.statements, ctx, this));\n    if (stmt.hasModifier(o.StmtModifier.Exported)) {\n      ctx.exports.push(stmt.name);\n    }\n    return null;\n  }\n  visitBinaryOperatorExpr(ast: o.BinaryOperatorExpr, ctx: _ExecutionContext): any {\n    const lhs = () => ast.lhs.visitExpression(this, ctx);\n    const rhs = () => ast.rhs.visitExpression(this, ctx);\n\n    switch (ast.operator) {\n      case o.BinaryOperator.Equals:\n        return lhs() == rhs();\n      case o.BinaryOperator.Identical:\n        return lhs() === rhs();\n      case o.BinaryOperator.NotEquals:\n        return lhs() != rhs();\n      case o.BinaryOperator.NotIdentical:\n        return lhs() !== rhs();\n      case o.BinaryOperator.And:\n        return lhs() && rhs();\n      case o.BinaryOperator.Or:\n        return lhs() || rhs();\n      case o.BinaryOperator.Plus:\n        return lhs() + rhs();\n      case o.BinaryOperator.Minus:\n        return lhs() - rhs();\n      case o.BinaryOperator.Divide:\n        return lhs() / rhs();\n      case o.BinaryOperator.Multiply:\n        return lhs() * rhs();\n      case o.BinaryOperator.Modulo:\n        return lhs() % rhs();\n      case o.BinaryOperator.Lower:\n        return lhs() < rhs();\n      case o.BinaryOperator.LowerEquals:\n        return lhs() <= rhs();\n      case o.BinaryOperator.Bigger:\n        return lhs() > rhs();\n      case o.BinaryOperator.BiggerEquals:\n        return lhs() >= rhs();\n      default:\n        throw new Error(`Unknown operator ${ast.operator}`);\n    }\n  }\n  visitReadPropExpr(ast: o.ReadPropExpr, ctx: _ExecutionContext): any {\n    let result: any;\n    const receiver = ast.receiver.visitExpression(this, ctx);\n    result = receiver[ast.name];\n    return result;\n  }\n  visitReadKeyExpr(ast: o.ReadKeyExpr, ctx: _ExecutionContext): any {\n    const receiver = ast.receiver.visitExpression(this, ctx);\n    const prop = ast.index.visitExpression(this, ctx);\n    return receiver[prop];\n  }\n  visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: _ExecutionContext): any {\n    return this.visitAllExpressions(ast.entries, ctx);\n  }\n  visitLiteralMapExpr(ast: o.LiteralMapExpr, ctx: _ExecutionContext): any {\n    const result: {[k: string]: any} = {};\n    ast.entries.forEach(entry => result[entry.key] = entry.value.visitExpression(this, ctx));\n    return result;\n  }\n  visitCommaExpr(ast: o.CommaExpr, context: any): any {\n    const values = this.visitAllExpressions(ast.parts, context);\n    return values[values.length - 1];\n  }\n  visitAllExpressions(expressions: o.Expression[], ctx: _ExecutionContext): any {\n    return expressions.map((expr) => expr.visitExpression(this, ctx));\n  }\n\n  visitAllStatements(statements: o.Statement[], ctx: _ExecutionContext): ReturnValue|null {\n    for (let i = 0; i < statements.length; i++) {\n      const stmt = statements[i];\n      const val = stmt.visitStatement(this, ctx);\n      if (val instanceof ReturnValue) {\n        return val;\n      }\n    }\n    return null;\n  }\n}\n\nfunction _declareFn(\n    varNames: string[], statements: o.Statement[], ctx: _ExecutionContext,\n    visitor: StatementInterpreter): Function {\n  return (...args: any[]) => _executeFunctionStatements(varNames, args, statements, ctx, visitor);\n}\n\nconst CATCH_ERROR_VAR = 'error';\nconst CATCH_STACK_VAR = 'stack';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompilePipeSummary, CompileProviderMetadata, CompileStylesheetMetadata, CompileTypeSummary, ProviderMeta, ProxyClass, identifierName, ngModuleJitUrl, sharedStylesheetJitUrl, templateJitUrl, templateSourceUrl} from '../compile_metadata';\nimport {CompileReflector} from '../compile_reflector';\nimport {CompilerConfig} from '../config';\nimport {ConstantPool} from '../constant_pool';\nimport {Type} from '../core';\nimport {CompileMetadataResolver} from '../metadata_resolver';\nimport {NgModuleCompiler} from '../ng_module_compiler';\nimport * as ir from '../output/output_ast';\nimport {interpretStatements} from '../output/output_interpreter';\nimport {JitEvaluator} from '../output/output_jit';\nimport {CompiledStylesheet, StyleCompiler} from '../style_compiler';\nimport {SummaryResolver} from '../summary_resolver';\nimport {TemplateAst} from '../template_parser/template_ast';\nimport {TemplateParser} from '../template_parser/template_parser';\nimport {Console, OutputContext, SyncAsync, stringify} from '../util';\nimport {ViewCompiler} from '../view_compiler/view_compiler';\n\nexport interface ModuleWithComponentFactories {\n  ngModuleFactory: object;\n  componentFactories: object[];\n}\n\n/**\n * An internal module of the Angular compiler that begins with component types,\n * extracts templates, and eventually produces a compiled version of the component\n * ready for linking into an application.\n *\n * @security  When compiling templates at runtime, you must ensure that the entire template comes\n * from a trusted source. Attacker-controlled data introduced by a template could expose your\n * application to XSS risks.  For more detail, see the [Security Guide](http://g.co/ng/security).\n */\nexport class JitCompiler {\n  private _compiledTemplateCache = new Map<Type, CompiledTemplate>();\n  private _compiledHostTemplateCache = new Map<Type, CompiledTemplate>();\n  private _compiledDirectiveWrapperCache = new Map<Type, Type>();\n  private _compiledNgModuleCache = new Map<Type, object>();\n  private _sharedStylesheetCount = 0;\n  private _addedAotSummaries = new Set<() => any[]>();\n\n  constructor(\n      private _metadataResolver: CompileMetadataResolver, private _templateParser: TemplateParser,\n      private _styleCompiler: StyleCompiler, private _viewCompiler: ViewCompiler,\n      private _ngModuleCompiler: NgModuleCompiler, private _summaryResolver: SummaryResolver<Type>,\n      private _reflector: CompileReflector, private _jitEvaluator: JitEvaluator,\n      private _compilerConfig: CompilerConfig, private _console: Console,\n      private getExtraNgModuleProviders: (ngModule: any) => CompileProviderMetadata[]) {}\n\n  compileModuleSync(moduleType: Type): object {\n    return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));\n  }\n\n  compileModuleAsync(moduleType: Type): Promise<object> {\n    return Promise.resolve(this._compileModuleAndComponents(moduleType, false));\n  }\n\n  compileModuleAndAllComponentsSync(moduleType: Type): ModuleWithComponentFactories {\n    return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));\n  }\n\n  compileModuleAndAllComponentsAsync(moduleType: Type): Promise<ModuleWithComponentFactories> {\n    return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));\n  }\n\n  getComponentFactory(component: Type): object {\n    const summary = this._metadataResolver.getDirectiveSummary(component);\n    return summary.componentFactory as object;\n  }\n\n  loadAotSummaries(summaries: () => any[]) {\n    this.clearCache();\n    this._addAotSummaries(summaries);\n  }\n\n  private _addAotSummaries(fn: () => any[]) {\n    if (this._addedAotSummaries.has(fn)) {\n      return;\n    }\n    this._addedAotSummaries.add(fn);\n    const summaries = fn();\n    for (let i = 0; i < summaries.length; i++) {\n      const entry = summaries[i];\n      if (typeof entry === 'function') {\n        this._addAotSummaries(entry);\n      } else {\n        const summary = entry as CompileTypeSummary;\n        this._summaryResolver.addSummary(\n            {symbol: summary.type.reference, metadata: null, type: summary});\n      }\n    }\n  }\n\n  hasAotSummary(ref: Type) { return !!this._summaryResolver.resolveSummary(ref); }\n\n  private _filterJitIdentifiers(ids: CompileIdentifierMetadata[]): any[] {\n    return ids.map(mod => mod.reference).filter((ref) => !this.hasAotSummary(ref));\n  }\n\n  private _compileModuleAndComponents(moduleType: Type, isSync: boolean): SyncAsync<object> {\n    return SyncAsync.then(this._loadModules(moduleType, isSync), () => {\n      this._compileComponents(moduleType, null);\n      return this._compileModule(moduleType);\n    });\n  }\n\n  private _compileModuleAndAllComponents(moduleType: Type, isSync: boolean):\n      SyncAsync<ModuleWithComponentFactories> {\n    return SyncAsync.then(this._loadModules(moduleType, isSync), () => {\n      const componentFactories: object[] = [];\n      this._compileComponents(moduleType, componentFactories);\n      return {\n        ngModuleFactory: this._compileModule(moduleType),\n        componentFactories: componentFactories\n      };\n    });\n  }\n\n  private _loadModules(mainModule: any, isSync: boolean): SyncAsync<any> {\n    const loading: Promise<any>[] = [];\n    const mainNgModule = this._metadataResolver.getNgModuleMetadata(mainModule) !;\n    // Note: for runtime compilation, we want to transitively compile all modules,\n    // so we also need to load the declared directives / pipes for all nested modules.\n    this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach((nestedNgModule) => {\n      // getNgModuleMetadata only returns null if the value passed in is not an NgModule\n      const moduleMeta = this._metadataResolver.getNgModuleMetadata(nestedNgModule) !;\n      this._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach((ref) => {\n        const promise =\n            this._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);\n        if (promise) {\n          loading.push(promise);\n        }\n      });\n      this._filterJitIdentifiers(moduleMeta.declaredPipes)\n          .forEach((ref) => this._metadataResolver.getOrLoadPipeMetadata(ref));\n    });\n    return SyncAsync.all(loading);\n  }\n\n  private _compileModule(moduleType: Type): object {\n    let ngModuleFactory = this._compiledNgModuleCache.get(moduleType) !;\n    if (!ngModuleFactory) {\n      const moduleMeta = this._metadataResolver.getNgModuleMetadata(moduleType) !;\n      // Always provide a bound Compiler\n      const extraProviders = this.getExtraNgModuleProviders(moduleMeta.type.reference);\n      const outputCtx = createOutputContext();\n      const compileResult = this._ngModuleCompiler.compile(outputCtx, moduleMeta, extraProviders);\n      ngModuleFactory = this._interpretOrJit(\n          ngModuleJitUrl(moduleMeta), outputCtx.statements)[compileResult.ngModuleFactoryVar];\n      this._compiledNgModuleCache.set(moduleMeta.type.reference, ngModuleFactory);\n    }\n    return ngModuleFactory;\n  }\n\n  /**\n   * @internal\n   */\n  _compileComponents(mainModule: Type, allComponentFactories: object[]|null) {\n    const ngModule = this._metadataResolver.getNgModuleMetadata(mainModule) !;\n    const moduleByJitDirective = new Map<any, CompileNgModuleMetadata>();\n    const templates = new Set<CompiledTemplate>();\n\n    const transJitModules = this._filterJitIdentifiers(ngModule.transitiveModule.modules);\n    transJitModules.forEach((localMod) => {\n      const localModuleMeta = this._metadataResolver.getNgModuleMetadata(localMod) !;\n      this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach((dirRef) => {\n        moduleByJitDirective.set(dirRef, localModuleMeta);\n        const dirMeta = this._metadataResolver.getDirectiveMetadata(dirRef);\n        if (dirMeta.isComponent) {\n          templates.add(this._createCompiledTemplate(dirMeta, localModuleMeta));\n          if (allComponentFactories) {\n            const template =\n                this._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);\n            templates.add(template);\n            allComponentFactories.push(dirMeta.componentFactory as object);\n          }\n        }\n      });\n    });\n    transJitModules.forEach((localMod) => {\n      const localModuleMeta = this._metadataResolver.getNgModuleMetadata(localMod) !;\n      this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach((dirRef) => {\n        const dirMeta = this._metadataResolver.getDirectiveMetadata(dirRef);\n        if (dirMeta.isComponent) {\n          dirMeta.entryComponents.forEach((entryComponentType) => {\n            const moduleMeta = moduleByJitDirective.get(entryComponentType.componentType) !;\n            templates.add(\n                this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n          });\n        }\n      });\n      localModuleMeta.entryComponents.forEach((entryComponentType) => {\n        if (!this.hasAotSummary(entryComponentType.componentType)) {\n          const moduleMeta = moduleByJitDirective.get(entryComponentType.componentType) !;\n          templates.add(\n              this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n        }\n      });\n    });\n    templates.forEach((template) => this._compileTemplate(template));\n  }\n\n  clearCacheFor(type: Type) {\n    this._compiledNgModuleCache.delete(type);\n    this._metadataResolver.clearCacheFor(type);\n    this._compiledHostTemplateCache.delete(type);\n    const compiledTemplate = this._compiledTemplateCache.get(type);\n    if (compiledTemplate) {\n      this._compiledTemplateCache.delete(type);\n    }\n  }\n\n  clearCache(): void {\n    // Note: don't clear the _addedAotSummaries, as they don't change!\n    this._metadataResolver.clearCache();\n    this._compiledTemplateCache.clear();\n    this._compiledHostTemplateCache.clear();\n    this._compiledNgModuleCache.clear();\n  }\n\n  private _createCompiledHostTemplate(compType: Type, ngModule: CompileNgModuleMetadata):\n      CompiledTemplate {\n    if (!ngModule) {\n      throw new Error(\n          `Component ${stringify(compType)} is not part of any NgModule or the module has not been imported into your module.`);\n    }\n    let compiledTemplate = this._compiledHostTemplateCache.get(compType);\n    if (!compiledTemplate) {\n      const compMeta = this._metadataResolver.getDirectiveMetadata(compType);\n      assertComponent(compMeta);\n\n      const hostMeta = this._metadataResolver.getHostComponentMetadata(\n          compMeta, (compMeta.componentFactory as any).viewDefFactory);\n      compiledTemplate =\n          new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);\n      this._compiledHostTemplateCache.set(compType, compiledTemplate);\n    }\n    return compiledTemplate;\n  }\n\n  private _createCompiledTemplate(\n      compMeta: CompileDirectiveMetadata, ngModule: CompileNgModuleMetadata): CompiledTemplate {\n    let compiledTemplate = this._compiledTemplateCache.get(compMeta.type.reference);\n    if (!compiledTemplate) {\n      assertComponent(compMeta);\n      compiledTemplate = new CompiledTemplate(\n          false, compMeta.type, compMeta, ngModule, ngModule.transitiveModule.directives);\n      this._compiledTemplateCache.set(compMeta.type.reference, compiledTemplate);\n    }\n    return compiledTemplate;\n  }\n\n  private _compileTemplate(template: CompiledTemplate) {\n    if (template.isCompiled) {\n      return;\n    }\n    const compMeta = template.compMeta;\n    const externalStylesheetsByModuleUrl = new Map<string, CompiledStylesheet>();\n    const outputContext = createOutputContext();\n    const componentStylesheet = this._styleCompiler.compileComponent(outputContext, compMeta);\n    compMeta.template !.externalStylesheets.forEach((stylesheetMeta) => {\n      const compiledStylesheet =\n          this._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);\n      externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl !, compiledStylesheet);\n    });\n    this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);\n    const pipes = template.ngModule.transitiveModule.pipes.map(\n        pipe => this._metadataResolver.getPipeSummary(pipe.reference));\n    const {template: parsedTemplate, pipes: usedPipes} =\n        this._parseTemplate(compMeta, template.ngModule, template.directives);\n    const compileResult = this._viewCompiler.compileComponent(\n        outputContext, compMeta, parsedTemplate, ir.variable(componentStylesheet.stylesVar),\n        usedPipes);\n    const evalResult = this._interpretOrJit(\n        templateJitUrl(template.ngModule.type, template.compMeta), outputContext.statements);\n    const viewClass = evalResult[compileResult.viewClassVar];\n    const rendererType = evalResult[compileResult.rendererTypeVar];\n    template.compiled(viewClass, rendererType);\n  }\n\n  private _parseTemplate(\n      compMeta: CompileDirectiveMetadata, ngModule: CompileNgModuleMetadata,\n      directiveIdentifiers: CompileIdentifierMetadata[]):\n      {template: TemplateAst[], pipes: CompilePipeSummary[]} {\n    // Note: ! is ok here as components always have a template.\n    const preserveWhitespaces = compMeta.template !.preserveWhitespaces;\n    const directives =\n        directiveIdentifiers.map(dir => this._metadataResolver.getDirectiveSummary(dir.reference));\n    const pipes = ngModule.transitiveModule.pipes.map(\n        pipe => this._metadataResolver.getPipeSummary(pipe.reference));\n    return this._templateParser.parse(\n        compMeta, compMeta.template !.htmlAst !, directives, pipes, ngModule.schemas,\n        templateSourceUrl(ngModule.type, compMeta, compMeta.template !), preserveWhitespaces);\n  }\n\n  private _resolveStylesCompileResult(\n      result: CompiledStylesheet, externalStylesheetsByModuleUrl: Map<string, CompiledStylesheet>) {\n    result.dependencies.forEach((dep, i) => {\n      const nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl) !;\n      const nestedStylesArr = this._resolveAndEvalStylesCompileResult(\n          nestedCompileResult, externalStylesheetsByModuleUrl);\n      dep.setValue(nestedStylesArr);\n    });\n  }\n\n  private _resolveAndEvalStylesCompileResult(\n      result: CompiledStylesheet,\n      externalStylesheetsByModuleUrl: Map<string, CompiledStylesheet>): string[] {\n    this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);\n    return this._interpretOrJit(\n        sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++),\n        result.outputCtx.statements)[result.stylesVar];\n  }\n\n  private _interpretOrJit(sourceUrl: string, statements: ir.Statement[]): any {\n    if (!this._compilerConfig.useJit) {\n      return interpretStatements(statements, this._reflector);\n    } else {\n      return this._jitEvaluator.evaluateStatements(\n          sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);\n    }\n  }\n}\n\nclass CompiledTemplate {\n  private _viewClass: Function = null !;\n  isCompiled = false;\n\n  constructor(\n      public isHost: boolean, public compType: CompileIdentifierMetadata,\n      public compMeta: CompileDirectiveMetadata, public ngModule: CompileNgModuleMetadata,\n      public directives: CompileIdentifierMetadata[]) {}\n\n  compiled(viewClass: Function, rendererType: any) {\n    this._viewClass = viewClass;\n    (<ProxyClass>this.compMeta.componentViewType).setDelegate(viewClass);\n    for (let prop in rendererType) {\n      (<any>this.compMeta.rendererType)[prop] = rendererType[prop];\n    }\n    this.isCompiled = true;\n  }\n}\n\nfunction assertComponent(meta: CompileDirectiveMetadata) {\n  if (!meta.isComponent) {\n    throw new Error(\n        `Could not compile '${identifierName(meta.type)}' because it is not a component.`);\n  }\n}\n\nfunction createOutputContext(): OutputContext {\n  const importExpr = (symbol: any) =>\n      ir.importExpr({name: identifierName(symbol), moduleName: null, runtime: symbol});\n  return {statements: [], genFilePath: '', importExpr, constantPool: new ConstantPool()};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from './core';\nimport * as o from './output/output_ast';\n\n/**\n * Provides access to reflection data about symbols that the compiler needs.\n */\nexport abstract class CompileReflector {\n  abstract parameters(typeOrFunc: /*Type*/ any): any[][];\n  abstract annotations(typeOrFunc: /*Type*/ any): any[];\n  abstract shallowAnnotations(typeOrFunc: /*Type*/ any): any[];\n  abstract tryAnnotations(typeOrFunc: /*Type*/ any): any[];\n  abstract propMetadata(typeOrFunc: /*Type*/ any): {[key: string]: any[]};\n  abstract hasLifecycleHook(type: any, lcProperty: string): boolean;\n  abstract guards(typeOrFunc: /* Type */ any): {[key: string]: any};\n  abstract componentModuleUrl(type: /*Type*/ any, cmpMetadata: Component): string;\n  abstract resolveExternalReference(ref: o.ExternalReference): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Create a {@link UrlResolver} with no package prefix.\n */\nexport function createUrlResolverWithoutPackagePrefix(): UrlResolver {\n  return new UrlResolver();\n}\n\nexport function createOfflineCompileUrlResolver(): UrlResolver {\n  return new UrlResolver('.');\n}\n\n/**\n * Used by the {@link Compiler} when resolving HTML and CSS template URLs.\n *\n * This class can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n *\n * ## Example\n *\n * {@example compiler/ts/url_resolver/url_resolver.ts region='url_resolver'}\n *\n * @security  When compiling templates at runtime, you must\n * ensure that the entire template comes from a trusted source.\n * Attacker-controlled data introduced by a template could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n */\nexport interface UrlResolver { resolve(baseUrl: string, url: string): string; }\n\nexport interface UrlResolverCtor { new (packagePrefix?: string|null): UrlResolver; }\n\nexport const UrlResolver: UrlResolverCtor = class UrlResolverImpl {\n  constructor(private _packagePrefix: string|null = null) {}\n\n  /**\n   * Resolves the `url` given the `baseUrl`:\n   * - when the `url` is null, the `baseUrl` is returned,\n   * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of\n   * `baseUrl` and `url`,\n   * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is\n   * returned as is (ignoring the `baseUrl`)\n   */\n  resolve(baseUrl: string, url: string): string {\n    let resolvedUrl = url;\n    if (baseUrl != null && baseUrl.length > 0) {\n      resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);\n    }\n    const resolvedParts = _split(resolvedUrl);\n    let prefix = this._packagePrefix;\n    if (prefix != null && resolvedParts != null &&\n        resolvedParts[_ComponentIndex.Scheme] == 'package') {\n      let path = resolvedParts[_ComponentIndex.Path];\n      prefix = prefix.replace(/\\/+$/, '');\n      path = path.replace(/^\\/+/, '');\n      return `${prefix}/${path}`;\n    }\n    return resolvedUrl;\n  }\n};\n\n/**\n * Extract the scheme of a URL.\n */\nexport function getUrlScheme(url: string): string {\n  const match = _split(url);\n  return (match && match[_ComponentIndex.Scheme]) || '';\n}\n\n// The code below is adapted from Traceur:\n// https://github.com/google/traceur-compiler/blob/9511c1dafa972bf0de1202a8a863bad02f0f95a8/src/runtime/url.js\n\n/**\n * Builds a URI string from already-encoded parts.\n *\n * No encoding is performed.  Any component may be omitted as either null or\n * undefined.\n *\n * @param opt_scheme The scheme such as 'http'.\n * @param opt_userInfo The user name before the '@'.\n * @param opt_domain The domain such as 'www.google.com', already\n *     URI-encoded.\n * @param opt_port The port number.\n * @param opt_path The path, already URI-encoded.  If it is not\n *     empty, it must begin with a slash.\n * @param opt_queryData The URI-encoded query data.\n * @param opt_fragment The URI-encoded fragment identifier.\n * @return The fully combined URI.\n */\nfunction _buildFromEncodedParts(\n    opt_scheme?: string, opt_userInfo?: string, opt_domain?: string, opt_port?: string,\n    opt_path?: string, opt_queryData?: string, opt_fragment?: string): string {\n  const out: string[] = [];\n\n  if (opt_scheme != null) {\n    out.push(opt_scheme + ':');\n  }\n\n  if (opt_domain != null) {\n    out.push('//');\n\n    if (opt_userInfo != null) {\n      out.push(opt_userInfo + '@');\n    }\n\n    out.push(opt_domain);\n\n    if (opt_port != null) {\n      out.push(':' + opt_port);\n    }\n  }\n\n  if (opt_path != null) {\n    out.push(opt_path);\n  }\n\n  if (opt_queryData != null) {\n    out.push('?' + opt_queryData);\n  }\n\n  if (opt_fragment != null) {\n    out.push('#' + opt_fragment);\n  }\n\n  return out.join('');\n}\n\n/**\n * A regular expression for breaking a URI into its component parts.\n *\n * {@link http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234} says\n * As the \"first-match-wins\" algorithm is identical to the \"greedy\"\n * disambiguation method used by POSIX regular expressions, it is natural and\n * commonplace to use a regular expression for parsing the potential five\n * components of a URI reference.\n *\n * The following line is the regular expression for breaking-down a\n * well-formed URI reference into its components.\n *\n * <pre>\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n *  12            3  4          5       6  7        8 9\n * </pre>\n *\n * The numbers in the second line above are only to assist readability; they\n * indicate the reference points for each subexpression (i.e., each paired\n * parenthesis). We refer to the value matched for subexpression <n> as $<n>.\n * For example, matching the above expression to\n * <pre>\n *     http://www.ics.uci.edu/pub/ietf/uri/#Related\n * </pre>\n * results in the following subexpression matches:\n * <pre>\n *    $1 = http:\n *    $2 = http\n *    $3 = //www.ics.uci.edu\n *    $4 = www.ics.uci.edu\n *    $5 = /pub/ietf/uri/\n *    $6 = <undefined>\n *    $7 = <undefined>\n *    $8 = #Related\n *    $9 = Related\n * </pre>\n * where <undefined> indicates that the component is not present, as is the\n * case for the query component in the above example. Therefore, we can\n * determine the value of the five components as\n * <pre>\n *    scheme    = $2\n *    authority = $4\n *    path      = $5\n *    query     = $7\n *    fragment  = $9\n * </pre>\n *\n * The regular expression has been modified slightly to expose the\n * userInfo, domain, and port separately from the authority.\n * The modified version yields\n * <pre>\n *    $1 = http              scheme\n *    $2 = <undefined>       userInfo -\\\n *    $3 = www.ics.uci.edu   domain     | authority\n *    $4 = <undefined>       port     -/\n *    $5 = /pub/ietf/uri/    path\n *    $6 = <undefined>       query without ?\n *    $7 = Related           fragment without #\n * </pre>\n * @internal\n */\nconst _splitRe = new RegExp(\n    '^' +\n    '(?:' +\n    '([^:/?#.]+)' +  // scheme - ignore special characters\n                     // used by other URL parts such as :,\n                     // ?, /, #, and .\n    ':)?' +\n    '(?://' +\n    '(?:([^/?#]*)@)?' +                  // userInfo\n    '([\\\\w\\\\d\\\\-\\\\u0100-\\\\uffff.%]*)' +  // domain - restrict to letters,\n                                         // digits, dashes, dots, percent\n                                         // escapes, and unicode characters.\n    '(?::([0-9]+))?' +                   // port\n    ')?' +\n    '([^?#]+)?' +        // path\n    '(?:\\\\?([^#]*))?' +  // query\n    '(?:#(.*))?' +       // fragment\n    '$');\n\n/**\n * The index of each URI component in the return value of goog.uri.utils.split.\n * @enum {number}\n */\nenum _ComponentIndex {\n  Scheme = 1,\n  UserInfo,\n  Domain,\n  Port,\n  Path,\n  QueryData,\n  Fragment\n}\n\n/**\n * Splits a URI into its component parts.\n *\n * Each component can be accessed via the component indices; for example:\n * <pre>\n * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];\n * </pre>\n *\n * @param uri The URI string to examine.\n * @return Each component still URI-encoded.\n *     Each component that is present will contain the encoded value, whereas\n *     components that are not present will be undefined or empty, depending\n *     on the browser's regular expression implementation.  Never null, since\n *     arbitrary strings may still look like path names.\n */\nfunction _split(uri: string): Array<string|any> {\n  return uri.match(_splitRe) !;\n}\n\n/**\n  * Removes dot segments in given path component, as described in\n  * RFC 3986, section 5.2.4.\n  *\n  * @param path A non-empty path component.\n  * @return Path component with removed dot segments.\n  */\nfunction _removeDotSegments(path: string): string {\n  if (path == '/') return '/';\n\n  const leadingSlash = path[0] == '/' ? '/' : '';\n  const trailingSlash = path[path.length - 1] === '/' ? '/' : '';\n  const segments = path.split('/');\n\n  const out: string[] = [];\n  let up = 0;\n  for (let pos = 0; pos < segments.length; pos++) {\n    const segment = segments[pos];\n    switch (segment) {\n      case '':\n      case '.':\n        break;\n      case '..':\n        if (out.length > 0) {\n          out.pop();\n        } else {\n          up++;\n        }\n        break;\n      default:\n        out.push(segment);\n    }\n  }\n\n  if (leadingSlash == '') {\n    while (up-- > 0) {\n      out.unshift('..');\n    }\n\n    if (out.length === 0) out.push('.');\n  }\n\n  return leadingSlash + out.join('/') + trailingSlash;\n}\n\n/**\n * Takes an array of the parts from split and canonicalizes the path part\n * and then joins all the parts.\n */\nfunction _joinAndCanonicalizePath(parts: any[]): string {\n  let path = parts[_ComponentIndex.Path];\n  path = path == null ? '' : _removeDotSegments(path);\n  parts[_ComponentIndex.Path] = path;\n\n  return _buildFromEncodedParts(\n      parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain],\n      parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData],\n      parts[_ComponentIndex.Fragment]);\n}\n\n/**\n * Resolves a URL.\n * @param base The URL acting as the base URL.\n * @param to The URL to resolve.\n */\nfunction _resolveUrl(base: string, url: string): string {\n  const parts = _split(encodeURI(url));\n  const baseParts = _split(base);\n\n  if (parts[_ComponentIndex.Scheme] != null) {\n    return _joinAndCanonicalizePath(parts);\n  } else {\n    parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];\n  }\n\n  for (let i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {\n    if (parts[i] == null) {\n      parts[i] = baseParts[i];\n    }\n  }\n\n  if (parts[_ComponentIndex.Path][0] == '/') {\n    return _joinAndCanonicalizePath(parts);\n  }\n\n  let path = baseParts[_ComponentIndex.Path];\n  if (path == null) path = '/';\n  const index = path.lastIndexOf('/');\n  path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];\n  parts[_ComponentIndex.Path] = path;\n  return _joinAndCanonicalizePath(parts);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Extract i18n messages from source code\n */\nimport {analyzeAndValidateNgModules} from '../aot/compiler';\nimport {createAotUrlResolver} from '../aot/compiler_factory';\nimport {StaticReflector} from '../aot/static_reflector';\nimport {StaticSymbolCache} from '../aot/static_symbol';\nimport {StaticSymbolResolver, StaticSymbolResolverHost} from '../aot/static_symbol_resolver';\nimport {AotSummaryResolver, AotSummaryResolverHost} from '../aot/summary_resolver';\nimport {CompileDirectiveMetadata} from '../compile_metadata';\nimport {CompilerConfig} from '../config';\nimport {ViewEncapsulation} from '../core';\nimport {DirectiveNormalizer} from '../directive_normalizer';\nimport {DirectiveResolver} from '../directive_resolver';\nimport {CompileMetadataResolver} from '../metadata_resolver';\nimport {HtmlParser} from '../ml_parser/html_parser';\nimport {InterpolationConfig} from '../ml_parser/interpolation_config';\nimport {NgModuleResolver} from '../ng_module_resolver';\nimport {ParseError} from '../parse_util';\nimport {PipeResolver} from '../pipe_resolver';\nimport {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry';\nimport {syntaxError} from '../util';\n\nimport {MessageBundle} from './message_bundle';\n\n\n\n/**\n * The host of the Extractor disconnects the implementation from TypeScript / other language\n * services and from underlying file systems.\n */\nexport interface ExtractorHost extends StaticSymbolResolverHost, AotSummaryResolverHost {\n  /**\n   * Converts a path that refers to a resource into an absolute filePath\n   * that can be lateron used for loading the resource via `loadResource.\n   */\n  resourceNameToFileName(path: string, containingFile: string): string|null;\n  /**\n   * Loads a resource (e.g. html / css)\n   */\n  loadResource(path: string): Promise<string>|string;\n}\n\nexport class Extractor {\n  constructor(\n      public host: ExtractorHost, private staticSymbolResolver: StaticSymbolResolver,\n      private messageBundle: MessageBundle, private metadataResolver: CompileMetadataResolver) {}\n\n  extract(rootFiles: string[]): Promise<MessageBundle> {\n    const {files, ngModules} = analyzeAndValidateNgModules(\n        rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver);\n    return Promise\n        .all(ngModules.map(\n            ngModule => this.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(\n                ngModule.type.reference, false)))\n        .then(() => {\n          const errors: ParseError[] = [];\n\n          files.forEach(file => {\n            const compMetas: CompileDirectiveMetadata[] = [];\n            file.directives.forEach(directiveType => {\n              const dirMeta = this.metadataResolver.getDirectiveMetadata(directiveType);\n              if (dirMeta && dirMeta.isComponent) {\n                compMetas.push(dirMeta);\n              }\n            });\n            compMetas.forEach(compMeta => {\n              const html = compMeta.template !.template !;\n              // Template URL points to either an HTML or TS file depending on\n              // whether the file is used with `templateUrl:` or `template:`,\n              // respectively.\n              const templateUrl = compMeta.template !.templateUrl !;\n              const interpolationConfig =\n                  InterpolationConfig.fromArray(compMeta.template !.interpolation);\n              errors.push(...this.messageBundle.updateFromTemplate(\n                  html, templateUrl, interpolationConfig) !);\n            });\n          });\n\n          if (errors.length) {\n            throw new Error(errors.map(e => e.toString()).join('\\n'));\n          }\n\n          return this.messageBundle;\n        });\n  }\n\n  static create(host: ExtractorHost, locale: string|null):\n      {extractor: Extractor, staticReflector: StaticReflector} {\n    const htmlParser = new HtmlParser();\n\n    const urlResolver = createAotUrlResolver(host);\n    const symbolCache = new StaticSymbolCache();\n    const summaryResolver = new AotSummaryResolver(host, symbolCache);\n    const staticSymbolResolver = new StaticSymbolResolver(host, symbolCache, summaryResolver);\n    const staticReflector = new StaticReflector(summaryResolver, staticSymbolResolver);\n\n    const config =\n        new CompilerConfig({defaultEncapsulation: ViewEncapsulation.Emulated, useJit: false});\n\n    const normalizer = new DirectiveNormalizer(\n        {get: (url: string) => host.loadResource(url)}, urlResolver, htmlParser, config);\n    const elementSchemaRegistry = new DomElementSchemaRegistry();\n    const resolver = new CompileMetadataResolver(\n        config, htmlParser, new NgModuleResolver(staticReflector),\n        new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver,\n        elementSchemaRegistry, normalizer, console, symbolCache, staticReflector);\n\n    // TODO(vicb): implicit tags & attributes\n    const messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n\n    const extractor = new Extractor(host, staticSymbolResolver, messageBundle, resolver);\n    return {extractor, staticReflector};\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AST, BindingPipe, ImplicitReceiver, MethodCall, PropertyRead, PropertyWrite, RecursiveAstVisitor, SafeMethodCall, SafePropertyRead} from '../../expression_parser/ast';\nimport {CssSelector, SelectorMatcher} from '../../selector';\nimport {BoundAttribute, BoundEvent, BoundText, Content, Element, Icu, Node, Reference, Template, Text, TextAttribute, Variable, Visitor} from '../r3_ast';\n\nimport {BoundTarget, DirectiveMeta, Target, TargetBinder} from './t2_api';\nimport {getAttrsForDirectiveMatching} from './util';\n\n\n/**\n * Processes `Target`s with a given set of directives and performs a binding operation, which\n * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the\n * target.\n */\nexport class R3TargetBinder<DirectiveT extends DirectiveMeta> implements TargetBinder<DirectiveT> {\n  constructor(private directiveMatcher: SelectorMatcher<DirectiveT>) {}\n\n  /**\n   * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains\n   * metadata about the types referenced in the template.\n   */\n  bind(target: Target): BoundTarget<DirectiveT> {\n    if (!target.template) {\n      // TODO(alxhub): handle targets which contain things like HostBindings, etc.\n      throw new Error('Binding without a template not yet supported');\n    }\n\n    // First, parse the template into a `Scope` structure. This operation captures the syntactic\n    // scopes in the template and makes them available for later use.\n    const scope = Scope.apply(target.template);\n\n    // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:\n    //   - directives: Map of nodes (elements & ng-templates) to the directives on them.\n    //   - bindings: Map of inputs, outputs, and attributes to the directive/element that claims\n    //     them. TODO(alxhub): handle multiple directives claiming an input/output/etc.\n    //   - references: Map of #references to their targets.\n    const {directives, bindings, references} =\n        DirectiveBinder.apply(target.template, this.directiveMatcher);\n    // Finally, run the TemplateBinder to bind references, variables, and other entities within the\n    // template. This extracts all the metadata that doesn't depend on directive matching.\n    const {expressions, symbols, nestingLevel, usedPipes} =\n        TemplateBinder.apply(target.template, scope);\n    return new R3BoundTarget(\n        target, directives, bindings, references, expressions, symbols, nestingLevel, usedPipes);\n  }\n}\n\n/**\n * Represents a binding scope within a template.\n *\n * Any variables, references, or other named entities declared within the template will\n * be captured and available by name in `namedEntities`. Additionally, child templates will\n * be analyzed and have their child `Scope`s available in `childScopes`.\n */\nclass Scope implements Visitor {\n  /**\n   * Named members of the `Scope`, such as `Reference`s or `Variable`s.\n   */\n  readonly namedEntities = new Map<string, Reference|Variable>();\n\n  /**\n   * Child `Scope`s for immediately nested `Template`s.\n   */\n  readonly childScopes = new Map<Template, Scope>();\n\n  private constructor(readonly parentScope?: Scope) {}\n\n  /**\n   * Process a template (either as a `Template` sub-template with variables, or a plain array of\n   * template `Node`s) and construct its `Scope`.\n   */\n  static apply(template: Template|Node[]): Scope {\n    const scope = new Scope();\n    scope.ingest(template);\n    return scope;\n  }\n\n  /**\n   * Internal method to process the template and populate the `Scope`.\n   */\n  private ingest(template: Template|Node[]): void {\n    if (template instanceof Template) {\n      // Variables on an <ng-template> are defined in the inner scope.\n      template.variables.forEach(node => this.visitVariable(node));\n\n      // Process the nodes of the template.\n      template.children.forEach(node => node.visit(this));\n    } else {\n      // No overarching `Template` instance, so process the nodes directly.\n      template.forEach(node => node.visit(this));\n    }\n  }\n\n  visitElement(element: Element) {\n    // `Element`s in the template may have `Reference`s which are captured in the scope.\n    element.references.forEach(node => this.visitReference(node));\n\n    // Recurse into the `Element`'s children.\n    element.children.forEach(node => node.visit(this));\n  }\n\n  visitTemplate(template: Template) {\n    // References on a <ng-template> are defined in the outer scope, so capture them before\n    // processing the template's child scope.\n    template.references.forEach(node => this.visitReference(node));\n\n    // Next, create an inner scope and process the template within it.\n    const scope = new Scope(this);\n    scope.ingest(template);\n    this.childScopes.set(template, scope);\n  }\n\n  visitVariable(variable: Variable) {\n    // Declare the variable if it's not already.\n    this.maybeDeclare(variable);\n  }\n\n  visitReference(reference: Reference) {\n    // Declare the variable if it's not already.\n    this.maybeDeclare(reference);\n  }\n\n  // Unused visitors.\n  visitContent(content: Content) {}\n  visitBoundAttribute(attr: BoundAttribute) {}\n  visitBoundEvent(event: BoundEvent) {}\n  visitBoundText(text: BoundText) {}\n  visitText(text: Text) {}\n  visitTextAttribute(attr: TextAttribute) {}\n  visitIcu(icu: Icu) {}\n\n  private maybeDeclare(thing: Reference|Variable) {\n    // Declare something with a name, as long as that name isn't taken.\n    if (!this.namedEntities.has(thing.name)) {\n      this.namedEntities.set(thing.name, thing);\n    }\n  }\n\n  /**\n   * Look up a variable within this `Scope`.\n   *\n   * This can recurse into a parent `Scope` if it's available.\n   */\n  lookup(name: string): Reference|Variable|null {\n    if (this.namedEntities.has(name)) {\n      // Found in the local scope.\n      return this.namedEntities.get(name) !;\n    } else if (this.parentScope !== undefined) {\n      // Not in the local scope, but there's a parent scope so check there.\n      return this.parentScope.lookup(name);\n    } else {\n      // At the top level and it wasn't found.\n      return null;\n    }\n  }\n\n  /**\n   * Get the child scope for a `Template`.\n   *\n   * This should always be defined.\n   */\n  getChildScope(template: Template): Scope {\n    const res = this.childScopes.get(template);\n    if (res === undefined) {\n      throw new Error(`Assertion error: child scope for ${template} not found`);\n    }\n    return res;\n  }\n}\n\n/**\n * Processes a template and matches directives on nodes (elements and templates).\n *\n * Usually used via the static `apply()` method.\n */\nclass DirectiveBinder<DirectiveT extends DirectiveMeta> implements Visitor {\n  constructor(\n      private matcher: SelectorMatcher<DirectiveT>,\n      private directives: Map<Element|Template, DirectiveT[]>,\n      private bindings: Map<BoundAttribute|BoundEvent|TextAttribute, DirectiveT|Element|Template>,\n      private references:\n          Map<Reference, {directive: DirectiveT, node: Element|Template}|Element|Template>) {}\n\n  /**\n   * Process a template (list of `Node`s) and perform directive matching against each node.\n   *\n   * @param template the list of template `Node`s to match (recursively).\n   * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for\n   * this template.\n   * @returns three maps which contain information about directives in the template: the\n   * `directives` map which lists directives matched on each node, the `bindings` map which\n   * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`\n   * map which resolves #references (`Reference`s) within the template to the named directive or\n   * template node.\n   */\n  static apply<DirectiveT extends DirectiveMeta>(\n      template: Node[], selectorMatcher: SelectorMatcher<DirectiveT>): {\n    directives: Map<Element|Template, DirectiveT[]>,\n    bindings: Map<BoundAttribute|BoundEvent|TextAttribute, DirectiveT|Element|Template>,\n    references: Map<Reference, {directive: DirectiveT, node: Element|Template}|Element|Template>,\n  } {\n    const directives = new Map<Element|Template, DirectiveT[]>();\n    const bindings =\n        new Map<BoundAttribute|BoundEvent|TextAttribute, DirectiveT|Element|Template>();\n    const references =\n        new Map<Reference, {directive: DirectiveT, node: Element | Template}|Element|Template>();\n    const matcher = new DirectiveBinder(selectorMatcher, directives, bindings, references);\n    matcher.ingest(template);\n    return {directives, bindings, references};\n  }\n\n  private ingest(template: Node[]): void { template.forEach(node => node.visit(this)); }\n\n  visitElement(element: Element): void { this.visitElementOrTemplate(element.name, element); }\n\n  visitTemplate(template: Template): void { this.visitElementOrTemplate('ng-template', template); }\n\n  visitElementOrTemplate(tag: string, node: Element|Template): void {\n    // First, determine the HTML shape of the node for the purpose of directive matching.\n    // Do this by building up a `CssSelector` for the node.\n    const cssSelector = new CssSelector();\n    cssSelector.setElement(tag);\n\n    // Add attributes to the CSS selector.\n    const attrs = getAttrsForDirectiveMatching(node);\n    Object.getOwnPropertyNames(attrs).forEach((name) => {\n      const value = attrs[name];\n\n      cssSelector.addAttribute(name, value);\n\n      // Treat the 'class' attribute specially.\n      if (name.toLowerCase() === 'class') {\n        const classes = value.trim().split(/\\s+/g);\n        classes.forEach(className => cssSelector.addClassName(className));\n      }\n    });\n\n    // Next, use the `SelectorMatcher` to get the list of directives on the node.\n    const directives: DirectiveT[] = [];\n    this.matcher.match(cssSelector, (_, directive) => directives.push(directive));\n    if (directives.length > 0) {\n      this.directives.set(node, directives);\n    }\n\n    // Resolve any references that are created on this node.\n    node.references.forEach(ref => {\n      let dirTarget: DirectiveT|null = null;\n\n      // If the reference expression is empty, then it matches the \"primary\" directive on the node\n      // (if there is one). Otherwise it matches the host node itself (either an element or\n      // <ng-template> node).\n      if (ref.value.trim() === '') {\n        // This could be a reference to a component if there is one.\n        dirTarget = directives.find(dir => dir.isComponent) || null;\n      } else {\n        // This is a reference to a directive exported via exportAs. One should exist.\n        dirTarget =\n            directives.find(\n                dir => dir.exportAs !== null && dir.exportAs.some(value => value === ref.value)) ||\n            null;\n\n        // Check if a matching directive was found, and error if it wasn't.\n        if (dirTarget === null) {\n          // TODO(alxhub): Return an error value here that can be used for template validation.\n          throw new Error(`Assertion error: failed to find directive with exportAs: ${ref.value}`);\n        }\n      }\n\n      if (dirTarget !== null) {\n        // This reference points to a directive.\n        this.references.set(ref, {directive: dirTarget, node});\n      } else {\n        // This reference points to the node itself.\n        this.references.set(ref, node);\n      }\n    });\n\n    // Associate attributes/bindings on the node with directives or with the node itself.\n    const processAttribute = (attribute: BoundAttribute | BoundEvent | TextAttribute) => {\n      let dir = directives.find(dir => dir.inputs.hasOwnProperty(attribute.name));\n      if (dir !== undefined) {\n        this.bindings.set(attribute, dir);\n      } else {\n        this.bindings.set(attribute, node);\n      }\n    };\n    node.attributes.forEach(processAttribute);\n    node.inputs.forEach(processAttribute);\n    node.outputs.forEach(processAttribute);\n    if (node instanceof Template) {\n      node.templateAttrs.forEach(processAttribute);\n    }\n\n    // Recurse into the node's children.\n    node.children.forEach(child => child.visit(this));\n  }\n\n  // Unused visitors.\n  visitContent(content: Content): void {}\n  visitVariable(variable: Variable): void {}\n  visitReference(reference: Reference): void {}\n  visitTextAttribute(attribute: TextAttribute): void {}\n  visitBoundAttribute(attribute: BoundAttribute): void {}\n  visitBoundEvent(attribute: BoundEvent): void {}\n  visitBoundAttributeOrEvent(node: BoundAttribute|BoundEvent) {}\n  visitText(text: Text): void {}\n  visitBoundText(text: BoundText): void {}\n  visitIcu(icu: Icu): void {}\n}\n\n/**\n * Processes a template and extract metadata about expressions and symbols within.\n *\n * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched\n * within the template in order to operate.\n *\n * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided\n * by overridden methods from that visitor.\n */\nclass TemplateBinder extends RecursiveAstVisitor implements Visitor {\n  private visitNode: (node: Node) => void;\n\n  private pipesUsed: string[] = [];\n\n  private constructor(\n      private bindings: Map<AST, Reference|Variable>,\n      private symbols: Map<Reference|Variable, Template>, private usedPipes: Set<string>,\n      private nestingLevel: Map<Template, number>, private scope: Scope,\n      private template: Template|null, private level: number) {\n    super();\n\n    // Save a bit of processing time by constructing this closure in advance.\n    this.visitNode = (node: Node) => node.visit(this);\n  }\n\n  /**\n   * Process a template and extract metadata about expressions and symbols within.\n   *\n   * @param template the nodes of the template to process\n   * @param scope the `Scope` of the template being processed.\n   * @returns three maps which contain metadata about the template: `expressions` which interprets\n   * special `AST` nodes in expressions as pointing to references or variables declared within the\n   * template, `symbols` which maps those variables and references to the nested `Template` which\n   * declares them, if any, and `nestingLevel` which associates each `Template` with a integer\n   * nesting level (how many levels deep within the template structure the `Template` is), starting\n   * at 1.\n   */\n  static apply(template: Node[], scope: Scope): {\n    expressions: Map<AST, Reference|Variable>,\n    symbols: Map<Variable|Reference, Template>,\n    nestingLevel: Map<Template, number>,\n    usedPipes: Set<string>,\n  } {\n    const expressions = new Map<AST, Reference|Variable>();\n    const symbols = new Map<Variable|Reference, Template>();\n    const nestingLevel = new Map<Template, number>();\n    const usedPipes = new Set<string>();\n    // The top-level template has nesting level 0.\n    const binder = new TemplateBinder(\n        expressions, symbols, usedPipes, nestingLevel, scope,\n        template instanceof Template ? template : null, 0);\n    binder.ingest(template);\n    return {expressions, symbols, nestingLevel, usedPipes};\n  }\n\n  private ingest(template: Template|Node[]): void {\n    if (template instanceof Template) {\n      // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,\n      // and references were all processed in the scope of the containing template.\n      template.variables.forEach(this.visitNode);\n      template.children.forEach(this.visitNode);\n\n      // Set the nesting level.\n      this.nestingLevel.set(template, this.level);\n    } else {\n      // Visit each node from the top-level template.\n      template.forEach(this.visitNode);\n    }\n  }\n\n  visitElement(element: Element) {\n    // Visit the inputs, outputs, and children of the element.\n    element.inputs.forEach(this.visitNode);\n    element.outputs.forEach(this.visitNode);\n    element.children.forEach(this.visitNode);\n  }\n\n  visitTemplate(template: Template) {\n    // First, visit inputs, outputs and template attributes of the template node.\n    template.inputs.forEach(this.visitNode);\n    template.outputs.forEach(this.visitNode);\n    template.templateAttrs.forEach(this.visitNode);\n\n    // References are also evaluated in the outer context.\n    template.references.forEach(this.visitNode);\n\n    // Next, recurse into the template using its scope, and bumping the nesting level up by one.\n    const childScope = this.scope.getChildScope(template);\n    const binder = new TemplateBinder(\n        this.bindings, this.symbols, this.usedPipes, this.nestingLevel, childScope, template,\n        this.level + 1);\n    binder.ingest(template);\n  }\n\n  visitVariable(variable: Variable) {\n    // Register the `Variable` as a symbol in the current `Template`.\n    if (this.template !== null) {\n      this.symbols.set(variable, this.template);\n    }\n  }\n\n  visitReference(reference: Reference) {\n    // Register the `Reference` as a symbol in the current `Template`.\n    if (this.template !== null) {\n      this.symbols.set(reference, this.template);\n    }\n  }\n\n  // Unused template visitors\n\n  visitText(text: Text) {}\n  visitContent(content: Content) {}\n  visitTextAttribute(attribute: TextAttribute) {}\n  visitIcu(icu: Icu): void {}\n\n  // The remaining visitors are concerned with processing AST expressions within template bindings\n\n  visitBoundAttribute(attribute: BoundAttribute) { attribute.value.visit(this); }\n\n  visitBoundEvent(event: BoundEvent) { event.handler.visit(this); }\n\n  visitBoundText(text: BoundText) { text.value.visit(this); }\n  visitPipe(ast: BindingPipe, context: any): any {\n    this.usedPipes.add(ast.name);\n    return super.visitPipe(ast, context);\n  }\n\n  // These five types of AST expressions can refer to expression roots, which could be variables\n  // or references in the current scope.\n\n  visitPropertyRead(ast: PropertyRead, context: any): any {\n    this.maybeMap(context, ast, ast.name);\n    return super.visitPropertyRead(ast, context);\n  }\n\n  visitSafePropertyRead(ast: SafePropertyRead, context: any): any {\n    this.maybeMap(context, ast, ast.name);\n    return super.visitSafePropertyRead(ast, context);\n  }\n\n  visitPropertyWrite(ast: PropertyWrite, context: any): any {\n    this.maybeMap(context, ast, ast.name);\n    return super.visitPropertyWrite(ast, context);\n  }\n\n  visitMethodCall(ast: MethodCall, context: any): any {\n    this.maybeMap(context, ast, ast.name);\n    return super.visitMethodCall(ast, context);\n  }\n\n  visitSafeMethodCall(ast: SafeMethodCall, context: any): any {\n    this.maybeMap(context, ast, ast.name);\n    return super.visitSafeMethodCall(ast, context);\n  }\n\n  private maybeMap(\n      scope: Scope, ast: PropertyRead|SafePropertyRead|PropertyWrite|MethodCall|SafeMethodCall,\n      name: string): void {\n    // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an\n    // `AST` expression that maps to a `Variable` or `Reference`.\n    if (!(ast.receiver instanceof ImplicitReceiver)) {\n      return;\n    }\n\n    // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is\n    // probably a property on the top-level component context.\n    let target = this.scope.lookup(name);\n    if (target !== null) {\n      this.bindings.set(ast, target);\n    }\n  }\n}\n\n/**\n * Metadata container for a `Target` that allows queries for specific bits of metadata.\n *\n * See `BoundTarget` for documentation on the individual methods.\n */\nexport class R3BoundTarget<DirectiveT extends DirectiveMeta> implements BoundTarget<DirectiveT> {\n  constructor(\n      readonly target: Target, private directives: Map<Element|Template, DirectiveT[]>,\n      private bindings: Map<BoundAttribute|BoundEvent|TextAttribute, DirectiveT|Element|Template>,\n      private references:\n          Map<BoundAttribute|BoundEvent|Reference|TextAttribute,\n              {directive: DirectiveT, node: Element|Template}|Element|Template>,\n      private exprTargets: Map<AST, Reference|Variable>,\n      private symbols: Map<Reference|Variable, Template>,\n      private nestingLevel: Map<Template, number>, private usedPipes: Set<string>) {}\n\n  getDirectivesOfNode(node: Element|Template): DirectiveT[]|null {\n    return this.directives.get(node) || null;\n  }\n\n  getReferenceTarget(ref: Reference): {directive: DirectiveT, node: Element|Template}|Element\n      |Template|null {\n    return this.references.get(ref) || null;\n  }\n\n  getConsumerOfBinding(binding: BoundAttribute|BoundEvent|TextAttribute): DirectiveT|Element\n      |Template|null {\n    return this.bindings.get(binding) || null;\n  }\n\n  getExpressionTarget(expr: AST): Reference|Variable|null {\n    return this.exprTargets.get(expr) || null;\n  }\n\n  getTemplateOfSymbol(symbol: Reference|Variable): Template|null {\n    return this.symbols.get(symbol) || null;\n  }\n\n  getNestingLevel(template: Template): number { return this.nestingLevel.get(template) || 0; }\n\n  getUsedDirectives(): DirectiveT[] {\n    const set = new Set<DirectiveT>();\n    this.directives.forEach(dirs => dirs.forEach(dir => set.add(dir)));\n    return Array.from(set.values());\n  }\n\n  getUsedPipes(): string[] { return Array.from(this.usedPipes); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n//////////////////////////////////////\n// THIS FILE HAS GLOBAL SIDE EFFECT //\n//       (see bottom of file)       //\n//////////////////////////////////////\n\n/**\n * @module\n * @description\n * Entry point for all APIs of the compiler package.\n *\n * <div class=\"callout is-critical\">\n *   <header>Unstable APIs</header>\n *   <p>\n *     All compiler apis are currently considered experimental and private!\n *   </p>\n *   <p>\n *     We expect the APIs in this package to keep on changing. Do not rely on them.\n *   </p>\n * </div>\n */\n\nimport * as core from './core';\nimport {publishFacade} from './jit_compiler_facade';\nimport {global} from './util';\n\nexport {core};\n\nexport * from './version';\nexport * from './template_parser/template_ast';\nexport {CompilerConfig, preserveWhitespacesDefault} from './config';\nexport * from './compile_metadata';\nexport * from './aot/compiler_factory';\nexport * from './aot/compiler';\nexport * from './aot/generated_file';\nexport * from './aot/compiler_options';\nexport * from './aot/compiler_host';\nexport * from './aot/formatted_error';\nexport * from './aot/partial_module';\nexport * from './aot/static_reflector';\nexport * from './aot/static_symbol';\nexport * from './aot/static_symbol_resolver';\nexport * from './aot/summary_resolver';\nexport {isLoweredSymbol, createLoweredSymbol} from './aot/util';\nexport {LazyRoute} from './aot/lazy_routes';\nexport * from './ast_path';\nexport * from './summary_resolver';\nexport {Identifiers} from './identifiers';\nexport {JitCompiler} from './jit/compiler';\nexport * from './compile_reflector';\nexport * from './url_resolver';\nexport * from './resource_loader';\nexport {ConstantPool} from './constant_pool';\nexport {DirectiveResolver} from './directive_resolver';\nexport {PipeResolver} from './pipe_resolver';\nexport {NgModuleResolver} from './ng_module_resolver';\nexport {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './ml_parser/interpolation_config';\nexport * from './schema/element_schema_registry';\nexport * from './i18n/index';\nexport * from './directive_normalizer';\nexport * from './expression_parser/ast';\nexport * from './expression_parser/lexer';\nexport * from './expression_parser/parser';\nexport * from './metadata_resolver';\nexport * from './ml_parser/ast';\nexport * from './ml_parser/html_parser';\nexport * from './ml_parser/html_tags';\nexport * from './ml_parser/interpolation_config';\nexport * from './ml_parser/tags';\nexport {LexerRange} from './ml_parser/lexer';\nexport {NgModuleCompiler} from './ng_module_compiler';\nexport {ArrayType, AssertNotNull, DYNAMIC_TYPE, BinaryOperator, BinaryOperatorExpr, BuiltinMethod, BuiltinType, BuiltinTypeName, BuiltinVar, CastExpr, ClassField, ClassMethod, ClassStmt, CommaExpr, CommentStmt, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, Expression, ExpressionStatement, ExpressionType, ExpressionVisitor, ExternalExpr, ExternalReference, literalMap, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, InvokeMethodExpr, JSDocCommentStmt, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, MapType, NotExpr, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, StatementVisitor, ThrowStmt, TryCatchStmt, Type, TypeVisitor, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, StmtModifier, Statement, STRING_TYPE, TypeofExpr, collectExternalReferences} from './output/output_ast';\nexport {EmitterVisitorContext} from './output/abstract_emitter';\nexport {JitEvaluator} from './output/output_jit';\nexport * from './output/ts_emitter';\nexport * from './parse_util';\nexport * from './schema/dom_element_schema_registry';\nexport * from './selector';\nexport * from './style_compiler';\nexport * from './template_parser/template_parser';\nexport {ViewCompiler, findStaticQueryIds, staticViewQueryIds} from './view_compiler/view_compiler';\nexport {getParseErrors, isSyntaxError, syntaxError, Version} from './util';\nexport {SourceMap} from './output/source_map';\nexport * from './injectable_compiler_2';\nexport * from './render3/view/api';\nexport {BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element as TmplAstElement, Node as TmplAstNode, RecursiveVisitor as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable,} from './render3/r3_ast';\nexport * from './render3/view/t2_api';\nexport * from './render3/view/t2_binder';\nexport {Identifiers as R3Identifiers} from './render3/r3_identifiers';\nexport {R3DependencyMetadata, R3FactoryMetadata, R3ResolvedDependencyType} from './render3/r3_factory';\nexport {compileInjector, compileNgModule, R3InjectorMetadata, R3NgModuleMetadata} from './render3/r3_module_compiler';\nexport {compilePipeFromMetadata, R3PipeMetadata} from './render3/r3_pipe_compiler';\nexport {makeBindingParser, parseTemplate, ParseTemplateOptions} from './render3/view/template';\nexport {R3Reference} from './render3/util';\nexport {compileBaseDefFromMetadata, R3BaseRefMetaData, compileComponentFromMetadata, compileDirectiveFromMetadata, parseHostBindings, ParsedHostBindings, verifyHostBindings} from './render3/view/compiler';\nexport {publishFacade} from './jit_compiler_facade';\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This function call has a global side effects and publishes the compiler into global namespace for\n// the late binding of the Compiler to the @angular/core for jit compilation.\npublishFacade(global);","/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(Subscriber, _super);\n    function Subscriber(destinationOrNext, error, complete) {\n        var _this = _super.call(this) || this;\n        _this.syncErrorValue = null;\n        _this.syncErrorThrown = false;\n        _this.syncErrorThrowable = false;\n        _this.isStopped = false;\n        switch (arguments.length) {\n            case 0:\n                _this.destination = emptyObserver;\n                break;\n            case 1:\n                if (!destinationOrNext) {\n                    _this.destination = emptyObserver;\n                    break;\n                }\n                if (typeof destinationOrNext === 'object') {\n                    if (destinationOrNext instanceof Subscriber) {\n                        _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n                        _this.destination = destinationOrNext;\n                        destinationOrNext.add(_this);\n                    }\n                    else {\n                        _this.syncErrorThrowable = true;\n                        _this.destination = new SafeSubscriber(_this, destinationOrNext);\n                    }\n                    break;\n                }\n            default:\n                _this.syncErrorThrowable = true;\n                _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);\n                break;\n        }\n        return _this;\n    }\n    Subscriber.prototype[rxSubscriberSymbol] = function () { return this; };\n    Subscriber.create = function (next, error, complete) {\n        var subscriber = new Subscriber(next, error, complete);\n        subscriber.syncErrorThrowable = false;\n        return subscriber;\n    };\n    Subscriber.prototype.next = function (value) {\n        if (!this.isStopped) {\n            this._next(value);\n        }\n    };\n    Subscriber.prototype.error = function (err) {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._error(err);\n        }\n    };\n    Subscriber.prototype.complete = function () {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._complete();\n        }\n    };\n    Subscriber.prototype.unsubscribe = function () {\n        if (this.closed) {\n            return;\n        }\n        this.isStopped = true;\n        _super.prototype.unsubscribe.call(this);\n    };\n    Subscriber.prototype._next = function (value) {\n        this.destination.next(value);\n    };\n    Subscriber.prototype._error = function (err) {\n        this.destination.error(err);\n        this.unsubscribe();\n    };\n    Subscriber.prototype._complete = function () {\n        this.destination.complete();\n        this.unsubscribe();\n    };\n    Subscriber.prototype._unsubscribeAndRecycle = function () {\n        var _parentOrParents = this._parentOrParents;\n        this._parentOrParents = null;\n        this.unsubscribe();\n        this.closed = false;\n        this.isStopped = false;\n        this._parentOrParents = _parentOrParents;\n        return this;\n    };\n    return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar SafeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SafeSubscriber, _super);\n    function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n        var _this = _super.call(this) || this;\n        _this._parentSubscriber = _parentSubscriber;\n        var next;\n        var context = _this;\n        if (isFunction(observerOrNext)) {\n            next = observerOrNext;\n        }\n        else if (observerOrNext) {\n            next = observerOrNext.next;\n            error = observerOrNext.error;\n            complete = observerOrNext.complete;\n            if (observerOrNext !== emptyObserver) {\n                context = Object.create(observerOrNext);\n                if (isFunction(context.unsubscribe)) {\n                    _this.add(context.unsubscribe.bind(context));\n                }\n                context.unsubscribe = _this.unsubscribe.bind(_this);\n            }\n        }\n        _this._context = context;\n        _this._next = next;\n        _this._error = error;\n        _this._complete = complete;\n        return _this;\n    }\n    SafeSubscriber.prototype.next = function (value) {\n        if (!this.isStopped && this._next) {\n            var _parentSubscriber = this._parentSubscriber;\n            if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                this.__tryOrUnsub(this._next, value);\n            }\n            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n                this.unsubscribe();\n            }\n        }\n    };\n    SafeSubscriber.prototype.error = function (err) {\n        if (!this.isStopped) {\n            var _parentSubscriber = this._parentSubscriber;\n            var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;\n            if (this._error) {\n                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(this._error, err);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, this._error, err);\n                    this.unsubscribe();\n                }\n            }\n            else if (!_parentSubscriber.syncErrorThrowable) {\n                this.unsubscribe();\n                if (useDeprecatedSynchronousErrorHandling) {\n                    throw err;\n                }\n                hostReportError(err);\n            }\n            else {\n                if (useDeprecatedSynchronousErrorHandling) {\n                    _parentSubscriber.syncErrorValue = err;\n                    _parentSubscriber.syncErrorThrown = true;\n                }\n                else {\n                    hostReportError(err);\n                }\n                this.unsubscribe();\n            }\n        }\n    };\n    SafeSubscriber.prototype.complete = function () {\n        var _this = this;\n        if (!this.isStopped) {\n            var _parentSubscriber = this._parentSubscriber;\n            if (this._complete) {\n                var wrappedComplete = function () { return _this._complete.call(_this._context); };\n                if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(wrappedComplete);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n                    this.unsubscribe();\n                }\n            }\n            else {\n                this.unsubscribe();\n            }\n        }\n    };\n    SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            this.unsubscribe();\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                throw err;\n            }\n            else {\n                hostReportError(err);\n            }\n        }\n    };\n    SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n        if (!config.useDeprecatedSynchronousErrorHandling) {\n            throw new Error('bad call');\n        }\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                parent.syncErrorValue = err;\n                parent.syncErrorThrown = true;\n                return true;\n            }\n            else {\n                hostReportError(err);\n                return true;\n            }\n        }\n        return false;\n    };\n    SafeSubscriber.prototype._unsubscribe = function () {\n        var _parentSubscriber = this._parentSubscriber;\n        this._context = null;\n        this._parentSubscriber = null;\n        _parentSubscriber.unsubscribe();\n    };\n    return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\n//# sourceMappingURL=Subscriber.js.map\n","/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nvar Observable = /*@__PURE__*/ (function () {\n    function Observable(subscribe) {\n        this._isScalar = false;\n        if (subscribe) {\n            this._subscribe = subscribe;\n        }\n    }\n    Observable.prototype.lift = function (operator) {\n        var observable = new Observable();\n        observable.source = this;\n        observable.operator = operator;\n        return observable;\n    };\n    Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n        var operator = this.operator;\n        var sink = toSubscriber(observerOrNext, error, complete);\n        if (operator) {\n            sink.add(operator.call(sink, this.source));\n        }\n        else {\n            sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n                this._subscribe(sink) :\n                this._trySubscribe(sink));\n        }\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            if (sink.syncErrorThrowable) {\n                sink.syncErrorThrowable = false;\n                if (sink.syncErrorThrown) {\n                    throw sink.syncErrorValue;\n                }\n            }\n        }\n        return sink;\n    };\n    Observable.prototype._trySubscribe = function (sink) {\n        try {\n            return this._subscribe(sink);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                sink.syncErrorThrown = true;\n                sink.syncErrorValue = err;\n            }\n            if (canReportError(sink)) {\n                sink.error(err);\n            }\n            else {\n                console.warn(err);\n            }\n        }\n    };\n    Observable.prototype.forEach = function (next, promiseCtor) {\n        var _this = this;\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor(function (resolve, reject) {\n            var subscription;\n            subscription = _this.subscribe(function (value) {\n                try {\n                    next(value);\n                }\n                catch (err) {\n                    reject(err);\n                    if (subscription) {\n                        subscription.unsubscribe();\n                    }\n                }\n            }, reject, resolve);\n        });\n    };\n    Observable.prototype._subscribe = function (subscriber) {\n        var source = this.source;\n        return source && source.subscribe(subscriber);\n    };\n    Observable.prototype[Symbol_observable] = function () {\n        return this;\n    };\n    Observable.prototype.pipe = function () {\n        var operations = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            operations[_i] = arguments[_i];\n        }\n        if (operations.length === 0) {\n            return this;\n        }\n        return pipeFromArray(operations)(this);\n    };\n    Observable.prototype.toPromise = function (promiseCtor) {\n        var _this = this;\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor(function (resolve, reject) {\n            var value;\n            _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n        });\n    };\n    Observable.create = function (subscribe) {\n        return new Observable(subscribe);\n    };\n    return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n    if (!promiseCtor) {\n        promiseCtor = config.Promise || Promise;\n    }\n    if (!promiseCtor) {\n        throw new Error('no Promise impl found');\n    }\n    return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n    if (nextOrObserver) {\n        if (nextOrObserver instanceof Subscriber) {\n            return nextOrObserver;\n        }\n        if (nextOrObserver[rxSubscriberSymbol]) {\n            return nextOrObserver[rxSubscriberSymbol]();\n        }\n    }\n    if (!nextOrObserver && !error && !complete) {\n        return new Subscriber(emptyObserver);\n    }\n    return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map\n","/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\n\nexport class Trigger {\n  open: string;\n  close?: string;\n\n  constructor(open: string, close?: string) {\n    this.open = open;\n    this.close = close || open;\n  }\n\n  isManual(): boolean {\n    return this.open === 'manual' || this.close === 'manual';\n  }\n}\n","/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\nimport { Renderer2 } from '@angular/core';\nimport { Trigger } from './trigger.class';\n\n/* tslint:disable-next-line: no-any */\nexport type BsEventCallback = (event?: any) => boolean | void;\n\nexport interface ListenOptions {\n  target?: HTMLElement;\n  targets?: HTMLElement[];\n  triggers?: string;\n  outsideClick?: boolean;\n  outsideEsc?: boolean;\n  show?: BsEventCallback;\n  hide?: BsEventCallback;\n  toggle?: BsEventCallback;\n}\n\nconst DEFAULT_ALIASES = {\n  hover: ['mouseover', 'mouseout'],\n  focus: ['focusin', 'focusout']\n};\n\n/* tslint:disable-next-line: no-any */\nexport function parseTriggers(triggers: string, aliases: any = DEFAULT_ALIASES): Trigger[] {\n  const trimmedTriggers = (triggers || '').trim();\n\n  if (trimmedTriggers.length === 0) {\n    return [];\n  }\n\n  const parsedTriggers = trimmedTriggers\n    .split(/\\s+/)\n    .map((trigger: string) => trigger.split(':'))\n    .map((triggerPair: string[]) => {\n      const alias = aliases[triggerPair[0]] || triggerPair;\n\n      return new Trigger(alias[0], alias[1]);\n    });\n\n  const manualTriggers = parsedTriggers.filter((triggerPair: Trigger) =>\n    triggerPair.isManual()\n  );\n\n  if (manualTriggers.length > 1) {\n    throw new Error('Triggers parse error: only one manual trigger is allowed');\n  }\n\n  if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\n    throw new Error('Triggers parse error: manual trigger can\\'t be mixed with other triggers');\n  }\n\n  return parsedTriggers;\n}\n\nexport function listenToTriggers(renderer: Renderer2,\n                                 /* tslint:disable-next-line: no-any */\n                                 target: any,\n                                 triggers: string,\n                                 showFn: BsEventCallback,\n                                 hideFn: BsEventCallback,\n                                 toggleFn: BsEventCallback): Function {\n  const parsedTriggers = parseTriggers(triggers);\n  /* tslint:disable-next-line: no-any */\n  const listeners: any[] = [];\n\n  if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n    return Function.prototype;\n  }\n\n  parsedTriggers.forEach((trigger: Trigger) => {\n    if (trigger.open === trigger.close) {\n      listeners.push(renderer.listen(target, trigger.open, toggleFn));\n\n      return;\n    }\n\n    listeners.push(\n      renderer.listen(target, trigger.open, showFn),\n      renderer.listen(target, trigger.close, hideFn)\n    );\n  });\n\n  return () => {\n    listeners.forEach((unsubscribeFn: Function) => unsubscribeFn());\n  };\n}\n\nexport function listenToTriggersV2(renderer: Renderer2,\n                                   options: ListenOptions): Function {\n  const parsedTriggers = parseTriggers(options.triggers);\n  const target = options.target;\n  // do nothing\n  if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n    return Function.prototype;\n  }\n\n  // all listeners\n  /* tslint:disable-next-line: no-any */\n  const listeners: any[] = [];\n\n  // lazy listeners registration\n  const _registerHide: Function[] = [];\n  const registerHide = () => {\n    // add hide listeners to unregister array\n    _registerHide.forEach((fn: Function) => listeners.push(fn()));\n    // register hide events only once\n    _registerHide.length = 0;\n  };\n\n  // register open\\close\\toggle listeners\n  parsedTriggers.forEach((trigger: Trigger) => {\n    const useToggle = trigger.open === trigger.close;\n    const showFn = useToggle ? options.toggle : options.show;\n\n    if (!useToggle) {\n      _registerHide.push(() =>\n        renderer.listen(target, trigger.close, options.hide)\n      );\n    }\n\n    listeners.push(\n      renderer.listen(target, trigger.open, () => showFn(registerHide))\n    );\n  });\n\n  return () => {\n    listeners.forEach((unsubscribeFn: Function) => unsubscribeFn());\n  };\n}\n\nexport function registerOutsideClick(renderer: Renderer2,\n                                     options: ListenOptions) {\n  if (!options.outsideClick) {\n    return Function.prototype;\n  }\n\n  /* tslint:disable-next-line: no-any */\n  return renderer.listen('document', 'click', (event: any) => {\n    if (options.target && options.target.contains(event.target)) {\n      return undefined;\n    }\n    if (\n      options.targets &&\n      options.targets.some(target => target.contains(event.target))\n    ) {\n      return undefined;\n    }\n\n    options.hide();\n  });\n}\n\nexport function registerEscClick(renderer: Renderer2,\n                                 options: ListenOptions) {\n  if (!options.outsideEsc) {\n    return Function.prototype;\n  }\n\n  return renderer.listen('document', 'keyup.esc', (event: any) => {\n    if (options.target && options.target.contains(event.target)) {\n      return undefined;\n    }\n    if (\n      options.targets &&\n      options.targets.some(target => target.contains(event.target))\n    ) {\n      return undefined;\n    }\n\n    options.hide();\n  });\n}\n","import { window } from './facade/browser';\n\nlet guessedVersion: 'bs3' | 'bs4';\n\nfunction _guessBsVersion(): 'bs3' | 'bs4' {\n  if (typeof document === 'undefined') {\n    return null;\n  }\n  const spanEl = document.createElement('span');\n  spanEl.innerText = 'test bs version';\n  document.body.appendChild(spanEl);\n  spanEl.classList.add('d-none');\n  const rect = spanEl.getBoundingClientRect();\n  document.body.removeChild(spanEl);\n  if (!rect) {\n    return 'bs3';\n  }\n\n  return rect.top === 0 ? 'bs4' : 'bs3';\n}\n\nexport function setTheme(theme: 'bs3' | 'bs4'): void {\n  guessedVersion = theme;\n}\n\n// todo: in ngx-bootstrap, bs4 will became a default one\nexport function isBs3(): boolean {\n  if (typeof window === 'undefined') {\n    return true;\n  }\n\n  if (typeof window.__theme === 'undefined') {\n    if (guessedVersion) {\n      return guessedVersion === 'bs3';\n    }\n    guessedVersion = _guessBsVersion();\n\n    return guessedVersion === 'bs3';\n  }\n\n  return window.__theme !== 'bs4';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * JS version of browser APIs. This library can only run in the browser.\n */\nconst win = (typeof window !== 'undefined' && window) || {} as any;\n\nexport { win as window };\nexport const document = win.document;\nexport const location = win.location;\nexport const gc = win.gc ? () => win.gc() : (): any => null;\nexport const performance = win.performance ? win.performance : null;\nexport const Event = win.Event;\nexport const MouseEvent = win.MouseEvent;\nexport const KeyboardEvent = win.KeyboardEvent;\nexport const EventTarget = win.EventTarget;\nexport const History = win.History;\nexport const Location = win.Location;\nexport const EventListener = win.EventListener;\n","export class LinkedList<T> {\n  length = 0;\n  /* tslint:disable-next-line: no-any*/\n  protected head: any;\n  /* tslint:disable-next-line: no-any*/\n  protected tail: any;\n  /* tslint:disable-next-line: no-any*/\n  protected current: any;\n  protected asArray: T[] = [];\n\n  get(position: number): T {\n    if (this.length === 0 || position < 0 || position >= this.length) {\n      return void 0;\n    }\n\n    let current = this.head;\n\n    for (let index = 0; index < position; index++) {\n      current = current.next;\n    }\n\n    return current.value;\n  }\n\n  add(value: T, position: number = this.length): void {\n    if (position < 0 || position > this.length) {\n      throw new Error('Position is out of the list');\n    }\n\n    /* tslint:disable-next-line: no-any*/\n    const node: any = {\n      value,\n      next: undefined,\n      previous: undefined\n    };\n\n    if (this.length === 0) {\n      this.head = node;\n      this.tail = node;\n      this.current = node;\n    } else {\n      if (position === 0) {\n        // first node\n        node.next = this.head;\n        this.head.previous = node;\n        this.head = node;\n      } else if (position === this.length) {\n        // last node\n        this.tail.next = node;\n        node.previous = this.tail;\n        this.tail = node;\n      } else {\n        // node in middle\n        const currentPreviousNode = this.getNode(position - 1);\n        const currentNextNode = currentPreviousNode.next;\n\n        currentPreviousNode.next = node;\n        currentNextNode.previous = node;\n\n        node.previous = currentPreviousNode;\n        node.next = currentNextNode;\n      }\n    }\n    this.length++;\n    this.createInternalArrayRepresentation();\n  }\n\n  remove(position = 0): void {\n    if (this.length === 0 || position < 0 || position >= this.length) {\n      throw new Error('Position is out of the list');\n    }\n\n    if (position === 0) {\n      // first node\n      this.head = this.head.next;\n\n      if (this.head) {\n        // there is no second node\n        this.head.previous = undefined;\n      } else {\n        // there is no second node\n        this.tail = undefined;\n      }\n    } else if (position === this.length - 1) {\n      // last node\n      this.tail = this.tail.previous;\n      this.tail.next = undefined;\n    } else {\n      // middle node\n      const removedNode = this.getNode(position);\n      removedNode.next.previous = removedNode.previous;\n      removedNode.previous.next = removedNode.next;\n    }\n\n    this.length--;\n    this.createInternalArrayRepresentation();\n  }\n\n  set(position: number, value: T): void {\n    if (this.length === 0 || position < 0 || position >= this.length) {\n      throw new Error('Position is out of the list');\n    }\n\n    const node = this.getNode(position);\n    node.value = value;\n    this.createInternalArrayRepresentation();\n  }\n\n  toArray(): T[] {\n    return this.asArray;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  findAll(fn: any): any[] {\n    let current = this.head;\n    /* tslint:disable-next-line: no-any*/\n    const result: any[] = [];\n    for (let index = 0; index < this.length; index++) {\n      if (fn(current.value, index)) {\n        result.push({index, value: current.value});\n      }\n      current = current.next;\n    }\n\n    return result;\n  }\n\n  // Array methods overriding start\n  push(...args: T[]): number {\n    /* tslint:disable-next-line: no-any*/\n    args.forEach((arg: any) => {\n      this.add(arg);\n    });\n\n    return this.length;\n  }\n\n  pop(): T {\n    if (this.length === 0) {\n      return undefined;\n    }\n    const last = this.tail;\n    this.remove(this.length - 1);\n\n    return last.value;\n  }\n\n  unshift(...args: T[]): number {\n    args.reverse();\n    /* tslint:disable-next-line: no-any*/\n    args.forEach((arg: any) => {\n      this.add(arg, 0);\n    });\n\n    return this.length;\n  }\n\n  shift(): T {\n    if (this.length === 0) {\n      return undefined;\n    }\n    const lastItem = this.head.value;\n    this.remove();\n\n    return lastItem;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  forEach(fn: any): void {\n    let current = this.head;\n    for (let index = 0; index < this.length; index++) {\n      fn(current.value, index);\n      current = current.next;\n    }\n  }\n\n  indexOf(value: T): number {\n    let current = this.head;\n    let position = 0;\n\n    for (let index = 0; index < this.length; index++) {\n      if (current.value === value) {\n        position = index;\n        break;\n      }\n      current = current.next;\n    }\n\n    return position;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  some(fn: any): boolean {\n    let current = this.head;\n    let result = false;\n    while (current && !result) {\n      if (fn(current.value)) {\n        result = true;\n        break;\n      }\n      current = current.next;\n    }\n\n    return result;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  every(fn: any): boolean {\n    let current = this.head;\n    let result = true;\n    while (current && result) {\n      if (!fn(current.value)) {\n        result = false;\n      }\n      current = current.next;\n    }\n\n    return result;\n  }\n\n  toString(): string {\n    return '[Linked List]';\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  find(fn: any): T {\n    let current = this.head;\n    let result: T;\n    for (let index = 0; index < this.length; index++) {\n      if (fn(current.value, index)) {\n        result = current.value;\n        break;\n      }\n      current = current.next;\n    }\n\n    return result;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  findIndex(fn: any): number {\n    let current = this.head;\n    let result: number;\n    for (let index = 0; index < this.length; index++) {\n      if (fn(current.value, index)) {\n        result = index;\n        break;\n      }\n      current = current.next;\n    }\n\n    return result;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  protected getNode(position: number): any {\n    if (this.length === 0 || position < 0 || position >= this.length) {\n      throw new Error('Position is out of the list');\n    }\n\n    let current = this.head;\n\n    for (let index = 0; index < position; index++) {\n      current = current.next;\n    }\n\n    return current;\n  }\n\n  protected createInternalArrayRepresentation(): void {\n    /* tslint:disable-next-line: no-any*/\n    const outArray: any[] = [];\n    let current = this.head;\n\n    while (current) {\n      outArray.push(current.value);\n      current = current.next;\n    }\n    this.asArray = outArray;\n  }\n\n  // Array methods overriding END\n}\n","/*tslint:disable:no-invalid-this */\n/* tslint:disable-next-line: no-any */\nexport function OnChange(defaultValue?: any): any {\n  const sufix = 'Change';\n\n  /* tslint:disable-next-line: no-any */\n  return function OnChangeHandler(target: any, propertyKey: string): void {\n    const _key = ` __${propertyKey}Value`;\n    Object.defineProperty(target, propertyKey, {\n      /* tslint:disable-next-line: no-any */\n      get(): any {\n        return this[_key];\n      },\n      /* tslint:disable-next-line: no-any */\n      set(value: any): void {\n        const prevValue = this[_key];\n        this[_key] = value;\n        if (prevValue !== value && this[propertyKey + sufix]) {\n          this[propertyKey + sufix].emit(value);\n        }\n      }\n    });\n  };\n}\n/* tslint:enable */\n","import { window } from './facade/browser';\n\nexport class Utils {\n  /* tslint:disable-next-line: no-any */\n  static reflow(element: any): void {\n    /* tslint:disable-next-line: no-any */\n    ((bs: any): void => bs)(element.offsetHeight);\n  }\n\n  // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js\n  /* tslint:disable-next-line: no-any */\n  static getStyles(elem: any): any {\n    // Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n    // IE throws on elements created in popups\n    // FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n    let view = elem.ownerDocument.defaultView;\n\n    if (!view || !view.opener) {\n      view = window;\n    }\n\n    return view.getComputedStyle(elem);\n  }\n}\n","import { isDevMode } from '@angular/core';\nconst _messagesHash: { [key: string]: boolean } = {};\nconst _hideMsg = typeof console === 'undefined' || !('warn' in console);\n\nexport function warnOnce(msg: string): void {\n  if (!isDevMode() || _hideMsg || msg in _messagesHash) {\n    return;\n  }\n\n  _messagesHash[msg] = true;\n  /*tslint:disable-next-line*/\n  console.warn(msg);\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_util_subscribeTo PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nimport { Observable } from './Observable';\nimport { subscribeTo } from './util/subscribeTo';\nvar SimpleInnerSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SimpleInnerSubscriber, _super);\n    function SimpleInnerSubscriber(parent) {\n        var _this = _super.call(this) || this;\n        _this.parent = parent;\n        return _this;\n    }\n    SimpleInnerSubscriber.prototype._next = function (value) {\n        this.parent.notifyNext(value);\n    };\n    SimpleInnerSubscriber.prototype._error = function (error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    };\n    SimpleInnerSubscriber.prototype._complete = function () {\n        this.parent.notifyComplete();\n        this.unsubscribe();\n    };\n    return SimpleInnerSubscriber;\n}(Subscriber));\nexport { SimpleInnerSubscriber };\nvar ComplexInnerSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ComplexInnerSubscriber, _super);\n    function ComplexInnerSubscriber(parent, outerValue, outerIndex) {\n        var _this = _super.call(this) || this;\n        _this.parent = parent;\n        _this.outerValue = outerValue;\n        _this.outerIndex = outerIndex;\n        return _this;\n    }\n    ComplexInnerSubscriber.prototype._next = function (value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);\n    };\n    ComplexInnerSubscriber.prototype._error = function (error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    };\n    ComplexInnerSubscriber.prototype._complete = function () {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    };\n    return ComplexInnerSubscriber;\n}(Subscriber));\nexport { ComplexInnerSubscriber };\nvar SimpleOuterSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SimpleOuterSubscriber, _super);\n    function SimpleOuterSubscriber() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) {\n        this.destination.next(innerValue);\n    };\n    SimpleOuterSubscriber.prototype.notifyError = function (err) {\n        this.destination.error(err);\n    };\n    SimpleOuterSubscriber.prototype.notifyComplete = function () {\n        this.destination.complete();\n    };\n    return SimpleOuterSubscriber;\n}(Subscriber));\nexport { SimpleOuterSubscriber };\nvar ComplexOuterSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ComplexOuterSubscriber, _super);\n    function ComplexOuterSubscriber() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) {\n        this.destination.next(innerValue);\n    };\n    ComplexOuterSubscriber.prototype.notifyError = function (error) {\n        this.destination.error(error);\n    };\n    ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) {\n        this.destination.complete();\n    };\n    return ComplexOuterSubscriber;\n}(Subscriber));\nexport { ComplexOuterSubscriber };\nexport function innerSubscribe(result, innerSubscriber) {\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    var subscription;\n    try {\n        subscription = subscribeTo(result)(innerSubscriber);\n    }\n    catch (error) {\n        innerSubscriber.error(error);\n    }\n    return subscription;\n}\n//# sourceMappingURL=innerSubscribe.js.map\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM apis, which allows the Router to be platform\n * agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-webworker` provides\n * one suitable for use with web workers.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM apis like pushState, popState, etc...\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`\n * class they are all platform independent.\n *\n * @publicApi\n */\nexport abstract class PlatformLocation {\n  abstract getBaseHrefFromDOM(): string;\n  abstract getState(): unknown;\n  abstract onPopState(fn: LocationChangeListener): void;\n  abstract onHashChange(fn: LocationChangeListener): void;\n\n  abstract get href(): string;\n  abstract get protocol(): string;\n  abstract get hostname(): string;\n  abstract get port(): string;\n  abstract get pathname(): string;\n  abstract get search(): string;\n  abstract get hash(): string;\n\n  abstract replaceState(state: any, title: string, url: string): void;\n\n  abstract pushState(state: any, title: string, url: string): void;\n\n  abstract forward(): void;\n\n  abstract back(): void;\n}\n\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nexport const LOCATION_INITIALIZED = new InjectionToken<Promise<any>>('Location Initialized');\n\n/**\n * @description\n * A serializable version of the event from `onPopState` or `onHashChange`\n *\n * @publicApi\n */\nexport interface LocationChangeEvent {\n  type: string;\n  state: any;\n}\n\n/**\n * @publicApi\n */\nexport interface LocationChangeListener { (event: LocationChangeEvent): any; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport {LocationChangeListener} from './platform_location';\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nexport abstract class LocationStrategy {\n  abstract path(includeHash?: boolean): string;\n  abstract prepareExternalUrl(internal: string): string;\n  abstract pushState(state: any, title: string, url: string, queryParams: string): void;\n  abstract replaceState(state: any, title: string, url: string, queryParams: string): void;\n  abstract forward(): void;\n  abstract back(): void;\n  abstract onPopState(fn: LocationChangeListener): void;\n  abstract getBaseHref(): string;\n}\n\n\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport const APP_BASE_HREF = new InjectionToken<string>('appBaseHref');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter, Injectable} from '@angular/core';\nimport {SubscriptionLike} from 'rxjs';\n\nimport {LocationStrategy} from './location_strategy';\nimport {PlatformLocation} from './platform_location';\n\n/** @publicApi */\nexport interface PopStateEvent {\n  pop?: boolean;\n  state?: any;\n  type?: string;\n  url?: string;\n}\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router#navigate` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\n@Injectable()\nexport class Location {\n  /** @internal */\n  _subject: EventEmitter<any> = new EventEmitter();\n  /** @internal */\n  _baseHref: string;\n  /** @internal */\n  _platformStrategy: LocationStrategy;\n  /** @internal */\n  _platformLocation: PlatformLocation;\n  /** @internal */\n  _urlChangeListeners: ((url: string, state: unknown) => void)[] = [];\n\n  constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation) {\n    this._platformStrategy = platformStrategy;\n    const browserBaseHref = this._platformStrategy.getBaseHref();\n    this._platformLocation = platformLocation;\n    this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n    this._platformStrategy.onPopState((ev) => {\n      this._subject.emit({\n        'url': this.path(true),\n        'pop': true,\n        'state': ev.state,\n        'type': ev.type,\n      });\n    });\n  }\n\n  /**\n   * Normalizes the URL path for this location.\n   *\n   * @param includeHash True to include an anchor fragment in the path.\n   *\n   * @returns The normalized URL path.\n   */\n  // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n  // removed.\n  path(includeHash: boolean = false): string {\n    return this.normalize(this._platformStrategy.path(includeHash));\n  }\n\n  /**\n   * Reports the current state of the location history.\n   * @returns The current value of the `history.state` object.\n   */\n  getState(): unknown { return this._platformLocation.getState(); }\n\n  /**\n   * Normalizes the given path and compares to the current normalized path.\n   *\n   * @param path The given URL path.\n   * @param query Query parameters.\n   *\n   * @returns True if the given URL path is equal to the current normalized path, false\n   * otherwise.\n   */\n  isCurrentPathEqualTo(path: string, query: string = ''): boolean {\n    return this.path() == this.normalize(path + Location.normalizeQueryParams(query));\n  }\n\n  /**\n   * Normalizes a URL path by stripping any trailing slashes.\n   *\n   * @param url String representing a URL.\n   *\n   * @returns The normalized URL string.\n   */\n  normalize(url: string): string {\n    return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n  }\n\n  /**\n   * Normalizes an external URL path.\n   * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n   * before normalizing. Adds a hash if `HashLocationStrategy` is\n   * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n   *\n   * @param url String representing a URL.\n   *\n   * @returns  A normalized platform-specific URL.\n   */\n  prepareExternalUrl(url: string): string {\n    if (url && url[0] !== '/') {\n      url = '/' + url;\n    }\n    return this._platformStrategy.prepareExternalUrl(url);\n  }\n\n  // TODO: rename this method to pushState\n  /**\n   * Changes the browser's URL to a normalized version of a given URL, and pushes a\n   * new item onto the platform's history.\n   *\n   * @param path  URL path to normalize.\n   * @param query Query parameters.\n   * @param state Location history state.\n   *\n   */\n  go(path: string, query: string = '', state: any = null): void {\n    this._platformStrategy.pushState(state, '', path, query);\n    this._notifyUrlChangeListeners(\n        this.prepareExternalUrl(path + Location.normalizeQueryParams(query)), state);\n  }\n\n  /**\n   * Changes the browser's URL to a normalized version of the given URL, and replaces\n   * the top item on the platform's history stack.\n   *\n   * @param path  URL path to normalize.\n   * @param query Query parameters.\n   * @param state Location history state.\n   */\n  replaceState(path: string, query: string = '', state: any = null): void {\n    this._platformStrategy.replaceState(state, '', path, query);\n    this._notifyUrlChangeListeners(\n        this.prepareExternalUrl(path + Location.normalizeQueryParams(query)), state);\n  }\n\n  /**\n   * Navigates forward in the platform's history.\n   */\n  forward(): void { this._platformStrategy.forward(); }\n\n  /**\n   * Navigates back in the platform's history.\n   */\n  back(): void { this._platformStrategy.back(); }\n\n  /**\n   * Registers a URL change listener. Use to catch updates performed by the Angular\n   * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n   *\n   * @param fn The change handler function, which take a URL and a location history state.\n   */\n  onUrlChange(fn: (url: string, state: unknown) => void) {\n    this._urlChangeListeners.push(fn);\n    this.subscribe(v => { this._notifyUrlChangeListeners(v.url, v.state); });\n  }\n\n  /** @internal */\n  _notifyUrlChangeListeners(url: string = '', state: unknown) {\n    this._urlChangeListeners.forEach(fn => fn(url, state));\n  }\n\n  /**\n   * Subscribes to the platform's `popState` events.\n   *\n   * @param value Event that is triggered when the state history changes.\n   * @param exception The exception to throw.\n   *\n   * @returns Subscribed events.\n   */\n  subscribe(\n      onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void)|null,\n      onReturn?: (() => void)|null): SubscriptionLike {\n    return this._subject.subscribe({next: onNext, error: onThrow, complete: onReturn});\n  }\n\n  /**\n   * Normalizes URL parameters by prepending with `?` if needed.\n   *\n   * @param  params String of URL parameters.\n   *\n   * @returns The normalized URL parameters string.\n   */\n  public static normalizeQueryParams(params: string): string {\n    return params && params[0] !== '?' ? '?' + params : params;\n  }\n\n  /**\n   * Joins two parts of a URL with a slash if needed.\n   *\n   * @param start  URL string\n   * @param end    URL string\n   *\n   *\n   * @returns The joined URL string.\n   */\n  public static joinWithSlash(start: string, end: string): string {\n    if (start.length == 0) {\n      return end;\n    }\n    if (end.length == 0) {\n      return start;\n    }\n    let slashes = 0;\n    if (start.endsWith('/')) {\n      slashes++;\n    }\n    if (end.startsWith('/')) {\n      slashes++;\n    }\n    if (slashes == 2) {\n      return start + end.substring(1);\n    }\n    if (slashes == 1) {\n      return start + end;\n    }\n    return start + '/' + end;\n  }\n\n  /**\n   * Removes a trailing slash from a URL string if needed.\n   * Looks for the first occurrence of either `#`, `?`, or the end of the\n   * line as `/` characters and removes the trailing slash if one exists.\n   *\n   * @param url URL string.\n   *\n   * @returns The URL string, modified if needed.\n   */\n  public static stripTrailingSlash(url: string): string {\n    const match = url.match(/#|\\?|$/);\n    const pathEndIdx = match && match.index || url.length;\n    const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n    return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n  }\n}\n\nfunction _stripBaseHref(baseHref: string, url: string): string {\n  return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;\n}\n\nfunction _stripIndexHtml(url: string): string {\n  return url.replace(/\\/index.html$/, '');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\n\n\nimport {Location} from './location';\nimport {APP_BASE_HREF, LocationStrategy} from './location_strategy';\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\n\n\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable()\nexport class HashLocationStrategy extends LocationStrategy {\n  private _baseHref: string = '';\n  constructor(\n      private _platformLocation: PlatformLocation,\n      @Optional() @Inject(APP_BASE_HREF) _baseHref?: string) {\n    super();\n    if (_baseHref != null) {\n      this._baseHref = _baseHref;\n    }\n  }\n\n  onPopState(fn: LocationChangeListener): void {\n    this._platformLocation.onPopState(fn);\n    this._platformLocation.onHashChange(fn);\n  }\n\n  getBaseHref(): string { return this._baseHref; }\n\n  path(includeHash: boolean = false): string {\n    // the hash value is always prefixed with a `#`\n    // and if it is empty then it will stay empty\n    let path = this._platformLocation.hash;\n    if (path == null) path = '#';\n\n    return path.length > 0 ? path.substring(1) : path;\n  }\n\n  prepareExternalUrl(internal: string): string {\n    const url = Location.joinWithSlash(this._baseHref, internal);\n    return url.length > 0 ? ('#' + url) : url;\n  }\n\n  pushState(state: any, title: string, path: string, queryParams: string) {\n    let url: string|null =\n        this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));\n    if (url.length == 0) {\n      url = this._platformLocation.pathname;\n    }\n    this._platformLocation.pushState(state, title, url);\n  }\n\n  replaceState(state: any, title: string, path: string, queryParams: string) {\n    let url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));\n    if (url.length == 0) {\n      url = this._platformLocation.pathname;\n    }\n    this._platformLocation.replaceState(state, title, url);\n  }\n\n  forward(): void { this._platformLocation.forward(); }\n\n  back(): void { this._platformLocation.back(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµLocaleDataIndex as LocaleDataIndex, ÉµfindLocaleData as findLocaleData, ÉµgetLocalePluralCase} from '@angular/core';\nimport {CURRENCIES_EN, CurrenciesSymbols} from './currencies';\nimport {CurrencyIndex, ExtraLocaleDataIndex} from './locale_data';\n\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum NumberFormatStyle {\n  Decimal,\n  Percent,\n  Currency,\n  Scientific\n}\n\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum Plural {\n  Zero = 0,\n  One = 1,\n  Two = 2,\n  Few = 3,\n  Many = 4,\n  Other = 5,\n}\n\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum FormStyle {\n  Format,\n  Standalone\n}\n\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nexport enum TranslationWidth {\n  /** 1 character for `en-US`. For example: 'S' */\n  Narrow,\n  /** 3 characters for `en-US`. For example: 'Sun' */\n  Abbreviated,\n  /** Full length for `en-US`. For example: \"Sunday\" */\n  Wide,\n  /** 2 characters for `en-US`, For example: \"Su\" */\n  Short\n}\n\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()``\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n */\nexport enum FormatWidth {\n  /**\n   * For `en-US`, 'M/d/yy, h:mm a'`\n   * (Example: `6/15/15, 9:03 AM`)\n   */\n  Short,\n  /**\n   * For `en-US`, `'MMM d, y, h:mm:ss a'`\n   * (Example: `Jun 15, 2015, 9:03:01 AM`)\n   */\n  Medium,\n  /**\n   * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n   * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n   */\n  Long,\n  /**\n   * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n   * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n   */\n  Full\n}\n\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum NumberSymbol {\n  /**\n   * Decimal separator.\n   * For `en-US`, the dot character.\n   * Example : 2,345`.`67\n   */\n  Decimal,\n  /**\n   * Grouping separator, typically for thousands.\n   * For `en-US`, the comma character.\n   * Example: 2`,`345.67\n   */\n  Group,\n  /**\n   * List-item separator.\n   * Example: \"one, two, and three\"\n   */\n  List,\n  /**\n   * Sign for percentage (out of 100).\n   * Example: 23.4%\n   */\n  PercentSign,\n  /**\n   * Sign for positive numbers.\n   * Example: +23\n   */\n  PlusSign,\n  /**\n   * Sign for negative numbers.\n   * Example: -23\n   */\n  MinusSign,\n  /**\n   * Computer notation for exponential value (n times a power of 10).\n   * Example: 1.2E3\n   */\n  Exponential,\n  /**\n   * Human-readable format of exponential.\n   * Example: 1.2x103\n   */\n  SuperscriptingExponent,\n  /**\n   * Sign for permille (out of 1000).\n   * Example: 23.4â°\n   */\n  PerMille,\n  /**\n   * Infinity, can be used with plus and minus.\n   * Example: â, +â, -â\n   */\n  Infinity,\n  /**\n   * Not a number.\n   * Example: NaN\n   */\n  NaN,\n  /**\n   * Symbol used between time units.\n   * Example: 10:52\n   */\n  TimeSeparator,\n  /**\n   * Decimal separator for currency values (fallback to `Decimal`).\n   * Example: $2,345.67\n   */\n  CurrencyDecimal,\n  /**\n   * Group separator for currency values (fallback to `Group`).\n   * Example: $2,345.67\n   */\n  CurrencyGroup\n}\n\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nexport enum WeekDay {\n  Sunday = 0,\n  Monday,\n  Tuesday,\n  Wednesday,\n  Thursday,\n  Friday,\n  Saturday\n}\n\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleId(locale: string): string {\n  return findLocaleData(locale)[LocaleDataIndex.LocaleId];\n}\n\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDayPeriods(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string] {\n  const data = findLocaleData(locale);\n  const amPmData = <[\n    string, string\n  ][][]>[data[LocaleDataIndex.DayPeriodsFormat], data[LocaleDataIndex.DayPeriodsStandalone]];\n  const amPm = getLastDefinedValue(amPmData, formStyle);\n  return getLastDefinedValue(amPm, width);\n}\n\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDayNames(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = findLocaleData(locale);\n  const daysData =\n      <string[][][]>[data[LocaleDataIndex.DaysFormat], data[LocaleDataIndex.DaysStandalone]];\n  const days = getLastDefinedValue(daysData, formStyle);\n  return getLastDefinedValue(days, width);\n}\n\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,  `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleMonthNames(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = findLocaleData(locale);\n  const monthsData =\n      <string[][][]>[data[LocaleDataIndex.MonthsFormat], data[LocaleDataIndex.MonthsStandalone]];\n  const months = getLastDefinedValue(monthsData, formStyle);\n  return getLastDefinedValue(months, width);\n}\n\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string] {\n  const data = findLocaleData(locale);\n  const erasData = <[string, string][]>data[LocaleDataIndex.Eras];\n  return getLastDefinedValue(erasData, width);\n}\n\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleFirstDayOfWeek(locale: string): WeekDay {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.FirstDayOfWeek];\n}\n\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay] {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.WeekendRange];\n}\n\n/**\n * Retrieves a localized date-value formating string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formating string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDateFormat(locale: string, width: FormatWidth): string {\n  const data = findLocaleData(locale);\n  return getLastDefinedValue(data[LocaleDataIndex.DateFormat], width);\n}\n\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n\n * @publicApi\n */\nexport function getLocaleTimeFormat(locale: string, width: FormatWidth): string {\n  const data = findLocaleData(locale);\n  return getLastDefinedValue(data[LocaleDataIndex.TimeFormat], width);\n}\n\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string {\n  const data = findLocaleData(locale);\n  const dateTimeFormatData = <string[]>data[LocaleDataIndex.DateTimeFormat];\n  return getLastDefinedValue(dateTimeFormatData, width);\n}\n\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string {\n  const data = findLocaleData(locale);\n  const res = data[LocaleDataIndex.NumberSymbols][symbol];\n  if (typeof res === 'undefined') {\n    if (symbol === NumberSymbol.CurrencyDecimal) {\n      return data[LocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n    } else if (symbol === NumberSymbol.CurrencyGroup) {\n      return data[LocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n    }\n  }\n  return res;\n}\n\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | Â¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.NumberFormats][type];\n}\n\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleCurrencySymbol(locale: string): string|null {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.CurrencySymbol] || null;\n}\n\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleCurrencyName(locale: string): string|null {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.CurrencyName] || null;\n}\n\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleCurrencies(locale: string): {[code: string]: CurrenciesSymbols} {\n  const data = findLocaleData(locale);\n  return data[LocaleDataIndex.Currencies];\n}\n\n/**\n * @alias core/ÉµgetLocalePluralCase\n * @publicApi\n */\nexport const getLocalePluralCase: (locale: string) => ((value: number) => Plural) =\n    ÉµgetLocalePluralCase;\n\nfunction checkFullData(data: any) {\n  if (!data[LocaleDataIndex.ExtraData]) {\n    throw new Error(\n        `Missing extra locale data for the locale \"${data[LocaleDataIndex.LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n  }\n}\n\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[] {\n  const data = findLocaleData(locale);\n  checkFullData(data);\n  const rules = data[LocaleDataIndex.ExtraData][ExtraLocaleDataIndex.ExtraDayPeriodsRules] || [];\n  return rules.map((rule: string | [string, string]) => {\n    if (typeof rule === 'string') {\n      return extractTime(rule);\n    }\n    return [extractTime(rule[0]), extractTime(rule[1])];\n  });\n}\n\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleExtraDayPeriods(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = findLocaleData(locale);\n  checkFullData(data);\n  const dayPeriodsData = <string[][][]>[\n    data[LocaleDataIndex.ExtraData][ExtraLocaleDataIndex.ExtraDayPeriodFormats],\n    data[LocaleDataIndex.ExtraData][ExtraLocaleDataIndex.ExtraDayPeriodStandalone]\n  ];\n  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n  return getLastDefinedValue(dayPeriods, width) || [];\n}\n\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLastDefinedValue<T>(data: T[], index: number): T {\n  for (let i = index; i > -1; i--) {\n    if (typeof data[i] !== 'undefined') {\n      return data[i];\n    }\n  }\n  throw new Error('Locale data API: locale data undefined');\n}\n\n/**\n * Represents a time value with hours and minutes.\n *\n * @publicApi\n */\nexport type Time = {\n  hours: number,\n  minutes: number\n};\n\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time: string): Time {\n  const [h, m] = time.split(':');\n  return {hours: +h, minutes: +m};\n}\n\n\n\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.0\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale = 'en'): string {\n  const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n  const symbolNarrow = currency[CurrencyIndex.SymbolNarrow];\n\n  if (format === 'narrow' && typeof symbolNarrow === 'string') {\n    return symbolNarrow;\n  }\n\n  return currency[CurrencyIndex.Symbol] || code;\n}\n\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getNumberOfCurrencyDigits(code: string): number {\n  let digits;\n  const currency = CURRENCIES_EN[code];\n  if (currency) {\n    digits = currency[CurrencyIndex.NbOfDigits];\n  }\n  return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\n\n\nimport {Location} from './location';\nimport {APP_BASE_HREF, LocationStrategy} from './location_strategy';\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\n\n\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}\n * or add a base element to the document. This URL prefix that will be preserved\n * when generating and recognizing URLs.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Similarly, if you add `<base href='/my/app'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable()\nexport class PathLocationStrategy extends LocationStrategy {\n  private _baseHref: string;\n\n  constructor(\n      private _platformLocation: PlatformLocation,\n      @Optional() @Inject(APP_BASE_HREF) href?: string) {\n    super();\n\n    if (href == null) {\n      href = this._platformLocation.getBaseHrefFromDOM();\n    }\n\n    if (href == null) {\n      throw new Error(\n          `No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`);\n    }\n\n    this._baseHref = href;\n  }\n\n  onPopState(fn: LocationChangeListener): void {\n    this._platformLocation.onPopState(fn);\n    this._platformLocation.onHashChange(fn);\n  }\n\n  getBaseHref(): string { return this._baseHref; }\n\n  prepareExternalUrl(internal: string): string {\n    return Location.joinWithSlash(this._baseHref, internal);\n  }\n\n  path(includeHash: boolean = false): string {\n    const pathname = this._platformLocation.pathname +\n        Location.normalizeQueryParams(this._platformLocation.search);\n    const hash = this._platformLocation.hash;\n    return hash && includeHash ? `${pathname}${hash}` : pathname;\n  }\n\n  pushState(state: any, title: string, url: string, queryParams: string) {\n    const externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));\n    this._platformLocation.pushState(state, title, externalUrl);\n  }\n\n  replaceState(state: any, title: string, url: string, queryParams: string) {\n    const externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));\n    this._platformLocation.replaceState(state, title, externalUrl);\n  }\n\n  forward(): void { this._platformLocation.forward(); }\n\n  back(): void { this._platformLocation.back(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\n\nexport type CurrenciesSymbols = [string] | [string | undefined, string];\n\n/** @internal */\nexport const CURRENCIES_EN:\n    {[code: string]: CurrenciesSymbols | [string | undefined, string | undefined, number]} = {\n      'ADP': [undefined, undefined, 0],\n      'AFN': [undefined, undefined, 0],\n      'ALL': [undefined, undefined, 0],\n      'AMD': [undefined, undefined, 0],\n      'AOA': [undefined, 'Kz'],\n      'ARS': [undefined, '$'],\n      'AUD': ['A$', '$'],\n      'BAM': [undefined, 'KM'],\n      'BBD': [undefined, '$'],\n      'BDT': [undefined, 'à§³'],\n      'BHD': [undefined, undefined, 3],\n      'BIF': [undefined, undefined, 0],\n      'BMD': [undefined, '$'],\n      'BND': [undefined, '$'],\n      'BOB': [undefined, 'Bs'],\n      'BRL': ['R$'],\n      'BSD': [undefined, '$'],\n      'BWP': [undefined, 'P'],\n      'BYN': [undefined, 'Ñ.', 2],\n      'BYR': [undefined, undefined, 0],\n      'BZD': [undefined, '$'],\n      'CAD': ['CA$', '$', 2],\n      'CHF': [undefined, undefined, 2],\n      'CLF': [undefined, undefined, 4],\n      'CLP': [undefined, '$', 0],\n      'CNY': ['CNÂ¥', 'Â¥'],\n      'COP': [undefined, '$', 0],\n      'CRC': [undefined, 'â¡', 2],\n      'CUC': [undefined, '$'],\n      'CUP': [undefined, '$'],\n      'CZK': [undefined, 'KÄ', 2],\n      'DJF': [undefined, undefined, 0],\n      'DKK': [undefined, 'kr', 2],\n      'DOP': [undefined, '$'],\n      'EGP': [undefined, 'EÂ£'],\n      'ESP': [undefined, 'â§', 0],\n      'EUR': ['â¬'],\n      'FJD': [undefined, '$'],\n      'FKP': [undefined, 'Â£'],\n      'GBP': ['Â£'],\n      'GEL': [undefined, 'â¾'],\n      'GIP': [undefined, 'Â£'],\n      'GNF': [undefined, 'FG', 0],\n      'GTQ': [undefined, 'Q'],\n      'GYD': [undefined, '$', 0],\n      'HKD': ['HK$', '$'],\n      'HNL': [undefined, 'L'],\n      'HRK': [undefined, 'kn'],\n      'HUF': [undefined, 'Ft', 2],\n      'IDR': [undefined, 'Rp', 0],\n      'ILS': ['âª'],\n      'INR': ['â¹'],\n      'IQD': [undefined, undefined, 0],\n      'IRR': [undefined, undefined, 0],\n      'ISK': [undefined, 'kr', 0],\n      'ITL': [undefined, undefined, 0],\n      'JMD': [undefined, '$'],\n      'JOD': [undefined, undefined, 3],\n      'JPY': ['Â¥', undefined, 0],\n      'KHR': [undefined, 'á'],\n      'KMF': [undefined, 'CF', 0],\n      'KPW': [undefined, 'â©', 0],\n      'KRW': ['â©', undefined, 0],\n      'KWD': [undefined, undefined, 3],\n      'KYD': [undefined, '$'],\n      'KZT': [undefined, 'â¸'],\n      'LAK': [undefined, 'â­', 0],\n      'LBP': [undefined, 'LÂ£', 0],\n      'LKR': [undefined, 'Rs'],\n      'LRD': [undefined, '$'],\n      'LTL': [undefined, 'Lt'],\n      'LUF': [undefined, undefined, 0],\n      'LVL': [undefined, 'Ls'],\n      'LYD': [undefined, undefined, 3],\n      'MGA': [undefined, 'Ar', 0],\n      'MGF': [undefined, undefined, 0],\n      'MMK': [undefined, 'K', 0],\n      'MNT': [undefined, 'â®', 0],\n      'MRO': [undefined, undefined, 0],\n      'MUR': [undefined, 'Rs', 0],\n      'MXN': ['MX$', '$'],\n      'MYR': [undefined, 'RM'],\n      'NAD': [undefined, '$'],\n      'NGN': [undefined, 'â¦'],\n      'NIO': [undefined, 'C$'],\n      'NOK': [undefined, 'kr', 2],\n      'NPR': [undefined, 'Rs'],\n      'NZD': ['NZ$', '$'],\n      'OMR': [undefined, undefined, 3],\n      'PHP': [undefined, 'â±'],\n      'PKR': [undefined, 'Rs', 0],\n      'PLN': [undefined, 'zÅ'],\n      'PYG': [undefined, 'â²', 0],\n      'RON': [undefined, 'lei'],\n      'RSD': [undefined, undefined, 0],\n      'RUB': [undefined, 'â½'],\n      'RUR': [undefined, 'Ñ.'],\n      'RWF': [undefined, 'RF', 0],\n      'SBD': [undefined, '$'],\n      'SEK': [undefined, 'kr', 2],\n      'SGD': [undefined, '$'],\n      'SHP': [undefined, 'Â£'],\n      'SLL': [undefined, undefined, 0],\n      'SOS': [undefined, undefined, 0],\n      'SRD': [undefined, '$'],\n      'SSP': [undefined, 'Â£'],\n      'STD': [undefined, undefined, 0],\n      'STN': [undefined, 'Db'],\n      'SYP': [undefined, 'Â£', 0],\n      'THB': [undefined, 'à¸¿'],\n      'TMM': [undefined, undefined, 0],\n      'TND': [undefined, undefined, 3],\n      'TOP': [undefined, 'T$'],\n      'TRL': [undefined, undefined, 0],\n      'TRY': [undefined, 'âº'],\n      'TTD': [undefined, '$'],\n      'TWD': ['NT$', '$', 2],\n      'TZS': [undefined, undefined, 0],\n      'UAH': [undefined, 'â´'],\n      'UGX': [undefined, undefined, 0],\n      'USD': ['$'],\n      'UYI': [undefined, undefined, 0],\n      'UYU': [undefined, '$'],\n      'UZS': [undefined, undefined, 0],\n      'VEF': [undefined, 'Bs'],\n      'VND': ['â«', undefined, 0],\n      'VUV': [undefined, undefined, 0],\n      'XAF': ['FCFA', undefined, 0],\n      'XCD': ['EC$', '$'],\n      'XOF': ['CFA', undefined, 0],\n      'XPF': ['CFPF', undefined, 0],\n      'YER': [undefined, undefined, 0],\n      'ZAR': [undefined, 'R'],\n      'ZMK': [undefined, undefined, 0],\n      'ZMW': [undefined, 'ZK'],\n      'ZWD': [undefined, undefined, 0]\n    };\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FormStyle, FormatWidth, NumberSymbol, Time, TranslationWidth, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleId, getLocaleMonthNames, getLocaleNumberSymbol, getLocaleTimeFormat} from './locale_data_api';\n\nexport const ISO8601_DATE_REGEX =\n    /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n//    1        2       3         4          5          6          7          8  9     10      11\nconst NAMED_FORMATS: {[localeId: string]: {[format: string]: string}} = {};\nconst DATE_FORMATS_SPLIT =\n    /((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\n\nenum ZoneWidth {\n  Short,\n  ShortGMT,\n  Long,\n  Extended\n}\n\nenum DateType {\n  FullYear,\n  Month,\n  Date,\n  Hours,\n  Minutes,\n  Seconds,\n  FractionalSeconds,\n  Day\n}\n\nenum TranslationType {\n  DayPeriods,\n  Days,\n  Months,\n  Eras\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatDate(\n    value: string | number | Date, format: string, locale: string, timezone?: string): string {\n  let date = toDate(value);\n  const namedFormat = getNamedFormat(locale, format);\n  format = namedFormat || format;\n\n  let parts: string[] = [];\n  let match;\n  while (format) {\n    match = DATE_FORMATS_SPLIT.exec(format);\n    if (match) {\n      parts = parts.concat(match.slice(1));\n      const part = parts.pop();\n      if (!part) {\n        break;\n      }\n      format = part;\n    } else {\n      parts.push(format);\n      break;\n    }\n  }\n\n  let dateTimezoneOffset = date.getTimezoneOffset();\n  if (timezone) {\n    dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n    date = convertTimezoneToLocal(date, timezone, true);\n  }\n\n  let text = '';\n  parts.forEach(value => {\n    const dateFormatter = getDateFormatter(value);\n    text += dateFormatter ?\n        dateFormatter(date, locale, dateTimezoneOffset) :\n        value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n  });\n\n  return text;\n}\n\nfunction getNamedFormat(locale: string, format: string): string {\n  const localeId = getLocaleId(locale);\n  NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n\n  if (NAMED_FORMATS[localeId][format]) {\n    return NAMED_FORMATS[localeId][format];\n  }\n\n  let formatValue = '';\n  switch (format) {\n    case 'shortDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n      break;\n    case 'shortTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n      break;\n    case 'short':\n      const shortTime = getNamedFormat(locale, 'shortTime');\n      const shortDate = getNamedFormat(locale, 'shortDate');\n      formatValue = formatDateTime(\n          getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n      break;\n    case 'medium':\n      const mediumTime = getNamedFormat(locale, 'mediumTime');\n      const mediumDate = getNamedFormat(locale, 'mediumDate');\n      formatValue = formatDateTime(\n          getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n      break;\n    case 'long':\n      const longTime = getNamedFormat(locale, 'longTime');\n      const longDate = getNamedFormat(locale, 'longDate');\n      formatValue =\n          formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n      break;\n    case 'full':\n      const fullTime = getNamedFormat(locale, 'fullTime');\n      const fullDate = getNamedFormat(locale, 'fullDate');\n      formatValue =\n          formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n      break;\n  }\n  if (formatValue) {\n    NAMED_FORMATS[localeId][format] = formatValue;\n  }\n  return formatValue;\n}\n\nfunction formatDateTime(str: string, opt_values: string[]) {\n  if (opt_values) {\n    str = str.replace(/\\{([^}]+)}/g, function(match, key) {\n      return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n    });\n  }\n  return str;\n}\n\nfunction padNumber(\n    num: number, digits: number, minusSign = '-', trim?: boolean, negWrap?: boolean): string {\n  let neg = '';\n  if (num < 0 || (negWrap && num <= 0)) {\n    if (negWrap) {\n      num = -num + 1;\n    } else {\n      num = -num;\n      neg = minusSign;\n    }\n  }\n  let strNum = String(num);\n  while (strNum.length < digits) {\n    strNum = '0' + strNum;\n  }\n  if (trim) {\n    strNum = strNum.substr(strNum.length - digits);\n  }\n  return neg + strNum;\n}\n\nfunction formatFractionalSeconds(milliseconds: number, digits: number): string {\n  const strMs = padNumber(milliseconds, 3);\n  return strMs.substr(0, digits);\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(\n    name: DateType, size: number, offset: number = 0, trim = false,\n    negWrap = false): DateFormatter {\n  return function(date: Date, locale: string): string {\n    let part = getDatePart(name, date);\n    if (offset > 0 || part > -offset) {\n      part += offset;\n    }\n\n    if (name === DateType.Hours) {\n      if (part === 0 && offset === -12) {\n        part = 12;\n      }\n    } else if (name === DateType.FractionalSeconds) {\n      return formatFractionalSeconds(part, size);\n    }\n\n    const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    return padNumber(part, size, localeMinus, trim, negWrap);\n  };\n}\n\nfunction getDatePart(part: DateType, date: Date): number {\n  switch (part) {\n    case DateType.FullYear:\n      return date.getFullYear();\n    case DateType.Month:\n      return date.getMonth();\n    case DateType.Date:\n      return date.getDate();\n    case DateType.Hours:\n      return date.getHours();\n    case DateType.Minutes:\n      return date.getMinutes();\n    case DateType.Seconds:\n      return date.getSeconds();\n    case DateType.FractionalSeconds:\n      return date.getMilliseconds();\n    case DateType.Day:\n      return date.getDay();\n    default:\n      throw new Error(`Unknown DateType value \"${part}\".`);\n  }\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(\n    name: TranslationType, width: TranslationWidth, form: FormStyle = FormStyle.Format,\n    extended = false): DateFormatter {\n  return function(date: Date, locale: string): string {\n    return getDateTranslation(date, locale, name, width, form, extended);\n  };\n}\n\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(\n    date: Date, locale: string, name: TranslationType, width: TranslationWidth, form: FormStyle,\n    extended: boolean) {\n  switch (name) {\n    case TranslationType.Months:\n      return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n    case TranslationType.Days:\n      return getLocaleDayNames(locale, form, width)[date.getDay()];\n    case TranslationType.DayPeriods:\n      const currentHours = date.getHours();\n      const currentMinutes = date.getMinutes();\n      if (extended) {\n        const rules = getLocaleExtraDayPeriodRules(locale);\n        const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n        let result;\n        rules.forEach((rule: Time | [Time, Time], index: number) => {\n          if (Array.isArray(rule)) {\n            // morning, afternoon, evening, night\n            const {hours: hoursFrom, minutes: minutesFrom} = rule[0];\n            const {hours: hoursTo, minutes: minutesTo} = rule[1];\n            if (currentHours >= hoursFrom && currentMinutes >= minutesFrom &&\n                (currentHours < hoursTo ||\n                 (currentHours === hoursTo && currentMinutes < minutesTo))) {\n              result = dayPeriods[index];\n            }\n          } else {  // noon or midnight\n            const {hours, minutes} = rule;\n            if (hours === currentHours && minutes === currentMinutes) {\n              result = dayPeriods[index];\n            }\n          }\n        });\n        if (result) {\n          return result;\n        }\n      }\n      // if no rules for the day periods, we use am/pm by default\n      return getLocaleDayPeriods(locale, form, <TranslationWidth>width)[currentHours < 12 ? 0 : 1];\n    case TranslationType.Eras:\n      return getLocaleEraNames(locale, <TranslationWidth>width)[date.getFullYear() <= 0 ? 0 : 1];\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      const unexpected: never = name;\n      throw new Error(`unexpected translation type ${unexpected}`);\n  }\n}\n\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width: ZoneWidth): DateFormatter {\n  return function(date: Date, locale: string, offset: number) {\n    const zone = -1 * offset;\n    const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n    switch (width) {\n      case ZoneWidth.Short:\n        return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n            padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.ShortGMT:\n        return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n      case ZoneWidth.Long:\n        return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n            padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.Extended:\n        if (offset === 0) {\n          return 'Z';\n        } else {\n          return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n              padNumber(Math.abs(zone % 60), 2, minusSign);\n        }\n      default:\n        throw new Error(`Unknown zone width \"${width}\"`);\n    }\n  };\n}\n\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year: number) {\n  const firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();\n  return new Date(\n      year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\n\nfunction getThursdayThisWeek(datetime: Date) {\n  return new Date(\n      datetime.getFullYear(), datetime.getMonth(),\n      datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\n\nfunction weekGetter(size: number, monthBased = false): DateFormatter {\n  return function(date: Date, locale: string) {\n    let result;\n    if (monthBased) {\n      const nbDaysBefore1stDayOfMonth =\n          new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n      const today = date.getDate();\n      result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n    } else {\n      const firstThurs = getFirstThursdayOfYear(date.getFullYear());\n      const thisThurs = getThursdayThisWeek(date);\n      const diff = thisThurs.getTime() - firstThurs.getTime();\n      result = 1 + Math.round(diff / 6.048e8);  // 6.048e8 ms per week\n    }\n\n    return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  };\n}\n\ntype DateFormatter = (date: Date, locale: string, offset: number) => string;\n\nconst DATE_FORMATS: {[format: string]: DateFormatter} = {};\n\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format: string): DateFormatter|null {\n  if (DATE_FORMATS[format]) {\n    return DATE_FORMATS[format];\n  }\n  let formatter;\n  switch (format) {\n    // Era name (AD/BC)\n    case 'G':\n    case 'GG':\n    case 'GGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n      break;\n    case 'GGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n      break;\n    case 'GGGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n      break;\n\n    // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n    case 'y':\n      formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n      break;\n    // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yy':\n      formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n      break;\n    // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yyy':\n      formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n      break;\n    // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n    case 'yyyy':\n      formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n      break;\n\n    // Month of the year (1-12), numeric\n    case 'M':\n    case 'L':\n      formatter = dateGetter(DateType.Month, 1, 1);\n      break;\n    case 'MM':\n    case 'LL':\n      formatter = dateGetter(DateType.Month, 2, 1);\n      break;\n\n    // Month of the year (January, ...), string, format\n    case 'MMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n      break;\n    case 'MMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n      break;\n    case 'MMMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n      break;\n\n    // Month of the year (January, ...), string, standalone\n    case 'LLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n      break;\n    case 'LLLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n      break;\n    case 'LLLLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n      break;\n\n    // Week of the year (1, ... 52)\n    case 'w':\n      formatter = weekGetter(1);\n      break;\n    case 'ww':\n      formatter = weekGetter(2);\n      break;\n\n    // Week of the month (1, ...)\n    case 'W':\n      formatter = weekGetter(1, true);\n      break;\n\n    // Day of the month (1-31)\n    case 'd':\n      formatter = dateGetter(DateType.Date, 1);\n      break;\n    case 'dd':\n      formatter = dateGetter(DateType.Date, 2);\n      break;\n\n    // Day of the Week\n    case 'E':\n    case 'EE':\n    case 'EEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n      break;\n    case 'EEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n      break;\n    case 'EEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n      break;\n    case 'EEEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n      break;\n\n    // Generic period of the day (am-pm)\n    case 'a':\n    case 'aa':\n    case 'aaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n      break;\n    case 'aaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n      break;\n    case 'aaaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n      break;\n\n    // Extended period of the day (midnight, at night, ...), standalone\n    case 'b':\n    case 'bb':\n    case 'bbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n      break;\n    case 'bbbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n      break;\n    case 'bbbbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n      break;\n\n    // Extended period of the day (midnight, night, ...), standalone\n    case 'B':\n    case 'BB':\n    case 'BBB':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n      break;\n    case 'BBBB':\n      formatter =\n          dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n      break;\n    case 'BBBBB':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n      break;\n\n    // Hour in AM/PM, (1-12)\n    case 'h':\n      formatter = dateGetter(DateType.Hours, 1, -12);\n      break;\n    case 'hh':\n      formatter = dateGetter(DateType.Hours, 2, -12);\n      break;\n\n    // Hour of the day (0-23)\n    case 'H':\n      formatter = dateGetter(DateType.Hours, 1);\n      break;\n    // Hour in day, padded (00-23)\n    case 'HH':\n      formatter = dateGetter(DateType.Hours, 2);\n      break;\n\n    // Minute of the hour (0-59)\n    case 'm':\n      formatter = dateGetter(DateType.Minutes, 1);\n      break;\n    case 'mm':\n      formatter = dateGetter(DateType.Minutes, 2);\n      break;\n\n    // Second of the minute (0-59)\n    case 's':\n      formatter = dateGetter(DateType.Seconds, 1);\n      break;\n    case 'ss':\n      formatter = dateGetter(DateType.Seconds, 2);\n      break;\n\n    // Fractional second\n    case 'S':\n      formatter = dateGetter(DateType.FractionalSeconds, 1);\n      break;\n    case 'SS':\n      formatter = dateGetter(DateType.FractionalSeconds, 2);\n      break;\n    case 'SSS':\n      formatter = dateGetter(DateType.FractionalSeconds, 3);\n      break;\n\n\n    // Timezone ISO8601 short format (-0430)\n    case 'Z':\n    case 'ZZ':\n    case 'ZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Short);\n      break;\n    // Timezone ISO8601 extended format (-04:30)\n    case 'ZZZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Extended);\n      break;\n\n    // Timezone GMT short format (GMT+4)\n    case 'O':\n    case 'OO':\n    case 'OOO':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'z':\n    case 'zz':\n    case 'zzz':\n      formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n      break;\n    // Timezone GMT long format (GMT+0430)\n    case 'OOOO':\n    case 'ZZZZ':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'zzzz':\n      formatter = timeZoneGetter(ZoneWidth.Long);\n      break;\n    default:\n      return null;\n  }\n  DATE_FORMATS[format] = formatter;\n  return formatter;\n}\n\nfunction timezoneToOffset(timezone: string, fallback: number): number {\n  // Support: IE 9-11 only, Edge 13-15+\n  // IE/Edge do not \"understand\" colon (`:`) in timezone\n  timezone = timezone.replace(/:/g, '');\n  const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n  return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\nfunction addDateMinutes(date: Date, minutes: number) {\n  date = new Date(date.getTime());\n  date.setMinutes(date.getMinutes() + minutes);\n  return date;\n}\n\nfunction convertTimezoneToLocal(date: Date, timezone: string, reverse: boolean): Date {\n  const reverseValue = reverse ? -1 : 1;\n  const dateTimezoneOffset = date.getTimezoneOffset();\n  const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n  return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n *   Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nexport function toDate(value: string | number | Date): Date {\n  if (isDate(value)) {\n    return value;\n  }\n\n  if (typeof value === 'number' && !isNaN(value)) {\n    return new Date(value);\n  }\n\n  if (typeof value === 'string') {\n    value = value.trim();\n\n    const parsedNb = parseFloat(value);\n\n    // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n    if (!isNaN(value as any - parsedNb)) {\n      return new Date(parsedNb);\n    }\n\n    if (/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)) {\n      /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n      before Date creation to avoid time offset and errors in the new Date.\n      If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n      date, some browsers (e.g. IE 9) will throw an invalid Date error.\n      If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n      is applied.\n      Note: ISO months are 0 for January, 1 for February, ... */\n      const [y, m, d] = value.split('-').map((val: string) => +val);\n      return new Date(y, m - 1, d);\n    }\n\n    let match: RegExpMatchArray|null;\n    if (match = value.match(ISO8601_DATE_REGEX)) {\n      return isoStringToDate(match);\n    }\n  }\n\n  const date = new Date(value as any);\n  if (!isDate(date)) {\n    throw new Error(`Unable to convert \"${value}\" into a date`);\n  }\n  return date;\n}\n\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nexport function isoStringToDate(match: RegExpMatchArray): Date {\n  const date = new Date(0);\n  let tzHour = 0;\n  let tzMin = 0;\n\n  // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n  const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n  const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n  // if there is a timezone defined like \"+01:00\" or \"+0100\"\n  if (match[9]) {\n    tzHour = Number(match[9] + match[10]);\n    tzMin = Number(match[9] + match[11]);\n  }\n  dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n  const h = Number(match[4] || 0) - tzHour;\n  const m = Number(match[5] || 0) - tzMin;\n  const s = Number(match[6] || 0);\n  const ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n  timeSetter.call(date, h, m, s, ms);\n  return date;\n}\n\nexport function isDate(value: any): value is Date {\n  return value instanceof Date && !isNaN(value.valueOf());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NumberFormatStyle, NumberSymbol, getLocaleNumberFormat, getLocaleNumberSymbol, getNumberOfCurrencyDigits} from './locale_data_api';\n\nexport const NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = 'Â¤';\nconst PERCENT_CHAR = '%';\n\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(\n    value: number, pattern: ParsedNumberFormat, locale: string, groupSymbol: NumberSymbol,\n    decimalSymbol: NumberSymbol, digitsInfo?: string, isPercent = false): string {\n  let formattedText = '';\n  let isZero = false;\n\n  if (!isFinite(value)) {\n    formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n  } else {\n    let parsedNumber = parseNumber(value);\n\n    if (isPercent) {\n      parsedNumber = toPercent(parsedNumber);\n    }\n\n    let minInt = pattern.minInt;\n    let minFraction = pattern.minFrac;\n    let maxFraction = pattern.maxFrac;\n\n    if (digitsInfo) {\n      const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n      if (parts === null) {\n        throw new Error(`${digitsInfo} is not a valid digit info`);\n      }\n      const minIntPart = parts[1];\n      const minFractionPart = parts[3];\n      const maxFractionPart = parts[5];\n      if (minIntPart != null) {\n        minInt = parseIntAutoRadix(minIntPart);\n      }\n      if (minFractionPart != null) {\n        minFraction = parseIntAutoRadix(minFractionPart);\n      }\n      if (maxFractionPart != null) {\n        maxFraction = parseIntAutoRadix(maxFractionPart);\n      } else if (minFractionPart != null && minFraction > maxFraction) {\n        maxFraction = minFraction;\n      }\n    }\n\n    roundNumber(parsedNumber, minFraction, maxFraction);\n\n    let digits = parsedNumber.digits;\n    let integerLen = parsedNumber.integerLen;\n    const exponent = parsedNumber.exponent;\n    let decimals = [];\n    isZero = digits.every(d => !d);\n\n    // pad zeros for small numbers\n    for (; integerLen < minInt; integerLen++) {\n      digits.unshift(0);\n    }\n\n    // pad zeros for small numbers\n    for (; integerLen < 0; integerLen++) {\n      digits.unshift(0);\n    }\n\n    // extract decimals digits\n    if (integerLen > 0) {\n      decimals = digits.splice(integerLen, digits.length);\n    } else {\n      decimals = digits;\n      digits = [0];\n    }\n\n    // format the integer digits with grouping separators\n    const groups = [];\n    if (digits.length >= pattern.lgSize) {\n      groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n    }\n\n    while (digits.length > pattern.gSize) {\n      groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n    }\n\n    if (digits.length) {\n      groups.unshift(digits.join(''));\n    }\n\n    formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n\n    // append the decimal digits\n    if (decimals.length) {\n      formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n    }\n\n    if (exponent) {\n      formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n    }\n  }\n\n  if (value < 0 && !isZero) {\n    formattedText = pattern.negPre + formattedText + pattern.negSuf;\n  } else {\n    formattedText = pattern.posPre + formattedText + pattern.posSuf;\n  }\n\n  return formattedText;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatCurrency(\n    value: number, locale: string, currency: string, currencyCode?: string,\n    digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n\n  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode !);\n  pattern.maxFrac = pattern.minFrac;\n\n  const res = formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n  return res\n      .replace(CURRENCY_CHAR, currency)\n      // if we have 2 time the currency character, the second one is ignored\n      .replace(CURRENCY_CHAR, '');\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n *\n */\nexport function formatPercent(value: number, locale: string, digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  const res = formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n  return res.replace(\n      new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatNumber(value: number, locale: string, digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  return formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\n\ninterface ParsedNumberFormat {\n  minInt: number;\n  // the minimum number of digits required in the fraction part of the number\n  minFrac: number;\n  // the maximum number of digits required in the fraction part of the number\n  maxFrac: number;\n  // the prefix for a positive number\n  posPre: string;\n  // the suffix for a positive number\n  posSuf: string;\n  // the prefix for a negative number (e.g. `-` or `(`))\n  negPre: string;\n  // the suffix for a negative number (e.g. `)`)\n  negSuf: string;\n  // number of digits in each group of separated digits\n  gSize: number;\n  // number of digits in the last group of digits before the decimal separator\n  lgSize: number;\n}\n\nfunction parseNumberFormat(format: string, minusSign = '-'): ParsedNumberFormat {\n  const p = {\n    minInt: 1,\n    minFrac: 0,\n    maxFrac: 0,\n    posPre: '',\n    posSuf: '',\n    negPre: '',\n    negSuf: '',\n    gSize: 0,\n    lgSize: 0\n  };\n\n  const patternParts = format.split(PATTERN_SEP);\n  const positive = patternParts[0];\n  const negative = patternParts[1];\n\n  const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n      positive.split(DECIMAL_SEP) :\n      [\n        positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n        positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n      ],\n        integer = positiveParts[0], fraction = positiveParts[1] || '';\n\n  p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));\n\n  for (let i = 0; i < fraction.length; i++) {\n    const ch = fraction.charAt(i);\n    if (ch === ZERO_CHAR) {\n      p.minFrac = p.maxFrac = i + 1;\n    } else if (ch === DIGIT_CHAR) {\n      p.maxFrac = i + 1;\n    } else {\n      p.posSuf += ch;\n    }\n  }\n\n  const groups = integer.split(GROUP_SEP);\n  p.gSize = groups[1] ? groups[1].length : 0;\n  p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n\n  if (negative) {\n    const trunkLen = positive.length - p.posPre.length - p.posSuf.length,\n          pos = negative.indexOf(DIGIT_CHAR);\n\n    p.negPre = negative.substr(0, pos).replace(/'/g, '');\n    p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');\n  } else {\n    p.negPre = minusSign + p.posPre;\n    p.negSuf = p.posSuf;\n  }\n\n  return p;\n}\n\ninterface ParsedNumber {\n  // an array of digits containing leading zeros as necessary\n  digits: number[];\n  // the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n  exponent: number;\n  // the number of the digits in `d` that are to the left of the decimal point\n  integerLen: number;\n}\n\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber: ParsedNumber): ParsedNumber {\n  // if the number is 0, don't do anything\n  if (parsedNumber.digits[0] === 0) {\n    return parsedNumber;\n  }\n\n  // Getting the current number of decimals\n  const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n  if (parsedNumber.exponent) {\n    parsedNumber.exponent += 2;\n  } else {\n    if (fractionLen === 0) {\n      parsedNumber.digits.push(0, 0);\n    } else if (fractionLen === 1) {\n      parsedNumber.digits.push(0);\n    }\n    parsedNumber.integerLen += 2;\n  }\n\n  return parsedNumber;\n}\n\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num: number): ParsedNumber {\n  let numStr = Math.abs(num) + '';\n  let exponent = 0, digits, integerLen;\n  let i, j, zeros;\n\n  // Decimal point?\n  if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n    numStr = numStr.replace(DECIMAL_SEP, '');\n  }\n\n  // Exponential form?\n  if ((i = numStr.search(/e/i)) > 0) {\n    // Work out the exponent.\n    if (integerLen < 0) integerLen = i;\n    integerLen += +numStr.slice(i + 1);\n    numStr = numStr.substring(0, i);\n  } else if (integerLen < 0) {\n    // There was no decimal point or exponent so it is an integer.\n    integerLen = numStr.length;\n  }\n\n  // Count the number of leading zeros.\n  for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n  }\n\n  if (i === (zeros = numStr.length)) {\n    // The digits are all zero.\n    digits = [0];\n    integerLen = 1;\n  } else {\n    // Count the number of trailing zeros\n    zeros--;\n    while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n\n    // Trailing zeros are insignificant so ignore them\n    integerLen -= i;\n    digits = [];\n    // Convert string to array of digits without leading/trailing zeros.\n    for (j = 0; i <= zeros; i++, j++) {\n      digits[j] = Number(numStr.charAt(i));\n    }\n  }\n\n  // If the number overflows the maximum allowed digits then use an exponent.\n  if (integerLen > MAX_DIGITS) {\n    digits = digits.splice(0, MAX_DIGITS - 1);\n    exponent = integerLen - 1;\n    integerLen = 1;\n  }\n\n  return {digits, exponent, integerLen};\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber: ParsedNumber, minFrac: number, maxFrac: number) {\n  if (minFrac > maxFrac) {\n    throw new Error(\n        `The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);\n  }\n\n  let digits = parsedNumber.digits;\n  let fractionLen = digits.length - parsedNumber.integerLen;\n  const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n\n  // The index of the digit to where rounding is to occur\n  let roundAt = fractionSize + parsedNumber.integerLen;\n  let digit = digits[roundAt];\n\n  if (roundAt > 0) {\n    // Drop fractional digits beyond `roundAt`\n    digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n\n    // Set non-fractional digits beyond `roundAt` to 0\n    for (let j = roundAt; j < digits.length; j++) {\n      digits[j] = 0;\n    }\n  } else {\n    // We rounded to zero so reset the parsedNumber\n    fractionLen = Math.max(0, fractionLen);\n    parsedNumber.integerLen = 1;\n    digits.length = Math.max(1, roundAt = fractionSize + 1);\n    digits[0] = 0;\n    for (let i = 1; i < roundAt; i++) digits[i] = 0;\n  }\n\n  if (digit >= 5) {\n    if (roundAt - 1 < 0) {\n      for (let k = 0; k > roundAt; k--) {\n        digits.unshift(0);\n        parsedNumber.integerLen++;\n      }\n      digits.unshift(1);\n      parsedNumber.integerLen++;\n    } else {\n      digits[roundAt - 1]++;\n    }\n  }\n\n  // Pad out with zeros to get the required fraction length\n  for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n  let dropTrailingZeros = fractionSize !== 0;\n  // Minimal length = nb of decimals required + current nb of integers\n  // Any number besides that is optional and can be removed if it's a trailing 0\n  const minLen = minFrac + parsedNumber.integerLen;\n  // Do any carrying, e.g. a digit was rounded up to 10\n  const carry = digits.reduceRight(function(carry, d, i, digits) {\n    d = d + carry;\n    digits[i] = d < 10 ? d : d - 10;  // d % 10\n    if (dropTrailingZeros) {\n      // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n      if (digits[i] === 0 && i >= minLen) {\n        digits.pop();\n      } else {\n        dropTrailingZeros = false;\n      }\n    }\n    return d >= 10 ? 1 : 0;  // Math.floor(d / 10);\n  }, 0);\n  if (carry) {\n    digits.unshift(carry);\n    parsedNumber.integerLen++;\n  }\n}\n\nexport function parseIntAutoRadix(text: string): number {\n  const result: number = parseInt(text);\n  if (isNaN(result)) {\n    throw new Error('Invalid integer literal when parsing ' + text);\n  }\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, InjectionToken, LOCALE_ID, Optional} from '@angular/core';\nimport {Plural, getLocalePluralCase} from './locale_data_api';\n\n\n/**\n * @deprecated from v5\n */\nexport const DEPRECATED_PLURAL_FN = new InjectionToken<boolean>('UseV4Plurals');\n\n/**\n * @publicApi\n */\nexport abstract class NgLocalization {\n  abstract getPluralCategory(value: any, locale?: string): string;\n}\n\n\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nexport function getPluralCategory(\n    value: number, cases: string[], ngLocalization: NgLocalization, locale?: string): string {\n  let key = `=${value}`;\n\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n\n  key = ngLocalization.getPluralCategory(value, locale);\n\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n\n  if (cases.indexOf('other') > -1) {\n    return 'other';\n  }\n\n  throw new Error(`No plural message found for value \"${value}\"`);\n}\n\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\n@Injectable()\nexport class NgLocaleLocalization extends NgLocalization {\n  constructor(\n      @Inject(LOCALE_ID) protected locale: string,\n      /** @deprecated from v5 */\n      @Optional() @Inject(DEPRECATED_PLURAL_FN) protected deprecatedPluralFn?:\n          ((locale: string, value: number|string) => Plural)|null) {\n    super();\n  }\n\n  getPluralCategory(value: any, locale?: string): string {\n    const plural = this.deprecatedPluralFn ? this.deprecatedPluralFn(locale || this.locale, value) :\n                                             getLocalePluralCase(locale || this.locale)(value);\n\n    switch (plural) {\n      case Plural.Zero:\n        return 'zero';\n      case Plural.One:\n        return 'one';\n      case Plural.Two:\n        return 'two';\n      case Plural.Few:\n        return 'few';\n      case Plural.Many:\n        return 'many';\n      default:\n        return 'other';\n    }\n  }\n}\n\n/**\n * Returns the plural case based on the locale\n *\n * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts\n * @publicApi\n */\nexport function getPluralCase(locale: string, nLike: number | string): Plural {\n  // TODO(vicb): lazy compute\n  if (typeof nLike === 'string') {\n    nLike = parseInt(<string>nLike, 10);\n  }\n  const n: number = nLike as number;\n  const nDecimal = n.toString().replace(/^[^.]*\\.?/, '');\n  const i = Math.floor(Math.abs(n));\n  const v = nDecimal.length;\n  const f = parseInt(nDecimal, 10);\n  const t = parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g, ''), 10) || 0;\n\n  const lang = locale.split('-')[0].toLowerCase();\n\n  switch (lang) {\n    case 'af':\n    case 'asa':\n    case 'az':\n    case 'bem':\n    case 'bez':\n    case 'bg':\n    case 'brx':\n    case 'ce':\n    case 'cgg':\n    case 'chr':\n    case 'ckb':\n    case 'ee':\n    case 'el':\n    case 'eo':\n    case 'es':\n    case 'eu':\n    case 'fo':\n    case 'fur':\n    case 'gsw':\n    case 'ha':\n    case 'haw':\n    case 'hu':\n    case 'jgo':\n    case 'jmc':\n    case 'ka':\n    case 'kk':\n    case 'kkj':\n    case 'kl':\n    case 'ks':\n    case 'ksb':\n    case 'ky':\n    case 'lb':\n    case 'lg':\n    case 'mas':\n    case 'mgo':\n    case 'ml':\n    case 'mn':\n    case 'nb':\n    case 'nd':\n    case 'ne':\n    case 'nn':\n    case 'nnh':\n    case 'nyn':\n    case 'om':\n    case 'or':\n    case 'os':\n    case 'ps':\n    case 'rm':\n    case 'rof':\n    case 'rwk':\n    case 'saq':\n    case 'seh':\n    case 'sn':\n    case 'so':\n    case 'sq':\n    case 'ta':\n    case 'te':\n    case 'teo':\n    case 'tk':\n    case 'tr':\n    case 'ug':\n    case 'uz':\n    case 'vo':\n    case 'vun':\n    case 'wae':\n    case 'xog':\n      if (n === 1) return Plural.One;\n      return Plural.Other;\n    case 'ak':\n    case 'ln':\n    case 'mg':\n    case 'pa':\n    case 'ti':\n      if (n === Math.floor(n) && n >= 0 && n <= 1) return Plural.One;\n      return Plural.Other;\n    case 'am':\n    case 'as':\n    case 'bn':\n    case 'fa':\n    case 'gu':\n    case 'hi':\n    case 'kn':\n    case 'mr':\n    case 'zu':\n      if (i === 0 || n === 1) return Plural.One;\n      return Plural.Other;\n    case 'ar':\n      if (n === 0) return Plural.Zero;\n      if (n === 1) return Plural.One;\n      if (n === 2) return Plural.Two;\n      if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10) return Plural.Few;\n      if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99) return Plural.Many;\n      return Plural.Other;\n    case 'ast':\n    case 'ca':\n    case 'de':\n    case 'en':\n    case 'et':\n    case 'fi':\n    case 'fy':\n    case 'gl':\n    case 'it':\n    case 'nl':\n    case 'sv':\n    case 'sw':\n    case 'ur':\n    case 'yi':\n      if (i === 1 && v === 0) return Plural.One;\n      return Plural.Other;\n    case 'be':\n      if (n % 10 === 1 && !(n % 100 === 11)) return Plural.One;\n      if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 &&\n          !(n % 100 >= 12 && n % 100 <= 14))\n        return Plural.Few;\n      if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 ||\n          n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14)\n        return Plural.Many;\n      return Plural.Other;\n    case 'br':\n      if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91)) return Plural.One;\n      if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92)) return Plural.Two;\n      if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) &&\n          !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 ||\n            n % 100 >= 90 && n % 100 <= 99))\n        return Plural.Few;\n      if (!(n === 0) && n % 1e6 === 0) return Plural.Many;\n      return Plural.Other;\n    case 'bs':\n    case 'hr':\n    case 'sr':\n      if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11))\n        return Plural.One;\n      if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n              !(i % 100 >= 12 && i % 100 <= 14) ||\n          f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&\n              !(f % 100 >= 12 && f % 100 <= 14))\n        return Plural.Few;\n      return Plural.Other;\n    case 'cs':\n    case 'sk':\n      if (i === 1 && v === 0) return Plural.One;\n      if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0) return Plural.Few;\n      if (!(v === 0)) return Plural.Many;\n      return Plural.Other;\n    case 'cy':\n      if (n === 0) return Plural.Zero;\n      if (n === 1) return Plural.One;\n      if (n === 2) return Plural.Two;\n      if (n === 3) return Plural.Few;\n      if (n === 6) return Plural.Many;\n      return Plural.Other;\n    case 'da':\n      if (n === 1 || !(t === 0) && (i === 0 || i === 1)) return Plural.One;\n      return Plural.Other;\n    case 'dsb':\n    case 'hsb':\n      if (v === 0 && i % 100 === 1 || f % 100 === 1) return Plural.One;\n      if (v === 0 && i % 100 === 2 || f % 100 === 2) return Plural.Two;\n      if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 ||\n          f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4)\n        return Plural.Few;\n      return Plural.Other;\n    case 'ff':\n    case 'fr':\n    case 'hy':\n    case 'kab':\n      if (i === 0 || i === 1) return Plural.One;\n      return Plural.Other;\n    case 'fil':\n      if (v === 0 && (i === 1 || i === 2 || i === 3) ||\n          v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) ||\n          !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9))\n        return Plural.One;\n      return Plural.Other;\n    case 'ga':\n      if (n === 1) return Plural.One;\n      if (n === 2) return Plural.Two;\n      if (n === Math.floor(n) && n >= 3 && n <= 6) return Plural.Few;\n      if (n === Math.floor(n) && n >= 7 && n <= 10) return Plural.Many;\n      return Plural.Other;\n    case 'gd':\n      if (n === 1 || n === 11) return Plural.One;\n      if (n === 2 || n === 12) return Plural.Two;\n      if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19)) return Plural.Few;\n      return Plural.Other;\n    case 'gv':\n      if (v === 0 && i % 10 === 1) return Plural.One;\n      if (v === 0 && i % 10 === 2) return Plural.Two;\n      if (v === 0 &&\n          (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80))\n        return Plural.Few;\n      if (!(v === 0)) return Plural.Many;\n      return Plural.Other;\n    case 'he':\n      if (i === 1 && v === 0) return Plural.One;\n      if (i === 2 && v === 0) return Plural.Two;\n      if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0) return Plural.Many;\n      return Plural.Other;\n    case 'is':\n      if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0)) return Plural.One;\n      return Plural.Other;\n    case 'ksh':\n      if (n === 0) return Plural.Zero;\n      if (n === 1) return Plural.One;\n      return Plural.Other;\n    case 'kw':\n    case 'naq':\n    case 'se':\n    case 'smn':\n      if (n === 1) return Plural.One;\n      if (n === 2) return Plural.Two;\n      return Plural.Other;\n    case 'lag':\n      if (n === 0) return Plural.Zero;\n      if ((i === 0 || i === 1) && !(n === 0)) return Plural.One;\n      return Plural.Other;\n    case 'lt':\n      if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19)) return Plural.One;\n      if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 &&\n          !(n % 100 >= 11 && n % 100 <= 19))\n        return Plural.Few;\n      if (!(f === 0)) return Plural.Many;\n      return Plural.Other;\n    case 'lv':\n    case 'prg':\n      if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 ||\n          v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19)\n        return Plural.Zero;\n      if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) ||\n          !(v === 2) && f % 10 === 1)\n        return Plural.One;\n      return Plural.Other;\n    case 'mk':\n      if (v === 0 && i % 10 === 1 || f % 10 === 1) return Plural.One;\n      return Plural.Other;\n    case 'mt':\n      if (n === 1) return Plural.One;\n      if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10)\n        return Plural.Few;\n      if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19) return Plural.Many;\n      return Plural.Other;\n    case 'pl':\n      if (i === 1 && v === 0) return Plural.One;\n      if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n          !(i % 100 >= 12 && i % 100 <= 14))\n        return Plural.Few;\n      if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 ||\n          v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n          v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14)\n        return Plural.Many;\n      return Plural.Other;\n    case 'pt':\n      if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2)) return Plural.One;\n      return Plural.Other;\n    case 'ro':\n      if (i === 1 && v === 0) return Plural.One;\n      if (!(v === 0) || n === 0 ||\n          !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19)\n        return Plural.Few;\n      return Plural.Other;\n    case 'ru':\n    case 'uk':\n      if (v === 0 && i % 10 === 1 && !(i % 100 === 11)) return Plural.One;\n      if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n          !(i % 100 >= 12 && i % 100 <= 14))\n        return Plural.Few;\n      if (v === 0 && i % 10 === 0 ||\n          v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n          v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14)\n        return Plural.Many;\n      return Plural.Other;\n    case 'shi':\n      if (i === 0 || n === 1) return Plural.One;\n      if (n === Math.floor(n) && n >= 2 && n <= 10) return Plural.Few;\n      return Plural.Other;\n    case 'si':\n      if (n === 0 || n === 1 || i === 0 && f === 1) return Plural.One;\n      return Plural.Other;\n    case 'sl':\n      if (v === 0 && i % 100 === 1) return Plural.One;\n      if (v === 0 && i % 100 === 2) return Plural.Two;\n      if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0))\n        return Plural.Few;\n      return Plural.Other;\n    case 'tzm':\n      if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)\n        return Plural.One;\n      return Plural.Other;\n    // When there is no specification, the default is always \"other\"\n    // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n    // > other (requiredâgeneral plural form â also used if the language only has a single form)\n    default:\n      return Plural.Other;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµLOCALE_DATA as LOCALE_DATA, ÉµLocaleDataIndex as LocaleDataIndex} from '@angular/core';\n\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * @publicApi\n */\n// The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\nexport function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void {\n  if (typeof localeId !== 'string') {\n    extraData = localeId;\n    localeId = data[LocaleDataIndex.LocaleId];\n  }\n\n  localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n  LOCALE_DATA[localeId] = data;\n\n  if (extraData) {\n    LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n  }\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n  ExtraDayPeriodFormats = 0,\n  ExtraDayPeriodStandalone,\n  ExtraDayPeriodsRules\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {Symbol = 0, SymbolNarrow, NbOfDigits}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function parseCookieValue(cookieStr: string, name: string): string|null {\n  name = encodeURIComponent(name);\n  for (const cookie of cookieStr.split(';')) {\n    const eqIndex = cookie.indexOf('=');\n    const [cookieName, cookieValue]: string[] =\n        eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n    if (cookieName.trim() === name) {\n      return decodeURIComponent(cookieValue);\n    }\n  }\n  return null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Used to diff and convert ngStyle/ngClass instructions into [style] and [class] bindings.\n *\n * ngStyle and ngClass both accept various forms of input and behave differently than that\n * of how [style] and [class] behave in Angular.\n *\n * The differences are:\n *  - ngStyle and ngClass both **watch** their binding values for changes each time CD runs\n *    while [style] and [class] bindings do not (they check for identity changes)\n *  - ngStyle allows for unit-based keys (e.g. `{'max-width.px':value}`) and [style] does not\n *  - ngClass supports arrays of class values and [class] only accepts map and string values\n *  - ngClass allows for multiple className keys (space-separated) within an array or map\n *     (as the * key) while [class] only accepts a simple key/value map object\n *\n * Having Angular understand and adapt to all the different forms of behavior is complicated\n * and unnecessary. Instead, ngClass and ngStyle should have their input values be converted\n * into something that the core-level [style] and [class] bindings understand.\n *\n * This [StylingDiffer] class handles this conversion by creating a new input value each time\n * the inner representation of the binding value have changed.\n *\n * ## Why do we care about ngStyle/ngClass?\n * The styling algorithm code (documented inside of `render3/interfaces/styling.ts`) needs to\n * respect and understand the styling values emitted through ngStyle and ngClass (when they\n * are present and used in a template).\n *\n * Instead of having these directives manage styling on their own, they should be included\n * into the Angular styling algorithm that exists for [style] and [class] bindings.\n *\n * Here's why:\n *\n * - If ngStyle/ngClass is used in combination with [style]/[class] bindings then the\n *   styles and classes would fall out of sync and be applied and updated at\n *   inconsistent times\n * - Both ngClass/ngStyle do not respect [class.name] and [style.prop] bindings\n *   (they will write over them given the right combination of events)\n *\n *   ```\n *   <!-- if `w1` is updated then it will always override `w2`\n *        if `w2` is updated then it will always override `w1`\n *        if both are updated at the same time then `w1` wins -->\n *   <div [ngStyle]=\"{width:w1}\" [style.width]=\"w2\">...</div>\n *\n *   <!-- if `w1` is updated then it will always lose to `w2`\n *        if `w2` is updated then it will always override `w1`\n *        if both are updated at the same time then `w2` wins -->\n *   <div [style]=\"{width:w1}\" [style.width]=\"w2\">...</div>\n *   ```\n * - ngClass/ngStyle were written as a directives and made use of maps, closures and other\n *   expensive data structures which were evaluated each time CD runs\n */\nexport class StylingDiffer<T> {\n  public readonly value: T|null = null;\n\n  private _lastSetValue: {[key: string]: any}|string|string[]|null = null;\n  private _lastSetValueType: StylingDifferValueTypes = StylingDifferValueTypes.Null;\n  private _lastSetValueIdentityChange = false;\n\n  constructor(private _name: string, private _options: StylingDifferOptions) {}\n\n  /**\n   * Sets (updates) the styling value within the differ.\n   *\n   * Only when `hasValueChanged` is called then this new value will be evaluted\n   * and checked against the previous value.\n   *\n   * @param value the new styling value provided from the ngClass/ngStyle binding\n   */\n  setValue(value: {[key: string]: any}|string[]|string|null) {\n    if (Array.isArray(value)) {\n      this._lastSetValueType = StylingDifferValueTypes.Array;\n    } else if (value instanceof Set) {\n      this._lastSetValueType = StylingDifferValueTypes.Set;\n    } else if (value && typeof value === 'string') {\n      if (!(this._options & StylingDifferOptions.AllowStringValue)) {\n        throw new Error(this._name + ' string values are not allowed');\n      }\n      this._lastSetValueType = StylingDifferValueTypes.String;\n    } else {\n      this._lastSetValueType = value ? StylingDifferValueTypes.Map : StylingDifferValueTypes.Null;\n    }\n\n    this._lastSetValueIdentityChange = true;\n    this._lastSetValue = value || null;\n  }\n\n  /**\n   * Determines whether or not the value has changed.\n   *\n   * This function can be called right after `setValue()` is called, but it can also be\n   * called incase the existing value (if it's a collection) changes internally. If the\n   * value is indeed a collection it will do the necessary diffing work and produce a\n   * new object value as assign that to `value`.\n   *\n   * @returns whether or not the value has changed in some way.\n   */\n  hasValueChanged(): boolean {\n    let valueHasChanged = this._lastSetValueIdentityChange;\n    if (!valueHasChanged && !(this._lastSetValueType & StylingDifferValueTypes.Collection))\n      return false;\n\n    let finalValue: {[key: string]: any}|string|null = null;\n    const trimValues = (this._options & StylingDifferOptions.TrimProperties) ? true : false;\n    const parseOutUnits = (this._options & StylingDifferOptions.AllowUnits) ? true : false;\n    const allowSubKeys = (this._options & StylingDifferOptions.AllowSubKeys) ? true : false;\n\n    switch (this._lastSetValueType) {\n      // case 1: [input]=\"string\"\n      case StylingDifferValueTypes.String:\n        const tokens = (this._lastSetValue as string).split(/\\s+/g);\n        if (this._options & StylingDifferOptions.ForceAsMap) {\n          finalValue = {};\n          tokens.forEach((token, i) => (finalValue as{[key: string]: any})[token] = true);\n        } else {\n          finalValue = tokens.reduce((str, token, i) => str + (i ? ' ' : '') + token);\n        }\n        break;\n\n      // case 2: [input]=\"{key:value}\"\n      case StylingDifferValueTypes.Map:\n        const map: {[key: string]: any} = this._lastSetValue as{[key: string]: any};\n        const keys = Object.keys(map);\n        if (!valueHasChanged) {\n          if (this.value) {\n            // we know that the classExp value exists and that it is\n            // a map (otherwise an identity change would have occurred)\n            valueHasChanged = mapHasChanged(keys, this.value as{[key: string]: any}, map);\n          } else {\n            valueHasChanged = true;\n          }\n        }\n\n        if (valueHasChanged) {\n          finalValue =\n              bulidMapFromValues(this._name, trimValues, parseOutUnits, allowSubKeys, map, keys);\n        }\n        break;\n\n      // case 3a: [input]=\"[str1, str2, ...]\"\n      // case 3b: [input]=\"Set\"\n      case StylingDifferValueTypes.Array:\n      case StylingDifferValueTypes.Set:\n        const values = Array.from(this._lastSetValue as string[] | Set<string>);\n        if (!valueHasChanged) {\n          const keys = Object.keys(this.value !);\n          valueHasChanged = !arrayEqualsArray(keys, values);\n        }\n        if (valueHasChanged) {\n          finalValue =\n              bulidMapFromValues(this._name, trimValues, parseOutUnits, allowSubKeys, values);\n        }\n        break;\n\n      // case 4: [input]=\"null|undefined\"\n      default:\n        finalValue = null;\n        break;\n    }\n\n    if (valueHasChanged) {\n      (this as any).value = finalValue !;\n    }\n\n    return valueHasChanged;\n  }\n}\n\n/**\n * Various options that are consumed by the [StylingDiffer] class.\n */\nexport const enum StylingDifferOptions {\n  None = 0b00000,\n  TrimProperties = 0b00001,\n  AllowSubKeys = 0b00010,\n  AllowStringValue = 0b00100,\n  AllowUnits = 0b01000,\n  ForceAsMap = 0b10000,\n}\n\n/**\n * The different types of inputs that the [StylingDiffer] can deal with\n */\nconst enum StylingDifferValueTypes {\n  Null = 0b0000,\n  String = 0b0001,\n  Map = 0b0010,\n  Array = 0b0100,\n  Set = 0b1000,\n  Collection = 0b1110,\n}\n\n\n/**\n * builds and returns a map based on the values input value\n *\n * If the `keys` param is provided then the `values` param is treated as a\n * string map. Otherwise `values` is treated as a string array.\n */\nfunction bulidMapFromValues(\n    errorPrefix: string, trim: boolean, parseOutUnits: boolean, allowSubKeys: boolean,\n    values: {[key: string]: any} | string[], keys?: string[]) {\n  const map: {[key: string]: any} = {};\n  if (keys) {\n    // case 1: map\n    for (let i = 0; i < keys.length; i++) {\n      let key = keys[i];\n      key = trim ? key.trim() : key;\n      const value = (values as{[key: string]: any})[key];\n      setMapValues(map, key, value, parseOutUnits, allowSubKeys);\n    }\n  } else {\n    // case 2: array\n    for (let i = 0; i < values.length; i++) {\n      let value = (values as string[])[i];\n      assertValidValue(errorPrefix, value);\n      value = trim ? value.trim() : value;\n      setMapValues(map, value, true, false, allowSubKeys);\n    }\n  }\n\n  return map;\n}\n\nfunction assertValidValue(errorPrefix: string, value: any) {\n  if (typeof value !== 'string') {\n    throw new Error(\n        `${errorPrefix} can only toggle CSS classes expressed as strings, got ${value}`);\n  }\n}\n\nfunction setMapValues(\n    map: {[key: string]: any}, key: string, value: any, parseOutUnits: boolean,\n    allowSubKeys: boolean) {\n  if (allowSubKeys && key.indexOf(' ') > 0) {\n    const innerKeys = key.split(/\\s+/g);\n    for (let j = 0; j < innerKeys.length; j++) {\n      setIndividualMapValue(map, innerKeys[j], value, parseOutUnits);\n    }\n  } else {\n    setIndividualMapValue(map, key, value, parseOutUnits);\n  }\n}\n\nfunction setIndividualMapValue(\n    map: {[key: string]: any}, key: string, value: any, parseOutUnits: boolean) {\n  if (parseOutUnits) {\n    const values = normalizeStyleKeyAndValue(key, value);\n    value = values.value;\n    key = values.key;\n  }\n  map[key] = value;\n}\n\nfunction normalizeStyleKeyAndValue(key: string, value: string | null) {\n  const index = key.indexOf('.');\n  if (index > 0) {\n    const unit = key.substr(index + 1);  // ignore the . ([width.px]=\"'40'\" => \"40px\")\n    key = key.substring(0, index);\n    if (value != null) {  // we should not convert null values to string\n      value += unit;\n    }\n  }\n  return {key, value};\n}\n\nfunction mapHasChanged(keys: string[], a: {[key: string]: any}, b: {[key: string]: any}) {\n  const oldKeys = Object.keys(a);\n  const newKeys = keys;\n\n  // the keys are different which means the map changed\n  if (!arrayEqualsArray(oldKeys, newKeys)) {\n    return true;\n  }\n\n  for (let i = 0; i < newKeys.length; i++) {\n    const key = newKeys[i];\n    if (a[key] !== b[key]) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction arrayEqualsArray(a: any[] | null, b: any[] | null) {\n  if (a && b) {\n    if (a.length !== b.length) return false;\n    for (let i = 0; i < a.length; i++) {\n      if (b.indexOf(a[i]) === -1) return false;\n    }\n    return true;\n  }\n  return false;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ElementRef, Injectable, IterableChanges, IterableDiffer, IterableDiffers, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Renderer2, ÉµisListLikeIterable as isListLikeIterable, Éµstringify as stringify} from '@angular/core';\n\nimport {StylingDiffer, StylingDifferOptions} from './styling_differ';\n\n/**\n * Used as a token for an injected service within the NgClass directive.\n *\n * NgClass behaves differenly whether or not VE is being used or not. If\n * present then the legacy ngClass diffing algorithm will be used as an\n * injected service. Otherwise the new diffing algorithm (which delegates\n * to the `[class]` binding) will be used. This toggle behavior is done so\n * via the ivy_switch mechanism.\n */\nexport abstract class NgClassImpl {\n  abstract setClass(value: string): void;\n  abstract setNgClass(value: string|string[]|Set<string>|{[klass: string]: any}): void;\n  abstract applyChanges(): void;\n  abstract getValue(): {[key: string]: any}|null;\n}\n\n@Injectable()\nexport class NgClassR2Impl implements NgClassImpl {\n  // TODO(issue/24571): remove '!'.\n  private _iterableDiffer !: IterableDiffer<string>| null;\n  // TODO(issue/24571): remove '!'.\n  private _keyValueDiffer !: KeyValueDiffer<string, any>| null;\n  private _initialClasses: string[] = [];\n  // TODO(issue/24571): remove '!'.\n  private _rawClass !: string[] | Set<string>| {[klass: string]: any};\n\n  constructor(\n      private _iterableDiffers: IterableDiffers, private _keyValueDiffers: KeyValueDiffers,\n      private _ngEl: ElementRef, private _renderer: Renderer2) {}\n\n  getValue() { return null; }\n\n  setClass(value: string) {\n    this._removeClasses(this._initialClasses);\n    this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n    this._applyClasses(this._initialClasses);\n    this._applyClasses(this._rawClass);\n  }\n\n  setNgClass(value: string) {\n    this._removeClasses(this._rawClass);\n    this._applyClasses(this._initialClasses);\n\n    this._iterableDiffer = null;\n    this._keyValueDiffer = null;\n\n    this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n\n    if (this._rawClass) {\n      if (isListLikeIterable(this._rawClass)) {\n        this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n      } else {\n        this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n      }\n    }\n  }\n\n  applyChanges() {\n    if (this._iterableDiffer) {\n      const iterableChanges = this._iterableDiffer.diff(this._rawClass as string[]);\n      if (iterableChanges) {\n        this._applyIterableChanges(iterableChanges);\n      }\n    } else if (this._keyValueDiffer) {\n      const keyValueChanges = this._keyValueDiffer.diff(this._rawClass as{[k: string]: any});\n      if (keyValueChanges) {\n        this._applyKeyValueChanges(keyValueChanges);\n      }\n    }\n  }\n\n  private _applyKeyValueChanges(changes: KeyValueChanges<string, any>): void {\n    changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue));\n    changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue));\n    changes.forEachRemovedItem((record) => {\n      if (record.previousValue) {\n        this._toggleClass(record.key, false);\n      }\n    });\n  }\n\n  private _applyIterableChanges(changes: IterableChanges<string>): void {\n    changes.forEachAddedItem((record) => {\n      if (typeof record.item === 'string') {\n        this._toggleClass(record.item, true);\n      } else {\n        throw new Error(\n            `NgClass can only toggle CSS classes expressed as strings, got ${stringify(record.item)}`);\n      }\n    });\n\n    changes.forEachRemovedItem((record) => this._toggleClass(record.item, false));\n  }\n\n  /**\n   * Applies a collection of CSS classes to the DOM element.\n   *\n   * For argument of type Set and Array CSS class names contained in those collections are always\n   * added.\n   * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n   * for truthy and removed for falsy).\n   */\n  private _applyClasses(rawClassVal: string[]|Set<string>|{[klass: string]: any}) {\n    if (rawClassVal) {\n      if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n        (<any>rawClassVal).forEach((klass: string) => this._toggleClass(klass, true));\n      } else {\n        Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));\n      }\n    }\n  }\n\n  /**\n   * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n   * purposes.\n   */\n  private _removeClasses(rawClassVal: string[]|Set<string>|{[klass: string]: any}) {\n    if (rawClassVal) {\n      if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n        (<any>rawClassVal).forEach((klass: string) => this._toggleClass(klass, false));\n      } else {\n        Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n      }\n    }\n  }\n\n  private _toggleClass(klass: string, enabled: boolean): void {\n    klass = klass.trim();\n    if (klass) {\n      klass.split(/\\s+/g).forEach(klass => {\n        if (enabled) {\n          this._renderer.addClass(this._ngEl.nativeElement, klass);\n        } else {\n          this._renderer.removeClass(this._ngEl.nativeElement, klass);\n        }\n      });\n    }\n  }\n}\n\n@Injectable()\nexport class NgClassR3Impl implements NgClassImpl {\n  private _value: {[key: string]: boolean}|null = null;\n  private _ngClassDiffer = new StylingDiffer<{[key: string]: boolean}|null>(\n      'NgClass', StylingDifferOptions.TrimProperties|\n                 StylingDifferOptions.AllowSubKeys|\n                 StylingDifferOptions.AllowStringValue|StylingDifferOptions.ForceAsMap);\n  private _classStringDiffer: StylingDiffer<{[key: string]: boolean}>|null = null;\n\n  getValue() { return this._value; }\n\n  setClass(value: string) {\n    // early exit incase the binding gets emitted as an empty value which\n    // means there is no reason to instantiate and diff the values...\n    if (!value && !this._classStringDiffer) return;\n\n    this._classStringDiffer = this._classStringDiffer ||\n        new StylingDiffer('class',\n                          StylingDifferOptions.AllowStringValue | StylingDifferOptions.ForceAsMap);\n    this._classStringDiffer.setValue(value);\n  }\n\n  setNgClass(value: string|string[]|Set<string>|{[klass: string]: any}) {\n    this._ngClassDiffer.setValue(value);\n  }\n\n  applyChanges() {\n    const classChanged =\n        this._classStringDiffer ? this._classStringDiffer.hasValueChanged() : false;\n    const ngClassChanged = this._ngClassDiffer.hasValueChanged();\n    if (classChanged || ngClassChanged) {\n      let value = this._ngClassDiffer.value;\n      if (this._classStringDiffer) {\n        let classValue = this._classStringDiffer.value;\n        if (classValue) {\n          value = value ? {...classValue, ...value} : classValue;\n        }\n      }\n      this._value = value;\n    }\n  }\n}\n\n// the implementation for both NgStyleR2Impl and NgStyleR3Impl are\n// not ivy_switch'd away, instead they are only hooked up into the\n// DI via NgStyle's directive's provider property.\nexport const NgClassImplProvider__PRE_R3__ = {\n  provide: NgClassImpl,\n  useClass: NgClassR2Impl\n};\n\nexport const NgClassImplProvider__POST_R3__ = {\n  provide: NgClassImpl,\n  useClass: NgClassR3Impl\n};\n\nexport const NgClassImplProvider = NgClassImplProvider__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directive, DoCheck, Input, ÉµRenderFlags, ÉµÉµallocHostVars, ÉµÉµclassMap, ÉµÉµdefineDirective, ÉµÉµstyling, ÉµÉµstylingApply} from '@angular/core';\n\nimport {NgClassImpl, NgClassImplProvider} from './ng_class_impl';\n\n\n\n/*\n * NgClass (as well as NgStyle) behaves differently when loaded in the VE and when not.\n *\n * If the VE is present (which is for older versions of Angular) then NgClass will inject\n * the legacy diffing algorithm as a service and delegate all styling changes to that.\n *\n * If the VE is not present then NgStyle will normalize (through the injected service) and\n * then write all styling changes to the `[style]` binding directly (through a host binding).\n * Then Angular will notice the host binding change and treat the changes as styling\n * changes and apply them via the core styling instructions that exist within Angular.\n */\n\n// used when the VE is present\nexport const ngClassDirectiveDef__PRE_R3__ = undefined;\n\n// used when the VE is not present (note the directive will\n// never be instantiated normally because it is apart of a\n// base class)\nexport const ngClassDirectiveDef__POST_R3__ = ÉµÉµdefineDirective({\n  type: function() {} as any,\n  selectors: null as any,\n  factory: () => {},\n  hostBindings: function(rf: ÉµRenderFlags, ctx: any, elIndex: number) {\n    if (rf & ÉµRenderFlags.Create) {\n      ÉµÉµallocHostVars(1);\n      ÉµÉµstyling();\n    }\n    if (rf & ÉµRenderFlags.Update) {\n      ÉµÉµclassMap(ctx.getValue());\n      ÉµÉµstylingApply();\n    }\n  }\n});\n\nexport const ngClassDirectiveDef = ngClassDirectiveDef__PRE_R3__;\n\n/**\n * Serves as the base non-VE container for NgClass.\n *\n * While this is a base class that NgClass extends from, the\n * class itself acts as a container for non-VE code to setup\n * a link to the `[class]` host binding (via the static\n * `ngDirectiveDef` property on the class).\n *\n * Note that the `ngDirectiveDef` property's code is switched\n * depending if VE is present or not (this allows for the\n * binding code to be set only for newer versions of Angular).\n *\n * @publicApi\n */\nexport class NgClassBase {\n  static ngDirectiveDef: any = ngClassDirectiveDef;\n\n  constructor(protected _delegate: NgClassImpl) {}\n\n  getValue() { return this._delegate.getValue(); }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n *     <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n *     <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n *     <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n *              evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\n@Directive({selector: '[ngClass]', providers: [NgClassImplProvider]})\nexport class NgClass extends NgClassBase implements DoCheck {\n  constructor(delegate: NgClassImpl) { super(delegate); }\n\n  @Input('class')\n  set klass(value: string) { this._delegate.setClass(value); }\n\n  @Input('ngClass')\n  set ngClass(value: string|string[]|Set<string>|{[klass: string]: any}) {\n    this._delegate.setNgClass(value);\n  }\n\n  ngDoCheck() { this._delegate.applyChanges(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef, Directive, Injector, Input, NgModuleFactory, NgModuleRef, OnChanges, OnDestroy, SimpleChanges, StaticProvider, Type, ViewContainerRef} from '@angular/core';\n\n\n/**\n * Instantiates a single {@link Component} type and inserts its Host View into current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will get destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if exists.\n *\n * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other\n * module, then load a component from that module.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   injector: injectorExpression;\n *                                   content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized ngModuleFactory\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   ngModuleFactory: moduleFactory;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\n@Directive({selector: '[ngComponentOutlet]'})\nexport class NgComponentOutlet implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutlet !: Type<any>;\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletInjector !: Injector;\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletContent !: any[][];\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletNgModuleFactory !: NgModuleFactory<any>;\n\n  private _componentRef: ComponentRef<any>|null = null;\n  private _moduleRef: NgModuleRef<any>|null = null;\n\n  constructor(private _viewContainerRef: ViewContainerRef) {}\n\n  ngOnChanges(changes: SimpleChanges) {\n    this._viewContainerRef.clear();\n    this._componentRef = null;\n\n    if (this.ngComponentOutlet) {\n      const elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n\n      if (changes['ngComponentOutletNgModuleFactory']) {\n        if (this._moduleRef) this._moduleRef.destroy();\n\n        if (this.ngComponentOutletNgModuleFactory) {\n          const parentModule = elInjector.get(NgModuleRef);\n          this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);\n        } else {\n          this._moduleRef = null;\n        }\n      }\n\n      const componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :\n                                                         elInjector.get(ComponentFactoryResolver);\n\n      const componentFactory =\n          componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);\n\n      this._componentRef = this._viewContainerRef.createComponent(\n          componentFactory, this._viewContainerRef.length, elInjector,\n          this.ngComponentOutletContent);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this._moduleRef) this._moduleRef.destroy();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class NgForOfContext<T> {\n  constructor(\n      public $implicit: T, public ngForOf: NgIterable<T>, public index: number,\n      public count: number) {}\n\n  get first(): boolean { return this.index === 0; }\n\n  get last(): boolean { return this.index === this.count - 1; }\n\n  get even(): boolean { return this.index % 2 === 0; }\n\n  get odd(): boolean { return !this.even; }\n}\n\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n *   <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-structural-directive-per-host-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For futher discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n *  ```\n * <li *ngFor=\"let user of userObservable | async as users; index as i; first as isFirst\">\n *    {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({selector: '[ngFor][ngForOf]'})\nexport class NgForOf<T> implements DoCheck {\n  /**\n   * The value of the iterable expression, which can be used as a\n   * [template input variable](guide/structural-directives#template-input-variable).\n   */\n  @Input()\n  set ngForOf(ngForOf: NgIterable<T>) {\n    this._ngForOf = ngForOf;\n    this._ngForOfDirty = true;\n  }\n  /**\n   * A function that defines how to track changes for items in the iterable.\n   *\n   * When items are added, moved, or removed in the iterable,\n   * the directive must re-render the appropriate DOM nodes.\n   * To minimize churn in the DOM, only nodes that have changed\n   * are re-rendered.\n   *\n   * By default, the change detector assumes that\n   * the object instance identifies the node in the iterable.\n   * When this function is supplied, the directive uses\n   * the result of calling this function to identify the item node,\n   * rather than the identity of the object itself.\n   *\n   * The function receives two inputs,\n   * the iteration index and the node object ID.\n   */\n  @Input()\n  set ngForTrackBy(fn: TrackByFunction<T>) {\n    if (isDevMode() && fn != null && typeof fn !== 'function') {\n      // TODO(vicb): use a log service once there is a public one available\n      if (<any>console && <any>console.warn) {\n        console.warn(\n            `trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n            `See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.`);\n      }\n    }\n    this._trackByFn = fn;\n  }\n\n  get ngForTrackBy(): TrackByFunction<T> { return this._trackByFn; }\n\n  // TODO(issue/24571): remove '!'.\n  private _ngForOf !: NgIterable<T>;\n  private _ngForOfDirty: boolean = true;\n  private _differ: IterableDiffer<T>|null = null;\n  // TODO(issue/24571): remove '!'.\n  private _trackByFn !: TrackByFunction<T>;\n\n  constructor(\n      private _viewContainer: ViewContainerRef, private _template: TemplateRef<NgForOfContext<T>>,\n      private _differs: IterableDiffers) {}\n\n  /**\n   * A reference to the template that is stamped out for each item in the iterable.\n   * @see [template reference variable](guide/template-syntax#template-reference-variables--var-)\n   */\n  @Input()\n  set ngForTemplate(value: TemplateRef<NgForOfContext<T>>) {\n    // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n    // The current type is too restrictive; a template that just uses index, for example,\n    // should be acceptable.\n    if (value) {\n      this._template = value;\n    }\n  }\n\n  /**\n   * Applies the changes when needed.\n   */\n  ngDoCheck(): void {\n    if (this._ngForOfDirty) {\n      this._ngForOfDirty = false;\n      // React on ngForOf changes only once all inputs have been initialized\n      const value = this._ngForOf;\n      if (!this._differ && value) {\n        try {\n          this._differ = this._differs.find(value).create(this.ngForTrackBy);\n        } catch {\n          throw new Error(\n              `Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);\n        }\n      }\n    }\n    if (this._differ) {\n      const changes = this._differ.diff(this._ngForOf);\n      if (changes) this._applyChanges(changes);\n    }\n  }\n\n  private _applyChanges(changes: IterableChanges<T>) {\n    const insertTuples: RecordViewTuple<T>[] = [];\n    changes.forEachOperation(\n        (item: IterableChangeRecord<any>, adjustedPreviousIndex: number | null,\n         currentIndex: number | null) => {\n          if (item.previousIndex == null) {\n            const view = this._viewContainer.createEmbeddedView(\n                this._template, new NgForOfContext<T>(null !, this._ngForOf, -1, -1),\n                currentIndex === null ? undefined : currentIndex);\n            const tuple = new RecordViewTuple<T>(item, view);\n            insertTuples.push(tuple);\n          } else if (currentIndex == null) {\n            this._viewContainer.remove(\n                adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n          } else if (adjustedPreviousIndex !== null) {\n            const view = this._viewContainer.get(adjustedPreviousIndex) !;\n            this._viewContainer.move(view, currentIndex);\n            const tuple = new RecordViewTuple(item, <EmbeddedViewRef<NgForOfContext<T>>>view);\n            insertTuples.push(tuple);\n          }\n        });\n\n    for (let i = 0; i < insertTuples.length; i++) {\n      this._perViewChange(insertTuples[i].view, insertTuples[i].record);\n    }\n\n    for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) {\n      const viewRef = <EmbeddedViewRef<NgForOfContext<T>>>this._viewContainer.get(i);\n      viewRef.context.index = i;\n      viewRef.context.count = ilen;\n      viewRef.context.ngForOf = this._ngForOf;\n    }\n\n    changes.forEachIdentityChange((record: any) => {\n      const viewRef =\n          <EmbeddedViewRef<NgForOfContext<T>>>this._viewContainer.get(record.currentIndex);\n      viewRef.context.$implicit = record.item;\n    });\n  }\n\n  private _perViewChange(\n      view: EmbeddedViewRef<NgForOfContext<T>>, record: IterableChangeRecord<any>) {\n    view.context.$implicit = record.item;\n  }\n\n  /**\n   * Asserts the correct type of the context for the template that `NgForOf` will render.\n   *\n   * The presence of this method is a signal to the Ivy template type-check compiler that the\n   * `NgForOf` structural directive renders its template with a specific context type.\n   */\n  static ngTemplateContextGuard<T>(dir: NgForOf<T>, ctx: any): ctx is NgForOfContext<T> {\n    return true;\n  }\n}\n\nclass RecordViewTuple<T> {\n  constructor(public record: any, public view: EmbeddedViewRef<NgForOfContext<T>>) {}\n}\n\nfunction getTypeName(type: any): string {\n  return type['name'] || typeof type;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, Éµstringify as stringify} from '@angular/core';\n\n\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when  false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following  example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>`  element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * [safe-navigation-operator](guide/template-syntax#safe-navigation-operator) (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n *  ...\n * </div>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"hero-list\" [ngIfElse]=\"loading\">\n *  <div class=\"hero-list\">\n *   ...\n *  </div>\n * </ng-template>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({selector: '[ngIf]'})\nexport class NgIf {\n  private _context: NgIfContext = new NgIfContext();\n  private _thenTemplateRef: TemplateRef<NgIfContext>|null = null;\n  private _elseTemplateRef: TemplateRef<NgIfContext>|null = null;\n  private _thenViewRef: EmbeddedViewRef<NgIfContext>|null = null;\n  private _elseViewRef: EmbeddedViewRef<NgIfContext>|null = null;\n\n  constructor(private _viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext>) {\n    this._thenTemplateRef = templateRef;\n  }\n\n  /**\n   * The Boolean expression to evaluate as the condition for showing a template.\n   */\n  @Input()\n  set ngIf(condition: any) {\n    this._context.$implicit = this._context.ngIf = condition;\n    this._updateView();\n  }\n\n  /**\n   * A template to show if the condition expression evaluates to true.\n   */\n  @Input()\n  set ngIfThen(templateRef: TemplateRef<NgIfContext>|null) {\n    assertTemplate('ngIfThen', templateRef);\n    this._thenTemplateRef = templateRef;\n    this._thenViewRef = null;  // clear previous view if any.\n    this._updateView();\n  }\n\n  /**\n   * A template to show if the condition expression evaluates to false.\n   */\n  @Input()\n  set ngIfElse(templateRef: TemplateRef<NgIfContext>|null) {\n    assertTemplate('ngIfElse', templateRef);\n    this._elseTemplateRef = templateRef;\n    this._elseViewRef = null;  // clear previous view if any.\n    this._updateView();\n  }\n\n  private _updateView() {\n    if (this._context.$implicit) {\n      if (!this._thenViewRef) {\n        this._viewContainer.clear();\n        this._elseViewRef = null;\n        if (this._thenTemplateRef) {\n          this._thenViewRef =\n              this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n        }\n      }\n    } else {\n      if (!this._elseViewRef) {\n        this._viewContainer.clear();\n        this._thenViewRef = null;\n        if (this._elseTemplateRef) {\n          this._elseViewRef =\n              this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n        }\n      }\n    }\n  }\n\n  /** @internal */\n  public static ngIfUseIfTypeGuard: void;\n\n  /**\n   * Assert the correct type of the expression bound to the `ngIf` input within the template.\n   *\n   * The presence of this static field is a signal to the Ivy template type check compiler that\n   * when the `NgIf` structural directive renders its template, the type of the expression bound\n   * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to\n   * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.\n   */\n  static ngTemplateGuard_ngIf: 'binding';\n}\n\n/**\n * @publicApi\n */\nexport class NgIfContext {\n  public $implicit: any = null;\n  public ngIf: any = null;\n}\n\nfunction assertTemplate(property: string, templateRef: TemplateRef<any>| null): void {\n  const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n  if (!isTemplateRefOrNull) {\n    throw new Error(`${property} must be a TemplateRef, but received '${stringify(templateRef)}'.`);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, DoCheck, Host, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nexport class SwitchView {\n  private _created = false;\n\n  constructor(\n      private _viewContainerRef: ViewContainerRef, private _templateRef: TemplateRef<Object>) {}\n\n  create(): void {\n    this._created = true;\n    this._viewContainerRef.createEmbeddedView(this._templateRef);\n  }\n\n  destroy(): void {\n    this._created = false;\n    this._viewContainerRef.clear();\n  }\n\n  enforceState(created: boolean) {\n    if (created && !this._created) {\n      this.create();\n    } else if (!created && this._created) {\n      this.destroy();\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description A structural directive that adds or removes templates (displaying or hiding views)\n * when the next match expression matches the switch expression.\n *\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *    <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n *    <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <!-- the same view can be shown in more than one case -->\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *   <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *   <!--default case when there are no matches -->\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *       <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *       <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *       <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *       <ng-container *ngSwitchCase=\"match_expression_3\">\n *         <!-- use a ng-container to group multiple root nodes -->\n *         <inner-element></inner-element>\n *         <inner-other-element></inner-other-element>\n *       </ng-container>\n *       <some-element *ngSwitchDefault>...</some-element>\n *     </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\n@Directive({selector: '[ngSwitch]'})\nexport class NgSwitch {\n  // TODO(issue/24571): remove '!'.\n  private _defaultViews !: SwitchView[];\n  private _defaultUsed = false;\n  private _caseCount = 0;\n  private _lastCaseCheckIndex = 0;\n  private _lastCasesMatched = false;\n  private _ngSwitch: any;\n\n  @Input()\n  set ngSwitch(newValue: any) {\n    this._ngSwitch = newValue;\n    if (this._caseCount === 0) {\n      this._updateDefaultCases(true);\n    }\n  }\n\n  /** @internal */\n  _addCase(): number { return this._caseCount++; }\n\n  /** @internal */\n  _addDefault(view: SwitchView) {\n    if (!this._defaultViews) {\n      this._defaultViews = [];\n    }\n    this._defaultViews.push(view);\n  }\n\n  /** @internal */\n  _matchCase(value: any): boolean {\n    const matched = value == this._ngSwitch;\n    this._lastCasesMatched = this._lastCasesMatched || matched;\n    this._lastCaseCheckIndex++;\n    if (this._lastCaseCheckIndex === this._caseCount) {\n      this._updateDefaultCases(!this._lastCasesMatched);\n      this._lastCaseCheckIndex = 0;\n      this._lastCasesMatched = false;\n    }\n    return matched;\n  }\n\n  private _updateDefaultCases(useDefault: boolean) {\n    if (this._defaultViews && useDefault !== this._defaultUsed) {\n      this._defaultUsed = useDefault;\n      for (let i = 0; i < this._defaultViews.length; i++) {\n        const defaultView = this._defaultViews[i];\n        defaultView.enforceState(useDefault);\n      }\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   ...\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\n@Directive({selector: '[ngSwitchCase]'})\nexport class NgSwitchCase implements DoCheck {\n  private _view: SwitchView;\n  /**\n   * Stores the HTML template to be selected on match.\n   */\n  @Input()\n  ngSwitchCase: any;\n\n  constructor(\n      viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>,\n      @Host() private ngSwitch: NgSwitch) {\n    ngSwitch._addCase();\n    this._view = new SwitchView(viewContainer, templateRef);\n  }\n\n  /**\n   * Performs case matching. For internal use only.\n   */\n  ngDoCheck() { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\n@Directive({selector: '[ngSwitchDefault]'})\nexport class NgSwitchDefault {\n  constructor(\n      viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>,\n      @Host() ngSwitch: NgSwitch) {\n    ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, Directive, Host, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nimport {NgLocalization, getPluralCategory} from '../i18n/localization';\n\nimport {SwitchView} from './ng_switch';\n\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n *   <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n *   <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n *   matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n *   value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\n@Directive({selector: '[ngPlural]'})\nexport class NgPlural {\n  // TODO(issue/24571): remove '!'.\n  private _switchValue !: number;\n  // TODO(issue/24571): remove '!'.\n  private _activeView !: SwitchView;\n  private _caseViews: {[k: string]: SwitchView} = {};\n\n  constructor(private _localization: NgLocalization) {}\n\n  @Input()\n  set ngPlural(value: number) {\n    this._switchValue = value;\n    this._updateView();\n  }\n\n  addCase(value: string, switchView: SwitchView): void { this._caseViews[value] = switchView; }\n\n  private _updateView(): void {\n    this._clearViews();\n\n    const cases = Object.keys(this._caseViews);\n    const key = getPluralCategory(this._switchValue, cases, this._localization);\n    this._activateView(this._caseViews[key]);\n  }\n\n  private _clearViews() {\n    if (this._activeView) this._activeView.destroy();\n  }\n\n  private _activateView(view: SwitchView) {\n    if (view) {\n      this._activeView = view;\n      this._activeView.create();\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">...</ng-template>\n *   <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\n@Directive({selector: '[ngPluralCase]'})\nexport class NgPluralCase {\n  constructor(\n      @Attribute('ngPluralCase') public value: string, template: TemplateRef<Object>,\n      viewContainer: ViewContainerRef, @Host() ngPlural: NgPlural) {\n    const isANumber: boolean = !isNaN(Number(value));\n    ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ElementRef, Injectable, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Renderer2} from '@angular/core';\n\nimport {StylingDiffer, StylingDifferOptions} from './styling_differ';\n\n/**\n * Used as a token for an injected service within the NgStyle directive.\n *\n * NgStyle behaves differenly whether or not VE is being used or not. If\n * present then the legacy ngClass diffing algorithm will be used as an\n * injected service. Otherwise the new diffing algorithm (which delegates\n * to the `[style]` binding) will be used. This toggle behavior is done so\n * via the ivy_switch mechanism.\n */\nexport abstract class NgStyleImpl {\n  abstract getValue(): {[key: string]: any}|null;\n  abstract setNgStyle(value: {[key: string]: any}|null): void;\n  abstract applyChanges(): void;\n}\n\n@Injectable()\nexport class NgStyleR2Impl implements NgStyleImpl {\n  // TODO(issue/24571): remove '!'.\n  private _ngStyle !: {[key: string]: string};\n  // TODO(issue/24571): remove '!'.\n  private _differ !: KeyValueDiffer<string, string|number>;\n\n  constructor(\n      private _ngEl: ElementRef, private _differs: KeyValueDiffers, private _renderer: Renderer2) {}\n\n  getValue() { return null; }\n\n  /**\n   * A map of style properties, specified as colon-separated\n   * key-value pairs.\n   * * The key is a style name, with an optional `.<unit>` suffix\n   *    (such as 'top.px', 'font-style.em').\n   * * The value is an expression to be evaluated.\n   */\n  setNgStyle(values: {[key: string]: string}) {\n    this._ngStyle = values;\n    if (!this._differ && values) {\n      this._differ = this._differs.find(values).create();\n    }\n  }\n\n  /**\n   * Applies the new styles if needed.\n   */\n  applyChanges() {\n    if (this._differ) {\n      const changes = this._differ.diff(this._ngStyle);\n      if (changes) {\n        this._applyChanges(changes);\n      }\n    }\n  }\n\n  private _applyChanges(changes: KeyValueChanges<string, string|number>): void {\n    changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n    changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n    changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n  }\n\n  private _setStyle(nameAndUnit: string, value: string|number|null|undefined): void {\n    const [name, unit] = nameAndUnit.split('.');\n    value = value != null && unit ? `${value}${unit}` : value;\n\n    if (value != null) {\n      this._renderer.setStyle(this._ngEl.nativeElement, name, value as string);\n    } else {\n      this._renderer.removeStyle(this._ngEl.nativeElement, name);\n    }\n  }\n}\n\n@Injectable()\nexport class NgStyleR3Impl implements NgStyleImpl {\n  private _differ =\n      new StylingDiffer<{[key: string]: any}|null>('NgStyle', StylingDifferOptions.AllowUnits);\n\n  private _value: {[key: string]: any}|null = null;\n\n  getValue() { return this._value; }\n\n  setNgStyle(value: {[key: string]: any}|null) { this._differ.setValue(value); }\n\n  applyChanges() {\n    if (this._differ.hasValueChanged()) {\n      this._value = this._differ.value;\n    }\n  }\n}\n\n// the implementation for both NgClassR2Impl and NgClassR3Impl are\n// not ivy_switch'd away, instead they are only hooked up into the\n// DI via NgStyle's directive's provider property.\nexport const NgStyleImplProvider__PRE_R3__ = {\n  provide: NgStyleImpl,\n  useClass: NgStyleR2Impl\n};\n\nexport const NgStyleImplProvider__POST_R3__ = {\n  provide: NgStyleImpl,\n  useClass: NgStyleR3Impl\n};\n\nexport const NgStyleImplProvider = NgStyleImplProvider__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directive, DoCheck, Input, ÉµRenderFlags, ÉµÉµdefineDirective, ÉµÉµstyleMap, ÉµÉµstyling, ÉµÉµstylingApply} from '@angular/core';\n\nimport {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl';\n\n\n\n/*\n * NgStyle (as well as NgClass) behaves differently when loaded in the VE and when not.\n *\n * If the VE is present (which is for older versions of Angular) then NgStyle will inject\n * the legacy diffing algorithm as a service and delegate all styling changes to that.\n *\n * If the VE is not present then NgStyle will normalize (through the injected service) and\n * then write all styling changes to the `[style]` binding directly (through a host binding).\n * Then Angular will notice the host binding change and treat the changes as styling\n * changes and apply them via the core styling instructions that exist within Angular.\n */\n\n// used when the VE is present\nexport const ngStyleDirectiveDef__PRE_R3__ = undefined;\n\n// used when the VE is not present (note the directive will\n// never be instantiated normally because it is apart of a\n// base class)\nexport const ngStyleDirectiveDef__POST_R3__ = ÉµÉµdefineDirective({\n  type: function() {} as any,\n  selectors: null as any,\n  factory: () => {},\n  hostBindings: function(rf: ÉµRenderFlags, ctx: any, elIndex: number) {\n    if (rf & ÉµRenderFlags.Create) {\n      ÉµÉµstyling();\n    }\n    if (rf & ÉµRenderFlags.Update) {\n      ÉµÉµstyleMap(ctx.getValue());\n      ÉµÉµstylingApply();\n    }\n  }\n});\n\nexport const ngStyleDirectiveDef = ngStyleDirectiveDef__PRE_R3__;\n\n/**\n * Serves as the base non-VE container for NgStyle.\n *\n * While this is a base class that NgStyle extends from, the\n * class itself acts as a container for non-VE code to setup\n * a link to the `[style]` host binding (via the static\n * `ngDirectiveDef` property on the class).\n *\n * Note that the `ngDirectiveDef` property's code is switched\n * depending if VE is present or not (this allows for the\n * binding code to be set only for newer versions of Angular).\n *\n * @publicApi\n */\nexport class NgStyleBase {\n  static ngDirectiveDef: any = ngStyleDirectiveDef;\n\n  constructor(protected _delegate: NgStyleImpl) {}\n\n  getValue() { return this._delegate.getValue(); }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\n@Directive({selector: '[ngStyle]', providers: [NgStyleImplProvider]})\nexport class NgStyle extends NgStyleBase implements DoCheck {\n  constructor(delegate: NgStyleImpl) { super(delegate); }\n\n  @Input('ngStyle')\n  set ngStyle(value: {[klass: string]: any}|null) { this._delegate.setNgStyle(value); }\n\n  ngDoCheck() { this._delegate.applyChanges(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EmbeddedViewRef, Input, OnChanges, SimpleChange, SimpleChanges, TemplateRef, ViewContainerRef} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\n@Directive({selector: '[ngTemplateOutlet]'})\nexport class NgTemplateOutlet implements OnChanges {\n  private _viewRef: EmbeddedViewRef<any>|null = null;\n\n  /**\n   * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n   * object, the object's keys will be available for binding by the local template `let`\n   * declarations.\n   * Using the key `$implicit` in the context object will set its value as default.\n   */\n  @Input() public ngTemplateOutletContext: Object|null = null;\n\n  /**\n   * A string defining the template reference and optionally the context object for the template.\n   */\n  @Input() public ngTemplateOutlet: TemplateRef<any>|null = null;\n\n  constructor(private _viewContainerRef: ViewContainerRef) {}\n\n  ngOnChanges(changes: SimpleChanges) {\n    const recreateView = this._shouldRecreateView(changes);\n\n    if (recreateView) {\n      if (this._viewRef) {\n        this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef));\n      }\n\n      if (this.ngTemplateOutlet) {\n        this._viewRef = this._viewContainerRef.createEmbeddedView(\n            this.ngTemplateOutlet, this.ngTemplateOutletContext);\n      }\n    } else {\n      if (this._viewRef && this.ngTemplateOutletContext) {\n        this._updateExistingContext(this.ngTemplateOutletContext);\n      }\n    }\n  }\n\n  /**\n   * We need to re-create existing embedded view if:\n   * - templateRef has changed\n   * - context has changes\n   *\n   * We mark context object as changed when the corresponding object\n   * shape changes (new properties are added or existing properties are removed).\n   * In other words we consider context with the same properties as \"the same\" even\n   * if object reference changes (see https://github.com/angular/angular/issues/13407).\n   */\n  private _shouldRecreateView(changes: SimpleChanges): boolean {\n    const ctxChange = changes['ngTemplateOutletContext'];\n    return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n  }\n\n  private _hasContextShapeChanged(ctxChange: SimpleChange): boolean {\n    const prevCtxKeys = Object.keys(ctxChange.previousValue || {});\n    const currCtxKeys = Object.keys(ctxChange.currentValue || {});\n\n    if (prevCtxKeys.length === currCtxKeys.length) {\n      for (let propName of currCtxKeys) {\n        if (prevCtxKeys.indexOf(propName) === -1) {\n          return true;\n        }\n      }\n      return false;\n    } else {\n      return true;\n    }\n  }\n\n  private _updateExistingContext(ctx: Object): void {\n    for (let propName of Object.keys(ctx)) {\n      (<any>this._viewRef !.context)[propName] = (<any>this.ngTemplateOutletContext)[propName];\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Provider} from '@angular/core';\nimport {NgClass, NgClassBase} from './ng_class';\nimport {NgComponentOutlet} from './ng_component_outlet';\nimport {NgForOf, NgForOfContext} from './ng_for_of';\nimport {NgIf, NgIfContext} from './ng_if';\nimport {NgPlural, NgPluralCase} from './ng_plural';\nimport {NgStyle, NgStyleBase} from './ng_style';\nimport {NgSwitch, NgSwitchCase, NgSwitchDefault} from './ng_switch';\nimport {NgTemplateOutlet} from './ng_template_outlet';\n\nexport {\n  NgClass,\n  NgClassBase,\n  NgComponentOutlet,\n  NgForOf,\n  NgForOfContext,\n  NgIf,\n  NgIfContext,\n  NgPlural,\n  NgPluralCase,\n  NgStyle,\n  NgStyleBase,\n  NgSwitch,\n  NgSwitchCase,\n  NgSwitchDefault,\n  NgTemplateOutlet,\n};\n\n\n\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nexport const COMMON_DIRECTIVES: Provider[] = [\n  NgClass,\n  NgComponentOutlet,\n  NgForOf,\n  NgIf,\n  NgTemplateOutlet,\n  NgStyle,\n  NgSwitch,\n  NgSwitchCase,\n  NgSwitchDefault,\n  NgPlural,\n  NgPluralCase,\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, Éµstringify as stringify} from '@angular/core';\n\nexport function invalidPipeArgumentError(type: Type<any>, value: Object) {\n  return Error(`InvalidPipeArgument: '${value}' for pipe '${stringify(type)}'`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NumberFormatStyle} from '../../i18n/locale_data_api';\n\nexport class NumberFormatter {\n  static format(num: number, locale: string, style: NumberFormatStyle, opts: {\n    minimumIntegerDigits?: number,\n    minimumFractionDigits?: number,\n    maximumFractionDigits?: number,\n    currency?: string|null,\n    currencyAsSymbol?: boolean\n  } = {}): string {\n    const {minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, currency,\n           currencyAsSymbol = false} = opts;\n    const options: Intl.NumberFormatOptions = {\n      minimumIntegerDigits,\n      minimumFractionDigits,\n      maximumFractionDigits,\n      style: NumberFormatStyle[style].toLowerCase()\n    };\n\n    if (style == NumberFormatStyle.Currency) {\n      options.currency = typeof currency == 'string' ? currency : undefined;\n      options.currencyDisplay = currencyAsSymbol ? 'symbol' : 'code';\n    }\n    return new Intl.NumberFormat(locale, options).format(num);\n  }\n}\n\ntype DateFormatterFn = (date: Date, locale: string) => string;\n\nconst DATE_FORMATS_SPLIT =\n    /((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/;\n\nconst PATTERN_ALIASES: {[format: string]: DateFormatterFn} = {\n  // Keys are quoted so they do not get renamed during closure compilation.\n  'yMMMdjms': datePartGetterFactory(combine([\n    digitCondition('year', 1),\n    nameCondition('month', 3),\n    digitCondition('day', 1),\n    digitCondition('hour', 1),\n    digitCondition('minute', 1),\n    digitCondition('second', 1),\n  ])),\n  'yMdjm': datePartGetterFactory(combine([\n    digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1),\n    digitCondition('hour', 1), digitCondition('minute', 1)\n  ])),\n  'yMMMMEEEEd': datePartGetterFactory(combine([\n    digitCondition('year', 1), nameCondition('month', 4), nameCondition('weekday', 4),\n    digitCondition('day', 1)\n  ])),\n  'yMMMMd': datePartGetterFactory(\n      combine([digitCondition('year', 1), nameCondition('month', 4), digitCondition('day', 1)])),\n  'yMMMd': datePartGetterFactory(\n      combine([digitCondition('year', 1), nameCondition('month', 3), digitCondition('day', 1)])),\n  'yMd': datePartGetterFactory(\n      combine([digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1)])),\n  'jms': datePartGetterFactory(combine(\n      [digitCondition('hour', 1), digitCondition('second', 1), digitCondition('minute', 1)])),\n  'jm': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('minute', 1)]))\n};\n\nconst DATE_FORMATS: {[format: string]: DateFormatterFn} = {\n  // Keys are quoted so they do not get renamed.\n  'yyyy': datePartGetterFactory(digitCondition('year', 4)),\n  'yy': datePartGetterFactory(digitCondition('year', 2)),\n  'y': datePartGetterFactory(digitCondition('year', 1)),\n  'MMMM': datePartGetterFactory(nameCondition('month', 4)),\n  'MMM': datePartGetterFactory(nameCondition('month', 3)),\n  'MM': datePartGetterFactory(digitCondition('month', 2)),\n  'M': datePartGetterFactory(digitCondition('month', 1)),\n  'LLLL': datePartGetterFactory(nameCondition('month', 4)),\n  'L': datePartGetterFactory(nameCondition('month', 1)),\n  'dd': datePartGetterFactory(digitCondition('day', 2)),\n  'd': datePartGetterFactory(digitCondition('day', 1)),\n  'HH': digitModifier(\n      hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), false)))),\n  'H': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), false))),\n  'hh': digitModifier(\n      hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), true)))),\n  'h': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),\n  'jj': datePartGetterFactory(digitCondition('hour', 2)),\n  'j': datePartGetterFactory(digitCondition('hour', 1)),\n  'mm': digitModifier(datePartGetterFactory(digitCondition('minute', 2))),\n  'm': datePartGetterFactory(digitCondition('minute', 1)),\n  'ss': digitModifier(datePartGetterFactory(digitCondition('second', 2))),\n  's': datePartGetterFactory(digitCondition('second', 1)),\n  // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n  // we can be just safely rely on using `sss` since we currently don't support single or two digit\n  // fractions\n  'sss': datePartGetterFactory(digitCondition('second', 3)),\n  'EEEE': datePartGetterFactory(nameCondition('weekday', 4)),\n  'EEE': datePartGetterFactory(nameCondition('weekday', 3)),\n  'EE': datePartGetterFactory(nameCondition('weekday', 2)),\n  'E': datePartGetterFactory(nameCondition('weekday', 1)),\n  'a': hourClockExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),\n  'Z': timeZoneGetter('short'),\n  'z': timeZoneGetter('long'),\n  'ww': datePartGetterFactory({}),  // Week of year, padded (00-53). Week 01 is the week with the\n                                    // first Thursday of the year. not support ?\n  'w':\n      datePartGetterFactory({}),  // Week of year (0-53). Week 1 is the week with the first Thursday\n                                  // of the year not support ?\n  'G': datePartGetterFactory(nameCondition('era', 1)),\n  'GG': datePartGetterFactory(nameCondition('era', 2)),\n  'GGG': datePartGetterFactory(nameCondition('era', 3)),\n  'GGGG': datePartGetterFactory(nameCondition('era', 4))\n};\n\n\nfunction digitModifier(inner: DateFormatterFn): DateFormatterFn {\n  return function(date: Date, locale: string): string {\n    const result = inner(date, locale);\n    return result.length == 1 ? '0' + result : result;\n  };\n}\n\nfunction hourClockExtractor(inner: DateFormatterFn): DateFormatterFn {\n  return function(date: Date, locale: string): string { return inner(date, locale).split(' ')[1]; };\n}\n\nfunction hourExtractor(inner: DateFormatterFn): DateFormatterFn {\n  return function(date: Date, locale: string): string { return inner(date, locale).split(' ')[0]; };\n}\n\nfunction intlDateFormat(date: Date, locale: string, options: Intl.DateTimeFormatOptions): string {\n  return new Intl.DateTimeFormat(locale, options).format(date).replace(/[\\u200e\\u200f]/g, '');\n}\n\nfunction timeZoneGetter(timezone: string): DateFormatterFn {\n  // To workaround `Intl` API restriction for single timezone let format with 24 hours\n  const options = {hour: '2-digit', hour12: false, timeZoneName: timezone};\n  return function(date: Date, locale: string): string {\n    const result = intlDateFormat(date, locale, options);\n    // Then extract first 3 letters that related to hours\n    return result ? result.substring(3) : '';\n  };\n}\n\nfunction hour12Modify(\n    options: Intl.DateTimeFormatOptions, value: boolean): Intl.DateTimeFormatOptions {\n  options.hour12 = value;\n  return options;\n}\n\nfunction digitCondition(prop: string, len: number): Intl.DateTimeFormatOptions {\n  const result: {[k: string]: string} = {};\n  result[prop] = len === 2 ? '2-digit' : 'numeric';\n  return result;\n}\n\nfunction nameCondition(prop: string, len: number): Intl.DateTimeFormatOptions {\n  const result: {[k: string]: string} = {};\n  if (len < 4) {\n    result[prop] = len > 1 ? 'short' : 'narrow';\n  } else {\n    result[prop] = 'long';\n  }\n\n  return result;\n}\n\nfunction combine(options: Intl.DateTimeFormatOptions[]): Intl.DateTimeFormatOptions {\n  return options.reduce((merged, opt) => ({...merged, ...opt}), {});\n}\n\nfunction datePartGetterFactory(ret: Intl.DateTimeFormatOptions): DateFormatterFn {\n  return (date: Date, locale: string): string => intlDateFormat(date, locale, ret);\n}\n\nconst DATE_FORMATTER_CACHE = new Map<string, string[]>();\n\nfunction dateFormatter(format: string, date: Date, locale: string): string {\n  const fn = PATTERN_ALIASES[format];\n\n  if (fn) return fn(date, locale);\n\n  const cacheKey = format;\n  let parts = DATE_FORMATTER_CACHE.get(cacheKey);\n\n  if (!parts) {\n    parts = [];\n    let match: RegExpExecArray|null;\n    DATE_FORMATS_SPLIT.exec(format);\n\n    let _format: string|null = format;\n    while (_format) {\n      match = DATE_FORMATS_SPLIT.exec(_format);\n      if (match) {\n        parts = parts.concat(match.slice(1));\n        _format = parts.pop() !;\n      } else {\n        parts.push(_format);\n        _format = null;\n      }\n    }\n\n    DATE_FORMATTER_CACHE.set(cacheKey, parts);\n  }\n\n  return parts.reduce((text, part) => {\n    const fn = DATE_FORMATS[part];\n    return text + (fn ? fn(date, locale) : partToTime(part));\n  }, '');\n}\n\nfunction partToTime(part: string): string {\n  return part === '\\'\\'' ? '\\'' : part.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n}\n\nexport class DateFormatter {\n  static format(date: Date, locale: string, pattern: string): string {\n    return dateFormatter(pattern, date, locale);\n  }\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n  */\n\nimport {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {ISO8601_DATE_REGEX, isoStringToDate} from '../../i18n/format_date';\nimport {invalidPipeArgumentError} from '../invalid_pipe_argument_error';\nimport {DateFormatter} from './intl';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * Where:\n * - `expression` is a date object or a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * - `format` indicates which date/time components to include. The format can be predefined as\n *   shown below or custom as shown in the table.\n *   - `'medium'`: equivalent to `'yMMMdjms'` (e.g. `Sep 3, 2010, 12:05:08 PM` for `en-US`)\n *   - `'short'`: equivalent to `'yMdjm'` (e.g. `9/3/2010, 12:05 PM` for `en-US`)\n *   - `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. `Friday, September 3, 2010` for `en-US`)\n *   - `'longDate'`: equivalent to `'yMMMMd'` (e.g. `September 3, 2010` for `en-US`)\n *   - `'mediumDate'`: equivalent to `'yMMMd'` (e.g. `Sep 3, 2010` for `en-US`)\n *   - `'shortDate'`: equivalent to `'yMd'` (e.g. `9/3/2010` for `en-US`)\n *   - `'mediumTime'`: equivalent to `'jms'` (e.g. `12:05:08 PM` for `en-US`)\n *   - `'shortTime'`: equivalent to `'jm'` (e.g. `12:05 PM` for `en-US`)\n *\n *\n *  | Component | Symbol | Narrow | Short Form   | Long Form         | Numeric   | 2-digit   |\n *  |-----------|:------:|--------|--------------|-------------------|-----------|-----------|\n *  | era       |   G    | G (A)  | GGG (AD)     | GGGG (Anno Domini)| -         | -         |\n *  | year      |   y    | -      | -            | -                 | y (2015)  | yy (15)   |\n *  | month     |   M    | L (S)  | MMM (Sep)    | MMMM (September)  | M (9)     | MM (09)   |\n *  | day       |   d    | -      | -            | -                 | d (3)     | dd (03)   |\n *  | weekday   |   E    | E (S)  | EEE (Sun)    | EEEE (Sunday)     | -         | -         |\n *  | hour      |   j    | -      | -            | -                 | j (13)    | jj (13)   |\n *  | hour12    |   h    | -      | -            | -                 | h (1 PM)  | hh (01 PM)|\n *  | hour24    |   H    | -      | -            | -                 | H (13)    | HH (13)   |\n *  | minute    |   m    | -      | -            | -                 | m (5)     | mm (05)   |\n *  | second    |   s    | -      | -            | -                 | s (9)     | ss (09)   |\n *  | timezone  |   z    | -      | -            | z (Pacific Standard Time)| -  | -         |\n *  | timezone  |   Z    | -      | Z (GMT-8:00) | -                 | -         | -         |\n *  | timezone  |   a    | -      | a (PM)       | -                 | -         | -         |\n *\n * In javascript, only the components specified will be respected (not the ordering,\n * punctuations, ...) and details of the formatting will be dependent on the locale.\n *\n * Timezone of the formatted text will be the local system timezone of the end-user's machine.\n *\n * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not\n * applied and the formatted text will have the same day, month and year of the expression.\n *\n * WARNINGS:\n * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.\n *   Instead users should treat the date as an immutable object and change the reference when the\n *   pipe needs to re-run (this is to avoid reformatting the date on every change detection run\n *   which would be an expensive operation).\n * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera\n *   browsers.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * Assuming `dateObj` is (year: 2010, month: 9, day: 3, hour: 12 PM, minute: 05, second: 08)\n * in the _local_ time and locale is 'en-US':\n *\n * {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}\n *\n * @publicApi\n */\n@Pipe({name: 'date', pure: true})\nexport class DeprecatedDatePipe implements PipeTransform {\n  /** @internal */\n  static _ALIASES: {[key: string]: string} = {\n    'medium': 'yMMMdjms',\n    'short': 'yMdjm',\n    'fullDate': 'yMMMMEEEEd',\n    'longDate': 'yMMMMd',\n    'mediumDate': 'yMMMd',\n    'shortDate': 'yMd',\n    'mediumTime': 'jms',\n    'shortTime': 'jm'\n  };\n\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  transform(value: any, pattern: string = 'mediumDate'): string|null {\n    if (value == null || value === '' || value !== value) return null;\n\n    let date: Date;\n\n    if (typeof value === 'string') {\n      value = value.trim();\n    }\n\n    if (isDate(value)) {\n      date = value;\n    } else if (!isNaN(value - parseFloat(value))) {\n      date = new Date(parseFloat(value));\n    } else if (typeof value === 'string' && /^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)) {\n      /**\n       * For ISO Strings without time the day, month and year must be extracted from the ISO String\n       * before Date creation to avoid time offset and errors in the new Date.\n       * If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n       * date, some browsers (e.g. IE 9) will throw an invalid Date error\n       * If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the\n       * timeoffset\n       * is applied\n       * Note: ISO months are 0 for January, 1 for February, ...\n       */\n      const [y, m, d] = value.split('-').map((val: string) => parseInt(val, 10));\n      date = new Date(y, m - 1, d);\n    } else {\n      date = new Date(value);\n    }\n\n    if (!isDate(date)) {\n      let match: RegExpMatchArray|null;\n      if ((typeof value === 'string') && (match = value.match(ISO8601_DATE_REGEX))) {\n        date = isoStringToDate(match);\n      } else {\n        throw invalidPipeArgumentError(DeprecatedDatePipe, value);\n      }\n    }\n\n    return DateFormatter.format(\n        date, this._locale, DeprecatedDatePipe._ALIASES[pattern] || pattern);\n  }\n}\n\nfunction isDate(value: any): value is Date {\n  return value instanceof Date && !isNaN(value.valueOf());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, LOCALE_ID, Pipe, PipeTransform, Type} from '@angular/core';\nimport {NUMBER_FORMAT_REGEXP, parseIntAutoRadix} from '../../i18n/format_number';\nimport {NumberFormatStyle} from '../../i18n/locale_data_api';\nimport {invalidPipeArgumentError} from '../invalid_pipe_argument_error';\nimport {NumberFormatter} from './intl';\n\nfunction formatNumber(\n    pipe: Type<any>, locale: string, value: number | string, style: NumberFormatStyle,\n    digits?: string | null, currency: string | null = null,\n    currencyAsSymbol: boolean = false): string|null {\n  if (value == null) return null;\n\n  // Convert strings to numbers\n  value = typeof value === 'string' && !isNaN(+value - parseFloat(value)) ? +value : value;\n  if (typeof value !== 'number') {\n    throw invalidPipeArgumentError(pipe, value);\n  }\n\n  let minInt: number|undefined;\n  let minFraction: number|undefined;\n  let maxFraction: number|undefined;\n  if (style !== NumberFormatStyle.Currency) {\n    // rely on Intl default for currency\n    minInt = 1;\n    minFraction = 0;\n    maxFraction = 3;\n  }\n\n  if (digits) {\n    const parts = digits.match(NUMBER_FORMAT_REGEXP);\n    if (parts === null) {\n      throw new Error(`${digits} is not a valid digit info for number pipes`);\n    }\n    if (parts[1] != null) {  // min integer digits\n      minInt = parseIntAutoRadix(parts[1]);\n    }\n    if (parts[3] != null) {  // min fraction digits\n      minFraction = parseIntAutoRadix(parts[3]);\n    }\n    if (parts[5] != null) {  // max fraction digits\n      maxFraction = parseIntAutoRadix(parts[5]);\n    }\n  }\n\n  return NumberFormatter.format(value as number, locale, style, {\n    minimumIntegerDigits: minInt,\n    minimumFractionDigits: minFraction,\n    maximumFractionDigits: maxFraction,\n    currency: currency,\n    currencyAsSymbol: currencyAsSymbol,\n  });\n}\n\n/**\n * Formats a number as text. Group sizing and separator and other locale-specific\n * configurations are based on the active locale.\n *\n * where `expression` is a number:\n *  - `digitInfo` is a `string` which has a following format: <br>\n *     <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>\n *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.\n *   - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.\n *   - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.\n *\n * For more information on the acceptable range for each of these numbers and other\n * details see your native internationalization library.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({name: 'number'})\nexport class DeprecatedDecimalPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  transform(value: any, digits?: string): string|null {\n    return formatNumber(\n        DeprecatedDecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Formats a number as percentage according to locale rules.\n *\n * - `digitInfo` See {@link DecimalPipe} for detailed description.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}\n *\n * @publicApi\n */\n@Pipe({name: 'percent'})\nexport class DeprecatedPercentPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  transform(value: any, digits?: string): string|null {\n    return formatNumber(\n        DeprecatedPercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);\n  }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * Use `currency` to format a number as currency.\n *\n * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such\n *    as `USD` for the US dollar and `EUR` for the euro.\n * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.\n *   - `true`: use symbol (e.g. `$`).\n *   - `false`(default): use code (e.g. `USD`).\n * - `digitInfo` See {@link DecimalPipe} for detailed description.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}\n *\n * @publicApi\n */\n@Pipe({name: 'currency'})\nexport class DeprecatedCurrencyPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  transform(\n      value: any, currencyCode: string = 'USD', symbolDisplay: boolean = false,\n      digits?: string): string|null {\n    return formatNumber(\n        DeprecatedCurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits,\n        currencyCode, symbolDisplay);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Provider} from '@angular/core';\nimport {DeprecatedDatePipe} from './date_pipe';\nimport {DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe} from './number_pipe';\n\nexport {\n  DeprecatedCurrencyPipe,\n  DeprecatedDatePipe,\n  DeprecatedDecimalPipe,\n  DeprecatedPercentPipe,\n};\n\n\n/**\n * A collection of deprecated i18n pipes that require intl api\n *\n * @deprecated from v5\n */\nexport const COMMON_DEPRECATED_I18N_PIPES: Provider[] =\n    [DeprecatedDecimalPipe, DeprecatedPercentPipe, DeprecatedCurrencyPipe, DeprecatedDatePipe];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, EventEmitter, Injectable, OnDestroy, Pipe, PipeTransform, WrappedValue, ÉµisObservable, ÉµisPromise, ÉµlooseIdentical} from '@angular/core';\nimport {Observable, SubscriptionLike} from 'rxjs';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\ninterface SubscriptionStrategy {\n  createSubscription(async: Observable<any>|Promise<any>, updateLatestValue: any): SubscriptionLike\n      |Promise<any>;\n  dispose(subscription: SubscriptionLike|Promise<any>): void;\n  onDestroy(subscription: SubscriptionLike|Promise<any>): void;\n}\n\nclass ObservableStrategy implements SubscriptionStrategy {\n  createSubscription(async: Observable<any>, updateLatestValue: any): SubscriptionLike {\n    return async.subscribe({next: updateLatestValue, error: (e: any) => { throw e; }});\n  }\n\n  dispose(subscription: SubscriptionLike): void { subscription.unsubscribe(); }\n\n  onDestroy(subscription: SubscriptionLike): void { subscription.unsubscribe(); }\n}\n\nclass PromiseStrategy implements SubscriptionStrategy {\n  createSubscription(async: Promise<any>, updateLatestValue: (v: any) => any): Promise<any> {\n    return async.then(updateLatestValue, e => { throw e; });\n  }\n\n  dispose(subscription: Promise<any>): void {}\n\n  onDestroy(subscription: Promise<any>): void {}\n}\n\nconst _promiseStrategy = new PromiseStrategy();\nconst _observableStrategy = new ObservableStrategy();\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'async', pure: false})\nexport class AsyncPipe implements OnDestroy, PipeTransform {\n  private _latestValue: any = null;\n  private _latestReturnedValue: any = null;\n\n  private _subscription: SubscriptionLike|Promise<any>|null = null;\n  private _obj: Observable<any>|Promise<any>|EventEmitter<any>|null = null;\n  private _strategy: SubscriptionStrategy = null !;\n\n  constructor(private _ref: ChangeDetectorRef) {}\n\n  ngOnDestroy(): void {\n    if (this._subscription) {\n      this._dispose();\n    }\n  }\n\n  transform<T>(obj: null): null;\n  transform<T>(obj: undefined): undefined;\n  transform<T>(obj: Observable<T>|null|undefined): T|null;\n  transform<T>(obj: Promise<T>|null|undefined): T|null;\n  transform(obj: Observable<any>|Promise<any>|null|undefined): any {\n    if (!this._obj) {\n      if (obj) {\n        this._subscribe(obj);\n      }\n      this._latestReturnedValue = this._latestValue;\n      return this._latestValue;\n    }\n\n    if (obj !== this._obj) {\n      this._dispose();\n      return this.transform(obj as any);\n    }\n\n    if (ÉµlooseIdentical(this._latestValue, this._latestReturnedValue)) {\n      return this._latestReturnedValue;\n    }\n\n    this._latestReturnedValue = this._latestValue;\n    return WrappedValue.wrap(this._latestValue);\n  }\n\n  private _subscribe(obj: Observable<any>|Promise<any>|EventEmitter<any>): void {\n    this._obj = obj;\n    this._strategy = this._selectStrategy(obj);\n    this._subscription = this._strategy.createSubscription(\n        obj, (value: Object) => this._updateLatestValue(obj, value));\n  }\n\n  private _selectStrategy(obj: Observable<any>|Promise<any>|EventEmitter<any>): any {\n    if (ÉµisPromise(obj)) {\n      return _promiseStrategy;\n    }\n\n    if (ÉµisObservable(obj)) {\n      return _observableStrategy;\n    }\n\n    throw invalidPipeArgumentError(AsyncPipe, obj);\n  }\n\n  private _dispose(): void {\n    this._strategy.dispose(this._subscription !);\n    this._latestValue = null;\n    this._latestReturnedValue = null;\n    this._subscription = null;\n    this._obj = null;\n  }\n\n  private _updateLatestValue(async: any, value: Object): void {\n    if (async === this._obj) {\n      this._latestValue = value;\n      this._ref.markForCheck();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'lowercase'})\nexport class LowerCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to lower case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(LowerCasePipe, value);\n    }\n    return value.toLowerCase();\n  }\n}\n\n//\n// Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result\n// can be achieved by using /\\p{L}\\S*/gu and also known as Unicode Property Escapes\n// (http://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1\n//\n\nconst unicodeWordMatch =\n    /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\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F00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF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EBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D])\\S*/g;\n\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word, and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'titlecase'})\nexport class TitleCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to title case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(TitleCasePipe, value);\n    }\n\n    return value.replace(\n        unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase()));\n  }\n}\n\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'uppercase'})\nexport class UpperCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to upper case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(UpperCasePipe, value);\n    }\n    return value.toUpperCase();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {formatDate} from '../i18n/format_date';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n#i18n-pipes) for more information.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * Examples are given in `en-US` locale.\n *\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (`9:03:01 AM GMT+01:00`).\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n *  | Field type         | Format      | Description                                                   | Example Value                                              |\n *  |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|\n *  | Era                | G, GG & GGG | Abbreviated                                                   | AD                                                         |\n *  |                    | GGGG        | Wide                                                          | Anno Domini                                                |\n *  |                    | GGGGG       | Narrow                                                        | A                                                          |\n *  | Year               | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                    | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                    | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                    | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Month              | M           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                    | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                    | MMM         | Abbreviated                                                   | Sep                                                        |\n *  |                    | MMMM        | Wide                                                          | September                                                  |\n *  |                    | MMMMM       | Narrow                                                        | S                                                          |\n *  | Month standalone   | L           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                    | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                    | LLL         | Abbreviated                                                   | Sep                                                        |\n *  |                    | LLLL        | Wide                                                          | September                                                  |\n *  |                    | LLLLL       | Narrow                                                        | S                                                          |\n *  | Week of year       | w           | Numeric: minimum digits                                       | 1... 53                                                    |\n *  |                    | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |\n *  | Week of month      | W           | Numeric: 1 digit                                              | 1... 5                                                     |\n *  | Day of month       | d           | Numeric: minimum digits                                       | 1                                                          |\n *  |                    | dd          | Numeric: 2 digits + zero padded                               | 01                                                          |\n *  | Week day           | E, EE & EEE | Abbreviated                                                   | Tue                                                        |\n *  |                    | EEEE        | Wide                                                          | Tuesday                                                    |\n *  |                    | EEEEE       | Narrow                                                        | T                                                          |\n *  |                    | EEEEEE      | Short                                                         | Tu                                                         |\n *  | Period             | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |\n *  |                    | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |\n *  |                    | aaaaa       | Narrow                                                        | a/p                                                        |\n *  | Period*            | B, BB & BBB | Abbreviated                                                   | mid.                                                       |\n *  |                    | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                    | BBBBB       | Narrow                                                        | md                                                         |\n *  | Period standalone* | b, bb & bbb | Abbreviated                                                   | mid.                                                       |\n *  |                    | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                    | bbbbb       | Narrow                                                        | md                                                         |\n *  | Hour 1-12          | h           | Numeric: minimum digits                                       | 1, 12                                                      |\n *  |                    | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |\n *  | Hour 0-23          | H           | Numeric: minimum digits                                       | 0, 23                                                      |\n *  |                    | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |\n *  | Minute             | m           | Numeric: minimum digits                                       | 8, 59                                                      |\n *  |                    | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |\n *  | Second             | s           | Numeric: minimum digits                                       | 0... 59                                                    |\n *  |                    | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |\n *  | Fractional seconds | S           | Numeric: 1 digit                                              | 0... 9                                                     |\n *  |                    | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |\n *  |                    | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |\n *  | Zone               | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |\n *  |                    | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |\n *  |                    | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |\n *  |                    | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |\n *  |                    | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |\n *  |                    | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |\n *  |                    | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |\n *\n * Note that timezone correction is not applied to an ISO string that has no time component, such as \"2016-09-19\"\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }}               // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }}   // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }}       // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n *  selector: 'date-pipe',\n *  template: `<div>\n *    <p>Today is {{today | date}}</p>\n *    <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n *    <p>The time is {{today | date:'h:mm a z'}}</p>\n *  </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n *   today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\n@Injectable()\n@Pipe({name: 'date', pure: true})\nexport class DatePipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private locale: string) {}\n\n  /**\n   * @param value The date expression: a `Date` object,  a number\n   * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).\n   * @param format The date/time components to include, using predefined options or a\n   * custom format string.\n   * @param timezone A timezone offset (such as `'+0430'`), or a standard\n   * UTC/GMT or continental US timezone abbreviation.\n   * When not supplied, uses the end-user's local system timezone.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   * @returns A date string in the desired format.\n   */\n  transform(value: any, format = 'mediumDate', timezone?: string, locale?: string): string|null {\n    if (value == null || value === '' || value !== value) return null;\n\n    try {\n      return formatDate(value, format, locale || this.locale, timezone);\n    } catch (error) {\n      throw invalidPipeArgumentError(DatePipe, error.message);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {NgLocalization, getPluralCategory} from '../i18n/localization';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\nconst _INTERPOLATION_REGEXP: RegExp = /#/g;\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'i18nPlural', pure: true})\nexport class I18nPluralPipe implements PipeTransform {\n  constructor(private _localization: NgLocalization) {}\n\n  /**\n   * @param value the number to be formatted\n   * @param pluralMap an object that mimics the ICU format, see\n   * http://userguide.icu-project.org/formatparse/messages.\n   * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n   * default).\n   */\n  transform(value: number, pluralMap: {[count: string]: string}, locale?: string): string {\n    if (value == null) return '';\n\n    if (typeof pluralMap !== 'object' || pluralMap === null) {\n      throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n    }\n\n    const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n\n    return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'i18nSelect', pure: true})\nexport class I18nSelectPipe implements PipeTransform {\n  /**\n   * @param value a string to be internationalized.\n   * @param mapping an object that indicates the text that should be displayed\n   * for different values of the provided `value`.\n   */\n  transform(value: string|null|undefined, mapping: {[key: string]: string}): string {\n    if (value == null) return '';\n\n    if (typeof mapping !== 'object' || typeof value !== 'string') {\n      throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n    }\n\n    if (mapping.hasOwnProperty(value)) {\n      return mapping[value];\n    }\n\n    if (mapping.hasOwnProperty('other')) {\n      return mapping['other'];\n    }\n\n    return '';\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Pipe, PipeTransform} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation.  Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'json', pure: false})\nexport class JsonPipe implements PipeTransform {\n  /**\n   * @param value A value of any type to convert into a JSON-format string.\n   */\n  transform(value: any): string { return JSON.stringify(value, null, 2); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Pipe, PipeTransform} from '@angular/core';\n\nfunction makeKeyValuePair<K, V>(key: K, value: V): KeyValue<K, V> {\n  return {key: key, value: value};\n}\n\n/**\n * A key value pair.\n * Usually used to represent the key value pairs from a Map or Object.\n *\n * @publicApi\n */\nexport interface KeyValue<K, V> {\n  key: K;\n  value: V;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this keyvalue\n * pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'keyvalue', pure: false})\nexport class KeyValuePipe implements PipeTransform {\n  constructor(private readonly differs: KeyValueDiffers) {}\n\n  private differ !: KeyValueDiffer<any, any>;\n  private keyValues: Array<KeyValue<any, any>> = [];\n\n  transform<K, V>(input: null, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): null;\n  transform<V>(\n      input: {[key: string]: V}|Map<string, V>,\n      compareFn?: (a: KeyValue<string, V>, b: KeyValue<string, V>) => number):\n      Array<KeyValue<string, V>>;\n  transform<V>(\n      input: {[key: number]: V}|Map<number, V>,\n      compareFn?: (a: KeyValue<number, V>, b: KeyValue<number, V>) => number):\n      Array<KeyValue<number, V>>;\n  transform<K, V>(input: Map<K, V>, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number):\n      Array<KeyValue<K, V>>;\n  transform<K, V>(\n      input: null|{[key: string]: V, [key: number]: V}|Map<K, V>,\n      compareFn: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number = defaultComparator):\n      Array<KeyValue<K, V>>|null {\n    if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n      return null;\n    }\n\n    if (!this.differ) {\n      // make a differ for whatever type we've been passed in\n      this.differ = this.differs.find(input).create();\n    }\n\n    const differChanges: KeyValueChanges<K, V>|null = this.differ.diff(input as any);\n\n    if (differChanges) {\n      this.keyValues = [];\n      differChanges.forEachItem((r: KeyValueChangeRecord<K, V>) => {\n        this.keyValues.push(makeKeyValuePair(r.key, r.currentValue !));\n      });\n      this.keyValues.sort(compareFn);\n    }\n    return this.keyValues;\n  }\n}\n\nexport function defaultComparator<K, V>(\n    keyValueA: KeyValue<K, V>, keyValueB: KeyValue<K, V>): number {\n  const a = keyValueA.key;\n  const b = keyValueB.key;\n  // if same exit with 0;\n  if (a === b) return 0;\n  // make sure that undefined are at the end of the sort.\n  if (a === undefined) return 1;\n  if (b === undefined) return -1;\n  // make sure that nulls are at the end of the sort.\n  if (a === null) return 1;\n  if (b === null) return -1;\n  if (typeof a == 'string' && typeof b == 'string') {\n    return a < b ? -1 : 1;\n  }\n  if (typeof a == 'number' && typeof b == 'number') {\n    return a - b;\n  }\n  if (typeof a == 'boolean' && typeof b == 'boolean') {\n    return a < b ? -1 : 1;\n  }\n  // `a` and `b` are of different types. Compare their string values.\n  const aString = String(a);\n  const bString = String(b);\n  return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {formatCurrency, formatNumber, formatPercent} from '../i18n/format_number';\nimport {getCurrencySymbol} from '../i18n/locale_data_api';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number into a string,\n * formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * If no parameters are specified, the function rounds off to the nearest value using this\n * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).\n * The behavior differs from that of the JavaScript ```Math.round()``` function.\n * In the following case for example, the pipe rounds down where\n * ```Math.round()``` rounds up:\n *\n * ```html\n * -2.5 | number:'1.0-0'\n * > -3\n * Math.round(-2.5)\n * > -2\n * ```\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * ### Example\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'number'})\nexport class DecimalPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  /**\n   * @param value The number to be formatted.\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `0`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `3`.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(value: any, digitsInfo?: string, locale?: string): string|null {\n    if (isEmpty(value)) return null;\n\n    locale = locale || this._locale;\n\n    try {\n      const num = strToNumber(value);\n      return formatNumber(num, locale, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(DecimalPipe, error.message);\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'percent'})\nexport class PercentPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  /**\n   *\n   * @param value The number to be formatted as a percentage.\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `0`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `0`.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(value: any, digitsInfo?: string, locale?: string): string|null {\n    if (isEmpty(value)) return null;\n\n    locale = locale || this._locale;\n\n    try {\n      const num = strToNumber(value);\n      return formatPercent(num, locale, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(PercentPipe, error.message);\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'currency'})\nexport class CurrencyPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  /**\n   *\n   * @param value The number to be formatted as currency.\n   * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n   * such as `USD` for the US dollar and `EUR` for the euro.\n   * @param display The format for the currency indicator. One of the following:\n   *   - `code`: Show the code (such as `USD`).\n   *   - `symbol`(default): Show the symbol (such as `$`).\n   *   - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n   * currency.\n   * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n   * locale has no narrow symbol, uses the standard symbol for the locale.\n   *   - String: Use the given string value instead of a code or a symbol.\n   * For example, an empty string will suppress the currency & symbol.\n   *   - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n   *\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `2`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `2`.\n   * If not provided, the number will be formatted with the proper amount of digits,\n   * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n   * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(\n      value: any, currencyCode?: string,\n      display: 'code'|'symbol'|'symbol-narrow'|string|boolean = 'symbol', digitsInfo?: string,\n      locale?: string): string|null {\n    if (isEmpty(value)) return null;\n\n    locale = locale || this._locale;\n\n    if (typeof display === 'boolean') {\n      if (<any>console && <any>console.warn) {\n        console.warn(\n            `Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n      }\n      display = display ? 'symbol' : 'code';\n    }\n\n    let currency: string = currencyCode || 'USD';\n    if (display !== 'code') {\n      if (display === 'symbol' || display === 'symbol-narrow') {\n        currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n      } else {\n        currency = display;\n      }\n    }\n\n    try {\n      const num = strToNumber(value);\n      return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(CurrencyPipe, error.message);\n    }\n  }\n}\n\nfunction isEmpty(value: any): boolean {\n  return value == null || value === '' || value !== value;\n}\n\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value: number | string): number {\n  // Convert strings to numbers\n  if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n    return Number(value);\n  }\n  if (typeof value !== 'number') {\n    throw new Error(`${value} is not a number`);\n  }\n  return value;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\n@Injectable()\n@Pipe({name: 'slice', pure: false})\nexport class SlicePipe implements PipeTransform {\n  /**\n   * @param value a list or a string to be sliced.\n   * @param start the starting index of the subset to return:\n   *   - **a positive integer**: return the item at `start` index and all items after\n   *     in the list or string expression.\n   *   - **a negative integer**: return the item at `start` index from the end and all items after\n   *     in the list or string expression.\n   *   - **if positive and greater than the size of the expression**: return an empty list or\n   * string.\n   *   - **if negative and greater than the size of the expression**: return entire list or string.\n   * @param end the ending index of the subset to return:\n   *   - **omitted**: return all items until the end.\n   *   - **if positive**: return all items before `end` index of the list or string.\n   *   - **if negative**: return all items before `end` index from the end of the list or string.\n   */\n  transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;\n  transform(value: string, start: number, end?: number): string;\n  transform(value: null, start: number, end?: number): null;\n  transform(value: undefined, start: number, end?: number): undefined;\n  transform(value: any, start: number, end?: number): any {\n    if (value == null) return value;\n\n    if (!this.supports(value)) {\n      throw invalidPipeArgumentError(SlicePipe, value);\n    }\n\n    return value.slice(start, end);\n  }\n\n  private supports(obj: any): boolean { return typeof obj === 'string' || Array.isArray(obj); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\n */\nimport {AsyncPipe} from './async_pipe';\nimport {LowerCasePipe, TitleCasePipe, UpperCasePipe} from './case_conversion_pipes';\nimport {DatePipe} from './date_pipe';\nimport {I18nPluralPipe} from './i18n_plural_pipe';\nimport {I18nSelectPipe} from './i18n_select_pipe';\nimport {JsonPipe} from './json_pipe';\nimport {KeyValue, KeyValuePipe} from './keyvalue_pipe';\nimport {CurrencyPipe, DecimalPipe, PercentPipe} from './number_pipe';\nimport {SlicePipe} from './slice_pipe';\n\nexport {\n  AsyncPipe,\n  CurrencyPipe,\n  DatePipe,\n  DecimalPipe,\n  KeyValue,\n  KeyValuePipe,\n  I18nPluralPipe,\n  I18nSelectPipe,\n  JsonPipe,\n  LowerCasePipe,\n  PercentPipe,\n  SlicePipe,\n  TitleCasePipe,\n  UpperCasePipe,\n};\n\n\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nexport const COMMON_PIPES = [\n  AsyncPipe,\n  UpperCasePipe,\n  LowerCasePipe,\n  JsonPipe,\n  SlicePipe,\n  DecimalPipe,\n  PercentPipe,\n  TitleCasePipe,\n  CurrencyPipe,\n  DatePipe,\n  I18nPluralPipe,\n  I18nSelectPipe,\n  KeyValuePipe,\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {COMMON_DIRECTIVES} from './directives/index';\nimport {DEPRECATED_PLURAL_FN, NgLocaleLocalization, NgLocalization, getPluralCase} from './i18n/localization';\nimport {COMMON_DEPRECATED_I18N_PIPES} from './pipes/deprecated/index';\nimport {COMMON_PIPES} from './pipes/index';\n\n\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * * The `providers` options configure the NgModule's injector to provide\n * localization dependencies to members.\n * * The `exports` options make the declared directives and pipes available for import\n * by other NgModules.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n  exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n  providers: [\n    {provide: NgLocalization, useClass: NgLocaleLocalization},\n  ],\n})\nexport class CommonModule {\n}\n\n/**\n * A module that contains the deprecated i18n pipes.\n *\n * @deprecated from v5\n * @publicApi\n */\n@NgModule({\n  declarations: [COMMON_DEPRECATED_I18N_PIPES],\n  exports: [COMMON_DEPRECATED_I18N_PIPES],\n  providers: [{provide: DEPRECATED_PLURAL_FN, useValue: getPluralCase}],\n})\nexport class DeprecatedI18NPipesModule {\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * A DI Token representing the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nexport const DOCUMENT = new InjectionToken<Document>('DocumentToken');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const PLATFORM_BROWSER_ID = 'browser';\nexport const PLATFORM_SERVER_ID = 'server';\nexport const PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nexport const PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nexport function isPlatformBrowser(platformId: Object): boolean {\n  return platformId === PLATFORM_BROWSER_ID;\n}\n\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nexport function isPlatformServer(platformId: Object): boolean {\n  return platformId === PLATFORM_SERVER_ID;\n}\n\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nexport function isPlatformWorkerApp(platformId: Object): boolean {\n  return platformId === PLATFORM_WORKER_APP_ID;\n}\n\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nexport function isPlatformWorkerUi(platformId: Object): boolean {\n  return platformId === PLATFORM_WORKER_UI_ID;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ErrorHandler, ÉµÉµdefineInjectable, ÉµÉµinject} from '@angular/core';\n\nimport {DOCUMENT} from './dom_tokens';\n\n\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nexport abstract class ViewportScroller {\n  // De-sugared tree-shakable injection\n  // See #23917\n  /** @nocollapse */\n  static ngInjectableDef = ÉµÉµdefineInjectable({\n    token: ViewportScroller,\n    providedIn: 'root',\n    factory: () => new BrowserViewportScroller(ÉµÉµinject(DOCUMENT), window, ÉµÉµinject(ErrorHandler))\n  });\n\n  /**\n   * Configures the top offset used when scrolling to an anchor.\n   * @param offset A position in screen coordinates (a tuple with x and y values)\n   * or a function that returns the top offset position.\n   *\n   */\n  abstract setOffset(offset: [number, number]|(() => [number, number])): void;\n\n  /**\n   * Retrieves the current scroll position.\n   * @returns A position in screen coordinates (a tuple with x and y values).\n   */\n  abstract getScrollPosition(): [number, number];\n\n  /**\n   * Scrolls to a specified position.\n   * @param position A position in screen coordinates (a tuple with x and y values).\n   */\n  abstract scrollToPosition(position: [number, number]): void;\n\n  /**\n   * Scrolls to an anchor element.\n   * @param anchor The ID of the anchor element.\n   */\n  abstract scrollToAnchor(anchor: string): void;\n\n  /**\n   * Disables automatic scroll restoration provided by the browser.\n   * See also [window.history.scrollRestoration\n   * info](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration).\n   */\n  abstract setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void;\n}\n\n/**\n * Manages the scroll position for a browser window.\n */\nexport class BrowserViewportScroller implements ViewportScroller {\n  private offset: () => [number, number] = () => [0, 0];\n\n  constructor(private document: any, private window: any, private errorHandler: ErrorHandler) {}\n\n  /**\n   * Configures the top offset used when scrolling to an anchor.\n   * @param offset A position in screen coordinates (a tuple with x and y values)\n   * or a function that returns the top offset position.\n   *\n   */\n  setOffset(offset: [number, number]|(() => [number, number])): void {\n    if (Array.isArray(offset)) {\n      this.offset = () => offset;\n    } else {\n      this.offset = offset;\n    }\n  }\n\n  /**\n   * Retrieves the current scroll position.\n   * @returns The position in screen coordinates.\n   */\n  getScrollPosition(): [number, number] {\n    if (this.supportScrollRestoration()) {\n      return [this.window.scrollX, this.window.scrollY];\n    } else {\n      return [0, 0];\n    }\n  }\n\n  /**\n   * Sets the scroll position.\n   * @param position The new position in screen coordinates.\n   */\n  scrollToPosition(position: [number, number]): void {\n    if (this.supportScrollRestoration()) {\n      this.window.scrollTo(position[0], position[1]);\n    }\n  }\n\n  /**\n   * Scrolls to an anchor element.\n   * @param anchor The ID of the anchor element.\n   */\n  scrollToAnchor(anchor: string): void {\n    if (this.supportScrollRestoration()) {\n      // Escape anything passed to `querySelector` as it can throw errors and stop the application\n      // from working if invalid values are passed.\n      if (this.window.CSS && this.window.CSS.escape) {\n        anchor = this.window.CSS.escape(anchor);\n      } else {\n        anchor = anchor.replace(/(\\\"|\\'\\ |:|\\.|\\[|\\]|,|=)/g, '\\\\$1');\n      }\n      try {\n        const elSelectedById = this.document.querySelector(`#${anchor}`);\n        if (elSelectedById) {\n          this.scrollToElement(elSelectedById);\n          return;\n        }\n        const elSelectedByName = this.document.querySelector(`[name='${anchor}']`);\n        if (elSelectedByName) {\n          this.scrollToElement(elSelectedByName);\n          return;\n        }\n      } catch (e) {\n        this.errorHandler.handleError(e);\n      }\n    }\n  }\n\n  /**\n   * Disables automatic scroll restoration provided by the browser.\n   */\n  setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void {\n    if (this.supportScrollRestoration()) {\n      const history = this.window.history;\n      if (history && history.scrollRestoration) {\n        history.scrollRestoration = scrollRestoration;\n      }\n    }\n  }\n\n  private scrollToElement(el: any): void {\n    const rect = el.getBoundingClientRect();\n    const left = rect.left + this.window.pageXOffset;\n    const top = rect.top + this.window.pageYOffset;\n    const offset = this.offset();\n    this.window.scrollTo(left - offset[0], top - offset[1]);\n  }\n\n  /**\n   * We only support scroll restoration when we can get a hold of window.\n   * This means that we do not support this behavior when running in a web worker.\n   *\n   * Lifting this restriction right now would require more changes in the dom adapter.\n   * Since webworkers aren't widely used, we will lift it once RouterScroller is\n   * battle-tested.\n   */\n  private supportScrollRestoration(): boolean {\n    try {\n      return !!this.window && !!this.window.scrollTo;\n    } catch {\n      return false;\n    }\n  }\n}\n\n\n/**\n * Provides an empty implementation of the viewport scroller. This will\n * live in @angular/common as it will be used by both platform-server and platform-webworker.\n */\nexport class NullViewportScroller implements ViewportScroller {\n  /**\n   * Empty implementation\n   */\n  setOffset(offset: [number, number]|(() => [number, number])): void {}\n\n  /**\n   * Empty implementation\n   */\n  getScrollPosition(): [number, number] { return [0, 0]; }\n\n  /**\n   * Empty implementation\n   */\n  scrollToPosition(position: [number, number]): void {}\n\n  /**\n   * Empty implementation\n   */\n  scrollToAnchor(anchor: string): void {}\n\n  /**\n   * Empty implementation\n   */\n  setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void {}\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n    return function mapOperation(source) {\n        if (typeof project !== 'function') {\n            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n        }\n        return source.lift(new MapOperator(project, thisArg));\n    };\n}\nvar MapOperator = /*@__PURE__*/ (function () {\n    function MapOperator(project, thisArg) {\n        this.project = project;\n        this.thisArg = thisArg;\n    }\n    MapOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n    };\n    return MapOperator;\n}());\nexport { MapOperator };\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(MapSubscriber, _super);\n    function MapSubscriber(destination, project, thisArg) {\n        var _this = _super.call(this, destination) || this;\n        _this.project = project;\n        _this.count = 0;\n        _this.thisArg = thisArg || _this;\n        return _this;\n    }\n    MapSubscriber.prototype._next = function (value) {\n        var result;\n        try {\n            result = this.project.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    };\n    return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","import { extend, arrayUnion } from './utils';\nconst PRIVATE_PREFIX = '$$';\nconst RESERVED_REGEX = /^(\\$\\$).*/;\n\nfunction validateMethodName(name: string) {\n  if (!name) {\n    throw new Error(`Illegal method name. Empty method name is not allowed`);\n  } else if (name in this) {\n    throw new Error(`A member name '${name}' already defined.`);\n  }\n}\n\n/**\n * Returns a list of assigned property names (non private)\n * @param subject\n */\nfunction getAssignedPropertyNames(subject: any): string[] {\n  return Object.getOwnPropertyNames(subject)\n    .filter(name => RESERVED_REGEX.test(name))\n    .map(name => name.substr(2));\n}\n\nexport function privateKey(name: string): string {\n  return PRIVATE_PREFIX + name;\n}\n\nfunction objectDefinePropertyValue(obj: any, propertyName, value: (value: any) => void): void {\n  Object.defineProperty(obj, propertyName, <any>{\n    configurable: false,\n    enumerable: false,\n    writable: false,\n    value\n  });\n}\n\n/**\n * Given a FluentAssign instance, apply all of the supplied default values so calling\n * instance.toJSON will return those values (does not create a setter function)\n * @param instance\n * @param defaultValues\n */\nfunction applyDefaultValues(instance: any, defaultValues: Object): void {\n  Object.getOwnPropertyNames(defaultValues)\n    .forEach(name => (<any>instance)[privateKey(name)] = (<any>defaultValues)[name]);\n}\n\n/**\n * Create a function for setting a value for a property on a given object.\n * @param obj The object to apply the key & setter on.\n * @param propertyName The name of the property on the object\n * @param writeOnce If true will allow writing once (default: false)\n *\n * Example:\n * let obj = new FluentAssign<any>;\n * setAssignMethod(obj, 'myProp');\n * obj.myProp('someValue');\n * const result = obj.toJSON();\n * console.log(result); //{ myProp: 'someValue' }\n *\n *\n * let obj = new FluentAssign<any>;\n * setAssignMethod(obj, 'myProp', true); // applying writeOnce\n * obj.myProp('someValue');\n * obj.myProp('someValue'); // ERROR: Overriding config property 'myProp' is not allowed.\n */\nexport function setAssignMethod<T>(obj: T, propertyName: string, writeOnce: boolean = false): void {\n  validateMethodName.call(obj, propertyName);\n\n  const key = privateKey(propertyName);\n  objectDefinePropertyValue(obj, propertyName, (value: any) => {\n    if (writeOnce && this.hasOwnProperty(key)) {\n      throw new Error(`Overriding config property '${propertyName}' is not allowed.`);\n    }\n    obj[key] = value;\n    return obj;\n  });\n}\n\n/**\n * Create a function for setting a value that is an alias to an other setter function.\n * @param obj The object to apply the key & setter on.\n * @param propertyName The name of the property on the object\n * @param srcPropertyName The name of the property on the object this alias points to\n * @param hard If true, will set a readonly property on the object that returns\n *        the value of the source property. Default: false\n *\n * Example:\n * let obj = new FluentAssign<any> ;\n * setAssignMethod(obj, 'myProp');\n * setAssignAlias(obj, 'myPropAlias', 'myProp');\n * obj.myPropAlias('someValue');\n * const result = obj.toJSON();\n * console.log(result); //{ myProp: 'someValue' }\n * result.myPropAlias // undefined\n *\n *\n * let obj = new FluentAssign<any> ;\n * setAssignMethod(obj, 'myProp');\n * setAssignAlias(obj, 'myPropAlias', 'myProp', true); // setting a hard alias.\n * obj.myPropAlias('someValue');\n * const result = obj.toJSON();\n * console.log(result); //{ myProp: 'someValue' }\n * result.myPropAlias // someValue\n */\nexport function setAssignAlias<T>(obj: T, propertyName: string,\n                                  srcPropertyName: string,\n                                  hard: boolean = false): void {\n  validateMethodName.call(obj, propertyName);\n\n  objectDefinePropertyValue(obj, propertyName, (value: any) => {\n    obj[srcPropertyName](value);\n    return obj;\n  });\n\n  if (hard === true) {\n    const key = privateKey(propertyName),\n      srcKey = privateKey(srcPropertyName);\n\n    Object.defineProperty(obj, key, <any>{\n      configurable: false,\n      enumerable: false,\n      get: () => obj[srcKey]\n    });\n  }\n}\n\n/**\n * Describes a fluent assign method.\n * A function that gets a value and returns the instance it works on.\n */\nexport interface FluentAssignMethod<T, Z> {\n  //TODO: Setting 'this' instead of Z does not work, this=ConfigSetter here...\n  (value: T): Z;\n}\n\n\nexport interface IFluentAssignFactory<Z> {\n  fluentAssign: Z;\n  setMethod(name: string, defaultValue?: any): IFluentAssignFactory<Z>;\n}\n\n/**\n * Represent a fluent API factory wrapper for defining FluentAssign instances.\n */\nexport class FluentAssignFactory<T> {\n  private _fluentAssign: FluentAssign<T>;\n\n  constructor(fluentAssign?: FluentAssign<T>) {\n    this._fluentAssign =\n      fluentAssign instanceof FluentAssign ? fluentAssign : <any>new FluentAssign();\n  }\n\n  /**\n   * Create a setter method on the FluentAssign instance.\n   * @param name The name of the setter function.\n   * @param defaultValue If set (not undefined) set's the value on the instance immediately.\n   */\n  setMethod(name: string, defaultValue: any = undefined): FluentAssignFactory<T> {\n    setAssignMethod(this._fluentAssign, name);\n    if (defaultValue !== undefined) {\n      (<any>this._fluentAssign)[name](defaultValue);\n    }\n    return this;\n  }\n\n  /**\n   * The FluentAssign instance.\n   */\n  get fluentAssign(): FluentAssign<T> {\n    return this._fluentAssign;\n  }\n}\n\n\n/**\n * Represent an object where every property is a function representing an assignment function.\n * Calling each function with a value will assign the value to the object and return the object.\n * Calling 'toJSON' returns an object with the same properties but this time representing the\n * assigned values.\n *\n * This allows setting an object in a fluent API manner.\n * Example:\n let fluent = new FluentAssign<any>(undefined, ['some', 'went']);\n fluent.some('thing').went('wrong').toJSON();\n // { some: 'thing', went: 'wrong' }\n */\nexport class FluentAssign<T> {\n  private __fluent$base__: new () => T;\n\n  /**\n   * Returns a FluentAssignFactory<FluentAssign<T>> ready to define a FluentAssign type.\n   * @param defaultValues An object representing default values for the instance.\n   * @param initialSetters A list of initial setters for the instance.\n   */\n  static compose<T>(defaultValues: T = undefined,\n                    initialSetters: string[] = undefined): FluentAssignFactory<T> {\n\n    return <any>FluentAssign.composeWith<FluentAssign<T>>(\n      new FluentAssign<T>(defaultValues, initialSetters));\n  }\n\n  /**\n   * Returns a FluentAssignFactory<Z> where Z is an instance of FluentAssign<?> or a derived\n   * class of it.\n   * @param fluentAssign An instance of FluentAssign<?> or a derived class of FluentAssign<?>.\n   */\n  static composeWith<Z>(fluentAssign: Z): IFluentAssignFactory<Z> {\n    return <any>new FluentAssignFactory<any>(<any>fluentAssign);\n  }\n\n  /**\n   *\n   * @param defaultValues An object representing default values for the underlying object.\n   * @param initialSetters A list of initial setters for this FluentAssign.\n   * @param baseType the class/type to create a new base. optional, {} is used if not supplied.\n   */\n  constructor(defaultValues: T | T[] = undefined,\n              initialSetters: string[] = undefined,\n              baseType: new () => T = undefined) {\n    if (Array.isArray(defaultValues)) {\n      (defaultValues as Array<any>).forEach(d => applyDefaultValues(this, d));\n    } else if (defaultValues) {\n      applyDefaultValues(this, defaultValues);\n    }\n\n    if (Array.isArray(initialSetters)) {\n\n      initialSetters.forEach(name => setAssignMethod(this, name));\n    }\n\n    if (baseType) {\n      this.__fluent$base__ = baseType;\n    }\n  }\n\n  toJSON(): T {\n    return getAssignedPropertyNames(this)\n      .reduce((obj: T, name: string) => {\n        const key = privateKey(name);\n        // re-define property descriptors (we dont want their value)\n        let propDesc = Object.getOwnPropertyDescriptor(this, key);\n        if (propDesc) {\n          Object.defineProperty(obj, name, propDesc);\n        } else {\n          (<any>obj)[name] = (<any>this)[key];\n        }\n        return obj;\n      }, this.__fluent$base__ ? new this.__fluent$base__() : <any>{});\n  }\n}\n","/**\n * Simple object extend\n * @param m1\n * @param m2\n */\nexport function extend<T>(m1: any, m2: any): T {\n  var m: T = <T>{};\n  for (var attr in m1) {\n    if (m1.hasOwnProperty(attr)) {\n      (<any>m)[attr] = (<any>m1)[attr];\n    }\n  }\n\n  for (var attr in m2) {\n    if (m2.hasOwnProperty(attr)) {\n      (<any>m)[attr] = (<any>m2)[attr];\n    }\n  }\n\n  return m;\n}\n\n/**\n * Simple, not optimized, array union of unique values.\n * @param arr1\n * @param arr2\n */\nexport function arrayUnion<T>(arr1: any[], arr2: any[]): T[] {\n  return arr1\n    .concat(arr2.filter(v => arr1.indexOf(v) === -1));\n\n}\n\n/**\n * Returns true if the config supports a given key.\n * @param key\n */\nexport function supportsKey(keyCode: number, config: Array<number>): boolean {\n  if (!Array.isArray(config)) return config === null ? false : true;\n  return config.indexOf(keyCode) > -1;\n}\n\n/**\n * Given an object representing a key/value map of css properties, returns a valid css string\n * representing the object.\n * Example:\n * console.log(toStyleString({\n *     position: 'absolute',\n *     width: '100%',\n *     height: '100%',\n *     top: '0',\n *     left: '0',\n *     right: '0',\n *     bottom: '0'\n * }));\n * // position:absolute;width:100%;height:100%;top:0;left:0;right:0;bottom:0\n * @param obj\n */\nexport function toStyleString(obj: any | CSSStyleDeclaration): string {\n  return Object.getOwnPropertyNames(obj)\n    .map(k => `${k}:${obj[k]}`)\n    .join(';');\n\n  // let objStr = JSON.stringify(obj);\n  // return objStr.substr(1, objStr.length - 2)\n  //     .replace(/,/g, ';')\n  //     .replace(/\"/g, '');\n}\n\nexport class PromiseCompleter<R> {\n  promise: Promise<R>;\n  resolve: (value?: R|PromiseLike<R>) => void;\n  reject: (error?: any, stackTrace?: string) => void;\n\n  constructor() {\n    this.promise = new Promise((res, rej) => {\n      this.resolve = res;\n      this.reject = rej;\n    });\n  }\n}\n\nexport interface Class<T> {\n  new(...args: any[]): T;\n}\n\nexport function noop() { }\n","import {\n  ComponentRef,\n  ComponentFactory,\n  ComponentFactoryResolver,\n  Injector,\n  ViewContainerRef\n} from '@angular/core';\n\nexport interface CreateComponentArgs {\n  component: any;\n  vcRef: ViewContainerRef;\n  injector?: Injector;\n  projectableNodes?: any[][];\n}\n\nexport function createComponent(instructions: CreateComponentArgs): ComponentRef<any> {\n  const injector: Injector =  instructions.injector || instructions.vcRef.parentInjector;\n  const cmpFactory: ComponentFactory<any>\n    = injector.get(ComponentFactoryResolver).resolveComponentFactory(instructions.component);\n\n  if (instructions.vcRef) {\n    return instructions.vcRef.createComponent(\n      cmpFactory,\n      instructions.vcRef.length,\n      injector,\n      instructions.projectableNodes\n    );\n  } else {\n    return cmpFactory.create(injector);\n  }\n}\n\n","export class DialogBailOutError extends Error {\n  constructor(value?: string) {\n    super();\n\n    if (!value) {\n      value = 'Dialog was forced to close by an unknown source.';\n    }\n    this.message = value;\n  }\n}\n","import { Observable, Subject } from 'rxjs';\nimport { ComponentRef } from '@angular/core';\n\nimport { PromiseCompleter } from '../framework/utils';\nimport { Overlay, ModalOverlay } from '../overlay/index';\nimport { CloseGuard } from '../models/tokens';\nimport { DialogBailOutError } from '../models/errors';\n\n/**\n * API to an open modal window.\n */\nexport class DialogRef<T> {\n  /**\n   * Reference to the overlay component ref.\n   */\n  overlayRef: ComponentRef<ModalOverlay>;\n\n  /**\n   * States if the modal is inside a specific element.\n   */\n  public inElement: boolean;\n\n  public destroyed: boolean;\n\n  /**\n   * Fired before dialog is destroyed.\n   * No need to unsubscribe, done automatically.\n   * Note: Always called.\n   * When called, overlayRef might or might not be destroyed.\n   */\n  public onDestroy: Observable<void>;\n\n  private _resultDeferred: PromiseCompleter<any> = new PromiseCompleter<any>();\n  private _onDestroy: Subject<void> = new Subject<void>();\n  private closeGuard: CloseGuard;\n\n  constructor(public overlay: Overlay, public context?: T) {\n    this.onDestroy = this._onDestroy.asObservable();\n  }\n\n  /**\n   * A Promise that is resolved on a close event and rejected on a dismiss event.\n   */\n  get result(): Promise<any> {\n    return this._resultDeferred.promise;\n  }\n\n  /**\n   * Set a close/dismiss guard\n   * @param g\n   */\n  setCloseGuard(guard: CloseGuard): void {\n    this.closeGuard = guard;\n  }\n\n  /**\n   *  Close the modal with a return value, i.e: result.\n   */\n  close(result: any = null) {\n    const _close = () => {\n      this.destroy();\n      this._resultDeferred.resolve(result);\n    };\n    this._fireHook<boolean>('beforeClose')\n      .then(value => value !== true && _close())\n      .catch(_close);\n  }\n\n  /**\n   *  Close the modal without a return value, i.e: cancelled.\n   *  This call is automatically invoked when a user either:\n   *  - Presses an exit keyboard key (if configured).\n   *  - Clicks outside of the modal window (if configured).\n   *  Usually, dismiss represent a Cancel button or a X button.\n   */\n  dismiss() {\n    const _dismiss = () => {\n      this.destroy();\n      this._resultDeferred.promise.catch(() => {});\n      this._resultDeferred.reject();\n    };\n    this._fireHook<boolean>('beforeDismiss')\n      .then(value => value !== true && _dismiss())\n      .catch(_dismiss);\n  }\n\n  /**\n   * Gracefully close the overlay/dialog with a rejected result.\n   * Does not trigger canDestroy on the overlay.\n   */\n  bailOut() {\n    if (this.destroyed !== true) {\n      this.destroyed = true;\n      this._onDestroy.next(null);\n      this._onDestroy.complete();\n      this._resultDeferred.reject(new DialogBailOutError());\n    }\n  }\n\n  destroy() {\n    if (this.destroyed !== true) {\n      this.destroyed = true;\n\n      if (typeof this.overlayRef.instance.canDestroy === 'function') {\n        this.overlayRef.instance.canDestroy()\n          .catch( () => {})\n          .then ( () => this._destroy() );\n      } else {\n        this._destroy();\n      }\n    }\n  }\n\n  private _destroy(): void {\n    this._onDestroy.next(null);\n    this._onDestroy.complete();\n    this.overlayRef.destroy()\n  }\n\n  private _fireHook<T>(name: 'beforeClose' | 'beforeDismiss'): Promise<T> {\n    const gurad = this.closeGuard,\n          fn: Function = gurad && typeof gurad[name] === 'function' && gurad[name];\n\n    return Promise.resolve(fn ? fn.call(gurad) : false);\n  }\n}\n","import {\n  ComponentRef,\n  Injector,\n  ViewContainerRef,\n  TemplateRef,\n  Type\n} from '@angular/core';\n\nimport { ModalOverlay } from '../overlay/index';\nimport { DialogRef } from './dialog-ref';\nimport { OverlayContext } from '../models/overlay-context';\n\nexport enum DROP_IN_TYPE {\n  alert,\n  prompt,\n  confirm\n}\n\nexport type WideVCRef = ViewContainerRef | string;\n\nexport type ContainerContent = string | TemplateRef<any> | Type<any>;\n\nexport interface OverlayPlugin extends Function {\n  <T>(component: any, dialogRef: DialogRef<T>, config: OverlayConfig): DialogRef<any>;\n}\n\nexport interface OverlayConfig {\n  /**\n   * The context for the modal, attached to the dialog instance, DialogRef.context.\n   * Default: {}\n   */\n  context?: OverlayContext;\n\n  injector?: Injector;\n\n  /**\n   * The element to block using the modal.\n   */\n  viewContainer?: WideVCRef;\n\n  renderer?: OverlayRenderer;\n\n  /**\n   * Not used yet.\n   */\n  overlayPlugins?: OverlayPlugin | Array<OverlayPlugin>;\n}\n\nexport interface ModalComponent<T> {\n  dialog: DialogRef<T>;\n}\n\nexport interface CloseGuard {\n  /**\n   * Invoked before a modal is dismissed.\n   */\n  beforeDismiss?(): boolean | Promise<boolean>;\n\n  /**\n   * Invoked before a modal is closed.\n   */\n  beforeClose?(): boolean | Promise<boolean>;\n}\n\nexport abstract class OverlayRenderer {\n  public abstract render(dialogRef: DialogRef<any>,\n                         vcRef: ViewContainerRef,\n                         injector?: Injector): ComponentRef<ModalOverlay>;\n}\n","import { ViewContainerRef } from '@angular/core';\n\nconst vcRefCollection: { [key: string]: ViewContainerRef[] } = {};\n\n\nfunction getVCRef(key: string): ViewContainerRef[] {\n  return vcRefCollection[key] ? vcRefCollection[key].slice() : [];\n}\n\nfunction setVCRef(key: string, vcRef: ViewContainerRef): void {\n  if (!vcRefCollection.hasOwnProperty(key)) {\n    vcRefCollection[key] = [];\n  }\n  vcRefCollection[key].push(vcRef);\n}\n\nfunction delVCRef(key: string, vcRef?: ViewContainerRef): void {\n    if (!vcRef) {\n      vcRefCollection[key] = [];\n    } else {\n      const coll = vcRefCollection[key] || [],\n            idx = coll.indexOf(vcRef);\n      if (idx > -1) {\n        coll.splice(idx, 1);\n      }\n    }\n}\n\n/**\n * A Simple store that holds a reference to ViewContainerRef instances by a user defined key.\n * This, with the OverlayTarget directive makes it easy to block the overlay inside an element\n * without having to use the angular query boilerplate.\n */\nexport const vcRefStore = { getVCRef, setVCRef, delVCRef };\n","import {\n  Directive,\n  Input,\n  ElementRef,\n  ViewContainerRef,\n  OnDestroy\n} from '@angular/core';\n\nimport { DialogRef } from '../models/dialog-ref';\nimport { vcRefStore } from '../models/vc-ref-store';\nimport { Overlay } from \"./overlay.service\";\n\n/**\n * A directive use to signal the overlay that the host of this directive\n * is a dialog boundary, i.e: over click outside of the element should close the modal\n * (if non blocking)\n */\n@Directive({\n  selector: '[overlayDialogBoundary]'\n})\nexport class OverlayDialogBoundary {\n  constructor(el: ElementRef, dialogRef: DialogRef<any>) {\n    if (dialogRef && el.nativeElement) {\n      dialogRef.overlayRef.instance.setClickBoundary(el.nativeElement);\n    }\n  }\n\n}\n\n@Directive({\n  selector: '[overlayTarget]'\n})\nexport class OverlayTarget implements OnDestroy {\n  @Input('overlayTarget') set targetKey(value: string) {\n    this._targetKey = value;\n    if (value) {\n      vcRefStore.setVCRef(value, this.vcRef);\n    }\n  }\n\n  private _targetKey: string;\n\n  constructor(private vcRef: ViewContainerRef) {}\n\n  ngOnDestroy() {\n    if (this._targetKey) {\n      vcRefStore.delVCRef(this._targetKey, this.vcRef);\n    }\n  }\n}\n","import { Observable, Subject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport {\n  ComponentRef,\n  ElementRef,\n  OnDestroy,\n  Renderer2\n} from '@angular/core';\n\nimport { createComponent, CreateComponentArgs } from '../framework/createComponent';\n\nconst BROWSER_PREFIX = ['webkit', 'moz', 'MS', 'o', ''];\n\nfunction register(eventName, element, cb) {\n  BROWSER_PREFIX.forEach( p => {\n    element.addEventListener(p ? p + eventName : eventName.toLowerCase(), cb, false);\n  });\n}\n\n/**\n * A base class for supporting dynamic components.\n * There are 3 main support areas:\n * 1 - Easy wrapper for dynamic styling via CSS classes and inline styles.\n * 2 - Easy wrapper for interception of transition/animation end events.\n * 3 - Easy wrapper for component creation and injection.\n *\n * Dynamic css is done via direct element manipulation (via renderer), it does not use change detection\n * or binding. This is to allow better control over animation.\n *\n * Animation support is limited, only transition/keyframes END even are notified.\n * The animation support is needed since currently the angular animation module is limited as well and\n * does not support CSS animation that are not pre-parsed and are not in the styles metadata of a component.\n *\n * Capabilities: Add/Remove styls, Add/Remove classes, listen to animation/transition end event,\n * add components\n */\nexport class BaseDynamicComponent implements OnDestroy {\n  animationEnd$: Observable<TransitionEvent | AnimationEvent>;\n\n  protected animationEnd: Subject<TransitionEvent | AnimationEvent>;\n\n  constructor(protected el: ElementRef,\n              protected renderer: Renderer2) {}\n\n  activateAnimationListener() {\n    if (this.animationEnd) return;\n    this.animationEnd = new Subject<TransitionEvent | AnimationEvent>();\n    this.animationEnd$ = this.animationEnd.asObservable();\n    register('TransitionEnd', this.el.nativeElement, (e: TransitionEvent) => this.onEnd(e));\n    register('AnimationEnd', this.el.nativeElement, (e: AnimationEvent) => this.onEnd(e));\n  }\n\n  /**\n   * Set a specific inline style on the overlay host element.\n   * @param prop The style key\n   * @param value The value, undefined to remove\n   */\n  setStyle(prop: string, value: string): this {\n    this.renderer.setStyle(this.el.nativeElement, prop, value);\n    return this;\n  }\n\n  forceReflow() {\n    this.el.nativeElement.offsetWidth;\n  }\n\n  addClass(css: string, forceReflow: boolean = false): void {\n    css.split(' ')\n      .forEach( c => this.renderer.addClass(this.el.nativeElement, c) );\n    if (forceReflow) this.forceReflow();\n  }\n\n  removeClass(css: string, forceReflow: boolean = false): void {\n    css.split(' ')\n      .forEach( c => this.renderer.removeClass(this.el.nativeElement, c) );\n    if (forceReflow) {\n      this.forceReflow();\n    }\n  }\n\n  ngOnDestroy(): void {\n    if (this.animationEnd && !this.animationEnd.closed) {\n      this.animationEnd.complete();\n    }\n  }\n\n  myAnimationEnd$(): Observable<AnimationEvent | TransitionEvent> {\n    return this.animationEnd$.pipe(\n      filter(e => e.target === this.el.nativeElement)\n    );\n  }\n\n  /**\n   * Add a component, supply a view container ref.\n   * Note: The components vcRef will result in a sibling.\n   */\n  protected _addComponent<T>(instructions: CreateComponentArgs): ComponentRef<T> {\n    const cmpRef = createComponent(instructions);\n    cmpRef.changeDetectorRef.detectChanges();\n\n    return cmpRef;\n  }\n\n\n  private onEnd(event: TransitionEvent | AnimationEvent): void {\n\n    if (!this.animationEnd.closed) {\n      this.animationEnd.next(event);\n    }\n  }\n\n}\n","import {\n  Component,\n  ElementRef,\n  ViewEncapsulation,\n  Renderer2\n} from '@angular/core';\n\nimport { BaseDynamicComponent } from './base-dynamic-component';\n\n/**\n * Represents the modal backdrop shaped by CSS.\n */\n@Component({\n  selector: 'css-backdrop',\n  host: {\n    '[attr.class]': 'cssClass',\n    '[attr.style]': 'styleStr'\n  },\n  encapsulation: ViewEncapsulation.None,\n  template: ``\n})\nexport class CSSBackdrop extends BaseDynamicComponent {\n  public cssClass: string;\n  public styleStr: string;\n\n  constructor(el: ElementRef, renderer: Renderer2) {\n    super(el, renderer);\n    this.activateAnimationListener();\n\n    const style = {\n      position: 'absolute',\n      top: 0,\n      left: 0,\n      width: '100%',\n      height: '100%'\n    };\n    Object.keys(style).forEach( k => this.setStyle(k, style[k]) );\n  }\n}\n","import {\n  Component,\n  ViewEncapsulation,\n  ElementRef,\n  Renderer2\n} from '@angular/core';\n\nimport { BaseDynamicComponent } from './base-dynamic-component';\nimport { DialogRef } from '../models/dialog-ref';\n\n/**\n * A component that acts as a top level container for an open modal window.\n */\n@Component({\n  selector: 'css-dialog-container',\n  host: {\n    'tabindex': '-1',\n    'role': 'dialog'\n  },\n  encapsulation: ViewEncapsulation.None,\n  template: `<ng-content></ng-content>`\n})\nexport class CSSDialogContainer extends BaseDynamicComponent {\n\n  constructor(public dialog: DialogRef<any>, el: ElementRef, renderer: Renderer2) {\n    super(el, renderer);\n    this.activateAnimationListener();\n  }\n\n}\n","declare const clearTimeout: any;\n\nimport {\n  Component,\n  ComponentRef,\n  ElementRef,\n  EmbeddedViewRef,\n  Injector,\n  ViewChild,\n  ViewContainerRef,\n  ViewEncapsulation,\n  Renderer2,\n  TemplateRef\n} from '@angular/core';\n\nimport { PromiseCompleter, supportsKey } from '../framework/utils';\nimport { DialogRef } from '../models/dialog-ref';\nimport { ContainerContent } from '../models/tokens';\nimport { BaseDynamicComponent } from '../components/index';\n\n// TODO: use DI factory for this.\n// TODO: consolidate dup code\nconst isDoc: boolean = !(typeof document === 'undefined' || !document);\n\nexport interface EmbedComponentConfig {\n  component: any;\n  projectableNodes?: any[][];\n}\n\n/**\n * Represents the modal overlay.\n */\n@Component({\n  selector: 'modal-overlay',\n  host: {\n    '(body:keydown)': 'documentKeypress($event)'\n  },\n  encapsulation: ViewEncapsulation.None,\n  template: `<div #container>\n  <ng-template #innerView></ng-template>\n</div>\n<ng-template #template let-ctx>\n  <ng-container *ngComponentOutlet=\"ctx.component; injector: ctx.injector; content: ctx.projectableNodes\"></ng-container>\n</ng-template>`\n})\nexport class ModalOverlay extends BaseDynamicComponent {\n  private beforeDestroyHandlers: Array<() => Promise<void>>;\n\n  @ViewChild('container', {read: ElementRef}) public container: ElementRef;\n  @ViewChild('innerView', {read: ViewContainerRef}) public innerVcr: ViewContainerRef;\n  @ViewChild('template') public template: TemplateRef<any>;\n\n  constructor(private dialogRef: DialogRef<any>,\n              private vcr: ViewContainerRef,\n              el: ElementRef,\n              renderer: Renderer2) {\n    super(el, renderer);\n    this.activateAnimationListener();\n  }\n\n  /**\n   * @internal\n   */\n  getProjectables<T> (content: ContainerContent): any[][] {\n\n    let nodes: any[];\n    if (typeof content === 'string') {\n      nodes = [ [this.renderer.createText(`${content}`)] ];\n    } else if (content instanceof TemplateRef) {\n      nodes = [ this.vcr.createEmbeddedView(content, { $implicit: this.dialogRef.context, dialogRef: this.dialogRef }).rootNodes ];\n    } else {\n      nodes = [ this.embedComponent({ component: content }).rootNodes ];\n    }\n\n    return nodes;\n  }\n\n  embedComponent(config: EmbedComponentConfig): EmbeddedViewRef<EmbedComponentConfig> {\n    const ctx: EmbedComponentConfig & { injector: Injector } = <any>config;\n\n    return this.vcr.createEmbeddedView(this.template, <any> {\n      $implicit: ctx\n    });\n  }\n\n  addComponent<T>(type: any, projectableNodes: any[][] = []): ComponentRef<T> {\n    return super._addComponent<T>({\n      component: type,\n      vcRef: this.innerVcr,\n      projectableNodes\n    });\n  }\n\n  fullscreen(): void {\n    const style = {\n      position: 'fixed',\n      top: 0,\n      left: 0,\n      bottom: 0,\n      right: 0,\n      'z-index': 1500\n    };\n    Object.keys(style).forEach( k => this.setStyle(k, style[k]) );\n  }\n\n  insideElement(): void {\n    const style = {\n      position: 'absolute',\n      overflow: 'hidden',\n      width: '100%',\n      height: '100%',\n      top: 0,\n      left: 0,\n      bottom: 0,\n      right: 0\n    };\n    Object.keys(style).forEach( k => this.setStyle(k, style[k]) );\n  }\n\n  /**\n   * Set a specific inline style for the container of the whole dialog component\n   * The dialog component root element is the host of this component, it contains only 1 direct\n   * child which is the container.\n   *\n   * Structure:\n   *\n   * ```html\n   * <modal-overlay>\n   *   <div>\n   *     <!-- BACKDROP ELEMENT -->\n   *     <!-- DIALOG CONTAINER ELEMENT -->\n   *   </div>\n   * </modal-overlay>\n   * ```\n   *\n   * @param prop The style key\n   * @param value The value, undefined to remove\n   */\n  setContainerStyle(prop: string, value: string): this {\n    this.renderer.setStyle(this.container.nativeElement, prop, value);\n    return this;\n  }\n\n  /**\n   * Define an element that click inside it will not trigger modal close.\n   * Since events bubble, clicking on a dialog will bubble up to the overlay, a plugin\n   * must define an element that represent the dialog, the overlay will make sure no to close when\n   * it was clicked.\n   * @param element\n   */\n  setClickBoundary(element: Element): void {\n    let target: Element;\n    const elListener = event => target = event.target as any;\n    const docListener = event => {\n      if (this.dialogRef.context.isBlocking || !this.dialogRef.overlay.isTopMost(this.dialogRef) ) {\n        return;\n      }\n\n      let current: any = event.target;\n\n      // on click, this will hit.\n      if (current === target) return;\n\n      // on mouse down -> drag -> release the current might not be 'target', it might be\n      // a sibling or a child (i.e: not part of the tree-up direction). It might also be a release\n      // outside the dialog... so we compare to the boundary element\n      do {\n        if (current === element) {\n          return;\n        }\n      } while (current.parentNode && ( current = current.parentNode ));\n      this.dialogRef.dismiss();\n    };\n\n    if (isDoc) {\n      this.dialogRef.onDestroy.subscribe(() => {\n        element.removeEventListener('click', elListener, false);\n        element.removeEventListener('touchstart', elListener, false);\n        document.removeEventListener('click', docListener, false);\n        document.removeEventListener('touchend', docListener, false);\n      });\n\n\n      setTimeout(() => {\n        element.addEventListener('mousedown', elListener, false);\n        element.addEventListener('touchstart', docListener, false);\n        document.addEventListener('click', docListener, false);\n        document.addEventListener('touchend', docListener, false);\n      });\n    }\n  }\n\n  /**\n   * Temp workaround for animation where destruction of the top level component does not\n   * trigger child animations. Solution should be found either in animation module or in design\n   * of the modal component tree.\n   */\n  canDestroy(): Promise<void> {\n    const completer = new PromiseCompleter<void>();\n\n    if (!Array.isArray(this.beforeDestroyHandlers)) {\n      completer.resolve();\n    } else {\n\n      // run destroy notification but protect against halt.\n      let id = setTimeout(() => {\n        id = null;\n        completer.reject();\n      }, 1000);\n\n      const resolve = () => {\n        if (id === null) return;\n\n        clearTimeout(id);\n        completer.resolve();\n      };\n\n      Promise.all(this.beforeDestroyHandlers.map( fn => fn() ))\n        .then(resolve)\n        .catch(resolve);\n\n    }\n\n    return completer.promise;\n  }\n\n  /**\n   * A handler running before destruction of the overlay\n   * use to delay destruction due to animation.\n   * This is part of the workaround for animation, see canDestroy.\n   *\n   * NOTE: There is no guarantee that the listeners will fire, use dialog.onDestory for that.\n   * @param fn\n   */\n  beforeDestroy(fn: () => Promise<void>) {\n    if (!this.beforeDestroyHandlers) {\n      this.beforeDestroyHandlers = [];\n    }\n    this.beforeDestroyHandlers.push(fn);\n  }\n\n  documentKeypress(event: KeyboardEvent) {\n    // check that this modal is the last in the stack.\n    if (!this.dialogRef.overlay.isTopMost(this.dialogRef)) return;\n\n\n    if (supportsKey(event.keyCode, <any>this.dialogRef.context.keyboard)) {\n      this.dialogRef.dismiss();\n    }\n  }\n\n  ngOnDestroy(): void {\n    super.ngOnDestroy();\n    if (this.dialogRef.destroyed !== true) {\n      // if we're here the overlay is destroyed by an external event that is not user invoked.\n      // i.e: The user did no call dismiss or close and dialogRef.destroy() did not invoke.\n      // this will happen when routing or killing an element containing a blocked overlay (ngIf)\n      // we bail out, i.e gracefully shutting down.\n      this.dialogRef.bailOut();\n    }\n  }\n}\n","import { DialogRef } from './dialog-ref';\n\nconst BASKET_GROUP = {};\n\n/**\n * A dumb stack implementation over an array.\n */\nexport class DialogRefStack<T> {\n  private _stack: DialogRef<T>[];\n  private _stackMap: Map<DialogRef<T>, any>;\n\n  get length(): number {\n    return this._stack.length;\n  }\n\n  constructor() {\n    this._stack = [];\n    this._stackMap = new Map<DialogRef<T>, any>();\n  }\n\n  closeAll(result: any = null): void {\n    for (let i=0, len=this._stack.length; i<len; i++) {\n      this._stack.pop().close(result);\n    }\n  }\n\n  push(dialogRef: DialogRef<T>, group?: any): void {\n    if (this._stack.indexOf(dialogRef) === -1) {\n      this._stack.push(dialogRef);\n      this._stackMap.set(dialogRef, group || BASKET_GROUP);\n    }\n  }\n\n  /**\n   * Push a DialogRef into the stack and manage it so when it's done\n   * it will automatically kick itself out of the stack.\n   * @param dialogRef\n   */\n  pushManaged(dialogRef: DialogRef<T>, group?: any): void {\n    this.push(dialogRef, group);\n    dialogRef.onDestroy.subscribe(() => this.remove(dialogRef));\n  }\n\n  pop(): DialogRef<T> {\n    const dialogRef = this._stack.pop();\n    this._stackMap.delete(dialogRef);\n    return dialogRef;\n  }\n\n  /**\n   * Remove a DialogRef from the stack.\n   * @param dialogRef\n   */\n  remove(dialogRef: DialogRef<T>): void {\n    let idx = this.indexOf(dialogRef);\n    if (idx > -1) {\n      this._stack.splice(idx, 1);\n      this._stackMap.delete(dialogRef);\n    }\n  }\n\n  index(index: number): DialogRef<T> {\n    return this._stack[index];\n  }\n\n  indexOf(dialogRef: DialogRef<T>): number {\n     return this._stack.indexOf(dialogRef);\n  }\n\n  groupOf(dialogRef: DialogRef<T>): any {\n    return this._stackMap.get(dialogRef);\n  }\n\n  groupBy(group: any): DialogRef<T>[] {\n    let arr = [];\n    if (group) {\n      this._stackMap.forEach( (value, key) => {\n        if (value === group) {\n          arr.push(key);\n        }\n      });\n    }\n    return arr;\n  }\n\n  groupLength(group: any): number {\n    let count = 0;\n    if (group) {\n      this._stackMap.forEach( (value) => {\n        if (value === group) {\n          count++;\n        }\n      });\n    }\n    return count;\n  }\n}\n","import { ViewContainerRef, Injectable, Injector } from '@angular/core';\n\nimport { OverlayRenderer, OverlayConfig } from '../models/tokens';\nimport { DialogRefStack } from '../models/dialog-ref-stack';\nimport { vcRefStore } from '../models/vc-ref-store';\nimport { DialogRef } from '../models/dialog-ref';\nimport { OverlayContext } from '../models/overlay-context';\n\nconst _stack = new DialogRefStack<any>();\n\n@Injectable()\nexport class Overlay {\n  get stackLength(): number {\n    return _stack.length;\n  }\n\n  constructor(private _modalRenderer: OverlayRenderer, protected injector: Injector) {\n  }\n\n  /**\n   * Check if a given DialogRef is the top most ref in the stack.\n   * TODO: distinguish between body modal vs in element modal.\n   * @param dialogRef\n   */\n  isTopMost(dialogRef: DialogRef<any>): boolean {\n    return _stack.indexOf(dialogRef) === _stack.length - 1;\n  }\n\n  stackPosition(dialogRef: DialogRef<any>) {\n    return _stack.indexOf(dialogRef);\n  }\n\n  groupStackLength(dialogRef: DialogRef<any>): number {\n    return _stack.groupLength(_stack.groupOf(dialogRef));\n  }\n\n  closeAll(result: any = null): void {\n      _stack.closeAll(result);\n  }\n\n  /**\n   * Creates an overlay and returns a dialog ref.\n   * @param config instructions how to create the overlay\n   * @param group A token to associate the new overlay with, used for reference (stacks usually)\n   */\n  open<T extends OverlayContext>(config: OverlayConfig, group?: any): DialogRef<T>[] {\n    let viewContainer = config.viewContainer,\n        containers: Array<ViewContainerRef> = [];\n\n    if (typeof viewContainer === 'string') {\n      containers = vcRefStore.getVCRef(viewContainer as string);\n    } else if (Array.isArray(viewContainer)) {\n      containers = viewContainer as any;\n    } else if (viewContainer) {\n      containers = [viewContainer] as any;\n    } else {\n      containers = [null];\n    }\n\n    return containers\n      .map( vc => this.createOverlay(config.renderer || this._modalRenderer, vc, config, group));\n  }\n\n  private createOverlay(renderer: OverlayRenderer,\n                        vcRef: ViewContainerRef,\n                        config: OverlayConfig,\n                        group: any): DialogRef<any> {\n\n    if (config.context) {\n      config.context.normalize();\n    }\n\n    if (!config.injector) {\n      config.injector = this.injector;\n    }\n\n    let dialog = new DialogRef<any>(this, config.context || {});\n    dialog.inElement = config.context && !!config.context.inElement;\n\n    let cmpRef = renderer.render(dialog, vcRef, config.injector);\n\n    Object.defineProperty(dialog, 'overlayRef', {value: cmpRef});\n    _stack.pushManaged(dialog, group);\n\n    return dialog;\n  }\n}\n","import {\n  ApplicationRef,\n  ViewContainerRef,\n  ComponentRef,\n  Injector,\n  Injectable\n} from '@angular/core';\n\nimport { createComponent } from '../framework/createComponent';\nimport { DialogRef } from '../models/dialog-ref';\nimport { OverlayRenderer } from '../models/tokens';\nimport { ModalOverlay } from '../overlay/index';\n\n@Injectable()\nexport class DOMOverlayRenderer implements OverlayRenderer {\n\n  private isDoc: boolean = !(typeof document === 'undefined' || !document);\n\n  constructor(private appRef: ApplicationRef, private injector: Injector) { }\n\n  render(dialog: DialogRef<any>, vcRef: ViewContainerRef, injector?: Injector): ComponentRef<ModalOverlay> {\n    if (!injector) {\n      injector = this.injector;\n    }\n\n    const cmpRef = createComponent({\n      component: ModalOverlay,\n      vcRef,\n      injector: Injector.create([\n        { provide: DialogRef, useValue: dialog }\n      ], injector)\n    });\n\n    if (!vcRef) {\n      this.appRef.attachView(cmpRef.hostView);\n\n      // TODO: doesn't look like this is needed, explore. leaving now to be on the safe side.\n      dialog.onDestroy.subscribe( () => this.appRef.detachView(cmpRef.hostView) );\n    }\n\n    if (vcRef && dialog.inElement) {\n      vcRef.element.nativeElement.appendChild(cmpRef.location.nativeElement);\n    } else if (this.isDoc) {\n      document.body.appendChild(cmpRef.location.nativeElement);\n    }\n\n    return cmpRef;\n  }\n}\n\n","import { ComponentRef } from '@angular/core';\n\nimport { Overlay } from '../overlay/index';\nimport { Class } from '../framework/utils';\nimport { OverlayConfig, ContainerContent } from '../models/tokens';\nimport { DialogRef } from '../models/dialog-ref';\nimport { ModalControllingContextBuilder } from '../models/overlay-context';\n\nexport function unsupportedDropInError(dropInName: string): Error {\n  return new Error(`Unsupported Drop-In ${dropInName}`);\n}\n\nexport abstract class Modal {\n  constructor(public overlay: Overlay) { }\n\n\n  alert(): ModalControllingContextBuilder<any> {\n    throw unsupportedDropInError('alert');\n  }\n\n  prompt(): ModalControllingContextBuilder<any> {\n    throw unsupportedDropInError('prompt');\n  }\n\n  confirm(): ModalControllingContextBuilder<any> {\n    throw unsupportedDropInError('confirm');\n  }\n\n  /**\n   * Opens a modal window inside an existing component.\n   * @param content The content to display, either string, template ref or a component.\n   * @param config Additional settings.\n   */\n  open(content: ContainerContent, config?: OverlayConfig): DialogRef<any> {\n    config = config || {} as any;\n    let dialogs = this.overlay.open(config, this.constructor);\n\n    if (dialogs.length > 1) {\n      console.warn(`Attempt to open more then 1 overlay detected.\n      Multiple modal copies are not supported at the moment, \n      only the first viewContainer will display.`);\n    }\n    // TODO:  Currently supporting 1 view container, hence working on dialogs[0].\n    //        upgrade to multiple containers.\n    return this.create(dialogs[0], content)\n  }\n\n  /**\n   * A Hook that enables derived classes to add content to the overlay.\n   * @param dialogRef\n   * @param type\n   */\n  protected abstract create(dialogRef: DialogRef<any>, type: ContainerContent): DialogRef<any>;\n\n\n  protected createBackdrop<T>(dialogRef: DialogRef<any>, BackdropComponent: Class<T>): ComponentRef<T> {\n    return dialogRef.overlayRef.instance.addComponent<T>(BackdropComponent);\n  }\n\n  protected createContainer<T>(\n    dialogRef: DialogRef<any>,\n    ContainerComponent: Class<T>,\n    content: ContainerContent): ComponentRef<T> {\n\n    let nodes: any[] = dialogRef.overlayRef.instance.getProjectables(content);\n    return dialogRef.overlayRef.instance.addComponent<T>(ContainerComponent, nodes);\n  }\n\n}\n","// heavily inspired by:\n// http://www.bennadel.com/blog/3025-creating-custom-dom-and-host-event-bindings-in-angular-2-beta-6.htm\n\nimport { Injectable } from '@angular/core';\nimport { EventManager } from '@angular/platform-browser';\nimport { noop } from '../framework/utils';\n\n// TODO: use DI factory for this.\n// TODO: consolidate dup code\nconst isDoc: boolean = !(typeof document === 'undefined' || !document);\n\nconst eventMap = {\n    clickOutside: 'click',\n    mousedownOutside: 'mousedown',\n    mouseupOutside: 'mouseup',\n    mousemoveOutside: 'mousemove'\n};\n\n/**\n * An event handler factory for event handlers that bubble the event to a given handler\n * if the event target is not an ancestor of the given element.\n * @param element\n * @param handler\n */\nfunction bubbleNonAncestorHandlerFactory(element: HTMLElement, handler: (event) => void) {\n    return (event) => {\n        let current = event.target;\n        do {\n            if (current === element) {\n                return;\n            }\n        } while (current.parentNode && ( current = current.parentNode ));\n\n        handler(event);\n    };\n}\n\n@Injectable()\nexport class DOMOutsideEventPlugin { // extends EventManagerPlugin\n    manager: EventManager;\n\n    constructor() {\n    if (!isDoc || typeof document.addEventListener !== 'function') {\n        this.addEventListener = noop as any;\n    }\n    }\n\n    supports(eventName: string): boolean {\n        return eventMap.hasOwnProperty(eventName);\n    }\n\n    addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n        const zone = this.manager.getZone();\n\n        // A Factory that registers the event on the document, instead of the element.\n        // the handler is created at runtime, and it acts as a propagation/bubble predicate, it will\n        // bubble up the event (i.e: execute our original event handler) only if the event targer\n        // is an ancestor of our element.\n        // The event is fired inside the angular zone so change detection can kick into action.\n        const onceOnOutside = () => {\n            const listener =\n              bubbleNonAncestorHandlerFactory(element, evt => zone.runGuarded(() => handler(evt)));\n\n            // mimic BrowserDomAdapter.onAndCancel\n            document.addEventListener(eventMap[eventName], listener, false);\n            return () => document.removeEventListener(eventMap[eventName], listener, false);\n        };\n\n        // we run the event registration for the document in a different zone, this will make sure\n        // change detection is off.\n        // It turns out that if a component that use DOMOutsideEventPlugin is built from a click\n        // event, we might get here before the event reached the document, causing a quick false\n        // positive handling (when stopPropagation() was'nt invoked). To workaround this we wait\n        // for the next vm turn and register.\n        // Event registration returns a dispose function for that event, angular use it to clean\n        // up after component get's destroyed. Since we need to return a dispose function\n        // synchronously we have to put a wrapper for it since we will get it asynchronously,\n        // i.e: after we need to return it.\n        //\n        return zone.runOutsideAngular(() => {\n            let fn: Function;\n            setTimeout(() => fn = onceOnOutside(), 0);\n            return () => {\n                if (fn) fn();\n            };\n        });\n    }\n\n}\n","import { FluentAssign, FluentAssignMethod } from './../framework/fluent-assign';\nimport { extend, arrayUnion } from './../framework/utils';\nimport { DialogRef } from './dialog-ref';\nimport { WideVCRef, OverlayConfig } from './tokens';\n\nexport const DEFAULT_VALUES = {\n  inElement: false,\n  isBlocking: true,\n  keyboard: [27],\n  supportsKey: function supportsKey(keyCode: number): boolean {\n    return (<Array<number>>this.keyboard).indexOf(keyCode) > -1;\n  }\n};\n\nconst DEFAULT_SETTERS = [\n  'inElement',\n  'isBlocking',\n  'keyboard'\n];\n\nexport class OverlayContext {\n  /**\n   * Describes if the modal is rendered within the container element.\n   * The container element is the ViewContainerRef supplied.\n   * Defaults to false.\n   */\n  inElement: boolean;\n\n  /**\n   * Describes if the modal is blocking modal.\n   * A Blocking modal is not closable by clicking outside of the modal window.\n   * Defaults to false.\n   */\n  isBlocking: boolean;\n\n  /**\n   * Keyboard value/s that close the modal.\n   * Accepts either a single numeric value or an array of numeric values.\n   * A modal closed by a keyboard stroke will result in a 'reject' notification from the promise.\n   * Defaults to 27, set `null` implicitly to disable.\n   */\n  keyboard: Array<number> | number;\n\n  normalize(): void {\n    if (this.isBlocking !== false)\n      this.isBlocking = true;\n\n    if (this.keyboard === null) {\n      this.keyboard = [];\n    } else if (typeof this.keyboard === 'number') {\n      this.keyboard = [<number>this.keyboard];\n    } else if (!Array.isArray(<Array<number>>this.keyboard)) {\n      this.keyboard = DEFAULT_VALUES.keyboard;\n    }\n  }\n}\n\n/**\n * A core context builder for a modal window instance, used to define the context upon\n * a modal choose it's behaviour.\n */\nexport class OverlayContextBuilder<T extends OverlayContext> extends FluentAssign<T> {\n  /**\n   * Describes if the modal is rendered within the container element.\n   * The container element is the ViewContainerRef supplied.\n   * Defaults to false.\n   */\n  inElement: FluentAssignMethod<boolean, this>;\n\n  /**\n   * Describes if the modal is blocking modal.\n   * A Blocking modal is not closable by clicking outside of the modal window.\n   * Defaults to false.\n   */\n  isBlocking: FluentAssignMethod<boolean, this>;\n\n  /**\n   * Keyboard value/s that close the modal.\n   * Accepts either a single numeric value or an array of numeric values.\n   * A modal closed by a keyboard stroke will result in a 'reject' notification from the promise.\n   * Defaults to 27, set `null` implicitly to disable.\n   */\n  keyboard: FluentAssignMethod<Array<number> | number, this>;\n\n\n  constructor(defaultValues: T | T[] = undefined,\n              initialSetters: string[] = undefined,\n              baseType: new () => T = undefined) {\n    super(\n      extend<any>(DEFAULT_VALUES, defaultValues || {}),\n      arrayUnion<string>(DEFAULT_SETTERS, initialSetters || []),\n      baseType || <any>OverlayContext // https://github.com/Microsoft/TypeScript/issues/7234\n    );\n  }\n\n  /**\n   * Returns an new OverlayConfig with a context property representing the data in this builder.\n   * @param base A base configuration that the result will extend\n   */\n  toOverlayConfig(base?: OverlayConfig): OverlayConfig {\n    return extend(base || {}, {\n      context: this.toJSON()\n    });\n  }\n}\n\nexport interface ModalControllingContextBuilder<T> {\n  open(viewContainer?: WideVCRef): DialogRef<T>;\n}\n\n/**\n * A helper to create an `OverlayConfig` on the fly.\n * Since `OverlayConfig` requires context it means a builder is needed, this process had some boilerplate.\n * When a quick, on the fly overlay config is needed use this helper to avoid that boilerplate.\n *\n * A builder is used as an API to allow setting the context and providing some operations around the modal.\n * When a developers knows the context before hand we can skip this step, this is what this factory is for.\n *\n * @param context The context for the modal\n * @param baseContextType Optional. The type/class of the context. This is the class used to init a new instance of the context\n * @param baseConfig A base configuration that the result will extend\n */\nexport function overlayConfigFactory<T>(context: T, baseContextType?: any, baseConfig?: OverlayConfig): OverlayConfig {\n  return new OverlayContextBuilder<T & OverlayContext>(<any>context, undefined, baseContextType).toOverlayConfig(baseConfig);\n}\n","import { FluentAssignMethod } from './../framework/fluent-assign';\nimport { extend, arrayUnion } from './../framework/utils';\nimport { OverlayContext, OverlayContextBuilder } from './overlay-context';\n\nexport const DEFAULT_VALUES = {};\n\nconst DEFAULT_SETTERS = [\n    'message'\n];\n\nexport class ModalContext extends OverlayContext {\n    /**\n     * The core message to display.\n     * A modal might have an extended message (e.g: HTML message) or other fields (e.g: title) but\n     * all models, at core, convey a message thus message is common to all modals.\n     */\n    message: string;\n}\n\n/**\n * A core context builder for a modal window instance, used to define the context upon\n * a modal choose it's behaviour.\n */\nexport class ModalContextBuilder<T extends ModalContext> extends OverlayContextBuilder<T> {\n    /**\n     * The core message to display.\n     * A modal might have an extended message (e.g: HTML message) or other fields (e.g: title) but\n     * all models, at core, convey a message thus message is common to all modals.\n     */\n    message: FluentAssignMethod<string, this>;\n\n    constructor(\n        defaultValues: T | T[] = undefined,\n        initialSetters: string[] = undefined,\n        baseType: new () => T = undefined\n    ) {\n        super(\n            extend<any>(DEFAULT_VALUES, defaultValues || {}),\n            arrayUnion<string>(DEFAULT_SETTERS, initialSetters || []),\n            baseType\n        );\n    }\n}\n","import { ResolvedReflectiveProvider } from '@angular/core';\n\nimport { FluentAssignMethod } from '../framework/fluent-assign';\nimport { ModalComponent, OverlayConfig, WideVCRef } from './tokens';\nimport { Modal } from '../providers/index';\nimport { DialogRef } from './dialog-ref';\nimport { ModalContext, ModalContextBuilder } from './modal-context';\nimport { ModalControllingContextBuilder } from './overlay-context';\n\nimport { arrayUnion } from '../framework/utils';\n\nconst DEFAULT_SETTERS = [\n  'component'\n];\n\nexport class ModalOpenContext extends ModalContext {\n  component: any;\n  modal: Modal;\n}\n\n/**\n * A Modal Context that knows about the modal service, and so can open a modal window on demand.\n * Use the fluent API to configure the preset and then invoke the 'open' method to open a modal\n * based on the context.\n */\nexport abstract class ModalOpenContextBuilder<T extends ModalOpenContext>\n                  extends ModalContextBuilder<T> implements ModalControllingContextBuilder<T> {\n\n  /**\n   * A Class for the footer container.\n   * Default: modal-footer\n   */\n  component: FluentAssignMethod<ModalComponent<T>, this>;\n\n  constructor(defaultValues: T = undefined,\n              initialSetters: string[] = undefined,\n              baseType: new () => T = undefined) {\n    super(\n      defaultValues || <any>{},\n      arrayUnion<string>(DEFAULT_SETTERS, initialSetters || []),\n      baseType\n    );\n  }\n\n  /**\n   * Hook to alter config and return bindings.\n   * @param config\n   */\n  protected $$beforeOpen(config: T): void { }\n\n  /**\n   * Open a modal window based on the configuration of this config instance.\n   * @param viewContainer If set opens the modal inside the supplied viewContainer\n   */\n  open(viewContainer?: WideVCRef): DialogRef<T> {\n    let context: T = this.toJSON();\n\n    if (!(context.modal instanceof Modal)) {\n      return <any>Promise.reject(new Error('Configuration Error: modal service not set.'));\n    }\n\n    this.$$beforeOpen(context);\n\n    let overlayConfig: OverlayConfig = {\n      context: context,\n      viewContainer: viewContainer\n    };\n\n    return context.modal.open(context.component, overlayConfig);\n  }\n}\n","import { ANALYZE_FOR_ENTRY_COMPONENTS, NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\n\nimport { DOMOutsideEventPlugin, DOMOverlayRenderer } from './providers/index';\nimport { OverlayRenderer } from './models/tokens';\nimport { CSSBackdrop, CSSDialogContainer } from './components/index';\nimport {\n  Overlay,\n  ModalOverlay,\n  OverlayDialogBoundary,\n  OverlayTarget\n} from './overlay/index';\n\n@NgModule({\n  declarations: [\n    ModalOverlay,\n    CSSBackdrop,\n    CSSDialogContainer,\n    OverlayDialogBoundary,\n    OverlayTarget\n  ],\n  imports: [ CommonModule ],\n  exports: [\n    CSSBackdrop,\n    CSSDialogContainer,\n    OverlayDialogBoundary,\n    OverlayTarget\n  ],\n  providers: [\n    Overlay\n  ],\n  entryComponents: [\n    ModalOverlay,\n    CSSBackdrop,\n    CSSDialogContainer\n  ]\n})\nexport class ModalModule {\n\n  /**\n   * Returns a ModalModule pre-loaded with a list of dynamically inserted components.\n   * Since dynamic components are not analysed by the angular compiler they must register manually\n   * using entryComponents, this is an easy way to do it.\n   * @param entryComponents A list of dynamically inserted components (dialog's).\n   */\n  static withComponents(entryComponents: Array<Type<any> | any[]>): ModuleWithProviders {\n    return {\n      ngModule: ModalModule,\n      providers: [\n        {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: entryComponents, multi: true}\n      ]\n    }\n  }\n\n  /**\n   * Returns a NgModule for use in the root Module.\n   * @param entryComponents A list of dynamically inserted components (dialog's).\n   */\n  static forRoot(entryComponents?: Array<Type<any> | any[]>): ModuleWithProviders {\n    return {\n      ngModule: ModalModule,\n      providers: [\n        {provide: OverlayRenderer, useClass: DOMOverlayRenderer},\n        {provide: EVENT_MANAGER_PLUGINS, useClass: DOMOutsideEventPlugin, multi: true},\n        {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: entryComponents || [], multi: true}\n      ]\n    };\n  }\n}\n","/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    var scheduler = args[args.length - 1];\n    if (isScheduler(scheduler)) {\n        args.pop();\n        return scheduleArray(args, scheduler);\n    }\n    else {\n        return fromArray(args);\n    }\n}\n//# sourceMappingURL=of.js.map\n","import {Injectable} from \"@angular/core\";\nimport {HttpClient, HttpHeaders} from \"@angular/common/http\";\nimport {CmStationService} from \"./cm-station.service\";\nimport {timeout} from \"rxjs/operators\";\n\n@Injectable()\nexport class CmHttpClient {\n\n    private urlPrefix: string = window.location.protocol  + '//' + window.location.hostname;\n    private defaultTimeout: number = 60000;\n\n    constructor(private http: HttpClient, private stationService: CmStationService) {\n    }\n\n    public getUrlPrefix(){\n        return this.urlPrefix\n    }\n\n    get<T>(url, options?) {\n        options = this.setToken(options);\n        return this.http.get<T>(this.urlPrefix + url, <Object>options).pipe(\n            timeout(this.processTimeout())\n        );\n    }\n\n    getWithoutAuth<T>(url, options?) {\n        return this.http.get<T>(this.urlPrefix + url, <Object>options).pipe(\n            timeout(this.processTimeout())\n        );\n    }\n\n    post<T>(url, data, options?) {\n        options = this.setToken(options);\n        return this.http.post<T>(this.urlPrefix + url, data, <Object>options).pipe(\n            timeout(this.processTimeout())\n        );\n    }\n\n    put(url, data, options?) {\n        return this.http.put(this.urlPrefix + url, data, this.setToken(options)).pipe(\n            timeout(this.processTimeout())\n        );\n    }\n\n    delete(url, body?, options?) {\n        if (body) {\n            if (options) {\n                options.body = body;\n            } else {\n                let headers = new HttpHeaders({\n                    'Content-Type': 'application/json'})\n                options = {\n                    // new RequestOptions({\n                    headers: headers,\n                    body: body\n                };\n            }\n        }\n        return this.http.delete(this.urlPrefix + url, this.setToken(options)).pipe(\n            timeout(this.processTimeout())\n        );\n    }\n\n    private processTimeout() :number {\n        let thisTimeout = localStorage.getItem('timeoutVal') || this.defaultTimeout;\n        if (thisTimeout > 0) {\n            return thisTimeout as number;\n        } else {\n            return this.defaultTimeout;\n        }\n    }\n\n    private setToken(options) {\n        let headers: HttpHeaders = new HttpHeaders();\n        let responseType = 'json';\n        if (options) {\n            options.headers      = options.headers || headers;\n            options.responseType = options.responseType ? options.responseType : responseType ;\n        } else {\n            options = {\n                headers: headers,\n                responseType : responseType\n            };\n        }\n\n        let token = JSON.parse(localStorage.getItem(\"authToken\"));\n\n        if (token && token.access_token) {\n            if(typeof options.headers.set === 'undefined') {\n                options.headers.Authorization = \"Bearer \" + token.access_token;\n            } else {\n                options.headers = options.headers.set(\"Authorization\", \"Bearer \" + token.access_token);\n            }\n        }\n\n        if (this.stationService && this.stationService.station) {\n            options.headers = options.headers.set(\"X-CM-Station\", this.stationService.station)\n        }\n\n        return options;\n    }\n\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationOptions} from './animation_metadata';\nimport {AnimationPlayer} from './players/animation_player';\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the `build()` method to create a programmatic animation using the\n * `animate()` function. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n *   constructor(private _builder: AnimationBuilder) {}\n *\n *   makeAnimation(element: any) {\n *     // first define a reusable animation\n *     const myAnimation = this._builder.build([\n *       style({ width: 0 }),\n *       animate(1000, style({ width: '100px' }))\n *     ]);\n *\n *     // use the returned factory object to create a player\n *     const player = myAnimation.create(element);\n *\n *     player.play();\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport abstract class AnimationBuilder {\n  /**\n   * Builds a factory for producing a defined animation.\n   * @param animation A reusable animation definition.\n   * @returns A factory object that can create a player for the defined animation.\n   * @see `animate()`\n   */\n  abstract build(animation: AnimationMetadata|AnimationMetadata[]): AnimationFactory;\n}\n\n/**\n * A factory object returned from the `AnimationBuilder`.`build()` method.\n *\n * @publicApi\n */\nexport abstract class AnimationFactory {\n  /**\n   * Creates an `AnimationPlayer` instance for the reusable animation defined by\n   * the `AnimationBuilder`.`build()` method that created this factory.\n   * Attaches the new player a DOM element.\n   * @param element The DOM element to which to attach the animation.\n   * @param options A set of options that can include a time delay and\n   * additional developer-defined parameters.\n   */\n  abstract create(element: any, options?: AnimationOptions): AnimationPlayer;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a set of CSS styles for use in an animation style.\n */\nexport interface ÉµStyleData { [key: string]: string|number; }\n\n/**\n * Represents animation-step timing parameters for an animation step.\n * @see `animate()`\n *\n * @publicApi\n */\nexport declare type AnimateTimings = {\n  /**\n   * The full duration of an animation step. A number and optional time unit,\n   * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n   * The default unit is milliseconds.\n   */\n  duration: number,\n  /**\n   * The delay in applying an animation step. A number and optional time unit.\n   * The default unit is milliseconds.\n   */\n  delay: number,\n  /**\n   * An easing style that controls how an animations step accelerates\n   * and decelerates during its run time. An easing function such as `cubic-bezier()`,\n   * or one of the following constants:\n   * - `ease-in`\n   * - `ease-out`\n   * - `ease-in-and-out`\n   */\n  easing: string | null\n};\n\n/**\n * @description Options that control animation styling and timing.\n *\n * The following animation functions accept `AnimationOptions` data:\n *\n * - `transition()`\n * - `sequence()`\n * - `{@link animations/group group()}`\n * - `query()`\n * - `animation()`\n * - `useAnimation()`\n * - `animateChild()`\n *\n * Programmatic animations built using the `AnimationBuilder` service also\n * make use of `AnimationOptions`.\n *\n * @publicApi\n */\nexport declare interface AnimationOptions {\n  /**\n   * Sets a time-delay for initiating an animation action.\n   * A number and optional time unit, such as \"1s\" or \"10ms\" for one second\n   * and 10 milliseconds, respectively.The default unit is milliseconds.\n   * Default value is 0, meaning no delay.\n   */\n  delay?: number|string;\n  /**\n  * A set of developer-defined parameters that modify styling and timing\n  * when an animation action starts. An array of key-value pairs, where the provided value\n  * is used as a default.\n  */\n  params?: {[name: string]: any};\n}\n\n/**\n * Adds duration options to control animation styling and timing for a child animation.\n *\n * @see `animateChild()`\n *\n * @publicApi\n */\nexport declare interface AnimateChildOptions extends AnimationOptions { duration?: number|string; }\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nexport const enum AnimationMetadataType {\n  /**\n   * Associates a named animation state with a set of CSS styles.\n   * See `state()`\n   */\n  State = 0,\n  /**\n   * Data for a transition from one animation state to another.\n   * See `transition()`\n   */\n  Transition = 1,\n  /**\n   * Contains a set of animation steps.\n   * See `sequence()`\n   */\n  Sequence = 2,\n  /**\n   * Contains a set of animation steps.\n   * See `{@link animations/group group()}`\n   */\n  Group = 3,\n  /**\n   * Contains an animation step.\n   * See `animate()`\n   */\n  Animate = 4,\n  /**\n   * Contains a set of animation steps.\n   * See `keyframes()`\n   */\n  Keyframes = 5,\n  /**\n   * Contains a set of CSS property-value pairs into a named style.\n   * See `style()`\n   */\n  Style = 6,\n  /**\n   * Associates an animation with an entry trigger that can be attached to an element.\n   * See `trigger()`\n   */\n  Trigger = 7,\n  /**\n   * Contains a re-usable animation.\n   * See `animation()`\n   */\n  Reference = 8,\n  /**\n   * Contains data to use in executing child animations returned by a query.\n   * See `animateChild()`\n   */\n  AnimateChild = 9,\n  /**\n   * Contains animation parameters for a re-usable animation.\n   * See `useAnimation()`\n   */\n  AnimateRef = 10,\n  /**\n   * Contains child-animation query data.\n   * See `query()`\n   */\n  Query = 11,\n  /**\n   * Contains data for staggering an animation sequence.\n   * See `stagger()`\n   */\n  Stagger = 12\n}\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nexport const AUTO_STYLE = '*';\n\n/**\n * Base for animation data structures.\n *\n * @publicApi\n */\nexport interface AnimationMetadata { type: AnimationMetadataType; }\n\n/**\n * Contains an animation trigger. Instantiated and returned by the\n * `trigger()` function.\n *\n * @publicApi\n */\nexport interface AnimationTriggerMetadata extends AnimationMetadata {\n  /**\n    * The trigger name, used to associate it with an element. Unique within the component.\n    */\n  name: string;\n  /**\n   * An animation definition object, containing an array of state and transition declarations.\n   */\n  definitions: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: {params?: {[name: string]: any}}|null;\n}\n\n/**\n * Encapsulates an animation state by associating a state name with a set of CSS styles.\n * Instantiated and returned by the `state()` function.\n *\n * @publicApi\n */\nexport interface AnimationStateMetadata extends AnimationMetadata {\n  /**\n   * The state name, unique within the component.\n   */\n  name: string;\n  /**\n   *  The CSS styles associated with this state.\n   */\n  styles: AnimationStyleMetadata;\n  /**\n   * An options object containing\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation.\n   */\n  options?: {params: {[name: string]: any}};\n}\n\n/**\n * Encapsulates an animation transition. Instantiated and returned by the\n * `transition()` function.\n *\n * @publicApi\n */\nexport interface AnimationTransitionMetadata extends AnimationMetadata {\n  /**\n   * An expression that describes a state change.\n   */\n  expr: string|\n      ((fromState: string, toState: string, element?: any,\n        params?: {[key: string]: any}) => boolean);\n  /**\n   * One or more animation objects to which this transition applies.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates a reusable animation, which is a collection of individual animation steps.\n * Instantiated and returned by the `animation()` function, and\n * passed to the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationReferenceMetadata extends AnimationMetadata {\n  /**\n   *  One or more animation step objects.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation query. Instantiated and returned by\n * the `query()` function.\n *\n * @publicApi\n */\nexport interface AnimationQueryMetadata extends AnimationMetadata {\n  /**\n   *  The CSS selector for this query.\n   */\n  selector: string;\n  /**\n   * One or more animation step objects.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * A query options object.\n   */\n  options: AnimationQueryOptions|null;\n}\n\n/**\n * Encapsulates a keyframes sequence. Instantiated and returned by\n * the `keyframes()` function.\n *\n * @publicApi\n */\nexport interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n  /**\n   * An array of animation styles.\n   */\n  steps: AnimationStyleMetadata[];\n}\n\n/**\n * Encapsulates an animation style. Instantiated and returned by\n * the `style()` function.\n *\n * @publicApi\n */\nexport interface AnimationStyleMetadata extends AnimationMetadata {\n  /**\n   * A set of CSS style properties.\n   */\n  styles: '*'|{[key: string]: string | number}|Array<{[key: string]: string | number}|'*'>;\n  /**\n   * A percentage of the total animate time at which the style is to be applied.\n   */\n  offset: number|null;\n}\n\n/**\n * Encapsulates an animation step. Instantiated and returned by\n * the `animate()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateMetadata extends AnimationMetadata {\n  /**\n   * The timing data for the step.\n   */\n  timings: string|number|AnimateTimings;\n  /**\n   * A set of styles used in the step.\n   */\n  styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata|null;\n}\n\n/**\n * Encapsulates a child animation, that can be run explicitly when the parent is run.\n * Instantiated and returned by the `animateChild` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateChildMetadata extends AnimationMetadata {\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates a reusable animation.\n * Instantiated and returned by the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateRefMetadata extends AnimationMetadata {\n  /**\n   * An animation reference object.\n   */\n  animation: AnimationReferenceMetadata;\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation sequence.\n * Instantiated and returned by the `sequence()` function.\n *\n * @publicApi\n */\nexport interface AnimationSequenceMetadata extends AnimationMetadata {\n  /**\n   *  An array of animation step objects.\n   */\n  steps: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation group.\n * Instantiated and returned by the `{@link animations/group group()}` function.\n *\n * @publicApi\n */\nexport interface AnimationGroupMetadata extends AnimationMetadata {\n  /**\n   * One or more animation or style steps that form this group.\n   */\n  steps: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates animation query options.\n * Passed to the `query()` function.\n *\n * @publicApi\n */\nexport declare interface AnimationQueryOptions extends AnimationOptions {\n  /**\n   * True if this query is optional, false if it is required. Default is false.\n   * A required query throws an error if no elements are retrieved when\n   * the query is executed. An optional query does not.\n   *\n   */\n  optional?: boolean;\n  /**\n   * A maximum total number of results to return from the query.\n   * If negative, results are limited from the end of the query list towards the beginning.\n   * By default, results are not limited.\n   */\n  limit?: number;\n}\n\n/**\n * Encapsulates parameters for staggering the start times of a set of animation steps.\n * Instantiated and returned by the `stagger()` function.\n *\n * @publicApi\n **/\nexport interface AnimationStaggerMetadata extends AnimationMetadata {\n  /**\n   * The timing data for the steps.\n   */\n  timings: string|number;\n  /**\n   * One or more animation steps.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n}\n\n/**\n * Creates a named animation trigger, containing a  list of `state()`\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions  An animation definition object, containing an array of `state()`\n * and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n *   selector: \"my-component\",\n *   templateUrl: \"my-component-tpl.html\",\n *   animations: [\n *     trigger(\"myAnimationTrigger\", [\n *       state(...),\n *       state(...),\n *       transition(...),\n *       transition(...)\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n *   // notice that `element` and `params` are also available here\n *   return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n *   selector: 'my-component',\n *   templateUrl: 'my-component-tpl.html',\n *   animations: [\n *     trigger('myAnimationTrigger', [\n *       transition(myInlineMatcherFn, [\n *         // the animation sequence code\n *       ]),\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the  `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n *   selector: 'my-component',\n *   template: `\n *     <div [@.disabled]=\"isDisabled\">\n *       <div [@childAnimation]=\"exp\"></div>\n *     </div>\n *   `,\n *   animations: [\n *     trigger(\"childAnimation\", [\n *       // ...\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   isDisabled = true;\n *   exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n *   selector: 'app-component',\n *   templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n *   @HostBinding('@.disabled')\n *   public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nexport function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata {\n  return {type: AnimationMetadataType.Trigger, name, definitions, options: {}};\n}\n\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n *  - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n *  - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of  `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n *  [\n *   style({ background: \"blue\" })),\n *   style({ background: \"red\" }))\n *  ])\n * ```\n *\n * @publicApi\n */\nexport function animate(\n    timings: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata |\n        null = null): AnimationAnimateMetadata {\n  return {type: AnimationMetadataType.Animate, styles, timings};\n}\n\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n *   animate(\"1s\", style({ background: \"black\" })),\n *   animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nexport function group(\n    steps: AnimationMetadata[], options: AnimationOptions | null = null): AnimationGroupMetadata {\n  return {type: AnimationMetadataType.Group, steps, options};\n}\n\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n *   as specified by the timing data.\n *\n * ```typescript\n * sequence([\n *   style({ opacity: 0 }),\n *   animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nexport function sequence(steps: AnimationMetadata[], options: AnimationOptions | null = null):\n    AnimationSequenceMetadata {\n  return {type: AnimationMetadataType.Sequence, steps, options};\n}\n\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation `state`, within an animation `sequence`,\n * or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow a component to animate from\n * a height of 0 up to the height of the parent element:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nexport function style(\n    tokens: '*' | {[key: string]: string | number} |\n    Array<'*'|{[key: string]: string | number}>): AnimationStyleMetadata {\n  return {type: AnimationMetadataType.Style, styles: tokens, offset: null};\n}\n\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n *  - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nexport function state(\n    name: string, styles: AnimationStyleMetadata,\n    options?: {params: {[name: string]: any}}): AnimationStateMetadata {\n  return {type: AnimationMetadataType.State, name, styles, options};\n}\n\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n *   style({ backgroundColor: \"red\", offset: 0 }),\n *   style({ backgroundColor: \"blue\", offset: 0.2 }),\n *   style({ backgroundColor: \"orange\", offset: 0.3 }),\n *   style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n *   style({ backgroundColor: \"red\" }) // offset = 0\n *   style({ backgroundColor: \"blue\" }) // offset = 0.33\n *   style({ backgroundColor: \"orange\" }) // offset = 0.66\n *   style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n  return {type: AnimationMetadataType.Keyframes, steps};\n}\n\n/**\n * Declares an animation transition as a sequence of animation steps to run when a given\n * condition is satisfied. The condition is a Boolean expression or function that compares\n * the previous and current animation states, and returns true if this transition should occur.\n * When the state criteria of a defined transition are met, the associated animation is\n * triggered.\n *\n * @param stateChangeExpr A Boolean expression or function that compares the previous and current\n * animation states, and returns true if this transition should occur. Note that  \"true\" and \"false\"\n * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the\n * animation trigger element.\n * The animation steps run when the expression evaluates to true.\n *\n * - A state-change string takes the form \"state1 => state2\", where each side is a defined animation\n * state, or an asterix (*) to refer to a dynamic start or end state.\n *   - The expression string can contain multiple comma-separated statements;\n * for example \"state1 => state2, state3 => state4\".\n *   - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,\n * equivalent to  \"void => *\"  and \"* => void\".\n *   - Special values `:increment` and `:decrement` initiate a transition when a numeric value has\n * increased or decreased in value.\n * - A function is executed each time a state change occurs in the animation trigger element.\n * The animation steps run when the function returns true.\n *\n * @param steps One or more animation objects, as returned by the `animate()` or\n * `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the animation,\n * and additional developer-defined parameters. Provided values for additional parameters are used\n * as defaults, and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n * The template associated with a component binds an animation trigger to an element.\n *\n * ```HTML\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * All transitions are defined within an animation trigger,\n * along with named states that the transitions change to and from.\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n *  // define states\n *  state(\"on\", style({ background: \"green\" })),\n *  state(\"off\", style({ background: \"grey\" })),\n *  ...]\n * ```\n *\n * Note that when you call the `sequence()` function within a `{@link animations/group group()}`\n * or a `transition()` call, execution does not continue to the next instruction\n * until each of the inner animation steps have completed.\n *\n * ### Syntax examples\n *\n * The following examples define transitions between the two defined states (and default states),\n * using various options:\n *\n * ```typescript\n * // Transition occurs when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500))\n * // Run the same animation for both directions\n * transition(\"on <=> off\", animate(500))\n * // Define multiple state-change pairs separated by commas\n * transition(\"on => off, off => void\", animate(500))\n * ```\n *\n * ### Special values for state-change expressions\n *\n * - Catch-all state change for when an element is inserted into the page and the\n * destination state is unknown:\n *\n * ```typescript\n * transition(\"void => *\", [\n *  style({ opacity: 0 }),\n *  animate(500)\n *  ])\n * ```\n *\n * - Capture a state change between any states:\n *\n *  `transition(\"* => *\", animate(\"1s 0s\"))`\n *\n * - Entry and exit transitions:\n *\n * ```typescript\n * transition(\":enter\", [\n *   style({ opacity: 0 }),\n *   animate(500, style({ opacity: 1 }))\n *   ]),\n * transition(\":leave\", [\n *   animate(500, style({ opacity: 0 }))\n *   ])\n * ```\n *\n * - Use `:increment` and `:decrement` to initiate transitions:\n *\n * ```typescript\n * transition(\":increment\", group([\n *  query(':enter', [\n *     style({ left: '100%' }),\n *     animate('0.5s ease-out', style('*'))\n *   ]),\n *  query(':leave', [\n *     animate('0.5s ease-out', style({ left: '-100%' }))\n *  ])\n * ]))\n *\n * transition(\":decrement\", group([\n *  query(':enter', [\n *     style({ left: '100%' }),\n *     animate('0.5s ease-out', style('*'))\n *   ]),\n *  query(':leave', [\n *     animate('0.5s ease-out', style({ left: '-100%' }))\n *  ])\n * ]))\n * ```\n *\n * ### State-change functions\n *\n * Here is an example of a `fromState` specified as a state-change function that invokes an\n * animation when true:\n *\n * ```typescript\n * transition((fromState, toState) =>\n *  {\n *   return fromState == \"off\" && toState == \"on\";\n *  },\n *  animate(\"1s 0s\"))\n * ```\n *\n * ### Animating to the final state\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no style data, that step is automatically considered the final animation arc,\n * for the element to reach the final state. Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n * The following example defines a transition that starts by hiding the element,\n * then makes sure that it animates properly to whatever state is currently active for trigger:\n *\n * ```typescript\n * transition(\"void => *\", [\n *   style({ opacity: 0 }),\n *   animate(500)\n *  ])\n * ```\n * ### Boolean value matching\n * If a trigger binding value is a Boolean, it can be matched using a transition expression\n * that compares true and false or 1 and 0. For example:\n *\n * ```\n * // in the template\n * <div [@openClose]=\"open ? true : false\">...</div>\n * // in the component metadata\n * trigger('openClose', [\n *   state('true', style({ height: '*' })),\n *   state('false', style({ height: '0px' })),\n *   transition('false <=> true', animate(500))\n * ])\n * ```\n *\n * @publicApi\n **/\nexport function transition(\n    stateChangeExpr: string | ((fromState: string, toState: string, element?: any,\n                                params?: {[key: string]: any}) => boolean),\n    steps: AnimationMetadata | AnimationMetadata[],\n    options: AnimationOptions | null = null): AnimationTransitionMetadata {\n  return {type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options};\n}\n\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n *   style({ opacity: '{{ start }}' }),\n *   animate('{{ time }}',\n *   style({ opacity: '{{ end }}'}))\n *   ],\n *   { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n *   params: {\n *     time: '2s',\n *     start: 1,\n *     end: 0\n *   }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nexport function animation(\n    steps: AnimationMetadata | AnimationMetadata[],\n    options: AnimationOptions | null = null): AnimationReferenceMetadata {\n  return {type: AnimationMetadataType.Reference, animation: steps, options};\n}\n\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nexport function animateChild(options: AnimateChildOptions | null = null):\n    AnimationAnimateChildMetadata {\n  return {type: AnimationMetadataType.AnimateChild, options};\n}\n\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nexport function useAnimation(\n    animation: AnimationReferenceMetadata,\n    options: AnimationOptions | null = null): AnimationAnimateRefMetadata {\n  return {type: AnimationMetadataType.AnimateRef, animation, options};\n}\n\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n *  - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements.\n *  - `query(\":animating\")` : Query all currently animating elements.\n *  - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n *  - `query(\"@*\")` : Query all elements that contain an animation triggers.\n *  - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n *  query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n *   animate(...),\n *   animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n *   animate(...),\n *   animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`. \n *\n * ```typescript\n * @Component({\n *   selector: 'inner',\n *   template: `\n *     <div [@queryAnimation]=\"exp\">\n *       <h1>Title</h1>\n *       <div class=\"content\">\n *         Blah blah blah\n *       </div>\n *     </div>\n *   `,\n *   animations: [\n *    trigger('queryAnimation', [\n *      transition('* => goAnimate', [\n *        // hide the inner elements\n *        query('h1', style({ opacity: 0 })),\n *        query('.content', style({ opacity: 0 })),\n *\n *        // animate the inner elements in, one by one\n *        query('h1', animate(1000, style({ opacity: 1 }))),\n *        query('.content', animate(1000, style({ opacity: 1 }))),\n *      ])\n *    ])\n *  ]\n * })\n * class Cmp {\n *   exp = '';\n *\n *   goAnimate() {\n *     this.exp = 'goAnimate';\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport function query(\n    selector: string, animation: AnimationMetadata | AnimationMetadata[],\n    options: AnimationQueryOptions | null = null): AnimationQueryMetadata {\n  return {type: AnimationMetadataType.Query, selector, animation, options};\n}\n\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n *   <div *ngFor=\"let item of items\">\n *     {{ item }}\n *   </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n *   templateUrl: 'list.component.html',\n *   animations: [\n *     trigger('listAnimation', [\n *     ...\n *     ])\n *   ]\n * })\n * class ListComponent {\n *   items = [];\n *\n *   showItems() {\n *     this.items = [0,1,2,3,4];\n *   }\n *\n *   hideItems() {\n *     this.items = [];\n *   }\n *\n *   toggle() {\n *     this.items.length ? this.hideItems() : this.showItems();\n *    }\n *  }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n *   transition('* => *', [ // each time the binding value changes\n *     query(':leave', [\n *       stagger(100, [\n *         animate('0.5s', style({ opacity: 0 }))\n *       ])\n *     ]),\n *     query(':enter', [\n *       style({ opacity: 0 }),\n *       stagger(100, [\n *         animate('0.5s', style({ opacity: 1 }))\n *       ])\n *     ])\n *   ])\n * ])\n * ```\n *\n * @publicApi\n */\nexport function stagger(\n    timings: string | number,\n    animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata {\n  return {type: AnimationMetadataType.Stagger, timings, animation};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport function scheduleMicroTask(cb: () => any) {\n  Promise.resolve(null).then(cb);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {scheduleMicroTask} from '../util';\n\n/**\n * Provides programmatic control of a reusable animation sequence,\n * built using the `build()` method of `AnimationBuilder`. The `build()` method\n * returns a factory, whose `create()` method instantiates and initializes this interface.\n *\n * @see `AnimationBuilder`\n * @see `AnimationFactory`\n * @see `animate()`\n *\n * @publicApi\n */\nexport interface AnimationPlayer {\n  /**\n   * Provides a callback to invoke when the animation finishes.\n   * @param fn The callback function.\n   * @see `finish()`\n   */\n  onDone(fn: () => void): void;\n  /**\n   * Provides a callback to invoke when the animation starts.\n   * @param fn The callback function.\n   * @see `run()`\n   */\n  onStart(fn: () => void): void;\n  /**\n   * Provides a callback to invoke after the animation is destroyed.\n   * @param fn The callback function.\n   * @see `destroy()`\n   * @see `beforeDestroy()`\n   */\n  onDestroy(fn: () => void): void;\n  /**\n   * Initializes the animation.\n   */\n  init(): void;\n  /**\n   * Reports whether the animation has started.\n   * @returns True if the animation has started, false otherwise.\n   */\n  hasStarted(): boolean;\n  /**\n   * Runs the animation, invoking the `onStart()` callback.\n   */\n  play(): void;\n  /**\n   * Pauses the animation.\n   */\n  pause(): void;\n  /**\n   * Restarts the paused animation.\n   */\n  restart(): void;\n  /**\n   * Ends the animation, invoking the `onDone()` callback.\n   */\n  finish(): void;\n  /**\n   * Destroys the animation, after invoking the `beforeDestroy()` callback.\n   * Calls the `onDestroy()` callback when destruction is completed.\n   */\n  destroy(): void;\n  /**\n   * Resets the animation to its initial state.\n   */\n  reset(): void;\n  /**\n   * Sets the position of the animation.\n   * @param position A 0-based offset into the duration, in milliseconds.\n   */\n  setPosition(position: any /** TODO #9100 */): void;\n  /**\n   * Reports the current position of the animation.\n   * @returns A 0-based offset into the duration, in milliseconds.\n   */\n  getPosition(): number;\n  /**\n   * The parent of this player, if any.\n   */\n  parentPlayer: AnimationPlayer|null;\n  /**\n   * The total run time of the animation, in milliseconds.\n   */\n  readonly totalTime: number;\n  /**\n   * Provides a callback to invoke before the animation is destroyed.\n   */\n  beforeDestroy?: () => any;\n  /** @internal\n   * Internal\n   */\n  triggerCallback?: (phaseName: string) => void;\n  /** @internal\n   * Internal\n   */\n  disabled?: boolean;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nexport class NoopAnimationPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n  private _started = false;\n  private _destroyed = false;\n  private _finished = false;\n  public parentPlayer: AnimationPlayer|null = null;\n  public readonly totalTime: number;\n  constructor(duration: number = 0, delay: number = 0) { this.totalTime = duration + delay; }\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n  onStart(fn: () => void): void { this._onStartFns.push(fn); }\n  onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n  onDestroy(fn: () => void): void { this._onDestroyFns.push(fn); }\n  hasStarted(): boolean { return this._started; }\n  init(): void {}\n  play(): void {\n    if (!this.hasStarted()) {\n      this._onStart();\n      this.triggerMicrotask();\n    }\n    this._started = true;\n  }\n\n  /** @internal */\n  triggerMicrotask() { scheduleMicroTask(() => this._onFinish()); }\n\n  private _onStart() {\n    this._onStartFns.forEach(fn => fn());\n    this._onStartFns = [];\n  }\n\n  pause(): void {}\n  restart(): void {}\n  finish(): void { this._onFinish(); }\n  destroy(): void {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      if (!this.hasStarted()) {\n        this._onStart();\n      }\n      this.finish();\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n  reset(): void {}\n  setPosition(position: number): void {}\n  getPosition(): number { return 0; }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {scheduleMicroTask} from '../util';\nimport {AnimationPlayer} from './animation_player';\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nexport class AnimationGroupPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _finished = false;\n  private _started = false;\n  private _destroyed = false;\n  private _onDestroyFns: Function[] = [];\n\n  public parentPlayer: AnimationPlayer|null = null;\n  public totalTime: number = 0;\n  public readonly players: AnimationPlayer[];\n\n  constructor(_players: AnimationPlayer[]) {\n    this.players = _players;\n    let doneCount = 0;\n    let destroyCount = 0;\n    let startCount = 0;\n    const total = this.players.length;\n\n    if (total == 0) {\n      scheduleMicroTask(() => this._onFinish());\n    } else {\n      this.players.forEach(player => {\n        player.onDone(() => {\n          if (++doneCount == total) {\n            this._onFinish();\n          }\n        });\n        player.onDestroy(() => {\n          if (++destroyCount == total) {\n            this._onDestroy();\n          }\n        });\n        player.onStart(() => {\n          if (++startCount == total) {\n            this._onStart();\n          }\n        });\n      });\n    }\n\n    this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n  }\n\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n\n  init(): void { this.players.forEach(player => player.init()); }\n\n  onStart(fn: () => void): void { this._onStartFns.push(fn); }\n\n  private _onStart() {\n    if (!this.hasStarted()) {\n      this._started = true;\n      this._onStartFns.forEach(fn => fn());\n      this._onStartFns = [];\n    }\n  }\n\n  onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n\n  onDestroy(fn: () => void): void { this._onDestroyFns.push(fn); }\n\n  hasStarted() { return this._started; }\n\n  play() {\n    if (!this.parentPlayer) {\n      this.init();\n    }\n    this._onStart();\n    this.players.forEach(player => player.play());\n  }\n\n  pause(): void { this.players.forEach(player => player.pause()); }\n\n  restart(): void { this.players.forEach(player => player.restart()); }\n\n  finish(): void {\n    this._onFinish();\n    this.players.forEach(player => player.finish());\n  }\n\n  destroy(): void { this._onDestroy(); }\n\n  private _onDestroy() {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      this._onFinish();\n      this.players.forEach(player => player.destroy());\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n\n  reset(): void {\n    this.players.forEach(player => player.reset());\n    this._destroyed = false;\n    this._finished = false;\n    this._started = false;\n  }\n\n  setPosition(p: number): void {\n    const timeAtPosition = p * this.totalTime;\n    this.players.forEach(player => {\n      const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n      player.setPosition(position);\n    });\n  }\n\n  getPosition(): number {\n    let min = 0;\n    this.players.forEach(player => {\n      const p = player.getPosition();\n      min = Math.min(p, min);\n    });\n    return min;\n  }\n\n  beforeDestroy(): void {\n    this.players.forEach(player => {\n      if (player.beforeDestroy) {\n        player.beforeDestroy();\n      }\n    });\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {AnimationGroupPlayer as ÉµAnimationGroupPlayer} from './players/animation_group_player';\nexport const ÉµPRE_STYLE = '!';\n","\"use strict\";\n\n/*\n  MIT License http://www.opensource.org/licenses/mit-license.php\n  Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n  var list = []; // return the list of modules as css string\n\n  list.toString = function toString() {\n    return this.map(function (item) {\n      var content = cssWithMappingToString(item, useSourceMap);\n\n      if (item[2]) {\n        return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n      }\n\n      return content;\n    }).join('');\n  }; // import a list of modules into the list\n  // eslint-disable-next-line func-names\n\n\n  list.i = function (modules, mediaQuery, dedupe) {\n    if (typeof modules === 'string') {\n      // eslint-disable-next-line no-param-reassign\n      modules = [[null, modules, '']];\n    }\n\n    var alreadyImportedModules = {};\n\n    if (dedupe) {\n      for (var i = 0; i < this.length; i++) {\n        // eslint-disable-next-line prefer-destructuring\n        var id = this[i][0];\n\n        if (id != null) {\n          alreadyImportedModules[id] = true;\n        }\n      }\n    }\n\n    for (var _i = 0; _i < modules.length; _i++) {\n      var item = [].concat(modules[_i]);\n\n      if (dedupe && alreadyImportedModules[item[0]]) {\n        // eslint-disable-next-line no-continue\n        continue;\n      }\n\n      if (mediaQuery) {\n        if (!item[2]) {\n          item[2] = mediaQuery;\n        } else {\n          item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n        }\n      }\n\n      list.push(item);\n    }\n  };\n\n  return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n  var cssMapping = item[3];\n\n  if (!cssMapping) {\n    return content;\n  }\n\n  if (useSourceMap && typeof btoa === 'function') {\n    var sourceMapping = toComment(cssMapping);\n    var sourceURLs = cssMapping.sources.map(function (source) {\n      return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n    });\n    return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n  }\n\n  return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n  // eslint-disable-next-line no-undef\n  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n  var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n  return \"/*# \".concat(data, \" */\");\n}","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n  if (parent){\n    return parent.querySelector(target);\n  }\n  return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n                // If passing function in options, then use it for resolve \"head\" element.\n                // Useful for Shadow Root style i.e\n                // {\n                //   insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n                // }\n                if (typeof target === 'function') {\n                        return target();\n                }\n                if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n        if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (typeof __webpack_nonce__ === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn __webpack_nonce__;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t    result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t    if (result) {\n\t    \t// If transform returns a value, use that instead of the original css.\n\t    \t// This allows running runtime transformations on the css.\n\t    \tobj.css = result;\n\t    } else {\n\t    \t// If the transform function returns a falsy value, don't add this css.\n\t    \t// This allows conditional loading of css\n\t    \treturn function() {\n\t    \t\t// noop\n\t    \t};\n\t    }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default.  Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */\nimport { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nvar Subscription = /*@__PURE__*/ (function () {\n    function Subscription(unsubscribe) {\n        this.closed = false;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (unsubscribe) {\n            this._ctorUnsubscribe = true;\n            this._unsubscribe = unsubscribe;\n        }\n    }\n    Subscription.prototype.unsubscribe = function () {\n        var errors;\n        if (this.closed) {\n            return;\n        }\n        var _a = this, _parentOrParents = _a._parentOrParents, _ctorUnsubscribe = _a._ctorUnsubscribe, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n        this.closed = true;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (_parentOrParents instanceof Subscription) {\n            _parentOrParents.remove(this);\n        }\n        else if (_parentOrParents !== null) {\n            for (var index = 0; index < _parentOrParents.length; ++index) {\n                var parent_1 = _parentOrParents[index];\n                parent_1.remove(this);\n            }\n        }\n        if (isFunction(_unsubscribe)) {\n            if (_ctorUnsubscribe) {\n                this._unsubscribe = undefined;\n            }\n            try {\n                _unsubscribe.call(this);\n            }\n            catch (e) {\n                errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n            }\n        }\n        if (isArray(_subscriptions)) {\n            var index = -1;\n            var len = _subscriptions.length;\n            while (++index < len) {\n                var sub = _subscriptions[index];\n                if (isObject(sub)) {\n                    try {\n                        sub.unsubscribe();\n                    }\n                    catch (e) {\n                        errors = errors || [];\n                        if (e instanceof UnsubscriptionError) {\n                            errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n                        }\n                        else {\n                            errors.push(e);\n                        }\n                    }\n                }\n            }\n        }\n        if (errors) {\n            throw new UnsubscriptionError(errors);\n        }\n    };\n    Subscription.prototype.add = function (teardown) {\n        var subscription = teardown;\n        if (!teardown) {\n            return Subscription.EMPTY;\n        }\n        switch (typeof teardown) {\n            case 'function':\n                subscription = new Subscription(teardown);\n            case 'object':\n                if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n                    return subscription;\n                }\n                else if (this.closed) {\n                    subscription.unsubscribe();\n                    return subscription;\n                }\n                else if (!(subscription instanceof Subscription)) {\n                    var tmp = subscription;\n                    subscription = new Subscription();\n                    subscription._subscriptions = [tmp];\n                }\n                break;\n            default: {\n                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n            }\n        }\n        var _parentOrParents = subscription._parentOrParents;\n        if (_parentOrParents === null) {\n            subscription._parentOrParents = this;\n        }\n        else if (_parentOrParents instanceof Subscription) {\n            if (_parentOrParents === this) {\n                return subscription;\n            }\n            subscription._parentOrParents = [_parentOrParents, this];\n        }\n        else if (_parentOrParents.indexOf(this) === -1) {\n            _parentOrParents.push(this);\n        }\n        else {\n            return subscription;\n        }\n        var subscriptions = this._subscriptions;\n        if (subscriptions === null) {\n            this._subscriptions = [subscription];\n        }\n        else {\n            subscriptions.push(subscription);\n        }\n        return subscription;\n    };\n    Subscription.prototype.remove = function (subscription) {\n        var subscriptions = this._subscriptions;\n        if (subscriptions) {\n            var subscriptionIndex = subscriptions.indexOf(subscription);\n            if (subscriptionIndex !== -1) {\n                subscriptions.splice(subscriptionIndex, 1);\n            }\n        }\n    };\n    Subscription.EMPTY = (function (empty) {\n        empty.closed = true;\n        return empty;\n    }(new Subscription()));\n    return Subscription;\n}());\nexport { Subscription };\nfunction flattenUnsubscriptionErrors(errors) {\n    return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nvar SubjectSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SubjectSubscriber, _super);\n    function SubjectSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        return _this;\n    }\n    return SubjectSubscriber;\n}(Subscriber));\nexport { SubjectSubscriber };\nvar Subject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(Subject, _super);\n    function Subject() {\n        var _this = _super.call(this) || this;\n        _this.observers = [];\n        _this.closed = false;\n        _this.isStopped = false;\n        _this.hasError = false;\n        _this.thrownError = null;\n        return _this;\n    }\n    Subject.prototype[rxSubscriberSymbol] = function () {\n        return new SubjectSubscriber(this);\n    };\n    Subject.prototype.lift = function (operator) {\n        var subject = new AnonymousSubject(this, this);\n        subject.operator = operator;\n        return subject;\n    };\n    Subject.prototype.next = function (value) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        if (!this.isStopped) {\n            var observers = this.observers;\n            var len = observers.length;\n            var copy = observers.slice();\n            for (var i = 0; i < len; i++) {\n                copy[i].next(value);\n            }\n        }\n    };\n    Subject.prototype.error = function (err) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.hasError = true;\n        this.thrownError = err;\n        this.isStopped = true;\n        var observers = this.observers;\n        var len = observers.length;\n        var copy = observers.slice();\n        for (var i = 0; i < len; i++) {\n            copy[i].error(err);\n        }\n        this.observers.length = 0;\n    };\n    Subject.prototype.complete = function () {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.isStopped = true;\n        var observers = this.observers;\n        var len = observers.length;\n        var copy = observers.slice();\n        for (var i = 0; i < len; i++) {\n            copy[i].complete();\n        }\n        this.observers.length = 0;\n    };\n    Subject.prototype.unsubscribe = function () {\n        this.isStopped = true;\n        this.closed = true;\n        this.observers = null;\n    };\n    Subject.prototype._trySubscribe = function (subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return _super.prototype._trySubscribe.call(this, subscriber);\n        }\n    };\n    Subject.prototype._subscribe = function (subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else if (this.hasError) {\n            subscriber.error(this.thrownError);\n            return Subscription.EMPTY;\n        }\n        else if (this.isStopped) {\n            subscriber.complete();\n            return Subscription.EMPTY;\n        }\n        else {\n            this.observers.push(subscriber);\n            return new SubjectSubscription(this, subscriber);\n        }\n    };\n    Subject.prototype.asObservable = function () {\n        var observable = new Observable();\n        observable.source = this;\n        return observable;\n    };\n    Subject.create = function (destination, source) {\n        return new AnonymousSubject(destination, source);\n    };\n    return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AnonymousSubject, _super);\n    function AnonymousSubject(destination, source) {\n        var _this = _super.call(this) || this;\n        _this.destination = destination;\n        _this.source = source;\n        return _this;\n    }\n    AnonymousSubject.prototype.next = function (value) {\n        var destination = this.destination;\n        if (destination && destination.next) {\n            destination.next(value);\n        }\n    };\n    AnonymousSubject.prototype.error = function (err) {\n        var destination = this.destination;\n        if (destination && destination.error) {\n            this.destination.error(err);\n        }\n    };\n    AnonymousSubject.prototype.complete = function () {\n        var destination = this.destination;\n        if (destination && destination.complete) {\n            this.destination.complete();\n        }\n    };\n    AnonymousSubject.prototype._subscribe = function (subscriber) {\n        var source = this.source;\n        if (source) {\n            return this.source.subscribe(subscriber);\n        }\n        else {\n            return Subscription.EMPTY;\n        }\n    };\n    return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map\n","import { Injectable } from \"@angular/core\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport { map } from 'rxjs/operators';\n\n@Injectable()\nexport class CmTranslateService {\n  constructor(private translate: TranslateService) {}\n\n  /*\n   * Interpolated translations example:\n   * 1) In translation file: \n   *   \"say.hello\": \"Hello {{name}}, welcome to {{place}}\"\n   * 2) Call like this:\n   *   this.translateService.get(\"say.hello\", {name: \"my friend\", place: \"Ireland\"});\n   */\n  public get(key: string, interpolateParams?: Object): string {\n    try {\n      let ansv: string;\n      this.translate.get(key).subscribe(data => { ansv=data;      });\n      return ansv;\n    } catch (e) {\n      console.log(JSON.stringify(e));\n      return key;\n    }\n  }\n}\n","import {\n  ModalOpenContext,\n  ModalOpenContextBuilder,\n  FluentAssignMethod,\n  extend,\n  arrayUnion\n} from 'ngx-modialog';\n\nconst DEFAULT_VALUES = {\n    dialogClass: 'modal-dialog',\n    showClose: false\n};\n\nconst DEFAULT_SETTERS = [\n    'dialogClass',\n    'size',\n    'showClose'\n];\n\n\nexport type BootstrapModalSize = 'sm' | 'lg';\n\nexport class BSModalContext extends ModalOpenContext {\n    /**\n     * A Class for the modal dialog container.\n     * Default: modal-dialog\n     */\n    dialogClass: string;\n\n    /**\n     * Size of the modal. 'lg' or 'sm' only.\n     *\n     * If you want to use custom sizes leave this empty and set the dialogClass property.\n     * e.g: dialogClass = 'modal-dialog my-custom-dialog`\n     * NOTE: No validation.\n     * Default: ''\n     */\n    size: BootstrapModalSize;\n\n    /**\n     * When true, show a close button on the top right corner.\n     */\n    showClose: boolean;\n\n    normalize(): void {\n        if (!this.dialogClass) {\n            this.dialogClass = DEFAULT_VALUES.dialogClass;\n        }\n\n        super.normalize();\n    }\n}\n\n\nexport class BSModalContextBuilder<T extends BSModalContext> extends ModalOpenContextBuilder<T> {\n    /**\n     * A Class for the modal dialog container.\n     * Default: modal-dialog\n     */\n    dialogClass: FluentAssignMethod<string, this>;\n\n    /**\n     * Size of the modal. 'lg' or 'sm' only.\n     *\n     * If you want to use custom sizes leave this empty and set the dialogClass property.\n     * e.g: dialogClass = 'modal-dialog my-custom-dialog`\n     * NOTE: No validation.\n     * Default: ''\n     */\n    size: FluentAssignMethod<BootstrapModalSize, this>;\n\n\n    /**\n     * When true, show a close button on the top right corner.\n     */\n    showClose: FluentAssignMethod<boolean, this>;\n\n    constructor(\n        defaultValues: T = undefined,\n        initialSetters: string[] = undefined,\n        baseType: any = undefined\n    ) {\n        super(\n            extend<any>(DEFAULT_VALUES, defaultValues || {}),\n            arrayUnion<string>(DEFAULT_SETTERS, initialSetters || []),\n            baseType || <any>BSModalContext // https://github.com/Microsoft/TypeScript/issues/7234\n        );\n    }\n}\n\n","import {\n  Component,\n  ElementRef,\n  ViewEncapsulation,\n  Renderer2\n} from '@angular/core';\n\nimport { BaseDynamicComponent, DialogRef } from 'ngx-modialog';\n\nimport { MessageModalPreset } from'./presets/message-modal-preset';\n\n@Component({\n  selector: 'bs-modal-container',\n  host: {\n    'tabindex': '-1',\n    'role': 'dialog',\n    'class': 'modal fade',\n    'style': 'position: absolute; display: block'\n  },\n  encapsulation: ViewEncapsulation.None,\n  template:\n`<div [ngClass]=\"dialog.context.dialogClass\"\n      [class.modal-lg]=\"dialog.context.size == \\'lg\\'\"\n      [class.modal-sm]=\"dialog.context.size == \\'sm\\'\">\n  <div class=\"modal-content\" style=\"display:block\" role=\"document\" overlayDialogBoundary>\n    <ng-content></ng-content>\n  </div>\n</div>`\n})\nexport class BSModalContainer extends BaseDynamicComponent {\n   constructor(public dialog: DialogRef<MessageModalPreset>,\n              el: ElementRef, renderer: Renderer2) {\n    super(el, renderer);\n    this.activateAnimationListener();\n  }\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\nimport { DialogRef, ModalComponent } from 'ngx-modialog';\n\nimport { MessageModalPreset } from './presets/message-modal-preset';\n\nexport interface BSMessageModalButtonHandler {\n  (cmp: ModalComponent<MessageModalPreset>, $event: MouseEvent): void;\n}\n\n/**\n * Interface for button definition\n */\nexport interface BSMessageModalButtonConfig {\n  cssClass: string;\n  caption: string;\n  onClick: BSMessageModalButtonHandler;\n}\n\n@Component({\n  selector: 'modal-title',\n  encapsulation: ViewEncapsulation.None,\n  template: `<div [ngClass]=\"context.headerClass\" [ngSwitch]=\"titleHtml\">\n      <button *ngIf=\"context.showClose\" type=\"button\" class=\"close\"\n              aria-label=\"Close\" (click)=\"dialog.dismiss()\">\n          <span aria-hidden=\"true\">×</span>\n      </button>\n      <div *ngSwitchCase=\"1\" [innerHtml]=\"context.titleHtml\"></div>\n      <h3 *ngSwitchDefault class=\"modal-title\">{{context.title}}</h3>\n </div>`\n})\nexport class BSMessageModalTitle {\n  public context: MessageModalPreset;\n\n  constructor(public dialog: DialogRef<MessageModalPreset>) {\n    this.context = dialog.context;\n  }\n\n  get titleHtml(): number {\n    return this.context.titleHtml ? 1 : 0;\n  }\n}\n\n@Component({\n  selector: 'modal-body',\n  encapsulation: ViewEncapsulation.None,\n  styles: [`.form-group {\n    margin-top: 10px;\n  }`],\n  template: `<div [ngClass]=\"context.bodyClass\">\n    <div [innerHtml]=\"context.message\"></div>\n      <div *ngIf=\"context.showInput\" class=\"form-group\">\n        <input autofocus #input\n            name=\"bootstrap\"\n            type=\"text\"\n            class=\"form-control\"\n            [value]=\"context.defaultValue\"\n            (change)=\"context.defaultValue = input.value\"\n            placeholder=\"{{context.placeholder}}\">\n      </div>\n    </div>\n`\n})\nexport class BSMessageModalBody {\n  public context: MessageModalPreset & {\n    showInput: boolean;\n    /** Default value shown in the prompt. */\n    defaultValue: string;\n    /** A placeholder for the input element. */\n    placeholder: string;\n  };\n\n  constructor(public dialog: DialogRef<MessageModalPreset>) {\n    this.context = <any> dialog.context;\n  }\n}\n\n\n/**\n * Represents the modal footer for storing buttons.\n */\n@Component({\n  selector: 'modal-footer',\n  encapsulation: ViewEncapsulation.None,\n  template: `<div [ngClass]=\"dialog.context.footerClass\">\n    <button *ngFor=\"let btn of dialog.context.buttons;\"\n            [ngClass]=\"btn.cssClass\"\n            (click)=\"onClick(btn, $event)\">{{btn.caption}}</button>\n</div>`\n})\nexport class BSModalFooter {\n  constructor(public dialog: DialogRef<MessageModalPreset>) {\n  }\n\n  onClick(btn: BSMessageModalButtonConfig, $event: MouseEvent) {\n    $event.stopPropagation();\n    btn.onClick(this, $event);\n  }\n}\n\n/**\n * A Component representing a generic bootstrap modal content element.\n *\n * By configuring a MessageModalContext instance you can:\n *\n *  Header:\n *      - Set header container class (default: modal-header)\n *      - Set title text (enclosed in H3 element)\n *      - Set title html (overrides text)\n *\n *  Body:\n *      - Set body container class.  (default: modal-body)\n *      - Set body container HTML.\n *\n *  Footer:\n *      - Set footer class.  (default: modal-footer)\n *      - Set button configuration (from 0 to n)\n */\n@Component({\n  selector: 'modal-content',\n  encapsulation: ViewEncapsulation.None,\n  template: `<modal-title></modal-title><modal-body></modal-body><modal-footer></modal-footer>`\n})\nexport class BSMessageModal implements ModalComponent<MessageModalPreset> {\n  constructor(public dialog: DialogRef<MessageModalPreset>) {\n  }\n}\n","import {\n  FluentAssignMethod,\n  privateKey,\n  setAssignAlias,\n  extend,\n  arrayUnion\n} from 'ngx-modialog';\nimport {\n  BSMessageModal,\n  BSMessageModalButtonConfig,\n  BSMessageModalButtonHandler\n} from '../message-modal.component';\nimport { BSModalContext, BSModalContextBuilder }  from '../modal-context';\n\n\nconst DEFAULT_VALUES = {\n  component: BSMessageModal,\n  headerClass: 'modal-header',\n  bodyClass: 'modal-body',\n  footerClass: 'modal-footer'\n};\n\nconst DEFAULT_SETTERS = [\n  'headerClass',\n  'title',\n  'titleHtml',\n  'bodyClass',\n  'footerClass'\n];\n\n\n/**\n * Data definition\n */\nexport interface MessageModalPreset extends BSModalContext {\n\n  /**\n   * A Class for the header (title) container.\n   * Default: modal-header\n   */\n  headerClass: string;\n\n  /**\n   * Caption for the title, enclosed in a H3 container.\n   */\n  title: string;\n\n  /**\n   * HTML for the title, if set overrides title property.\n   * The HTML is wrapped in a DIV element, inside the header container.\n   * Example:\n   <div class=\"modal-header\">\n   <div> HTML CONTENT INSERTED HERE </div>\n   </div>\n   * Note: HTML is not compiled.\n   */\n  titleHtml: string;\n\n  /**\n   * aliased by 'body'\n   * @aliasedBy body\n   */\n  message: string;\n\n  /**\n   * The body of the modal.\n   * Can be either text or HTML.\n   * Note: When using HTML, the template is not compiled. (binding and expression will not parse)\n   * @aliasOf message\n   */\n  body: string;\n\n  /**\n   * A Class for the body container.\n   * Default: modal-body\n   */\n  bodyClass: string;\n\n  /**\n   * A Class for the footer container.\n   * Default: modal-footer\n   */\n  footerClass: string;\n\n  buttons: BSMessageModalButtonConfig[];\n  showInput?: any;\n}\n\n/**\n * A Preset representing the configuration needed to open MessageModal.\n * This is an abstract implementation with no concrete behaviour.\n * Use derived implementation.\n */\nexport abstract class MessageModalPresetBuilder<T extends MessageModalPreset>\n                                                extends BSModalContextBuilder<T> {\n\n  /**\n   * A Class for the header (title) container.\n   * Default: modal-header\n   */\n  headerClass: FluentAssignMethod<string, this>;\n\n  /**\n   * Caption for the title, enclosed in a H3 container.\n   */\n  title: FluentAssignMethod<string, this>;\n\n  /**\n   * HTML for the title, if set overrides title property.\n   * The HTML is wrapped in a DIV element, inside the header container.\n   * Example:\n   <div class=\"modal-header\">\n   <div> HTML CONTENT INSERTED HERE </div>\n   </div>\n   * Note: HTML is not compiled.\n   */\n  titleHtml: FluentAssignMethod<string, this>;\n\n  /**\n   * aliased by 'body'\n   * @aliasedBy body\n   */\n  message: FluentAssignMethod<string, this>;\n\n  /**\n   * The body of the modal.\n   * Can be either text or HTML.\n   * Note: When using HTML, the template is not compiled. (binding and expression will not parse)\n   * @aliasOf message\n   */\n  body: FluentAssignMethod<string, this>;\n\n  /**\n   * A Class for the body container.\n   * Default: modal-body\n   */\n  bodyClass: FluentAssignMethod<string, this>;\n\n  /**\n   * A Class for the footer container.\n   * Default: modal-footer\n   */\n  footerClass: FluentAssignMethod<string, this>;\n\n  constructor(defaultValues: T = undefined,\n              initialSetters: string[] = undefined,\n              baseType: new () => T = undefined) {\n    super(\n      extend<any>(extend({buttons: []}, DEFAULT_VALUES), defaultValues || {}),\n      arrayUnion<string>(DEFAULT_SETTERS, initialSetters || []),\n      baseType\n    );\n\n    setAssignAlias(this, 'body', 'message', true);\n  }\n\n  addButton(css: string, caption: string, onClick: BSMessageModalButtonHandler): this {\n    let btn = {\n      cssClass: css,\n      caption: caption,\n      onClick: onClick\n    };\n\n    let key = privateKey('buttons');\n    (this[key] as BSMessageModalButtonConfig[]).push(btn);\n\n    return this;\n  }\n}\n","import { Modal, FluentAssignMethod, extend } from 'ngx-modialog';\nimport { BSMessageModal } from '../message-modal.component';\nimport { MessageModalPresetBuilder, MessageModalPreset } from './message-modal-preset';\n\nexport interface OneButtonPreset extends MessageModalPreset {\n  /**\n   * Caption for the OK button.\n   * Default: OK\n   */\n  okBtn: string;\n\n  /**\n   * A Class for the OK button.\n   * Default: btn btn-primary\n   */\n  okBtnClass: string;\n}\n\n/**\n * A Preset for a classic 1 button modal window.\n */\nexport class OneButtonPresetBuilder extends MessageModalPresetBuilder<OneButtonPreset> {\n  okBtn: FluentAssignMethod<string, this>;\n  okBtnClass: FluentAssignMethod<string, this>;\n\n  constructor(modal: Modal, defaultValues: OneButtonPreset = undefined) {\n    super(extend<any>({\n      modal: modal,\n      okBtn: 'OK',\n      okBtnClass: 'btn btn-primary'\n    }, defaultValues || {}), [\n      'okBtn',\n      'okBtnClass'\n    ]);\n  }\n\n  $$beforeOpen(config: OneButtonPreset): void {\n    super.$$beforeOpen(config);\n\n    this.addButton(\n      config.okBtnClass,\n      config.okBtn,\n      (cmp: BSMessageModal, $event: MouseEvent) => cmp.dialog.close(true)\n    );\n  }\n}\n\n","import {\n  Modal,\n  FluentAssignMethod,\n  extend,\n  arrayUnion\n} from 'ngx-modialog';\nimport { BSMessageModal } from '../message-modal.component';\nimport { MessageModalPresetBuilder } from './message-modal-preset';\nimport { OneButtonPreset } from './one-button-preset';\n\n\nexport interface TwoButtonPreset extends OneButtonPreset {\n  /**\n   * Caption for the Cancel button.\n   * Default: Cancel\n   */\n  cancelBtn: string;\n\n  /**\n   * A Class for the Cancel button.\n   * Default: btn btn-default\n   */\n  cancelBtnClass: string;\n}\n\n/** Common two button preset */\nexport abstract class AbstractTwoButtonPresetBuilder extends MessageModalPresetBuilder<TwoButtonPreset> {\n  okBtn: FluentAssignMethod<string, this>;\n  okBtnClass: FluentAssignMethod<string, this>;\n  cancelBtn: FluentAssignMethod<string, this>;\n  cancelBtnClass: FluentAssignMethod<string, this>;\n\n  constructor(modal: Modal, defaultValues: TwoButtonPreset = undefined,\n              initialSetters: string[] = []) {\n    super(extend<any>({\n      modal: modal,\n      okBtn: 'OK',\n      okBtnClass: 'btn btn-primary',\n      cancelBtn: 'Cancel',\n      cancelBtnClass: 'btn btn-default'\n    }, defaultValues || {}), arrayUnion<string>([\n      'okBtn',\n      'okBtnClass',\n      'cancelBtn',\n      'cancelBtnClass',\n    ], initialSetters));\n  }\n\n  $$beforeOpen(config: TwoButtonPreset): void {\n    super.$$beforeOpen(config);\n    this.addButton(\n      config.cancelBtnClass,\n      config.cancelBtn,\n      (cmp: BSMessageModal, $event: MouseEvent) => cmp.dialog.dismiss()\n    );\n  }\n}\n\n/**\n * A Preset for a classic 2 button modal window.\n */\nexport class TwoButtonPresetBuilder extends AbstractTwoButtonPresetBuilder {\n\n  constructor(modal: Modal, defaultValues: TwoButtonPreset = undefined) {\n    super(modal, defaultValues);\n  }\n\n  $$beforeOpen(config: TwoButtonPreset): void {\n    super.$$beforeOpen(config);\n    this.addButton(\n      config.okBtnClass,\n      config.okBtn,\n      (cmp: BSMessageModal, $event: MouseEvent) => cmp.dialog.close(true)\n    );\n  }\n}\n\nexport interface PromptPreset extends TwoButtonPreset {\n  showInput: boolean;\n  /** Default value shown in the prompt. */\n  defaultValue: string;\n  /** A placeholder for the input element. */\n  placeholder: string;\n\n}\n\nexport class PromptPresetBuilder extends AbstractTwoButtonPresetBuilder {\n  placeholder: FluentAssignMethod<string, this>;\n  defaultValue: FluentAssignMethod<string, this>;\n\n  constructor(modal: Modal, defaultValues: PromptPreset = undefined) {\n    super(modal, extend<any>({showInput: true, defaultValue: ''}, defaultValues || {}),\n      ['placeholder', 'defaultValue']);\n  }\n\n  $$beforeOpen(config: PromptPreset): void {\n    super.$$beforeOpen(config);\n    this.addButton(\n      config.okBtnClass,\n      config.okBtn,\n      (cmp: BSMessageModal, $event: MouseEvent) =>\n        cmp.dialog.close((cmp.dialog.context as PromptPreset).defaultValue)\n    );\n  }\n}\n\n","import { combineLatest } from 'rxjs';\nimport { Injectable } from '@angular/core';\n\nimport {\n  ContainerContent,\n  Overlay,\n  DialogRef,\n  Modal as Modal_,\n  CSSBackdrop,\n  PromiseCompleter\n} from 'ngx-modialog';\n\nimport { BSModalContainer } from './modal-container.component';\n\nimport { OneButtonPresetBuilder } from './presets/one-button-preset';\nimport { TwoButtonPresetBuilder, PromptPresetBuilder } from './presets/two-button-preset';\n\n// TODO: use DI factory for this.\n// TODO: consolidate dup code\nconst isDoc: boolean = !(typeof document === 'undefined' || !document);\n\nlet animationClass: string = 'show';\n\n/**\n * Execute this method to flag that you are working with Bootstrap version 4.\n * @deprecated From version 5, ngx-modialog's bootstrap plugin is set to work with version 4 of bootstrap by default.\n */\nexport function bootstrap4Mode(): void { }\n/**\n * Execute this method to flag that you are working with Bootstrap version 3.\n */\nexport function bootstrap3Mode(): void { animationClass = 'in'; }\n\n@Injectable()\nexport class Modal extends Modal_ {\n  constructor(overlay: Overlay) {\n    super(overlay);\n  }\n\n  alert(): OneButtonPresetBuilder {\n    return new OneButtonPresetBuilder(this, <any>{isBlocking: false});\n  }\n\n  prompt(): PromptPresetBuilder {\n    return new PromptPresetBuilder(this, <any>{isBlocking: true, keyboard: null});\n  }\n\n  confirm(): TwoButtonPresetBuilder {\n    return new TwoButtonPresetBuilder(this, <any>{isBlocking: true, keyboard: null});\n  }\n\n  protected create(dialogRef: DialogRef<any>, content: ContainerContent): DialogRef<any> {\n\n    const backdropRef = this.createBackdrop(dialogRef, CSSBackdrop);\n    const containerRef = this.createContainer(dialogRef, BSModalContainer, content);\n\n    let overlay = dialogRef.overlayRef.instance;\n    let backdrop = backdropRef.instance;\n    let container = containerRef.instance;\n\n    dialogRef.inElement ? overlay.insideElement() : overlay.fullscreen();\n\n    // add body class if this is the only dialog in the stack\n    if (isDoc && !document.body.classList.contains('modal-open')) {\n      document.body.classList.add('modal-open');\n    }\n\n\n    if (dialogRef.inElement) {\n      backdrop.setStyle('position', 'absolute');\n    }\n    backdrop.addClass('modal-backdrop fade', true);\n\n    backdrop.addClass(animationClass);\n    container.addClass(animationClass);\n\n    if (containerRef.location.nativeElement) {\n      containerRef.location.nativeElement.focus();\n    }\n\n    overlay.beforeDestroy(() => {\n      const completer = new PromiseCompleter<void>();\n      backdrop.removeClass(animationClass);\n      container.removeClass(animationClass);\n\n      combineLatest.call(backdrop.myAnimationEnd$(), container.myAnimationEnd$(), (s1, s2) => [s1,s2])\n        .subscribe( sources => {\n          isDoc && this.overlay.groupStackLength(dialogRef) === 1 && document.body.classList.remove('modal-open');\n          completer.resolve();\n        });\n\n      return completer.promise;\n    });\n\n    return dialogRef;\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ModalModule, Modal as BaseModal } from 'ngx-modialog';\n\nimport { Modal } from './modal';\nimport { BSModalContainer } from './modal-container.component';\nimport {\n  BSMessageModal,\n  BSMessageModalTitle,\n  BSMessageModalBody,\n  BSModalFooter\n} from './message-modal.component';\n\nexport const providers: any[] = [\n  { provide: BaseModal, useClass: Modal },\n  { provide: Modal, useClass: Modal }\n];\n\n@NgModule({\n  imports: [ ModalModule, CommonModule ],\n  declarations: [\n    BSModalFooter,\n    BSMessageModalTitle,\n    BSMessageModalBody,\n    BSMessageModal,\n    BSModalContainer\n  ],\n  providers,\n  entryComponents: [\n    BSModalContainer,\n    BSMessageModal\n  ]\n})\nexport class BootstrapModalModule {\n  static getProviders(): any[] {\n    return providers;\n  }\n}\n\n","/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n    if (!scheduler) {\n        if (input instanceof Observable) {\n            return input;\n        }\n        return new Observable(subscribeTo(input));\n    }\n    else {\n        return scheduled(input, scheduler);\n    }\n}\n//# sourceMappingURL=from.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n    return function filterOperatorFunction(source) {\n        return source.lift(new FilterOperator(predicate, thisArg));\n    };\n}\nvar FilterOperator = /*@__PURE__*/ (function () {\n    function FilterOperator(predicate, thisArg) {\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n    }\n    FilterOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n    };\n    return FilterOperator;\n}());\nvar FilterSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(FilterSubscriber, _super);\n    function FilterSubscriber(destination, predicate, thisArg) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.thisArg = thisArg;\n        _this.count = 0;\n        return _this;\n    }\n    FilterSubscriber.prototype._next = function (value) {\n        var result;\n        try {\n            result = this.predicate.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (result) {\n            this.destination.next(value);\n        }\n    };\n    return FilterSubscriber;\n}(Subscriber));\n//# sourceMappingURL=filter.js.map\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * @usageNotes\n *\n * ```ts\n * class MyService {\n *   constructor(public router: Router, logger: Logger) {\n *     router.events.pipe(\n *       filter(e => e instanceof RouterEvent)\n *     ).subscribe(e => {\n *       logger.log(e.id, e.url);\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n *\n * This can happen when a [route guard](guide/router#milestone-5-route-guards)\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n *An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart` *\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The sequence of router events is as follows:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n    ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ÉµEmptyOutletComponent {\n}\n\nexport {ÉµEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) { this.params = params || {}; }\n\n  has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path !.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * @param segments An array of URL segments.\n * @param group A segment group.\n * @param route The route to match against.\n * @returns The match-result.\n *\n * @usageNotes\n *\n * The following matcher matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n *\n * Often this function will be implemented using an ES dynamic `import()` expression. For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * This function _must_ match the form above: an arrow function of the form\n * `() => import('...').then(mod => mod.MODULE)`.\n *\n * @see `Route#loadChildren`.\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>| NgModuleFactory<any>| Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load,\n * or a function that returns such a set.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `Route#loadChildren`.\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `Route#loadChildren`\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated in favor of the proposed ES dynamic\n * `import()` expression, which offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `NavigationExtras#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see `Route#runGuardsAndResolvers`\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n    'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n    ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property  instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given  path, and stops when there is a match. For example,\n   * '/team/11/user' matches 'team/:id'.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to which to redirect when a the path matches.\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * A `LoadChildren` object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (!route) {\n    throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n  }\n  if (Array.isArray(route)) {\n    throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n  }\n  if (!route.component && !route.children && !route.loadChildren &&\n      (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n  }\n  if (route.redirectTo && route.children) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n  }\n  if (route.redirectTo && route.loadChildren) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n  }\n  if (route.children && route.loadChildren) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n  }\n  if (route.redirectTo && route.component) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n  }\n  if (route.path && route.matcher) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n  }\n  if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n  }\n  if (route.path === void 0 && route.matcher === void 0) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n  }\n  if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n    throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n  }\n  if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n    const exp =\n        `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n    throw new Error(\n        `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n  }\n  if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ÉµisObservable as isObservable, ÉµisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n  // Casting Object.keys return values to include `undefined` as there are some cases\n  // in IE 11 where this can happen. Cannot provide a test because the behavior only\n  // exists in certain circumstances in IE 11, therefore doing this cast ensures the\n  // logic is correct for when this edge case is hit.\n  const k1 = Object.keys(a) as string[] | undefined;\n  const k2 = Object.keys(b) as string[] | undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function waitForMap<A, B>(\n    obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n  if (Object.keys(obj).length === 0) {\n    return of ({});\n  }\n\n  const waitHead: Observable<B>[] = [];\n  const waitTail: Observable<B>[] = [];\n  const res: {[k: string]: B} = {};\n\n  forEach(obj, (a: A, k: string) => {\n    const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n    if (k === PRIMARY_OUTLET) {\n      waitHead.push(mapped);\n    } else {\n      waitTail.push(mapped);\n    }\n  });\n\n  // Closure compiler has problem with using spread operator here. So we use \"Array.concat\".\n  // Note that we also need to cast the new promise because TypeScript cannot infer the type\n  // when calling the \"of\" function through \"Function.apply\"\n  return (of .apply(null, waitHead.concat(waitTail)) as Observable<Observable<B>>)\n      .pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | Promise<T>| Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n  if (exact) {\n    return equalQueryParams(container.queryParams, containee.queryParams) &&\n        equalSegmentGroups(container.root, containee.root);\n  }\n\n  return containsQueryParams(container.queryParams, containee.queryParams) &&\n      containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n  }\n  return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap !: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _sourceSegment !: UrlSegmentGroup;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _segmentIndexShift !: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n  /** Number of child segments */\n  get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n  /** @docsNotRequired */\n  toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n *Â ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap !: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n\n    });\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] = Object.keys(params).map((name) => {\n    const value = params[name];\n    return Array.isArray(value) ?\n        value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n        `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n  });\n\n  return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) { this.remaining = url; }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: any} {\n    const params: {[key: string]: any} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: any}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined !;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) { this._root = root; }\n\n  get root(): T { return this._root.value; }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot !: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState !: RouterState;\n  /** @internal */\n  _paramMap !: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap !: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute { return this._routerState.root; }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n  /** An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter. */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData !: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState !: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap !: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap !: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /** The matrix parameters scoped to this route */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n\n    // retrieve an activated route that is used to be displayed, but is not currently displayed\n  } else {\n    const detachedRouteHandle =\n        <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n    if (detachedRouteHandle) {\n      const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n      setFutureSnapshotsOfActivatedRoutes(curr, tree);\n      return tree;\n\n    } else {\n      const value = createActivatedRoute(curr.value);\n      const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n      return new TreeNode<ActivatedRoute>(value, children);\n    }\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n    fragment: string): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params, fragment: string): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    return new Position(route.snapshot._urlSegment, true, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent !;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n  if (typeof command === 'object' && command != null && command.outlets) {\n    return command.outlets[PRIMARY_OUTLET];\n  }\n  return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n  if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n  if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n  return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands: any, outlet: string) => {\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const curr = getPath(commands[currentCommandIndex]);\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n      const children = createNewSegmentChildren(commands[i].outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, commands[0]));\n      i++;\n      continue;\n    }\n\n    const curr = getPath(commands[i]);\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands: any, outlet: string) => {\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n\n    if (context) {\n      const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n      const contexts = route.value.component ? context.children : parentContexts;\n\n      forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n      if (context.outlet) {\n        // Destroy the component\n        context.outlet.deactivate();\n        // Destroy the contexts for all the outlets that were in the component\n        context.children.onOutletDeactivated();\n      }\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n          `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(\n        map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n                rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // after an absolute redirect we do not apply any more redirects!\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(\n        map((rootSegmentGroup: UrlSegmentGroup) =>\n                this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    return waitForMap(\n        segmentGroup.children,\n        (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return of (...routes).pipe(\n        map((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n              // talk to Jason\n              return of (null) as any;\n            }\n            throw e;\n          }));\n        }),\n        concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of (new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n      boolean {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (getOutlet(route) !== outlet) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n    if (route.redirectTo !.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree = this.applyRedirectCommands(\n        consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n    if (route.redirectTo !.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        return this.configLoader.load(ngModule.injector, route)\n            .pipe(map((cfg: LoadedRouterConfig) => {\n              route._loadedConfig = cfg;\n              return new UrlSegmentGroup(segments, {});\n            }));\n      }\n\n      return of (new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of (new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of (new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of (route._loadedConfig);\n      }\n\n      return runCanLoadGuard(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoad: boolean) => {\n            if (shouldLoad) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of (new LoadedRouterConfig([], ngModule));\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of (res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo !);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\nfunction runCanLoadGuard(\n    moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n  const canLoad = route.canLoad;\n  if (!canLoad || canLoad.length === 0) return of (true);\n\n  const obs = from(canLoad).pipe(map((injectionToken: any) => {\n    const guard = moduleInjector.get(injectionToken);\n    let guardVal;\n    if (isCanLoad(guard)) {\n      guardVal = guard.canLoad(route, segments);\n    } else if (isFunction<CanLoadFn>(guard)) {\n      guardVal = guard(route, segments);\n    } else {\n      throw new Error('Invalid CanLoad guard');\n    }\n    return wrapIntoObservable(guardVal);\n  }));\n\n  return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n  matched: boolean,\n  consumedSegments: UrlSegment[],\n  lastChild: number,\n  positionalParamSegments: {[k: string]: UrlSegment}\n} {\n  if (route.path === '') {\n    if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n    }\n\n    return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n\n  if (!res) {\n    return {\n      matched: false,\n      consumedSegments: <any[]>[],\n      lastChild: 0,\n      positionalParamSegments: {},\n    };\n  }\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed !,\n    lastChild: res.consumed.length !,\n    positionalParamSegments: res.posParams !,\n  };\n}\n\nfunction split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[]) {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments, createChildrenForEmptySegments(\n                              config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n                                   segmentGroup, slicedSegments, config, segmentGroup.children));\n    return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n  }\n\n  return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n    children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      res[getOutlet(r)] = new UrlSegmentGroup([], {});\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n    routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegmentGroup;\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      res[getOutlet(r)] = new UrlSegmentGroup([], {});\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(switchMap(\n        t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n                 .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n    contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n                        deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun) {\n      const component = context && context.outlet && context.outlet.component || null;\n      checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers | undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(\n               ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n        .pipe(\n            scan(\n                (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                  let isPending = false;\n                  return list.reduce((innerAcc, val, i: number) => {\n                    if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                    // Toggle pending flag if any values haven't been set yet\n                    if (val === INITIAL_VALUE) isPending = true;\n\n                    // Any other return values are only valid if we haven't yet hit a pending call.\n                    // This guarantees that in the case of a guard at the bottom of the tree that\n                    // returns a redirect, we will wait for the higher priority guard at the top to\n                    // finish before performing the redirect.\n                    if (!isPending) {\n                      // Early return when we hit a `false` value as that should always cancel\n                      // navigation\n                      if (val === false) return val;\n\n                      if (i === list.length - 1 || isUrlTree(val)) {\n                        return val;\n                      }\n                    }\n\n                    return innerAcc;\n                  }, acc);\n                },\n                INITIAL_VALUE),\n            filter(item => item !== INITIAL_VALUE),\n            map(item => isUrlTree(item) ? item : item === true),  //\n            take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n\n    return source.pipe(mergeMap(t => {\n      const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n      if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n        return of ({...t, guardsResult: true});\n      }\n\n      return runCanDeactivateChecks(\n                 canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n          .pipe(\n              mergeMap(canDeactivate => {\n                return canDeactivate && isBoolean(canDeactivate) ?\n                    runCanActivateChecks(\n                        targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n                    of (canDeactivate);\n              }),\n              map(guardsResult => ({...t, guardsResult})));\n    }));\n  };\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return from([\n                 fireChildActivationStart(check.route.parent, forwardEvent),\n                 fireActivationStart(check.route, forwardEvent),\n                 runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n                 runCanActivate(futureSnapshot, check.route, moduleInjector)\n               ])\n            .pipe(concatAll(), first(result => {\n                    return result !== true;\n                  }, true as boolean | UrlTree));\n      }),\n      first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n   * This should fire off `ActivationStart` events for each route being activated at this\n   * level.\n   * In other words, if you're activating `a` and `b` below, `path` will contain the\n   * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n   * return\n   * `true` so checks continue to run.\n   */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot | null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of (true);\n}\n\n/**\n   * This should fire off `ChildActivationStart` events for each route being activated at this\n   * level.\n   * In other words, if you're activating `a` and `b` below, `path` will contain the\n   * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n   * return\n   * `true` so checks continue to run.\n   */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot | null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of (true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of (true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of (guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of (true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable =\n          wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n    rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  return new Recognizer(\n             rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n             relativeLinkResolution)\n      .recognize();\n}\n\nclass Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): Observable<RouterStateSnapshot> {\n    try {\n      const rootSegmentGroup =\n          split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n      const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n      const root = new ActivatedRouteSnapshot(\n          [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n          this.urlTree.root, -1, {});\n\n      const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n      const routeState = new RouterStateSnapshot(this.url, rootNode);\n      this.inheritParamsAndData(routeState._root);\n      return of (routeState);\n\n    } catch (e) {\n      return new Observable<RouterStateSnapshot>(\n          (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n    }\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[] {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[] {\n    const children = mapChildrenIntoArray(\n        segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n    checkOutletNameUniqueness(children);\n    sortActivatedRouteSnapshots(children);\n    return children;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n    for (const r of config) {\n      try {\n        return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      } catch (e) {\n        if (!(e instanceof NoMatch)) throw e;\n      }\n    }\n    if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    throw new NoMatch();\n  }\n\n  private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n      boolean {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n    if (route.redirectTo) throw new NoMatch();\n\n    if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments) !.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n          getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n    } else {\n      const result: MatchResult = match(rawSegment, route, segments);\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig !.routes;\n  }\n\n  return [];\n}\n\ninterface MatchResult {\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      throw new NoMatch();\n    }\n\n    return {consumedSegments: [], lastChild: 0, parameters: {}};\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) throw new NoMatch();\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments, createChildrenForEmptyPaths(\n                              segmentGroup, consumedSegments, config,\n                              new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n                                   segmentGroup, consumedSegments, slicedSegments, config,\n                                   segmentGroup.children, relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n        'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(mergeMap(\n        t => recognizeFn(\n                 rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n                 paramsInheritanceStrategy, relativeLinkResolution)\n                 .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly' | 'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(mergeMap(t => {\n      const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n      if (!canActivateChecks.length) {\n        return of (t);\n      }\n\n      return from(canActivateChecks)\n          .pipe(\n              concatMap(\n                  check => runResolve(\n                      check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n              reduce((_: any, __: any) => _), map(_ => t));\n    }));\n  };\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n            ...futureARS.data,\n            ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of ({});\n  }\n  if (keys.length === 1) {\n    const key = keys[0];\n    return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n        .pipe(map((value: any) => { return {[key]: value}; }));\n  }\n  const data: {[k: string]: any} = {};\n  const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n    return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n        .pipe(map((value: any) => {\n          data[key] = value;\n          return value;\n        }));\n  }));\n  return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return function(source) {\n    return source.pipe(switchMap(v => {\n      const nextResult = next(v);\n      if (nextResult) {\n        return from(nextResult).pipe(map(() => v));\n      }\n      return from([v]);\n    }));\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n  shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n  shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n * @see `ROUTES`\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n    return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n      if (this.onLoadEndListener) {\n        this.onLoadEndListener(route);\n      }\n\n      const module = factory.create(parentInjector);\n\n      return new LoadedRouterConfig(\n          flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n    }));\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of (t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean { return true; }\n  extract(url: UrlTree): UrlTree { return url; }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ÉµConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Options that modify the navigation strategy.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n  *   path: 'parent',\n  *   component: ParentComponent,\n  *   children: [{\n  *     path: 'list',\n  *     component: ListComponent\n  *   },{\n  *     path: 'child',\n  *     component: ChildComponent\n  *   }]\n  * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n  *    constructor(private router: Router, private route: ActivatedRoute) {}\n  *\n  *    go() {\n  *      this.router.navigate(['../list'], { relativeTo: this.route });\n  *    }\n  *  }\n   * ```\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * **DEPRECATED**: Use `queryParamsHandling: \"preserve\"` instead to preserve\n   * query parameters for the next navigation.\n   *\n   * @deprecated since v4\n   */\n  preserveQueryParams?: boolean;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `merge` : Merge new with current parameters.\n   * * `preserve` : Preserve current parameters.\n   *\n   * ```\n   * // from /results?page=1 to /view?page=1&page=2\n   * this.router.navigate(['/view'], { queryParams: { page: 2 },  queryParamsHandling: \"merge\" });\n   * ```\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from `router.getCurrentNavigation()` while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation promise is resolved with this value.\n * If the handler throws an exception, the navigation promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any; navigationId: number;\n};\n\n/**\n * Information about a navigation operation. Retrieve the most recent\n * navigation object with the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n  /**\n   * The ID of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string | UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative' | 'popstate' | 'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n  id: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState | null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot | null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState | null,\n  guards: Checks,\n  guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of (null) as any;\n}\n\n/**\n * @description\n *\n * A service that provides navigation and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n  private currentUrlTree: UrlTree;\n  private rawUrlTree: UrlTree;\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n\n  // TODO(issue/24571): remove '!'.\n  private locationSubscription !: Subscription;\n  private navigationId: number = 0;\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n    beforePreactivation: defaultRouterHook,\n    afterPreactivation: defaultRouterHook\n  };\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n        filter(t => t.id !== 0),\n\n        // Extract URL\n        map(t => ({\n              ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n            } as NavigationTransition)),\n\n        // Using switchMap so we cancel executing navigations when a new one comes in\n        switchMap(t => {\n          let completed = false;\n          let errored = false;\n          return of (t).pipe(\n              // Store the Navigation object\n              tap(t => {\n                this.currentNavigation = {\n                  id: t.id,\n                  initialUrl: t.currentRawUrl,\n                  extractedUrl: t.extractedUrl,\n                  trigger: t.source,\n                  extras: t.extras,\n                  previousNavigation: this.lastSuccessfulNavigation ?\n                      {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                      null\n                };\n              }),\n              switchMap(t => {\n                const urlTransition =\n                    !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n                const processCurrentUrl =\n                    (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                    this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n                if (processCurrentUrl) {\n                  return of (t).pipe(\n                      // Fire NavigationStart event\n                      switchMap(t => {\n                        const transition = this.transitions.getValue();\n                        eventsSubject.next(new NavigationStart(\n                            t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n                        if (transition !== this.transitions.getValue()) {\n                          return EMPTY;\n                        }\n                        return [t];\n                      }),\n\n                      // This delay is required to match old behavior that forced navigation to\n                      // always be async\n                      switchMap(t => Promise.resolve(t)),\n\n                      // ApplyRedirects\n                      applyRedirects(\n                          this.ngModule.injector, this.configLoader, this.urlSerializer,\n                          this.config),\n\n                      // Update the currentNavigation\n                      tap(t => {\n                        this.currentNavigation = {\n                          ...this.currentNavigation !,\n                          finalUrl: t.urlAfterRedirects\n                        };\n                      }),\n\n                      // Recognize\n                      recognize(\n                          this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n                          this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n                      // Update URL if in `eager` update mode\n                      tap(t => {\n                        if (this.urlUpdateStrategy === 'eager') {\n                          if (!t.extras.skipLocationChange) {\n                            this.setBrowserUrl(\n                                t.urlAfterRedirects, !!t.extras.replaceUrl, t.id, t.extras.state);\n                          }\n                          this.browserUrlTree = t.urlAfterRedirects;\n                        }\n                      }),\n\n                      // Fire RoutesRecognized\n                      tap(t => {\n                        const routesRecognized = new RoutesRecognized(\n                            t.id, this.serializeUrl(t.extractedUrl),\n                            this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n                        eventsSubject.next(routesRecognized);\n                      }));\n                } else {\n                  const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                      this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                  /* When the current URL shouldn't be processed, but the previous one was, we\n                   * handle this \"error condition\" by navigating to the previously successful URL,\n                   * but leaving the URL intact.*/\n                  if (processPreviousUrl) {\n                    const {id, extractedUrl, source, restoredState, extras} = t;\n                    const navStart = new NavigationStart(\n                        id, this.serializeUrl(extractedUrl), source, restoredState);\n                    eventsSubject.next(navStart);\n                    const targetSnapshot =\n                        createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                    return of ({\n                      ...t,\n                      targetSnapshot,\n                      urlAfterRedirects: extractedUrl,\n                      extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                    });\n                  } else {\n                    /* When neither the current or previous URL can be processed, do nothing other\n                     * than update router's internal reference to the current \"settled\" URL. This\n                     * way the next navigation will be coming from the current URL in the browser.\n                     */\n                    this.rawUrlTree = t.rawUrl;\n                    this.browserUrlTree = t.urlAfterRedirects;\n                    t.resolve(null);\n                    return EMPTY;\n                  }\n                }\n              }),\n\n              // Before Preactivation\n              switchTap(t => {\n                const {\n                  targetSnapshot,\n                  id: navigationId,\n                  extractedUrl: appliedUrlTree,\n                  rawUrl: rawUrlTree,\n                  extras: {skipLocationChange, replaceUrl}\n                } = t;\n                return this.hooks.beforePreactivation(targetSnapshot !, {\n                  navigationId,\n                  appliedUrlTree,\n                  rawUrlTree,\n                  skipLocationChange: !!skipLocationChange,\n                  replaceUrl: !!replaceUrl,\n                });\n              }),\n\n              // --- GUARDS ---\n              tap(t => {\n                const guardsStart = new GuardsCheckStart(\n                    t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n                    t.targetSnapshot !);\n                this.triggerEvent(guardsStart);\n              }),\n\n              map(t => ({\n                    ...t,\n                    guards:\n                        getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n                  })),\n\n              checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n              tap(t => {\n                if (isUrlTree(t.guardsResult)) {\n                  const error: Error&{url?: UrlTree} = navigationCancelingError(\n                      `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                  error.url = t.guardsResult;\n                  throw error;\n                }\n              }),\n\n              tap(t => {\n                const guardsEnd = new GuardsCheckEnd(\n                    t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n                    t.targetSnapshot !, !!t.guardsResult);\n                this.triggerEvent(guardsEnd);\n              }),\n\n              filter(t => {\n                if (!t.guardsResult) {\n                  this.resetUrlToCurrentUrlTree();\n                  const navCancel =\n                      new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n                  eventsSubject.next(navCancel);\n                  t.resolve(false);\n                  return false;\n                }\n                return true;\n              }),\n\n              // --- RESOLVE ---\n              switchTap(t => {\n                if (t.guards.canActivateChecks.length) {\n                  return of (t).pipe(\n                      tap(t => {\n                        const resolveStart = new ResolveStart(\n                            t.id, this.serializeUrl(t.extractedUrl),\n                            this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n                        this.triggerEvent(resolveStart);\n                      }),\n                      resolveData(\n                          this.paramsInheritanceStrategy,\n                          this.ngModule.injector),  //\n                      tap(t => {\n                        const resolveEnd = new ResolveEnd(\n                            t.id, this.serializeUrl(t.extractedUrl),\n                            this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n                        this.triggerEvent(resolveEnd);\n                      }));\n                }\n                return undefined;\n              }),\n\n              // --- AFTER PREACTIVATION ---\n              switchTap((t: NavigationTransition) => {\n                const {\n                  targetSnapshot,\n                  id: navigationId,\n                  extractedUrl: appliedUrlTree,\n                  rawUrl: rawUrlTree,\n                  extras: {skipLocationChange, replaceUrl}\n                } = t;\n                return this.hooks.afterPreactivation(targetSnapshot !, {\n                  navigationId,\n                  appliedUrlTree,\n                  rawUrlTree,\n                  skipLocationChange: !!skipLocationChange,\n                  replaceUrl: !!replaceUrl,\n                });\n              }),\n\n              map((t: NavigationTransition) => {\n                const targetRouterState = createRouterState(\n                    this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n                return ({...t, targetRouterState});\n              }),\n\n              /* Once here, we are about to activate syncronously. The assumption is this will\n                 succeed, and user code may read from the Router service. Therefore before\n                 activation, we need to update router properties storing the current URL and the\n                 RouterState, as well as updated the browser URL. All this should happen *before*\n                 activating. */\n              tap((t: NavigationTransition) => {\n                this.currentUrlTree = t.urlAfterRedirects;\n                this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n                (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n                if (this.urlUpdateStrategy === 'deferred') {\n                  if (!t.extras.skipLocationChange) {\n                    this.setBrowserUrl(\n                        this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n                  }\n                  this.browserUrlTree = t.urlAfterRedirects;\n                }\n              }),\n\n              activateRoutes(\n                  this.rootContexts, this.routeReuseStrategy,\n                  (evt: Event) => this.triggerEvent(evt)),\n\n              tap({next() { completed = true; }, complete() { completed = true; }}),\n              finalize(() => {\n                /* When the navigation stream finishes either through error or success, we set the\n                 * `completed` or `errored` flag. However, there are some situations where we could\n                 * get here without either of those being set. For instance, a redirect during\n                 * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n                 * event is fired when a navigation gets cancelled but not caught by other means. */\n                if (!completed && !errored) {\n                  // Must reset to current URL tree here to ensure history.state is set. On a fresh\n                  // page load, if a new navigation comes in before a successful navigation\n                  // completes, there will be nothing in history.state.navigationId. This can cause\n                  // sync problems with AngularJS sync code which looks for a value here in order\n                  // to determine whether or not to handle a given popstate event or to leave it\n                  // to the Angualr router.\n                  this.resetUrlToCurrentUrlTree();\n                  const navCancel = new NavigationCancel(\n                      t.id, this.serializeUrl(t.extractedUrl),\n                      `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n                  eventsSubject.next(navCancel);\n                  t.resolve(false);\n                }\n                // currentNavigation should always be reset to null here. If navigation was\n                // successful, lastSuccessfulTransition will have already been set. Therefore we\n                // can safely set currentNavigation to null here.\n                this.currentNavigation = null;\n              }),\n              catchError((e) => {\n                errored = true;\n                /* This error type is issued during Redirect, and is handled as a cancellation\n                 * rather than an error. */\n                if (isNavigationCancelingError(e)) {\n                  const redirecting = isUrlTree(e.url);\n                  if (!redirecting) {\n                    // Set property only if we're not redirecting. If we landed on a page and\n                    // redirect to `/` route, the new navigation is going to see the `/` isn't\n                    // a change from the default currentUrlTree and won't navigate. This is\n                    // only applicable with initial navigation, so setting `navigated` only when\n                    // not redirecting resolves this scenario.\n                    this.navigated = true;\n                    this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n                  }\n                  const navCancel =\n                      new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n                  eventsSubject.next(navCancel);\n                  t.resolve(false);\n\n                  if (redirecting) {\n                    this.navigateByUrl(e.url);\n                  }\n\n                  /* All other errors should reset to the router's internal URL reference to the\n                   * pre-error state. */\n                } else {\n                  this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n                  const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                  eventsSubject.next(navError);\n                  try {\n                    t.resolve(this.errorHandler(e));\n                  } catch (ee) {\n                    t.reject(ee);\n                  }\n                }\n                return EMPTY;\n              }));\n          // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n        })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = <any>this.location.subscribe((change: any) => {\n        let rawUrlTree = this.parseUrl(change['url']);\n        const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n        // Navigations coming from Angular router have a navigationId state property. When this\n        // exists, restore the state.\n        const state = change.state && change.state.navigationId ? change.state : null;\n        setTimeout(\n            () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n      });\n    }\n  }\n\n  /** The current URL. */\n  get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n  /** The current Navigation object if one exists */\n  getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n  /** @internal */\n  triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n  /**\n   * Resets the configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @docsNotRequired */\n  ngOnDestroy(): void { this.dispose(); }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = null !;\n    }\n  }\n\n  /**\n   * Applies an array of commands to the current URL tree and creates a new URL tree.\n   *\n   * When given an activated route, applies the given commands starting from the route.\n   * Otherwise, applies the given command starting from the root.\n   *\n   * @param commands An array of commands to apply.\n   * @param navigationExtras Options that control the navigation strategy.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n    const {relativeTo,          queryParams,         fragment,\n           preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n    if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n    }\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    if (queryParamsHandling) {\n      switch (queryParamsHandling) {\n        case 'merge':\n          q = {...this.currentUrlTree.queryParams, ...queryParams};\n          break;\n        case 'preserve':\n          q = this.currentUrlTree.queryParams;\n          break;\n        default:\n          q = queryParams || null;\n      }\n    } else {\n      q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n  }\n\n  /**\n   * Navigate based on the provided URL, which must be absolute.\n   *\n   * @param url An absolute URL. The function does not apply any delta to the current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   * The function ignores any properties in the `NavigationExtras` that would change the\n   * provided URL.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * Returns a promise that:\n   * - resolves to 'true' when navigation succeeds,\n   * - resolves to 'false' when navigation fails,\n   * - is rejected when an error happens.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * The first parameter of `navigate()` is a delta to be applied to the current URL\n   * or the one provided in the `relativeTo` property of the second parameter (the\n   * `NavigationExtras`).\n   *\n   * In order to affect this browser's `history.state` entry, the `state`\n   * parameter can be passed. This must be an object because the router\n   * will add the `navigationId` property to this object before creating\n   * the new history item.\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /** Returns whether the url is activated */\n  isActive(url: string|UrlTree, exact: boolean): boolean {\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, exact);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, exact);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          this.currentNavigation = null;\n          t.resolve(true);\n        },\n        e => { this.console.warn(`Unhandled Navigation Error: `); });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras): Promise<boolean> {\n    const lastNavigation = this.getTransition();\n    // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n    // and that navigation results in 'replaceState' that leads to the same URL,\n    // we should skip those.\n    if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n        lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    // Because of a bug in IE and Edge, the location class fires two events (popstate and\n    // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n    // flicker. Handles the case when a popstate was emitted first.\n    if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n        lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n      return Promise.resolve(true);  // return value is not used\n    }\n    // Because of a bug in IE and Edge, the location class fires two events (popstate and\n    // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n    // flicker. Handles the case when a hashchange was emitted first.\n    if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n        lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any = null;\n    let reject: any = null;\n\n    const promise = new Promise<boolean>((res, rej) => {\n      resolve = res;\n      reject = rej;\n    });\n\n    const id = ++this.navigationId;\n    this.setTransition({\n      id,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => { return Promise.reject(e); });\n  }\n\n  private setBrowserUrl(\n      url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n    const path = this.urlSerializer.serialize(url);\n    state = state || {};\n    if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n      // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n      this.location.replaceState(path, '', {...state, navigationId: id});\n    } else {\n      this.location.go(path, '', {...state, navigationId: id});\n    }\n  }\n\n  private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n    (this as{routerState: RouterState}).routerState = storedState;\n    this.currentUrlTree = storedUrl;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n    this.resetUrlToCurrentUrlTree();\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n *   instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n *   link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n *  - `'merge'`: merge the queryParams into the current queryParams\n *  - `'preserve'`: preserve the current queryParams\n *  - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParams !: {[k: string]: any};\n  // TODO(issue/24571): remove '!'.\n  @Input() fragment !: string;\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParamsHandling !: QueryParamsHandling;\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment !: boolean;\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange !: boolean;\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl !: boolean;\n  @Input() state?: {[k: string]: any};\n  private commands: any[] = [];\n  // TODO(issue/24571): remove '!'.\n  private preserve !: boolean;\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  @Input()\n  set routerLink(commands: any[]|string) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /**\n   * @deprecated 4.0.0 use `queryParamsHandling` instead.\n   */\n  @Input()\n  set preserveQueryParams(value: boolean) {\n    if (isDevMode() && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n    }\n    this.preserve = value;\n  }\n\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      relativeTo: this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      preserveQueryParams: attrBoolValue(this.preserve),\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target !: string;\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParams !: {[k: string]: any};\n  // TODO(issue/24571): remove '!'.\n  @Input() fragment !: string;\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParamsHandling !: QueryParamsHandling;\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment !: boolean;\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange !: boolean;\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl !: boolean;\n  @Input() state?: {[k: string]: any};\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve !: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href !: string;\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  @Input()\n  set routerLink(commands: any[]|string) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  @Input()\n  set preserveQueryParams(value: boolean) {\n    if (isDevMode() && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n    }\n    this.preserve = value;\n  }\n\n  ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n  ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n  @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n  onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n    if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      relativeTo: this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      preserveQueryParams: attrBoolValue(this.preserve),\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n    OnDestroy, AfterContentInit {\n  // TODO(issue/24571): remove '!'.\n  @ContentChildren(RouterLink, {descendants: true})\n  links !: QueryList<RouterLink>;\n  // TODO(issue/24571): remove '!'.\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private subscription: Subscription;\n  public readonly isActive: boolean = false;\n\n  @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n\n  ngAfterContentInit(): void {\n    this.links.changes.subscribe(_ => this.update());\n    this.linksWithHrefs.changes.subscribe(_ => this.update());\n    this.update();\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void { this.update(); }\n  ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    return (link: RouterLink | RouterLinkWithHref) =>\n               router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutlet|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean { return !!this.activated; }\n\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig !.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of (null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  // TODO(issue/24571): remove '!'.\n  private subscription !: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n  // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n  // should be refactored.\n  ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription !: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription !: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ÉµgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n      NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n      [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n *   service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n *   include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router service solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * @see [Routing and Navigation](guide/router.html) for an\n * overview of how the router service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new router module.\n  */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps: [\n            PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n          ]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes.\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if (router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabled' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n * * 'legacy_enabled'- (Default, for compatibility.) The initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- The initial navigation is not performed. The location listener is set up\n * after the root component gets created. @deprecated since v4\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation =\n    true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled` or `disabled`.\n   * When set to `enabled`, the initial navigation starts before the root component is created.\n   * The bootstrap is blocked until the initial navigation is complete. This value is required for\n   * [server-side rendering](guide/universal) to work.\n   * When set to `disabled`, the initial navigation is not performed.\n   * The location listener is set up before the root component gets created.\n   * Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   *\n   * Legacy values are deprecated since v4 and should not be used for new applications:\n   *\n   * * `legacy_enabled` - Default for compatibility.\n   * The initial navigation starts after the root component has been created,\n   * but the bootstrap is not blocked until the initial navigation is complete.\n   * * `legacy_disabled` - The initial navigation is not performed.\n   * The location listener is set up after the root component gets created.\n   * * `true` - same as `legacy_enabled`.\n   * * `false` - same as `legacy_disabled`.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer thatâs configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, this will not work:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./`. This is currently the default\n   * behavior. Setting this option to `corrected` enables the fix.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n    location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n    config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.enableTracing) {\n    const dom = getDOM();\n    router.events.subscribe((e: Event) => {\n      dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n      dom.log(e.toString());\n      dom.log(e);\n      dom.logGroupEnd();\n    });\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n  private initNavigation: boolean = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      let resolve: Function = null !;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n        resolve(true);\n\n      } else if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n\n      } else if (opts.initialNavigation === 'enabled') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of (null) as any;\n          }\n        };\n        router.initialNavigation();\n\n      } else {\n        throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    if (this.isLegacyEnabled(opts)) {\n      router.initialNavigation();\n    } else if (this.isLegacyDisabled(opts)) {\n      router.setUpLocationChangeListener();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null !);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  private isLegacyEnabled(opts: ExtraOptions): boolean {\n    return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n        opts.initialNavigation === undefined;\n  }\n\n  private isLegacyDisabled(opts: ExtraOptions): boolean {\n    return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = /*@__PURE__*/ new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();\n//# sourceMappingURL=isArray.js.map\n","import {CmTranslateService} from \"../services/localization/cm-translate.service\";\n\nexport class TabTitle {\n\n    constructor(public tabTitle: string,\n                public trans: CmTranslateService) {\n    }\n\n    ngAfterViewChecked() {\n        let title = this.trans.get(this.tabTitle);\n\n        if (title && document.title !== title) {\n            document.title = title;\n        }\n    }\n}\n\nexport const CM_WEB_PORTAL = 'CM Web Portal';","/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(VirtualTimeScheduler, _super);\n    function VirtualTimeScheduler(SchedulerAction, maxFrames) {\n        if (SchedulerAction === void 0) {\n            SchedulerAction = VirtualAction;\n        }\n        if (maxFrames === void 0) {\n            maxFrames = Number.POSITIVE_INFINITY;\n        }\n        var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;\n        _this.maxFrames = maxFrames;\n        _this.frame = 0;\n        _this.index = -1;\n        return _this;\n    }\n    VirtualTimeScheduler.prototype.flush = function () {\n        var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n        var error, action;\n        while ((action = actions[0]) && action.delay <= maxFrames) {\n            actions.shift();\n            this.frame = action.delay;\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        }\n        if (error) {\n            while (action = actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    };\n    VirtualTimeScheduler.frameTimeFactor = 10;\n    return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\nvar VirtualAction = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(VirtualAction, _super);\n    function VirtualAction(scheduler, work, index) {\n        if (index === void 0) {\n            index = scheduler.index += 1;\n        }\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        _this.index = index;\n        _this.active = true;\n        _this.index = scheduler.index = index;\n        return _this;\n    }\n    VirtualAction.prototype.schedule = function (state, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (!this.id) {\n            return _super.prototype.schedule.call(this, state, delay);\n        }\n        this.active = false;\n        var action = new VirtualAction(this.scheduler, this.work);\n        this.add(action);\n        return action.schedule(state, delay);\n    };\n    VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        this.delay = scheduler.frame + delay;\n        var actions = scheduler.actions;\n        actions.push(this);\n        actions.sort(VirtualAction.sortActions);\n        return true;\n    };\n    VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        return undefined;\n    };\n    VirtualAction.prototype._execute = function (state, delay) {\n        if (this.active === true) {\n            return _super.prototype._execute.call(this, state, delay);\n        }\n    };\n    VirtualAction.sortActions = function (a, b) {\n        if (a.delay === b.delay) {\n            if (a.index === b.index) {\n                return 0;\n            }\n            else if (a.index > b.index) {\n                return 1;\n            }\n            else {\n                return -1;\n            }\n        }\n        else if (a.delay > b.delay) {\n            return 1;\n        }\n        else {\n            return -1;\n        }\n    };\n    return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map\n","/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { canReportError } from '../util/canReportError';\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n    if (resultSelector) {\n        if (isScheduler(resultSelector)) {\n            scheduler = resultSelector;\n        }\n        else {\n            return function () {\n                var args = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    args[_i] = arguments[_i];\n                }\n                return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n            };\n        }\n    }\n    return function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var params = {\n            subject: undefined,\n            args: args,\n            callbackFunc: callbackFunc,\n            scheduler: scheduler,\n            context: this,\n        };\n        return new Observable(function (subscriber) {\n            var context = params.context;\n            var subject = params.subject;\n            if (!scheduler) {\n                if (!subject) {\n                    subject = params.subject = new AsyncSubject();\n                    var handler = function () {\n                        var innerArgs = [];\n                        for (var _i = 0; _i < arguments.length; _i++) {\n                            innerArgs[_i] = arguments[_i];\n                        }\n                        var err = innerArgs.shift();\n                        if (err) {\n                            subject.error(err);\n                            return;\n                        }\n                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n                        subject.complete();\n                    };\n                    try {\n                        callbackFunc.apply(context, args.concat([handler]));\n                    }\n                    catch (err) {\n                        if (canReportError(subject)) {\n                            subject.error(err);\n                        }\n                        else {\n                            console.warn(err);\n                        }\n                    }\n                }\n                return subject.subscribe(subscriber);\n            }\n            else {\n                return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });\n            }\n        });\n    };\n}\nfunction dispatch(state) {\n    var _this = this;\n    var params = state.params, subscriber = state.subscriber, context = state.context;\n    var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;\n    var subject = params.subject;\n    if (!subject) {\n        subject = params.subject = new AsyncSubject();\n        var handler = function () {\n            var innerArgs = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                innerArgs[_i] = arguments[_i];\n            }\n            var err = innerArgs.shift();\n            if (err) {\n                _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n            }\n            else {\n                var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n                _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n            }\n        };\n        try {\n            callbackFunc.apply(context, args.concat([handler]));\n        }\n        catch (err) {\n            this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n        }\n    }\n    this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(arg) {\n    var value = arg.value, subject = arg.subject;\n    subject.next(value);\n    subject.complete();\n}\nfunction dispatchError(arg) {\n    var err = arg.err, subject = arg.subject;\n    subject.error(err);\n}\n//# sourceMappingURL=bindNodeCallback.js.map\n","/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {\n    var resultSelector;\n    var initialState;\n    if (arguments.length == 1) {\n        var options = initialStateOrOptions;\n        initialState = options.initialState;\n        condition = options.condition;\n        iterate = options.iterate;\n        resultSelector = options.resultSelector || identity;\n        scheduler = options.scheduler;\n    }\n    else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {\n        initialState = initialStateOrOptions;\n        resultSelector = identity;\n        scheduler = resultSelectorOrObservable;\n    }\n    else {\n        initialState = initialStateOrOptions;\n        resultSelector = resultSelectorOrObservable;\n    }\n    return new Observable(function (subscriber) {\n        var state = initialState;\n        if (scheduler) {\n            return scheduler.schedule(dispatch, 0, {\n                subscriber: subscriber,\n                iterate: iterate,\n                condition: condition,\n                resultSelector: resultSelector,\n                state: state\n            });\n        }\n        do {\n            if (condition) {\n                var conditionResult = void 0;\n                try {\n                    conditionResult = condition(state);\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return undefined;\n                }\n                if (!conditionResult) {\n                    subscriber.complete();\n                    break;\n                }\n            }\n            var value = void 0;\n            try {\n                value = resultSelector(state);\n            }\n            catch (err) {\n                subscriber.error(err);\n                return undefined;\n            }\n            subscriber.next(value);\n            if (subscriber.closed) {\n                break;\n            }\n            try {\n                state = iterate(state);\n            }\n            catch (err) {\n                subscriber.error(err);\n                return undefined;\n            }\n        } while (true);\n        return undefined;\n    });\n}\nfunction dispatch(state) {\n    var subscriber = state.subscriber, condition = state.condition;\n    if (subscriber.closed) {\n        return undefined;\n    }\n    if (state.needIterate) {\n        try {\n            state.state = state.iterate(state.state);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n    }\n    else {\n        state.needIterate = true;\n    }\n    if (condition) {\n        var conditionResult = void 0;\n        try {\n            conditionResult = condition(state.state);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        if (!conditionResult) {\n            subscriber.complete();\n            return undefined;\n        }\n        if (subscriber.closed) {\n            return undefined;\n        }\n    }\n    var value;\n    try {\n        value = state.resultSelector(state.state);\n    }\n    catch (err) {\n        subscriber.error(err);\n        return undefined;\n    }\n    if (subscriber.closed) {\n        return undefined;\n    }\n    subscriber.next(value);\n    if (subscriber.closed) {\n        return undefined;\n    }\n    return this.schedule(state);\n}\n//# sourceMappingURL=generate.js.map\n","/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */\nimport { defer } from './defer';\nimport { EMPTY } from './empty';\nexport function iif(condition, trueResult, falseResult) {\n    if (trueResult === void 0) {\n        trueResult = EMPTY;\n    }\n    if (falseResult === void 0) {\n        falseResult = EMPTY;\n    }\n    return defer(function () { return condition() ? trueResult : falseResult; });\n}\n//# sourceMappingURL=iif.js.map\n","/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nexport function interval(period, scheduler) {\n    if (period === void 0) {\n        period = 0;\n    }\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    if (!isNumeric(period) || period < 0) {\n        period = 0;\n    }\n    if (!scheduler || typeof scheduler.schedule !== 'function') {\n        scheduler = async;\n    }\n    return new Observable(function (subscriber) {\n        subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));\n        return subscriber;\n    });\n}\nfunction dispatch(state) {\n    var subscriber = state.subscriber, counter = state.counter, period = state.period;\n    subscriber.next(counter);\n    this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);\n}\n//# sourceMappingURL=interval.js.map\n","/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = /*@__PURE__*/ new Observable(noop);\nexport function never() {\n    return NEVER;\n}\n//# sourceMappingURL=never.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { isArray } from '../util/isArray';\nimport { EMPTY } from './empty';\nexport function onErrorResumeNext() {\n    var sources = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        sources[_i] = arguments[_i];\n    }\n    if (sources.length === 0) {\n        return EMPTY;\n    }\n    var first = sources[0], remainder = sources.slice(1);\n    if (sources.length === 1 && isArray(first)) {\n        return onErrorResumeNext.apply(void 0, first);\n    }\n    return new Observable(function (subscriber) {\n        var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };\n        return from(first).subscribe({\n            next: function (value) { subscriber.next(value); },\n            error: subNext,\n            complete: subNext,\n        });\n    });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function pairs(obj, scheduler) {\n    if (!scheduler) {\n        return new Observable(function (subscriber) {\n            var keys = Object.keys(obj);\n            for (var i = 0; i < keys.length && !subscriber.closed; i++) {\n                var key = keys[i];\n                if (obj.hasOwnProperty(key)) {\n                    subscriber.next([key, obj[key]]);\n                }\n            }\n            subscriber.complete();\n        });\n    }\n    else {\n        return new Observable(function (subscriber) {\n            var keys = Object.keys(obj);\n            var subscription = new Subscription();\n            subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));\n            return subscription;\n        });\n    }\n}\nexport function dispatch(state) {\n    var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;\n    if (!subscriber.closed) {\n        if (index < keys.length) {\n            var key = keys[index];\n            subscriber.next([key, obj[key]]);\n            subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));\n        }\n        else {\n            subscriber.complete();\n        }\n    }\n}\n//# sourceMappingURL=pairs.js.map\n","/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */\nimport { not } from '../util/not';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { filter } from '../operators/filter';\nimport { Observable } from '../Observable';\nexport function partition(source, predicate, thisArg) {\n    return [\n        filter(predicate, thisArg)(new Observable(subscribeTo(source))),\n        filter(not(predicate, thisArg))(new Observable(subscribeTo(source)))\n    ];\n}\n//# sourceMappingURL=partition.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function range(start, count, scheduler) {\n    if (start === void 0) {\n        start = 0;\n    }\n    return new Observable(function (subscriber) {\n        if (count === undefined) {\n            count = start;\n            start = 0;\n        }\n        var index = 0;\n        var current = start;\n        if (scheduler) {\n            return scheduler.schedule(dispatch, 0, {\n                index: index, count: count, start: start, subscriber: subscriber\n            });\n        }\n        else {\n            do {\n                if (index++ >= count) {\n                    subscriber.complete();\n                    break;\n                }\n                subscriber.next(current++);\n                if (subscriber.closed) {\n                    break;\n                }\n            } while (true);\n        }\n        return undefined;\n    });\n}\nexport function dispatch(state) {\n    var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;\n    if (index >= count) {\n        subscriber.complete();\n        return;\n    }\n    subscriber.next(start);\n    if (subscriber.closed) {\n        return;\n    }\n    state.index = index + 1;\n    state.start = start + 1;\n    this.schedule(state);\n}\n//# sourceMappingURL=range.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n    return new Observable(function (subscriber) {\n        var resource;\n        try {\n            resource = resourceFactory();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        var result;\n        try {\n            result = observableFactory(resource);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        var source = result ? from(result) : EMPTY;\n        var subscription = source.subscribe(subscriber);\n        return function () {\n            subscription.unsubscribe();\n            if (resource) {\n                resource.unsubscribe();\n            }\n        };\n    });\n}\n//# sourceMappingURL=using.js.map\n","import { TemplateRef, ViewContainerRef } from '@angular/core';\n\nexport class BsComponentRef<T> {\n  templateRef: TemplateRef<T>;\n  viewContainer: ViewContainerRef;\n}\n","/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\n\nimport { ComponentRef, ViewRef } from '@angular/core';\n\nexport class ContentRef {\n  /* tslint:disable-next-line: no-any */\n  nodes: any[];\n  viewRef?: ViewRef;\n  /* tslint:disable-next-line: no-any */\n  componentRef?: ComponentRef<any>;\n\n  constructor(\n    /* tslint:disable-next-line: no-any */\n    nodes: any[],\n    viewRef?: ViewRef,\n    /* tslint:disable-next-line: no-any */\n    componentRef?: ComponentRef<any>\n  ) {\n    this.nodes = nodes;\n    this.viewRef = viewRef;\n    this.componentRef = componentRef;\n  }\n}\n","// tslint:disable:max-file-line-count\n// todo: add delay support\n// todo: merge events onShow, onShown, etc...\n// todo: add global positioning configuration?\nimport {\n  ApplicationRef,\n  ComponentFactory,\n  ComponentFactoryResolver,\n  ComponentRef,\n  ElementRef,\n  EmbeddedViewRef,\n  EventEmitter,\n  Injector,\n  NgZone,\n  Renderer2,\n  StaticProvider,\n  TemplateRef,\n  Type,\n  ViewContainerRef\n} from '@angular/core';\n\nimport { PositioningOptions, PositioningService } from 'ngx-bootstrap/positioning';\n\nimport {\n  listenToTriggersV2,\n  registerEscClick,\n  registerOutsideClick\n} from 'ngx-bootstrap/utils';\n\nimport { ContentRef } from './content-ref.class';\nimport { ListenOptions } from './listen-options.model';\nimport { Subscription } from 'rxjs';\n\nexport class ComponentLoader<T> {\n  onBeforeShow: EventEmitter<void> = new EventEmitter();\n  /* tslint:disable-next-line: no-any*/\n  onShown: EventEmitter<any> = new EventEmitter();\n  /* tslint:disable-next-line: no-any*/\n  onBeforeHide: EventEmitter<any> = new EventEmitter();\n  onHidden: EventEmitter<boolean> = new EventEmitter();\n\n  instance: T;\n  _componentRef: ComponentRef<T>;\n  _inlineViewRef: EmbeddedViewRef<T>;\n\n  private _providers: StaticProvider[] = [];\n  private _componentFactory: ComponentFactory<T>;\n  private _zoneSubscription: Subscription;\n  private _contentRef: ContentRef;\n  private _innerComponent: ComponentRef<T>;\n\n  private _unregisterListenersFn: Function;\n\n  get isShown(): boolean {\n    if (this._isHiding) {\n      return false;\n    }\n\n    return !!this._componentRef;\n  }\n\n  private _isHiding = false;\n\n  /**\n   * Placement of a component. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  private attachment: string;\n\n  /**\n   * A selector specifying the element the popover should be appended to.\n   */\n  /* tslint:disable-next-line: no-any*/\n  private container: string | ElementRef | any;\n\n  /**\n   * A selector used if container element was not found\n   */\n  private containerDefaultSelector = 'body';\n\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  private triggers: string;\n\n  private _listenOpts: ListenOptions = {};\n  private _globalListener = Function.prototype;\n\n  /**\n   * Do not use this directly, it should be instanced via\n   * `ComponentLoadFactory.attach`\n   * @internal\n   */\n  // tslint:disable-next-line\n  public constructor(\n    private _viewContainerRef: ViewContainerRef,\n    private _renderer: Renderer2,\n    private _elementRef: ElementRef,\n    private _injector: Injector,\n    private _componentFactoryResolver: ComponentFactoryResolver,\n    private _ngZone: NgZone,\n    private _applicationRef: ApplicationRef,\n    private _posService: PositioningService\n  ) {}\n\n  attach(compType: Type<T>): ComponentLoader<T> {\n    this._componentFactory = this._componentFactoryResolver\n      .resolveComponentFactory<T>(compType);\n\n    return this;\n  }\n\n  // todo: add behaviour: to target element, `body`, custom element\n  to(container?: string | ElementRef): ComponentLoader<T> {\n    this.container = container || this.container;\n\n    return this;\n  }\n\n  position(opts?: PositioningOptions): ComponentLoader<T> {\n    this.attachment = opts.attachment || this.attachment;\n    this._elementRef = (opts.target as ElementRef) || this._elementRef;\n\n    return this;\n  }\n\n  provide(provider: StaticProvider): ComponentLoader<T> {\n    this._providers.push(provider);\n\n    return this;\n  }\n\n  // todo: appendChild to element or document.querySelector(this.container)\n\n  show(opts: {\n    /* tslint:disable-next-line: no-any*/\n    content?: string | TemplateRef<any>;\n    /* tslint:disable-next-line: no-any*/\n    context?: any;\n    /* tslint:disable-next-line: no-any*/\n    initialState?: any;\n    /* tslint:disable-next-line: no-any*/\n    [key: string]: any;\n  } = {}\n  ): ComponentRef<T> {\n\n    this._subscribePositioning();\n    this._innerComponent = null;\n\n    if (!this._componentRef) {\n      this.onBeforeShow.emit();\n      this._contentRef = this._getContentRef(opts.content, opts.context, opts.initialState);\n\n      const injector = Injector.create({\n        providers: this._providers,\n        parent: this._injector\n      });\n\n      this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);\n\n      this._applicationRef.attachView(this._componentRef.hostView);\n      // this._componentRef = this._viewContainerRef\n      //   .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);\n      this.instance = this._componentRef.instance;\n\n      Object.assign(this._componentRef.instance, opts);\n\n      if (this.container instanceof ElementRef) {\n        this.container.nativeElement.appendChild(\n          this._componentRef.location.nativeElement\n        );\n      }\n\n      if (typeof this.container === 'string' && typeof document !== 'undefined') {\n        const selectedElement = document.querySelector(this.container) ||\n                                document.querySelector(this.containerDefaultSelector);\n\n        selectedElement.appendChild(this._componentRef.location.nativeElement);\n      }\n\n      if (\n        !this.container &&\n        this._elementRef &&\n        this._elementRef.nativeElement.parentElement\n      ) {\n        this._elementRef.nativeElement.parentElement.appendChild(\n          this._componentRef.location.nativeElement\n        );\n      }\n\n      // we need to manually invoke change detection since events registered\n      // via\n      // Renderer::listen() are not picked up by change detection with the\n      // OnPush strategy\n      if (this._contentRef.componentRef) {\n        this._innerComponent = this._contentRef.componentRef.instance;\n        this._contentRef.componentRef.changeDetectorRef.markForCheck();\n        this._contentRef.componentRef.changeDetectorRef.detectChanges();\n      }\n      this._componentRef.changeDetectorRef.markForCheck();\n      this._componentRef.changeDetectorRef.detectChanges();\n      this.onShown.emit(this._componentRef.instance);\n    }\n\n    this._registerOutsideClick();\n\n    return this._componentRef;\n  }\n\n  hide(): ComponentLoader<T> {\n    if (!this._componentRef) {\n      return this;\n    }\n\n    this._posService.deletePositionElement(this._componentRef.location);\n\n    this.onBeforeHide.emit(this._componentRef.instance);\n\n    const componentEl = this._componentRef.location.nativeElement;\n    componentEl.parentNode.removeChild(componentEl);\n    if (this._contentRef.componentRef) {\n      this._contentRef.componentRef.destroy();\n    }\n    this._componentRef.destroy();\n    if (this._viewContainerRef && this._contentRef.viewRef) {\n      this._viewContainerRef.remove(\n        this._viewContainerRef.indexOf(this._contentRef.viewRef)\n      );\n    }\n    if (this._contentRef.viewRef) {\n      this._contentRef.viewRef.destroy();\n    }\n\n    this._contentRef = null;\n    this._componentRef = null;\n    this._removeGlobalListener();\n\n    this.onHidden.emit();\n\n    return this;\n  }\n\n  toggle(): void {\n    if (this.isShown) {\n      this.hide();\n\n      return;\n    }\n\n    this.show();\n  }\n\n  dispose(): void {\n    if (this.isShown) {\n      this.hide();\n    }\n\n    this._unsubscribePositioning();\n\n    if (this._unregisterListenersFn) {\n      this._unregisterListenersFn();\n    }\n  }\n\n  listen(listenOpts: ListenOptions): ComponentLoader<T> {\n    this.triggers = listenOpts.triggers || this.triggers;\n    this._listenOpts.outsideClick = listenOpts.outsideClick;\n    this._listenOpts.outsideEsc = listenOpts.outsideEsc;\n    listenOpts.target = listenOpts.target || this._elementRef.nativeElement;\n\n    const hide = (this._listenOpts.hide = () =>\n      listenOpts.hide ? listenOpts.hide() : void this.hide());\n    const show = (this._listenOpts.show = (registerHide: Function) => {\n      listenOpts.show ? listenOpts.show(registerHide) : this.show(registerHide);\n      registerHide();\n    });\n\n    const toggle = (registerHide: Function) => {\n      this.isShown ? hide() : show(registerHide);\n    };\n\n    this._unregisterListenersFn = listenToTriggersV2(this._renderer, {\n      target: listenOpts.target,\n      triggers: listenOpts.triggers,\n      show,\n      hide,\n      toggle\n    });\n\n    return this;\n  }\n\n  _removeGlobalListener() {\n    if (this._globalListener) {\n      this._globalListener();\n      this._globalListener = null;\n    }\n  }\n\n  attachInline(\n    vRef: ViewContainerRef,\n    /* tslint:disable-next-line: no-any*/\n    template: TemplateRef<any>\n  ): ComponentLoader<T> {\n    this._inlineViewRef = vRef.createEmbeddedView(template);\n\n    return this;\n  }\n\n  _registerOutsideClick(): void {\n    if (!this._componentRef || !this._componentRef.location) {\n      return;\n    }\n    // why: should run after first event bubble\n    if (this._listenOpts.outsideClick) {\n      const target = this._componentRef.location.nativeElement;\n      setTimeout(() => {\n        this._globalListener = registerOutsideClick(this._renderer, {\n          targets: [target, this._elementRef.nativeElement],\n          outsideClick: this._listenOpts.outsideClick,\n          hide: () => this._listenOpts.hide()\n        });\n      });\n    }\n    if (this._listenOpts.outsideEsc) {\n      const target = this._componentRef.location.nativeElement;\n      this._globalListener = registerEscClick(this._renderer, {\n        targets: [target, this._elementRef.nativeElement],\n        outsideEsc: this._listenOpts.outsideEsc,\n        hide: () => this._listenOpts.hide()\n      });\n    }\n  }\n\n  getInnerComponent(): ComponentRef<T> {\n    return this._innerComponent;\n  }\n\n  private _subscribePositioning(): void {\n    if (this._zoneSubscription || !this.attachment) {\n      return;\n    }\n\n    this.onShown.subscribe(() => {\n      this._posService.position({\n        element: this._componentRef.location,\n        target: this._elementRef,\n        attachment: this.attachment,\n        appendToBody: this.container === 'body'\n      });\n    });\n\n    this._zoneSubscription = this._ngZone.onStable.subscribe(() => {\n      if (!this._componentRef) {\n        return;\n      }\n\n      this._posService.calcPosition();\n    });\n  }\n\n  private _unsubscribePositioning(): void {\n    if (!this._zoneSubscription) {\n      return;\n    }\n\n    this._zoneSubscription.unsubscribe();\n    this._zoneSubscription = null;\n  }\n\n  private _getContentRef(\n    /* tslint:disable-next-line: no-any*/\n    content: string | TemplateRef<any> | any,\n    /* tslint:disable-next-line: no-any*/\n    context?: any,\n    /* tslint:disable-next-line: no-any*/\n    initialState?: any\n  ): ContentRef {\n    if (!content) {\n      return new ContentRef([]);\n    }\n\n    if (content instanceof TemplateRef) {\n      if (this._viewContainerRef) {\n        const _viewRef = this._viewContainerRef\n          .createEmbeddedView<TemplateRef<T>>(content, context);\n        _viewRef.markForCheck();\n\n        return new ContentRef([_viewRef.rootNodes], _viewRef);\n      }\n      const viewRef = content.createEmbeddedView({});\n      this._applicationRef.attachView(viewRef);\n\n      return new ContentRef([viewRef.rootNodes], viewRef);\n    }\n\n    if (typeof content === 'function') {\n      const contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(\n        content\n      );\n\n      const modalContentInjector = Injector.create({\n        providers: this._providers,\n        parent: this._injector\n      });\n\n      const componentRef = contentCmptFactory.create(modalContentInjector);\n      Object.assign(componentRef.instance, initialState);\n      this._applicationRef.attachView(componentRef.hostView);\n\n      return new ContentRef(\n        [[componentRef.location.nativeElement]],\n        componentRef.hostView,\n        componentRef\n      );\n    }\n\n    return new ContentRef([[this._renderer.createText(`${content}`)]]);\n  }\n}\n","import {\n  ApplicationRef, ComponentFactoryResolver, ElementRef, Injectable, Injector,\n  NgZone, Renderer2, ViewContainerRef\n} from '@angular/core';\nimport { ComponentLoader } from './component-loader.class';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\n@Injectable()\nexport class ComponentLoaderFactory {\n  constructor(private _componentFactoryResolver: ComponentFactoryResolver,\n              private _ngZone: NgZone,\n              private _injector: Injector,\n              private _posService: PositioningService,\n              private _applicationRef: ApplicationRef) {}\n\n  /**\n   *\n   * @param _elementRef\n   * @param _viewContainerRef\n   * @param _renderer\n   */\n  createLoader<T>(_elementRef: ElementRef,\n                  _viewContainerRef: ViewContainerRef,\n                  _renderer: Renderer2): ComponentLoader<T> {\n    return new ComponentLoader<T>(\n      _viewContainerRef,\n      _renderer,\n      _elementRef,\n      this._injector,\n      this._componentFactoryResolver,\n      this._ngZone,\n      this._applicationRef,\n      this._posService\n    );\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * @description\n * Defines an interface that acts as a bridge between the Angular forms API and a\n * native element in the DOM.\n *\n * Implement this interface to create a custom form control directive\n * that integrates with Angular forms.\n *\n * @see DefaultValueAccessor\n *\n * @publicApi\n */\nexport interface ControlValueAccessor {\n  /**\n   * @description\n   * Writes a new value to the element.\n   *\n   * This method is called by the forms API to write to the view when programmatic\n   * changes from model to view are requested.\n   *\n   * @usageNotes\n   * ### Write a value to the element\n   *\n   * The following example writes a value to the native DOM element.\n   *\n   * ```ts\n   * writeValue(value: any): void {\n   *   this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n   * }\n   * ```\n   *\n   * @param obj The new value for the element\n   */\n  writeValue(obj: any): void;\n\n  /**\n   * @description\n   * Registers a callback function that is called when the control's value\n   * changes in the UI.\n   *\n   * This method is called by the forms API on initialization to update the form\n   * model when values propagate from the view to the model.\n   *\n   * When implementing the `registerOnChange` method in your own value accessor,\n   * save the given function so your class calls it at the appropriate time.\n   *\n   * @usageNotes\n   * ### Store the change function\n   *\n   * The following example stores the provided function as an internal method.\n   *\n   * ```ts\n   * registerOnChange(fn: (_: any) => void): void {\n   *   this._onChange = fn;\n   * }\n   * ```\n   *\n   * When the value changes in the UI, call the registered\n   * function to allow the forms API to update itself:\n   *\n   * ```ts\n   * host: {\n   *    '(change)': '_onChange($event.target.value)'\n   * }\n   * ```\n   *\n   * @param fn The callback function to register\n   */\n  registerOnChange(fn: any): void;\n\n  /**\n   * @description\n   * Registers a callback function is called by the forms API on initialization\n   * to update the form model on blur.\n   *\n   * When implementing `registerOnTouched` in your own value accessor, save the given\n   * function so your class calls it when the control should be considered\n   * blurred or \"touched\".\n   *\n   * @usageNotes\n   * ### Store the callback function\n   *\n   * The following example stores the provided function as an internal method.\n   *\n   * ```ts\n   * registerOnTouched(fn: any): void {\n   *   this._onTouched = fn;\n   * }\n   * ```\n   *\n   * On blur (or equivalent), your class should call the registered function to allow\n   * the forms API to update itself:\n   *\n   * ```ts\n   * host: {\n   *    '(blur)': '_onTouched()'\n   * }\n   * ```\n   *\n   * @param fn The callback function to register\n   */\n  registerOnTouched(fn: any): void;\n\n  /**\n   * @description\n   * Function that is called by the forms API when the control status changes to\n   * or from 'DISABLED'. Depending on the status, it enables or disables the\n   * appropriate DOM element.\n   *\n   * @usageNotes\n   * The following is an example of writing the disabled property to a native DOM element:\n   *\n   * ```ts\n   * setDisabledState(isDisabled: boolean): void {\n   *   this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n   * }\n   * ```\n   *\n   * @param isDisabled The disabled status to set on the element\n   */\n  setDisabledState?(isDisabled: boolean): void;\n}\n\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nexport const NG_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>('NgValueAccessor');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => CheckboxControlValueAccessor),\n  multi: true,\n};\n\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n  host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\n  providers: [CHECKBOX_VALUE_ACCESSOR]\n})\nexport class CheckboxControlValueAccessor implements ControlValueAccessor {\n  /**\n   * @description\n   * The registered callback function called when a change event occurs on the input element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"checked\" property on the input element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: any): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (_: any) => {}): void { this.onChange = fn; }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => {}): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Inject, InjectionToken, Optional, Renderer2, forwardRef} from '@angular/core';\nimport {ÉµgetDOM as getDOM} from '@angular/platform-browser';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const DEFAULT_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => DefaultValueAccessor),\n  multi: true\n};\n\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid(): boolean {\n  const userAgent = getDOM() ? getDOM().getUserAgent() : '';\n  return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nexport const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionEventMode');\n\n/**\n * @description\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n  // TODO: vsavkin replace the above selector with the one below it once\n  // https://github.com/angular/angular/issues/3011 is implemented\n  // selector: '[ngModel],[formControl],[formControlName]',\n  host: {\n    '(input)': '$any(this)._handleInput($event.target.value)',\n    '(blur)': 'onTouched()',\n    '(compositionstart)': '$any(this)._compositionStart()',\n    '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n  },\n  providers: [DEFAULT_VALUE_ACCESSOR]\n})\nexport class DefaultValueAccessor implements ControlValueAccessor {\n  /**\n   * @description\n   * The registered callback function called when an input event occurs on the input element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  /** Whether the user is creating a composition string (IME events). */\n  private _composing = false;\n\n  constructor(\n      private _renderer: Renderer2, private _elementRef: ElementRef,\n      @Optional() @Inject(COMPOSITION_BUFFER_MODE) private _compositionMode: boolean) {\n    if (this._compositionMode == null) {\n      this._compositionMode = !_isAndroid();\n    }\n  }\n\n  /**\n   * Sets the \"value\" property on the input element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: any): void {\n    const normalizedValue = value == null ? '' : value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (_: any) => void): void { this.onChange = fn; }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _handleInput(value: any): void {\n    if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n      this.onChange(value);\n    }\n  }\n\n  /** @internal */\n  _compositionStart(): void { this._composing = true; }\n\n  /** @internal */\n  _compositionEnd(value: any): void {\n    this._composing = false;\n    this._compositionMode && this.onChange(value);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\nimport {AbstractControl} from '../model';\nimport {ValidationErrors} from './validators';\n\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nexport abstract class AbstractControlDirective {\n  /**\n   * @description\n   * A reference to the underlying control.\n   *\n   * @returns the control that backs this directive. Most properties fall through to that instance.\n   */\n  abstract get control(): AbstractControl|null;\n\n  /**\n   * @description\n   * Reports the value of the control if it is present, otherwise null.\n   */\n  get value(): any { return this.control ? this.control.value : null; }\n\n  /**\n   * @description\n   * Reports whether the control is valid. A control is considered valid if no\n   * validation errors exist with the current value.\n   * If the control is not present, null is returned.\n   */\n  get valid(): boolean|null { return this.control ? this.control.valid : null; }\n\n  /**\n   * @description\n   * Reports whether the control is invalid, meaning that an error exists in the input value.\n   * If the control is not present, null is returned.\n   */\n  get invalid(): boolean|null { return this.control ? this.control.invalid : null; }\n\n  /**\n   * @description\n   * Reports whether a control is pending, meaning that that async validation is occurring and\n   * errors are not yet available for the input value. If the control is not present, null is\n   * returned.\n   */\n  get pending(): boolean|null { return this.control ? this.control.pending : null; }\n\n  /**\n   * @description\n   * Reports whether the control is disabled, meaning that the control is disabled\n   * in the UI and is exempt from validation checks and excluded from aggregate\n   * values of ancestor controls. If the control is not present, null is returned.\n   */\n  get disabled(): boolean|null { return this.control ? this.control.disabled : null; }\n\n  /**\n   * @description\n   * Reports whether the control is enabled, meaning that the control is included in ancestor\n   * calculations of validity or value. If the control is not present, null is returned.\n   */\n  get enabled(): boolean|null { return this.control ? this.control.enabled : null; }\n\n  /**\n   * @description\n   * Reports the control's validation errors. If the control is not present, null is returned.\n   */\n  get errors(): ValidationErrors|null { return this.control ? this.control.errors : null; }\n\n  /**\n   * @description\n   * Reports whether the control is pristine, meaning that the user has not yet changed\n   * the value in the UI. If the control is not present, null is returned.\n   */\n  get pristine(): boolean|null { return this.control ? this.control.pristine : null; }\n\n  /**\n   * @description\n   * Reports whether the control is dirty, meaning that the user has changed\n   * the value in the UI. If the control is not present, null is returned.\n   */\n  get dirty(): boolean|null { return this.control ? this.control.dirty : null; }\n\n  /**\n   * @description\n   * Reports whether the control is touched, meaning that the user has triggered\n   * a `blur` event on it. If the control is not present, null is returned.\n   */\n  get touched(): boolean|null { return this.control ? this.control.touched : null; }\n\n  /**\n   * @description\n   * Reports the validation status of the control. Possible values include:\n   * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n   * If the control is not present, null is returned.\n   */\n  get status(): string|null { return this.control ? this.control.status : null; }\n\n  /**\n   * @description\n   * Reports whether the control is untouched, meaning that the user has not yet triggered\n   * a `blur` event on it. If the control is not present, null is returned.\n   */\n  get untouched(): boolean|null { return this.control ? this.control.untouched : null; }\n\n  /**\n   * @description\n   * Returns a multicasting observable that emits a validation status whenever it is\n   * calculated for the control. If the control is not present, null is returned.\n   */\n  get statusChanges(): Observable<any>|null {\n    return this.control ? this.control.statusChanges : null;\n  }\n\n  /**\n   * @description\n   * Returns a multicasting observable of value changes for the control that emits every time the\n   * value of the control changes in the UI or programmatically.\n   * If the control is not present, null is returned.\n   */\n  get valueChanges(): Observable<any>|null {\n    return this.control ? this.control.valueChanges : null;\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[]|null { return null; }\n\n  /**\n   * @description\n   * Resets the control with the provided value if the control is present.\n   */\n  reset(value: any = undefined): void {\n    if (this.control) this.control.reset(value);\n  }\n\n  /**\n   * @description\n   * Reports whether the control with the given path has the error specified.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * If no path is given, this method checks for the error on the current control.\n   *\n   * @returns whether the given error is present in the control at the given path.\n   *\n   * If the control is not present, false is returned.\n   */\n  hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n    return this.control ? this.control.hasError(errorCode, path) : false;\n  }\n\n  /**\n   * @description\n   * Reports error data for the control with the given path.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * @returns error data for that particular error. If the control or error is not present,\n   * null is returned.\n   */\n  getError(errorCode: string, path?: Array<string|number>|string): any {\n    return this.control ? this.control.getError(errorCode, path) : null;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {Form} from './form_interface';\n\n\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nexport abstract class ControlContainer extends AbstractControlDirective {\n  /**\n   * @description\n   * The name for the control\n   */\n  // TODO(issue/24571): remove '!'.\n  name !: string;\n\n  /**\n   * @description\n   * The top-level form directive for the control.\n   */\n  get formDirective(): Form|null { return null; }\n\n  /**\n   * @description\n   * The path to this group.\n   */\n  get path(): string[]|null { return null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nfunction unimplemented(): any {\n  throw new Error('unimplemented');\n}\n\n/**\n * @description\n * A base class that all control `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nexport abstract class NgControl extends AbstractControlDirective {\n  /**\n   * @description\n   * The parent form for the control.\n   *\n   * @internal\n   */\n  _parent: ControlContainer|null = null;\n\n  /**\n   * @description\n   * The name for the control\n   */\n  name: string|null = null;\n\n  /**\n   * @description\n   * The value accessor for the control\n   */\n  valueAccessor: ControlValueAccessor|null = null;\n\n  /**\n   * @description\n   * The uncomposed array of synchronous validators for the control\n   *\n   * @internal\n   */\n  _rawValidators: Array<Validator|ValidatorFn> = [];\n\n  /**\n   * @description\n   * The uncomposed array of async validators for the control\n   *\n   * @internal\n   */\n  _rawAsyncValidators: Array<AsyncValidator|AsyncValidatorFn> = [];\n\n  /**\n   * @description\n   * The registered synchronous validator function for the control\n   *\n   * @throws An exception that this method is not implemented\n   */\n  get validator(): ValidatorFn|null { return <ValidatorFn>unimplemented(); }\n\n  /**\n   * @description\n   * The registered async validator function for the control\n   *\n   * @throws An exception that this method is not implemented\n   */\n  get asyncValidator(): AsyncValidatorFn|null { return <AsyncValidatorFn>unimplemented(); }\n\n  /**\n   * @description\n   * The callback method to update the model from the view when requested\n   *\n   * @param newValue The new value for the view\n   */\n  abstract viewToModelUpdate(newValue: any): void;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Self} from '@angular/core';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {NgControl} from './ng_control';\n\nexport class AbstractControlStatus {\n  private _cd: AbstractControlDirective;\n\n  constructor(cd: AbstractControlDirective) { this._cd = cd; }\n\n  get ngClassUntouched(): boolean { return this._cd.control ? this._cd.control.untouched : false; }\n  get ngClassTouched(): boolean { return this._cd.control ? this._cd.control.touched : false; }\n  get ngClassPristine(): boolean { return this._cd.control ? this._cd.control.pristine : false; }\n  get ngClassDirty(): boolean { return this._cd.control ? this._cd.control.dirty : false; }\n  get ngClassValid(): boolean { return this._cd.control ? this._cd.control.valid : false; }\n  get ngClassInvalid(): boolean { return this._cd.control ? this._cd.control.invalid : false; }\n  get ngClassPending(): boolean { return this._cd.control ? this._cd.control.pending : false; }\n}\n\nexport const ngControlStatusHost = {\n  '[class.ng-untouched]': 'ngClassUntouched',\n  '[class.ng-touched]': 'ngClassTouched',\n  '[class.ng-pristine]': 'ngClassPristine',\n  '[class.ng-dirty]': 'ngClassDirty',\n  '[class.ng-valid]': 'ngClassValid',\n  '[class.ng-invalid]': 'ngClassInvalid',\n  '[class.ng-pending]': 'ngClassPending',\n};\n\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})\nexport class NgControlStatus extends AbstractControlStatus {\n  constructor(@Self() cd: NgControl) { super(cd); }\n}\n\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc).\n * \n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n  host: ngControlStatusHost\n})\nexport class NgControlStatusGroup extends AbstractControlStatus {\n  constructor(@Self() cd: ControlContainer) { super(cd); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken, ÉµisObservable as isObservable, ÉµisPromise as isPromise} from '@angular/core';\nimport {Observable, forkJoin, from} from 'rxjs';\nimport {map} from 'rxjs/operators';\nimport {AsyncValidatorFn, ValidationErrors, Validator, ValidatorFn} from './directives/validators';\nimport {AbstractControl, FormControl} from './model';\n\nfunction isEmptyInputValue(value: any): boolean {\n  // we don't check for string here so it also works with arrays\n  return value == null || value.length === 0;\n}\n\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n *   selector: '[customValidator]',\n *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n *   validate(control: AbstractControl): ValidationErrors | null {\n *     return { 'custom': true };\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport const NG_VALIDATORS = new InjectionToken<Array<Validator|Function>>('NgValidators');\n\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\nexport const NG_ASYNC_VALIDATORS =\n    new InjectionToken<Array<Validator|Function>>('NgAsyncValidators');\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n *   punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n *   `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n *   periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n *   - Disallow `local-part` to begin or end with a period (`.`).\n *   - Disallow `local-part` length to exceed 64 characters.\n *   - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n    /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nexport class Validators {\n  /**\n   * @description\n   * Validator that requires the control's value to be greater than or equal to the provided number.\n   * The validator exists only as a function and not as a directive.\n   *\n   * @usageNotes\n   *\n   * ### Validate against a minimum of 3\n   *\n   * ```typescript\n   * const control = new FormControl(2, Validators.min(3));\n   *\n   * console.log(control.errors); // {min: {min: 3, actual: 2}}\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `min` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static min(min: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => {\n      if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value = parseFloat(control.value);\n      // Controls with NaN values after parsing should be treated as not having a\n      // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n      return !isNaN(value) && value < min ? {'min': {'min': min, 'actual': control.value}} : null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value to be less than or equal to the provided number.\n   * The validator exists only as a function and not as a directive.\n   *\n   * @usageNotes\n   *\n   * ### Validate against a maximum of 15\n   *\n   * ```typescript\n   * const control = new FormControl(16, Validators.max(15));\n   *\n   * console.log(control.errors); // {max: {max: 15, actual: 16}}\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `max` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static max(max: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => {\n      if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value = parseFloat(control.value);\n      // Controls with NaN values after parsing should be treated as not having a\n      // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n      return !isNaN(value) && value > max ? {'max': {'max': max, 'actual': control.value}} : null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control have a non-empty value.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field is non-empty\n   *\n   * ```typescript\n   * const control = new FormControl('', Validators.required);\n   *\n   * console.log(control.errors); // {required: true}\n   * ```\n   *\n   * @returns An error map with the `required` property\n   * if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static required(control: AbstractControl): ValidationErrors|null {\n    return isEmptyInputValue(control.value) ? {'required': true} : null;\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value be true. This validator is commonly\n   * used for required checkboxes.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field value is true\n   *\n   * ```typescript\n   * const control = new FormControl('', Validators.requiredTrue);\n   *\n   * console.log(control.errors); // {required: true}\n   * ```\n   *\n   * @returns An error map that contains the `required` property\n   * set to `true` if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static requiredTrue(control: AbstractControl): ValidationErrors|null {\n    return control.value === true ? null : {'required': true};\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value pass an email validation test.\n   *\n   * Tests the value using a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n   * pattern suitable for common usecases. The pattern is based on the definition of a valid email\n   * address in the [WHATWG HTML specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address)\n   * with some enhancements to incorporate more RFC rules (such as rules related to domain names and\n   * the lengths of different parts of the address).\n   *\n   * The differences from the WHATWG version include:\n   * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n   * - Disallow `local-part` to be longer than 64 characters.\n   * - Disallow the whole address to be longer than 254 characters.\n   *\n   * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n   * validate the value against a different pattern.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field matches a valid email pattern\n   *\n   * ```typescript\n   * const control = new FormControl('bad@', Validators.email);\n   *\n   * console.log(control.errors); // {email: true}\n   * ```\n   *\n   * @returns An error map with the `email` property\n   * if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static email(control: AbstractControl): ValidationErrors|null {\n    if (isEmptyInputValue(control.value)) {\n      return null;  // don't validate empty values to allow optional controls\n    }\n    return EMAIL_REGEXP.test(control.value) ? null : {'email': true};\n  }\n\n  /**\n   * @description\n   * Validator that requires the length of the control's value to be greater than or equal\n   * to the provided minimum length. This validator is also provided by default if you use the\n   * the HTML5 `minlength` attribute.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field has a minimum of 3 characters\n   *\n   * ```typescript\n   * const control = new FormControl('ng', Validators.minLength(3));\n   *\n   * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n   * ```\n   *\n   * ```html\n   * <input minlength=\"5\">\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `minlength` if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static minLength(minLength: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => {\n      if (isEmptyInputValue(control.value)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const length: number = control.value ? control.value.length : 0;\n      return length < minLength ?\n          {'minlength': {'requiredLength': minLength, 'actualLength': length}} :\n          null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the length of the control's value to be less than or equal\n   * to the provided maximum length. This validator is also provided by default if you use the\n   * the HTML5 `maxlength` attribute.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field has maximum of 5 characters\n   *\n   * ```typescript\n   * const control = new FormControl('Angular', Validators.maxLength(5));\n   *\n   * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n   * ```\n   *\n   * ```html\n   * <input maxlength=\"5\">\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `maxlength` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static maxLength(maxLength: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => {\n      const length: number = control.value ? control.value.length : 0;\n      return length > maxLength ?\n          {'maxlength': {'requiredLength': maxLength, 'actualLength': length}} :\n          null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value to match a regex pattern. This validator is also\n   * provided by default if you use the HTML5 `pattern` attribute.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field only contains letters or spaces\n   *\n   * ```typescript\n   * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n   *\n   * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n   * ```\n   *\n   * ```html\n   * <input pattern=\"[a-zA-Z ]*\">\n   * ```\n   *\n   * @param pattern A regular expression to be used as is to test the values, or a string.\n   * If a string is passed, the `^` character is prepended and the `$` character is\n   * appended to the provided string (if not already present), and the resulting regular\n   * expression is used to test the values.\n   *\n   * @returns A validator function that returns an error map with the\n   * `pattern` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static pattern(pattern: string|RegExp): ValidatorFn {\n    if (!pattern) return Validators.nullValidator;\n    let regex: RegExp;\n    let regexStr: string;\n    if (typeof pattern === 'string') {\n      regexStr = '';\n\n      if (pattern.charAt(0) !== '^') regexStr += '^';\n\n      regexStr += pattern;\n\n      if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';\n\n      regex = new RegExp(regexStr);\n    } else {\n      regexStr = pattern.toString();\n      regex = pattern;\n    }\n    return (control: AbstractControl): ValidationErrors | null => {\n      if (isEmptyInputValue(control.value)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value: string = control.value;\n      return regex.test(value) ? null :\n                                 {'pattern': {'requiredPattern': regexStr, 'actualValue': value}};\n    };\n  }\n\n  /**\n   * @description\n   * Validator that performs no operation.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static nullValidator(control: AbstractControl): ValidationErrors|null { return null; }\n\n  /**\n   * @description\n   * Compose multiple validators into a single function that returns the union\n   * of the individual error maps for the provided control.\n   *\n   * @returns A validator function that returns an error map with the\n   * merged error maps of the validators if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static compose(validators: null): null;\n  static compose(validators: (ValidatorFn|null|undefined)[]): ValidatorFn|null;\n  static compose(validators: (ValidatorFn|null|undefined)[]|null): ValidatorFn|null {\n    if (!validators) return null;\n    const presentValidators: ValidatorFn[] = validators.filter(isPresent) as any;\n    if (presentValidators.length == 0) return null;\n\n    return function(control: AbstractControl) {\n      return _mergeErrors(_executeValidators(control, presentValidators));\n    };\n  }\n\n  /**\n   * @description\n   * Compose multiple async validators into a single function that returns the union\n   * of the individual error objects for the provided control.\n   *\n   * @returns A validator function that returns an error map with the\n   * merged error objects of the async validators if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static composeAsync(validators: (AsyncValidatorFn|null)[]): AsyncValidatorFn|null {\n    if (!validators) return null;\n    const presentValidators: AsyncValidatorFn[] = validators.filter(isPresent) as any;\n    if (presentValidators.length == 0) return null;\n\n    return function(control: AbstractControl) {\n      const observables = _executeAsyncValidators(control, presentValidators).map(toObservable);\n      return forkJoin(observables).pipe(map(_mergeErrors));\n    };\n  }\n}\n\nfunction isPresent(o: any): boolean {\n  return o != null;\n}\n\nexport function toObservable(r: any): Observable<any> {\n  const obs = isPromise(r) ? from(r) : r;\n  if (!(isObservable(obs))) {\n    throw new Error(`Expected validator to return Promise or Observable.`);\n  }\n  return obs;\n}\n\nfunction _executeValidators(control: AbstractControl, validators: ValidatorFn[]): any[] {\n  return validators.map(v => v(control));\n}\n\nfunction _executeAsyncValidators(control: AbstractControl, validators: AsyncValidatorFn[]): any[] {\n  return validators.map(v => v(control));\n}\n\nfunction _mergeErrors(arrayOfErrors: ValidationErrors[]): ValidationErrors|null {\n  const res: {[key: string]: any} =\n      arrayOfErrors.reduce((res: ValidationErrors | null, errors: ValidationErrors | null) => {\n        return errors != null ? {...res !, ...errors} : res !;\n      }, {});\n  return Object.keys(res).length === 0 ? null : res;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AbstractControl} from '../model';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport function normalizeValidator(validator: ValidatorFn | Validator): ValidatorFn {\n  if ((<Validator>validator).validate) {\n    return (c: AbstractControl) => (<Validator>validator).validate(c);\n  } else {\n    return <ValidatorFn>validator;\n  }\n}\n\nexport function normalizeAsyncValidator(validator: AsyncValidatorFn | AsyncValidator):\n    AsyncValidatorFn {\n  if ((<AsyncValidator>validator).validate) {\n    return (c: AbstractControl) => (<AsyncValidator>validator).validate(c);\n  } else {\n    return <AsyncValidatorFn>validator;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const NUMBER_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => NumberValueAccessor),\n  multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and  `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n  host: {\n    '(change)': 'onChange($event.target.value)',\n    '(input)': 'onChange($event.target.value)',\n    '(blur)': 'onTouched()'\n  },\n  providers: [NUMBER_VALUE_ACCESSOR]\n})\nexport class NumberValueAccessor implements ControlValueAccessor {\n  /**\n   * @description\n   * The registered callback function called when a change or input event occurs on the input\n   * element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: number): void {\n    // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n    const normalizedValue = value == null ? '' : value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (_: number|null) => void): void {\n    this.onChange = (value) => { fn(value == '' ? null : parseFloat(value)); };\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Injectable, Injector, Input, OnDestroy, OnInit, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\n\nexport const RADIO_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => RadioControlValueAccessor),\n  multi: true\n};\n\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\n@Injectable()\nexport class RadioControlRegistry {\n  private _accessors: any[] = [];\n\n  /**\n   * @description\n   * Adds a control to the internal registry. For internal use only.\n   */\n  add(control: NgControl, accessor: RadioControlValueAccessor) {\n    this._accessors.push([control, accessor]);\n  }\n\n  /**\n   * @description\n   * Removes a control from the internal registry. For internal use only.\n   */\n  remove(accessor: RadioControlValueAccessor) {\n    for (let i = this._accessors.length - 1; i >= 0; --i) {\n      if (this._accessors[i][1] === accessor) {\n        this._accessors.splice(i, 1);\n        return;\n      }\n    }\n  }\n\n  /**\n   * @description\n   * Selects a radio button. For internal use only.\n   */\n  select(accessor: RadioControlValueAccessor) {\n    this._accessors.forEach((c) => {\n      if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n        c[1].fireUncheck(accessor.value);\n      }\n    });\n  }\n\n  private _isSameGroup(\n      controlPair: [NgControl, RadioControlValueAccessor],\n      accessor: RadioControlValueAccessor): boolean {\n    if (!controlPair[0].control) return false;\n    return controlPair[0]._parent === accessor._control._parent &&\n        controlPair[1].name === accessor.name;\n  }\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n  host: {'(change)': 'onChange()', '(blur)': 'onTouched()'},\n  providers: [RADIO_VALUE_ACCESSOR]\n})\nexport class RadioControlValueAccessor implements ControlValueAccessor,\n    OnDestroy, OnInit {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _state !: boolean;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _control !: NgControl;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _fn !: Function;\n\n  /**\n   * @description\n   * The registered callback function called when a change event occurs on the input element.\n   */\n  onChange = () => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the name of the radio input element.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() name !: string;\n\n  /**\n   * @description\n   * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() formControlName !: string;\n\n  /**\n   * @description\n   * Tracks the value of the radio input element\n   */\n  @Input() value: any;\n\n  constructor(\n      private _renderer: Renderer2, private _elementRef: ElementRef,\n      private _registry: RadioControlRegistry, private _injector: Injector) {}\n\n  /**\n   * @description\n   * A lifecycle method called when the directive is initialized. For internal use only.\n   */\n  ngOnInit(): void {\n    this._control = this._injector.get(NgControl);\n    this._checkName();\n    this._registry.add(this._control, this);\n  }\n\n  /**\n   * @description\n   * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n   */\n  ngOnDestroy(): void { this._registry.remove(this); }\n\n  /**\n   * @description\n   * Sets the \"checked\" property value on the radio input element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: any): void {\n    this._state = value === this.value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (_: any) => {}): void {\n    this._fn = fn;\n    this.onChange = () => {\n      fn(this.value);\n      this._registry.select(this);\n    };\n  }\n\n  /**\n   * Sets the \"value\" on the radio input element and unchecks it.\n   *\n   * @param value\n   */\n  fireUncheck(value: any): void { this.writeValue(value); }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => {}): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  private _checkName(): void {\n    if (this.name && this.formControlName && this.name !== this.formControlName) {\n      this._throwNameError();\n    }\n    if (!this.name && this.formControlName) this.name = this.formControlName;\n  }\n\n  private _throwNameError(): void {\n    throw new Error(`\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n    `);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, StaticProvider, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const RANGE_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => RangeValueAccessor),\n  multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and  `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n  host: {\n    '(change)': 'onChange($event.target.value)',\n    '(input)': 'onChange($event.target.value)',\n    '(blur)': 'onTouched()'\n  },\n  providers: [RANGE_VALUE_ACCESSOR]\n})\nexport class RangeValueAccessor implements ControlValueAccessor {\n  /**\n   * @description\n   * The registered callback function called when a change or input event occurs on the input\n   * element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: any): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (_: number|null) => void): void {\n    this.onChange = (value) => { fn(value == '' ? null : parseFloat(value)); };\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the range input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const FormErrorExamples = {\n  formControlName: `\n    <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });`,\n\n  formGroupName: `\n    <div [formGroup]=\"myGroup\">\n       <div formGroupName=\"person\">\n          <input formControlName=\"firstName\">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });`,\n\n  formArrayName: `\n    <div [formGroup]=\"myGroup\">\n      <div formArrayName=\"cities\">\n        <div *ngFor=\"let city of cityArray.controls; index as i\">\n          <input [formControlName]=\"i\">\n        </div>\n      </div>\n    </div>\n\n    In your class:\n\n    this.cityArray = new FormArray([new FormControl('SF')]);\n    this.myGroup = new FormGroup({\n      cities: this.cityArray\n    });`,\n\n  ngModelGroup: `\n    <form>\n       <div ngModelGroup=\"person\">\n          <input [(ngModel)]=\"person.name\" name=\"firstName\">\n       </div>\n    </form>`,\n\n  ngModelWithFormGroup: `\n    <div [formGroup]=\"myGroup\">\n       <input formControlName=\"firstName\">\n       <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n    </div>\n  `\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class ReactiveErrors {\n  static controlParentException(): void {\n    throw new Error(\n        `formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ${Examples.formControlName}`);\n  }\n\n  static ngModelGroupException(): void {\n    throw new Error(\n        `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n       that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n       Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n        ${Examples.formGroupName}\n\n        Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n        ${Examples.ngModelGroup}`);\n  }\n  static missingFormException(): void {\n    throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n       Example:\n\n       ${Examples.formControlName}`);\n  }\n\n  static groupParentException(): void {\n    throw new Error(\n        `formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ${Examples.formGroupName}`);\n  }\n\n  static arrayParentException(): void {\n    throw new Error(\n        `formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n        Example:\n\n        ${Examples.formArrayName}`);\n  }\n\n  static disabledAttrWarning(): void {\n    console.warn(`\n      It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n      you. We recommend using this approach to avoid 'changed after checked' errors.\n       \n      Example: \n      form = new FormGroup({\n        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n        last: new FormControl('Drew', Validators.required)\n      });\n    `);\n  }\n\n  static ngModelWarning(directiveName: string): void {\n    console.warn(`\n    It looks like you're using ngModel on the same form field as ${directiveName}. \n    Support for using the ngModel input property and ngModelChange event with \n    reactive form directives has been deprecated in Angular v6 and will be removed \n    in Angular v7.\n    \n    For more information on this, see our API docs here:\n    https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' \n      : 'FormControlName'}#use-with-ngmodel\n    `);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider, forwardRef, ÉµlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => SelectControlValueAccessor),\n  multi: true\n};\n\nfunction _buildValueString(id: string | null, value: any): string {\n  if (id == null) return `${value}`;\n  if (value && typeof value === 'object') value = 'Object';\n  return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n  return valueString.split(':')[0];\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\"  [formControl]=\"selectedCountriesControl\">\n *     <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *         {{country.name}}\n *     </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n *     return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in Firefox and IE:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350\n * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n  host: {'(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},\n  providers: [SELECT_VALUE_ACCESSOR]\n})\nexport class SelectControlValueAccessor implements ControlValueAccessor {\n  value: any;\n  /** @internal */\n  _optionMap: Map<string, any> = new Map<string, any>();\n  /** @internal */\n  _idCounter: number = 0;\n\n  /**\n   * @description\n   * The registered callback function called when a change event occurs on the input element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the option comparison algorithm for tracking identities when\n   * checking for changes.\n   */\n  @Input()\n  set compareWith(fn: (o1: any, o2: any) => boolean) {\n    if (typeof fn !== 'function') {\n      throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n    }\n    this._compareWith = fn;\n  }\n\n  private _compareWith: (o1: any, o2: any) => boolean = looseIdentical;\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element. The \"selectedIndex\"\n   * property is also set if an ID is provided on the option element.\n   *\n   * @param value The checked value\n   */\n  writeValue(value: any): void {\n    this.value = value;\n    const id: string|null = this._getOptionId(value);\n    if (id == null) {\n      this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);\n    }\n    const valueString = _buildValueString(id, value);\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (value: any) => any): void {\n    this.onChange = (valueString: string) => {\n      this.value = this._getOptionValue(valueString);\n      fn(this.value);\n    };\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the select input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _registerOption(): string { return (this._idCounter++).toString(); }\n\n  /** @internal */\n  _getOptionId(value: any): string|null {\n    for (const id of Array.from(this._optionMap.keys())) {\n      if (this._compareWith(this._optionMap.get(id), value)) return id;\n    }\n    return null;\n  }\n\n  /** @internal */\n  _getOptionValue(valueString: string): any {\n    const id: string = _extractId(valueString);\n    return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n  }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class NgSelectOption implements OnDestroy {\n  /**\n   * @description\n   * ID of the option element\n   */\n  // TODO(issue/24571): remove '!'.\n  id !: string;\n\n  constructor(\n      private _element: ElementRef, private _renderer: Renderer2,\n      @Optional() @Host() private _select: SelectControlValueAccessor) {\n    if (this._select) this.id = this._select._registerOption();\n  }\n\n  /**\n   * @description\n   * Tracks the value bound to the option element. Unlike the value binding,\n   * ngValue supports binding to objects.\n   */\n  @Input('ngValue')\n  set ngValue(value: any) {\n    if (this._select == null) return;\n    this._select._optionMap.set(this.id, value);\n    this._setElementValue(_buildValueString(this.id, value));\n    this._select.writeValue(this._select.value);\n  }\n\n  /**\n   * @description\n   * Tracks simple string values bound to the option element.\n   * For objects, use the `ngValue` input binding.\n   */\n  @Input('value')\n  set value(value: any) {\n    this._setElementValue(value);\n    if (this._select) this._select.writeValue(this._select.value);\n  }\n\n  /** @internal */\n  _setElementValue(value: string): void {\n    this._renderer.setProperty(this._element.nativeElement, 'value', value);\n  }\n\n  /**\n   * @description\n   * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n   */\n  ngOnDestroy(): void {\n    if (this._select) {\n      this._select._optionMap.delete(this.id);\n      this._select.writeValue(this._select.value);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider, forwardRef, ÉµlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_MULTIPLE_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n  multi: true\n};\n\nfunction _buildValueString(id: string, value: any): string {\n  if (id == null) return `${value}`;\n  if (typeof value === 'string') value = `'${value}'`;\n  if (value && typeof value === 'object') value = 'Object';\n  return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n  return valueString.split(':')[0];\n}\n\n/** Mock interface for HTML Options */\ninterface HTMLOption {\n  value: string;\n  selected: boolean;\n}\n\n/** Mock interface for HTMLCollection */\nabstract class HTMLCollection {\n  // TODO(issue/24571): remove '!'.\n  length !: number;\n  abstract item(_: number): HTMLOption;\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n * \n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n * \n * ### Using a multi-select control\n * \n * The follow example shows you how to use a multi-select control with a reactive form.\n * \n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n *   <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *     {{ country.name }}\n *   </option>\n * </select>\n * ```\n * \n * ### Customizing option selection\n *  \n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n  host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'},\n  providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n})\nexport class SelectMultipleControlValueAccessor implements ControlValueAccessor {\n  /**\n   * @description\n   * The current value\n   */\n  value: any;\n\n  /** @internal */\n  _optionMap: Map<string, ÉµNgSelectMultipleOption> = new Map<string, ÉµNgSelectMultipleOption>();\n  /** @internal */\n  _idCounter: number = 0;\n\n  /**\n   * @description\n   * The registered callback function called when a change event occurs on the input element.\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * @description\n   * The registered callback function called when a blur event occurs on the input element.\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the option comparison algorithm for tracking identities when\n   * checking for changes.\n   */\n  @Input()\n  set compareWith(fn: (o1: any, o2: any) => boolean) {\n    if (typeof fn !== 'function') {\n      throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n    }\n    this._compareWith = fn;\n  }\n\n  private _compareWith: (o1: any, o2: any) => boolean = looseIdentical;\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * @description\n   * Sets the \"value\" property on one or of more\n   * of the select's options.\n   *\n   * @param value The value\n   */\n  writeValue(value: any): void {\n    this.value = value;\n    let optionSelectedStateSetter: (opt: ÉµNgSelectMultipleOption, o: any) => void;\n    if (Array.isArray(value)) {\n      // convert values to ids\n      const ids = value.map((v) => this._getOptionId(v));\n      optionSelectedStateSetter = (opt, o) => { opt._setSelected(ids.indexOf(o.toString()) > -1); };\n    } else {\n      optionSelectedStateSetter = (opt, o) => { opt._setSelected(false); };\n    }\n    this._optionMap.forEach(optionSelectedStateSetter);\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control value changes\n   * and writes an array of the selected options.\n   *\n   * @param fn The callback function\n   */\n  registerOnChange(fn: (value: any) => any): void {\n    this.onChange = (_: any) => {\n      const selected: Array<any> = [];\n      if (_.hasOwnProperty('selectedOptions')) {\n        const options: HTMLCollection = _.selectedOptions;\n        for (let i = 0; i < options.length; i++) {\n          const opt: any = options.item(i);\n          const val: any = this._getOptionValue(opt.value);\n          selected.push(val);\n        }\n      }\n      // Degrade on IE\n      else {\n        const options: HTMLCollection = <HTMLCollection>_.options;\n        for (let i = 0; i < options.length; i++) {\n          const opt: HTMLOption = options.item(i);\n          if (opt.selected) {\n            const val: any = this._getOptionValue(opt.value);\n            selected.push(val);\n          }\n        }\n      }\n      this.value = selected;\n      fn(selected);\n    };\n  }\n\n  /**\n   * @description\n   * Registers a function called when the control is touched.\n   *\n   * @param fn The callback function\n   */\n  registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n  /**\n   * Sets the \"disabled\" property on the select input element.\n   *\n   * @param isDisabled The disabled value\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _registerOption(value: ÉµNgSelectMultipleOption): string {\n    const id: string = (this._idCounter++).toString();\n    this._optionMap.set(id, value);\n    return id;\n  }\n\n  /** @internal */\n  _getOptionId(value: any): string|null {\n    for (const id of Array.from(this._optionMap.keys())) {\n      if (this._compareWith(this._optionMap.get(id) !._value, value)) return id;\n    }\n    return null;\n  }\n\n  /** @internal */\n  _getOptionValue(valueString: string): any {\n    const id: string = _extractId(valueString);\n    return this._optionMap.has(id) ? this._optionMap.get(id) !._value : valueString;\n  }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class ÉµNgSelectMultipleOption implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  id !: string;\n  /** @internal */\n  _value: any;\n\n  constructor(\n      private _element: ElementRef, private _renderer: Renderer2,\n      @Optional() @Host() private _select: SelectMultipleControlValueAccessor) {\n    if (this._select) {\n      this.id = this._select._registerOption(this);\n    }\n  }\n\n  /**\n   * @description\n   * Tracks the value bound to the option element. Unlike the value binding,\n   * ngValue supports binding to objects.\n   */\n  @Input('ngValue')\n  set ngValue(value: any) {\n    if (this._select == null) return;\n    this._value = value;\n    this._setElementValue(_buildValueString(this.id, value));\n    this._select.writeValue(this._select.value);\n  }\n\n  /**\n   * @description\n   * Tracks simple string values bound to the option element.\n   * For objects, use the `ngValue` input binding.\n   */\n  @Input('value')\n  set value(value: any) {\n    if (this._select) {\n      this._value = value;\n      this._setElementValue(_buildValueString(this.id, value));\n      this._select.writeValue(this._select.value);\n    } else {\n      this._setElementValue(value);\n    }\n  }\n\n  /** @internal */\n  _setElementValue(value: string): void {\n    this._renderer.setProperty(this._element.nativeElement, 'value', value);\n  }\n\n  /** @internal */\n  _setSelected(selected: boolean) {\n    this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n  }\n\n  /**\n   * @description\n   * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n   */\n  ngOnDestroy(): void {\n    if (this._select) {\n      this._select._optionMap.delete(this.id);\n      this._select.writeValue(this._select.value);\n    }\n  }\n}\n\nexport {ÉµNgSelectMultipleOption as NgSelectMultipleOption};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode, ÉµlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {FormArray, FormControl, FormGroup} from '../model';\nimport {Validators} from '../validators';\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {CheckboxControlValueAccessor} from './checkbox_value_accessor';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {DefaultValueAccessor} from './default_value_accessor';\nimport {NgControl} from './ng_control';\nimport {normalizeAsyncValidator, normalizeValidator} from './normalize_validator';\nimport {NumberValueAccessor} from './number_value_accessor';\nimport {RadioControlValueAccessor} from './radio_control_value_accessor';\nimport {RangeValueAccessor} from './range_value_accessor';\nimport {FormArrayName} from './reactive_directives/form_group_name';\nimport {ReactiveErrors} from './reactive_errors';\nimport {SelectControlValueAccessor} from './select_control_value_accessor';\nimport {SelectMultipleControlValueAccessor} from './select_multiple_control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\n\nexport function controlPath(name: string, parent: ControlContainer): string[] {\n  return [...parent.path !, name];\n}\n\nexport function setUpControl(control: FormControl, dir: NgControl): void {\n  if (!control) _throwError(dir, 'Cannot find control with');\n  if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');\n\n  control.validator = Validators.compose([control.validator !, dir.validator]);\n  control.asyncValidator = Validators.composeAsync([control.asyncValidator !, dir.asyncValidator]);\n  dir.valueAccessor !.writeValue(control.value);\n\n  setUpViewChangePipeline(control, dir);\n  setUpModelChangePipeline(control, dir);\n\n  setUpBlurPipeline(control, dir);\n\n  if (dir.valueAccessor !.setDisabledState) {\n    control.registerOnDisabledChange(\n        (isDisabled: boolean) => { dir.valueAccessor !.setDisabledState !(isDisabled); });\n  }\n\n  // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n  dir._rawValidators.forEach((validator: Validator | ValidatorFn) => {\n    if ((<Validator>validator).registerOnValidatorChange)\n      (<Validator>validator).registerOnValidatorChange !(() => control.updateValueAndValidity());\n  });\n\n  dir._rawAsyncValidators.forEach((validator: AsyncValidator | AsyncValidatorFn) => {\n    if ((<Validator>validator).registerOnValidatorChange)\n      (<Validator>validator).registerOnValidatorChange !(() => control.updateValueAndValidity());\n  });\n}\n\nexport function cleanUpControl(control: FormControl, dir: NgControl) {\n  dir.valueAccessor !.registerOnChange(() => _noControlError(dir));\n  dir.valueAccessor !.registerOnTouched(() => _noControlError(dir));\n\n  dir._rawValidators.forEach((validator: any) => {\n    if (validator.registerOnValidatorChange) {\n      validator.registerOnValidatorChange(null);\n    }\n  });\n\n  dir._rawAsyncValidators.forEach((validator: any) => {\n    if (validator.registerOnValidatorChange) {\n      validator.registerOnValidatorChange(null);\n    }\n  });\n\n  if (control) control._clearChangeFns();\n}\n\nfunction setUpViewChangePipeline(control: FormControl, dir: NgControl): void {\n  dir.valueAccessor !.registerOnChange((newValue: any) => {\n    control._pendingValue = newValue;\n    control._pendingChange = true;\n    control._pendingDirty = true;\n\n    if (control.updateOn === 'change') updateControl(control, dir);\n  });\n}\n\nfunction setUpBlurPipeline(control: FormControl, dir: NgControl): void {\n  dir.valueAccessor !.registerOnTouched(() => {\n    control._pendingTouched = true;\n\n    if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);\n    if (control.updateOn !== 'submit') control.markAsTouched();\n  });\n}\n\nfunction updateControl(control: FormControl, dir: NgControl): void {\n  if (control._pendingDirty) control.markAsDirty();\n  control.setValue(control._pendingValue, {emitModelToViewChange: false});\n  dir.viewToModelUpdate(control._pendingValue);\n  control._pendingChange = false;\n}\n\nfunction setUpModelChangePipeline(control: FormControl, dir: NgControl): void {\n  control.registerOnChange((newValue: any, emitModelEvent: boolean) => {\n    // control -> view\n    dir.valueAccessor !.writeValue(newValue);\n\n    // control -> ngModel\n    if (emitModelEvent) dir.viewToModelUpdate(newValue);\n  });\n}\n\nexport function setUpFormContainer(\n    control: FormGroup | FormArray, dir: AbstractFormGroupDirective | FormArrayName) {\n  if (control == null) _throwError(dir, 'Cannot find control with');\n  control.validator = Validators.compose([control.validator, dir.validator]);\n  control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);\n}\n\nfunction _noControlError(dir: NgControl) {\n  return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\n\nfunction _throwError(dir: AbstractControlDirective, message: string): void {\n  let messageEnd: string;\n  if (dir.path !.length > 1) {\n    messageEnd = `path: '${dir.path!.join(' -> ')}'`;\n  } else if (dir.path ![0]) {\n    messageEnd = `name: '${dir.path}'`;\n  } else {\n    messageEnd = 'unspecified name attribute';\n  }\n  throw new Error(`${message} ${messageEnd}`);\n}\n\nexport function composeValidators(validators: Array<Validator|ValidatorFn>): ValidatorFn|null {\n  return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;\n}\n\nexport function composeAsyncValidators(validators: Array<AsyncValidator|AsyncValidatorFn>):\n    AsyncValidatorFn|null {\n  return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :\n                              null;\n}\n\nexport function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {\n  if (!changes.hasOwnProperty('model')) return false;\n  const change = changes['model'];\n\n  if (change.isFirstChange()) return true;\n  return !looseIdentical(viewModel, change.currentValue);\n}\n\nconst BUILTIN_ACCESSORS = [\n  CheckboxControlValueAccessor,\n  RangeValueAccessor,\n  NumberValueAccessor,\n  SelectControlValueAccessor,\n  SelectMultipleControlValueAccessor,\n  RadioControlValueAccessor,\n];\n\nexport function isBuiltInAccessor(valueAccessor: ControlValueAccessor): boolean {\n  return BUILTIN_ACCESSORS.some(a => valueAccessor.constructor === a);\n}\n\nexport function syncPendingControls(form: FormGroup, directives: NgControl[]): void {\n  form._syncPendingControls();\n  directives.forEach(dir => {\n    const control = dir.control as FormControl;\n    if (control.updateOn === 'submit' && control._pendingChange) {\n      dir.viewToModelUpdate(control._pendingValue);\n      control._pendingChange = false;\n    }\n  });\n}\n\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nexport function selectValueAccessor(\n    dir: NgControl, valueAccessors: ControlValueAccessor[]): ControlValueAccessor|null {\n  if (!valueAccessors) return null;\n\n  if (!Array.isArray(valueAccessors))\n    _throwError(dir, 'Value accessor was not provided as an array for form control with');\n\n  let defaultAccessor: ControlValueAccessor|undefined = undefined;\n  let builtinAccessor: ControlValueAccessor|undefined = undefined;\n  let customAccessor: ControlValueAccessor|undefined = undefined;\n\n  valueAccessors.forEach((v: ControlValueAccessor) => {\n    if (v.constructor === DefaultValueAccessor) {\n      defaultAccessor = v;\n\n    } else if (isBuiltInAccessor(v)) {\n      if (builtinAccessor)\n        _throwError(dir, 'More than one built-in value accessor matches form control with');\n      builtinAccessor = v;\n\n    } else {\n      if (customAccessor)\n        _throwError(dir, 'More than one custom value accessor matches form control with');\n      customAccessor = v;\n    }\n  });\n\n  if (customAccessor) return customAccessor;\n  if (builtinAccessor) return builtinAccessor;\n  if (defaultAccessor) return defaultAccessor;\n\n  _throwError(dir, 'No valid value accessor for form control with');\n  return null;\n}\n\nexport function removeDir<T>(list: T[], el: T): void {\n  const index = list.indexOf(el);\n  if (index > -1) list.splice(index, 1);\n}\n\n// TODO(kara): remove after deprecation period\nexport function _ngModelWarning(\n    name: string, type: {_ngModelWarningSentOnce: boolean},\n    instance: {_ngModelWarningSent: boolean}, warningConfig: string | null) {\n  if (!isDevMode() || warningConfig === 'never') return;\n\n  if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n      (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n    ReactiveErrors.ngModelWarning(name);\n    type._ngModelWarningSentOnce = true;\n    instance._ngModelWarningSent = true;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {composeAsyncValidators, composeValidators} from './directives/shared';\nimport {AsyncValidatorFn, ValidationErrors, ValidatorFn} from './directives/validators';\nimport {toObservable} from './validators';\n\n/**\n * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nexport const VALID = 'VALID';\n\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nexport const INVALID = 'INVALID';\n\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nexport const PENDING = 'PENDING';\n\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nexport const DISABLED = 'DISABLED';\n\nfunction _find(control: AbstractControl, path: Array<string|number>| string, delimiter: string) {\n  if (path == null) return null;\n\n  if (!(path instanceof Array)) {\n    path = (<string>path).split(delimiter);\n  }\n  if (path instanceof Array && (path.length === 0)) return null;\n\n  return (<Array<string|number>>path).reduce((v: AbstractControl | null, name) => {\n    if (v instanceof FormGroup) {\n      return v.controls.hasOwnProperty(name as string) ? v.controls[name] : null;\n    }\n\n    if (v instanceof FormArray) {\n      return v.at(<number>name) || null;\n    }\n\n    return null;\n  }, control);\n}\n\nfunction coerceToValidator(\n    validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null): ValidatorFn|\n    null {\n  const validator =\n      (isOptionsObj(validatorOrOpts) ? (validatorOrOpts as AbstractControlOptions).validators :\n                                       validatorOrOpts) as ValidatorFn |\n      ValidatorFn[] | null;\n\n  return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n\nfunction coerceToAsyncValidator(\n    asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null, validatorOrOpts?: ValidatorFn |\n        ValidatorFn[] | AbstractControlOptions | null): AsyncValidatorFn|null {\n  const origAsyncValidator =\n      (isOptionsObj(validatorOrOpts) ? (validatorOrOpts as AbstractControlOptions).asyncValidators :\n                                       asyncValidator) as AsyncValidatorFn |\n      AsyncValidatorFn | null;\n\n  return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) :\n                                             origAsyncValidator || null;\n}\n\nexport type FormHooks = 'change' | 'blur' | 'submit';\n\n/**\n * Interface for options provided to an `AbstractControl`.\n *\n * @publicApi\n */\nexport interface AbstractControlOptions {\n  /**\n   * @description\n   * The list of validators applied to a control.\n   */\n  validators?: ValidatorFn|ValidatorFn[]|null;\n  /**\n   * @description\n   * The list of async validators applied to control.\n   */\n  asyncValidators?: AsyncValidatorFn|AsyncValidatorFn[]|null;\n  /**\n   * @description\n   * The event name for control to update upon.\n   */\n  updateOn?: 'change'|'blur'|'submit';\n}\n\n\nfunction isOptionsObj(\n    validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null): boolean {\n  return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n      typeof validatorOrOpts === 'object';\n}\n\n\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nexport abstract class AbstractControl {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _pendingDirty !: boolean;\n\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _pendingTouched !: boolean;\n\n  /** @internal */\n  _onCollectionChange = () => {};\n\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _updateOn !: FormHooks;\n\n  // TODO(issue/24571): remove '!'.\n  private _parent !: FormGroup | FormArray;\n  private _asyncValidationSubscription: any;\n\n  /**\n   * The current value of the control.\n   *\n   * * For a `FormControl`, the current value.\n   * * For an enabled `FormGroup`, the values of enabled controls as an object\n   * with a key-value pair for each member of the group.\n   * * For a disabled `FormGroup`, the values of all controls as an object\n   * with a key-value pair for each member of the group.\n   * * For a `FormArray`, the values of enabled controls as an array.\n   *\n   */\n  public readonly value: any;\n\n  /**\n   * Initialize the AbstractControl instance.\n   *\n   * @param validator The function that determines the synchronous validity of this control.\n   * @param asyncValidator The function that determines the asynchronous validity of this\n   * control.\n   */\n  constructor(public validator: ValidatorFn|null, public asyncValidator: AsyncValidatorFn|null) {}\n\n  /**\n   * The parent control.\n   */\n  get parent(): FormGroup|FormArray { return this._parent; }\n\n  /**\n   * The validation status of the control. There are four possible\n   * validation status values:\n   *\n   * * **VALID**: This control has passed all validation checks.\n   * * **INVALID**: This control has failed at least one validation check.\n   * * **PENDING**: This control is in the midst of conducting a validation check.\n   * * **DISABLED**: This control is exempt from validation checks.\n   *\n   * These status values are mutually exclusive, so a control cannot be\n   * both valid AND invalid or invalid AND disabled.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly status !: string;\n\n  /**\n   * A control is `valid` when its `status` is `VALID`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if the control has passed all of its validation tests,\n   * false otherwise.\n   */\n  get valid(): boolean { return this.status === VALID; }\n\n  /**\n   * A control is `invalid` when its `status` is `INVALID`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if this control has failed one or more of its validation checks,\n   * false otherwise.\n   */\n  get invalid(): boolean { return this.status === INVALID; }\n\n  /**\n   * A control is `pending` when its `status` is `PENDING`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if this control is in the process of conducting a validation check,\n   * false otherwise.\n   */\n  get pending(): boolean { return this.status == PENDING; }\n\n  /**\n   * A control is `disabled` when its `status` is `DISABLED`.\n   *\n   * Disabled controls are exempt from validation checks and\n   * are not included in the aggregate value of their ancestor\n   * controls.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if the control is disabled, false otherwise.\n   */\n  get disabled(): boolean { return this.status === DISABLED; }\n\n  /**\n   * A control is `enabled` as long as its `status` is not `DISABLED`.\n   *\n   * @returns True if the control has any status other than 'DISABLED',\n   * false if the status is 'DISABLED'.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   */\n  get enabled(): boolean { return this.status !== DISABLED; }\n\n  /**\n   * An object containing any errors generated by failing validation,\n   * or null if there are no errors.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly errors !: ValidationErrors | null;\n\n  /**\n   * A control is `pristine` if the user has not yet changed\n   * the value in the UI.\n   *\n   * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n   * Programmatic changes to a control's value do not mark it dirty.\n   */\n  public readonly pristine: boolean = true;\n\n  /**\n   * A control is `dirty` if the user has changed the value\n   * in the UI.\n   *\n   * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n   * Programmatic changes to a control's value do not mark it dirty.\n   */\n  get dirty(): boolean { return !this.pristine; }\n\n  /**\n   * True if the control is marked as `touched`.\n   *\n   * A control is marked `touched` once the user has triggered\n   * a `blur` event on it.\n   */\n  public readonly touched: boolean = false;\n\n  /**\n   * True if the control has not been marked as touched\n   *\n   * A control is `untouched` if the user has not yet triggered\n   * a `blur` event on it.\n   */\n  get untouched(): boolean { return !this.touched; }\n\n  /**\n   * A multicasting observable that emits an event every time the value of the control changes, in\n   * the UI or programmatically.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly valueChanges !: Observable<any>;\n\n  /**\n   * A multicasting observable that emits an event every time the validation `status` of the control\n   * recalculates.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly statusChanges !: Observable<any>;\n\n  /**\n   * Reports the update strategy of the `AbstractControl` (meaning\n   * the event on which the control updates itself).\n   * Possible values: `'change'` | `'blur'` | `'submit'`\n   * Default value: `'change'`\n   */\n  get updateOn(): FormHooks {\n    return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n  }\n\n  /**\n   * Sets the synchronous validators that are active on this control.  Calling\n   * this overwrites any existing sync validators.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  setValidators(newValidator: ValidatorFn|ValidatorFn[]|null): void {\n    this.validator = coerceToValidator(newValidator);\n  }\n\n  /**\n   * Sets the async validators that are active on this control. Calling this\n   * overwrites any existing async validators.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]|null): void {\n    this.asyncValidator = coerceToAsyncValidator(newValidator);\n  }\n\n  /**\n   * Empties out the sync validator list.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  clearValidators(): void { this.validator = null; }\n\n  /**\n   * Empties out the async validator list.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  clearAsyncValidators(): void { this.asyncValidator = null; }\n\n  /**\n   * Marks the control as `touched`. A control is touched by focus and\n   * blur events that do not change the value.\n   *\n   * @see `markAsUntouched()`\n   * @see `markAsDirty()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsTouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as{touched: boolean}).touched = true;\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsTouched(opts);\n    }\n  }\n\n  /**\n   * Marks the control and all its descendant controls as `touched`.\n   * @see `markAsTouched()`\n   */\n  markAllAsTouched(): void {\n    this.markAsTouched({onlySelf: true});\n\n    this._forEachChild((control: AbstractControl) => control.markAllAsTouched());\n  }\n\n  /**\n   * Marks the control as `untouched`.\n   *\n   * If the control has any children, also marks all children as `untouched`\n   * and recalculates the `touched` status of all parent controls.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsDirty()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events after the marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsUntouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as{touched: boolean}).touched = false;\n    this._pendingTouched = false;\n\n    this._forEachChild(\n        (control: AbstractControl) => { control.markAsUntouched({onlySelf: true}); });\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updateTouched(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `dirty`. A control becomes dirty when\n   * the control's value is changed through the UI; compare `markAsTouched`.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsUntouched()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsDirty(opts: {onlySelf?: boolean} = {}): void {\n    (this as{pristine: boolean}).pristine = false;\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsDirty(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `pristine`.\n   *\n   * If the control has any children, marks all children as `pristine`,\n   * and recalculates the `pristine` status of all parent\n   * controls.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsUntouched()`\n   * @see `markAsDirty()`\n   *\n   * @param opts Configuration options that determine how the control emits events after\n   * marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false..\n   */\n  markAsPristine(opts: {onlySelf?: boolean} = {}): void {\n    (this as{pristine: boolean}).pristine = true;\n    this._pendingDirty = false;\n\n    this._forEachChild((control: AbstractControl) => { control.markAsPristine({onlySelf: true}); });\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updatePristine(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `pending`.\n   *\n   * A control is pending while the control performs async validation.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configuration options that determine how the control propagates changes and\n   * emits events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false..\n   * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n   * observable emits an event with the latest status the control is marked pending.\n   * When false, no events are emitted.\n   *\n   */\n  markAsPending(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    (this as{status: string}).status = PENDING;\n\n    if (opts.emitEvent !== false) {\n      (this.statusChanges as EventEmitter<any>).emit(this.status);\n    }\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsPending(opts);\n    }\n  }\n\n  /**\n   * Disables the control. This means the control is exempt from validation checks and\n   * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n   *\n   * If the control has children, all children are also disabled.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configuration options that determine how the control propagates\n   * changes and emits events after the control is disabled.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false..\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is disabled.\n   * When false, no events are emitted.\n   */\n  disable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    // If parent has been marked artificially dirty we don't want to re-calculate the\n    // parent's dirtiness based on the children.\n    const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n    (this as{status: string}).status = DISABLED;\n    (this as{errors: ValidationErrors | null}).errors = null;\n    this._forEachChild(\n        (control: AbstractControl) => { control.disable({...opts, onlySelf: true}); });\n    this._updateValue();\n\n    if (opts.emitEvent !== false) {\n      (this.valueChanges as EventEmitter<any>).emit(this.value);\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    this._updateAncestors({...opts, skipPristineCheck});\n    this._onDisabledChange.forEach((changeFn) => changeFn(true));\n  }\n\n  /**\n   * Enables the control. This means the control is included in validation checks and\n   * the aggregate value of its parent. Its status recalculates based on its value and\n   * its validators.\n   *\n   * By default, if the control has children, all children are enabled.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configure options that control how the control propagates changes and\n   * emits events when marked as untouched\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false..\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is enabled.\n   * When false, no events are emitted.\n   */\n  enable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    // If parent has been marked artificially dirty we don't want to re-calculate the\n    // parent's dirtiness based on the children.\n    const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n    (this as{status: string}).status = VALID;\n    this._forEachChild(\n        (control: AbstractControl) => { control.enable({...opts, onlySelf: true}); });\n    this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n\n    this._updateAncestors({...opts, skipPristineCheck});\n    this._onDisabledChange.forEach((changeFn) => changeFn(false));\n  }\n\n  private _updateAncestors(\n      opts: {onlySelf?: boolean, emitEvent?: boolean, skipPristineCheck?: boolean}) {\n    if (this._parent && !opts.onlySelf) {\n      this._parent.updateValueAndValidity(opts);\n      if (!opts.skipPristineCheck) {\n        this._parent._updatePristine();\n      }\n      this._parent._updateTouched();\n    }\n  }\n\n  /**\n   * @param parent Sets the parent of the control\n   */\n  setParent(parent: FormGroup|FormArray): void { this._parent = parent; }\n\n  /**\n   * Sets the value of the control. Abstract method (implemented in sub-classes).\n   */\n  abstract setValue(value: any, options?: Object): void;\n\n  /**\n   * Patches the value of the control. Abstract method (implemented in sub-classes).\n   */\n  abstract patchValue(value: any, options?: Object): void;\n\n  /**\n   * Resets the control. Abstract method (implemented in sub-classes).\n   */\n  abstract reset(value?: any, options?: Object): void;\n\n  /**\n   * Recalculates the value and validation status of the control.\n   *\n   * By default, it also updates the value and validity of its ancestors.\n   *\n   * @param opts Configuration options determine how the control propagates changes and emits events\n   * after updates and validity checks are applied.\n   * * `onlySelf`: When true, only update this control. When false or not supplied,\n   * update all direct ancestors. Default is false..\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is updated.\n   * When false, no events are emitted.\n   */\n  updateValueAndValidity(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._setInitialStatus();\n    this._updateValue();\n\n    if (this.enabled) {\n      this._cancelExistingSubscription();\n      (this as{errors: ValidationErrors | null}).errors = this._runValidator();\n      (this as{status: string}).status = this._calculateStatus();\n\n      if (this.status === VALID || this.status === PENDING) {\n        this._runAsyncValidator(opts.emitEvent);\n      }\n    }\n\n    if (opts.emitEvent !== false) {\n      (this.valueChanges as EventEmitter<any>).emit(this.value);\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.updateValueAndValidity(opts);\n    }\n  }\n\n  /** @internal */\n  _updateTreeValidity(opts: {emitEvent?: boolean} = {emitEvent: true}) {\n    this._forEachChild((ctrl: AbstractControl) => ctrl._updateTreeValidity(opts));\n    this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n  }\n\n  private _setInitialStatus() {\n    (this as{status: string}).status = this._allControlsDisabled() ? DISABLED : VALID;\n  }\n\n  private _runValidator(): ValidationErrors|null {\n    return this.validator ? this.validator(this) : null;\n  }\n\n  private _runAsyncValidator(emitEvent?: boolean): void {\n    if (this.asyncValidator) {\n      (this as{status: string}).status = PENDING;\n      const obs = toObservable(this.asyncValidator(this));\n      this._asyncValidationSubscription =\n          obs.subscribe((errors: ValidationErrors | null) => this.setErrors(errors, {emitEvent}));\n    }\n  }\n\n  private _cancelExistingSubscription(): void {\n    if (this._asyncValidationSubscription) {\n      this._asyncValidationSubscription.unsubscribe();\n    }\n  }\n\n  /**\n   * Sets errors on a form control when running validations manually, rather than automatically.\n   *\n   * Calling `setErrors` also updates the validity of the parent control.\n   *\n   * @usageNotes\n   * ### Manually set the errors for a control\n   *\n   * ```\n   * const login = new FormControl('someLogin');\n   * login.setErrors({\n   *   notUnique: true\n   * });\n   *\n   * expect(login.valid).toEqual(false);\n   * expect(login.errors).toEqual({ notUnique: true });\n   *\n   * login.setValue('someOtherLogin');\n   *\n   * expect(login.valid).toEqual(true);\n   * ```\n   */\n  setErrors(errors: ValidationErrors|null, opts: {emitEvent?: boolean} = {}): void {\n    (this as{errors: ValidationErrors | null}).errors = errors;\n    this._updateControlsErrors(opts.emitEvent !== false);\n  }\n\n  /**\n   * Retrieves a child control given the control's name or path.\n   *\n   * @param path A dot-delimited string or array of string/number values that define the path to the\n   * control.\n   *\n   * @usageNotes\n   * ### Retrieve a nested control\n   *\n   * For example, to get a `name` control nested within a `person` sub-group:\n   *\n   * * `this.form.get('person.name');`\n   *\n   * -OR-\n   *\n   * * `this.form.get(['person', 'name']);`\n   */\n  get(path: Array<string|number>|string): AbstractControl|null { return _find(this, path, '.'); }\n\n  /**\n   * @description\n   * Reports error data for the control with the given path.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * @returns error data for that particular error. If the control or error is not present,\n   * null is returned.\n   */\n  getError(errorCode: string, path?: Array<string|number>|string): any {\n    const control = path ? this.get(path) : this;\n    return control && control.errors ? control.errors[errorCode] : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control with the given path has the error specified.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * If no path is given, this method checks for the error on the current control.\n   *\n   * @returns whether the given error is present in the control at the given path.\n   *\n   * If the control is not present, false is returned.\n   */\n  hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n    return !!this.getError(errorCode, path);\n  }\n\n  /**\n   * Retrieves the top-level ancestor of this control.\n   */\n  get root(): AbstractControl {\n    let x: AbstractControl = this;\n\n    while (x._parent) {\n      x = x._parent;\n    }\n\n    return x;\n  }\n\n  /** @internal */\n  _updateControlsErrors(emitEvent: boolean): void {\n    (this as{status: string}).status = this._calculateStatus();\n\n    if (emitEvent) {\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    if (this._parent) {\n      this._parent._updateControlsErrors(emitEvent);\n    }\n  }\n\n  /** @internal */\n  _initObservables() {\n    (this as{valueChanges: Observable<any>}).valueChanges = new EventEmitter();\n    (this as{statusChanges: Observable<any>}).statusChanges = new EventEmitter();\n  }\n\n\n  private _calculateStatus(): string {\n    if (this._allControlsDisabled()) return DISABLED;\n    if (this.errors) return INVALID;\n    if (this._anyControlsHaveStatus(PENDING)) return PENDING;\n    if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n    return VALID;\n  }\n\n  /** @internal */\n  abstract _updateValue(): void;\n\n  /** @internal */\n  abstract _forEachChild(cb: Function): void;\n\n  /** @internal */\n  abstract _anyControls(condition: Function): boolean;\n\n  /** @internal */\n  abstract _allControlsDisabled(): boolean;\n\n  /** @internal */\n  abstract _syncPendingControls(): boolean;\n\n  /** @internal */\n  _anyControlsHaveStatus(status: string): boolean {\n    return this._anyControls((control: AbstractControl) => control.status === status);\n  }\n\n  /** @internal */\n  _anyControlsDirty(): boolean {\n    return this._anyControls((control: AbstractControl) => control.dirty);\n  }\n\n  /** @internal */\n  _anyControlsTouched(): boolean {\n    return this._anyControls((control: AbstractControl) => control.touched);\n  }\n\n  /** @internal */\n  _updatePristine(opts: {onlySelf?: boolean} = {}): void {\n    (this as{pristine: boolean}).pristine = !this._anyControlsDirty();\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updatePristine(opts);\n    }\n  }\n\n  /** @internal */\n  _updateTouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as{touched: boolean}).touched = this._anyControlsTouched();\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updateTouched(opts);\n    }\n  }\n\n  /** @internal */\n  _onDisabledChange: Function[] = [];\n\n  /** @internal */\n  _isBoxedValue(formState: any): boolean {\n    return typeof formState === 'object' && formState !== null &&\n        Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n  }\n\n  /** @internal */\n  _registerOnCollectionChange(fn: () => void): void { this._onCollectionChange = fn; }\n\n  /** @internal */\n  _setUpdateStrategy(opts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null): void {\n    if (isOptionsObj(opts) && (opts as AbstractControlOptions).updateOn != null) {\n      this._updateOn = (opts as AbstractControlOptions).updateOn !;\n    }\n  }\n\n  /**\n   * Check to see if parent has been marked artificially dirty.\n   *\n   * @internal\n   */\n  private _parentMarkedDirty(onlySelf?: boolean): boolean {\n    const parentDirty = this._parent && this._parent.dirty;\n    return !onlySelf && parentDirty && !this._parent._anyControlsDirty();\n  }\n}\n\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events.\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value);     // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value);     // 'n/a'\n * console.log(control.status);    // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a sync validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value);      // ''\n * console.log(control.status);     // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n *    validators: Validators.required,\n *    asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * @publicApi\n */\nexport class FormControl extends AbstractControl {\n  /** @internal */\n  _onChange: Function[] = [];\n\n  /** @internal */\n  _pendingValue: any;\n\n  /** @internal */\n  _pendingChange: any;\n\n  /**\n  * Creates a new `FormControl` instance.\n  *\n  * @param formState Initializes the control with an initial value,\n  * or an object that defines the initial value and disabled state.\n  *\n  * @param validatorOrOpts A synchronous validator function, or an array of\n  * such functions, or an `AbstractControlOptions` object that contains validation functions\n  * and a validation trigger.\n  *\n  * @param asyncValidator A single async validator or array of async validator functions\n  *\n  */\n  constructor(\n      formState: any = null,\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(\n        coerceToValidator(validatorOrOpts),\n        coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n    this._applyFormState(formState);\n    this._setUpdateStrategy(validatorOrOpts);\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n    this._initObservables();\n  }\n\n  /**\n   * Sets a new value for the form control.\n   *\n   * @param value The new value for the control.\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events when the value changes.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * * `emitModelToViewChange`: When true or not supplied  (the default), each change triggers an\n   * `onChange` event to\n   * update the view.\n   * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n   * `ngModelChange`\n   * event to update the model.\n   *\n   */\n  setValue(value: any, options: {\n    onlySelf?: boolean,\n    emitEvent?: boolean,\n    emitModelToViewChange?: boolean,\n    emitViewToModelChange?: boolean\n  } = {}): void {\n    (this as{value: any}).value = this._pendingValue = value;\n    if (this._onChange.length && options.emitModelToViewChange !== false) {\n      this._onChange.forEach(\n          (changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n    }\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of a control.\n   *\n   * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n   * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n   * `FormArrays`, where it does behave differently.\n   *\n   * @see `setValue` for options\n   */\n  patchValue(value: any, options: {\n    onlySelf?: boolean,\n    emitEvent?: boolean,\n    emitModelToViewChange?: boolean,\n    emitViewToModelChange?: boolean\n  } = {}): void {\n    this.setValue(value, options);\n  }\n\n  /**\n   * Resets the form control, marking it `pristine` and `untouched`, and setting\n   * the value to null.\n   *\n   * @param formState Resets the control with an initial value,\n   * or an object that defines the initial value and disabled state.\n   *\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events after the value changes.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   *\n   */\n  reset(formState: any = null, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._applyFormState(formState);\n    this.markAsPristine(options);\n    this.markAsUntouched(options);\n    this.setValue(this.value, options);\n    this._pendingChange = false;\n  }\n\n  /**\n   * @internal\n   */\n  _updateValue() {}\n\n  /**\n   * @internal\n   */\n  _anyControls(condition: Function): boolean { return false; }\n\n  /**\n   * @internal\n   */\n  _allControlsDisabled(): boolean { return this.disabled; }\n\n  /**\n   * Register a listener for change events.\n   *\n   * @param fn The method that is called when the value changes\n   */\n  registerOnChange(fn: Function): void { this._onChange.push(fn); }\n\n  /**\n   * @internal\n   */\n  _clearChangeFns(): void {\n    this._onChange = [];\n    this._onDisabledChange = [];\n    this._onCollectionChange = () => {};\n  }\n\n  /**\n   * Register a listener for disabled events.\n   *\n   * @param fn The method that is called when the disabled status changes.\n   */\n  registerOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n    this._onDisabledChange.push(fn);\n  }\n\n  /**\n   * @internal\n   */\n  _forEachChild(cb: Function): void {}\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    if (this.updateOn === 'submit') {\n      if (this._pendingDirty) this.markAsDirty();\n      if (this._pendingTouched) this.markAsTouched();\n      if (this._pendingChange) {\n        this.setValue(this._pendingValue, {onlySelf: true, emitModelToViewChange: false});\n        return true;\n      }\n    }\n    return false;\n  }\n\n  private _applyFormState(formState: any) {\n    if (this._isBoxedValue(formState)) {\n      (this as{value: any}).value = this._pendingValue = formState.value;\n      formState.disabled ? this.disable({onlySelf: true, emitEvent: false}) :\n                           this.enable({onlySelf: true, emitEvent: false});\n    } else {\n      (this as{value: any}).value = this._pendingValue = formState;\n    }\n  }\n}\n\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key.  It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n *   first: new FormControl('Nancy', Validators.minLength(2)),\n *   last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value);   // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status);  // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('', Validators.minLength(2)),\n *   passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n *    return g.get('password').value === g.get('passwordConfirm').value\n *       ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('')\n *   passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n *   one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * @publicApi\n */\nexport class FormGroup extends AbstractControl {\n  /**\n  * Creates a new `FormGroup` instance.\n  *\n  * @param controls A collection of child controls. The key for each child is the name\n  * under which it is registered.\n  *\n  * @param validatorOrOpts A synchronous validator function, or an array of\n  * such functions, or an `AbstractControlOptions` object that contains validation functions\n  * and a validation trigger.\n  *\n  * @param asyncValidator A single async validator or array of async validator functions\n  *\n  */\n  constructor(\n      public controls: {[key: string]: AbstractControl},\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(\n        coerceToValidator(validatorOrOpts),\n        coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n    this._initObservables();\n    this._setUpdateStrategy(validatorOrOpts);\n    this._setUpControls();\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n  }\n\n  /**\n   * Registers a control with the group's list of controls.\n   *\n   * This method does not update the value or validity of the control.\n   * Use {@link FormGroup#addControl addControl} instead.\n   *\n   * @param name The control name to register in the collection\n   * @param control Provides the control for the given name\n   */\n  registerControl(name: string, control: AbstractControl): AbstractControl {\n    if (this.controls[name]) return this.controls[name];\n    this.controls[name] = control;\n    control.setParent(this);\n    control._registerOnCollectionChange(this._onCollectionChange);\n    return control;\n  }\n\n  /**\n   * Add a control to this group.\n   *\n   * This method also updates the value and validity of the control.\n   *\n   * @param name The control name to add to the collection\n   * @param control Provides the control for the given name\n   */\n  addControl(name: string, control: AbstractControl): void {\n    this.registerControl(name, control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Remove a control from this group.\n   *\n   * @param name The control name to remove from the collection\n   */\n  removeControl(name: string): void {\n    if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n    delete (this.controls[name]);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Replace an existing control.\n   *\n   * @param name The control name to replace in the collection\n   * @param control Provides the control for the given name\n   */\n  setControl(name: string, control: AbstractControl): void {\n    if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n    delete (this.controls[name]);\n    if (control) this.registerControl(name, control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Check whether there is an enabled control with the given name in the group.\n   *\n   * Reports false for disabled controls. If you'd like to check for existence in the group\n   * only, use {@link AbstractControl#get get} instead.\n   *\n   * @param controlName The control name to check for existence in the collection\n   *\n   * @returns false for disabled controls, true otherwise.\n   */\n  contains(controlName: string): boolean {\n    return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n  }\n\n  /**\n   * Sets the value of the `FormGroup`. It accepts an object that matches\n   * the structure of the group, with control names as keys.\n   *\n   * @usageNotes\n   * ### Set the complete value for the form group\n   *\n   * ```\n   * const form = new FormGroup({\n   *   first: new FormControl(),\n   *   last: new FormControl()\n   * });\n   *\n   * console.log(form.value);   // {first: null, last: null}\n   *\n   * form.setValue({first: 'Nancy', last: 'Drew'});\n   * console.log(form.value);   // {first: 'Nancy', last: 'Drew'}\n   * ```\n   *\n   * @throws When strict checks fail, such as setting the value of a control\n   * that doesn't exist or if you exclude a value of a control that does exist.\n   *\n   * @param value The new value for the control that matches the structure of the group.\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events after the value changes.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   */\n  setValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n      void {\n    this._checkAllValuesPresent(value);\n    Object.keys(value).forEach(name => {\n      this._throwIfControlMissing(name);\n      this.controls[name].setValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of the `FormGroup`. It accepts an object with control\n   * names as keys, and does its best to match the values to the correct controls\n   * in the group.\n   *\n   * It accepts both super-sets and sub-sets of the group without throwing an error.\n   *\n   * @usageNotes\n   * ### Patch the value for a form group\n   *\n   * ```\n   * const form = new FormGroup({\n   *    first: new FormControl(),\n   *    last: new FormControl()\n   * });\n   * console.log(form.value);   // {first: null, last: null}\n   *\n   * form.patchValue({first: 'Nancy'});\n   * console.log(form.value);   // {first: 'Nancy', last: null}\n   * ```\n   *\n   * @param value The object that matches the structure of the group.\n   * @param options Configuration options that determine how the control propagates changes and\n   * emits events after the value is patched.\n   * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n   * true.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  patchValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n      void {\n    Object.keys(value).forEach(name => {\n      if (this.controls[name]) {\n        this.controls[name].patchValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n      }\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Resets the `FormGroup`, marks all descendants are marked `pristine` and `untouched`, and\n   * the value of all descendants to null.\n   *\n   * You reset to a specific form state by passing in a map of states\n   * that matches the structure of your form, with control names as keys. The state\n   * is a standalone value or a form state object with both a value and a disabled\n   * status.\n   *\n   * @param value Resets the control with an initial value,\n   * or an object that defines the initial value and disabled state.\n   *\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events when the group is reset.\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * @usageNotes\n   *\n   * ### Reset the form group values\n   *\n   * ```ts\n   * const form = new FormGroup({\n   *   first: new FormControl('first name'),\n   *   last: new FormControl('last name')\n   * });\n   *\n   * console.log(form.value);  // {first: 'first name', last: 'last name'}\n   *\n   * form.reset({ first: 'name', last: 'last name' });\n   *\n   * console.log(form.value);  // {first: 'name', last: 'last name'}\n   * ```\n   *\n   * ### Reset the form group values and disabled status\n   *\n   * ```\n   * const form = new FormGroup({\n   *   first: new FormControl('first name'),\n   *   last: new FormControl('last name')\n   * });\n   *\n   * form.reset({\n   *   first: {value: 'name', disabled: true},\n   *   last: 'last'\n   * });\n   *\n   * console.log(this.form.value);  // {first: 'name', last: 'last name'}\n   * console.log(this.form.get('first').status);  // 'DISABLED'\n   * ```\n   */\n  reset(value: any = {}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._forEachChild((control: AbstractControl, name: string) => {\n      control.reset(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this._updatePristine(options);\n    this._updateTouched(options);\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * The aggregate value of the `FormGroup`, including any disabled controls.\n   *\n   * Retrieves all values regardless of disabled status.\n   * The `value` property is the best way to get the value of the group, because\n   * it excludes disabled controls in the `FormGroup`.\n   */\n  getRawValue(): any {\n    return this._reduceChildren(\n        {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n          acc[name] = control instanceof FormControl ? control.value : (<any>control).getRawValue();\n          return acc;\n        });\n  }\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    let subtreeUpdated = this._reduceChildren(false, (updated: boolean, child: AbstractControl) => {\n      return child._syncPendingControls() ? true : updated;\n    });\n    if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n    return subtreeUpdated;\n  }\n\n  /** @internal */\n  _throwIfControlMissing(name: string): void {\n    if (!Object.keys(this.controls).length) {\n      throw new Error(`\n        There are no form controls registered with this group yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n    }\n    if (!this.controls[name]) {\n      throw new Error(`Cannot find form control with name: ${name}.`);\n    }\n  }\n\n  /** @internal */\n  _forEachChild(cb: (v: any, k: string) => void): void {\n    Object.keys(this.controls).forEach(k => cb(this.controls[k], k));\n  }\n\n  /** @internal */\n  _setUpControls(): void {\n    this._forEachChild((control: AbstractControl) => {\n      control.setParent(this);\n      control._registerOnCollectionChange(this._onCollectionChange);\n    });\n  }\n\n  /** @internal */\n  _updateValue(): void { (this as{value: any}).value = this._reduceValue(); }\n\n  /** @internal */\n  _anyControls(condition: Function): boolean {\n    let res = false;\n    this._forEachChild((control: AbstractControl, name: string) => {\n      res = res || (this.contains(name) && condition(control));\n    });\n    return res;\n  }\n\n  /** @internal */\n  _reduceValue() {\n    return this._reduceChildren(\n        {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n          if (control.enabled || this.disabled) {\n            acc[name] = control.value;\n          }\n          return acc;\n        });\n  }\n\n  /** @internal */\n  _reduceChildren(initValue: any, fn: Function) {\n    let res = initValue;\n    this._forEachChild(\n        (control: AbstractControl, name: string) => { res = fn(res, control, name); });\n    return res;\n  }\n\n  /** @internal */\n  _allControlsDisabled(): boolean {\n    for (const controlName of Object.keys(this.controls)) {\n      if (this.controls[controlName].enabled) {\n        return false;\n      }\n    }\n    return Object.keys(this.controls).length > 0 || this.disabled;\n  }\n\n  /** @internal */\n  _checkAllValuesPresent(value: any): void {\n    this._forEachChild((control: AbstractControl, name: string) => {\n      if (value[name] === undefined) {\n        throw new Error(`Must supply a value for form control with name: '${name}'.`);\n      }\n    });\n  }\n}\n\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy', Validators.minLength(2)),\n *   new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value);   // ['Nancy', 'Drew']\n * console.log(arr.status);  // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy'),\n *   new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n  * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n *    new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nexport class FormArray extends AbstractControl {\n  /**\n  * Creates a new `FormArray` instance.\n  *\n  * @param controls An array of child controls. Each child control is given an index\n  * where it is registered.\n  *\n  * @param validatorOrOpts A synchronous validator function, or an array of\n  * such functions, or an `AbstractControlOptions` object that contains validation functions\n  * and a validation trigger.\n  *\n  * @param asyncValidator A single async validator or array of async validator functions\n  *\n  */\n  constructor(\n      public controls: AbstractControl[],\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(\n        coerceToValidator(validatorOrOpts),\n        coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n    this._initObservables();\n    this._setUpdateStrategy(validatorOrOpts);\n    this._setUpControls();\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n  }\n\n  /**\n   * Get the `AbstractControl` at the given `index` in the array.\n   *\n   * @param index Index in the array to retrieve the control\n   */\n  at(index: number): AbstractControl { return this.controls[index]; }\n\n  /**\n   * Insert a new `AbstractControl` at the end of the array.\n   *\n   * @param control Form control to be inserted\n   */\n  push(control: AbstractControl): void {\n    this.controls.push(control);\n    this._registerControl(control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Insert a new `AbstractControl` at the given `index` in the array.\n   *\n   * @param index Index in the array to insert the control\n   * @param control Form control to be inserted\n   */\n  insert(index: number, control: AbstractControl): void {\n    this.controls.splice(index, 0, control);\n\n    this._registerControl(control);\n    this.updateValueAndValidity();\n  }\n\n  /**\n   * Remove the control at the given `index` in the array.\n   *\n   * @param index Index in the array to remove the control\n   */\n  removeAt(index: number): void {\n    if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n    this.controls.splice(index, 1);\n    this.updateValueAndValidity();\n  }\n\n  /**\n   * Replace an existing control.\n   *\n   * @param index Index in the array to replace the control\n   * @param control The `AbstractControl` control to replace the existing control\n   */\n  setControl(index: number, control: AbstractControl): void {\n    if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n    this.controls.splice(index, 1);\n\n    if (control) {\n      this.controls.splice(index, 0, control);\n      this._registerControl(control);\n    }\n\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Length of the control array.\n   */\n  get length(): number { return this.controls.length; }\n\n  /**\n   * Sets the value of the `FormArray`. It accepts an array that matches\n   * the structure of the control.\n   *\n   * This method performs strict checks, and throws an error if you try\n   * to set the value of a control that doesn't exist or if you exclude the\n   * value of a control.\n   *\n   * @usageNotes\n   * ### Set the values for the controls in the form array\n   *\n   * ```\n   * const arr = new FormArray([\n   *   new FormControl(),\n   *   new FormControl()\n   * ]);\n   * console.log(arr.value);   // [null, null]\n   *\n   * arr.setValue(['Nancy', 'Drew']);\n   * console.log(arr.value);   // ['Nancy', 'Drew']\n   * ```\n   *\n   * @param value Array of values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  setValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._checkAllValuesPresent(value);\n    value.forEach((newValue: any, index: number) => {\n      this._throwIfControlMissing(index);\n      this.at(index).setValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of the `FormArray`. It accepts an array that matches the\n   * structure of the control, and does its best to match the values to the correct\n   * controls in the group.\n   *\n   * It accepts both super-sets and sub-sets of the array without throwing an error.\n   *\n   * @usageNotes\n   * ### Patch the values for controls in a form array\n   *\n   * ```\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * console.log(arr.value);   // [null, null]\n   *\n   * arr.patchValue(['Nancy']);\n   * console.log(arr.value);   // ['Nancy', null]\n   * ```\n   *\n   * @param value Array of latest values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  patchValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    value.forEach((newValue: any, index: number) => {\n      if (this.at(index)) {\n        this.at(index).patchValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n      }\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n   * value of all descendants to null or null maps.\n   *\n   * You reset to a specific form state by passing in an array of states\n   * that matches the structure of the control. The state is a standalone value\n   * or a form state object with both a value and a disabled status.\n   *\n   * @usageNotes\n   * ### Reset the values in a form array\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * arr.reset(['name', 'last name']);\n   *\n   * console.log(this.arr.value);  // ['name', 'last name']\n   * ```\n   *\n   * ### Reset the values in a form array and the disabled status for the first control\n   *\n   * ```\n   * this.arr.reset([\n   *   {value: 'name', disabled: true},\n   *   'last'\n   * ]);\n   *\n   * console.log(this.arr.value);  // ['name', 'last name']\n   * console.log(this.arr.get(0).status);  // 'DISABLED'\n   * ```\n   *\n   * @param value Array of values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  reset(value: any = [], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._forEachChild((control: AbstractControl, index: number) => {\n      control.reset(value[index], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this._updatePristine(options);\n    this._updateTouched(options);\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * The aggregate value of the array, including any disabled controls.\n   *\n   * Reports all values regardless of disabled status.\n   * For enabled controls only, the `value` property is the best way to get the value of the array.\n   */\n  getRawValue(): any[] {\n    return this.controls.map((control: AbstractControl) => {\n      return control instanceof FormControl ? control.value : (<any>control).getRawValue();\n    });\n  }\n\n  /**\n   * Remove all controls in the `FormArray`.\n   *\n   * @usageNotes\n   * ### Remove all elements from a FormArray\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * console.log(arr.length);  // 2\n   *\n   * arr.clear();\n   * console.log(arr.length);  // 0\n   * ```\n   *\n   * It's a simpler and more efficient alternative to removing all elements one by one:\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   *\n   * while (arr.length) {\n   *    arr.removeAt(0);\n   * }\n   * ```\n   */\n  clear(): void {\n    if (this.controls.length < 1) return;\n    this._forEachChild((control: AbstractControl) => control._registerOnCollectionChange(() => {}));\n    this.controls.splice(0);\n    this.updateValueAndValidity();\n  }\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    let subtreeUpdated = this.controls.reduce((updated: boolean, child: AbstractControl) => {\n      return child._syncPendingControls() ? true : updated;\n    }, false);\n    if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n    return subtreeUpdated;\n  }\n\n  /** @internal */\n  _throwIfControlMissing(index: number): void {\n    if (!this.controls.length) {\n      throw new Error(`\n        There are no form controls registered with this array yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n    }\n    if (!this.at(index)) {\n      throw new Error(`Cannot find form control at index ${index}`);\n    }\n  }\n\n  /** @internal */\n  _forEachChild(cb: Function): void {\n    this.controls.forEach((control: AbstractControl, index: number) => { cb(control, index); });\n  }\n\n  /** @internal */\n  _updateValue(): void {\n    (this as{value: any}).value =\n        this.controls.filter((control) => control.enabled || this.disabled)\n            .map((control) => control.value);\n  }\n\n  /** @internal */\n  _anyControls(condition: Function): boolean {\n    return this.controls.some((control: AbstractControl) => control.enabled && condition(control));\n  }\n\n  /** @internal */\n  _setUpControls(): void {\n    this._forEachChild((control: AbstractControl) => this._registerControl(control));\n  }\n\n  /** @internal */\n  _checkAllValuesPresent(value: any): void {\n    this._forEachChild((control: AbstractControl, i: number) => {\n      if (value[i] === undefined) {\n        throw new Error(`Must supply a value for form control at index: ${i}.`);\n      }\n    });\n  }\n\n  /** @internal */\n  _allControlsDisabled(): boolean {\n    for (const control of this.controls) {\n      if (control.enabled) return false;\n    }\n    return this.controls.length > 0 || this.disabled;\n  }\n\n  private _registerControl(control: AbstractControl) {\n    control.setParent(this);\n    control._registerOnCollectionChange(this._onCollectionChange);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, EventEmitter, Inject, Input, Optional, Self, forwardRef} from '@angular/core';\n\nimport {AbstractControl, FormControl, FormGroup, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {NgControl} from './ng_control';\nimport {NgModel} from './ng_model';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from './shared';\n\nexport const formDirectiveProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => NgForm)\n};\n\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags.  You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful.  Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Migrating from deprecated ngForm selector\n *\n * Support for using `ngForm` element selector has been deprecated in Angular v6 and will be removed\n * in Angular v9.\n *\n * This has been deprecated to keep selectors consistent with other core Angular selectors,\n * as element selectors are typically written in kebab-case.\n *\n * Now deprecated:\n * ```html\n * <ngForm #myForm=\"ngForm\">\n * ```\n *\n * After:\n * ```html\n * <ng-form #myForm=\"ngForm\">\n * ```\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n *    <input name=\"one\" ngModel>  <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]',\n  providers: [formDirectiveProvider],\n  host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n  outputs: ['ngSubmit'],\n  exportAs: 'ngForm'\n})\nexport class NgForm extends ControlContainer implements Form,\n    AfterViewInit {\n  /**\n   * @description\n   * Returns whether the form submission has been triggered.\n   */\n  public readonly submitted: boolean = false;\n\n  private _directives: NgModel[] = [];\n\n  /**\n   * @description\n   * The `FormGroup` instance created for this form.\n   */\n  form: FormGroup;\n\n  /**\n   * @description\n   * Event emitter for the \"ngSubmit\" event\n   */\n  ngSubmit = new EventEmitter();\n\n  /**\n   * @description\n   * Tracks options for the `NgForm` instance.\n   *\n   * **updateOn**: Sets the default `updateOn` value for all child `NgModels` below it\n   * unless explicitly set by a child `NgModel` using `ngModelOptions`). Defaults to 'change'.\n   * Possible values: `'change'` | `'blur'` | `'submit'`.\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngFormOptions') options !: {updateOn?: FormHooks};\n\n  constructor(\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this.form =\n        new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n  }\n\n  /**\n   * @description\n   * Lifecycle method called after the view is initialized. For internal use only.\n   */\n  ngAfterViewInit() { this._setUpdateStrategy(); }\n\n  /**\n   * @description\n   * The directive instance.\n   */\n  get formDirective(): Form { return this; }\n\n  /**\n   * @description\n   * The internal `FormGroup` instance.\n   */\n  get control(): FormGroup { return this.form; }\n\n  /**\n   * @description\n   * Returns an array representing the path to this group. Because this directive\n   * always lives at the top level of a form, it is always an empty array.\n   */\n  get path(): string[] { return []; }\n\n  /**\n   * @description\n   * Returns a map of the controls in this group.\n   */\n  get controls(): {[key: string]: AbstractControl} { return this.form.controls; }\n\n  /**\n   * @description\n   * Method that sets up the control directive in this group, re-calculates its value\n   * and validity, and adds the instance to the internal list of directives.\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  addControl(dir: NgModel): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      (dir as{control: FormControl}).control =\n          <FormControl>container.registerControl(dir.name, dir.control);\n      setUpControl(dir.control, dir);\n      dir.control.updateValueAndValidity({emitEvent: false});\n      this._directives.push(dir);\n    });\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  getControl(dir: NgModel): FormControl { return <FormControl>this.form.get(dir.path); }\n\n  /**\n   * @description\n   * Removes the `NgModel` instance from the internal list of directives\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  removeControl(dir: NgModel): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      if (container) {\n        container.removeControl(dir.name);\n      }\n      removeDir<NgModel>(this._directives, dir);\n    });\n  }\n\n  /**\n   * @description\n   * Adds a new `NgModelGroup` directive instance to the form.\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  addFormGroup(dir: NgModelGroup): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      const group = new FormGroup({});\n      setUpFormContainer(group, dir);\n      container.registerControl(dir.name, group);\n      group.updateValueAndValidity({emitEvent: false});\n    });\n  }\n\n  /**\n   * @description\n   * Removes the `NgModelGroup` directive instance from the form.\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  removeFormGroup(dir: NgModelGroup): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      if (container) {\n        container.removeControl(dir.name);\n      }\n    });\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  getFormGroup(dir: NgModelGroup): FormGroup { return <FormGroup>this.form.get(dir.path); }\n\n  /**\n   * Sets the new value for the provided `NgControl` directive.\n   *\n   * @param dir The `NgControl` directive instance.\n   * @param value The new value for the directive's control.\n   */\n  updateModel(dir: NgControl, value: any): void {\n    resolvedPromise.then(() => {\n      const ctrl = <FormControl>this.form.get(dir.path !);\n      ctrl.setValue(value);\n    });\n  }\n\n  /**\n   * @description\n   * Sets the value for this `FormGroup`.\n   *\n   * @param value The new value\n   */\n  setValue(value: {[key: string]: any}): void { this.control.setValue(value); }\n\n  /**\n   * @description\n   * Method called when the \"submit\" event is triggered on the form.\n   * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n   *\n   * @param $event The \"submit\" event object\n   */\n  onSubmit($event: Event): boolean {\n    (this as{submitted: boolean}).submitted = true;\n    syncPendingControls(this.form, this._directives);\n    this.ngSubmit.emit($event);\n    return false;\n  }\n\n  /**\n   * @description\n   * Method called when the \"reset\" event is triggered on the form.\n   */\n  onReset(): void { this.resetForm(); }\n\n  /**\n   * @description\n   * Resets the form to an initial value and resets its submitted status.\n   *\n   * @param value The new value for the form.\n   */\n  resetForm(value: any = undefined): void {\n    this.form.reset(value);\n    (this as{submitted: boolean}).submitted = false;\n  }\n\n  private _setUpdateStrategy() {\n    if (this.options && this.options.updateOn != null) {\n      this.form._updateOn = this.options.updateOn;\n    }\n  }\n\n  /** @internal */\n  _findContainer(path: string[]): FormGroup {\n    path.pop();\n    return path.length ? <FormGroup>this.form.get(path) : this.form;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class TemplateDrivenErrors {\n  static modelParentException(): void {\n    throw new Error(`\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup's partner directive \"formControlName\" instead.  Example:\n\n      ${Examples.formControlName}\n\n      Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n      Example:\n\n      ${Examples.ngModelWithFormGroup}`);\n  }\n\n  static formGroupNameException(): void {\n    throw new Error(`\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      ${Examples.formGroupName}\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      ${Examples.ngModelGroup}`);\n  }\n\n  static missingNameException() {\n    throw new Error(\n        `If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as 'standalone' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n      Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n  }\n\n  static modelGroupParentException() {\n    throw new Error(`\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      ${Examples.formGroupName}\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      ${Examples.ngModelGroup}`);\n  }\n\n  static ngFormWarning() {\n    console.warn(`\n    It looks like you're using 'ngForm'.\n\n    Support for using the 'ngForm' element selector has been deprecated in Angular v6 and will be removed\n    in Angular v9.\n\n    Use 'ng-form' instead.\n\n    Before:\n    <ngForm #myForm=\"ngForm\">\n\n    After:\n    <ng-form #myForm=\"ngForm\">\n    `);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Inject, InjectionToken, Optional} from '@angular/core';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\n/**\n * @description\n * `InjectionToken` to provide to turn off the warning when using 'ngForm' deprecated selector.\n */\nexport const NG_FORM_SELECTOR_WARNING = new InjectionToken('NgFormSelectorWarning');\n\n/**\n * This directive is solely used to display warnings when the deprecated `ngForm` selector is used.\n *\n * @deprecated in Angular v6 and will be removed in Angular v9.\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'ngForm'})\nexport class NgFormSelectorWarning {\n  /**\n   * Static property used to track whether the deprecation warning for this selector has been sent.\n   * Used to support warning config of \"once\".\n   *\n   * @internal\n   */\n  static _ngFormWarning = false;\n\n  constructor(@Optional() @Inject(NG_FORM_SELECTOR_WARNING) ngFormWarning: string|null) {\n    if (((!ngFormWarning || ngFormWarning === 'once') && !NgFormSelectorWarning._ngFormWarning) ||\n        ngFormWarning === 'always') {\n      TemplateDrivenErrors.ngFormWarning();\n      NgFormSelectorWarning._ngFormWarning = true;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OnDestroy, OnInit} from '@angular/core';\n\nimport {FormGroup} from '../model';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {composeAsyncValidators, composeValidators, controlPath} from './shared';\nimport {AsyncValidatorFn, ValidatorFn} from './validators';\n\n\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nexport class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {\n  /**\n   * @description\n   * The parent control for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _parent !: ControlContainer;\n\n  /**\n   * @description\n   * An array of synchronous validators for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _validators !: any[];\n\n  /**\n   * @description\n   * An array of async validators for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _asyncValidators !: any[];\n\n  /**\n   * @description\n   * An internal callback method triggered on the instance after the inputs are set.\n   * Registers the group with its parent group.\n   */\n  ngOnInit(): void {\n    this._checkParentType();\n    this.formDirective !.addFormGroup(this);\n  }\n\n  /**\n   * @description\n   * An internal callback method triggered before the instance is destroyed.\n   * Removes the group from its parent group.\n   */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      this.formDirective.removeFormGroup(this);\n    }\n  }\n\n  /**\n   * @description\n   * The `FormGroup` bound to this directive.\n   */\n  get control(): FormGroup { return this.formDirective !.getFormGroup(this); }\n\n  /**\n   * @description\n   * The path to this group from the top-level directive.\n   */\n  get path(): string[] { return controlPath(this.name, this._parent); }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): Form|null { return this._parent ? this._parent.formDirective : null; }\n\n  /**\n   * @description\n   * The synchronous validators registered with this group.\n   */\n  get validator(): ValidatorFn|null { return composeValidators(this._validators); }\n\n  /**\n   * @description\n   * The async validators registered with this group.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._asyncValidators);\n  }\n\n  /** @internal */\n  _checkParentType(): void {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {NgForm} from './ng_form';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\nexport const modelGroupProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => NgModelGroup)\n};\n\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'})\nexport class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n  /**\n   * @description\n   * Tracks the name of the `NgModelGroup` bound to the directive. The name corresponds\n   * to a key in the parent `NgForm`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngModelGroup') name !: string;\n\n  constructor(\n      @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /** @internal */\n  _checkParentType(): void {\n    if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n      TemplateDrivenErrors.modelGroupParentException();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NgForm} from './ng_form';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared';\nimport {TemplateDrivenErrors} from './template_driven_errors';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport const formControlBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => NgModel)\n};\n\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have and old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel` have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the value of the domain model in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like validity state), \n * export the directive into a local template variable using `ngModel` as the key (ex: `#myVar=\"ngModel\"`).\n * You then access the control using the directive's `control` property, \n * but most properties used (like `valid` and `dirty`) fall through to the control anyway for direct access. \n * See a full list of properties directly available in `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor` \n * @see `SelectControlValueAccessor`\n * \n * @usageNotes\n * \n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding, \n * as the parent form syncs the value for you. You access its properties by exporting it into a \n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where \n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n * \n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n * \n * ### Using a standalone ngModel within a group\n * \n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n *   <input name=\"login\" ngModel placeholder=\"Login\">\n *   <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n * \n * ### Setting the ngModel name attribute through options\n * \n * The following example shows you an alternate way to set the name attribute. The name attribute is used\n * within a custom form component, and the name `@Input` property serves a different purpose.\n *\n * ```html\n * <form>\n *   <my-person-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n *   </my-person-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[ngModel]:not([formControlName]):not([formControl])',\n  providers: [formControlBinding],\n  exportAs: 'ngModel'\n})\nexport class NgModel extends NgControl implements OnChanges,\n    OnDestroy {\n  public readonly control: FormControl = new FormControl();\n  /** @internal */\n  _registered = false;\n\n  /**\n   * @description\n   * Internal reference to the view model value.\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the name bound to the directive. The parent form\n   * uses this name as a key to retrieve this control's value.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() name !: string;\n\n  /**\n   * @description\n   * Tracks whether the control is disabled.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('disabled') isDisabled !: boolean;\n\n  /**\n   * @description\n   * Tracks the value bound to this directive.\n   */\n  @Input('ngModel') model: any;\n\n  /**\n   * @description\n   * Tracks the configuration options for this `ngModel` instance.\n   *\n   * **name**: An alternative to setting the name attribute on the form control element. See\n   * the [example](api/forms/NgModel#using-ngmodel-on-a-standalone-control) for using `NgModel`\n   * as a standalone control.\n   *\n   * **standalone**: When set to true, the `ngModel` will not register itself with its parent form,\n   * and acts as if it's not in the form. Defaults to false.\n   *\n   * **updateOn**: Defines the event upon which the form control value and validity update.\n   * Defaults to 'change'. Possible values: `'change'` | `'blur'` | `'submit'`.\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngModelOptions')\n  options !: {name?: string, standalone?: boolean, updateOn?: FormHooks};\n\n  /**\n   * @description\n   * Event emitter for producing the `ngModelChange` event after\n   * the view model updates.\n   */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  constructor(@Optional() @Host() parent: ControlContainer,\n              @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n              @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: Array<AsyncValidator|AsyncValidatorFn>,\n              @Optional() @Self() @Inject(NG_VALUE_ACCESSOR)\n              valueAccessors: ControlValueAccessor[]) {\n                super();\n                this._parent = parent;\n                this._rawValidators = validators || [];\n                this._rawAsyncValidators = asyncValidators || [];\n                this.valueAccessor = selectValueAccessor(this, valueAccessors);\n              }\n\n              /**\n               * @description\n               * A lifecycle method called when the directive's inputs change. For internal use\n               * only.\n               *\n               * @param changes A object of key/value pairs for the set of changed inputs.\n               */\n              ngOnChanges(changes: SimpleChanges) {\n                this._checkForErrors();\n                if (!this._registered) this._setUpControl();\n                if ('isDisabled' in changes) {\n                  this._updateDisabled(changes);\n                }\n\n                if (isPropertyUpdated(changes, this.viewModel)) {\n                  this._updateValue(this.model);\n                  this.viewModel = this.model;\n                }\n              }\n\n              /**\n               * @description\n               * Lifecycle method called before the directive's instance is destroyed. For internal\n               * use only.\n               */\n              ngOnDestroy(): void { this.formDirective && this.formDirective.removeControl(this); }\n\n              /**\n               * @description\n               * Returns an array that represents the path from the top-level form to this control.\n               * Each index is the string name of the control on that level.\n               */\n              get path(): string[] {\n                return this._parent ? controlPath(this.name, this._parent) : [this.name];\n              }\n\n              /**\n               * @description\n               * The top-level directive for this control if present, otherwise null.\n               */\n              get formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n\n              /**\n               * @description\n               * Synchronous validator function composed of all the synchronous validators\n               * registered with this directive.\n               */\n              get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n              /**\n               * @description\n               * Async validator function composed of all the async validators registered with this\n               * directive.\n               */\n              get asyncValidator(): AsyncValidatorFn|null {\n                return composeAsyncValidators(this._rawAsyncValidators);\n              }\n\n              /**\n               * @description\n               * Sets the new value for the view model and emits an `ngModelChange` event.\n               *\n               * @param newValue The new value emitted by `ngModelChange`.\n               */\n              viewToModelUpdate(newValue: any): void {\n                this.viewModel = newValue;\n                this.update.emit(newValue);\n              }\n\n              private _setUpControl(): void {\n                this._setUpdateStrategy();\n                this._isStandalone() ? this._setUpStandalone() :\n                                       this.formDirective.addControl(this);\n                this._registered = true;\n              }\n\n              private _setUpdateStrategy(): void {\n                if (this.options && this.options.updateOn != null) {\n                  this.control._updateOn = this.options.updateOn;\n                }\n              }\n\n              private _isStandalone(): boolean {\n                return !this._parent || !!(this.options && this.options.standalone);\n              }\n\n              private _setUpStandalone(): void {\n                setUpControl(this.control, this);\n                this.control.updateValueAndValidity({emitEvent: false});\n              }\n\n              private _checkForErrors(): void {\n                if (!this._isStandalone()) {\n                  this._checkParentType();\n                }\n                this._checkName();\n              }\n\n              private _checkParentType(): void {\n                if (!(this._parent instanceof NgModelGroup) &&\n                    this._parent instanceof AbstractFormGroupDirective) {\n                  TemplateDrivenErrors.formGroupNameException();\n                } else if (\n                    !(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n                  TemplateDrivenErrors.modelParentException();\n                }\n              }\n\n              private _checkName(): void {\n                if (this.options && this.options.name) this.name = this.options.name;\n\n                if (!this._isStandalone() && !this.name) {\n                  TemplateDrivenErrors.missingNameException();\n                }\n              }\n\n              private _updateValue(value: any): void {\n                resolvedPromise.then(\n                    () => { this.control.setValue(value, {emitViewToModelChange: false}); });\n              }\n\n              private _updateDisabled(changes: SimpleChanges) {\n                const disabledValue = changes['isDisabled'].currentValue;\n\n                const isDisabled =\n                    disabledValue === '' || (disabledValue && disabledValue !== 'false');\n\n                resolvedPromise.then(() => {\n                  if (isDisabled && !this.control.disabled) {\n                    this.control.disable();\n                  } else if (!isDisabled && this.control.disabled) {\n                    this.control.enable();\n                  }\n                });\n              }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\n\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\n@Directive({\n  selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n  host: {'novalidate': ''},\n})\nexport class ÉµNgNoValidate {\n}\n\nexport {ÉµNgNoValidate as NgNoValidate};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Inject, InjectionToken, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nexport const NG_MODEL_WITH_FORM_CONTROL_WARNING =\n    new InjectionToken('NgModelWithFormControlWarning');\n\nexport const formControlBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => FormControlDirective)\n};\n\n/**\n * @description\n * * Syncs a standalone `FormControl` instance to a form control element.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Registering a single form control\n * \n * The following examples shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n *\n * ```html\n * <input [formControl]=\"control\" [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <input [formControl]=\"control\">\n * ```\n *\n * ```ts\n * this.control.setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})\n\nexport class FormControlDirective extends NgControl implements OnChanges {\n  /**\n   * @description\n   * Internal reference to the view model value.\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the `FormControl` instance bound to the directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formControl') form !: FormControl;\n\n  /**\n   * @description\n   * Triggers a warning that this input should not be used with reactive forms.\n   */\n  @Input('disabled')\n  set isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n\n  // TODO(kara): remove next 4 properties once deprecation period is over\n\n  /** @deprecated as of v6 */\n  @Input('ngModel') model: any;\n\n  /** @deprecated as of v6 */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  /**\n   * @description\n   * Static property used to track whether any ngModel warnings have been sent across\n   * all instances of FormControlDirective. Used to support warning config of \"once\".\n   *\n   * @internal\n   */\n  static _ngModelWarningSentOnce = false;\n\n  /**\n   * @description\n   * Instance property used to track whether an ngModel warning has been sent out for this\n   * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n   *\n   * @internal\n   */\n  _ngModelWarningSent = false;\n\n  constructor(@Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n              @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: Array<AsyncValidator|AsyncValidatorFn>,\n              @Optional() @Self() @Inject(NG_VALUE_ACCESSOR)\n              valueAccessors: ControlValueAccessor[],\n              @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|null) {\n                super();\n                this._rawValidators = validators || [];\n                this._rawAsyncValidators = asyncValidators || [];\n                this.valueAccessor = selectValueAccessor(this, valueAccessors);\n              }\n\n              /**\n               * @description\n               * A lifecycle method called when the directive's inputs change. For internal use\n               * only.\n               *\n               * @param changes A object of key/value pairs for the set of changed inputs.\n               */\n              ngOnChanges(changes: SimpleChanges): void {\n                if (this._isControlChanged(changes)) {\n                  setUpControl(this.form, this);\n                  if (this.control.disabled && this.valueAccessor !.setDisabledState) {\n                    this.valueAccessor !.setDisabledState !(true);\n                  }\n                  this.form.updateValueAndValidity({emitEvent: false});\n                }\n                if (isPropertyUpdated(changes, this.viewModel)) {\n                  _ngModelWarning(\n                      'formControl', FormControlDirective, this, this._ngModelWarningConfig);\n                  this.form.setValue(this.model);\n                  this.viewModel = this.model;\n                }\n              }\n\n              /**\n               * @description\n               * Returns an array that represents the path from the top-level form to this control.\n               * Each index is the string name of the control on that level.\n               */\n              get path(): string[] { return []; }\n\n              /**\n               * @description\n               * Synchronous validator function composed of all the synchronous validators\n               * registered with this directive.\n               */\n              get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n              /**\n               * @description\n               * Async validator function composed of all the async validators registered with this\n               * directive.\n               */\n              get asyncValidator(): AsyncValidatorFn|null {\n                return composeAsyncValidators(this._rawAsyncValidators);\n              }\n\n              /**\n               * @description\n               * The `FormControl` bound to this directive.\n               */\n              get control(): FormControl { return this.form; }\n\n              /**\n               * @description\n               * Sets the new value for the view model and emits an `ngModelChange` event.\n               *\n               * @param newValue The new value for the view model.\n               */\n              viewToModelUpdate(newValue: any): void {\n                this.viewModel = newValue;\n                this.update.emit(newValue);\n              }\n\n              private _isControlChanged(changes: {[key: string]: any}): boolean {\n                return changes.hasOwnProperty('form');\n              }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Inject, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\nimport {FormArray, FormControl, FormGroup} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from '../../validators';\nimport {ControlContainer} from '../control_container';\nimport {Form} from '../form_interface';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {cleanUpControl, composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from '../shared';\n\nimport {FormControlName} from './form_control_name';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const formDirectiveProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormGroupDirective)\n};\n\n/**\n * @description\n *\n * Binds an existing `FormGroup` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[formGroup]',\n  providers: [formDirectiveProvider],\n  host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n  exportAs: 'ngForm'\n})\nexport class FormGroupDirective extends ControlContainer implements Form,\n    OnChanges {\n  /**\n   * @description\n   * Reports whether the form submission has been triggered.\n   */\n  public readonly submitted: boolean = false;\n\n  // TODO(issue/24571): remove '!'.\n  private _oldForm !: FormGroup;\n\n  /**\n   * @description\n   * Tracks the list of added `FormControlName` instances\n   */\n  directives: FormControlName[] = [];\n\n  /**\n   * @description\n   * Tracks the `FormGroup` bound to this directive.\n   */\n  @Input('formGroup') form: FormGroup = null !;\n\n  /**\n   * @description\n   * Emits an event when the form submission has been triggered.\n   */\n  @Output() ngSubmit = new EventEmitter();\n\n  constructor(\n      @Optional() @Self() @Inject(NG_VALIDATORS) private _validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) private _asyncValidators: any[]) {\n    super();\n  }\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs change. For internal use only.\n   *\n   * @param changes A object of key/value pairs for the set of changed inputs.\n   */\n  ngOnChanges(changes: SimpleChanges): void {\n    this._checkFormPresent();\n    if (changes.hasOwnProperty('form')) {\n      this._updateValidators();\n      this._updateDomValue();\n      this._updateRegistrations();\n    }\n  }\n\n  /**\n   * @description\n   * Returns this directive's instance.\n   */\n  get formDirective(): Form { return this; }\n\n  /**\n   * @description\n   * Returns the `FormGroup` bound to this directive.\n   */\n  get control(): FormGroup { return this.form; }\n\n  /**\n   * @description\n   * Returns an array representing the path to this group. Because this directive\n   * always lives at the top level of a form, it always an empty array.\n   */\n  get path(): string[] { return []; }\n\n  /**\n   * @description\n   * Method that sets up the control directive in this group, re-calculates its value\n   * and validity, and adds the instance to the internal list of directives.\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  addControl(dir: FormControlName): FormControl {\n    const ctrl: any = this.form.get(dir.path);\n    setUpControl(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n    this.directives.push(dir);\n    return ctrl;\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  getControl(dir: FormControlName): FormControl { return <FormControl>this.form.get(dir.path); }\n\n  /**\n   * @description\n   * Removes the `FormControlName` instance from the internal list of directives\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  removeControl(dir: FormControlName): void { removeDir<FormControlName>(this.directives, dir); }\n\n  /**\n   * Adds a new `FormGroupName` directive instance to the form.\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  addFormGroup(dir: FormGroupName): void {\n    const ctrl: any = this.form.get(dir.path);\n    setUpFormContainer(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n  }\n\n  /**\n   * No-op method to remove the form group.\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  removeFormGroup(dir: FormGroupName): void {}\n\n  /**\n   * @description\n   * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  getFormGroup(dir: FormGroupName): FormGroup { return <FormGroup>this.form.get(dir.path); }\n\n  /**\n   * Adds a new `FormArrayName` directive instance to the form.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  addFormArray(dir: FormArrayName): void {\n    const ctrl: any = this.form.get(dir.path);\n    setUpFormContainer(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n  }\n\n  /**\n   * No-op method to remove the form array.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  removeFormArray(dir: FormArrayName): void {}\n\n  /**\n   * @description\n   * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  getFormArray(dir: FormArrayName): FormArray { return <FormArray>this.form.get(dir.path); }\n\n  /**\n   * Sets the new value for the provided `FormControlName` directive.\n   *\n   * @param dir The `FormControlName` directive instance.\n   * @param value The new value for the directive's control.\n   */\n  updateModel(dir: FormControlName, value: any): void {\n    const ctrlÂ  = <FormControl>this.form.get(dir.path);\n    ctrl.setValue(value);\n  }\n\n  /**\n   * @description\n   * Method called with the \"submit\" event is triggered on the form.\n   * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n   *\n   * @param $event The \"submit\" event object\n   */\n  onSubmit($event: Event): boolean {\n    (this as{submitted: boolean}).submitted = true;\n    syncPendingControls(this.form, this.directives);\n    this.ngSubmit.emit($event);\n    return false;\n  }\n\n  /**\n   * @description\n   * Method called when the \"reset\" event is triggered on the form.\n   */\n  onReset(): void { this.resetForm(); }\n\n  /**\n   * @description\n   * Resets the form to an initial value and resets its submitted status.\n   *\n   * @param value The new value for the form.\n   */\n  resetForm(value: any = undefined): void {\n    this.form.reset(value);\n    (this as{submitted: boolean}).submitted = false;\n  }\n\n\n  /** @internal */\n  _updateDomValue() {\n    this.directives.forEach(dir => {\n      const newCtrl: any = this.form.get(dir.path);\n      if (dir.control !== newCtrl) {\n        cleanUpControl(dir.control, dir);\n        if (newCtrl) setUpControl(newCtrl, dir);\n        (dir as{control: FormControl}).control = newCtrl;\n      }\n    });\n\n    this.form._updateTreeValidity({emitEvent: false});\n  }\n\n  private _updateRegistrations() {\n    this.form._registerOnCollectionChange(() => this._updateDomValue());\n    if (this._oldForm) this._oldForm._registerOnCollectionChange(() => {});\n    this._oldForm = this.form;\n  }\n\n  private _updateValidators() {\n    const sync = composeValidators(this._validators);\n    this.form.validator = Validators.compose([this.form.validator !, sync !]);\n\n    const async = composeAsyncValidators(this._asyncValidators);\n    this.form.asyncValidator = Validators.composeAsync([this.form.asyncValidator !, async !]);\n  }\n\n  private _checkFormPresent() {\n    if (!this.form) {\n      ReactiveErrors.missingFormException();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormArray} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, controlPath} from '../shared';\nimport {AsyncValidatorFn, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\n\nexport const formGroupNameProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormGroupName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormGroup` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` to link, and\n * looks for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n * \n * ### Access the group by name\n * \n * The following example uses the {@link AbstractControl#get get} method to access the \n * associated `FormGroup`\n *\n * ```ts\n *   this.form.get('name');\n * ```\n * \n * ### Access individual controls in the group\n * \n * The following example uses the {@link AbstractControl#get get} method to access \n * individual controls within the group using dot syntax.\n *\n * ```ts\n *   this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n * \n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})\nexport class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n  /**\n   * @description\n   * Tracks the name of the `FormGroup` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formGroupName') name !: string;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /** @internal */\n  _checkParentType(): void {\n    if (_hasInvalidParent(this._parent)) {\n      ReactiveErrors.groupParentException();\n    }\n  }\n}\n\nexport const formArrayNameProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormArrayName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})\nexport class FormArrayName extends ControlContainer implements OnInit, OnDestroy {\n  /** @internal */\n  _parent: ControlContainer;\n\n  /** @internal */\n  _validators: any[];\n\n  /** @internal */\n  _asyncValidators: any[];\n\n  /**\n   * @description\n   * Tracks the name of the `FormArray` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formArrayName') name !: string;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n   *\n   * @throws If the directive does not have a valid parent.\n   */\n  ngOnInit(): void {\n    this._checkParentType();\n    this.formDirective !.addFormArray(this);\n  }\n\n  /**\n   * @description\n   * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n   */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      this.formDirective.removeFormArray(this);\n    }\n  }\n\n  /**\n   * @description\n   * The `FormArray` bound to this directive.\n   */\n  get control(): FormArray { return this.formDirective !.getFormArray(this); }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): FormGroupDirective|null {\n    return this._parent ? <FormGroupDirective>this._parent.formDirective : null;\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] { return controlPath(this.name, this._parent); }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators registered with this\n   * directive.\n   */\n  get validator(): ValidatorFn|null { return composeValidators(this._validators); }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this directive.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._asyncValidators);\n  }\n\n  private _checkParentType(): void {\n    if (_hasInvalidParent(this._parent)) {\n      ReactiveErrors.arrayParentException();\n    }\n  }\n}\n\nfunction _hasInvalidParent(parent: ControlContainer): boolean {\n  return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n      !(parent instanceof FormArrayName);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {NG_MODEL_WITH_FORM_CONTROL_WARNING} from './form_control_directive';\nimport {FormGroupDirective} from './form_group_directive';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const controlNameBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => FormControlName)\n};\n\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n * \n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n *\n * ```html\n * <form [formGroup]=\"form\">\n *   <input formControlName=\"first\" [(ngModel)]=\"value\">\n * </form>\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <form [formGroup]=\"form\">\n *   <input formControlName=\"first\">\n * </form>\n * ```\n *\n * ```ts\n * this.form.get('first').setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'})\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName]', providers: [controlNameBinding]})\nexport class FormControlName extends NgControl implements OnChanges, OnDestroy {\n  private _added = false;\n  /**\n   * @description\n   * Internal reference to the view model value.\n   * @internal\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the `FormControl` instance bound to the directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  readonly control !: FormControl;\n\n  /**\n   * @description\n   * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formControlName') name !: string;\n\n  /**\n   * @description\n   * Triggers a warning that this input should not be used with reactive forms.\n   */\n  @Input('disabled')\n  set isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n\n  // TODO(kara): remove next 4 properties once deprecation period is over\n\n  /** @deprecated as of v6 */\n  @Input('ngModel') model: any;\n\n  /** @deprecated as of v6 */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  /**\n   * @description\n   * Static property used to track whether any ngModel warnings have been sent across\n   * all instances of FormControlName. Used to support warning config of \"once\".\n   *\n   * @internal\n   */\n  static _ngModelWarningSentOnce = false;\n\n  /**\n   * @description\n   * Instance property used to track whether an ngModel warning has been sent out for this\n   * particular FormControlName instance. Used to support warning config of \"always\".\n   *\n   * @internal\n   */\n  _ngModelWarningSent = false;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators:\n          Array<AsyncValidator|AsyncValidatorFn>,\n      @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n      @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|\n      null) {\n    super();\n    this._parent = parent;\n    this._rawValidators = validators || [];\n    this._rawAsyncValidators = asyncValidators || [];\n    this.valueAccessor = selectValueAccessor(this, valueAccessors);\n  }\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs change. For internal use only.\n   *\n   * @param changes A object of key/value pairs for the set of changed inputs.\n   */\n  ngOnChanges(changes: SimpleChanges) {\n    if (!this._added) this._setUpControl();\n    if (isPropertyUpdated(changes, this.viewModel)) {\n      _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n      this.viewModel = this.model;\n      this.formDirective.updateModel(this, this.model);\n    }\n  }\n\n  /**\n   * @description\n   * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n   */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      this.formDirective.removeControl(this);\n    }\n  }\n\n  /**\n   * @description\n   * Sets the new value for the view model and emits an `ngModelChange` event.\n   *\n   * @param newValue The new value for the view model.\n   */\n  viewToModelUpdate(newValue: any): void {\n    this.viewModel = newValue;\n    this.update.emit(newValue);\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] { return controlPath(this.name, this._parent !); }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators\n   * registered with this directive.\n   */\n  get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this\n   * directive.\n   */\n  get asyncValidator(): AsyncValidatorFn {\n    return composeAsyncValidators(this._rawAsyncValidators) !;\n  }\n\n  private _checkParentType(): void {\n    if (!(this._parent instanceof FormGroupName) &&\n        this._parent instanceof AbstractFormGroupDirective) {\n      ReactiveErrors.ngModelGroupException();\n    } else if (\n        !(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&\n        !(this._parent instanceof FormArrayName)) {\n      ReactiveErrors.controlParentException();\n    }\n  }\n\n  private _setUpControl() {\n    this._checkParentType();\n    (this as{control: FormControl}).control = this.formDirective.addControl(this);\n    if (this.control.disabled && this.valueAccessor !.setDisabledState) {\n      this.valueAccessor !.setDisabledState !(true);\n    }\n    this._added = true;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input, OnChanges, SimpleChanges, StaticProvider, forwardRef} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {AbstractControl} from '../model';\nimport {NG_VALIDATORS, Validators} from '../validators';\n\n\n/**\n * @description\n * Defines the map of errors returned from failed validation checks.\n *\n * @publicApi\n */\nexport type ValidationErrors = {\n  [key: string]: any\n};\n\n/**\n * @description\n * An interface implemented by classes that perform synchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom validator\n *\n * The following example implements the `Validator` interface to create a\n * validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n *   selector: '[customValidator]',\n *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n *   validate(control: AbstractControl): ValidationErrors|null {\n *     return {'custom': true};\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface Validator {\n  /**\n   * @description\n   * Method that performs synchronous validation against the provided control.\n   *\n   * @param control The control to validate against.\n   *\n   * @returns A map of validation errors if validation fails,\n   * otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null;\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange?(fn: () => void): void;\n}\n\n/**\n * @description\n * An interface implemented by classes that perform asynchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * import { of as observableOf } from 'rxjs';\n *\n * @Directive({\n *   selector: '[customAsyncValidator]',\n *   providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n *   validate(control: AbstractControl): Observable<ValidationErrors|null> {\n *     return observableOf({'custom': true});\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface AsyncValidator extends Validator {\n  /**\n   * @description\n   * Method that performs async validation against the provided control.\n   *\n   * @param control The control to validate against.\n   *\n   * @returns A promise or observable that resolves a map of validation errors\n   * if validation fails, otherwise null.\n   */\n  validate(control: AbstractControl):\n      Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const REQUIRED_VALIDATOR: StaticProvider = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => RequiredValidator),\n  multi: true\n};\n\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const CHECKBOX_REQUIRED_VALIDATOR: StaticProvider = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => CheckboxRequiredValidator),\n  multi: true\n};\n\n\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n  providers: [REQUIRED_VALIDATOR],\n  host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class RequiredValidator implements Validator {\n  // TODO(issue/24571): remove '!'.\n  private _required !: boolean;\n  // TODO(issue/24571): remove '!'.\n  private _onChange !: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the required attribute bound to this directive.\n   */\n  @Input()\n  get required(): boolean|string { return this._required; }\n\n  set required(value: boolean|string) {\n    this._required = value != null && value !== false && `${value}` !== 'false';\n    if (this._onChange) this._onChange();\n  }\n\n  /**\n   * @description\n   * Method that validates whether the control is empty.\n   * Returns the validation result if enabled, otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.required ? Validators.required(control) : null;\n  }\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n}\n\n\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an ngModel binding.\n * \n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n  selector:\n      'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n  providers: [CHECKBOX_REQUIRED_VALIDATOR],\n  host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class CheckboxRequiredValidator extends RequiredValidator {\n  /**\n   * @description\n   * Method that validates whether or not the checkbox has been checked.\n   * Returns the validation result if enabled, otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.required ? Validators.requiredTrue(control) : null;\n  }\n}\n\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const EMAIL_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => EmailValidator),\n  multi: true\n};\n\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel binding.\n * \n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n  selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n  providers: [EMAIL_VALIDATOR]\n})\nexport class EmailValidator implements Validator {\n  // TODO(issue/24571): remove '!'.\n  private _enabled !: boolean;\n  // TODO(issue/24571): remove '!'.\n  private _onChange !: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the email attribute bound to this directive.\n   */\n  @Input()\n  set email(value: boolean|string) {\n    this._enabled = value === '' || value === true || value === 'true';\n    if (this._onChange) this._onChange();\n  }\n\n  /**\n   * @description\n   * Method that validates whether an email address is valid.\n   * Returns the validation result if enabled, otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this._enabled ? Validators.email(control) : null;\n  }\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n}\n\n/**\n * @description\n * A function that receives a control and synchronously returns a map of\n * validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface ValidatorFn { (control: AbstractControl): ValidationErrors|null; }\n\n/**\n * @description\n * A function that receives a control and returns a Promise or observable\n * that emits validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface AsyncValidatorFn {\n  (control: AbstractControl): Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MIN_LENGTH_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => MinLengthValidator),\n  multi: true\n};\n\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` mult-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n  providers: [MIN_LENGTH_VALIDATOR],\n  host: {'[attr.minlength]': 'minlength ? minlength : null'}\n})\nexport class MinLengthValidator implements Validator,\n    OnChanges {\n  // TODO(issue/24571): remove '!'.\n  private _validator !: ValidatorFn;\n  // TODO(issue/24571): remove '!'.\n  private _onChange !: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the the minimum length bound to this directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() minlength !: string;\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs change. For internal use\n   * only.\n   *\n   * @param changes A object of key/value pairs for the set of changed inputs.\n   */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('minlength' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * @description\n   * Method that validates whether the value meets a minimum length\n   * requirement. Returns the validation result if enabled, otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.minlength == null ? null : this._validator(control);\n  }\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n  private _createValidator(): void {\n    this._validator = Validators.minLength(parseInt(this.minlength, 10));\n  }\n}\n\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MAX_LENGTH_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => MaxLengthValidator),\n  multi: true\n};\n\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n  providers: [MAX_LENGTH_VALIDATOR],\n  host: {'[attr.maxlength]': 'maxlength ? maxlength : null'}\n})\nexport class MaxLengthValidator implements Validator,\n    OnChanges {\n  // TODO(issue/24571): remove '!'.\n  private _validator !: ValidatorFn;\n  // TODO(issue/24571): remove '!'.\n  private _onChange !: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the the maximum length bound to this directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() maxlength !: string;\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs change. For internal use\n   * only.\n   *\n   * @param changes A object of key/value pairs for the set of changed inputs.\n   */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('maxlength' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * @description\n   * Method that validates whether the value exceeds\n   * the maximum length requirement.\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.maxlength != null ? this._validator(control) : null;\n  }\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n  private _createValidator(): void {\n    this._validator = Validators.maxLength(parseInt(this.maxlength, 10));\n  }\n}\n\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const PATTERN_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => PatternValidator),\n  multi: true\n};\n\n\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n * \n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n  providers: [PATTERN_VALIDATOR],\n  host: {'[attr.pattern]': 'pattern ? pattern : null'}\n})\nexport class PatternValidator implements Validator,\n    OnChanges {\n  // TODO(issue/24571): remove '!'.\n  private _validator !: ValidatorFn;\n  // TODO(issue/24571): remove '!'.\n  private _onChange !: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the pattern bound to this directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() pattern !: string | RegExp;\n\n  /**\n   * @description\n   * A lifecycle method called when the directive's inputs change. For internal use\n   * only.\n   *\n   * @param changes A object of key/value pairs for the set of changed inputs.\n   */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('pattern' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * @description\n   * Method that validates whether the value matches the\n   * the pattern requirement.\n   */\n  validate(control: AbstractControl): ValidationErrors|null { return this._validator(control); }\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n  private _createValidator(): void { this._validator = Validators.pattern(this.pattern); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule, Type} from '@angular/core';\n\nimport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nimport {DefaultValueAccessor} from './directives/default_value_accessor';\nimport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nimport {NgForm} from './directives/ng_form';\nimport {NgFormSelectorWarning} from './directives/ng_form_selector_warning';\nimport {NgModel} from './directives/ng_model';\nimport {NgModelGroup} from './directives/ng_model_group';\nimport {NgNoValidate} from './directives/ng_no_validate_directive';\nimport {NumberValueAccessor} from './directives/number_value_accessor';\nimport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nimport {RangeValueAccessor} from './directives/range_value_accessor';\nimport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nimport {FormControlName} from './directives/reactive_directives/form_control_name';\nimport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nimport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nimport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nimport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nimport {CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator} from './directives/validators';\n\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlValueAccessor} from './directives/control_value_accessor';\nexport {DefaultValueAccessor} from './directives/default_value_accessor';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NG_FORM_SELECTOR_WARNING, NgFormSelectorWarning} from './directives/ng_form_selector_warning';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective, NG_MODEL_WITH_FORM_CONTROL_WARNING} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\n\nexport const SHARED_FORM_DIRECTIVES: Type<any>[] = [\n  NgNoValidate,\n  NgSelectOption,\n  NgSelectMultipleOption,\n  DefaultValueAccessor,\n  NumberValueAccessor,\n  RangeValueAccessor,\n  CheckboxControlValueAccessor,\n  SelectControlValueAccessor,\n  SelectMultipleControlValueAccessor,\n  RadioControlValueAccessor,\n  NgControlStatus,\n  NgControlStatusGroup,\n  RequiredValidator,\n  MinLengthValidator,\n  MaxLengthValidator,\n  PatternValidator,\n  CheckboxRequiredValidator,\n  EmailValidator,\n];\n\nexport const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[] =\n    [NgModel, NgModelGroup, NgForm, NgFormSelectorWarning];\n\nexport const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] =\n    [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\n@NgModule({\n  declarations: SHARED_FORM_DIRECTIVES,\n  exports: SHARED_FORM_DIRECTIVES,\n})\nexport class ÉµInternalFormsSharedModule {\n}\n\nexport {ÉµInternalFormsSharedModule as InternalFormsSharedModule};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from './directives/validators';\nimport {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup, FormHooks} from './model';\n\nfunction isAbstractControlOptions(options: AbstractControlOptions | {[key: string]: any}):\n    options is AbstractControlOptions {\n  return (<AbstractControlOptions>options).asyncValidators !== undefined ||\n      (<AbstractControlOptions>options).validators !== undefined ||\n      (<AbstractControlOptions>options).updateOn !== undefined;\n}\n\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\n@Injectable()\nexport class FormBuilder {\n  /**\n   * @description\n   * Construct a new `FormGroup` instance.\n   *\n   * @param controlsConfig A collection of child controls. The key for each child is the name\n   * under which it is registered.\n   *\n   * @param options Configuration options object for the `FormGroup`. The object can\n   * have two shapes:\n   *\n   * 1) `AbstractControlOptions` object (preferred), which consists of:\n   * * `validators`: A synchronous validator function, or an array of validator functions\n   * * `asyncValidators`: A single async validator or array of async validator functions\n   * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' |\n   * submit')\n   *\n   * 2) Legacy configuration object, which consists of:\n   * * `validator`: A synchronous validator function, or an array of validator functions\n   * * `asyncValidator`: A single async validator or array of async validator functions\n   *\n   */\n  group(\n      controlsConfig: {[key: string]: any},\n      options: AbstractControlOptions|{[key: string]: any}|null = null): FormGroup {\n    const controls = this._reduceControls(controlsConfig);\n\n    let validators: ValidatorFn|ValidatorFn[]|null = null;\n    let asyncValidators: AsyncValidatorFn|AsyncValidatorFn[]|null = null;\n    let updateOn: FormHooks|undefined = undefined;\n\n    if (options != null) {\n      if (isAbstractControlOptions(options)) {\n        // `options` are `AbstractControlOptions`\n        validators = options.validators != null ? options.validators : null;\n        asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;\n        updateOn = options.updateOn != null ? options.updateOn : undefined;\n      } else {\n        // `options` are legacy form group options\n        validators = options['validator'] != null ? options['validator'] : null;\n        asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;\n      }\n    }\n\n    return new FormGroup(controls, {asyncValidators, updateOn, validators});\n  }\n\n  /**\n   * @description\n   * Construct a new `FormControl` with the given state, validators and options.\n   *\n   * @param formState Initializes the control with an initial state value, or\n   * with an object that contains both a value and a disabled status.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains\n   * validation functions and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator\n   * functions.\n   *\n   * @usageNotes\n   *\n   * ### Initialize a control as disabled\n   *\n   * The following example returns a control with an initial value in a disabled state.\n   *\n   * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n   * </code-example>\n   */\n  control(\n      formState: any, validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormControl {\n    return new FormControl(formState, validatorOrOpts, asyncValidator);\n  }\n\n  /**\n   * Constructs a new `FormArray` from the given array of configurations,\n   * validators and options.\n   *\n   * @param controlsConfig An array of child controls or control configs. Each\n   * child control is given an index when it is registered.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains\n   * validation functions and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator\n   * functions.\n   */\n  array(\n      controlsConfig: any[],\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormArray {\n    const controls = controlsConfig.map(c => this._createControl(c));\n    return new FormArray(controls, validatorOrOpts, asyncValidator);\n  }\n\n  /** @internal */\n  _reduceControls(controlsConfig: {[k: string]: any}): {[key: string]: AbstractControl} {\n    const controls: {[key: string]: AbstractControl} = {};\n    Object.keys(controlsConfig).forEach(controlName => {\n      controls[controlName] = this._createControl(controlsConfig[controlName]);\n    });\n    return controls;\n  }\n\n  /** @internal */\n  _createControl(controlConfig: any): AbstractControl {\n    if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n        controlConfig instanceof FormArray) {\n      return controlConfig;\n\n    } else if (Array.isArray(controlConfig)) {\n      const value = controlConfig[0];\n      const validator: ValidatorFn = controlConfig.length > 1 ? controlConfig[1] : null;\n      const asyncValidator: AsyncValidatorFn = controlConfig.length > 2 ? controlConfig[2] : null;\n      return this.control(value, validator, asyncValidator);\n\n    } else {\n      return this.control(controlConfig);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {InternalFormsSharedModule, NG_FORM_SELECTOR_WARNING, NG_MODEL_WITH_FORM_CONTROL_WARNING, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';\nimport {RadioControlRegistry} from './directives/radio_control_value_accessor';\nimport {FormBuilder} from './form_builder';\n\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Guide](/guide/forms)\n *\n * @publicApi\n */\n@NgModule({\n  declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n  providers: [RadioControlRegistry],\n  exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n})\nexport class FormsModule {\n  /**\n   * @description\n   * Provides options for configuring the template-driven forms module.\n   *\n   * @param opts An object of configuration options\n   * * `warnOnDeprecatedNgFormSelector` Configures when to emit a warning when the deprecated\n   * `ngForm` selector is used.\n   */\n  static withConfig(opts: {\n    /** @deprecated as of v6 */ warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always',\n  }): ModuleWithProviders<FormsModule> {\n    return {\n      ngModule: FormsModule,\n      providers:\n          [{provide: NG_FORM_SELECTOR_WARNING, useValue: opts.warnOnDeprecatedNgFormSelector}]\n    };\n  }\n}\n\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n * @see [Forms](guide/reactive-forms)\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\n@NgModule({\n  declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n  providers: [FormBuilder, RadioControlRegistry],\n  exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n})\nexport class ReactiveFormsModule {\n  /**\n   * @description\n   * Provides options for configuring the reactive forms module.\n   *\n   * @param opts An object of configuration options\n   * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n   * binding is used with reactive form directives.\n   */\n  static withConfig(opts: {\n    /** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never' | 'once' | 'always'\n  }): ModuleWithProviders<ReactiveFormsModule> {\n    return {\n      ngModule: ReactiveFormsModule,\n      providers: [{\n        provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n        useValue: opts.warnOnNgModelWithFormControl\n      }]\n    };\n  }\n}\n","import {forwardRef, Inject, Injectable} from \"@angular/core\";\nimport {\n  CanActivate,\n  ActivatedRouteSnapshot,\n  RouterStateSnapshot,\n  Router\n} from \"@angular/router\";\nimport { Observable } from \"rxjs/Observable\";\nimport { JwtHelperService } from \"@auth0/angular-jwt\";\nimport { CmAuthService } from \"../cm-auth.service\";\n\n@Injectable()\nexport class CmGuardService implements CanActivate {\n  jwtHelper: JwtHelperService = new JwtHelperService();\n\n  public static delimiter: string = \"::\";\n\n  constructor(public router: Router,\n              @Inject(forwardRef(() => CmAuthService)) private authService: CmAuthService) {}\n\n  canActivate(\n    route: ActivatedRouteSnapshot,\n    state: RouterStateSnapshot\n  ): Observable<boolean> | boolean {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n    if (token !== null && token.access_token) {\n      if (this.jwtHelper.isTokenExpired(token.access_token)) {\n        //if access token is expired, try to refresh it with refresh token\n        if (token.refresh_token) {\n          this.authService.refreshToken(token.refresh_token, state.url);\n          return false;\n        }\n\n        //we can't refresh so go to login page\n        this.router.navigate([\"/login\"]);\n        return false;\n      }\n      return true;\n    }\n\n    //if no return then we don't have valid token, so redirect to login page\n    this.router.navigate([\"/login\"]);\n\n    return false;\n  }\n\n  public isUserTokenAlive() {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n    if (token !== null && token.access_token) {\n      if (this.jwtHelper.isTokenExpired(token.access_token)) {\n        //if access token is expired, try to refresh it with refresh token\n        if (token.refresh_token) {\n          this.authService.refreshToken(token.refresh_token, null);\n          return false;\n        }\n\n        //we can't refresh so go to login page\n        this.router.navigate([\"/login\"]);\n        return false;\n      }\n      return true;\n    }\n\n    //if no return then we don't have valid token, so redirect to login page\n    this.router.navigate([\"/login\"]);\n\n    return false;\n  }\n\n  public static isUserInRole(role: string): boolean {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n\n    if (token && token.access_token) {\n      let jwtHelper: JwtHelperService = new JwtHelperService();\n      let decodedToken = jwtHelper.decodeToken(token.access_token);\n\n      if (decodedToken.authorities) {\n        return decodedToken.authorities.some(roleItem => roleItem === role);\n      }\n    }\n\n    return false;\n  }\n\n  public static isOrganizationAdmin(): boolean {\n    return this.isUserInRole(ORGANIZATION_ADMIN_ROLE);\n  }\n\n  public static isStationManager(): boolean {\n    return this.isUserInRole(STATION_MANAGEMENT_ROLE);\n  }\n\n  public static getUserName(): string {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n\n    if (token && token.access_token) {\n      let jwtHelper: JwtHelperService = new JwtHelperService();\n      let decodedToken = jwtHelper.decodeToken(token.access_token);\n\n      if (decodedToken.user_name) {\n        return decodedToken.user_name;\n      }\n    }\n\n    return \"anonymous\";\n  }\n\n  public static getUserOrganizationFromToken() {\n    let decodedToken = this.getDecodedToken();\n    if (decodedToken && decodedToken.org) {\n      return decodedToken.org;\n    }\n    return null;\n  }\n\n  public static getStationList(): Array<string> {\n    let result = [\"Organization\"];\n    let roles = this.getAuthorities();\n    for (let role of roles) {\n      if (role.indexOf(this.delimiter) > 0) {\n        let station = role.split(this.delimiter)[0];\n        if (result.indexOf(station) < 0) {\n          result.push(station);\n        }\n      }\n    }\n    return result;\n  }\n\n  public static getTokenParam(param: string) {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n\n    if (token) {\n      return token[param];\n    } else {\n      return null;\n    }\n  }\n\n  private static getAuthorities(): Array<string> {\n    let result = [];\n\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n    if (token && token.access_token) {\n      let jwtHelper: JwtHelperService = new JwtHelperService();\n      let decodedToken = jwtHelper.decodeToken(token.access_token);\n\n      if (decodedToken.authorities) {\n        return decodedToken.authorities;\n      }\n    }\n\n    return result;\n  }\n\n  private static getDecodedToken(): any {\n    let token = JSON.parse(localStorage.getItem(\"authToken\"));\n    if (token && token.access_token) {\n      let jwtHelper: JwtHelperService = new JwtHelperService();\n      return jwtHelper.decodeToken(token.access_token);\n    }\n    return null;\n  }\n}\n\nexport const ORGANIZATION_ADMIN_ROLE = 'ORGANIZATION_ADMIN_ROLE';\nexport const STATION_MANAGEMENT_ROLE = 'STATION_MANAGEMENT_ROLE';\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n    return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n    return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map\n","/**\n * Get CSS computed property of the given element\n */\nexport function getStyleComputedProperty(element: HTMLElement, property?: string): any {\n  if (element.nodeType !== 1) {\n    return [];\n  }\n  // NOTE: 1 DOM access here\n  const window = element.ownerDocument.defaultView;\n  const css = window.getComputedStyle(element, null);\n\n  return property ? css[property as any] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n */\nexport function getParentNode(element: any): any {\n  if (element.nodeName === 'HTML') {\n    return element;\n  }\n\n  return element.parentNode || element.host;\n}\n","/**\n * Returns the scrolling parent of the given element\n */\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { getParentNode } from './getParentNode';\n\nexport function getScrollParent(element: any): any {\n  // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n  if (!element) {\n    return document.body;\n  }\n\n  switch (element.nodeName) {\n    case 'HTML':\n    case 'BODY':\n      return element.ownerDocument.body;\n    case '#document':\n      return element.body;\n    default:\n  }\n\n  // Firefox want us to check `-x` and `-y` variations as well\n  const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n  if (/(auto|scroll|overlay)/.test(String(overflow) + String(overflowY) + String(overflowX))) {\n    return element;\n  }\n\n  return getScrollParent(getParentNode(element));\n}\n","export const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Determines if the browser is Internet Explorer\n */\nimport { isBrowser } from './isBrowser';\n\nconst isIE11 = isBrowser && !!((window as any).MSInputMethodContext && (document as any).documentMode);\nconst isIE10 = isBrowser && !!((window as any).MSInputMethodContext && /MSIE 10/.test((navigator as any).userAgent));\n\nexport function isIE(version?: number) {\n  if (version === 11) {\n    return isIE11;\n  }\n  if (version === 10) {\n    return isIE10;\n  }\n\n  return isIE11 || isIE10;\n}\n","/**\n * Returns the offset parent of the given element\n */\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { isIE } from './isIE';\n\nexport function getOffsetParent(element: any): any {\n  if (!element) {\n    return document.documentElement;\n  }\n\n  const noOffsetParent = isIE(10) ? document.body : null;\n\n  // NOTE: 1 DOM access here\n  let offsetParent = element.offsetParent || null;\n  // Skip hidden elements which don't have an offsetParent\n\n  let sibling: any;\n\n  while (offsetParent === noOffsetParent && element.nextElementSibling && element.nodeName !== 'BODY') {\n    sibling = element.nextElementSibling;\n    offsetParent = sibling.offsetParent;\n  }\n\n  const nodeName = offsetParent && offsetParent.nodeName;\n\n  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n    return sibling ? sibling.ownerDocument.documentElement : document.documentElement;\n  }\n\n  // .offsetParent will return the closest TH, TD or TABLE in case\n  // no offsetParent is present, I hate this job...\n  if (\n    ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n    getStyleComputedProperty(offsetParent, 'position') === 'static'\n  ) {\n    return getOffsetParent(offsetParent);\n  }\n\n  return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n */\nexport function getRoot(node: Node): any {\n  if (node.parentNode !== null) {\n    return getRoot(node.parentNode);\n  }\n\n  return node;\n}\n","/**\n * Finds the offset parent common to the two provided nodes\n */\nimport { isOffsetContainer } from './isOffsetContainer';\nimport { getRoot } from './getRoot';\nimport { getOffsetParent } from './getOffsetParent';\n\nexport function findCommonOffsetParent(element1: HTMLElement, element2: HTMLElement): any {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n    return document.documentElement;\n  }\n\n  // Here we make sure to give as \"start\" the element that comes first in the DOM\n  /* tslint:disable-next-line: no-bitwise */\n  const order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n\n  const start = order ? element1 : element2;\n  const end = order ? element2 : element1;\n\n  // Get common ancestor container\n  const range = document.createRange();\n  range.setStart(start, 0);\n  range.setEnd(end, 0);\n  const { commonAncestorContainer } = range;\n\n  // Both nodes are inside #document\n  if (\n    (element1 !== commonAncestorContainer &&\n      element2 !== commonAncestorContainer) ||\n    start.contains(end)\n  ) {\n    if (isOffsetContainer(commonAncestorContainer)) {\n      return commonAncestorContainer;\n    }\n\n    return getOffsetParent(commonAncestorContainer);\n  }\n\n  // one of the nodes is inside shadowDOM, find which one\n  const element1root = getRoot(element1);\n  if (element1root.host) {\n    return findCommonOffsetParent(element1root.host, element2);\n  } else {\n    return findCommonOffsetParent(element1, getRoot(element2).host);\n  }\n}\n","import { getOffsetParent } from './getOffsetParent';\n\nexport function isOffsetContainer(element: any) {\n  const { nodeName } = element;\n  if (nodeName === 'BODY') {\n    return false;\n  }\n\n  return (\n    nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n  );\n}\n","/**\n * Helper to detect borders of a given element\n */\n\nexport function getBordersSize(styles: CSSStyleDeclaration, axis: string) {\n  const sideA = axis === 'x' ? 'Left' : 'Top';\n  const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n  return (\n    parseFloat(styles[`border${sideA}Width` as any]) +\n    parseFloat(styles[`border${sideB}Width` as any])\n  );\n}\n","import { isIE } from './isIE';\n\nfunction getSize(axis: string, body: HTMLElement, html: HTMLElement, computedStyle: CSSStyleDeclaration) {\n  return Math.max(\n    (body as any)[`offset${axis}`],\n    (body as any)[`scroll${axis}`],\n    (html as any)[`client${axis}`],\n    (html as any)[`offset${axis}`],\n    (html as any)[`scroll${axis}`],\n    isIE(10)\n      ? (parseInt((html as any)[`offset${axis}`], 10) +\n      parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}` as any], 10) +\n      parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}` as any], 10))\n    : 0\n  );\n}\n\nexport function getWindowSizes(document: Document) {\n  const body = document.body;\n  const html = document.documentElement;\n  const computedStyle = isIE(10) && getComputedStyle(html);\n\n  return {\n    height: getSize('Height', body, html, computedStyle),\n    width: getSize('Width', body, html, computedStyle)\n  };\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n */\nexport function getScroll(element: HTMLElement, side = 'top') {\n  const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n  const nodeName = element.nodeName;\n\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    const html = element.ownerDocument.documentElement;\n    const scrollingElement = element.ownerDocument.scrollingElement || html;\n\n    return scrollingElement[upperSide];\n  }\n\n  return element[upperSide];\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n */\nimport { Offsets } from '../models';\n\nexport function getClientRect(offsets: Offsets): Offsets {\n  return {\n    ...offsets,\n    right: offsets.left + offsets.width,\n    bottom: offsets.top + offsets.height\n  };\n}\n","/**\n * Get bounding client rect of given element\n */\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { getBordersSize } from './getBordersSize';\nimport { getWindowSizes } from './getWindowSizes';\nimport { getScroll } from './getScroll';\nimport { getClientRect } from './getClientRect';\nimport { isIE } from './isIE';\nimport { Offsets } from '../models';\n\nexport function getBoundingClientRect(element: HTMLElement): Offsets {\n  let rect: any = {};\n\n  // IE10 10 FIX: Please, don't ask, the element isn't\n  // considered in DOM in some circumstances...\n  // This isn't reproducible in IE10 compatibility mode of IE11\n  try {\n    if (isIE(10)) {\n      rect = element.getBoundingClientRect();\n      const scrollTop = getScroll(element, 'top');\n      const scrollLeft = getScroll(element, 'left');\n      rect.top += scrollTop;\n      rect.left += scrollLeft;\n      rect.bottom += scrollTop;\n      rect.right += scrollLeft;\n    } else {\n      rect = element.getBoundingClientRect();\n    }\n  } catch (e) {\n    return undefined;\n  }\n\n  const result: any = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.right - rect.left,\n    height: rect.bottom - rect.top\n  };\n\n  // subtract scrollbar size from sizes\n  const sizes: any = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n  const width =\n    sizes.width || element.clientWidth || result.right - result.left;\n  const height =\n    sizes.height || element.clientHeight || result.bottom - result.top;\n\n  let horizScrollbar = element.offsetWidth - width;\n  let vertScrollbar = element.offsetHeight - height;\n\n  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n  // we make this check conditional for performance reasons\n  if (horizScrollbar || vertScrollbar) {\n    const styles = getStyleComputedProperty(element);\n    horizScrollbar -= getBordersSize(styles, 'x');\n    vertScrollbar -= getBordersSize(styles, 'y');\n\n    result.width -= horizScrollbar;\n    result.height -= vertScrollbar;\n  }\n\n  return getClientRect(result);\n}\n","import { getBoundingClientRect } from './getBoundingClientRect';\nimport { getClientRect } from './getClientRect';\nimport { getScrollParent } from './getScrollParent';\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { includeScroll } from './includeScroll';\nimport { isIE as runIsIE } from './isIE';\nimport { Offsets } from '../models';\n\nexport function getOffsetRectRelativeToArbitraryNode(\n  children: HTMLElement,\n  parent: HTMLElement,\n  fixedPosition = false\n): Offsets {\n  const isIE10 = runIsIE(10);\n  const isHTML = parent.nodeName === 'HTML';\n  const childrenRect: any = getBoundingClientRect(children);\n  const parentRect: any = getBoundingClientRect(parent);\n  const scrollParent = getScrollParent(children);\n\n  const styles = getStyleComputedProperty(parent);\n  const borderTopWidth = parseFloat(styles.borderTopWidth);\n  const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n  // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n  if (fixedPosition && isHTML) {\n    parentRect.top = Math.max(parentRect.top, 0);\n    parentRect.left = Math.max(parentRect.left, 0);\n  }\n\n  let offsets: Offsets = getClientRect({\n    top: childrenRect.top - parentRect.top - borderTopWidth,\n    left: childrenRect.left - parentRect.left - borderLeftWidth,\n    width: childrenRect.width,\n    height: childrenRect.height\n  });\n\n  offsets.marginTop = 0;\n  offsets.marginLeft = 0;\n\n  // Subtract margins of documentElement in case it's being used as parent\n  // we do this only on HTML because it's the only element that behaves\n  // differently when margins are applied to it. The margins are included in\n  // the box of the documentElement, in the other cases not.\n  if (!isIE10 && isHTML) {\n    const marginTop = parseFloat(styles.marginTop);\n    const marginLeft = parseFloat(styles.marginLeft);\n\n    offsets.top -= borderTopWidth - marginTop;\n    offsets.bottom -= borderTopWidth - marginTop;\n    offsets.left -= borderLeftWidth - marginLeft;\n    offsets.right -= borderLeftWidth - marginLeft;\n\n    // Attach marginTop and marginLeft because in some circumstances we may need them\n    offsets.marginTop = marginTop;\n    offsets.marginLeft = marginLeft;\n  }\n\n  if (\n    isIE10 && !fixedPosition\n      ? parent.contains(scrollParent)\n      : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n  ) {\n    offsets = includeScroll(offsets, parent);\n  }\n\n  return offsets;\n}\n","/**\n * Sum or subtract the element scroll values (left and top) from a given rect object\n */\nimport { getScroll } from './getScroll';\nimport { Offsets } from '../models';\n\nexport function includeScroll(rect: Offsets, element: HTMLElement, subtract = false) {\n  const scrollTop = getScroll(element, 'top');\n  const scrollLeft = getScroll(element, 'left');\n  const modifier = subtract ? -1 : 1;\n  rect.top += scrollTop * modifier;\n  rect.bottom += scrollTop * modifier;\n  rect.left += scrollLeft * modifier;\n  rect.right += scrollLeft * modifier;\n\n  return rect;\n}\n","/**\n * Finds the first parent of an element that has a transformed property defined\n */\n\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { isIE } from './isIE';\n\nexport function getFixedPositionOffsetParent(element: HTMLElement): HTMLElement {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element || !element.parentElement || isIE()) {\n   return document.documentElement;\n  }\n\n  let el = element.parentElement;\n\n  while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n    el = el.parentElement;\n  }\n\n  return el || document.documentElement;\n}\n","/**\n * Computed the boundaries limits and return them\n */\nimport { getScrollParent } from './getScrollParent';\nimport { getParentNode } from './getParentNode';\nimport { findCommonOffsetParent } from './findCommonOffsetParent';\nimport { getOffsetRectRelativeToArbitraryNode } from './getOffsetRectRelativeToArbitraryNode';\nimport { getViewportOffsetRectRelativeToArtbitraryNode } from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport { getWindowSizes } from './getWindowSizes';\nimport { isFixed } from './isFixed';\nimport { getFixedPositionOffsetParent } from './getFixedPositionOffsetParent';\n\nexport function getBoundaries(\n  target: HTMLElement,\n  host: HTMLElement,\n  padding = 0,\n  boundariesElement: string,\n  fixedPosition = false\n) {\n  // NOTE: 1 DOM access here\n\n  let boundaries: any = { top: 0, left: 0 };\n  const offsetParent = fixedPosition ? getFixedPositionOffsetParent(target) : findCommonOffsetParent(target, host);\n\n  // Handle viewport case\n  if (boundariesElement === 'viewport') {\n    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n  } else {\n    // Handle other cases based on DOM element used as boundaries\n    let boundariesNode;\n    if (boundariesElement === 'scrollParent') {\n      boundariesNode = getScrollParent(getParentNode(host));\n      if (boundariesNode.nodeName === 'BODY') {\n        boundariesNode = target.ownerDocument.documentElement;\n      }\n    } else if (boundariesElement === 'window') {\n      boundariesNode = target.ownerDocument.documentElement;\n    } else {\n      boundariesNode = boundariesElement;\n    }\n\n    const offsets = getOffsetRectRelativeToArbitraryNode(\n      boundariesNode,\n      offsetParent,\n      fixedPosition\n    );\n\n    // In case of HTML, we need a different computation\n    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n      const { height, width } = getWindowSizes(target.ownerDocument);\n      boundaries.top += offsets.top - offsets.marginTop;\n      boundaries.bottom = Number(height) + Number(offsets.top);\n      boundaries.left += offsets.left - offsets.marginLeft;\n      boundaries.right = Number(width) + Number(offsets.left);\n    } else {\n      // for all the other DOM elements, this one is good\n      boundaries = offsets;\n    }\n  }\n\n  // Add paddings\n  boundaries.left += padding;\n  boundaries.top += padding;\n  boundaries.right -= padding;\n  boundaries.bottom -= padding;\n\n  return boundaries;\n}\n","import { getClientRect } from './getClientRect';\nimport { getOffsetRectRelativeToArbitraryNode } from './getOffsetRectRelativeToArbitraryNode';\nimport { getScroll } from './getScroll';\nimport { Offsets } from '../models';\n\nexport function getViewportOffsetRectRelativeToArtbitraryNode(element: HTMLElement, excludeScroll = false): Offsets {\n  const html = element.ownerDocument.documentElement;\n  const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n  const width = Math.max(html.clientWidth, window.innerWidth || 0);\n  const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n  const scrollTop = !excludeScroll ? getScroll(html) : 0;\n  const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n  const offset = {\n    top: scrollTop - Number(relativeOffset.top) + Number(relativeOffset.marginTop),\n    left: scrollLeft - Number(relativeOffset.left) + Number(relativeOffset.marginLeft),\n    width,\n    height\n  };\n\n  return getClientRect(offset);\n}\n","/**\n * Check if the given element is fixed or is inside a fixed parent\n */\nimport { getStyleComputedProperty } from './getStyleComputedProperty';\nimport { getParentNode } from './getParentNode';\n\nexport function isFixed(element: HTMLElement): boolean {\n  const nodeName = element.nodeName;\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    return false;\n  }\n  if (getStyleComputedProperty(element, 'position') === 'fixed') {\n    return true;\n  }\n\n  return isFixed(getParentNode(element));\n}\n","/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n */\nimport { getBoundaries } from './getBoundaries';\nimport { Offsets } from '../models';\n\nfunction getArea({ width, height }: { [key: string]: number }) {\n  return width * height;\n}\n\nexport function computeAutoPlacement(\n  placement: string,\n  refRect: Offsets,\n  target: HTMLElement,\n  host: HTMLElement,\n  allowedPositions: any[] = ['top', 'bottom', 'right', 'left'],\n  boundariesElement = 'viewport',\n  padding = 0\n) {\n  if (placement.indexOf('auto') === -1) {\n    return placement;\n  }\n\n  const boundaries = getBoundaries(target, host, padding, boundariesElement);\n\n  const rects: any = {\n    top: {\n      width: boundaries.width,\n      height: refRect.top - boundaries.top\n    },\n    right: {\n      width: boundaries.right - refRect.right,\n      height: boundaries.height\n    },\n    bottom: {\n      width: boundaries.width,\n      height: boundaries.bottom - refRect.bottom\n    },\n    left: {\n      width: refRect.left - boundaries.left,\n      height: boundaries.height\n    }\n  };\n\n  const sortedAreas = Object.keys(rects)\n    .map(key => ({\n      key,\n      ...rects[key],\n      area: getArea(rects[key])\n    }))\n    .sort((a, b) => b.area - a.area);\n\n  let filteredAreas: any[] = sortedAreas.filter(\n    ({ width, height }) => {\n      return width >= target.clientWidth\n        && height >= target.clientHeight;\n    }\n  );\n\n  filteredAreas = filteredAreas.filter((position: any) => {\n    return allowedPositions\n      .some((allowedPosition: string) => {\n        return allowedPosition === position.key;\n      });\n  });\n\n  const computedPlacement: string = filteredAreas.length > 0\n    ? filteredAreas[0].key\n    : sortedAreas[0].key;\n\n  const variation = placement.split(' ')[1];\n\n  // for tooltip on auto position\n  target.className = target.className.replace(/bs-tooltip-auto/g, `bs-tooltip-${computedPlacement}`);\n\n  return computedPlacement + (variation ? `-${variation}` : '');\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n */\nexport function getOuterSizes(element: any) {\n  const window = element.ownerDocument.defaultView;\n  const styles = window.getComputedStyle(element);\n  const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n  const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n\n  return {\n    width: Number(element.offsetWidth) + y,\n    height: Number(element.offsetHeight) + x\n  };\n}\n","/**\n * Get offsets to the reference element\n */\nimport { findCommonOffsetParent } from './findCommonOffsetParent';\nimport { getOffsetRectRelativeToArbitraryNode } from './getOffsetRectRelativeToArbitraryNode';\nimport { getFixedPositionOffsetParent } from './getFixedPositionOffsetParent';\nimport { Offsets } from '../models';\n\nexport function getReferenceOffsets(\n  target: HTMLElement,\n  host: HTMLElement,\n  fixedPosition: boolean = null\n): Offsets {\n  const commonOffsetParent = fixedPosition\n    ? getFixedPositionOffsetParent(target)\n    : findCommonOffsetParent(target, host);\n\n  return getOffsetRectRelativeToArbitraryNode(host, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get offsets to the target\n */\nimport { getOppositePlacement } from './getOppositePlacement';\nimport { getOuterSizes } from './getOuterSizes';\nimport { Offsets } from '../models';\n\nexport function getTargetOffsets(\n  target: HTMLElement,\n  hostOffsets: Offsets,\n  position: string\n): Offsets {\n  const placement = position.split(' ')[0];\n\n  // Get target node sizes\n  const targetRect = getOuterSizes(target);\n\n  // Add position, width and height to our offsets object\n  const targetOffsets = {\n    width: targetRect.width,\n    height: targetRect.height\n  };\n\n  // depending by the target placement we have to compute its offsets slightly differently\n  const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n  const mainSide = isHoriz ? 'top' : 'left';\n  const secondarySide = isHoriz ? 'left' : 'top';\n  const measurement = isHoriz ? 'height' : 'width';\n  const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n  (targetOffsets as any)[mainSide] =\n    hostOffsets[mainSide] +\n    hostOffsets[measurement] / 2 -\n    targetRect[measurement] / 2;\n\n  (targetOffsets as any)[secondarySide] = placement === secondarySide\n    ? hostOffsets[secondarySide] - targetRect[secondaryMeasurement]\n    : (hostOffsets as any)[getOppositePlacement(secondarySide)];\n\n  return targetOffsets;\n}\n","/**\n * Get the opposite placement of the given one\n */\nexport function getOppositePlacement(placement: string) {\n  const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n\n  return placement.replace(/left|right|bottom|top/g, matched => (hash as any)[matched]);\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n */\nexport function isModifierEnabled(options: any, modifierName: string) {\n  return options\n    && options.modifiers\n    && options.modifiers[modifierName]\n    && options.modifiers[modifierName].enabled;\n}\n","/**\n * Set the style to the given popper\n */\nimport { Renderer2 } from '@angular/core';\n\nimport { isNumeric } from './isNumeric';\n\nexport function setStyles(element: HTMLElement, styles: any, renderer?: Renderer2) {\n  Object.keys(styles).forEach((prop: any) => {\n    let unit = '';\n    // add unit if the value is numeric and is one of the following\n    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 &&\n      isNumeric(styles[prop])) {\n      unit = 'px';\n    }\n\n    if (renderer) {\n      renderer.setStyle(element, prop, `${String(styles[prop])}${unit}`);\n\n      return;\n    }\n\n    element.style[prop] = String(styles[prop]) + unit;\n  });\n}\n","/**\n * Tells if a given input is a number\n */\nexport function isNumeric(n: any) {\n  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import { getClientRect, getOuterSizes, getStyleComputedProperty } from '../utils';\nimport { Data } from '../models';\n\nexport function arrow(data: Data) {\n  let targetOffsets = data.offsets.target;\n  // if arrowElement is a string, suppose it's a CSS selector\n  const arrowElement: HTMLElement | null = data.instance.target.querySelector('.arrow');\n\n  // if arrowElement is not found, don't run the modifier\n  if (!arrowElement) {\n    return data;\n  }\n\n  const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n\n  const len = isVertical ? 'height' : 'width';\n  const sideCapitalized = isVertical ? 'Top' : 'Left';\n  const side = sideCapitalized.toLowerCase();\n  const altSide = isVertical ? 'left' : 'top';\n  const opSide = isVertical ? 'bottom' : 'right';\n  const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n  // top/left side\n  if (data.offsets.host[opSide] - arrowElementSize < (targetOffsets as any)[side]) {\n    (targetOffsets as any)[side] -=\n      (targetOffsets as any)[side] - (data.offsets.host[opSide] - arrowElementSize);\n  }\n  // bottom/right side\n  if (Number((data as any).offsets.host[side]) + Number(arrowElementSize) > (targetOffsets as any)[opSide]) {\n    (targetOffsets as any)[side] +=\n      Number((data as any).offsets.host[side]) + Number(arrowElementSize) - Number((targetOffsets as any)[opSide]);\n  }\n  targetOffsets = getClientRect(targetOffsets);\n\n  // compute center of the target\n  const center = Number((data as any).offsets.host[side]) + Number(data.offsets.host[len] / 2 - arrowElementSize / 2);\n\n  // Compute the sideValue using the updated target offsets\n  // take target margin in account because we don't have this info available\n  const css = getStyleComputedProperty(data.instance.target);\n\n  const targetMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n  const targetBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n  let sideValue =\n    center - (targetOffsets as any)[side] - targetMarginSide - targetBorderSide;\n\n  // prevent arrowElement from being placed not contiguously to its target\n  sideValue = Math.max(Math.min(targetOffsets[len] - arrowElementSize, sideValue), 0);\n\n  data.offsets.arrow = {\n    [side]: Math.round(sideValue),\n    [altSide]: '' // make sure to unset any eventual altSide value from the DOM node\n  };\n\n  data.instance.arrow = arrowElement;\n\n  return data;\n}\n","import {\n  computeAutoPlacement,\n  getBoundaries,\n  getClientRect,\n  getOppositeVariation,\n  getTargetOffsets,\n  isModifierEnabled\n} from '../utils';\n\nimport { Data } from '../models';\n\nexport function flip(data: Data): Data {\n  data.offsets.target = getClientRect(data.offsets.target);\n\n  if (!isModifierEnabled(data.options, 'flip')) {\n\n    data.offsets.target = {\n      ...data.offsets.target,\n      ...getTargetOffsets(\n        data.instance.target,\n        data.offsets.host,\n        data.placement\n      )\n    };\n\n    return data;\n  }\n\n  const boundaries = getBoundaries(\n    data.instance.target,\n    data.instance.host,\n    0, // padding\n    'viewport',\n    false // positionFixed\n  );\n\n  let placement = data.placement.split(' ')[0];\n  let variation = data.placement.split(' ')[1] || '';\n\n  const offsetsHost = data.offsets.host;\n  const target = data.instance.target;\n  const host = data.instance.host;\n\n  const adaptivePosition = computeAutoPlacement('auto', offsetsHost, target, host, data.options.allowedPositions);\n  const flipOrder = [placement, adaptivePosition];\n\n  /* tslint:disable-next-line: cyclomatic-complexity */\n  flipOrder.forEach((step, index) => {\n    if (placement !== step || flipOrder.length === index + 1) {\n      return data;\n    }\n\n    placement = data.placement.split(' ')[0];\n\n    // using floor because the host offsets may contain decimals we are not going to consider here\n    const overlapsRef =\n      (placement === 'left' &&\n        Math.floor(data.offsets.target.right) > Math.floor(data.offsets.host.left)) ||\n      (placement === 'right' &&\n        Math.floor(data.offsets.target.left) < Math.floor(data.offsets.host.right)) ||\n      (placement === 'top' &&\n        Math.floor(data.offsets.target.bottom) > Math.floor(data.offsets.host.top)) ||\n      (placement === 'bottom' &&\n        Math.floor(data.offsets.target.top) < Math.floor(data.offsets.host.bottom));\n\n    const overflowsLeft = Math.floor(data.offsets.target.left) < Math.floor(boundaries.left);\n    const overflowsRight = Math.floor(data.offsets.target.right) > Math.floor(boundaries.right);\n    const overflowsTop = Math.floor(data.offsets.target.top) < Math.floor(boundaries.top);\n    const overflowsBottom = Math.floor(data.offsets.target.bottom) > Math.floor(boundaries.bottom);\n\n    const overflowsBoundaries =\n      (placement === 'left' && overflowsLeft) ||\n      (placement === 'right' && overflowsRight) ||\n      (placement === 'top' && overflowsTop) ||\n      (placement === 'bottom' && overflowsBottom);\n\n    // flip the variation if required\n    const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n    const flippedVariation =\n      ((isVertical && variation === 'left' && overflowsLeft) ||\n        (isVertical && variation === 'right' && overflowsRight) ||\n        (!isVertical && variation === 'left' && overflowsTop) ||\n        (!isVertical && variation === 'right' && overflowsBottom));\n\n    if (overlapsRef || overflowsBoundaries || flippedVariation) {\n      if (overlapsRef || overflowsBoundaries) {\n        placement = flipOrder[index + 1];\n      }\n\n      if (flippedVariation) {\n        variation = getOppositeVariation(variation);\n      }\n\n      data.placement = placement + (variation ? ` ${variation}` : '');\n\n      data.offsets.target = {\n        ...data.offsets.target,\n        ...getTargetOffsets(\n          data.instance.target,\n          data.offsets.host,\n          data.placement\n        )\n      };\n    }\n  });\n\n  return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n */\nexport function getOppositeVariation(variation: string) {\n  if (variation === 'right') {\n    return 'left';\n  } else if (variation === 'left') {\n    return 'right';\n  }\n\n  return variation;\n}\n","import { getBoundaries, isModifierEnabled } from '../utils';\nimport { Data } from '../models';\n\nexport function preventOverflow(data: Data) {\n\n  if (!isModifierEnabled(data.options, 'preventOverflow')) {\n    return data;\n  }\n\n  // NOTE: DOM access here\n  // resets the targetOffsets's position so that the document size can be calculated excluding\n  // the size of the targetOffsets element itself\n  const transformProp = 'transform';\n  const targetStyles = data.instance.target.style; // assignment to help minification\n  const { top, left, [transformProp]: transform } = targetStyles;\n  targetStyles.top = '';\n  targetStyles.left = '';\n  targetStyles[transformProp] = '';\n\n  const boundaries = getBoundaries(\n    data.instance.target,\n    data.instance.host,\n    0, // padding\n    'scrollParent',\n    false // positionFixed\n  );\n\n  // NOTE: DOM access here\n  // restores the original style properties after the offsets have been computed\n  targetStyles.top = top;\n  targetStyles.left = left;\n  targetStyles[transformProp] = transform;\n\n  const order = ['left', 'right', 'top', 'bottom'];\n\n  const check = {\n    primary(placement: string) {\n      let value = (data as any).offsets.target[placement];\n      if (\n        (data as any).offsets.target[placement] < boundaries[placement] &&\n        !false // options.escapeWithReference\n      ) {\n        value = Math.max((data as any).offsets.target[placement], boundaries[placement]);\n      }\n\n      return { [placement]: value };\n    },\n    secondary(placement: string) {\n      const mainSide = placement === 'right' ? 'left' : 'top';\n      let value = data.offsets.target[mainSide];\n      if (\n        (data as any).offsets.target[placement] > boundaries[placement] &&\n        !false // escapeWithReference\n      ) {\n        value = Math.min(\n          data.offsets.target[mainSide],\n          boundaries[placement] -\n          (placement === 'right' ? data.offsets.target.width : data.offsets.target.height)\n        );\n      }\n\n      return { [mainSide]: value };\n    }\n  };\n\n  let side: string;\n\n  order.forEach(placement => {\n    side = ['left', 'top']\n      .indexOf(placement) !== -1\n      ? 'primary'\n      : 'secondary';\n\n    data.offsets.target = {\n      ...data.offsets.target,\n      ...(check as any)[side](placement)\n    };\n\n  });\n\n  return data;\n}\n","import { Data } from '../models';\n\nexport function shift(data: Data): Data {\n  const placement = data.placement;\n  const basePlacement = placement.split(' ')[0];\n  const shiftvariation = placement.split(' ')[1];\n\n  if (shiftvariation) {\n    const { host, target } = data.offsets;\n    const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n    const side = isVertical ? 'left' : 'top';\n    const measurement = isVertical ? 'width' : 'height';\n\n    const shiftOffsets = {\n      start: { [side]: host[side] },\n      end: {\n        [side]: host[side] + host[measurement] - target[measurement]\n      }\n    };\n\n    data.offsets.target = { ...target, ...(shiftOffsets as any)[shiftvariation] };\n  }\n\n  return data;\n}\n","/**\n * @copyright Valor Software\n * @copyright Federico Zivolo and contributors\n */\nimport { Renderer2 } from '@angular/core';\n\nimport { getOffsets, getReferenceOffsets, updateContainerClass, setStyles } from './utils';\n\nimport { arrow, flip, preventOverflow, shift, initData } from './modifiers';\nimport { Data, Offsets, Options } from './models';\n\n\nexport class Positioning {\n  position(hostElement: HTMLElement, targetElement: HTMLElement, round = true): Offsets {\n    return this.offset(hostElement, targetElement, false);\n  }\n\n  offset(hostElement: HTMLElement, targetElement: HTMLElement, round = true): Offsets {\n    return getReferenceOffsets(targetElement, hostElement);\n  }\n\n  positionElements(\n    hostElement: HTMLElement,\n    targetElement: HTMLElement,\n    position: string,\n    appendToBody?: boolean,\n    options?: Options\n  ): Data {\n    const chainOfModifiers = [flip, shift, preventOverflow, arrow];\n\n    return chainOfModifiers.reduce(\n      (modifiedData, modifier) => modifier(modifiedData),\n      initData(targetElement, hostElement, position, options)\n    );\n  }\n}\n\nconst positionService = new Positioning();\n\nexport function positionElements(\n  hostElement: HTMLElement,\n  targetElement: HTMLElement,\n  placement: string,\n  appendToBody?: boolean,\n  options?: Options,\n  renderer?: Renderer2\n): void {\n\n  const data = positionService.positionElements(\n    hostElement,\n    targetElement,\n    placement,\n    appendToBody,\n    options\n  );\n\n  const offsets = getOffsets(data);\n\n  setStyles(targetElement, {\n    'will-change': 'transform',\n    top: '0px',\n    left: '0px',\n    transform: `translate3d(${offsets.left}px, ${offsets.top}px, 0px)`\n  }, renderer);\n\n  if (data.instance.arrow) {\n    setStyles(data.instance.arrow, data.offsets.arrow, renderer);\n  }\n\n  updateContainerClass(data, renderer);\n}\n","import {\n  computeAutoPlacement,\n  getReferenceOffsets,\n  getTargetOffsets\n} from '../utils';\n\nimport { Data, Options } from '../models';\n\nexport function initData(\n  targetElement: HTMLElement, hostElement: HTMLElement, position: string, options: Options\n): Data {\n\n  const hostElPosition = getReferenceOffsets(targetElement, hostElement);\n\n  if (!position.match(/^(auto)*\\s*(left|right|top|bottom)*$/)\n    && !position.match(/^(left|right|top|bottom)*\\s*(start|end)*$/)) {\n      /* tslint:disable-next-line: no-parameter-reassignment */\n      position = 'auto';\n    }\n\n  const placementAuto = !!position.match(/auto/g);\n\n  // support old placements 'auto left|right|top|bottom'\n  let placement = position.match(/auto\\s(left|right|top|bottom)/)\n    ? position.split(' ')[1] || 'auto'\n    : position;\n\n  const targetOffset = getTargetOffsets(targetElement, hostElPosition, placement);\n\n  placement = computeAutoPlacement(\n    placement,\n    hostElPosition,\n    targetElement,\n    hostElement,\n    options ? options.allowedPositions : undefined\n  );\n\n  return {\n    options,\n    instance: {\n      target: targetElement,\n      host: hostElement,\n      arrow: null\n    },\n    offsets: {\n      target: targetOffset,\n      host: hostElPosition,\n      arrow: null\n    },\n    positionFixed: false,\n    placement,\n    placementAuto\n  };\n}\n","import { Data, Offsets } from '../models';\n\nexport function getOffsets(data: Data): Offsets {\n  return {\n    width: data.offsets.target.width,\n    height: data.offsets.target.height,\n    left: Math.floor(data.offsets.target.left),\n    top: Math.round(data.offsets.target.top),\n    bottom: Math.round(data.offsets.target.bottom),\n    right: Math.floor(data.offsets.target.right)\n  };\n}\n","/**\n * Update class for the given popper\n */\nimport { Renderer2 } from '@angular/core';\nimport { Data } from '../models';\n\nexport function updateContainerClass(data: Data, renderer?: Renderer2): void {\n  const target = data.instance.target;\n\n  let containerClass = target.className;\n\n  if (data.placementAuto) {\n    containerClass = containerClass.replace(/bs-popover-auto/g, `bs-popover-${data.placement}`);\n    containerClass = containerClass.replace(/bs-tooltip-auto/g, `bs-tooltip-${data.placement}`);\n    containerClass = containerClass.replace(/\\sauto/g, ` ${data.placement}`);\n\n    if (containerClass.indexOf('popover') !== -1 && containerClass.indexOf('popover-auto') === -1) {\n      containerClass += ' popover-auto';\n    }\n\n    if (containerClass.indexOf('tooltip') !== -1  && containerClass.indexOf('tooltip-auto') === -1) {\n      containerClass += ' tooltip-auto';\n    }\n  }\n\n  containerClass = containerClass.replace(/left|right|top|bottom/g, `${data.placement.split(' ')[0]}`);\n\n  if (renderer) {\n    renderer.setAttribute(target, 'class', containerClass);\n\n    return;\n  }\n\n  target.className = containerClass;\n}\n","import { Injectable, ElementRef, RendererFactory2, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { positionElements } from './ng-positioning';\n\nimport { fromEvent, merge, of, animationFrameScheduler, Subject } from 'rxjs';\nimport { Options } from './models';\n\n\nexport interface PositioningOptions {\n  /** The DOM element, ElementRef, or a selector string of an element which will be moved */\n  element?: HTMLElement | ElementRef | string;\n\n  /** The DOM element, ElementRef, or a selector string of an element which the element will be attached to  */\n  target?: HTMLElement | ElementRef | string;\n\n  /**\n   * A string of the form 'vert-attachment horiz-attachment' or 'placement'\n   * - placement can be \"top\", \"bottom\", \"left\", \"right\"\n   * not yet supported:\n   * - vert-attachment can be any of 'top', 'middle', 'bottom'\n   * - horiz-attachment can be any of 'left', 'center', 'right'\n   */\n  attachment?: string;\n\n  /** A string similar to `attachment`. The one difference is that, if it's not provided,\n   * `targetAttachment` will assume the mirror image of `attachment`.\n   */\n  targetAttachment?: string;\n\n  /** A string of the form 'vert-offset horiz-offset'\n   * - vert-offset and horiz-offset can be of the form \"20px\" or \"55%\"\n   */\n  offset?: string;\n\n  /** A string similar to `offset`, but referring to the offset of the target */\n  targetOffset?: string;\n\n  /** If true component will be attached to body */\n  appendToBody?: boolean;\n}\n\n\n@Injectable()\nexport class PositioningService {\n  options: Options;\n  private update$$ = new Subject<null>();\n  private positionElements = new Map();\n\n  constructor(\n    rendererFactory: RendererFactory2,\n    @Inject(PLATFORM_ID) platformId: number\n  ) {\n    if (isPlatformBrowser(platformId)) {\n      merge(\n        fromEvent(window, 'scroll'),\n        fromEvent(window, 'resize'),\n        of(0, animationFrameScheduler),\n        this.update$$\n      )\n        .subscribe(() => {\n          this.positionElements\n            .forEach((positionElement: PositioningOptions) => {\n              positionElements(\n                _getHtmlElement(positionElement.target),\n                _getHtmlElement(positionElement.element),\n                positionElement.attachment,\n                positionElement.appendToBody,\n                this.options,\n                rendererFactory.createRenderer(null, null)\n              );\n            });\n        });\n    }\n  }\n\n  position(options: PositioningOptions): void {\n    this.addPositionElement(options);\n  }\n\n  addPositionElement(options: PositioningOptions): void {\n    this.positionElements.set(_getHtmlElement(options.element), options);\n  }\n\n  calcPosition(): void {\n    this.update$$.next();\n  }\n\n  deletePositionElement(elRef: ElementRef): void {\n    this.positionElements.delete(_getHtmlElement(elRef));\n  }\n\n  setOptions(options: Options) {\n    this.options = options;\n  }\n}\n\nfunction _getHtmlElement(element: HTMLElement | ElementRef | string): HTMLElement {\n  // it means that we got a selector\n  if (typeof element === 'string') {\n    return document.querySelector(element);\n  }\n\n  if (element instanceof ElementRef) {\n    return element.nativeElement;\n  }\n\n  return element;\n}\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function isScheduler(value) {\n    return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_map,_observable_from,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeMap(project, resultSelector, concurrent) {\n    if (concurrent === void 0) {\n        concurrent = Number.POSITIVE_INFINITY;\n    }\n    if (typeof resultSelector === 'function') {\n        return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n    }\n    else if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nvar MergeMapOperator = /*@__PURE__*/ (function () {\n    function MergeMapOperator(project, concurrent) {\n        if (concurrent === void 0) {\n            concurrent = Number.POSITIVE_INFINITY;\n        }\n        this.project = project;\n        this.concurrent = concurrent;\n    }\n    MergeMapOperator.prototype.call = function (observer, source) {\n        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n    };\n    return MergeMapOperator;\n}());\nexport { MergeMapOperator };\nvar MergeMapSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(MergeMapSubscriber, _super);\n    function MergeMapSubscriber(destination, project, concurrent) {\n        if (concurrent === void 0) {\n            concurrent = Number.POSITIVE_INFINITY;\n        }\n        var _this = _super.call(this, destination) || this;\n        _this.project = project;\n        _this.concurrent = concurrent;\n        _this.hasCompleted = false;\n        _this.buffer = [];\n        _this.active = 0;\n        _this.index = 0;\n        return _this;\n    }\n    MergeMapSubscriber.prototype._next = function (value) {\n        if (this.active < this.concurrent) {\n            this._tryNext(value);\n        }\n        else {\n            this.buffer.push(value);\n        }\n    };\n    MergeMapSubscriber.prototype._tryNext = function (value) {\n        var result;\n        var index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.active++;\n        this._innerSub(result);\n    };\n    MergeMapSubscriber.prototype._innerSub = function (ish) {\n        var innerSubscriber = new SimpleInnerSubscriber(this);\n        var destination = this.destination;\n        destination.add(innerSubscriber);\n        var innerSubscription = innerSubscribe(ish, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    };\n    MergeMapSubscriber.prototype._complete = function () {\n        this.hasCompleted = true;\n        if (this.active === 0 && this.buffer.length === 0) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    };\n    MergeMapSubscriber.prototype.notifyNext = function (innerValue) {\n        this.destination.next(innerValue);\n    };\n    MergeMapSubscriber.prototype.notifyComplete = function () {\n        var buffer = this.buffer;\n        this.active--;\n        if (buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        else if (this.active === 0 && this.hasCompleted) {\n            this.destination.complete();\n        }\n    };\n    return MergeMapSubscriber;\n}(SimpleOuterSubscriber));\nexport { MergeMapSubscriber };\nexport var flatMap = mergeMap;\n//# sourceMappingURL=mergeMap.js.map\n","import { DEFAULT_LANGUAGE } from \"./../app.component\";\nimport { Injectable } from \"@angular/core\";\nimport \"rxjs/add/operator/map\";\nimport { LANGUAGES } from \"./mock/language.mock\";\nimport { CmHttpClient } from \"./http_client\";\nimport {HttpHeaders, HttpHeaderResponse} from \"@angular/common/http\";\nimport {Observable} from \"rxjs/Observable\";\nimport {ReportExtractParam} from \"../shared/reportExtractParam\";\nimport {CmArchivedReport} from \"../components/cm-report/cm-archived-report.model\";\nimport {timeout} from \"rxjs/operators\";\n\n@Injectable()\nexport class DataService {\n  constructor(private http: CmHttpClient) {}\n\n  station: string;\n\n  private damageCategoriesUrl =  '/bikes-sql/api/v1/damage-categories';\n  private reportingSqlUrl = '/report-format/api/v1';\n  private areaUrl = '/bikes-sql/api/v1/areas';\n\n  returnMap(url) {\n    return this.http.get(url).map(result => this.processJsonFromData(result));\n  }\n\n  returnLocalizedMap(url) {\n    let selectedLang = localStorage.getItem(\"customerLang\") || DEFAULT_LANGUAGE;\n    return this.http\n      .get(\"/master-data/api/v1/localization/\" + selectedLang + \"/\" + url)\n      .map(result => this.processJsonFromData(result));\n  }\n\n  returnIdCodeMap(url) {\n    return this.returnMap(url).map(result => {\n      let output = [];\n      result.forEach(el =>\n        output.push({\n          name: el.id,\n          text: el.code\n        })\n      );\n      return output;\n    });\n  }\n\n  returnNumberCodeMap(url) {\n    return this.returnMap(url).map(result => {\n      let output = [];\n      result.forEach(el =>\n        output.push({\n          name: el.number,\n          text: el.code\n        })\n      );\n      return output;\n    });\n  }\n\n  readCityAreas() : Observable<any> {\n      return this.http.get(this.areaUrl);\n  }\n\n    sendCsvConfigurationFile(type: string, fileName: string, file: any) {\n        return this.http.post(this.damageCategoriesUrl + '/' + type + '/import', file, {headers: this.getUploadFileHeaders(fileName)});\n    }\n    sendCsvFile(url: string, fileName: string, file: any) {\n        return this.http.post(url, file, {headers: this.getUploadFileHeaders(fileName)});\n    }\n\n    sendJson(url: string, body: any):Observable<any> {\n        return this.http.post(url, body, null);\n    }\n\n  private getUploadFileHeaders(fileName: string): HttpHeaders {\n    let headers:HttpHeaders = new HttpHeaders();\n    headers=headers.append('Content-Type', 'application/octet-stream');\n    headers=headers.append('Content-Disposition', 'attachment; filename=' + fileName);\n    return headers;\n  }\n\n  /**\n   * Process input JSON data. If the data is null then return empty object.\n   * @param data\n   * @returns {Array}\n   */\n  private processJsonFromData(data) {\n    let arr = [];\n    try {\n      arr = data;//.json();\n    } catch (e) {\n      arr = [];\n    }\n\n    return arr;\n  }\n\n  getLanguages(): Promise<any> {\n    return Promise.resolve(LANGUAGES);\n  }\n\n  getStationList() {\n    return this.returnIdCodeMap(\"/user-information/api/v1/stations\");\n  }\n\n  getSparePartsCategoriesList(showHidden = false) {\n    if(showHidden){\n      return this.returnNumberCodeMap(`/bikes-sql/api/v1/category?showHidden=${showHidden}`);\n    }else {\n      return this.returnNumberCodeMap(\"/bikes-sql/api/v1/category\");\n    }\n  }\n\n  getSparePartsByCategory(category: string) {\n    return this.returnIdCodeMap(\"/bikes-sql/api/v1/parts/category/\" + category);\n  }\n\n  saveBikeAllowed(bikeId, allowedLocationIds) {\n    return this.http.post('/bikes-sql/api/v1/bicycle/' + bikeId + '/allowable', allowedLocationIds, null);\n  }\n\n  getBikeAllowedLocations(bikeId) {\n    return this.returnMap('/bikes-sql/api/v1/bicycle/'+bikeId+'/allowable');\n  }\n\n  getStationFromList(station: string, stationList: Array<any>) {\n    let stationId: number;\n    try {\n      stationId = parseInt(station);\n    } catch (e) {\n      return station;\n    }\n\n    let item = stationList.filter(el => el.name === stationId)[0];\n    if (item) {\n      return item.text;\n    } else {\n      return \"\";\n    }\n  }\n\n  getReportExtract2(params: ReportExtractParam, reportType:string, fileName: string): Observable<any> {\n    let url = this.reportingSqlUrl +'/excel2new/'  + reportType  + \"/\"  + fileName ;\n    let headers = new HttpHeaders();\n    headers=headers.append('Content-Type', 'application/json');\n    let reqParams = {\n      headers: headers,\n      // responseType: 'blob'\n    };\n    return this.http.post(url, params, reqParams);\n  }\n  getReportExtract(params: ReportExtractParam, fileName: string): Observable<any> {\n    let url = this.reportingSqlUrl +'/excel/'+ fileName;\n    let headers = new HttpHeaders();\n    headers=headers.append('Content-Type', 'application/json');\n    let reqParams = {\n      headers: headers,\n      responseType: 'blob'\n    };\n    return this.http.post(url, params, reqParams);\n  }\n\n  static getErrorMsg(error: any) : string {\n    let retStr = \"\";\n    if(error.error){\n      if(error.error.errors){\n        for(let val of error.error.errors){\n          retStr = retStr + \"<br> in object: \" +  val.objectName + \" - field: \" + val.field + \"  \" + (val.message? val.message : val.defaultMessage);\n        }\n      }\n      retStr = (error.error.message? error.error.message: error.error) +  retStr;\n    }else{\n      retStr = retStr + error.message\n    }\n    return retStr;\n  }\n  getArchivedReportList(reportType:string): Observable<CmArchivedReport[]> {\n    return this.returnMap(this.reportingSqlUrl + \"/archived-report/for-me/\" + reportType)\n  }\n\n  deleteArchivedReport(uuid: string): Observable<any> {\n    return this.deleteReturnResponse(this.reportingSqlUrl + \"/archived-report/delete/\" + uuid);\n  }\n\n  cancelReportProcessing(reportType: string): Observable<any> {\n    return this.postReturnSame(this.reportingSqlUrl + '/processing-cancel/' + reportType, {})\n  }\n\n  loadArchivedReport(uuid: string): Observable<any> {\n    let headers = new Headers();\n    headers.append('Content-Type', 'application/json');\n    let reqParams = {\n      headers: headers,\n      responseType: 'blob'\n    };\n    return this.http.get(this.reportingSqlUrl + '/archived-report/load/'+uuid, reqParams);\n  }\n\n  postReturnSame(url: string, body: any) {\n    return this.http.post(url, JSON.stringify(body), null)\n        .map((result: any) => body);\n  }\n  deleteReturnResponse(url: string) {\n    return this.http.delete(url)\n        .map((response: any) => response);\n  }\n  // getAutomatedExtractReport(filters:any): Observable<any> {\n  //   let url = this.reportingSqlUrl + \"/automated-extract\";\n  //   // url =  window.location.protocol + \"//localhost:8087/hertz-sql-reporting/api/v1\"  + \"/automated-extract\";\n  //   let headers = new Headers();\n  //   headers.append('Content-Type', 'application/json');\n  //   return this.http.post(url, filters, null).pipe(timeout(180000));\n  // }\n\n}\n","/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nvar BehaviorSubject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BehaviorSubject, _super);\n    function BehaviorSubject(_value) {\n        var _this = _super.call(this) || this;\n        _this._value = _value;\n        return _this;\n    }\n    Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n        get: function () {\n            return this.getValue();\n        },\n        enumerable: true,\n        configurable: true\n    });\n    BehaviorSubject.prototype._subscribe = function (subscriber) {\n        var subscription = _super.prototype._subscribe.call(this, subscriber);\n        if (subscription && !subscription.closed) {\n            subscriber.next(this._value);\n        }\n        return subscription;\n    };\n    BehaviorSubject.prototype.getValue = function () {\n        if (this.hasError) {\n            throw this.thrownError;\n        }\n        else if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return this._value;\n        }\n    };\n    BehaviorSubject.prototype.next = function (value) {\n        _super.prototype.next.call(this, this._value = value);\n    };\n    return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map\n","/** PURE_IMPORTS_START tslib,_map,_observable_from,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n    if (typeof resultSelector === 'function') {\n        return function (source) { return source.pipe(switchMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n    }\n    return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nvar SwitchMapOperator = /*@__PURE__*/ (function () {\n    function SwitchMapOperator(project) {\n        this.project = project;\n    }\n    SwitchMapOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n    };\n    return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SwitchMapSubscriber, _super);\n    function SwitchMapSubscriber(destination, project) {\n        var _this = _super.call(this, destination) || this;\n        _this.project = project;\n        _this.index = 0;\n        return _this;\n    }\n    SwitchMapSubscriber.prototype._next = function (value) {\n        var result;\n        var index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (error) {\n            this.destination.error(error);\n            return;\n        }\n        this._innerSub(result);\n    };\n    SwitchMapSubscriber.prototype._innerSub = function (result) {\n        var innerSubscription = this.innerSubscription;\n        if (innerSubscription) {\n            innerSubscription.unsubscribe();\n        }\n        var innerSubscriber = new SimpleInnerSubscriber(this);\n        var destination = this.destination;\n        destination.add(innerSubscriber);\n        this.innerSubscription = innerSubscribe(result, innerSubscriber);\n        if (this.innerSubscription !== innerSubscriber) {\n            destination.add(this.innerSubscription);\n        }\n    };\n    SwitchMapSubscriber.prototype._complete = function () {\n        var innerSubscription = this.innerSubscription;\n        if (!innerSubscription || innerSubscription.closed) {\n            _super.prototype._complete.call(this);\n        }\n        this.unsubscribe();\n    };\n    SwitchMapSubscriber.prototype._unsubscribe = function () {\n        this.innerSubscription = undefined;\n    };\n    SwitchMapSubscriber.prototype.notifyComplete = function () {\n        this.innerSubscription = undefined;\n        if (this.isStopped) {\n            _super.prototype._complete.call(this);\n        }\n    };\n    SwitchMapSubscriber.prototype.notifyNext = function (innerValue) {\n        this.destination.next(innerValue);\n    };\n    return SwitchMapSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=switchMap.js.map\n","import { Injectable } from '@angular/core';\nimport {\n  DatepickerRenderOptions,\n  BsDatepickerViewMode,\n  DatepickerDateCustomClasses\n} from './models';\n\n\n/**\n * For date range picker there are `BsDaterangepickerConfig` which inherits all properties,\n * except `displayMonths`, for range picker it default to `2`\n */\n@Injectable()\nexport class BsDatepickerConfig implements DatepickerRenderOptions {\n  /** sets use adaptive position */\n  adaptivePosition = false;\n  value?: Date | Date[];\n  isDisabled?: boolean;\n  /**\n   * Default min date for all date/range pickers\n   */\n  minDate?: Date;\n  /**\n   * Default max date for all date/range pickers\n   */\n  maxDate?: Date;\n  /**\n   * Default date custom classes for all date/range pickers\n   */\n  dateCustomClasses: DatepickerDateCustomClasses[];\n\n  daysDisabled?: number[];\n\n  /**\n   * Disable specific dates\n   */\n  datesDisabled?: Date[];\n  /**\n   * Makes dates from other months active\n   */\n  selectFromOtherMonth?: boolean;\n\n  /**\n   * Makes dates from other months active\n   */\n  selectWeek?: boolean;\n\n  /**\n   * Add class to current day\n   */\n  customTodayClass?: string;\n\n  /**\n   * Default mode for all date pickers\n   */\n  minMode?: BsDatepickerViewMode;\n\n  /** CSS class which will be applied to datepicker container,\n   * usually used to set color theme\n   */\n  containerClass = 'theme-green';\n\n  // DatepickerRenderOptions\n  displayMonths = 1;\n  /**\n   * Allows to hide week numbers in datepicker\n   */\n  showWeekNumbers = true;\n\n  dateInputFormat = 'L';\n  // range picker\n  rangeSeparator = ' - ';\n  /**\n   * Date format for date range input field\n   */\n  rangeInputFormat = 'L';\n\n  // DatepickerFormatOptions\n  monthTitle = 'MMMM';\n  yearTitle = 'YYYY';\n  dayLabel = 'D';\n  monthLabel = 'MMMM';\n  yearLabel = 'YYYY';\n  weekNumbers = 'w';\n}\n","// datepicker container component\n/* tslint:disable:no-empty */\nimport { BsCustomDates } from '../themes/bs/bs-custom-dates-view.component';\nimport { BsDatepickerEffects } from '../reducer/bs-datepicker.effects';\nimport { Observable } from 'rxjs';\nimport {\n  BsDatepickerViewMode,\n  BsNavigationEvent,\n  CalendarCellViewModel,\n  CellHoverEvent,\n  DatepickerRenderOptions,\n  DatepickerDateCustomClasses,\n  DaysCalendarViewModel,\n  DayViewModel,\n  MonthsCalendarViewModel,\n  WeekViewModel,\n  YearsCalendarViewModel\n} from '../models';\n\nexport abstract class BsDatepickerAbstractComponent {\n  containerClass: string;\n  isOtherMonthsActive: boolean;\n\n  _effects: BsDatepickerEffects;\n  _customRangesFish: BsCustomDates[] = [];\n\n  set minDate(value: Date) {\n    this._effects.setMinDate(value);\n  }\n\n  set maxDate(value: Date) {\n    this._effects.setMaxDate(value);\n  }\n  set daysDisabled(value: number[]) {\n    this._effects.setDaysDisabled(value);\n  }\n  set datesDisabled(value: Date[]) {\n    this._effects.setDatesDisabled(value);\n  }\n\n  set isDisabled(value: boolean) {\n    this._effects.setDisabled(value);\n  }\n\n  set dateCustomClasses(value: DatepickerDateCustomClasses[]) {\n    this._effects.setDateCustomClasses(value);\n  }\n\n  viewMode: Observable<BsDatepickerViewMode>;\n  daysCalendar: Observable<DaysCalendarViewModel[]>;\n  monthsCalendar: Observable<MonthsCalendarViewModel[]>;\n  yearsCalendar: Observable<YearsCalendarViewModel[]>;\n  options: Observable<DatepickerRenderOptions>;\n\n  setViewMode(event: BsDatepickerViewMode): void {}\n\n  navigateTo(event: BsNavigationEvent): void {}\n\n  dayHoverHandler(event: CellHoverEvent): void {}\n\n  weekHoverHandler(event: WeekViewModel): void {}\n\n  monthHoverHandler(event: CellHoverEvent): void {}\n\n  yearHoverHandler(event: CellHoverEvent): void {}\n\n  daySelectHandler(day: DayViewModel): void {}\n\n  monthSelectHandler(event: CalendarCellViewModel): void {}\n\n  yearSelectHandler(event: CalendarCellViewModel): void {}\n\n  /* tslint:disable-next-line: no-any */\n  _stopPropagation(event: any): void {\n    event.stopPropagation();\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { TimeUnit } from 'ngx-bootstrap/chronos';\nimport { Action } from 'ngx-bootstrap/mini-ngrx';\nimport {\n  BsDatepickerViewMode,\n  BsViewNavigationEvent,\n  CellHoverEvent,\n  DatepickerRenderOptions,\n  DatepickerDateCustomClasses\n} from '../models';\n\n@Injectable()\nexport class BsDatepickerActions {\n  static readonly CALCULATE = '[datepicker] calculate dates matrix';\n  static readonly FORMAT = '[datepicker] format datepicker values';\n  static readonly FLAG = '[datepicker] set flags';\n  static readonly SELECT = '[datepicker] select date';\n  static readonly NAVIGATE_OFFSET = '[datepicker] shift view date';\n  static readonly NAVIGATE_TO = '[datepicker] change view date';\n  static readonly SET_OPTIONS = '[datepicker] update render options';\n  static readonly HOVER = '[datepicker] hover date';\n  static readonly CHANGE_VIEWMODE = '[datepicker] switch view mode';\n\n  static readonly SET_MIN_DATE = '[datepicker] set min date';\n  static readonly SET_MAX_DATE = '[datepicker] set max date';\n  static readonly SET_DAYSDISABLED = '[datepicker] set days disabled';\n  static readonly SET_DATESDISABLED = '[datepicker] set dates disabled';\n  static readonly SET_IS_DISABLED = '[datepicker] set is disabled';\n  static readonly SET_DATE_CUSTOM_CLASSES = '[datepicker] set date custom classes';\n\n  static readonly SET_LOCALE = '[datepicker] set datepicker locale';\n\n  static readonly SELECT_RANGE = '[daterangepicker] select dates range';\n\n  calculate(): Action {\n    return { type: BsDatepickerActions.CALCULATE };\n  }\n\n  format(): Action {\n    return { type: BsDatepickerActions.FORMAT };\n  }\n\n  flag(): Action {\n    return { type: BsDatepickerActions.FLAG };\n  }\n\n  select(date: Date): Action {\n    return {\n      type: BsDatepickerActions.SELECT,\n      payload: date\n    };\n  }\n\n  changeViewMode(event: BsDatepickerViewMode): Action {\n    return {\n      type: BsDatepickerActions.CHANGE_VIEWMODE,\n      payload: event\n    };\n  }\n\n  navigateTo(event: BsViewNavigationEvent): Action {\n    return {\n      type: BsDatepickerActions.NAVIGATE_TO,\n      payload: event\n    };\n  }\n\n  navigateStep(step: TimeUnit): Action {\n    return {\n      type: BsDatepickerActions.NAVIGATE_OFFSET,\n      payload: step\n    };\n  }\n\n  setOptions(options: DatepickerRenderOptions): Action {\n    return {\n      type: BsDatepickerActions.SET_OPTIONS,\n      payload: options\n    };\n  }\n\n  // date range picker\n  selectRange(value: Date[]): Action {\n    return {\n      type: BsDatepickerActions.SELECT_RANGE,\n      payload: value\n    };\n  }\n\n  hoverDay(event: CellHoverEvent): Action {\n    return {\n      type: BsDatepickerActions.HOVER,\n      payload: event.isHovered ? event.cell.date : null\n    };\n  }\n\n  minDate(date: Date): Action {\n    return {\n      type: BsDatepickerActions.SET_MIN_DATE,\n      payload: date\n    };\n  }\n\n  maxDate(date: Date): Action {\n    return {\n      type: BsDatepickerActions.SET_MAX_DATE,\n      payload: date\n    };\n  }\n\n  daysDisabled(days: number[]): Action {\n    return {\n      type: BsDatepickerActions.SET_DAYSDISABLED,\n      payload: days\n    };\n  }\n\n  datesDisabled(dates: Date[]): Action {\n    return {\n      type: BsDatepickerActions.SET_DATESDISABLED,\n      payload: dates\n    };\n  }\n\n  isDisabled(value: boolean): Action {\n    return {\n      type: BsDatepickerActions.SET_IS_DISABLED,\n      payload: value\n    };\n  }\n\n  setDateCustomClasses(value: DatepickerDateCustomClasses[]): Action {\n    return {\n      type: BsDatepickerActions.SET_DATE_CUSTOM_CLASSES,\n      payload: value\n    };\n  }\n\n  setLocale(locale: string): Action {\n    return {\n      type: BsDatepickerActions.SET_LOCALE,\n      payload: locale\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n@Injectable()\nexport class BsLocaleService {\n  private _defaultLocale = 'en';\n  private _locale = new BehaviorSubject<string>(this._defaultLocale);\n  private _localeChange: Observable<string> = this._locale.asObservable();\n\n  get locale(): BehaviorSubject<string> {\n    return this._locale;\n  }\n\n  get localeChange(): Observable<string> {\n    return this._localeChange;\n  }\n\n  get currentLocale(): string {\n    return this._locale.getValue();\n  }\n\n  use(locale: string): void {\n    if (locale === this.currentLocale) {\n      return;\n    }\n\n    this._locale.next(locale);\n  }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { getFullYear, getMonth } from 'ngx-bootstrap/chronos';\n\nimport { BsDatepickerAbstractComponent } from '../base/bs-datepicker-container';\nimport { BsDatepickerActions } from './bs-datepicker.actions';\nimport { BsDatepickerConfig } from '../bs-datepicker.config';\nimport { BsDatepickerStore } from './bs-datepicker.store';\nimport { BsLocaleService } from '../bs-locale.service';\n\nimport {\n  BsDatepickerViewMode,\n  BsNavigationEvent,\n  CalendarCellViewModel,\n  CellHoverEvent,\n  DatepickerRenderOptions,\n  DatepickerDateCustomClasses,\n  DaysCalendarViewModel,\n  DayViewModel,\n  MonthsCalendarViewModel,\n  YearsCalendarViewModel\n} from '../models';\n\n\n@Injectable()\nexport class BsDatepickerEffects {\n  viewMode: Observable<BsDatepickerViewMode>;\n  daysCalendar: Observable<DaysCalendarViewModel[]>;\n  monthsCalendar: Observable<MonthsCalendarViewModel[]>;\n  yearsCalendar: Observable<YearsCalendarViewModel[]>;\n  options: Observable<DatepickerRenderOptions>;\n\n  private _store: BsDatepickerStore;\n  private _subs: Subscription[] = [];\n\n  constructor(private _actions: BsDatepickerActions,\n              private _localeService: BsLocaleService) {}\n\n  init(_bsDatepickerStore: BsDatepickerStore): BsDatepickerEffects {\n    this._store = _bsDatepickerStore;\n\n    return this;\n  }\n\n  /** setters */\n\n  setValue(value: Date): void {\n    this._store.dispatch(this._actions.select(value));\n  }\n\n  setRangeValue(value: Date[]): void {\n    this._store.dispatch(this._actions.selectRange(value));\n  }\n\n  setMinDate(value: Date): BsDatepickerEffects {\n    this._store.dispatch(this._actions.minDate(value));\n\n    return this;\n  }\n\n  setMaxDate(value: Date): BsDatepickerEffects {\n    this._store.dispatch(this._actions.maxDate(value));\n\n    return this;\n  }\n\n  setDaysDisabled(value: number[]) {\n    this._store.dispatch(this._actions.daysDisabled(value));\n\n    return this;\n  }\n\n  setDatesDisabled(value: Date[]) {\n    this._store.dispatch(this._actions.datesDisabled(value));\n\n    return this;\n  }\n\n  setDisabled(value: boolean): BsDatepickerEffects {\n    this._store.dispatch(this._actions.isDisabled(value));\n\n    return this;\n  }\n\n  setDateCustomClasses(value: DatepickerDateCustomClasses[]): BsDatepickerEffects {\n    this._store.dispatch(this._actions.setDateCustomClasses(value));\n\n    return this;\n  }\n\n  /* Set rendering options */\n  setOptions(_config: BsDatepickerConfig): BsDatepickerEffects {\n    const _options = Object.assign({locale: this._localeService.currentLocale}, _config);\n    this._store.dispatch(this._actions.setOptions(_options));\n\n    return this;\n  }\n\n  /** view to mode bindings */\n  setBindings(container: BsDatepickerAbstractComponent): BsDatepickerEffects {\n    container.daysCalendar = this._store\n      .select(state => state.flaggedMonths)\n      .pipe(\n        filter(months => !!months)\n      );\n\n    // month calendar\n    container.monthsCalendar = this._store\n      .select(state => state.flaggedMonthsCalendar)\n      .pipe(\n        filter(months => !!months)\n      );\n\n    // year calendar\n    container.yearsCalendar = this._store\n      .select(state => state.yearsCalendarFlagged)\n      .pipe(\n        filter(years => !!years)\n      );\n\n    container.viewMode = this._store.select(state => state.view.mode);\n\n    container.options = this._store\n      .select(state => state.showWeekNumbers)\n      .pipe(\n        map(showWeekNumbers => ({showWeekNumbers}))\n      );\n\n    return this;\n  }\n\n  /** event handlers */\n  setEventHandlers(container: BsDatepickerAbstractComponent): BsDatepickerEffects {\n    container.setViewMode = (event: BsDatepickerViewMode): void => {\n      this._store.dispatch(this._actions.changeViewMode(event));\n    };\n\n    container.navigateTo = (event: BsNavigationEvent): void => {\n      this._store.dispatch(this._actions.navigateStep(event.step));\n    };\n\n    container.dayHoverHandler = (event: CellHoverEvent): void => {\n      const _cell = event.cell as DayViewModel;\n      if (_cell.isOtherMonth || _cell.isDisabled) {\n        return;\n      }\n\n      this._store.dispatch(this._actions.hoverDay(event));\n      _cell.isHovered = event.isHovered;\n    };\n\n    container.monthHoverHandler = (event: CellHoverEvent): void => {\n      event.cell.isHovered = event.isHovered;\n    };\n\n    container.yearHoverHandler = (event: CellHoverEvent): void => {\n      event.cell.isHovered = event.isHovered;\n    };\n\n    container.monthSelectHandler = (event: CalendarCellViewModel): void => {\n      if (event.isDisabled) {\n        return;\n      }\n      this._store.dispatch(\n        this._actions.navigateTo({\n          unit: {\n            month: getMonth(event.date),\n            year: getFullYear(event.date)\n          },\n          viewMode: 'day'\n        })\n      );\n    };\n\n    container.yearSelectHandler = (event: CalendarCellViewModel): void => {\n      if (event.isDisabled) {\n        return;\n      }\n      this._store.dispatch(\n        this._actions.navigateTo({\n          unit: {\n            year: getFullYear(event.date)\n          },\n          viewMode: 'month'\n        })\n      );\n    };\n\n    return this;\n  }\n\n  registerDatepickerSideEffects(): BsDatepickerEffects {\n    this._subs.push(\n      this._store.select(state => state.view).subscribe(view => {\n        this._store.dispatch(this._actions.calculate());\n      })\n    );\n\n    // format calendar values on month model change\n    this._subs.push(\n      this._store\n        .select(state => state.monthsModel)\n        .pipe(\n          filter(monthModel => !!monthModel)\n        )\n        .subscribe(month => this._store.dispatch(this._actions.format()))\n    );\n\n    // flag day values\n    this._subs.push(\n      this._store\n        .select(state => state.formattedMonths)\n        .pipe(\n          filter(month => !!month)\n        )\n        .subscribe(month => this._store.dispatch(this._actions.flag()))\n    );\n\n    // flag day values\n    this._subs.push(\n      this._store\n        .select(state => state.selectedDate)\n        .pipe(\n          filter(selectedDate => !!selectedDate)\n        )\n        .subscribe(selectedDate => this._store.dispatch(this._actions.flag()))\n    );\n\n    // flag for date range picker\n    this._subs.push(\n      this._store\n        .select(state => state.selectedRange)\n        .pipe(\n          filter(selectedRange => !!selectedRange)\n        )\n        .subscribe(selectedRange => this._store.dispatch(this._actions.flag()))\n    );\n\n    // monthsCalendar\n    this._subs.push(\n      this._store\n        .select(state => state.monthsCalendar)\n        .subscribe(() => this._store.dispatch(this._actions.flag()))\n    );\n\n    // years calendar\n    this._subs.push(\n      this._store\n        .select(state => state.yearsCalendarModel)\n        .pipe(\n          filter(state => !!state)\n        )\n        .subscribe(() => this._store.dispatch(this._actions.flag()))\n    );\n\n    // on hover\n    this._subs.push(\n      this._store\n        .select(state => state.hoveredDate)\n        .pipe(\n          filter(hoveredDate => !!hoveredDate)\n        )\n        .subscribe(hoveredDate => this._store.dispatch(this._actions.flag()))\n    );\n\n    // date custom classes\n    this._subs.push(\n      this._store\n        .select(state => state.dateCustomClasses)\n        .pipe(\n          filter(dateCustomClasses => !!dateCustomClasses)\n        )\n        .subscribe(dateCustomClasses => this._store.dispatch(this._actions.flag()))\n    );\n\n    // on locale change\n    this._subs.push(\n      this._localeService.localeChange\n        .subscribe(locale => this._store.dispatch(this._actions.setLocale(locale)))\n    );\n\n    return this;\n  }\n\n  destroy(): void {\n    for (const sub of this._subs) {\n      sub.unsubscribe();\n    }\n  }\n}\n","import {\n  BsDatepickerViewMode,\n  DatepickerFormatOptions,\n  DatepickerRenderOptions,\n  DatepickerDateCustomClasses,\n  DaysCalendarModel,\n  DaysCalendarViewModel,\n  MonthsCalendarViewModel,\n  MonthViewOptions,\n  YearsCalendarViewModel\n} from '../models';\nimport { defaultMonthOptions } from './_defaults';\nimport { BsDatepickerConfig } from '../bs-datepicker.config';\n\nexport interface BsDatepickerViewState {\n  date: Date;\n  mode: BsDatepickerViewMode;\n}\n\nexport class BsDatepickerState\n  implements DatepickerRenderOptions, DatepickerFormatOptions {\n  // date picker\n  selectedDate?: Date;\n  // daterange picker\n  selectedRange?: Date[];\n\n  // initial date of calendar, today by default\n  view: BsDatepickerViewState;\n\n  isDisabled?: boolean;\n  // bounds\n  minDate?: Date;\n  maxDate?: Date;\n  daysDisabled?: number[];\n  datesDisabled?: Date[];\n  minMode?: BsDatepickerViewMode;\n  dateCustomClasses?: DatepickerDateCustomClasses[];\n\n  hoveredDate?: Date;\n  hoveredMonth?: Date;\n  hoveredYear?: Date;\n\n  // days calendar\n  monthsModel?: DaysCalendarModel[];\n  formattedMonths?: DaysCalendarViewModel[];\n  flaggedMonths?: DaysCalendarViewModel[];\n  selectFromOtherMonth?: boolean;\n\n  // months calendar\n  monthsCalendar?: MonthsCalendarViewModel[];\n  flaggedMonthsCalendar?: MonthsCalendarViewModel[];\n\n  // years calendar\n  yearsCalendarModel?: YearsCalendarViewModel[];\n  yearsCalendarFlagged?: YearsCalendarViewModel[];\n\n  // options\n  monthViewOptions: MonthViewOptions;\n\n  // DatepickerRenderOptions\n  showWeekNumbers?: boolean;\n  displayMonths?: number;\n\n  // DatepickerFormatOptions\n  locale: string;\n\n  monthTitle: string;\n  yearTitle: string;\n\n  dayLabel: string;\n  monthLabel: string;\n  yearLabel: string;\n\n  weekNumbers: string;\n}\n\nconst _initialView: BsDatepickerViewState = { date: new Date(), mode: 'day' };\n\nexport const initialDatepickerState: BsDatepickerState = Object.assign(\n  new BsDatepickerConfig(),\n  {\n    locale: 'en',\n    view: _initialView,\n    selectedRange: [],\n    monthViewOptions: defaultMonthOptions\n  }\n);\n","import {\n  MonthViewOptions\n} from '../models';\n\nexport const defaultMonthOptions: MonthViewOptions = {\n  width: 7,\n  height: 6\n};\n","import {\n  getDay,\n  isFirstDayOfWeek,\n  isAfter,\n  isBefore,\n  shiftDate,\n  endOf,\n  startOf,\n  isSame\n} from 'ngx-bootstrap/chronos';\n\nexport function getStartingDayOfCalendar(date: Date,\n                                         options: { firstDayOfWeek?: number }): Date {\n  if (isFirstDayOfWeek(date, options.firstDayOfWeek)) {\n    return date;\n  }\n\n  const weekDay = getDay(date);\n  const offset = calculateDateOffset(weekDay, options.firstDayOfWeek);\n\n  return shiftDate(date, {day: -offset});\n}\n\nexport function calculateDateOffset(weekday: number, startingDayOffset: number): number {\n  if (startingDayOffset === 0) {\n    return weekday;\n  }\n\n  const offset = weekday - startingDayOffset % 7;\n\n  return offset < 0 ? offset + 7 : offset;\n}\n\nexport function isMonthDisabled(date: Date, min: Date, max: Date): boolean {\n  const minBound = min && isBefore(endOf(date, 'month'), min, 'day');\n  const maxBound = max && isAfter(startOf(date, 'month'), max, 'day');\n\n  return minBound || maxBound;\n}\n\nexport function isYearDisabled(date: Date, min: Date, max: Date): boolean {\n  const minBound = min && isBefore(endOf(date, 'year'), min, 'day');\n  const maxBound = max && isAfter(startOf(date, 'year'), max, 'day');\n\n  return minBound || maxBound;\n}\n\nexport function isDisabledDate(date: Date, datesDisabled: Date[]): boolean {\n  if (datesDisabled === undefined || !datesDisabled || !datesDisabled.length) {\n    return false;\n  }\n\n  return datesDisabled.some((dateDisabled: Date) => isSame(date, dateDisabled, 'date'));\n}\n","import { TimeUnit, shiftDate } from 'ngx-bootstrap/chronos';\n\nexport type CreateMatrixCb<T> = (date: Date) => T;\n\nexport interface MatrixOptions {\n  height: number;\n  width: number;\n  initialDate: Date;\n  shift: TimeUnit;\n}\n\nexport function createMatrix<T>(\n  options: MatrixOptions,\n  fn: CreateMatrixCb<T>\n): T[][] {\n  let prevValue = options.initialDate;\n  const matrix: T[][] = new Array(options.height);\n  for (let i = 0; i < options.height; i++) {\n    matrix[i] = new Array(options.width);\n    for (let j = 0; j < options.width; j++) {\n      matrix[i][j] = fn(prevValue);\n      prevValue = shiftDate(prevValue, options.shift);\n    }\n  }\n\n  return matrix;\n}\n","// user and model input should handle parsing and validating input values\n// should accept some options\n// todo: split out formatting\nimport { DaysCalendarModel, MonthViewOptions } from '../models';\nimport { getFirstDayOfMonth } from 'ngx-bootstrap/chronos';\nimport { getStartingDayOfCalendar } from '../utils/bs-calendar-utils';\nimport { createMatrix } from '../utils/matrix-utils';\n\nexport function calcDaysCalendar(\n  startingDate: Date,\n  options: MonthViewOptions\n): DaysCalendarModel {\n  const firstDay = getFirstDayOfMonth(startingDate);\n  const initialDate = getStartingDayOfCalendar(firstDay, options);\n\n  const matrixOptions = {\n    width: options.width,\n    height: options.height,\n    initialDate,\n    shift: { day: 1 }\n  };\n  const daysMatrix = createMatrix<Date>(matrixOptions, date => date);\n\n  return {\n    daysMatrix,\n    month: firstDay\n  };\n}\n","import {\n  DatepickerFormatOptions,\n  DaysCalendarModel,\n  DaysCalendarViewModel\n} from '../models';\nimport { formatDate, getLocale } from 'ngx-bootstrap/chronos';\n\nexport function formatDaysCalendar(daysCalendar: DaysCalendarModel,\n                                   formatOptions: DatepickerFormatOptions,\n                                   monthIndex: number): DaysCalendarViewModel {\n  return {\n    month: daysCalendar.month,\n    monthTitle: formatDate(\n      daysCalendar.month,\n      formatOptions.monthTitle,\n      formatOptions.locale\n    ),\n    yearTitle: formatDate(\n      daysCalendar.month,\n      formatOptions.yearTitle,\n      formatOptions.locale\n    ),\n    weekNumbers: getWeekNumbers(\n      daysCalendar.daysMatrix,\n      formatOptions.weekNumbers,\n      formatOptions.locale\n    ),\n    weekdays: getShiftedWeekdays(formatOptions.locale),\n    weeks: daysCalendar.daysMatrix.map((week: Date[], weekIndex: number) => ({\n      days: week.map((date: Date, dayIndex: number) => ({\n        date,\n        label: formatDate(date, formatOptions.dayLabel, formatOptions.locale),\n        monthIndex,\n        weekIndex,\n        dayIndex\n      }))\n    }))\n  };\n}\n\nexport function getWeekNumbers(daysMatrix: Date[][],\n                               format: string,\n                               locale: string): string[] {\n  return daysMatrix.map(\n    (days: Date[]) => (days[0] ? formatDate(days[0], format, locale) : '')\n  );\n}\n\nexport function getShiftedWeekdays(locale: string): string[] {\n  const _locale = getLocale(locale);\n  const weekdays = _locale.weekdaysShort() as string[];\n  const firstDayOfWeek = _locale.firstDayOfWeek();\n\n  return [...weekdays.slice(firstDayOfWeek), ...weekdays.slice(0, firstDayOfWeek)];\n}\n","import {\n  DaysCalendarViewModel,\n  DayViewModel,\n  WeekViewModel,\n  DatepickerDateCustomClasses\n} from '../models';\n\nimport {\n  isAfter,\n  isBefore,\n  isDisabledDay,\n  isSameDay,\n  isSameMonth,\n  shiftDate\n} from 'ngx-bootstrap/chronos';\n\nimport { isMonthDisabled, isDisabledDate } from '../utils/bs-calendar-utils';\n\nexport interface FlagDaysCalendarOptions {\n  isDisabled: boolean;\n  minDate: Date;\n  maxDate: Date;\n  daysDisabled: number[];\n  datesDisabled: Date[];\n  hoveredDate: Date;\n  selectedDate: Date;\n  selectedRange: Date[];\n  displayMonths: number;\n  monthIndex: number;\n  dateCustomClasses: DatepickerDateCustomClasses[];\n}\n\nexport function flagDaysCalendar(\n  formattedMonth: DaysCalendarViewModel,\n  options: FlagDaysCalendarOptions\n): DaysCalendarViewModel {\n  formattedMonth.weeks.forEach((week: WeekViewModel) => {\n    /* tslint:disable-next-line: cyclomatic-complexity */\n    week.days.forEach((day: DayViewModel, dayIndex: number) => {\n      // datepicker\n      const isOtherMonth = !isSameMonth(day.date, formattedMonth.month);\n\n      const isHovered =\n        !isOtherMonth && isSameDay(day.date, options.hoveredDate);\n      // date range picker\n      const isSelectionStart =\n        !isOtherMonth &&\n        options.selectedRange &&\n        isSameDay(day.date, options.selectedRange[0]);\n      const isSelectionEnd =\n        !isOtherMonth &&\n        options.selectedRange &&\n        isSameDay(day.date, options.selectedRange[1]);\n\n      const isSelected =\n        (!isOtherMonth && isSameDay(day.date, options.selectedDate)) ||\n        isSelectionStart ||\n        isSelectionEnd;\n\n      const isInRange =\n        !isOtherMonth &&\n        options.selectedRange &&\n        isDateInRange(day.date, options.selectedRange, options.hoveredDate);\n\n      const isDisabled =\n        options.isDisabled ||\n        isBefore(day.date, options.minDate, 'day') ||\n        isAfter(day.date, options.maxDate, 'day') ||\n        isDisabledDay(day.date, options.daysDisabled) ||\n        isDisabledDate(day.date, options.datesDisabled);\n\n      const currentDate = new Date();\n      const isToday = !isOtherMonth && isSameDay(day.date, currentDate);\n\n      const customClasses = options.dateCustomClasses && options.dateCustomClasses\n        .map(dcc => isSameDay(day.date, dcc.date) ? dcc.classes : [])\n        .reduce((previousValue, currentValue) => previousValue.concat(currentValue), [])\n        .join(' ')\n        || '';\n\n\n      // decide update or not\n      const newDay = Object.assign({}, day, {\n        isOtherMonth,\n        isHovered,\n        isSelected,\n        isSelectionStart,\n        isSelectionEnd,\n        isInRange,\n        isDisabled,\n        isToday,\n        customClasses\n      });\n\n      if (\n        day.isOtherMonth !== newDay.isOtherMonth ||\n        day.isHovered !== newDay.isHovered ||\n        day.isSelected !== newDay.isSelected ||\n        day.isSelectionStart !== newDay.isSelectionStart ||\n        day.isSelectionEnd !== newDay.isSelectionEnd ||\n        day.isDisabled !== newDay.isDisabled ||\n        day.isInRange !== newDay.isInRange ||\n        day.customClasses !== newDay.customClasses\n      ) {\n        week.days[dayIndex] = newDay;\n      }\n    });\n  });\n\n  // todo: add check for linked calendars\n  formattedMonth.hideLeftArrow =\n    options.isDisabled ||\n    (options.monthIndex > 0 && options.monthIndex !== options.displayMonths);\n  formattedMonth.hideRightArrow =\n    options.isDisabled ||\n    (options.monthIndex < options.displayMonths &&\n      options.monthIndex + 1 !== options.displayMonths);\n\n  formattedMonth.disableLeftArrow = isMonthDisabled(\n    shiftDate(formattedMonth.month, { month: -1 }),\n    options.minDate,\n    options.maxDate\n  );\n  formattedMonth.disableRightArrow = isMonthDisabled(\n    shiftDate(formattedMonth.month, { month: 1 }),\n    options.minDate,\n    options.maxDate\n  );\n\n  return formattedMonth;\n}\n\nfunction isDateInRange(\n  date: Date,\n  selectedRange: Date[],\n  hoveredDate: Date\n): boolean {\n  if (!date || !selectedRange[0]) {\n    return false;\n  }\n\n  if (selectedRange[1]) {\n    return date > selectedRange[0] && date <= selectedRange[1];\n  }\n\n  if (hoveredDate) {\n    return date > selectedRange[0] && date <= hoveredDate;\n  }\n\n  return false;\n}\n","import { BsDatepickerViewMode } from '../models';\n\nexport function canSwitchMode(mode: BsDatepickerViewMode, minMode?: BsDatepickerViewMode): boolean {\n  return minMode ? mode >= minMode : true;\n}\n","import {\n  DatepickerFormatOptions,\n  MonthsCalendarViewModel,\n  CalendarCellViewModel\n} from '../models';\nimport { startOf, formatDate } from 'ngx-bootstrap/chronos';\nimport { createMatrix } from '../utils/matrix-utils';\n\nconst height = 4;\nconst width = 3;\nconst shift = { month: 1 };\n\nexport function formatMonthsCalendar(\n  viewDate: Date,\n  formatOptions: DatepickerFormatOptions\n): MonthsCalendarViewModel {\n  const initialDate = startOf(viewDate, 'year');\n  const matrixOptions = { width, height, initialDate, shift };\n  const monthMatrix = createMatrix<\n    CalendarCellViewModel\n  >(matrixOptions, date => ({\n    date,\n    label: formatDate(date, formatOptions.monthLabel, formatOptions.locale)\n  }));\n\n  return {\n    months: monthMatrix,\n    monthTitle: '',\n    yearTitle: formatDate(\n      viewDate,\n      formatOptions.yearTitle,\n      formatOptions.locale\n    )\n  };\n}\n","import {\n  DatepickerFormatOptions,\n  YearsCalendarViewModel,\n  CalendarCellViewModel\n} from '../models';\nimport { shiftDate, formatDate } from 'ngx-bootstrap/chronos';\nimport { createMatrix } from '../utils/matrix-utils';\n\nconst height = 4;\nconst width = 4;\nexport const yearsPerCalendar = height * width;\nconst initialShift = (Math.floor(yearsPerCalendar / 2) - 1) * -1;\nconst shift = { year: 1 };\n\nexport function formatYearsCalendar(\n  viewDate: Date,\n  formatOptions: DatepickerFormatOptions\n): YearsCalendarViewModel {\n  const initialDate = shiftDate(viewDate, { year: initialShift });\n  const matrixOptions = { width, height, initialDate, shift };\n  const yearsMatrix = createMatrix<\n    CalendarCellViewModel\n  >(matrixOptions, date => ({\n    date,\n    label: formatDate(date, formatOptions.yearLabel, formatOptions.locale)\n  }));\n  const yearTitle = formatYearRangeTitle(yearsMatrix, formatOptions);\n\n  return {\n    years: yearsMatrix,\n    monthTitle: '',\n    yearTitle\n  };\n}\n\nfunction formatYearRangeTitle(\n  yearsMatrix: CalendarCellViewModel[][],\n  formatOptions: DatepickerFormatOptions\n): string {\n  const from = formatDate(\n    yearsMatrix[0][0].date,\n    formatOptions.yearTitle,\n    formatOptions.locale\n  );\n  const to = formatDate(\n    yearsMatrix[height - 1][width - 1].date,\n    formatOptions.yearTitle,\n    formatOptions.locale\n  );\n\n  return `${from} - ${to}`;\n}\n","// tslint:disable:max-file-line-count\nimport { BsDatepickerState, initialDatepickerState } from './bs-datepicker.state';\nimport { Action } from 'ngx-bootstrap/mini-ngrx';\nimport { BsDatepickerActions } from './bs-datepicker.actions';\nimport { calcDaysCalendar } from '../engine/calc-days-calendar';\nimport { formatDaysCalendar } from '../engine/format-days-calendar';\nimport { flagDaysCalendar } from '../engine/flag-days-calendar';\nimport {\n  setFullDate,\n  shiftDate,\n  isArray,\n  isDateValid,\n  startOf,\n  getLocale,\n  isAfter,\n  isBefore\n} from 'ngx-bootstrap/chronos';\nimport { canSwitchMode } from '../engine/view-mode';\nimport { formatMonthsCalendar } from '../engine/format-months-calendar';\nimport { flagMonthsCalendar } from '../engine/flag-months-calendar';\nimport { formatYearsCalendar, yearsPerCalendar } from '../engine/format-years-calendar';\nimport { flagYearsCalendar } from '../engine/flag-years-calendar';\nimport { BsViewNavigationEvent, DatepickerFormatOptions, BsDatepickerViewMode } from '../models';\n\n\n/* tslint:disable-next-line: cyclomatic-complexity */\nexport function bsDatepickerReducer(state = initialDatepickerState,\n                                    action: Action): BsDatepickerState {\n  switch (action.type) {\n    case BsDatepickerActions.CALCULATE: {\n      return calculateReducer(state);\n    }\n\n    case BsDatepickerActions.FORMAT: {\n      return formatReducer(state, action);\n    }\n\n    case BsDatepickerActions.FLAG: {\n      return flagReducer(state, action);\n    }\n\n    case BsDatepickerActions.NAVIGATE_OFFSET: {\n      const date = shiftDate(startOf(state.view.date, 'month'), action.payload);\n      const newState = {\n        view: {\n          mode: state.view.mode,\n          date\n        }\n      };\n\n      return Object.assign({}, state, newState);\n    }\n\n    case BsDatepickerActions.NAVIGATE_TO: {\n      const payload: BsViewNavigationEvent = action.payload;\n\n      const date = setFullDate(state.view.date, payload.unit);\n      let newState;\n      let mode: BsDatepickerViewMode;\n      if (canSwitchMode(payload.viewMode, state.minMode)) {\n        mode = payload.viewMode;\n        newState = { view: { date, mode } };\n      } else {\n        mode = state.view.mode;\n        newState = { selectedDate: date, view: { date, mode } };\n      }\n\n      return Object.assign({}, state, newState);\n    }\n\n    case BsDatepickerActions.CHANGE_VIEWMODE: {\n      if (!canSwitchMode(action.payload, state.minMode)) {\n        return state;\n      }\n      const date = state.view.date;\n      const mode = action.payload;\n      const newState = { view: { date, mode } };\n\n      return Object.assign({}, state, newState);\n    }\n\n    case BsDatepickerActions.HOVER: {\n      return Object.assign({}, state, { hoveredDate: action.payload });\n    }\n\n    case BsDatepickerActions.SELECT: {\n      const newState = {\n        selectedDate: action.payload,\n        view: state.view\n      };\n\n      const mode = state.view.mode;\n      const _date = action.payload || state.view.date;\n      const date = getViewDate(_date, state.minDate, state.maxDate);\n      newState.view = { mode, date };\n\n      return Object.assign({}, state, newState);\n    }\n\n    case BsDatepickerActions.SET_OPTIONS: {\n      const newState = action.payload;\n      // preserve view mode\n      const mode = newState.minMode ? newState.minMode : state.view.mode;\n      const _viewDate = isDateValid(newState.value) && newState.value\n        || isArray(newState.value) && isDateValid(newState.value[0]) && newState.value[0]\n        || state.view.date;\n      const date = getViewDate(_viewDate, newState.minDate, newState.maxDate);\n      newState.view = { mode, date };\n      // update selected value\n      if (newState.value) {\n        // if new value is array we work with date range\n        if (isArray(newState.value)) {\n          newState.selectedRange = newState.value;\n        }\n\n        // if new value is a date -> datepicker\n        if (newState.value instanceof Date) {\n          newState.selectedDate = newState.value;\n        }\n\n        // provided value is not supported :)\n        // need to report it somehow\n      }\n\n      return Object.assign({}, state, newState);\n    }\n\n    // date range picker\n    case BsDatepickerActions.SELECT_RANGE: {\n      const newState = {\n        selectedRange: action.payload,\n        view: state.view\n      };\n\n      const mode = state.view.mode;\n      const _date = action.payload && action.payload[0] || state.view.date;\n      const date = getViewDate(_date, state.minDate, state.maxDate);\n      newState.view = { mode, date };\n\n      return Object.assign({}, state, newState);\n    }\n\n    case BsDatepickerActions.SET_MIN_DATE: {\n      return Object.assign({}, state, {\n        minDate: action.payload\n      });\n    }\n    case BsDatepickerActions.SET_MAX_DATE: {\n      return Object.assign({}, state, {\n        maxDate: action.payload\n      });\n    }\n    case BsDatepickerActions.SET_IS_DISABLED: {\n      return Object.assign({}, state, {\n        isDisabled: action.payload\n      });\n    }\n    case BsDatepickerActions.SET_DATE_CUSTOM_CLASSES: {\n      return Object.assign({}, state, {\n        dateCustomClasses: action.payload\n      });\n    }\n\n    default:\n      return state;\n  }\n}\n\nfunction calculateReducer(state: BsDatepickerState): BsDatepickerState {\n  // how many calendars\n  const displayMonths = state.displayMonths;\n  // use selected date on initial rendering if set\n  let viewDate = state.view.date;\n\n  if (state.view.mode === 'day') {\n    state.monthViewOptions.firstDayOfWeek = getLocale(state.locale).firstDayOfWeek();\n    const monthsModel = new Array(displayMonths);\n    for (let monthIndex = 0; monthIndex < displayMonths; monthIndex++) {\n      // todo: for unlinked calendars it will be harder\n      monthsModel[monthIndex] = calcDaysCalendar(\n        viewDate,\n        state.monthViewOptions\n      );\n      viewDate = shiftDate(viewDate, { month: 1 });\n    }\n\n    return Object.assign({}, state, { monthsModel });\n  }\n\n  if (state.view.mode === 'month') {\n    const monthsCalendar = new Array(displayMonths);\n    for (\n      let calendarIndex = 0;\n      calendarIndex < displayMonths;\n      calendarIndex++\n    ) {\n      // todo: for unlinked calendars it will be harder\n      monthsCalendar[calendarIndex] = formatMonthsCalendar(\n        viewDate,\n        getFormatOptions(state)\n      );\n      viewDate = shiftDate(viewDate, { year: 1 });\n    }\n\n    return Object.assign({}, state, { monthsCalendar });\n  }\n\n  if (state.view.mode === 'year') {\n    const yearsCalendarModel = new Array(displayMonths);\n\n    for (\n      let calendarIndex = 0;\n      calendarIndex < displayMonths;\n      calendarIndex++\n    ) {\n      // todo: for unlinked calendars it will be harder\n      yearsCalendarModel[calendarIndex] = formatYearsCalendar(\n        viewDate,\n        getFormatOptions(state)\n      );\n      viewDate = shiftDate(viewDate, { year: yearsPerCalendar });\n    }\n\n    return Object.assign({}, state, { yearsCalendarModel });\n  }\n\n  return state;\n}\n\nfunction formatReducer(state: BsDatepickerState,\n                       action: Action): BsDatepickerState {\n  if (state.view.mode === 'day') {\n    const formattedMonths = state.monthsModel.map((month, monthIndex) =>\n      formatDaysCalendar(month, getFormatOptions(state), monthIndex)\n    );\n\n    return Object.assign({}, state, { formattedMonths });\n  }\n\n  // how many calendars\n  const displayMonths = state.displayMonths;\n  // check initial rendering\n  // use selected date on initial rendering if set\n  let viewDate = state.view.date;\n\n  if (state.view.mode === 'month') {\n    const monthsCalendar = new Array(displayMonths);\n    for (\n      let calendarIndex = 0;\n      calendarIndex < displayMonths;\n      calendarIndex++\n    ) {\n      // todo: for unlinked calendars it will be harder\n      monthsCalendar[calendarIndex] = formatMonthsCalendar(\n        viewDate,\n        getFormatOptions(state)\n      );\n      viewDate = shiftDate(viewDate, { year: 1 });\n    }\n\n    return Object.assign({}, state, { monthsCalendar });\n  }\n\n  if (state.view.mode === 'year') {\n    const yearsCalendarModel = new Array(displayMonths);\n    for (\n      let calendarIndex = 0;\n      calendarIndex < displayMonths;\n      calendarIndex++\n    ) {\n      // todo: for unlinked calendars it will be harder\n      yearsCalendarModel[calendarIndex] = formatYearsCalendar(\n        viewDate,\n        getFormatOptions(state)\n      );\n      viewDate = shiftDate(viewDate, { year: 16 });\n    }\n\n    return Object.assign({}, state, { yearsCalendarModel });\n  }\n\n  return state;\n}\n\nfunction flagReducer(state: BsDatepickerState,\n                     action: Action): BsDatepickerState {\n  if (state.view.mode === 'day') {\n    const flaggedMonths = state.formattedMonths.map(\n      (formattedMonth, monthIndex) =>\n        flagDaysCalendar(formattedMonth, {\n          isDisabled: state.isDisabled,\n          minDate: state.minDate,\n          maxDate: state.maxDate,\n          daysDisabled: state.daysDisabled,\n          datesDisabled: state.datesDisabled,\n          hoveredDate: state.hoveredDate,\n          selectedDate: state.selectedDate,\n          selectedRange: state.selectedRange,\n          displayMonths: state.displayMonths,\n          dateCustomClasses: state.dateCustomClasses,\n          monthIndex\n        })\n    );\n\n    return Object.assign({}, state, { flaggedMonths });\n  }\n\n  if (state.view.mode === 'month') {\n    const flaggedMonthsCalendar = state.monthsCalendar.map(\n      (formattedMonth, monthIndex) =>\n        flagMonthsCalendar(formattedMonth, {\n          isDisabled: state.isDisabled,\n          minDate: state.minDate,\n          maxDate: state.maxDate,\n          hoveredMonth: state.hoveredMonth,\n          displayMonths: state.displayMonths,\n          monthIndex\n        })\n    );\n\n    return Object.assign({}, state, { flaggedMonthsCalendar });\n  }\n\n  if (state.view.mode === 'year') {\n    const yearsCalendarFlagged = state.yearsCalendarModel.map(\n      (formattedMonth, yearIndex) =>\n        flagYearsCalendar(formattedMonth, {\n          isDisabled: state.isDisabled,\n          minDate: state.minDate,\n          maxDate: state.maxDate,\n          hoveredYear: state.hoveredYear,\n          displayMonths: state.displayMonths,\n          yearIndex\n        })\n    );\n\n    return Object.assign({}, state, { yearsCalendarFlagged });\n  }\n\n  return state;\n}\n\nfunction getFormatOptions(state: BsDatepickerState): DatepickerFormatOptions {\n  return {\n    locale: state.locale,\n\n    monthTitle: state.monthTitle,\n    yearTitle: state.yearTitle,\n\n    dayLabel: state.dayLabel,\n    monthLabel: state.monthLabel,\n    yearLabel: state.yearLabel,\n\n    weekNumbers: state.weekNumbers\n  };\n}\n\n/**\n * if view date is provided (bsValue|ngModel) it should be shown\n * if view date is not provider:\n * if minDate>currentDate (default view value), show minDate\n * if maxDate<currentDate(default view value) show maxDate\n */\nfunction getViewDate(viewDate: Date | Date[], minDate: Date, maxDate: Date) {\n  const _date = Array.isArray(viewDate) ? viewDate[0] : viewDate;\n\n  if (minDate && isAfter(minDate, _date, 'day')) {\n    return minDate;\n  }\n\n  if (maxDate && isBefore(maxDate, _date, 'day')) {\n    return maxDate;\n  }\n\n  return _date;\n}\n","import { isSameMonth, shiftDate } from 'ngx-bootstrap/chronos';\nimport {\n  MonthsCalendarViewModel,\n  CalendarCellViewModel\n} from '../models';\nimport { isMonthDisabled, isYearDisabled } from '../utils/bs-calendar-utils';\n\nexport interface FlagMonthCalendarOptions {\n  isDisabled: boolean;\n  minDate: Date;\n  maxDate: Date;\n  hoveredMonth: Date;\n  displayMonths: number;\n  monthIndex: number;\n}\n\nexport function flagMonthsCalendar(\n  monthCalendar: MonthsCalendarViewModel,\n  options: FlagMonthCalendarOptions\n): MonthsCalendarViewModel {\n  monthCalendar.months.forEach(\n    (months: CalendarCellViewModel[], rowIndex: number) => {\n      months.forEach((month: CalendarCellViewModel, monthIndex: number) => {\n        const isHovered = isSameMonth(month.date, options.hoveredMonth);\n        const isDisabled =\n          options.isDisabled ||\n          isMonthDisabled(month.date, options.minDate, options.maxDate);\n        const newMonth = Object.assign(/*{},*/ month, {\n          isHovered,\n          isDisabled\n        });\n        if (\n          month.isHovered !== newMonth.isHovered ||\n          month.isDisabled !== newMonth.isDisabled\n        ) {\n          monthCalendar.months[rowIndex][monthIndex] = newMonth;\n        }\n      });\n    }\n  );\n\n  // todo: add check for linked calendars\n  monthCalendar.hideLeftArrow =\n    options.monthIndex > 0 && options.monthIndex !== options.displayMonths;\n  monthCalendar.hideRightArrow =\n    options.monthIndex < options.displayMonths &&\n    options.monthIndex + 1 !== options.displayMonths;\n\n  monthCalendar.disableLeftArrow = isYearDisabled(\n    shiftDate(monthCalendar.months[0][0].date, { year: -1 }),\n    options.minDate,\n    options.maxDate\n  );\n  monthCalendar.disableRightArrow = isYearDisabled(\n    shiftDate(monthCalendar.months[0][0].date, { year: 1 }),\n    options.minDate,\n    options.maxDate\n  );\n\n  return monthCalendar;\n}\n","import { isSameYear, shiftDate } from 'ngx-bootstrap/chronos';\nimport { YearsCalendarViewModel, CalendarCellViewModel } from '../models';\nimport { isYearDisabled } from '../utils/bs-calendar-utils';\n\nexport interface FlagYearsCalendarOptions {\n  isDisabled: boolean;\n  minDate: Date;\n  maxDate: Date;\n  hoveredYear: Date;\n  displayMonths: number;\n  yearIndex: number;\n}\n\nexport function flagYearsCalendar(\n  yearsCalendar: YearsCalendarViewModel,\n  options: FlagYearsCalendarOptions\n): YearsCalendarViewModel {\n  yearsCalendar.years.forEach(\n    (years: CalendarCellViewModel[], rowIndex: number) => {\n      years.forEach((year: CalendarCellViewModel, yearIndex: number) => {\n        const isHovered = isSameYear(year.date, options.hoveredYear);\n        const isDisabled =\n          options.isDisabled ||\n          isYearDisabled(year.date, options.minDate, options.maxDate);\n\n        const newMonth = Object.assign(/*{},*/ year, { isHovered, isDisabled });\n        if (\n          year.isHovered !== newMonth.isHovered ||\n          year.isDisabled !== newMonth.isDisabled\n        ) {\n          yearsCalendar.years[rowIndex][yearIndex] = newMonth;\n        }\n      });\n    }\n  );\n\n  // todo: add check for linked calendars\n  yearsCalendar.hideLeftArrow =\n    options.yearIndex > 0 && options.yearIndex !== options.displayMonths;\n  yearsCalendar.hideRightArrow =\n    options.yearIndex < options.displayMonths &&\n    options.yearIndex + 1 !== options.displayMonths;\n\n  yearsCalendar.disableLeftArrow = isYearDisabled(\n    shiftDate(yearsCalendar.years[0][0].date, { year: -1 }),\n    options.minDate,\n    options.maxDate\n  );\n  const i = yearsCalendar.years.length - 1;\n  const j = yearsCalendar.years[i].length - 1;\n  yearsCalendar.disableRightArrow = isYearDisabled(\n    shiftDate(yearsCalendar.years[i][j].date, { year: 1 }),\n    options.minDate,\n    options.maxDate\n  );\n\n  return yearsCalendar;\n}\n","import { Injectable } from '@angular/core';\nimport { MiniStore, Action, MiniState } from 'ngx-bootstrap/mini-ngrx';\nimport { BsDatepickerState, initialDatepickerState } from './bs-datepicker.state';\nimport { BehaviorSubject } from 'rxjs';\nimport { bsDatepickerReducer } from './bs-datepicker.reducer';\n\n@Injectable()\nexport class BsDatepickerStore extends MiniStore<BsDatepickerState> {\n  constructor() {\n    const _dispatcher = new BehaviorSubject<Action>({\n      type: '[datepicker] dispatcher init'\n    });\n    const state = new MiniState<BsDatepickerState>(\n      initialDatepickerState,\n      _dispatcher,\n      bsDatepickerReducer\n    );\n    super(_dispatcher, bsDatepickerReducer, state);\n  }\n}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\n\nimport { BsDatepickerAbstractComponent } from '../../base/bs-datepicker-container';\nimport { BsDatepickerConfig } from '../../bs-datepicker.config';\nimport { DayViewModel } from '../../models';\nimport { BsDatepickerActions } from '../../reducer/bs-datepicker.actions';\nimport { BsDatepickerEffects } from '../../reducer/bs-datepicker.effects';\nimport { BsDatepickerStore } from '../../reducer/bs-datepicker.store';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\nimport { Subscription } from 'rxjs';\n\n@Component({\n  selector: 'bs-datepicker-container',\n  providers: [BsDatepickerStore, BsDatepickerEffects],\n  templateUrl: './bs-datepicker-view.html',\n  host: {\n    '(click)': '_stopPropagation($event)',\n    style: 'position: absolute; display: block;',\n    role: 'dialog',\n    'aria-label': 'calendar'\n  }\n})\nexport class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent\n  implements OnInit, OnDestroy {\n  set value(value: Date) {\n    this._effects.setValue(value);\n  }\n  valueChange: EventEmitter<Date> = new EventEmitter<Date>();\n\n  _subs: Subscription[] = [];\n  constructor(\n    private _config: BsDatepickerConfig,\n    private _store: BsDatepickerStore,\n    private _actions: BsDatepickerActions,\n    _effects: BsDatepickerEffects,\n    private _positionService: PositioningService\n  ) {\n    super();\n    this._effects = _effects;\n  }\n\n  ngOnInit(): void {\n    this._positionService.setOptions({\n      modifiers: {\n        flip: {\n          enabled: this._config.adaptivePosition\n        }\n      },\n      allowedPositions: ['top', 'bottom']\n    });\n\n    this.isOtherMonthsActive = this._config.selectFromOtherMonth;\n    this.containerClass = this._config.containerClass;\n    this._effects\n      .init(this._store)\n      // intial state options\n      .setOptions(this._config)\n      // data binding view --> model\n      .setBindings(this)\n      // set event handlers\n      .setEventHandlers(this)\n      .registerDatepickerSideEffects();\n\n    // todo: move it somewhere else\n    // on selected date change\n    this._subs.push(\n      this._store\n        /* tslint:disable-next-line: no-any */\n        .select((state: any) => state.selectedDate)\n        /* tslint:disable-next-line: no-any */\n        .subscribe((date: any) => this.valueChange.emit(date))\n    );\n  }\n\n  daySelectHandler(day: DayViewModel): void {\n    const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);\n\n    if (isDisabled) {\n      return;\n    }\n\n    this._store.dispatch(this._actions.select(day.date));\n  }\n\n  ngOnDestroy(): void {\n    for (const sub of this._subs) {\n      sub.unsubscribe();\n    }\n    this._effects.destroy();\n  }\n}\n","import {\n  ComponentRef, Directive, ElementRef, EventEmitter, Input, OnChanges,\n  OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewContainerRef\n} from '@angular/core';\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { BsDatepickerContainerComponent } from './themes/bs/bs-datepicker-container.component';\nimport { Subscription } from 'rxjs';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\nimport { BsDatepickerViewMode, DatepickerDateCustomClasses } from './models';\n\n@Directive({\n  selector: '[bsDatepicker]',\n  exportAs: 'bsDatepicker'\n})\nexport class BsDatepickerDirective implements OnInit, OnDestroy, OnChanges {\n  /**\n   * Placement of a datepicker. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  @Input() placement: 'top' | 'bottom' | 'left' | 'right' = 'bottom';\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  @Input() triggers = 'click';\n  /**\n   * Close datepicker on outside click\n   */\n  @Input() outsideClick = true;\n  /**\n   * A selector specifying the element the datepicker should be appended to.\n   */\n  @Input() container = 'body';\n\n  @Input() outsideEsc = true;\n\n  /**\n   * Returns whether or not the datepicker is currently being shown\n   */\n  @Input()\n  get isOpen(): boolean {\n    return this._datepicker.isShown;\n  }\n\n  set isOpen(value: boolean) {\n    if (value) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Emits an event when the datepicker is shown\n   */\n  /* tslint:disable-next-line: no-any*/\n  @Output() onShown: EventEmitter<any>;\n  /**\n   * Emits an event when the datepicker is hidden\n   */\n  /* tslint:disable-next-line: no-any*/\n  @Output() onHidden: EventEmitter<any>;\n\n  _bsValue: Date;\n  /**\n   * Initial value of datepicker\n   */\n  @Input()\n  set bsValue(value: Date) {\n    if (this._bsValue === value) {\n      return;\n    }\n    this._bsValue = value;\n    this.bsValueChange.emit(value);\n  }\n\n  /**\n   * Config object for datepicker\n   */\n  @Input() bsConfig: Partial<BsDatepickerConfig>;\n  /**\n   * Indicates whether datepicker's content is enabled or not\n   */\n  @Input() isDisabled: boolean;\n  /**\n   * Minimum date which is available for selection\n   */\n  @Input() minDate: Date;\n  /**\n   * Maximum date which is available for selection\n   */\n  @Input() maxDate: Date;\n\n  /**\n   * Minimum view mode : day, month, or year\n   */\n  @Input() minMode: BsDatepickerViewMode;\n\n  /**\n   * Disable Certain days in the week\n   */\n  @Input() daysDisabled: number[];\n\n  /**\n   * Disable specific dates\n   */\n  @Input() datesDisabled: Date[];\n  /**\n   * Date custom classes\n   */\n  @Input() dateCustomClasses: DatepickerDateCustomClasses[];\n  /**\n   * Emits when datepicker value has been changed\n   */\n  @Output() bsValueChange: EventEmitter<Date> = new EventEmitter();\n\n  protected _subs: Subscription[] = [];\n\n  private _datepicker: ComponentLoader<BsDatepickerContainerComponent>;\n  private _datepickerRef: ComponentRef<BsDatepickerContainerComponent>;\n\n  constructor(public _config: BsDatepickerConfig,\n              _elementRef: ElementRef,\n              _renderer: Renderer2,\n              _viewContainerRef: ViewContainerRef,\n              cis: ComponentLoaderFactory) {\n    // todo: assign only subset of fields\n    Object.assign(this, this._config);\n    this._datepicker = cis.createLoader<BsDatepickerContainerComponent>(\n      _elementRef,\n      _viewContainerRef,\n      _renderer\n    );\n    this.onShown = this._datepicker.onShown;\n    this.onHidden = this._datepicker.onHidden;\n  }\n\n  ngOnInit(): void {\n    this._datepicker.listen({\n      outsideClick: this.outsideClick,\n      outsideEsc: this.outsideEsc,\n      triggers: this.triggers,\n      show: () => this.show()\n    });\n    this.setConfig();\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (!this._datepickerRef || !this._datepickerRef.instance) {\n      return;\n    }\n\n    if (changes.minDate) {\n      this._datepickerRef.instance.minDate = this.minDate;\n    }\n\n    if (changes.maxDate) {\n      this._datepickerRef.instance.maxDate = this.maxDate;\n    }\n\n    if (changes.daysDisabled) {\n      this._datepickerRef.instance.daysDisabled = this.daysDisabled;\n    }\n\n    if (changes.datesDisabled) {\n      this._datepickerRef.instance.datesDisabled = this.datesDisabled;\n    }\n\n    if (changes.isDisabled) {\n      this._datepickerRef.instance.isDisabled = this.isDisabled;\n    }\n\n    if (changes.dateCustomClasses) {\n      this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;\n    }\n  }\n\n  /**\n   * Opens an elementâs datepicker. This is considered a âmanualâ triggering of\n   * the datepicker.\n   */\n  show(): void {\n    if (this._datepicker.isShown) {\n      return;\n    }\n\n    this.setConfig();\n\n    this._datepickerRef = this._datepicker\n      .provide({provide: BsDatepickerConfig, useValue: this._config})\n      .attach(BsDatepickerContainerComponent)\n      .to(this.container)\n      .position({attachment: this.placement})\n      .show({placement: this.placement});\n\n    // if date changes from external source (model -> view)\n    this._subs.push(\n      this.bsValueChange.subscribe((value: Date) => {\n        this._datepickerRef.instance.value = value;\n      })\n    );\n\n    // if date changes from picker (view -> model)\n    this._subs.push(\n      this._datepickerRef.instance.valueChange.subscribe((value: Date) => {\n        this.bsValue = value;\n        this.hide();\n      })\n    );\n  }\n\n  /**\n   * Closes an elementâs datepicker. This is considered a âmanualâ triggering of\n   * the datepicker.\n   */\n  hide(): void {\n    if (this.isOpen) {\n      this._datepicker.hide();\n    }\n    for (const sub of this._subs) {\n      sub.unsubscribe();\n    }\n  }\n\n  /**\n   * Toggles an elementâs datepicker. This is considered a âmanualâ triggering\n   * of the datepicker.\n   */\n  toggle(): void {\n    if (this.isOpen) {\n      return this.hide();\n    }\n\n    this.show();\n  }\n\n  /**\n   * Set config for datepicker\n   */\n  setConfig(): void {\n    this._config = Object.assign({}, this._config, this.bsConfig, {\n      value: this._bsValue,\n      isDisabled: this.isDisabled,\n      minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,\n      maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,\n      daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,\n      dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,\n      datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,\n      minMode: this.minMode || this.bsConfig && this.bsConfig.minMode\n    });\n  }\n\n  ngOnDestroy(): void {\n    this._datepicker.dispose();\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\n\n@Injectable()\nexport class BsDatepickerInlineConfig extends BsDatepickerConfig { }\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { BsDatepickerContainerComponent } from './bs-datepicker-container.component';\n\nimport { BsDatepickerConfig } from '../../bs-datepicker.config';\nimport { BsDatepickerActions } from '../../reducer/bs-datepicker.actions';\nimport { BsDatepickerEffects } from '../../reducer/bs-datepicker.effects';\nimport { BsDatepickerStore } from '../../reducer/bs-datepicker.store';\n\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\n@Component({\n  selector: 'bs-datepicker-inline-container',\n  providers: [BsDatepickerStore, BsDatepickerEffects],\n  templateUrl: './bs-datepicker-view.html',\n  host: {\n    '(click)': '_stopPropagation($event)',\n    style: 'display: inline-block;'\n  }\n})\nexport class BsDatepickerInlineContainerComponent extends BsDatepickerContainerComponent\n  implements OnInit, OnDestroy {\n  constructor(\n    _config: BsDatepickerConfig,\n    _store: BsDatepickerStore,\n    _actions: BsDatepickerActions,\n    _effects: BsDatepickerEffects,\n    _positioningService: PositioningService\n  ) {\n    super(_config, _store, _actions, _effects, _positioningService);\n  }\n}\n","import {\n  ComponentRef, Directive, ElementRef, EventEmitter, Input, OnChanges,\n  OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewContainerRef\n} from '@angular/core';\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { BsDatepickerInlineContainerComponent } from './themes/bs/bs-datepicker-inline-container.component';\nimport { Subscription } from 'rxjs';\nimport { BsDatepickerInlineConfig } from './bs-datepicker-inline.config';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\nimport { DatepickerDateCustomClasses } from './models';\n\n@Directive({\n  selector: 'bs-datepicker-inline',\n  exportAs: 'bsDatepickerInline'\n})\nexport class BsDatepickerInlineDirective implements OnInit, OnDestroy, OnChanges {\n  _bsValue: Date;\n  /**\n   * Initial value of datepicker\n   */\n  @Input()\n  set bsValue(value: Date) {\n    if (this._bsValue === value) {\n      return;\n    }\n    this._bsValue = value;\n    this.bsValueChange.emit(value);\n  }\n\n  /**\n   * Config object for datepicker\n   */\n  @Input() bsConfig: Partial<BsDatepickerInlineConfig>;\n  /**\n   * Indicates whether datepicker is enabled or not\n   */\n  @Input() isDisabled: boolean;\n  /**\n   * Minimum date which is available for selection\n   */\n  @Input() minDate: Date;\n  /**\n   * Maximum date which is available for selection\n   */\n  @Input() maxDate: Date;\n  /**\n   * Date custom classes\n   */\n  @Input() dateCustomClasses: DatepickerDateCustomClasses[];\n  /**\n   * Disable specific dates\n   */\n  @Input() datesDisabled: Date[];\n  /**\n   * Emits when datepicker value has been changed\n   */\n  @Output() bsValueChange: EventEmitter<Date> = new EventEmitter();\n\n  protected _subs: Subscription[] = [];\n\n  private _datepicker: ComponentLoader<BsDatepickerInlineContainerComponent>;\n  private _datepickerRef: ComponentRef<BsDatepickerInlineContainerComponent>;\n\n  constructor(public _config: BsDatepickerInlineConfig,\n              private _elementRef: ElementRef,\n              _renderer: Renderer2,\n              _viewContainerRef: ViewContainerRef,\n              cis: ComponentLoaderFactory) {\n    // todo: assign only subset of fields\n    Object.assign(this, this._config);\n    this._datepicker = cis.createLoader<BsDatepickerInlineContainerComponent>(\n      _elementRef,\n      _viewContainerRef,\n      _renderer\n    );\n  }\n\n  ngOnInit(): void {\n    this.setConfig();\n\n    this._datepickerRef = this._datepicker\n      .provide({provide: BsDatepickerConfig, useValue: this._config})\n      .attach(BsDatepickerInlineContainerComponent)\n      .to(this._elementRef)\n      .show();\n\n    // if date changes from external source (model -> view)\n    this._subs.push(\n      this.bsValueChange.subscribe((value: Date) => {\n        this._datepickerRef.instance.value = value;\n      })\n    );\n\n    // if date changes from picker (view -> model)\n    this._subs.push(\n      this._datepickerRef.instance.valueChange.subscribe((value: Date) => {\n        this.bsValue = value;\n      })\n    );\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (!this._datepickerRef || !this._datepickerRef.instance) {\n      return;\n    }\n\n    if (changes.minDate) {\n      this._datepickerRef.instance.minDate = this.minDate;\n    }\n\n    if (changes.maxDate) {\n      this._datepickerRef.instance.maxDate = this.maxDate;\n    }\n\n    if (changes.datesDisabled) {\n      this._datepickerRef.instance.datesDisabled = this.datesDisabled;\n    }\n\n    if (changes.isDisabled) {\n      this._datepickerRef.instance.isDisabled = this.isDisabled;\n    }\n\n    if (changes.dateCustomClasses) {\n      this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;\n    }\n  }\n\n  /**\n   * Set config for datepicker\n   */\n  setConfig(): void {\n    this._config = Object.assign({}, this._config, this.bsConfig, {\n      value: this._bsValue,\n      isDisabled: this.isDisabled,\n      minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,\n      maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,\n      dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,\n      datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled\n    });\n  }\n\n  ngOnDestroy(): any {\n    this._datepicker.dispose();\n  }\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  forwardRef,\n  Host,\n  Provider,\n  Renderer2\n} from '@angular/core';\n\nimport {\n  AbstractControl,\n  ControlValueAccessor,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  ValidationErrors,\n  Validator\n} from '@angular/forms';\n\nimport {\n  parseDate,\n  formatDate,\n  getLocale,\n  isAfter,\n  isBefore,\n  isDate,\n  isDateValid\n} from 'ngx-bootstrap/chronos';\n\nimport { BsDatepickerDirective } from './bs-datepicker.component';\nimport { BsLocaleService } from './bs-locale.service';\n\nconst BS_DATEPICKER_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => BsDatepickerInputDirective),\n  multi: true\n};\n\nconst BS_DATEPICKER_VALIDATOR: Provider = {\n  provide: NG_VALIDATORS,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => BsDatepickerInputDirective),\n  multi: true\n};\n\n@Directive({\n  selector: `input[bsDatepicker]`,\n  host: {\n    '(change)': 'onChange($event)',\n    '(keyup.esc)': 'hide()',\n    '(blur)': 'onBlur()'\n  },\n  providers: [BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR]\n})\nexport class BsDatepickerInputDirective\n  implements ControlValueAccessor, Validator {\n  private _onChange = Function.prototype;\n  private _onTouched = Function.prototype;\n  /* tslint:disable-next-line: no-unused-variable */\n  private _validatorChange = Function.prototype;\n  private _value: Date;\n\n  constructor(@Host() private _picker: BsDatepickerDirective,\n              private _localeService: BsLocaleService,\n              private _renderer: Renderer2,\n              private _elRef: ElementRef,\n              private changeDetection: ChangeDetectorRef) {\n    // update input value on datepicker value update\n    this._picker.bsValueChange.subscribe((value: Date) => {\n      this._setInputValue(value);\n      if (this._value !== value) {\n        this._value = value;\n        this._onChange(value);\n        this._onTouched();\n      }\n      this.changeDetection.markForCheck();\n    });\n\n    // update input value on locale change\n    this._localeService.localeChange.subscribe(() => {\n      this._setInputValue(this._value);\n    });\n  }\n\n  _setInputValue(value: Date): void {\n    const initialDate = !value ? ''\n      : formatDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);\n\n    this._renderer.setProperty(this._elRef.nativeElement, 'value', initialDate);\n  }\n\n  onChange(event: Event) {\n    /* tslint:disable-next-line: no-any*/\n    this.writeValue((event.target as any).value);\n    this._onChange(this._value);\n    this._onTouched();\n  }\n\n  validate(c: AbstractControl): ValidationErrors | null {\n    const _value: Date | string = c.value;\n\n    /* tslint:disable-next-line: prefer-switch */\n    if (_value === null || _value === undefined || _value === '') {\n      return null;\n    }\n\n    if (isDate(_value)) {\n      const _isDateValid = isDateValid(_value);\n      if (!_isDateValid) {\n        return { bsDate: { invalid: _value } };\n      }\n\n      if (this._picker && this._picker.minDate && isBefore(_value, this._picker.minDate, 'date')) {\n        return { bsDate: { minDate: this._picker.minDate } };\n      }\n\n      if (this._picker && this._picker.maxDate && isAfter(_value, this._picker.maxDate, 'date')) {\n        return { bsDate: { maxDate: this._picker.maxDate } };\n      }\n    }\n  }\n\n  registerOnValidatorChange(fn: () => void): void {\n    this._validatorChange = fn;\n  }\n\n  writeValue(value: Date | string) {\n    if (!value) {\n      this._value = null;\n    } else {\n      const _localeKey = this._localeService.currentLocale;\n      const _locale = getLocale(_localeKey);\n      if (!_locale) {\n        throw new Error(\n          `Locale \"${_localeKey}\" is not defined, please add it with \"defineLocale(...)\"`\n        );\n      }\n      this._value = parseDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);\n    }\n\n    this._picker.bsValue = this._value;\n  }\n\n  setDisabledState(isDisabled: boolean): void {\n    this._picker.isDisabled = isDisabled;\n    if (isDisabled) {\n      this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');\n\n      return;\n    }\n    this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');\n  }\n\n  registerOnChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n\n  registerOnTouched(fn: () => void): void {\n    this._onTouched = fn;\n  }\n\n  onBlur() {\n    this._onTouched();\n  }\n\n  hide() {\n    this._picker.hide();\n    this._renderer.selectRootElement(this._elRef.nativeElement).blur();\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\n\n@Injectable()\nexport class BsDaterangepickerConfig extends BsDatepickerConfig {\n  // DatepickerRenderOptions\n  displayMonths = 2;\n}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\n\nimport { BsDatepickerAbstractComponent } from '../../base/bs-datepicker-container';\nimport { BsDatepickerConfig } from '../../bs-datepicker.config';\nimport { DayViewModel } from '../../models';\nimport { BsDatepickerActions } from '../../reducer/bs-datepicker.actions';\nimport { BsDatepickerEffects } from '../../reducer/bs-datepicker.effects';\nimport { BsDatepickerStore } from '../../reducer/bs-datepicker.store';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\nimport { Subscription } from 'rxjs';\n\n\n@Component({\n  selector: 'bs-daterangepicker-container',\n  providers: [BsDatepickerStore, BsDatepickerEffects],\n  templateUrl: './bs-datepicker-view.html',\n  host: {\n    '(click)': '_stopPropagation($event)',\n    style: 'position: absolute; display: block;',\n    role: 'dialog',\n    'aria-label': 'calendar'\n  }\n})\nexport class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent\n  implements OnInit, OnDestroy {\n  set value(value: Date[]) {\n    this._effects.setRangeValue(value);\n  }\n\n  valueChange = new EventEmitter<Date[]>();\n\n  _rangeStack: Date[] = [];\n  _subs: Subscription[] = [];\n  constructor(\n    _effects: BsDatepickerEffects,\n    private _actions: BsDatepickerActions,\n    private _config: BsDatepickerConfig,\n    private _store: BsDatepickerStore,\n    private _positionService: PositioningService\n  ) {\n    super();\n    this._effects = _effects;\n  }\n\n  ngOnInit(): void {\n    this._positionService.setOptions({\n      modifiers: {\n        flip: {\n          enabled: this._config.adaptivePosition\n        }\n      },\n      allowedPositions: ['top', 'bottom']\n    });\n\n    this.containerClass = this._config.containerClass;\n    this.isOtherMonthsActive = this._config.selectFromOtherMonth;\n    this._effects\n      .init(this._store)\n      // intial state options\n      // todo: fix this, split configs\n      .setOptions(this._config)\n      // data binding view --> model\n      .setBindings(this)\n      // set event handlers\n      .setEventHandlers(this)\n      .registerDatepickerSideEffects();\n\n    // todo: move it somewhere else\n    // on selected date change\n    this._subs.push(\n      this._store\n        .select(state => state.selectedRange)\n        .subscribe(date => this.valueChange.emit(date))\n    );\n  }\n\n  daySelectHandler(day: DayViewModel): void {\n    const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);\n\n    if (isDisabled) {\n      return;\n    }\n\n    // if only one date is already selected\n    // and user clicks on previous date\n    // start selection from new date\n    // but if new date is after initial one\n    // than finish selection\n    if (this._rangeStack.length === 1) {\n      this._rangeStack =\n        day.date >= this._rangeStack[0]\n          ? [this._rangeStack[0], day.date]\n          : [day.date];\n    }\n\n    if (this._rangeStack.length === 0) {\n      this._rangeStack = [day.date];\n    }\n\n    this._store.dispatch(this._actions.selectRange(this._rangeStack));\n\n    if (this._rangeStack.length === 2) {\n      this._rangeStack = [];\n    }\n  }\n\n  ngOnDestroy(): void {\n    for (const sub of this._subs) {\n      sub.unsubscribe();\n    }\n    this._effects.destroy();\n  }\n}\n","import {\n  ComponentRef,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  Renderer2,\n  SimpleChanges,\n  ViewContainerRef\n} from '@angular/core';\nimport { BsDaterangepickerConfig } from './bs-daterangepicker.config';\nimport { BsDaterangepickerContainerComponent } from './themes/bs/bs-daterangepicker-container.component';\nimport { Subscription } from 'rxjs';\nimport { ComponentLoaderFactory, ComponentLoader } from 'ngx-bootstrap/component-loader';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\nimport { filter } from 'rxjs/operators';\nimport { DatepickerDateCustomClasses } from './models';\n\n@Directive({\n  selector: '[bsDaterangepicker]',\n  exportAs: 'bsDaterangepicker'\n})\nexport class BsDaterangepickerDirective\n  implements OnInit, OnDestroy, OnChanges {\n  /**\n   * Placement of a daterangepicker. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  @Input() placement: 'top' | 'bottom' | 'left' | 'right' = 'bottom';\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  @Input() triggers = 'click';\n  /**\n   * Close daterangepicker on outside click\n   */\n  @Input() outsideClick = true;\n  /**\n   * A selector specifying the element the daterangepicker should be appended to.\n   */\n  @Input() container = 'body';\n\n  @Input() outsideEsc = true;\n\n  /**\n   * Returns whether or not the daterangepicker is currently being shown\n   */\n  @Input()\n  get isOpen(): boolean {\n    return this._datepicker.isShown;\n  }\n\n  set isOpen(value: boolean) {\n    if (value) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Emits an event when the daterangepicker is shown\n   */\n  /* tslint:disable-next-line: no-any*/\n  @Output() onShown: EventEmitter<any>;\n  /**\n   * Emits an event when the daterangepicker is hidden\n   */\n  /* tslint:disable-next-line: no-any*/\n  @Output() onHidden: EventEmitter<any>;\n\n  _bsValue: Date[];\n  /**\n   * Initial value of daterangepicker\n   */\n  @Input()\n  set bsValue(value: Date[]) {\n    if (this._bsValue === value) {\n      return;\n    }\n    this._bsValue = value;\n    this.bsValueChange.emit(value);\n  }\n\n  /**\n   * Config object for daterangepicker\n   */\n  @Input() bsConfig: Partial<BsDaterangepickerConfig>;\n  /**\n   * Indicates whether daterangepicker's content is enabled or not\n   */\n  @Input() isDisabled: boolean;\n  /**\n   * Minimum date which is available for selection\n   */\n  @Input() minDate: Date;\n  /**\n   * Maximum date which is available for selection\n   */\n  @Input() maxDate: Date;\n  /**\n   * Date custom classes\n   */\n  @Input() dateCustomClasses: DatepickerDateCustomClasses[];\n  /**\n   * Disable specific dates\n   */\n  @Input() datesDisabled: Date[];\n  /**\n   * Emits when daterangepicker value has been changed\n   */\n  @Output() bsValueChange: EventEmitter<Date[]> = new EventEmitter();\n\n  protected _subs: Subscription[] = [];\n\n  private _datepicker: ComponentLoader<BsDaterangepickerContainerComponent>;\n  private _datepickerRef: ComponentRef<BsDaterangepickerContainerComponent>;\n\n  constructor(public _config: BsDaterangepickerConfig,\n              _elementRef: ElementRef,\n              _renderer: Renderer2,\n              _viewContainerRef: ViewContainerRef,\n              cis: ComponentLoaderFactory) {\n    this._datepicker = cis.createLoader<BsDaterangepickerContainerComponent>(\n      _elementRef,\n      _viewContainerRef,\n      _renderer\n    );\n    Object.assign(this, _config);\n    this.onShown = this._datepicker.onShown;\n    this.onHidden = this._datepicker.onHidden;\n  }\n\n  ngOnInit(): void {\n    this._datepicker.listen({\n      outsideClick: this.outsideClick,\n      outsideEsc: this.outsideEsc,\n      triggers: this.triggers,\n      show: () => this.show()\n    });\n    this.setConfig();\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (!this._datepickerRef || !this._datepickerRef.instance) {\n      return;\n    }\n\n    if (changes.minDate) {\n      this._datepickerRef.instance.minDate = this.minDate;\n    }\n\n    if (changes.maxDate) {\n      this._datepickerRef.instance.maxDate = this.maxDate;\n    }\n\n    if (changes.datesDisabled) {\n      this._datepickerRef.instance.datesDisabled = this.datesDisabled;\n    }\n\n    if (changes.isDisabled) {\n      this._datepickerRef.instance.isDisabled = this.isDisabled;\n    }\n\n    if (changes.dateCustomClasses) {\n      this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;\n    }\n  }\n\n  /**\n   * Opens an elementâs datepicker. This is considered a âmanualâ triggering of\n   * the datepicker.\n   */\n  show(): void {\n    if (this._datepicker.isShown) {\n      return;\n    }\n\n    this.setConfig();\n\n    this._datepickerRef = this._datepicker\n      .provide({provide: BsDatepickerConfig, useValue: this._config})\n      .attach(BsDaterangepickerContainerComponent)\n      .to(this.container)\n      .position({attachment: this.placement})\n      .show({placement: this.placement});\n\n    // if date changes from external source (model -> view)\n    this._subs.push(\n      this.bsValueChange.subscribe((value: Date[]) => {\n        this._datepickerRef.instance.value = value;\n      })\n    );\n\n    // if date changes from picker (view -> model)\n    this._subs.push(\n      this._datepickerRef.instance.valueChange\n        .pipe(\n          filter((range: Date[]) => range && range[0] && !!range[1])\n        )\n        .subscribe((value: Date[]) => {\n          this.bsValue = value;\n          this.hide();\n        })\n    );\n  }\n\n  /**\n   * Set config for daterangepicker\n   */\n  setConfig() {\n    this._config = Object.assign(\n      {},\n      this._config,\n      this.bsConfig,\n      {\n        value: this._bsValue,\n        isDisabled: this.isDisabled,\n        minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,\n        maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,\n        dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,\n        datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled\n      }\n    );\n  }\n\n  /**\n   * Closes an elementâs datepicker. This is considered a âmanualâ triggering of\n   * the datepicker.\n   */\n  hide(): void {\n    if (this.isOpen) {\n      this._datepicker.hide();\n    }\n    for (const sub of this._subs) {\n      sub.unsubscribe();\n    }\n  }\n\n  /**\n   * Toggles an elementâs datepicker. This is considered a âmanualâ triggering\n   * of the datepicker.\n   */\n  toggle(): void {\n    if (this.isOpen) {\n      return this.hide();\n    }\n\n    this.show();\n  }\n\n  ngOnDestroy(): void {\n    this._datepicker.dispose();\n  }\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  forwardRef,\n  Host,\n  Provider,\n  Renderer2\n} from '@angular/core';\nimport {\n  AbstractControl,\n  ControlValueAccessor,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  ValidationErrors,\n  Validator\n} from '@angular/forms';\nimport { parseDate, formatDate, getLocale, isAfter, isBefore, isArray, isDateValid } from 'ngx-bootstrap/chronos';\nimport { BsDaterangepickerDirective } from './bs-daterangepicker.component';\nimport { BsLocaleService } from './bs-locale.service';\n\nconst BS_DATERANGEPICKER_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => BsDaterangepickerInputDirective),\n  multi: true\n};\n\nconst BS_DATERANGEPICKER_VALIDATOR: Provider = {\n  provide: NG_VALIDATORS,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => BsDaterangepickerInputDirective),\n  multi: true\n};\n\n\n@Directive({\n  selector: `input[bsDaterangepicker]`,\n  host: {\n    '(change)': 'onChange($event)',\n    '(keyup.esc)': 'hide()',\n    '(blur)': 'onBlur()'\n  },\n  providers: [BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR]\n})\nexport class BsDaterangepickerInputDirective\n  implements ControlValueAccessor, Validator {\n  private _onChange = Function.prototype;\n  private _onTouched = Function.prototype;\n  /* tslint:disable-next-line: no-unused-variable */\n  private _validatorChange = Function.prototype;\n  private _value: Date[];\n\n  constructor(@Host() private _picker: BsDaterangepickerDirective,\n              private _localeService: BsLocaleService,\n              private _renderer: Renderer2,\n              private _elRef: ElementRef,\n              private changeDetection: ChangeDetectorRef) {\n    // update input value on datepicker value update\n    this._picker.bsValueChange.subscribe((value: Date[]) => {\n      this._setInputValue(value);\n      if (this._value !== value) {\n        this._value = value;\n        this._onChange(value);\n        this._onTouched();\n      }\n      this.changeDetection.markForCheck();\n    });\n\n    // update input value on locale change\n    this._localeService.localeChange.subscribe(() => {\n      this._setInputValue(this._value);\n    });\n  }\n\n  _setInputValue(date: Date[]): void {\n    let range = '';\n    if (date) {\n      const start: string = !date[0] ? ''\n        : formatDate(date[0],\n          this._picker._config.rangeInputFormat,\n          this._localeService.currentLocale\n        );\n      const end: string = !date[1] ? ''\n        : formatDate(\n          date[1],\n          this._picker._config.rangeInputFormat,\n          this._localeService.currentLocale\n        );\n      range = (start && end) ? start + this._picker._config.rangeSeparator + end : '';\n    }\n    this._renderer.setProperty(this._elRef.nativeElement, 'value', range);\n  }\n\n  onChange(event: Event) {\n    /* tslint:disable-next-line: no-any*/\n    this.writeValue((event.target as any).value);\n    this._onChange(this._value);\n    this._onTouched();\n  }\n\n  validate(c: AbstractControl): ValidationErrors | null {\n    const _value: [Date, Date] = c.value;\n\n    if (_value === null || _value === undefined || !isArray(_value)) {\n      return null;\n    }\n\n    const _isFirstDateValid = isDateValid(_value[0]);\n    const _isSecondDateValid = isDateValid(_value[1]);\n\n    if (!_isFirstDateValid) {\n      return { bsDate: { invalid: _value[0] } };\n    }\n\n    if (!_isSecondDateValid) {\n      return { bsDate: { invalid: _value[1] } };\n    }\n\n    if (this._picker && this._picker.minDate && isBefore(_value[0], this._picker.minDate, 'date')) {\n      return { bsDate: { minDate: this._picker.minDate } };\n    }\n\n    if (this._picker && this._picker.maxDate && isAfter(_value[1], this._picker.maxDate, 'date')) {\n      return { bsDate: { maxDate: this._picker.maxDate } };\n    }\n  }\n\n  registerOnValidatorChange(fn: () => void): void {\n    this._validatorChange = fn;\n  }\n\n  writeValue(value: Date[] | string) {\n    if (!value) {\n      this._value = null;\n    } else {\n      const _localeKey = this._localeService.currentLocale;\n      const _locale = getLocale(_localeKey);\n      if (!_locale) {\n        throw new Error(\n          `Locale \"${_localeKey}\" is not defined, please add it with \"defineLocale(...)\"`\n        );\n      }\n\n      let _input: (string[] | Date[]) = [];\n      if (typeof value === 'string') {\n        _input = value.split(this._picker._config.rangeSeparator);\n      }\n\n      if (Array.isArray(value)) {\n        _input = value;\n      }\n\n\n      this._value = (_input as string[])\n        .map((_val: string): Date =>\n          parseDate(_val, this._picker._config.dateInputFormat, this._localeService.currentLocale))\n        .map((date: Date) => (isNaN(date.valueOf()) ? null : date));\n    }\n\n    this._picker.bsValue = this._value;\n  }\n\n  setDisabledState(isDisabled: boolean): void {\n    this._picker.isDisabled = isDisabled;\n    if (isDisabled) {\n      this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');\n\n      return;\n    }\n    this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  registerOnChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  registerOnTouched(fn: () => void): void {\n    this._onTouched = fn;\n  }\n\n  onBlur() {\n    this._onTouched();\n  }\n\n  hide() {\n    this._picker.hide();\n    this._renderer.selectRootElement(this._elRef.nativeElement).blur();\n  }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n  selector: 'bs-calendar-layout',\n  template: `\n    <!-- current date, will be added in nearest releases -->\n    <bs-current-date title=\"hey there\" *ngIf=\"false\"></bs-current-date>\n\n    <!--navigation-->\n    <div class=\"bs-datepicker-head\">\n      <ng-content select=\"bs-datepicker-navigation-view\"></ng-content>\n    </div>\n\n    <div class=\"bs-datepicker-body\">\n      <ng-content></ng-content>\n    </div>\n\n    <!--timepicker-->\n    <bs-timepicker *ngIf=\"false\"></bs-timepicker>\n  `\n})\nexport class BsCalendarLayoutComponent {}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n  selector: 'bs-current-date',\n  template: `<div class=\"current-timedate\"><span>{{ title }}</span></div>`\n})\nexport class BsCurrentDateViewComponent {\n  @Input() title: string;\n}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\n\nexport interface BsCustomDates {\n  label: string;\n  value: Date | Date[];\n}\n\n@Component({\n  selector: 'bs-custom-date-view',\n  template: `\n    <div class=\"bs-datepicker-predefined-btns\">\n      <button *ngFor=\"let range of ranges\">{{ range.label }}</button>\n      <button *ngIf=\"isCustomRangeShown\">Custom Range</button>\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BsCustomDatesViewComponent {\n  @Input() isCustomRangeShown: true;\n  @Input() ranges: BsCustomDates[];\n}\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  ElementRef,\n  Input,\n  OnInit,\n  Renderer2\n} from '@angular/core';\n\nimport { BsDatepickerConfig } from '../../bs-datepicker.config';\nimport { DayViewModel } from '../../models';\n\n@Component({\n  selector: '[bsDatepickerDayDecorator]',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    '[class.disabled]': 'day.isDisabled',\n    '[class.is-highlighted]': 'day.isHovered',\n    '[class.is-other-month]': 'day.isOtherMonth',\n    '[class.is-active-other-month]': 'day.isOtherMonthHovered',\n    '[class.in-range]': 'day.isInRange',\n    '[class.select-start]': 'day.isSelectionStart',\n    '[class.select-end]': 'day.isSelectionEnd',\n    '[class.selected]': 'day.isSelected'\n  },\n  template: `{{ day.label }}`\n})\nexport class BsDatepickerDayDecoratorComponent implements OnInit {\n  @Input() day: DayViewModel;\n\n  constructor(\n    private _config: BsDatepickerConfig,\n    private _elRef: ElementRef,\n    private _renderer: Renderer2\n  ) { }\n\n  ngOnInit(): void {\n    if (this.day.isToday && this._config && this._config.customTodayClass) {\n      this._renderer.addClass(this._elRef.nativeElement, this._config.customTodayClass);\n    }\n\n    if (typeof this.day.customClasses === 'string') {\n      this.day.customClasses.split(' ')\n        .filter((className: string) => className)\n        .forEach((className: string) => {\n          this._renderer.addClass(this._elRef.nativeElement, className);\n        });\n    }\n  }\n}\n","import { TimeUnit } from 'ngx-bootstrap/chronos';\n\nexport type BsDatepickerViewMode = 'day' | 'month' | 'year';\n\n/** *************** */\n// navigation bar settings\nexport interface NavigationViewModel {\n  monthTitle: string;\n  yearTitle: string;\n  hideLeftArrow?: boolean;\n  hideRightArrow?: boolean;\n  disableLeftArrow?: boolean;\n  disableRightArrow?: boolean;\n}\n\nexport interface CalendarCellViewModel {\n  date: Date;\n  label: string;\n  isDisabled?: boolean;\n  isHovered?: boolean;\n}\n\n/** *************** */\n// days matrix: day cell view model\nexport interface DayViewModel extends CalendarCellViewModel {\n  isOtherMonthHovered?: boolean;\n  isOtherMonth?: boolean;\n  isInRange?: boolean;\n  isSelectionStart?: boolean;\n  isSelectionEnd?: boolean;\n  isSelected?: boolean;\n  isToday?: boolean;\n  customClasses?: string;\n  // day index\n  monthIndex?: number;\n  weekIndex?: number;\n  dayIndex?: number;\n}\n\nexport interface WeekViewModel {\n  days: DayViewModel[];\n  isHovered?: boolean;\n}\n\n// todo: split navigation settings\nexport interface DaysCalendarViewModel extends NavigationViewModel {\n  weeks: WeekViewModel[];\n  // additional information\n  month: Date;\n  weekNumbers: string[];\n  weekdays: string[];\n}\n\n/** *************** */\n// months calendar\nexport interface MonthsCalendarViewModel extends NavigationViewModel {\n  months: CalendarCellViewModel[][];\n}\n\n/** *************** */\n// years calendar\nexport interface YearsCalendarViewModel extends NavigationViewModel {\n  years: CalendarCellViewModel[][];\n}\n\n/** *************** */\n\n// math model\n/** *************** */\n\n// days Date's array\nexport interface DaysCalendarModel {\n  daysMatrix: Date[][];\n  month: Date;\n}\n\n/** *************** */\n// some func options\nexport interface MonthViewOptions {\n  width?: number;\n  height?: number;\n  firstDayOfWeek?: number;\n}\n\n/** *************** */\n// rendering options\nexport interface DatepickerFormatOptions {\n  locale: string;\n\n  monthTitle: string;\n  yearTitle: string;\n\n  dayLabel: string;\n  monthLabel: string;\n  yearLabel: string;\n\n  weekNumbers: string;\n}\n\nexport interface DatepickerRenderOptions {\n  showWeekNumbers?: boolean;\n  displayMonths?: number;\n}\n\nexport interface DatepickerDateCustomClasses {\n  date: Date;\n  classes: string[];\n}\n\n/** *************** */\n// events\n/** *************** */\nexport enum BsNavigationDirection {\n  UP,\n  DOWN\n}\n\n// used for navigation events, to change view date in state\nexport interface BsNavigationEvent {\n  direction?: BsNavigationDirection;\n  step?: TimeUnit;\n}\n\nexport interface BsViewNavigationEvent {\n  unit?: TimeUnit;\n  viewMode: BsDatepickerViewMode;\n}\n\nexport interface CellHoverEvent {\n  cell: CalendarCellViewModel;\n  isHovered: boolean;\n}\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  EventEmitter,\n  Input,\n  Output\n} from '@angular/core';\nimport {\n  BsDatepickerViewMode,\n  BsNavigationDirection,\n  DaysCalendarViewModel\n} from '../../models';\n\n@Component({\n  selector: 'bs-datepicker-navigation-view',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <button class=\"previous\"\n            [disabled]=\"calendar.disableLeftArrow\"\n            [style.visibility]=\"calendar.hideLeftArrow ? 'hidden' : 'visible'\"\n            (click)=\"navTo(true)\"><span>&lsaquo;</span>\n    </button>\n\n    &#8203;  <!-- zero-width space needed for correct alignement\n                  with preserveWhitespaces: false in Angular -->\n\n    <button class=\"current\"\n            *ngIf=\"calendar.monthTitle\"\n            (click)=\"view('month')\"\n    ><span>{{ calendar.monthTitle }}</span>\n    </button>\n\n    &#8203;  <!-- zero-width space needed for correct alignement\n                  with preserveWhitespaces: false in Angular -->\n\n    <button class=\"current\" (click)=\"view('year')\"\n    ><span>{{ calendar.yearTitle }}</span></button>\n\n    &#8203;  <!-- zero-width space needed for correct alignement\n                  with preserveWhitespaces: false in Angular -->\n\n    <button class=\"next\"\n            [disabled]=\"calendar.disableRightArrow\"\n            [style.visibility]=\"calendar.hideRightArrow ? 'hidden' : 'visible'\"\n            (click)=\"navTo(false)\"><span>&rsaquo;</span>\n    </button>\n  `\n})\nexport class BsDatepickerNavigationViewComponent {\n  @Input() calendar: DaysCalendarViewModel;\n\n  @Output() onNavigate = new EventEmitter<BsNavigationDirection>();\n  @Output() onViewMode = new EventEmitter<BsDatepickerViewMode>();\n\n  navTo(down: boolean): void {\n    this.onNavigate.emit(\n      down ? BsNavigationDirection.DOWN : BsNavigationDirection.UP\n    );\n  }\n\n  view(viewMode: BsDatepickerViewMode): void {\n    this.onViewMode.emit(viewMode);\n  }\n}\n","import {\n  Component,\n  EventEmitter,\n  Input,\n  Output\n} from '@angular/core';\nimport {\n  BsDatepickerViewMode,\n  BsNavigationDirection,\n  BsNavigationEvent,\n  CellHoverEvent,\n  DatepickerRenderOptions,\n  DaysCalendarViewModel,\n  DayViewModel, WeekViewModel\n} from '../../models';\nimport { BsDatepickerConfig } from '../../bs-datepicker.config';\n\n@Component({\n  selector: 'bs-days-calendar-view',\n  // changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <bs-calendar-layout>\n      <bs-datepicker-navigation-view\n        [calendar]=\"calendar\"\n        (onNavigate)=\"navigateTo($event)\"\n        (onViewMode)=\"changeViewMode($event)\"\n      ></bs-datepicker-navigation-view>\n\n      <!--days matrix-->\n      <table role=\"grid\" class=\"days weeks\">\n        <thead>\n        <tr>\n          <!--if show weeks-->\n          <th *ngIf=\"options.showWeekNumbers\"></th>\n          <th *ngFor=\"let weekday of calendar.weekdays; let i = index\"\n              aria-label=\"weekday\">{{ calendar.weekdays[i] }}\n          </th>\n        </tr>\n        </thead>\n        <tbody>\n        <tr *ngFor=\"let week of calendar.weeks; let i = index\">\n          <td class=\"week\" [class.active-week]=\"isWeekHovered\"  *ngIf=\"options.showWeekNumbers\">\n            <span\n                (click)=\"selectWeek(week)\"\n                (mouseenter)=\"weekHoverHandler(week, true)\"\n                (mouseleave)=\"weekHoverHandler(week, false)\">{{ calendar.weekNumbers[i] }}</span>\n          </td>\n          <td *ngFor=\"let day of week.days\" role=\"gridcell\">\n          <span bsDatepickerDayDecorator\n                [day]=\"day\"\n                (click)=\"selectDay(day)\"\n                (mouseenter)=\"hoverDay(day, true)\"\n                (mouseleave)=\"hoverDay(day, false)\">{{ day.label }}</span>\n          </td>\n        </tr>\n        </tbody>\n      </table>\n\n    </bs-calendar-layout>\n  `\n})\nexport class BsDaysCalendarViewComponent  {\n  @Input() calendar: DaysCalendarViewModel;\n  @Input() options: DatepickerRenderOptions;\n\n  @Output() onNavigate = new EventEmitter<BsNavigationEvent>();\n  @Output() onViewMode = new EventEmitter<BsDatepickerViewMode>();\n\n  @Output() onSelect = new EventEmitter<DayViewModel>();\n  @Output() onHover = new EventEmitter<CellHoverEvent>();\n  @Output() onHoverWeek = new EventEmitter<WeekViewModel>();\n\n  isWeekHovered: boolean;\n\n  constructor(private _config: BsDatepickerConfig) { }\n\n  navigateTo(event: BsNavigationDirection): void {\n    const step = BsNavigationDirection.DOWN === event ? -1 : 1;\n    this.onNavigate.emit({ step: { month: step } });\n  }\n\n  changeViewMode(event: BsDatepickerViewMode): void {\n    this.onViewMode.emit(event);\n  }\n\n  selectDay(event: DayViewModel): void {\n    this.onSelect.emit(event);\n  }\n\n  selectWeek(week: WeekViewModel): void {\n    if (!this._config.selectWeek) {\n      return;\n    }\n\n    if (week.days\n      && week.days[0]\n      && !week.days[0].isDisabled\n      && this._config.selectFromOtherMonth) {\n\n      this.onSelect.emit(week.days[0]);\n\n      return;\n    }\n\n    if (week.days.length === 0) {\n      return;\n    }\n\n    const selectedDay = week.days.find((day: DayViewModel) => {\n      return this._config.selectFromOtherMonth\n        ? !day.isDisabled\n        : !day.isOtherMonth && !day.isDisabled;\n    });\n\n    this.onSelect.emit(selectedDay);\n  }\n\n  weekHoverHandler(cell: WeekViewModel, isHovered: boolean): void {\n    if (!this._config.selectWeek) {\n      return;\n    }\n\n    const hasActiveDays = cell.days.find((day: DayViewModel) => {\n      return this._config.selectFromOtherMonth\n        ? !day.isDisabled\n        : !day.isOtherMonth && !day.isDisabled;\n    });\n\n    if (hasActiveDays) {\n      cell.isHovered = isHovered;\n      this.isWeekHovered = isHovered;\n      this.onHoverWeek.emit(cell);\n    }\n  }\n\n  hoverDay(cell: DayViewModel, isHovered: boolean): void {\n    if (this._config.selectFromOtherMonth && cell.isOtherMonth) {\n      cell.isOtherMonthHovered = isHovered;\n    }\n\n    this.onHover.emit({ cell, isHovered });\n  }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport {\n  BsDatepickerViewMode,\n  BsNavigationDirection,\n  BsNavigationEvent,\n  CellHoverEvent,\n  MonthsCalendarViewModel,\n  CalendarCellViewModel\n} from '../../models';\n\n@Component({\n  selector: 'bs-month-calendar-view',\n  template: `\n    <bs-calendar-layout>\n      <bs-datepicker-navigation-view\n        [calendar]=\"calendar\"\n        (onNavigate)=\"navigateTo($event)\"\n        (onViewMode)=\"changeViewMode($event)\"\n      ></bs-datepicker-navigation-view>\n\n      <table role=\"grid\" class=\"months\">\n        <tbody>\n        <tr *ngFor=\"let row of calendar.months\">\n          <td *ngFor=\"let month of row\" role=\"gridcell\"\n              (click)=\"viewMonth(month)\"\n              (mouseenter)=\"hoverMonth(month, true)\"\n              (mouseleave)=\"hoverMonth(month, false)\"\n              [class.disabled]=\"month.isDisabled\"\n              [class.is-highlighted]=\"month.isHovered\">\n            <span>{{ month.label }}</span>\n          </td>\n        </tr>\n        </tbody>\n      </table>\n    </bs-calendar-layout>\n  `\n})\nexport class BsMonthCalendarViewComponent {\n  @Input() calendar: MonthsCalendarViewModel;\n\n  @Output() onNavigate = new EventEmitter<BsNavigationEvent>();\n  @Output() onViewMode = new EventEmitter<BsDatepickerViewMode>();\n\n  @Output() onSelect = new EventEmitter<CalendarCellViewModel>();\n  @Output() onHover = new EventEmitter<CellHoverEvent>();\n\n  navigateTo(event: BsNavigationDirection): void {\n    const step = BsNavigationDirection.DOWN === event ? -1 : 1;\n    this.onNavigate.emit({ step: { year: step } });\n  }\n\n  viewMonth(month: CalendarCellViewModel) {\n    this.onSelect.emit(month);\n  }\n\n  hoverMonth(cell: CalendarCellViewModel, isHovered: boolean) {\n    this.onHover.emit({ cell, isHovered });\n  }\n\n  changeViewMode(event: BsDatepickerViewMode): void {\n    this.onViewMode.emit(event);\n  }\n}\n","// tslint:disable:max-line-length\nimport { Component } from '@angular/core';\n\n@Component({\n  selector: 'bs-timepicker',\n  template: `\n    <div class=\"bs-timepicker-container\">\n      <div class=\"bs-timepicker-controls\">\n        <button class=\"bs-decrease\">-</button>\n        <input type=\"text\" [value]=\"hours\" placeholder=\"00\">\n        <button class=\"bs-increase\">+</button>\n      </div>\n      <div class=\"bs-timepicker-controls\">\n        <button class=\"bs-decrease\">-</button>\n        <input type=\"text\" [value]=\"minutes\" placeholder=\"00\">\n        <button class=\"bs-increase\">+</button>\n      </div>\n      <button class=\"switch-time-format\">{{ ampm }}\n        <img\n          src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg==\"\n          alt=\"\">\n      </button>\n    </div>\n  `\n})\nexport class BsTimepickerViewComponent {\n  ampm = 'ok';\n  hours = 0;\n  minutes = 0;\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { yearsPerCalendar } from '../../engine/format-years-calendar';\nimport {\n  BsDatepickerViewMode,\n  BsNavigationDirection,\n  BsNavigationEvent,\n  CalendarCellViewModel,\n  CellHoverEvent,\n  YearsCalendarViewModel\n} from '../../models';\n\n@Component({\n  selector: 'bs-years-calendar-view',\n  template: `\n    <bs-calendar-layout>\n      <bs-datepicker-navigation-view\n        [calendar]=\"calendar\"\n        (onNavigate)=\"navigateTo($event)\"\n        (onViewMode)=\"changeViewMode($event)\"\n      ></bs-datepicker-navigation-view>\n\n      <table role=\"grid\" class=\"years\">\n        <tbody>\n        <tr *ngFor=\"let row of calendar.years\">\n          <td *ngFor=\"let year of row\" role=\"gridcell\"\n              (click)=\"viewYear(year)\"\n              (mouseenter)=\"hoverYear(year, true)\"\n              (mouseleave)=\"hoverYear(year, false)\"\n              [class.disabled]=\"year.isDisabled\"\n              [class.is-highlighted]=\"year.isHovered\">\n            <span>{{ year.label }}</span>\n          </td>\n        </tr>\n        </tbody>\n      </table>\n    </bs-calendar-layout>\n  `\n})\nexport class BsYearsCalendarViewComponent {\n  @Input() calendar: YearsCalendarViewModel;\n\n  @Output() onNavigate = new EventEmitter<BsNavigationEvent>();\n  @Output() onViewMode = new EventEmitter<BsDatepickerViewMode>();\n\n  @Output() onSelect = new EventEmitter<CalendarCellViewModel>();\n  @Output() onHover = new EventEmitter<CellHoverEvent>();\n\n  navigateTo(event: BsNavigationDirection): void {\n    const step = BsNavigationDirection.DOWN === event ? -1 : 1;\n    this.onNavigate.emit({ step: { year: step * yearsPerCalendar } });\n  }\n\n  viewYear(year: CalendarCellViewModel) {\n    this.onSelect.emit(year);\n  }\n\n  hoverYear(cell: CalendarCellViewModel, isHovered: boolean) {\n    this.onHover.emit({ cell, isHovered });\n  }\n\n  changeViewMode(event: BsDatepickerViewMode): void {\n    this.onViewMode.emit(event);\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\nimport { BsDatepickerInputDirective } from './bs-datepicker-input.directive';\nimport { BsDatepickerDirective } from './bs-datepicker.component';\nimport { BsDatepickerConfig } from './bs-datepicker.config';\nimport { BsDaterangepickerInputDirective } from './bs-daterangepicker-input.directive';\nimport { BsDaterangepickerDirective } from './bs-daterangepicker.component';\nimport { BsDaterangepickerConfig } from './bs-daterangepicker.config';\nimport { BsDatepickerInlineDirective } from './bs-datepicker-inline.component';\nimport { BsDatepickerInlineConfig } from './bs-datepicker-inline.config';\n\nimport { BsLocaleService } from './bs-locale.service';\nimport { BsDatepickerActions } from './reducer/bs-datepicker.actions';\nimport { BsDatepickerEffects } from './reducer/bs-datepicker.effects';\nimport { BsDatepickerStore } from './reducer/bs-datepicker.store';\nimport { BsCalendarLayoutComponent } from './themes/bs/bs-calendar-layout.component';\nimport { BsCurrentDateViewComponent } from './themes/bs/bs-current-date-view.component';\nimport { BsCustomDatesViewComponent } from './themes/bs/bs-custom-dates-view.component';\nimport { BsDatepickerContainerComponent } from './themes/bs/bs-datepicker-container.component';\nimport { BsDatepickerDayDecoratorComponent } from './themes/bs/bs-datepicker-day-decorator.directive';\nimport { BsDatepickerNavigationViewComponent } from './themes/bs/bs-datepicker-navigation-view.component';\nimport { BsDaterangepickerContainerComponent } from './themes/bs/bs-daterangepicker-container.component';\nimport { BsDaysCalendarViewComponent } from './themes/bs/bs-days-calendar-view.component';\nimport { BsMonthCalendarViewComponent } from './themes/bs/bs-months-calendar-view.component';\nimport { BsTimepickerViewComponent } from './themes/bs/bs-timepicker-view.component';\nimport { BsYearsCalendarViewComponent } from './themes/bs/bs-years-calendar-view.component';\nimport { BsDatepickerInlineContainerComponent } from './themes/bs/bs-datepicker-inline-container.component';\n\nconst _exports = [\n  BsDatepickerContainerComponent,\n  BsDaterangepickerContainerComponent,\n  BsDatepickerInlineContainerComponent,\n\n  BsDatepickerDirective,\n  BsDatepickerInputDirective,\n\n  BsDaterangepickerInputDirective,\n  BsDaterangepickerDirective,\n\n  BsDatepickerInlineDirective\n];\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [\n    BsDatepickerDayDecoratorComponent,\n    BsCurrentDateViewComponent,\n    BsDatepickerNavigationViewComponent,\n    BsTimepickerViewComponent,\n\n    BsCalendarLayoutComponent,\n    BsDaysCalendarViewComponent,\n    BsMonthCalendarViewComponent,\n    BsYearsCalendarViewComponent,\n\n    BsCustomDatesViewComponent,\n\n    ..._exports\n  ],\n  entryComponents: [\n    BsDatepickerContainerComponent,\n    BsDaterangepickerContainerComponent,\n    BsDatepickerInlineContainerComponent\n  ],\n  exports: _exports\n})\nexport class BsDatepickerModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: BsDatepickerModule,\n      providers: [\n        ComponentLoaderFactory,\n        PositioningService,\n        BsDatepickerStore,\n        BsDatepickerActions,\n        BsDatepickerConfig,\n        BsDaterangepickerConfig,\n        BsDatepickerInlineConfig,\n        BsDatepickerEffects,\n        BsLocaleService\n      ]\n    };\n  }\n}\n","import { formatDate } from 'ngx-bootstrap/chronos';\n\nexport class DateFormatter {\n  format(date: Date, format: string, locale: string): string {\n    return formatDate(date, format, locale);\n  }\n}\n","/* tslint:disable: max-file-line-count */\nimport {\n  Component,\n  EventEmitter,\n  Input,\n  OnChanges,\n  OnInit,\n  Output,\n  SimpleChanges\n} from '@angular/core';\n\nimport { DateFormatter } from './date-formatter';\n\n\n@Component({\n  selector: 'datepicker-inner',\n  template: `\n    <!--&lt;!&ndash;ng-keydown=\"keydown($event)\"&ndash;&gt;-->\n    <div *ngIf=\"datepickerMode\" class=\"well well-sm bg-faded p-a card\" role=\"application\" >\n      <ng-content></ng-content>\n    </div>\n  `\n})\nexport class DatePickerInnerComponent implements OnInit, OnChanges {\n  @Input() locale: string;\n  @Input() datepickerMode: string;\n  @Input() startingDay: number;\n  @Input() yearRange: number;\n\n  @Input() minDate: Date;\n  @Input() maxDate: Date;\n  @Input() minMode: string;\n  @Input() maxMode: string;\n  @Input() showWeeks: boolean;\n  @Input() formatDay: string;\n  @Input() formatMonth: string;\n  @Input() formatYear: string;\n  @Input() formatDayHeader: string;\n  @Input() formatDayTitle: string;\n  @Input() formatMonthTitle: string;\n  @Input() onlyCurrentMonth: boolean;\n  @Input() shortcutPropagation: boolean;\n  @Input() customClass: { date: Date; mode: string; clazz: string }[];\n  @Input() monthColLimit: number;\n  @Input() yearColLimit: number;\n  @Input() dateDisabled: { date: Date; mode: string }[];\n  @Input() dayDisabled: number[];\n  @Input() initDate: Date;\n\n  @Output() selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);\n  @Output() update: EventEmitter<Date> = new EventEmitter<Date>(false);\n  @Output() activeDateChange: EventEmitter<Date> = new EventEmitter<Date>(undefined);\n\n  /* tslint:disable-next-line: no-any*/\n  stepDay: any = {};\n  /* tslint:disable-next-line: no-any*/\n  stepMonth: any = {};\n  /* tslint:disable-next-line: no-any*/\n  stepYear: any = {};\n\n  uniqueId: string;\n\n  protected modes: string[] = ['day', 'month', 'year'];\n  protected dateFormatter: DateFormatter = new DateFormatter();\n  protected _activeDate: Date;\n  protected selectedDate: Date;\n  protected activeDateId: string;\n\n  protected refreshViewHandlerDay: Function;\n  protected compareHandlerDay: Function;\n  protected refreshViewHandlerMonth: Function;\n  protected compareHandlerMonth: Function;\n  protected refreshViewHandlerYear: Function;\n  protected compareHandlerYear: Function;\n\n  @Input()\n  get activeDate(): Date {\n    return this._activeDate;\n  }\n\n  set activeDate(value: Date) {\n    this._activeDate = value;\n  }\n\n  // todo: add formatter value to Date object\n  ngOnInit(): void {\n    // todo: use date for unique value\n    this.uniqueId =  `datepicker--${Math.floor(Math.random() * 10000)}`;\n\n    if (this.initDate) {\n      this.activeDate = this.initDate;\n      this.selectedDate = new Date(this.activeDate.valueOf());\n      this.update.emit(this.activeDate);\n    } else if (this.activeDate === undefined) {\n      this.activeDate = new Date();\n    }\n  }\n\n  // this.refreshView should be called here to reflect the changes on the fly\n  // tslint:disable-next-line:no-unused-variable\n  ngOnChanges(changes: SimpleChanges): void {\n    this.refreshView();\n    this.checkIfActiveDateGotUpdated(changes.activeDate);\n  }\n\n  // Check if activeDate has been update and then emit the activeDateChange with the new date\n  /* tslint:disable-next-line: no-any */\n  checkIfActiveDateGotUpdated(activeDate: any): void {\n    if (activeDate && !activeDate.firstChange) {\n      const previousValue = activeDate.previousValue;\n      if (\n        previousValue &&\n        previousValue instanceof Date &&\n        previousValue.getTime() !== activeDate.currentValue.getTime()\n      ) {\n        this.activeDateChange.emit(this.activeDate);\n      }\n    }\n  }\n\n  setCompareHandler(handler: Function, type: string): void {\n    if (type === 'day') {\n      this.compareHandlerDay = handler;\n    }\n\n    if (type === 'month') {\n      this.compareHandlerMonth = handler;\n    }\n\n    if (type === 'year') {\n      this.compareHandlerYear = handler;\n    }\n  }\n\n  compare(date1: Date, date2: Date): number | undefined {\n    if (date1 === undefined || date2 === undefined) {\n      return undefined;\n    }\n\n    if (this.datepickerMode === 'day' && this.compareHandlerDay) {\n      return this.compareHandlerDay(date1, date2);\n    }\n\n    if (this.datepickerMode === 'month' && this.compareHandlerMonth) {\n      return this.compareHandlerMonth(date1, date2);\n    }\n\n    if (this.datepickerMode === 'year' && this.compareHandlerYear) {\n      return this.compareHandlerYear(date1, date2);\n    }\n\n    return void 0;\n  }\n\n  setRefreshViewHandler(handler: Function, type: string): void {\n    if (type === 'day') {\n      this.refreshViewHandlerDay = handler;\n    }\n\n    if (type === 'month') {\n      this.refreshViewHandlerMonth = handler;\n    }\n\n    if (type === 'year') {\n      this.refreshViewHandlerYear = handler;\n    }\n  }\n\n  refreshView(): void {\n    if (this.datepickerMode === 'day' && this.refreshViewHandlerDay) {\n      this.refreshViewHandlerDay();\n    }\n\n    if (this.datepickerMode === 'month' && this.refreshViewHandlerMonth) {\n      this.refreshViewHandlerMonth();\n    }\n\n    if (this.datepickerMode === 'year' && this.refreshViewHandlerYear) {\n      this.refreshViewHandlerYear();\n    }\n  }\n\n  dateFilter(date: Date, format: string): string {\n    return this.dateFormatter.format(date, format, this.locale);\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  isActive(dateObject: any): boolean {\n    if (this.compare(dateObject.date, this.activeDate) === 0) {\n      this.activeDateId = dateObject.uid;\n\n      return true;\n    }\n\n    return false;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  createDateObject(date: Date, format: string): any {\n    /* tslint:disable-next-line: no-any*/\n    const dateObject: any = {};\n    dateObject.date = new Date(\n      date.getFullYear(),\n      date.getMonth(),\n      date.getDate()\n    );\n    dateObject.date = this.fixTimeZone(dateObject.date);\n    dateObject.label = this.dateFilter(date, format);\n    dateObject.selected = this.compare(date, this.selectedDate) === 0;\n    dateObject.disabled = this.isDisabled(date);\n    dateObject.current = this.compare(date, new Date()) === 0;\n    dateObject.customClass = this.getCustomClassForDate(dateObject.date);\n\n    return dateObject;\n  }\n\n  /* tslint:disable-next-line: no-any*/\n  split(arr: any[], size: number): any[] {\n    /* tslint:disable-next-line: no-any*/\n    const arrays: any[] = [];\n    while (arr.length > 0) {\n      arrays.push(arr.splice(0, size));\n    }\n\n    return arrays;\n  }\n\n  // Fix a hard-reproducible bug with timezones\n  // The bug depends on OS, browser, current timezone and current date\n  // i.e.\n  // var date = new Date(2014, 0, 1);\n  // console.log(date.getFullYear(), date.getMonth(), date.getDate(),\n  // date.getHours()); can result in \"2013 11 31 23\" because of the bug.\n  fixTimeZone(date: Date): Date {\n    const hours = date.getHours();\n\n    return new Date(\n      date.getFullYear(),\n      date.getMonth(),\n      date.getDate(),\n      hours === 23 ? hours + 2 : 0\n    );\n  }\n\n  select(date: Date, isManual = true): void {\n    if (this.datepickerMode === this.minMode) {\n      if (!this.activeDate) {\n        this.activeDate = new Date(0, 0, 0, 0, 0, 0, 0);\n      }\n\n      this.activeDate = new Date(\n        date.getFullYear(),\n        date.getMonth(),\n        date.getDate()\n      );\n      this.activeDate = this.fixTimeZone(this.activeDate);\n      if (isManual) {\n        this.selectionDone.emit(this.activeDate);\n      }\n    } else {\n      this.activeDate = new Date(\n        date.getFullYear(),\n        date.getMonth(),\n        date.getDate()\n      );\n      this.activeDate = this.fixTimeZone(this.activeDate);\n      if (isManual) {\n        this.datepickerMode = this.modes[\n          this.modes.indexOf(this.datepickerMode) - 1\n        ];\n      }\n    }\n\n    this.selectedDate = new Date(this.activeDate.valueOf());\n    this.update.emit(this.activeDate);\n    this.refreshView();\n  }\n\n  move(direction: number): void {\n    /* tslint:disable-next-line: no-any*/\n    let expectedStep: any;\n    if (this.datepickerMode === 'day') {\n      expectedStep = this.stepDay;\n    }\n\n    if (this.datepickerMode === 'month') {\n      expectedStep = this.stepMonth;\n    }\n\n    if (this.datepickerMode === 'year') {\n      expectedStep = this.stepYear;\n    }\n\n    if (expectedStep) {\n      const year =\n        this.activeDate.getFullYear() + direction * (expectedStep.years || 0);\n      const month =\n        this.activeDate.getMonth() + direction * (expectedStep.months || 0);\n      this.activeDate = new Date(year, month, 1);\n\n      this.refreshView();\n      this.activeDateChange.emit(this.activeDate);\n    }\n  }\n\n  toggleMode(_direction: number): void {\n    const direction = _direction || 1;\n\n    if (\n      (this.datepickerMode === this.maxMode && direction === 1) ||\n      (this.datepickerMode === this.minMode && direction === -1)\n    ) {\n      return;\n    }\n\n    this.datepickerMode = this.modes[\n      this.modes.indexOf(this.datepickerMode) + direction\n    ];\n    this.refreshView();\n  }\n\n  protected getCustomClassForDate(date: Date): string {\n    if (!this.customClass) {\n      return '';\n    }\n    // todo: build a hash of custom classes, it will work faster\n    const customClassObject: {\n      date: Date;\n      mode: string;\n      clazz: string;\n    /* tslint:disable-next-line: no-any */\n    } = this.customClass.find((customClass: any) => {\n      return (\n        customClass.date.valueOf() === date.valueOf() &&\n        customClass.mode === this.datepickerMode\n      );\n    }, this);\n\n    return customClassObject === undefined ? '' : customClassObject.clazz;\n  }\n\n  protected compareDateDisabled(\n    date1Disabled: { date: Date; mode: string },\n    date2: Date\n  ): number {\n    if (date1Disabled === undefined || date2 === undefined) {\n      return undefined;\n    }\n\n    if (date1Disabled.mode === 'day' && this.compareHandlerDay) {\n      return this.compareHandlerDay(date1Disabled.date, date2);\n    }\n\n    if (date1Disabled.mode === 'month' && this.compareHandlerMonth) {\n      return this.compareHandlerMonth(date1Disabled.date, date2);\n    }\n\n    if (date1Disabled.mode === 'year' && this.compareHandlerYear) {\n      return this.compareHandlerYear(date1Disabled.date, date2);\n    }\n\n    return undefined;\n  }\n\n  protected isDisabled(date: Date): boolean {\n    let isDateDisabled = false;\n    if (this.dateDisabled) {\n      this.dateDisabled.forEach(\n        (disabledDate: { date: Date; mode: string }) => {\n          if (this.compareDateDisabled(disabledDate, date) === 0) {\n            isDateDisabled = true;\n          }\n        }\n      );\n    }\n\n    if (this.dayDisabled) {\n      isDateDisabled =\n        isDateDisabled ||\n        this.dayDisabled.indexOf(date.getDay()) > -1;\n    }\n\n    return (\n      isDateDisabled ||\n      (this.minDate && this.compare(date, this.minDate) < 0) ||\n      (this.maxDate && this.compare(date, this.maxDate) > 0)\n    );\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class DatepickerConfig {\n  locale = 'en';\n  datepickerMode = 'day';\n  startingDay = 0;\n  yearRange = 20;\n  minMode = 'day';\n  maxMode = 'year';\n  showWeeks = true;\n  formatDay = 'DD';\n  formatMonth = 'MMMM';\n  formatYear = 'YYYY';\n  formatDayHeader = 'dd';\n  formatDayTitle = 'MMMM YYYY';\n  formatMonthTitle = 'YYYY';\n  onlyCurrentMonth = false;\n  monthColLimit = 3;\n  yearColLimit = 5;\n  shortcutPropagation = false;\n}\n","import {\n  Component,\n  EventEmitter,\n  forwardRef,\n  Input,\n  Output,\n  Provider,\n  ViewChild\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DatePickerInnerComponent } from './datepicker-inner.component';\nimport { DatepickerConfig } from './datepicker.config';\n\nexport const DATEPICKER_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => DatePickerComponent),\n  multi: true\n};\n\n/* tslint:disable:component-selector-name component-selector-type */\n@Component({\n  selector: 'datepicker',\n  template: `\n    <datepicker-inner [activeDate]=\"activeDate\"\n                      (update)=\"onUpdate($event)\"\n                      [locale]=\"config.locale\"\n                      [datepickerMode]=\"datepickerMode\"\n                      [initDate]=\"initDate\"\n                      [minDate]=\"minDate\"\n                      [maxDate]=\"maxDate\"\n                      [minMode]=\"minMode\"\n                      [maxMode]=\"maxMode\"\n                      [showWeeks]=\"showWeeks\"\n                      [formatDay]=\"formatDay\"\n                      [formatMonth]=\"formatMonth\"\n                      [formatYear]=\"formatYear\"\n                      [formatDayHeader]=\"formatDayHeader\"\n                      [formatDayTitle]=\"formatDayTitle\"\n                      [formatMonthTitle]=\"formatMonthTitle\"\n                      [startingDay]=\"startingDay\"\n                      [yearRange]=\"yearRange\"\n                      [customClass]=\"customClass\"\n                      [dateDisabled]=\"dateDisabled\"\n                      [dayDisabled]=\"dayDisabled\"\n                      [onlyCurrentMonth]=\"onlyCurrentMonth\"\n                      [shortcutPropagation]=\"shortcutPropagation\"\n                      [monthColLimit]=\"monthColLimit\"\n                      [yearColLimit]=\"yearColLimit\"\n                      (selectionDone)=\"onSelectionDone($event)\"\n                      (activeDateChange)=\"onActiveDateChange($event)\">\n      <daypicker tabindex=\"0\"></daypicker>\n      <monthpicker tabindex=\"0\"></monthpicker>\n      <yearpicker tabindex=\"0\"></yearpicker>\n    </datepicker-inner>\n    `,\n  providers: [DATEPICKER_CONTROL_VALUE_ACCESSOR]\n})\n/* tslint:enable:component-selector-name component-selector-type */\nexport class DatePickerComponent implements ControlValueAccessor {\n  /** sets datepicker mode, supports: `day`, `month`, `year` */\n  @Input() datepickerMode = 'day';\n  /** default date to show if `ng-model` value is not specified */\n  @Input() initDate: Date;\n  /**  oldest selectable date */\n  @Input() minDate: Date;\n  /** latest selectable date */\n  @Input() maxDate: Date;\n  /** set lower datepicker mode, supports: `day`, `month`, `year` */\n  @Input() minMode: string;\n  /** sets upper datepicker mode, supports: `day`, `month`, `year` */\n  @Input() maxMode: string;\n  /** if false week numbers will be hidden */\n  @Input() showWeeks = true;\n  /** format of day in month */\n  @Input() formatDay: string;\n  /** format of month in year */\n  @Input() formatMonth: string;\n  /** format of year in year range */\n  @Input() formatYear: string;\n  /** format of day in week header */\n  @Input() formatDayHeader: string;\n  /** format of title when selecting day */\n  @Input() formatDayTitle: string;\n  /** format of title when selecting month */\n  @Input() formatMonthTitle: string;\n  /** starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) */\n  @Input() startingDay: number;\n  /** number of years displayed in year selection */\n  @Input() yearRange: number;\n  /** if true only dates from the currently displayed month will be shown */\n  @Input() onlyCurrentMonth: boolean;\n  /** if true shortcut`s event propagation will be disabled */\n  @Input() shortcutPropagation: boolean;\n  /** number of months displayed in a single row of month picker */\n  @Input() monthColLimit: number;\n  /** number of years displayed in a single row of year picker */\n  @Input() yearColLimit: number;\n  /** array of custom css classes to be applied to targeted dates */\n  @Input() customClass: { date: Date; mode: string; clazz: string }[];\n  /** array of disabled dates */\n  @Input() dateDisabled: { date: Date; mode: string }[];\n  /** disabled days of the week from 0-6 (0=Sunday, ..., 6=Saturday) */\n  @Input() dayDisabled: number[];\n\n  /** currently active date */\n  @Input()\n  get activeDate(): Date {\n    return this._activeDate || this._now;\n  }\n\n  set activeDate(value: Date) {\n    this._activeDate = value;\n  }\n\n  @Output()\n  selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);\n\n  /** callback to invoke when the activeDate is changed. */\n  @Output()\n  activeDateChange: EventEmitter<Date> = new EventEmitter<Date>(\n    undefined\n  );\n\n  @ViewChild(DatePickerInnerComponent)\n  _datePicker: DatePickerInnerComponent;\n\n  /* tslint:disable-next-line: no-any*/\n  onChange: any = Function.prototype;\n  /* tslint:disable-next-line: no-any*/\n  onTouched: any = Function.prototype;\n\n  config: DatepickerConfig;\n\n  protected _now: Date = new Date();\n  protected _activeDate: Date;\n\n  constructor(config: DatepickerConfig) {\n    this.config = config;\n    this.configureOptions();\n  }\n\n  configureOptions(): void {\n    Object.assign(this, this.config);\n  }\n\n  onUpdate(event: Date): void {\n    this.activeDate = event;\n    this.onChange(event);\n  }\n\n  onSelectionDone(event: Date): void {\n    this.selectionDone.emit(event);\n  }\n\n  onActiveDateChange(event: Date): void {\n    this.activeDateChange.emit(event);\n  }\n  // todo: support null value\n  /* tslint:disable-next-line: no-any*/\n  writeValue(value: any): void {\n    if (this._datePicker.compare(value, this._activeDate) === 0) {\n      return;\n    }\n    if (value && value instanceof Date) {\n      this.activeDate = value;\n      this._datePicker.select(value, false);\n\n      return;\n    }\n\n    this.activeDate = value ? new Date(value) : void 0;\n  }\n\n  registerOnChange(fn: () => void): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n}\n","// @deprecated\n// tslint:disable\nimport { Component, OnInit } from '@angular/core';\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { DatePickerInnerComponent } from './datepicker-inner.component';\n\n@Component({\n  selector: 'daypicker',\n  template: `\n<table *ngIf=\"datePicker.datepickerMode === 'day'\" role=\"grid\" [attr.aria-labelledby]=\"datePicker.uniqueId + '-title'\" aria-activedescendant=\"activeDateId\">\n  <thead>\n    <tr>\n      <th>\n        <button *ngIf=\"!isBs4\"\n                type=\"button\"\n                class=\"btn btn-default btn-secondary btn-sm pull-left float-left\"\n                (click)=\"datePicker.move(-1)\"\n                tabindex=\"-1\">â¹</button>\n        <button *ngIf=\"isBs4\"\n                type=\"button\"\n                class=\"btn btn-default btn-secondary btn-sm pull-left float-left\"\n                (click)=\"datePicker.move(-1)\"\n                tabindex=\"-1\">&lt;</button>\n      </th>\n      <th [attr.colspan]=\"5 + (datePicker.showWeeks ? 1 : 0)\">\n        <button [id]=\"datePicker.uniqueId + '-title'\"\n                type=\"button\" class=\"btn btn-default btn-secondary btn-sm\"\n                (click)=\"datePicker.toggleMode(0)\"\n                [disabled]=\"datePicker.datepickerMode === datePicker.maxMode\"\n                [ngClass]=\"{disabled: datePicker.datepickerMode === datePicker.maxMode}\" tabindex=\"-1\" style=\"width:100%;\">\n          <strong>{{ title }}</strong>\n        </button>\n      </th>\n      <th>\n        <button *ngIf=\"!isBs4\"\n                type=\"button\"\n                class=\"btn btn-default btn-secondary btn-sm pull-right float-right\"\n                (click)=\"datePicker.move(1)\"\n                tabindex=\"-1\">âº</button>\n        <button *ngIf=\"isBs4\"\n                type=\"button\"\n                class=\"btn btn-default btn-secondary btn-sm pull-right float-right\"\n                (click)=\"datePicker.move(1)\"\n                tabindex=\"-1\">&gt;\n        </button>\n      </th>\n    </tr>\n    <tr>\n      <th *ngIf=\"datePicker.showWeeks\"></th>\n      <th *ngFor=\"let labelz of labels\" class=\"text-center\">\n        <small aria-label=\"labelz.full\"><b>{{ labelz.abbr }}</b></small>\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <ng-template ngFor [ngForOf]=\"rows\" let-rowz=\"$implicit\" let-index=\"index\">\n      <tr *ngIf=\"!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)\">\n        <td *ngIf=\"datePicker.showWeeks\" class=\"h6\" class=\"text-center\">\n          <em>{{ weekNumbers[index] }}</em>\n        </td>\n        <td *ngFor=\"let dtz of rowz\" class=\"text-center\" role=\"gridcell\" [id]=\"dtz.uid\">\n          <button type=\"button\" style=\"min-width:100%;\" class=\"btn btn-sm {{dtz.customClass}}\"\n                  *ngIf=\"!(datePicker.onlyCurrentMonth && dtz.secondary)\"\n                  [ngClass]=\"{'btn-secondary': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected, disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz), 'btn-default': !isBs4}\"\n                  [disabled]=\"dtz.disabled\"\n                  (click)=\"datePicker.select(dtz.date)\" tabindex=\"-1\">\n            <span [ngClass]=\"{'text-muted': dtz.secondary || dtz.current, 'text-info': !isBs4 && dtz.current}\">{{ dtz.label }}</span>\n          </button>\n        </td>\n      </tr>\n    </ng-template>\n  </tbody>\n</table>\n  `,\n  styles: [\n    `\n    :host .btn-secondary {\n      color: #292b2c;\n      background-color: #fff;\n      border-color: #ccc;\n    }\n    :host .btn-info .text-muted {\n      color: #292b2c !important;\n    }\n  `\n  ]\n})\nexport class DayPickerComponent implements OnInit {\n  labels: any[] = [];\n  title: string;\n  rows: any[] = [];\n  weekNumbers: number[] = [];\n  datePicker: DatePickerInnerComponent;\n\n  constructor(datePicker: DatePickerInnerComponent) {\n    this.datePicker = datePicker;\n  }\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  /*protected getDaysInMonth(year:number, month:number) {\n   return ((month === 1) && (year % 4 === 0) &&\n   ((year % 100 !== 0) || (year % 400 === 0))) ? 29 : DAYS_IN_MONTH[month];\n   }*/\n  ngOnInit(): void {\n    const self = this;\n\n    this.datePicker.stepDay = { months: 1 };\n\n    this.datePicker.setRefreshViewHandler(function(): void {\n      const year = this.activeDate.getFullYear();\n      const month = this.activeDate.getMonth();\n      const firstDayOfMonth = new Date(year, month, 1);\n      const difference = this.startingDay - firstDayOfMonth.getDay();\n      const numDisplayedFromPreviousMonth =\n        difference > 0 ? 7 - difference : -difference;\n      const firstDate = new Date(firstDayOfMonth.getTime());\n\n      if (numDisplayedFromPreviousMonth > 0) {\n        firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\n      }\n\n      // 42 is the number of days on a six-week calendar\n      const _days: Date[] = self.getDates(firstDate, 42);\n      const days: any[] = [];\n      for (let i = 0; i < 42; i++) {\n        const _dateObject = this.createDateObject(_days[i], this.formatDay);\n        _dateObject.secondary = _days[i].getMonth() !== month;\n        _dateObject.uid = this.uniqueId + '-' + i;\n        days[i] = _dateObject;\n      }\n\n      self.labels = [];\n      for (let j = 0; j < 7; j++) {\n        self.labels[j] = {};\n        self.labels[j].abbr = this.dateFilter(\n          days[j].date,\n          this.formatDayHeader\n        );\n        self.labels[j].full = this.dateFilter(days[j].date, 'EEEE');\n      }\n\n      self.title = this.dateFilter(this.activeDate, this.formatDayTitle);\n      self.rows = this.split(days, 7);\n\n      if (this.showWeeks) {\n        self.weekNumbers = [];\n        const thursdayIndex = (4 + 7 - this.startingDay) % 7;\n        const numWeeks = self.rows.length;\n        for (let curWeek = 0; curWeek < numWeeks; curWeek++) {\n          self.weekNumbers.push(\n            self.getISO8601WeekNumber(self.rows[curWeek][thursdayIndex].date)\n          );\n        }\n      }\n    }, 'day');\n\n    this.datePicker.setCompareHandler(function(\n      date1: Date,\n      date2: Date\n    ): number {\n      const d1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\n      const d2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\n      return d1.getTime() - d2.getTime();\n    }, 'day');\n\n    this.datePicker.refreshView();\n  }\n\n  protected getDates(startDate: Date, n: number): Date[] {\n    const dates: Date[] = new Array(n);\n    let current = new Date(startDate.getTime());\n    let i = 0;\n    let date: Date;\n    while (i < n) {\n      date = new Date(current.getTime());\n      date = this.datePicker.fixTimeZone(date);\n      dates[i++] = date;\n      current = new Date(\n        date.getFullYear(),\n        date.getMonth(),\n        date.getDate() + 1\n      );\n    }\n    return dates;\n  }\n\n  protected getISO8601WeekNumber(date: Date): number {\n    const checkDate = new Date(date.getTime());\n    // Thursday\n    checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n    const time = checkDate.getTime();\n    // Compare with Jan 1\n    checkDate.setMonth(0);\n    checkDate.setDate(1);\n    return (\n      Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1\n    );\n  }\n\n  // todo: key events implementation\n}\n","// @deprecated\n// tslint:disable\nimport { Component, OnInit } from '@angular/core';\n\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { DatePickerInnerComponent } from './datepicker-inner.component';\n\n@Component({\n  selector: 'monthpicker',\n  template: `\n<table *ngIf=\"datePicker.datepickerMode==='month'\" role=\"grid\">\n  <thead>\n    <tr>\n      <th>\n        <button type=\"button\" class=\"btn btn-default btn-sm pull-left float-left\"\n                (click)=\"datePicker.move(-1)\" tabindex=\"-1\">â¹</button></th>\n      <th [attr.colspan]=\"((datePicker.monthColLimit - 2) <= 0) ? 1 : datePicker.monthColLimit - 2\">\n        <button [id]=\"datePicker.uniqueId + '-title'\"\n                type=\"button\" class=\"btn btn-default btn-sm\"\n                (click)=\"datePicker.toggleMode(0)\"\n                [disabled]=\"datePicker.datepickerMode === maxMode\"\n                [ngClass]=\"{disabled: datePicker.datepickerMode === maxMode}\" tabindex=\"-1\" style=\"width:100%;\">\n          <strong>{{ title }}</strong> \n        </button>\n      </th>\n      <th>\n        <button type=\"button\" class=\"btn btn-default btn-sm pull-right float-right\"\n                (click)=\"datePicker.move(1)\" tabindex=\"-1\">âº</button>\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr *ngFor=\"let rowz of rows\">\n      <td *ngFor=\"let dtz of rowz\" class=\"text-center\" role=\"gridcell\" [attr.id]=\"dtz.uid\" [ngClass]=\"dtz.customClass\">\n        <button type=\"button\" style=\"min-width:100%;\" class=\"btn btn-default\"\n                [ngClass]=\"{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}\"\n                [disabled]=\"dtz.disabled\"\n                (click)=\"datePicker.select(dtz.date)\" tabindex=\"-1\">\n          <span [ngClass]=\"{'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current}\">{{ dtz.label }}</span>\n        </button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n  `,\n  styles: [\n    `\n    :host .btn-info .text-success {\n      color: #fff !important;\n    }\n  `\n  ]\n})\nexport class MonthPickerComponent implements OnInit {\n  title: string;\n  rows: any[] = [];\n  datePicker: DatePickerInnerComponent;\n  maxMode: string;\n\n  constructor(datePicker: DatePickerInnerComponent) {\n    this.datePicker = datePicker;\n  }\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  ngOnInit(): void {\n    const self = this;\n\n    this.datePicker.stepMonth = { years: 1 };\n\n    this.datePicker.setRefreshViewHandler(function(): void {\n      const months: any[] = new Array(12);\n      const year: number = this.activeDate.getFullYear();\n      let date: Date;\n\n      for (let i = 0; i < 12; i++) {\n        date = new Date(year, i, 1);\n        date = this.fixTimeZone(date);\n        months[i] = this.createDateObject(date, this.formatMonth);\n        months[i].uid = this.uniqueId + '-' + i;\n      }\n\n      self.title = this.dateFilter(this.activeDate, this.formatMonthTitle);\n      self.rows = this.split(months, self.datePicker.monthColLimit);\n    }, 'month');\n\n    this.datePicker.setCompareHandler(function(\n      date1: Date,\n      date2: Date\n    ): number {\n      const d1 = new Date(date1.getFullYear(), date1.getMonth());\n      const d2 = new Date(date2.getFullYear(), date2.getMonth());\n      return d1.getTime() - d2.getTime();\n    }, 'month');\n\n    this.datePicker.refreshView();\n  }\n\n  // todo: key events implementation\n}\n","// @deprecated\n// tslint:disable\nimport { Component, OnInit } from '@angular/core';\n\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { DatePickerInnerComponent } from './datepicker-inner.component';\n\n@Component({\n  selector: 'yearpicker',\n  template: `\n<table *ngIf=\"datePicker.datepickerMode==='year'\" role=\"grid\">\n  <thead>\n    <tr>\n      <th>\n        <button type=\"button\" class=\"btn btn-default btn-sm pull-left float-left\"\n                (click)=\"datePicker.move(-1)\" tabindex=\"-1\">â¹</button>\n      </th>\n      <th [attr.colspan]=\"((datePicker.yearColLimit - 2) <= 0) ? 1 : datePicker.yearColLimit - 2\">\n        <button [id]=\"datePicker.uniqueId + '-title'\" role=\"heading\"\n                type=\"button\" class=\"btn btn-default btn-sm\"\n                (click)=\"datePicker.toggleMode(0)\"\n                [disabled]=\"datePicker.datepickerMode === datePicker.maxMode\"\n                [ngClass]=\"{disabled: datePicker.datepickerMode === datePicker.maxMode}\" tabindex=\"-1\" style=\"width:100%;\">\n          <strong>{{ title }}</strong>\n        </button>\n      </th>\n      <th>\n        <button type=\"button\" class=\"btn btn-default btn-sm pull-right float-right\"\n                (click)=\"datePicker.move(1)\" tabindex=\"-1\">âº</button>\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr *ngFor=\"let rowz of rows\">\n      <td *ngFor=\"let dtz of rowz\" class=\"text-center\" role=\"gridcell\" [attr.id]=\"dtz.uid\">\n        <button type=\"button\" style=\"min-width:100%;\" class=\"btn btn-default\"\n                [ngClass]=\"{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}\"\n                [disabled]=\"dtz.disabled\"\n                (click)=\"datePicker.select(dtz.date)\" tabindex=\"-1\">\n          <span [ngClass]=\"{'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current}\">{{ dtz.label }}</span>\n        </button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n  `,\n  styles: [\n    `\n    :host .btn-info .text-success {\n      color: #fff !important;\n    }\n  `\n  ]\n})\nexport class YearPickerComponent implements OnInit {\n  datePicker: DatePickerInnerComponent;\n  title: string;\n  rows: any[] = [];\n\n  constructor(datePicker: DatePickerInnerComponent) {\n    this.datePicker = datePicker;\n  }\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  ngOnInit(): void {\n    const self = this;\n\n    this.datePicker.stepYear = { years: this.datePicker.yearRange };\n\n    this.datePicker.setRefreshViewHandler(function(): void {\n      const years: any[] = new Array(this.yearRange);\n      let date: Date;\n      const start = self.getStartingYear(this.activeDate.getFullYear());\n\n      for (let i = 0; i < this.yearRange; i++) {\n        date = new Date(start + i, 0, 1);\n        date = this.fixTimeZone(date);\n        years[i] = this.createDateObject(date, this.formatYear);\n        years[i].uid = this.uniqueId + '-' + i;\n      }\n\n      self.title = [years[0].label, years[this.yearRange - 1].label].join(\n        ' - '\n      );\n      self.rows = this.split(years, self.datePicker.yearColLimit);\n    }, 'year');\n\n    this.datePicker.setCompareHandler(function(\n      date1: Date,\n      date2: Date\n    ): number {\n      return date1.getFullYear() - date2.getFullYear();\n    }, 'year');\n\n    this.datePicker.refreshView();\n  }\n\n  protected getStartingYear(year: number): number {\n    // todo: parseInt\n    return (\n      (year - 1) / this.datePicker.yearRange * this.datePicker.yearRange + 1\n    );\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { DatePickerInnerComponent } from './datepicker-inner.component';\nimport { DatePickerComponent } from './datepicker.component';\nimport { DatepickerConfig } from './datepicker.config';\nimport { DayPickerComponent } from './daypicker.component';\nimport { MonthPickerComponent } from './monthpicker.component';\nimport { YearPickerComponent } from './yearpicker.component';\n\n@NgModule({\n  imports: [CommonModule, FormsModule],\n  declarations: [\n    DatePickerComponent,\n    DatePickerInnerComponent,\n    DayPickerComponent,\n    MonthPickerComponent,\n    YearPickerComponent\n  ],\n  exports: [\n    DatePickerComponent,\n    DatePickerInnerComponent,\n    DayPickerComponent,\n    MonthPickerComponent,\n    YearPickerComponent\n  ],\n  entryComponents: [DatePickerComponent]\n})\nexport class DatepickerModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: DatepickerModule, providers: [DatepickerConfig] };\n  }\n}\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function audit(durationSelector) {\n    return function auditOperatorFunction(source) {\n        return source.lift(new AuditOperator(durationSelector));\n    };\n}\nvar AuditOperator = /*@__PURE__*/ (function () {\n    function AuditOperator(durationSelector) {\n        this.durationSelector = durationSelector;\n    }\n    AuditOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n    };\n    return AuditOperator;\n}());\nvar AuditSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AuditSubscriber, _super);\n    function AuditSubscriber(destination, durationSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.durationSelector = durationSelector;\n        _this.hasValue = false;\n        return _this;\n    }\n    AuditSubscriber.prototype._next = function (value) {\n        this.value = value;\n        this.hasValue = true;\n        if (!this.throttled) {\n            var duration = void 0;\n            try {\n                var durationSelector = this.durationSelector;\n                duration = durationSelector(value);\n            }\n            catch (err) {\n                return this.destination.error(err);\n            }\n            var innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n            if (!innerSubscription || innerSubscription.closed) {\n                this.clearThrottle();\n            }\n            else {\n                this.add(this.throttled = innerSubscription);\n            }\n        }\n    };\n    AuditSubscriber.prototype.clearThrottle = function () {\n        var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;\n        if (throttled) {\n            this.remove(throttled);\n            this.throttled = undefined;\n            throttled.unsubscribe();\n        }\n        if (hasValue) {\n            this.value = undefined;\n            this.hasValue = false;\n            this.destination.next(value);\n        }\n    };\n    AuditSubscriber.prototype.notifyNext = function () {\n        this.clearThrottle();\n    };\n    AuditSubscriber.prototype.notifyComplete = function () {\n        this.clearThrottle();\n    };\n    return AuditSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=audit.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return audit(function () { return timer(duration, scheduler); });\n}\n//# sourceMappingURL=auditTime.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function buffer(closingNotifier) {\n    return function bufferOperatorFunction(source) {\n        return source.lift(new BufferOperator(closingNotifier));\n    };\n}\nvar BufferOperator = /*@__PURE__*/ (function () {\n    function BufferOperator(closingNotifier) {\n        this.closingNotifier = closingNotifier;\n    }\n    BufferOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n    };\n    return BufferOperator;\n}());\nvar BufferSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferSubscriber, _super);\n    function BufferSubscriber(destination, closingNotifier) {\n        var _this = _super.call(this, destination) || this;\n        _this.buffer = [];\n        _this.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(_this)));\n        return _this;\n    }\n    BufferSubscriber.prototype._next = function (value) {\n        this.buffer.push(value);\n    };\n    BufferSubscriber.prototype.notifyNext = function () {\n        var buffer = this.buffer;\n        this.buffer = [];\n        this.destination.next(buffer);\n    };\n    return BufferSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=buffer.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function bufferCount(bufferSize, startBufferEvery) {\n    if (startBufferEvery === void 0) {\n        startBufferEvery = null;\n    }\n    return function bufferCountOperatorFunction(source) {\n        return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n    };\n}\nvar BufferCountOperator = /*@__PURE__*/ (function () {\n    function BufferCountOperator(bufferSize, startBufferEvery) {\n        this.bufferSize = bufferSize;\n        this.startBufferEvery = startBufferEvery;\n        if (!startBufferEvery || bufferSize === startBufferEvery) {\n            this.subscriberClass = BufferCountSubscriber;\n        }\n        else {\n            this.subscriberClass = BufferSkipCountSubscriber;\n        }\n    }\n    BufferCountOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n    };\n    return BufferCountOperator;\n}());\nvar BufferCountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferCountSubscriber, _super);\n    function BufferCountSubscriber(destination, bufferSize) {\n        var _this = _super.call(this, destination) || this;\n        _this.bufferSize = bufferSize;\n        _this.buffer = [];\n        return _this;\n    }\n    BufferCountSubscriber.prototype._next = function (value) {\n        var buffer = this.buffer;\n        buffer.push(value);\n        if (buffer.length == this.bufferSize) {\n            this.destination.next(buffer);\n            this.buffer = [];\n        }\n    };\n    BufferCountSubscriber.prototype._complete = function () {\n        var buffer = this.buffer;\n        if (buffer.length > 0) {\n            this.destination.next(buffer);\n        }\n        _super.prototype._complete.call(this);\n    };\n    return BufferCountSubscriber;\n}(Subscriber));\nvar BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferSkipCountSubscriber, _super);\n    function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {\n        var _this = _super.call(this, destination) || this;\n        _this.bufferSize = bufferSize;\n        _this.startBufferEvery = startBufferEvery;\n        _this.buffers = [];\n        _this.count = 0;\n        return _this;\n    }\n    BufferSkipCountSubscriber.prototype._next = function (value) {\n        var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;\n        this.count++;\n        if (count % startBufferEvery === 0) {\n            buffers.push([]);\n        }\n        for (var i = buffers.length; i--;) {\n            var buffer = buffers[i];\n            buffer.push(value);\n            if (buffer.length === bufferSize) {\n                buffers.splice(i, 1);\n                this.destination.next(buffer);\n            }\n        }\n    };\n    BufferSkipCountSubscriber.prototype._complete = function () {\n        var _a = this, buffers = _a.buffers, destination = _a.destination;\n        while (buffers.length > 0) {\n            var buffer = buffers.shift();\n            if (buffer.length > 0) {\n                destination.next(buffer);\n            }\n        }\n        _super.prototype._complete.call(this);\n    };\n    return BufferSkipCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=bufferCount.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { isScheduler } from '../util/isScheduler';\nexport function bufferTime(bufferTimeSpan) {\n    var length = arguments.length;\n    var scheduler = async;\n    if (isScheduler(arguments[arguments.length - 1])) {\n        scheduler = arguments[arguments.length - 1];\n        length--;\n    }\n    var bufferCreationInterval = null;\n    if (length >= 2) {\n        bufferCreationInterval = arguments[1];\n    }\n    var maxBufferSize = Number.POSITIVE_INFINITY;\n    if (length >= 3) {\n        maxBufferSize = arguments[2];\n    }\n    return function bufferTimeOperatorFunction(source) {\n        return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));\n    };\n}\nvar BufferTimeOperator = /*@__PURE__*/ (function () {\n    function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n        this.bufferTimeSpan = bufferTimeSpan;\n        this.bufferCreationInterval = bufferCreationInterval;\n        this.maxBufferSize = maxBufferSize;\n        this.scheduler = scheduler;\n    }\n    BufferTimeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));\n    };\n    return BufferTimeOperator;\n}());\nvar Context = /*@__PURE__*/ (function () {\n    function Context() {\n        this.buffer = [];\n    }\n    return Context;\n}());\nvar BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferTimeSubscriber, _super);\n    function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.bufferTimeSpan = bufferTimeSpan;\n        _this.bufferCreationInterval = bufferCreationInterval;\n        _this.maxBufferSize = maxBufferSize;\n        _this.scheduler = scheduler;\n        _this.contexts = [];\n        var context = _this.openContext();\n        _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;\n        if (_this.timespanOnly) {\n            var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };\n            _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n        }\n        else {\n            var closeState = { subscriber: _this, context: context };\n            var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };\n            _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));\n            _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));\n        }\n        return _this;\n    }\n    BufferTimeSubscriber.prototype._next = function (value) {\n        var contexts = this.contexts;\n        var len = contexts.length;\n        var filledBufferContext;\n        for (var i = 0; i < len; i++) {\n            var context_1 = contexts[i];\n            var buffer = context_1.buffer;\n            buffer.push(value);\n            if (buffer.length == this.maxBufferSize) {\n                filledBufferContext = context_1;\n            }\n        }\n        if (filledBufferContext) {\n            this.onBufferFull(filledBufferContext);\n        }\n    };\n    BufferTimeSubscriber.prototype._error = function (err) {\n        this.contexts.length = 0;\n        _super.prototype._error.call(this, err);\n    };\n    BufferTimeSubscriber.prototype._complete = function () {\n        var _a = this, contexts = _a.contexts, destination = _a.destination;\n        while (contexts.length > 0) {\n            var context_2 = contexts.shift();\n            destination.next(context_2.buffer);\n        }\n        _super.prototype._complete.call(this);\n    };\n    BufferTimeSubscriber.prototype._unsubscribe = function () {\n        this.contexts = null;\n    };\n    BufferTimeSubscriber.prototype.onBufferFull = function (context) {\n        this.closeContext(context);\n        var closeAction = context.closeAction;\n        closeAction.unsubscribe();\n        this.remove(closeAction);\n        if (!this.closed && this.timespanOnly) {\n            context = this.openContext();\n            var bufferTimeSpan = this.bufferTimeSpan;\n            var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };\n            this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n        }\n    };\n    BufferTimeSubscriber.prototype.openContext = function () {\n        var context = new Context();\n        this.contexts.push(context);\n        return context;\n    };\n    BufferTimeSubscriber.prototype.closeContext = function (context) {\n        this.destination.next(context.buffer);\n        var contexts = this.contexts;\n        var spliceIndex = contexts ? contexts.indexOf(context) : -1;\n        if (spliceIndex >= 0) {\n            contexts.splice(contexts.indexOf(context), 1);\n        }\n    };\n    return BufferTimeSubscriber;\n}(Subscriber));\nfunction dispatchBufferTimeSpanOnly(state) {\n    var subscriber = state.subscriber;\n    var prevContext = state.context;\n    if (prevContext) {\n        subscriber.closeContext(prevContext);\n    }\n    if (!subscriber.closed) {\n        state.context = subscriber.openContext();\n        state.context.closeAction = this.schedule(state, state.bufferTimeSpan);\n    }\n}\nfunction dispatchBufferCreation(state) {\n    var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;\n    var context = subscriber.openContext();\n    var action = this;\n    if (!subscriber.closed) {\n        subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));\n        action.schedule(state, bufferCreationInterval);\n    }\n}\nfunction dispatchBufferClose(arg) {\n    var subscriber = arg.subscriber, context = arg.context;\n    subscriber.closeContext(context);\n}\n//# sourceMappingURL=bufferTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nexport function bufferToggle(openings, closingSelector) {\n    return function bufferToggleOperatorFunction(source) {\n        return source.lift(new BufferToggleOperator(openings, closingSelector));\n    };\n}\nvar BufferToggleOperator = /*@__PURE__*/ (function () {\n    function BufferToggleOperator(openings, closingSelector) {\n        this.openings = openings;\n        this.closingSelector = closingSelector;\n    }\n    BufferToggleOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));\n    };\n    return BufferToggleOperator;\n}());\nvar BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferToggleSubscriber, _super);\n    function BufferToggleSubscriber(destination, openings, closingSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.closingSelector = closingSelector;\n        _this.contexts = [];\n        _this.add(subscribeToResult(_this, openings));\n        return _this;\n    }\n    BufferToggleSubscriber.prototype._next = function (value) {\n        var contexts = this.contexts;\n        var len = contexts.length;\n        for (var i = 0; i < len; i++) {\n            contexts[i].buffer.push(value);\n        }\n    };\n    BufferToggleSubscriber.prototype._error = function (err) {\n        var contexts = this.contexts;\n        while (contexts.length > 0) {\n            var context_1 = contexts.shift();\n            context_1.subscription.unsubscribe();\n            context_1.buffer = null;\n            context_1.subscription = null;\n        }\n        this.contexts = null;\n        _super.prototype._error.call(this, err);\n    };\n    BufferToggleSubscriber.prototype._complete = function () {\n        var contexts = this.contexts;\n        while (contexts.length > 0) {\n            var context_2 = contexts.shift();\n            this.destination.next(context_2.buffer);\n            context_2.subscription.unsubscribe();\n            context_2.buffer = null;\n            context_2.subscription = null;\n        }\n        this.contexts = null;\n        _super.prototype._complete.call(this);\n    };\n    BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue) {\n        outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);\n    };\n    BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {\n        this.closeBuffer(innerSub.context);\n    };\n    BufferToggleSubscriber.prototype.openBuffer = function (value) {\n        try {\n            var closingSelector = this.closingSelector;\n            var closingNotifier = closingSelector.call(this, value);\n            if (closingNotifier) {\n                this.trySubscribe(closingNotifier);\n            }\n        }\n        catch (err) {\n            this._error(err);\n        }\n    };\n    BufferToggleSubscriber.prototype.closeBuffer = function (context) {\n        var contexts = this.contexts;\n        if (contexts && context) {\n            var buffer = context.buffer, subscription = context.subscription;\n            this.destination.next(buffer);\n            contexts.splice(contexts.indexOf(context), 1);\n            this.remove(subscription);\n            subscription.unsubscribe();\n        }\n    };\n    BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {\n        var contexts = this.contexts;\n        var buffer = [];\n        var subscription = new Subscription();\n        var context = { buffer: buffer, subscription: subscription };\n        contexts.push(context);\n        var innerSubscription = subscribeToResult(this, closingNotifier, context);\n        if (!innerSubscription || innerSubscription.closed) {\n            this.closeBuffer(context);\n        }\n        else {\n            innerSubscription.context = context;\n            this.add(innerSubscription);\n            subscription.add(innerSubscription);\n        }\n    };\n    return BufferToggleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=bufferToggle.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function bufferWhen(closingSelector) {\n    return function (source) {\n        return source.lift(new BufferWhenOperator(closingSelector));\n    };\n}\nvar BufferWhenOperator = /*@__PURE__*/ (function () {\n    function BufferWhenOperator(closingSelector) {\n        this.closingSelector = closingSelector;\n    }\n    BufferWhenOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n    };\n    return BufferWhenOperator;\n}());\nvar BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(BufferWhenSubscriber, _super);\n    function BufferWhenSubscriber(destination, closingSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.closingSelector = closingSelector;\n        _this.subscribing = false;\n        _this.openBuffer();\n        return _this;\n    }\n    BufferWhenSubscriber.prototype._next = function (value) {\n        this.buffer.push(value);\n    };\n    BufferWhenSubscriber.prototype._complete = function () {\n        var buffer = this.buffer;\n        if (buffer) {\n            this.destination.next(buffer);\n        }\n        _super.prototype._complete.call(this);\n    };\n    BufferWhenSubscriber.prototype._unsubscribe = function () {\n        this.buffer = undefined;\n        this.subscribing = false;\n    };\n    BufferWhenSubscriber.prototype.notifyNext = function () {\n        this.openBuffer();\n    };\n    BufferWhenSubscriber.prototype.notifyComplete = function () {\n        if (this.subscribing) {\n            this.complete();\n        }\n        else {\n            this.openBuffer();\n        }\n    };\n    BufferWhenSubscriber.prototype.openBuffer = function () {\n        var closingSubscription = this.closingSubscription;\n        if (closingSubscription) {\n            this.remove(closingSubscription);\n            closingSubscription.unsubscribe();\n        }\n        var buffer = this.buffer;\n        if (this.buffer) {\n            this.destination.next(buffer);\n        }\n        this.buffer = [];\n        var closingNotifier;\n        try {\n            var closingSelector = this.closingSelector;\n            closingNotifier = closingSelector();\n        }\n        catch (err) {\n            return this.error(err);\n        }\n        closingSubscription = new Subscription();\n        this.closingSubscription = closingSubscription;\n        this.add(closingSubscription);\n        this.subscribing = true;\n        closingSubscription.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));\n        this.subscribing = false;\n    };\n    return BufferWhenSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=bufferWhen.js.map\n","/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */\nimport { CombineLatestOperator } from '../observable/combineLatest';\nexport function combineAll(project) {\n    return function (source) { return source.lift(new CombineLatestOperator(project)); };\n}\n//# sourceMappingURL=combineAll.js.map\n","/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */\nimport { isArray } from '../util/isArray';\nimport { CombineLatestOperator } from '../observable/combineLatest';\nimport { from } from '../observable/from';\nvar none = {};\nexport function combineLatest() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    var project = null;\n    if (typeof observables[observables.length - 1] === 'function') {\n        project = observables.pop();\n    }\n    if (observables.length === 1 && isArray(observables[0])) {\n        observables = observables[0].slice();\n    }\n    return function (source) { return source.lift.call(from([source].concat(observables)), new CombineLatestOperator(project)); };\n}\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */\nimport { concat as concatStatic } from '../observable/concat';\nexport function concat() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    return function (source) { return source.lift.call(concatStatic.apply(void 0, [source].concat(observables))); };\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */\nimport { concatMap } from './concatMap';\nexport function concatMapTo(innerObservable, resultSelector) {\n    return concatMap(function () { return innerObservable; }, resultSelector);\n}\n//# sourceMappingURL=concatMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function count(predicate) {\n    return function (source) { return source.lift(new CountOperator(predicate, source)); };\n}\nvar CountOperator = /*@__PURE__*/ (function () {\n    function CountOperator(predicate, source) {\n        this.predicate = predicate;\n        this.source = source;\n    }\n    CountOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n    };\n    return CountOperator;\n}());\nvar CountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(CountSubscriber, _super);\n    function CountSubscriber(destination, predicate, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.source = source;\n        _this.count = 0;\n        _this.index = 0;\n        return _this;\n    }\n    CountSubscriber.prototype._next = function (value) {\n        if (this.predicate) {\n            this._tryPredicate(value);\n        }\n        else {\n            this.count++;\n        }\n    };\n    CountSubscriber.prototype._tryPredicate = function (value) {\n        var result;\n        try {\n            result = this.predicate(value, this.index++, this.source);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (result) {\n            this.count++;\n        }\n    };\n    CountSubscriber.prototype._complete = function () {\n        this.destination.next(this.count);\n        this.destination.complete();\n    };\n    return CountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=count.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function debounce(durationSelector) {\n    return function (source) { return source.lift(new DebounceOperator(durationSelector)); };\n}\nvar DebounceOperator = /*@__PURE__*/ (function () {\n    function DebounceOperator(durationSelector) {\n        this.durationSelector = durationSelector;\n    }\n    DebounceOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n    };\n    return DebounceOperator;\n}());\nvar DebounceSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DebounceSubscriber, _super);\n    function DebounceSubscriber(destination, durationSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.durationSelector = durationSelector;\n        _this.hasValue = false;\n        return _this;\n    }\n    DebounceSubscriber.prototype._next = function (value) {\n        try {\n            var result = this.durationSelector.call(this, value);\n            if (result) {\n                this._tryNext(value, result);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    };\n    DebounceSubscriber.prototype._complete = function () {\n        this.emitValue();\n        this.destination.complete();\n    };\n    DebounceSubscriber.prototype._tryNext = function (value, duration) {\n        var subscription = this.durationSubscription;\n        this.value = value;\n        this.hasValue = true;\n        if (subscription) {\n            subscription.unsubscribe();\n            this.remove(subscription);\n        }\n        subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n        if (subscription && !subscription.closed) {\n            this.add(this.durationSubscription = subscription);\n        }\n    };\n    DebounceSubscriber.prototype.notifyNext = function () {\n        this.emitValue();\n    };\n    DebounceSubscriber.prototype.notifyComplete = function () {\n        this.emitValue();\n    };\n    DebounceSubscriber.prototype.emitValue = function () {\n        if (this.hasValue) {\n            var value = this.value;\n            var subscription = this.durationSubscription;\n            if (subscription) {\n                this.durationSubscription = undefined;\n                subscription.unsubscribe();\n                this.remove(subscription);\n            }\n            this.value = undefined;\n            this.hasValue = false;\n            _super.prototype._next.call(this, value);\n        }\n    };\n    return DebounceSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=debounce.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function isDate(value) {\n    return value instanceof Date && !isNaN(+value);\n}\n//# sourceMappingURL=isDate.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    var absoluteDelay = isDate(delay);\n    var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n    return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };\n}\nvar DelayOperator = /*@__PURE__*/ (function () {\n    function DelayOperator(delay, scheduler) {\n        this.delay = delay;\n        this.scheduler = scheduler;\n    }\n    DelayOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n    };\n    return DelayOperator;\n}());\nvar DelaySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DelaySubscriber, _super);\n    function DelaySubscriber(destination, delay, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.delay = delay;\n        _this.scheduler = scheduler;\n        _this.queue = [];\n        _this.active = false;\n        _this.errored = false;\n        return _this;\n    }\n    DelaySubscriber.dispatch = function (state) {\n        var source = state.source;\n        var queue = source.queue;\n        var scheduler = state.scheduler;\n        var destination = state.destination;\n        while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n            queue.shift().notification.observe(destination);\n        }\n        if (queue.length > 0) {\n            var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n            this.schedule(state, delay_1);\n        }\n        else {\n            this.unsubscribe();\n            source.active = false;\n        }\n    };\n    DelaySubscriber.prototype._schedule = function (scheduler) {\n        this.active = true;\n        var destination = this.destination;\n        destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n            source: this, destination: this.destination, scheduler: scheduler\n        }));\n    };\n    DelaySubscriber.prototype.scheduleNotification = function (notification) {\n        if (this.errored === true) {\n            return;\n        }\n        var scheduler = this.scheduler;\n        var message = new DelayMessage(scheduler.now() + this.delay, notification);\n        this.queue.push(message);\n        if (this.active === false) {\n            this._schedule(scheduler);\n        }\n    };\n    DelaySubscriber.prototype._next = function (value) {\n        this.scheduleNotification(Notification.createNext(value));\n    };\n    DelaySubscriber.prototype._error = function (err) {\n        this.errored = true;\n        this.queue = [];\n        this.destination.error(err);\n        this.unsubscribe();\n    };\n    DelaySubscriber.prototype._complete = function () {\n        this.scheduleNotification(Notification.createComplete());\n        this.unsubscribe();\n    };\n    return DelaySubscriber;\n}(Subscriber));\nvar DelayMessage = /*@__PURE__*/ (function () {\n    function DelayMessage(time, notification) {\n        this.time = time;\n        this.notification = notification;\n    }\n    return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n    if (subscriptionDelay) {\n        return function (source) {\n            return new SubscriptionDelayObservable(source, subscriptionDelay)\n                .lift(new DelayWhenOperator(delayDurationSelector));\n        };\n    }\n    return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };\n}\nvar DelayWhenOperator = /*@__PURE__*/ (function () {\n    function DelayWhenOperator(delayDurationSelector) {\n        this.delayDurationSelector = delayDurationSelector;\n    }\n    DelayWhenOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n    };\n    return DelayWhenOperator;\n}());\nvar DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DelayWhenSubscriber, _super);\n    function DelayWhenSubscriber(destination, delayDurationSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.delayDurationSelector = delayDurationSelector;\n        _this.completed = false;\n        _this.delayNotifierSubscriptions = [];\n        _this.index = 0;\n        return _this;\n    }\n    DelayWhenSubscriber.prototype.notifyNext = function (outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n        this.destination.next(outerValue);\n        this.removeSubscription(innerSub);\n        this.tryComplete();\n    };\n    DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {\n        this._error(error);\n    };\n    DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {\n        var value = this.removeSubscription(innerSub);\n        if (value) {\n            this.destination.next(value);\n        }\n        this.tryComplete();\n    };\n    DelayWhenSubscriber.prototype._next = function (value) {\n        var index = this.index++;\n        try {\n            var delayNotifier = this.delayDurationSelector(value, index);\n            if (delayNotifier) {\n                this.tryDelay(delayNotifier, value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    };\n    DelayWhenSubscriber.prototype._complete = function () {\n        this.completed = true;\n        this.tryComplete();\n        this.unsubscribe();\n    };\n    DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {\n        subscription.unsubscribe();\n        var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n        if (subscriptionIdx !== -1) {\n            this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n        }\n        return subscription.outerValue;\n    };\n    DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {\n        var notifierSubscription = subscribeToResult(this, delayNotifier, value);\n        if (notifierSubscription && !notifierSubscription.closed) {\n            var destination = this.destination;\n            destination.add(notifierSubscription);\n            this.delayNotifierSubscriptions.push(notifierSubscription);\n        }\n    };\n    DelayWhenSubscriber.prototype.tryComplete = function () {\n        if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n            this.destination.complete();\n        }\n    };\n    return DelayWhenSubscriber;\n}(OuterSubscriber));\nvar SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SubscriptionDelayObservable, _super);\n    function SubscriptionDelayObservable(source, subscriptionDelay) {\n        var _this = _super.call(this) || this;\n        _this.source = source;\n        _this.subscriptionDelay = subscriptionDelay;\n        return _this;\n    }\n    SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {\n        this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n    };\n    return SubscriptionDelayObservable;\n}(Observable));\nvar SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SubscriptionDelaySubscriber, _super);\n    function SubscriptionDelaySubscriber(parent, source) {\n        var _this = _super.call(this) || this;\n        _this.parent = parent;\n        _this.source = source;\n        _this.sourceSubscribed = false;\n        return _this;\n    }\n    SubscriptionDelaySubscriber.prototype._next = function (unused) {\n        this.subscribeToSource();\n    };\n    SubscriptionDelaySubscriber.prototype._error = function (err) {\n        this.unsubscribe();\n        this.parent.error(err);\n    };\n    SubscriptionDelaySubscriber.prototype._complete = function () {\n        this.unsubscribe();\n        this.subscribeToSource();\n    };\n    SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {\n        if (!this.sourceSubscribed) {\n            this.sourceSubscribed = true;\n            this.unsubscribe();\n            this.source.subscribe(this.parent);\n        }\n    };\n    return SubscriptionDelaySubscriber;\n}(Subscriber));\n//# sourceMappingURL=delayWhen.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function dematerialize() {\n    return function dematerializeOperatorFunction(source) {\n        return source.lift(new DeMaterializeOperator());\n    };\n}\nvar DeMaterializeOperator = /*@__PURE__*/ (function () {\n    function DeMaterializeOperator() {\n    }\n    DeMaterializeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DeMaterializeSubscriber(subscriber));\n    };\n    return DeMaterializeOperator;\n}());\nvar DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DeMaterializeSubscriber, _super);\n    function DeMaterializeSubscriber(destination) {\n        return _super.call(this, destination) || this;\n    }\n    DeMaterializeSubscriber.prototype._next = function (value) {\n        value.observe(this.destination);\n    };\n    return DeMaterializeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=dematerialize.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function distinct(keySelector, flushes) {\n    return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };\n}\nvar DistinctOperator = /*@__PURE__*/ (function () {\n    function DistinctOperator(keySelector, flushes) {\n        this.keySelector = keySelector;\n        this.flushes = flushes;\n    }\n    DistinctOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n    };\n    return DistinctOperator;\n}());\nvar DistinctSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DistinctSubscriber, _super);\n    function DistinctSubscriber(destination, keySelector, flushes) {\n        var _this = _super.call(this, destination) || this;\n        _this.keySelector = keySelector;\n        _this.values = new Set();\n        if (flushes) {\n            _this.add(innerSubscribe(flushes, new SimpleInnerSubscriber(_this)));\n        }\n        return _this;\n    }\n    DistinctSubscriber.prototype.notifyNext = function () {\n        this.values.clear();\n    };\n    DistinctSubscriber.prototype.notifyError = function (error) {\n        this._error(error);\n    };\n    DistinctSubscriber.prototype._next = function (value) {\n        if (this.keySelector) {\n            this._useKeySelector(value);\n        }\n        else {\n            this._finalizeNext(value, value);\n        }\n    };\n    DistinctSubscriber.prototype._useKeySelector = function (value) {\n        var key;\n        var destination = this.destination;\n        try {\n            key = this.keySelector(value);\n        }\n        catch (err) {\n            destination.error(err);\n            return;\n        }\n        this._finalizeNext(key, value);\n    };\n    DistinctSubscriber.prototype._finalizeNext = function (key, value) {\n        var values = this.values;\n        if (!values.has(key)) {\n            values.add(key);\n            this.destination.next(value);\n        }\n    };\n    return DistinctSubscriber;\n}(SimpleOuterSubscriber));\nexport { DistinctSubscriber };\n//# sourceMappingURL=distinct.js.map\n","/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */\nimport { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n    return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map\n","/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n    if (index < 0) {\n        throw new ArgumentOutOfRangeError();\n    }\n    var hasDefaultValue = arguments.length >= 2;\n    return function (source) {\n        return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue\n            ? defaultIfEmpty(defaultValue)\n            : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));\n    };\n}\n//# sourceMappingURL=elementAt.js.map\n","/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */\nimport { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith() {\n    var array = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        array[_i] = arguments[_i];\n    }\n    return function (source) { return concat(source, of.apply(void 0, array)); };\n}\n//# sourceMappingURL=endWith.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function exhaust() {\n    return function (source) { return source.lift(new SwitchFirstOperator()); };\n}\nvar SwitchFirstOperator = /*@__PURE__*/ (function () {\n    function SwitchFirstOperator() {\n    }\n    SwitchFirstOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SwitchFirstSubscriber(subscriber));\n    };\n    return SwitchFirstOperator;\n}());\nvar SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SwitchFirstSubscriber, _super);\n    function SwitchFirstSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.hasCompleted = false;\n        _this.hasSubscription = false;\n        return _this;\n    }\n    SwitchFirstSubscriber.prototype._next = function (value) {\n        if (!this.hasSubscription) {\n            this.hasSubscription = true;\n            this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));\n        }\n    };\n    SwitchFirstSubscriber.prototype._complete = function () {\n        this.hasCompleted = true;\n        if (!this.hasSubscription) {\n            this.destination.complete();\n        }\n    };\n    SwitchFirstSubscriber.prototype.notifyComplete = function () {\n        this.hasSubscription = false;\n        if (this.hasCompleted) {\n            this.destination.complete();\n        }\n    };\n    return SwitchFirstSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=exhaust.js.map\n","/** PURE_IMPORTS_START tslib,_map,_observable_from,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function exhaustMap(project, resultSelector) {\n    if (resultSelector) {\n        return function (source) { return source.pipe(exhaustMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n    }\n    return function (source) {\n        return source.lift(new ExhaustMapOperator(project));\n    };\n}\nvar ExhaustMapOperator = /*@__PURE__*/ (function () {\n    function ExhaustMapOperator(project) {\n        this.project = project;\n    }\n    ExhaustMapOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n    };\n    return ExhaustMapOperator;\n}());\nvar ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ExhaustMapSubscriber, _super);\n    function ExhaustMapSubscriber(destination, project) {\n        var _this = _super.call(this, destination) || this;\n        _this.project = project;\n        _this.hasSubscription = false;\n        _this.hasCompleted = false;\n        _this.index = 0;\n        return _this;\n    }\n    ExhaustMapSubscriber.prototype._next = function (value) {\n        if (!this.hasSubscription) {\n            this.tryNext(value);\n        }\n    };\n    ExhaustMapSubscriber.prototype.tryNext = function (value) {\n        var result;\n        var index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.hasSubscription = true;\n        this._innerSub(result);\n    };\n    ExhaustMapSubscriber.prototype._innerSub = function (result) {\n        var innerSubscriber = new SimpleInnerSubscriber(this);\n        var destination = this.destination;\n        destination.add(innerSubscriber);\n        var innerSubscription = innerSubscribe(result, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    };\n    ExhaustMapSubscriber.prototype._complete = function () {\n        this.hasCompleted = true;\n        if (!this.hasSubscription) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    };\n    ExhaustMapSubscriber.prototype.notifyNext = function (innerValue) {\n        this.destination.next(innerValue);\n    };\n    ExhaustMapSubscriber.prototype.notifyError = function (err) {\n        this.destination.error(err);\n    };\n    ExhaustMapSubscriber.prototype.notifyComplete = function () {\n        this.hasSubscription = false;\n        if (this.hasCompleted) {\n            this.destination.complete();\n        }\n    };\n    return ExhaustMapSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=exhaustMap.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function expand(project, concurrent, scheduler) {\n    if (concurrent === void 0) {\n        concurrent = Number.POSITIVE_INFINITY;\n    }\n    concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n    return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };\n}\nvar ExpandOperator = /*@__PURE__*/ (function () {\n    function ExpandOperator(project, concurrent, scheduler) {\n        this.project = project;\n        this.concurrent = concurrent;\n        this.scheduler = scheduler;\n    }\n    ExpandOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n    };\n    return ExpandOperator;\n}());\nexport { ExpandOperator };\nvar ExpandSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ExpandSubscriber, _super);\n    function ExpandSubscriber(destination, project, concurrent, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.project = project;\n        _this.concurrent = concurrent;\n        _this.scheduler = scheduler;\n        _this.index = 0;\n        _this.active = 0;\n        _this.hasCompleted = false;\n        if (concurrent < Number.POSITIVE_INFINITY) {\n            _this.buffer = [];\n        }\n        return _this;\n    }\n    ExpandSubscriber.dispatch = function (arg) {\n        var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;\n        subscriber.subscribeToProjection(result, value, index);\n    };\n    ExpandSubscriber.prototype._next = function (value) {\n        var destination = this.destination;\n        if (destination.closed) {\n            this._complete();\n            return;\n        }\n        var index = this.index++;\n        if (this.active < this.concurrent) {\n            destination.next(value);\n            try {\n                var project = this.project;\n                var result = project(value, index);\n                if (!this.scheduler) {\n                    this.subscribeToProjection(result, value, index);\n                }\n                else {\n                    var state = { subscriber: this, result: result, value: value, index: index };\n                    var destination_1 = this.destination;\n                    destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));\n                }\n            }\n            catch (e) {\n                destination.error(e);\n            }\n        }\n        else {\n            this.buffer.push(value);\n        }\n    };\n    ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {\n        this.active++;\n        var destination = this.destination;\n        destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this)));\n    };\n    ExpandSubscriber.prototype._complete = function () {\n        this.hasCompleted = true;\n        if (this.hasCompleted && this.active === 0) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    };\n    ExpandSubscriber.prototype.notifyNext = function (innerValue) {\n        this._next(innerValue);\n    };\n    ExpandSubscriber.prototype.notifyComplete = function () {\n        var buffer = this.buffer;\n        this.active--;\n        if (buffer && buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        if (this.hasCompleted && this.active === 0) {\n            this.destination.complete();\n        }\n    };\n    return ExpandSubscriber;\n}(SimpleOuterSubscriber));\nexport { ExpandSubscriber };\n//# sourceMappingURL=expand.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function find(predicate, thisArg) {\n    if (typeof predicate !== 'function') {\n        throw new TypeError('predicate is not a function');\n    }\n    return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };\n}\nvar FindValueOperator = /*@__PURE__*/ (function () {\n    function FindValueOperator(predicate, source, yieldIndex, thisArg) {\n        this.predicate = predicate;\n        this.source = source;\n        this.yieldIndex = yieldIndex;\n        this.thisArg = thisArg;\n    }\n    FindValueOperator.prototype.call = function (observer, source) {\n        return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));\n    };\n    return FindValueOperator;\n}());\nexport { FindValueOperator };\nvar FindValueSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(FindValueSubscriber, _super);\n    function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.source = source;\n        _this.yieldIndex = yieldIndex;\n        _this.thisArg = thisArg;\n        _this.index = 0;\n        return _this;\n    }\n    FindValueSubscriber.prototype.notifyComplete = function (value) {\n        var destination = this.destination;\n        destination.next(value);\n        destination.complete();\n        this.unsubscribe();\n    };\n    FindValueSubscriber.prototype._next = function (value) {\n        var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;\n        var index = this.index++;\n        try {\n            var result = predicate.call(thisArg || this, value, index, this.source);\n            if (result) {\n                this.notifyComplete(this.yieldIndex ? index : value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    };\n    FindValueSubscriber.prototype._complete = function () {\n        this.notifyComplete(this.yieldIndex ? -1 : undefined);\n    };\n    return FindValueSubscriber;\n}(Subscriber));\nexport { FindValueSubscriber };\n//# sourceMappingURL=find.js.map\n","/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */\nimport { FindValueOperator } from '../operators/find';\nexport function findIndex(predicate, thisArg) {\n    return function (source) { return source.lift(new FindValueOperator(predicate, source, true, thisArg)); };\n}\n//# sourceMappingURL=findIndex.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function ignoreElements() {\n    return function ignoreElementsOperatorFunction(source) {\n        return source.lift(new IgnoreElementsOperator());\n    };\n}\nvar IgnoreElementsOperator = /*@__PURE__*/ (function () {\n    function IgnoreElementsOperator() {\n    }\n    IgnoreElementsOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new IgnoreElementsSubscriber(subscriber));\n    };\n    return IgnoreElementsOperator;\n}());\nvar IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(IgnoreElementsSubscriber, _super);\n    function IgnoreElementsSubscriber() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    IgnoreElementsSubscriber.prototype._next = function (unused) {\n    };\n    return IgnoreElementsSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ignoreElements.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function isEmpty() {\n    return function (source) { return source.lift(new IsEmptyOperator()); };\n}\nvar IsEmptyOperator = /*@__PURE__*/ (function () {\n    function IsEmptyOperator() {\n    }\n    IsEmptyOperator.prototype.call = function (observer, source) {\n        return source.subscribe(new IsEmptySubscriber(observer));\n    };\n    return IsEmptyOperator;\n}());\nvar IsEmptySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(IsEmptySubscriber, _super);\n    function IsEmptySubscriber(destination) {\n        return _super.call(this, destination) || this;\n    }\n    IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {\n        var destination = this.destination;\n        destination.next(isEmpty);\n        destination.complete();\n    };\n    IsEmptySubscriber.prototype._next = function (value) {\n        this.notifyComplete(false);\n    };\n    IsEmptySubscriber.prototype._complete = function () {\n        this.notifyComplete(true);\n    };\n    return IsEmptySubscriber;\n}(Subscriber));\n//# sourceMappingURL=isEmpty.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function mapTo(value) {\n    return function (source) { return source.lift(new MapToOperator(value)); };\n}\nvar MapToOperator = /*@__PURE__*/ (function () {\n    function MapToOperator(value) {\n        this.value = value;\n    }\n    MapToOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new MapToSubscriber(subscriber, this.value));\n    };\n    return MapToOperator;\n}());\nvar MapToSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(MapToSubscriber, _super);\n    function MapToSubscriber(destination, value) {\n        var _this = _super.call(this, destination) || this;\n        _this.value = value;\n        return _this;\n    }\n    MapToSubscriber.prototype._next = function (x) {\n        this.destination.next(this.value);\n    };\n    return MapToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=mapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function materialize() {\n    return function materializeOperatorFunction(source) {\n        return source.lift(new MaterializeOperator());\n    };\n}\nvar MaterializeOperator = /*@__PURE__*/ (function () {\n    function MaterializeOperator() {\n    }\n    MaterializeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new MaterializeSubscriber(subscriber));\n    };\n    return MaterializeOperator;\n}());\nvar MaterializeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(MaterializeSubscriber, _super);\n    function MaterializeSubscriber(destination) {\n        return _super.call(this, destination) || this;\n    }\n    MaterializeSubscriber.prototype._next = function (value) {\n        this.destination.next(Notification.createNext(value));\n    };\n    MaterializeSubscriber.prototype._error = function (err) {\n        var destination = this.destination;\n        destination.next(Notification.createError(err));\n        destination.complete();\n    };\n    MaterializeSubscriber.prototype._complete = function () {\n        var destination = this.destination;\n        destination.next(Notification.createComplete());\n        destination.complete();\n    };\n    return MaterializeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=materialize.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { reduce } from './reduce';\nexport function max(comparer) {\n    var max = (typeof comparer === 'function')\n        ? function (x, y) { return comparer(x, y) > 0 ? x : y; }\n        : function (x, y) { return x > y ? x : y; };\n    return reduce(max);\n}\n//# sourceMappingURL=max.js.map\n","/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */\nimport { merge as mergeStatic } from '../observable/merge';\nexport function merge() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    return function (source) { return source.lift.call(mergeStatic.apply(void 0, [source].concat(observables))); };\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent) {\n    if (concurrent === void 0) {\n        concurrent = Number.POSITIVE_INFINITY;\n    }\n    if (typeof resultSelector === 'function') {\n        return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n    }\n    if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return mergeMap(function () { return innerObservable; }, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeScan(accumulator, seed, concurrent) {\n    if (concurrent === void 0) {\n        concurrent = Number.POSITIVE_INFINITY;\n    }\n    return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };\n}\nvar MergeScanOperator = /*@__PURE__*/ (function () {\n    function MergeScanOperator(accumulator, seed, concurrent) {\n        this.accumulator = accumulator;\n        this.seed = seed;\n        this.concurrent = concurrent;\n    }\n    MergeScanOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n    };\n    return MergeScanOperator;\n}());\nexport { MergeScanOperator };\nvar MergeScanSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(MergeScanSubscriber, _super);\n    function MergeScanSubscriber(destination, accumulator, acc, concurrent) {\n        var _this = _super.call(this, destination) || this;\n        _this.accumulator = accumulator;\n        _this.acc = acc;\n        _this.concurrent = concurrent;\n        _this.hasValue = false;\n        _this.hasCompleted = false;\n        _this.buffer = [];\n        _this.active = 0;\n        _this.index = 0;\n        return _this;\n    }\n    MergeScanSubscriber.prototype._next = function (value) {\n        if (this.active < this.concurrent) {\n            var index = this.index++;\n            var destination = this.destination;\n            var ish = void 0;\n            try {\n                var accumulator = this.accumulator;\n                ish = accumulator(this.acc, value, index);\n            }\n            catch (e) {\n                return destination.error(e);\n            }\n            this.active++;\n            this._innerSub(ish);\n        }\n        else {\n            this.buffer.push(value);\n        }\n    };\n    MergeScanSubscriber.prototype._innerSub = function (ish) {\n        var innerSubscriber = new SimpleInnerSubscriber(this);\n        var destination = this.destination;\n        destination.add(innerSubscriber);\n        var innerSubscription = innerSubscribe(ish, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    };\n    MergeScanSubscriber.prototype._complete = function () {\n        this.hasCompleted = true;\n        if (this.active === 0 && this.buffer.length === 0) {\n            if (this.hasValue === false) {\n                this.destination.next(this.acc);\n            }\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    };\n    MergeScanSubscriber.prototype.notifyNext = function (innerValue) {\n        var destination = this.destination;\n        this.acc = innerValue;\n        this.hasValue = true;\n        destination.next(innerValue);\n    };\n    MergeScanSubscriber.prototype.notifyComplete = function () {\n        var buffer = this.buffer;\n        this.active--;\n        if (buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        else if (this.active === 0 && this.hasCompleted) {\n            if (this.hasValue === false) {\n                this.destination.next(this.acc);\n            }\n            this.destination.complete();\n        }\n    };\n    return MergeScanSubscriber;\n}(SimpleOuterSubscriber));\nexport { MergeScanSubscriber };\n//# sourceMappingURL=mergeScan.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { reduce } from './reduce';\nexport function min(comparer) {\n    var min = (typeof comparer === 'function')\n        ? function (x, y) { return comparer(x, y) < 0 ? x : y; }\n        : function (x, y) { return x < y ? x : y; };\n    return reduce(min);\n}\n//# sourceMappingURL=min.js.map\n","/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { from } from '../observable/from';\nimport { isArray } from '../util/isArray';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function onErrorResumeNext() {\n    var nextSources = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        nextSources[_i] = arguments[_i];\n    }\n    if (nextSources.length === 1 && isArray(nextSources[0])) {\n        nextSources = nextSources[0];\n    }\n    return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };\n}\nexport function onErrorResumeNextStatic() {\n    var nextSources = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        nextSources[_i] = arguments[_i];\n    }\n    var source = undefined;\n    if (nextSources.length === 1 && isArray(nextSources[0])) {\n        nextSources = nextSources[0];\n    }\n    source = nextSources.shift();\n    return from(source).lift(new OnErrorResumeNextOperator(nextSources));\n}\nvar OnErrorResumeNextOperator = /*@__PURE__*/ (function () {\n    function OnErrorResumeNextOperator(nextSources) {\n        this.nextSources = nextSources;\n    }\n    OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));\n    };\n    return OnErrorResumeNextOperator;\n}());\nvar OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(OnErrorResumeNextSubscriber, _super);\n    function OnErrorResumeNextSubscriber(destination, nextSources) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        _this.nextSources = nextSources;\n        return _this;\n    }\n    OnErrorResumeNextSubscriber.prototype.notifyError = function () {\n        this.subscribeToNextSource();\n    };\n    OnErrorResumeNextSubscriber.prototype.notifyComplete = function () {\n        this.subscribeToNextSource();\n    };\n    OnErrorResumeNextSubscriber.prototype._error = function (err) {\n        this.subscribeToNextSource();\n        this.unsubscribe();\n    };\n    OnErrorResumeNextSubscriber.prototype._complete = function () {\n        this.subscribeToNextSource();\n        this.unsubscribe();\n    };\n    OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {\n        var next = this.nextSources.shift();\n        if (!!next) {\n            var innerSubscriber = new SimpleInnerSubscriber(this);\n            var destination = this.destination;\n            destination.add(innerSubscriber);\n            var innerSubscription = innerSubscribe(next, innerSubscriber);\n            if (innerSubscription !== innerSubscriber) {\n                destination.add(innerSubscription);\n            }\n        }\n        else {\n            this.destination.complete();\n        }\n    };\n    return OnErrorResumeNextSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=onErrorResumeNext.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function pairwise() {\n    return function (source) { return source.lift(new PairwiseOperator()); };\n}\nvar PairwiseOperator = /*@__PURE__*/ (function () {\n    function PairwiseOperator() {\n    }\n    PairwiseOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new PairwiseSubscriber(subscriber));\n    };\n    return PairwiseOperator;\n}());\nvar PairwiseSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(PairwiseSubscriber, _super);\n    function PairwiseSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.hasPrev = false;\n        return _this;\n    }\n    PairwiseSubscriber.prototype._next = function (value) {\n        var pair;\n        if (this.hasPrev) {\n            pair = [this.prev, value];\n        }\n        else {\n            this.hasPrev = true;\n        }\n        this.prev = value;\n        if (pair) {\n            this.destination.next(pair);\n        }\n    };\n    return PairwiseSubscriber;\n}(Subscriber));\n//# sourceMappingURL=pairwise.js.map\n","/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */\nimport { not } from '../util/not';\nimport { filter } from './filter';\nexport function partition(predicate, thisArg) {\n    return function (source) {\n        return [\n            filter(predicate, thisArg)(source),\n            filter(not(predicate, thisArg))(source)\n        ];\n    };\n}\n//# sourceMappingURL=partition.js.map\n","/** PURE_IMPORTS_START _map PURE_IMPORTS_END */\nimport { map } from './map';\nexport function pluck() {\n    var properties = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        properties[_i] = arguments[_i];\n    }\n    var length = properties.length;\n    if (length === 0) {\n        throw new Error('list of properties cannot be empty.');\n    }\n    return function (source) { return map(plucker(properties, length))(source); };\n}\nfunction plucker(props, length) {\n    var mapper = function (x) {\n        var currentProp = x;\n        for (var i = 0; i < length; i++) {\n            var p = currentProp != null ? currentProp[props[i]] : undefined;\n            if (p !== void 0) {\n                currentProp = p;\n            }\n            else {\n                return undefined;\n            }\n        }\n        return currentProp;\n    };\n    return mapper;\n}\n//# sourceMappingURL=pluck.js.map\n","/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */\nimport { Subject } from '../Subject';\nimport { multicast } from './multicast';\nexport function publish(selector) {\n    return selector ?\n        multicast(function () { return new Subject(); }, selector) :\n        multicast(new Subject());\n}\n//# sourceMappingURL=publish.js.map\n","/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */\nimport { BehaviorSubject } from '../BehaviorSubject';\nimport { multicast } from './multicast';\nexport function publishBehavior(value) {\n    return function (source) { return multicast(new BehaviorSubject(value))(source); };\n}\n//# sourceMappingURL=publishBehavior.js.map\n","/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */\nimport { AsyncSubject } from '../AsyncSubject';\nimport { multicast } from './multicast';\nexport function publishLast() {\n    return function (source) { return multicast(new AsyncSubject())(source); };\n}\n//# sourceMappingURL=publishLast.js.map\n","/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {\n    if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {\n        scheduler = selectorOrScheduler;\n    }\n    var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;\n    var subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n    return function (source) { return multicast(function () { return subject; }, selector)(source); };\n}\n//# sourceMappingURL=publishReplay.js.map\n","/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */\nimport { isArray } from '../util/isArray';\nimport { race as raceStatic } from '../observable/race';\nexport function race() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    return function raceOperatorFunction(source) {\n        if (observables.length === 1 && isArray(observables[0])) {\n            observables = observables[0];\n        }\n        return source.lift.call(raceStatic.apply(void 0, [source].concat(observables)));\n    };\n}\n//# sourceMappingURL=race.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { empty } from '../observable/empty';\nexport function repeat(count) {\n    if (count === void 0) {\n        count = -1;\n    }\n    return function (source) {\n        if (count === 0) {\n            return empty();\n        }\n        else if (count < 0) {\n            return source.lift(new RepeatOperator(-1, source));\n        }\n        else {\n            return source.lift(new RepeatOperator(count - 1, source));\n        }\n    };\n}\nvar RepeatOperator = /*@__PURE__*/ (function () {\n    function RepeatOperator(count, source) {\n        this.count = count;\n        this.source = source;\n    }\n    RepeatOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n    };\n    return RepeatOperator;\n}());\nvar RepeatSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RepeatSubscriber, _super);\n    function RepeatSubscriber(destination, count, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.count = count;\n        _this.source = source;\n        return _this;\n    }\n    RepeatSubscriber.prototype.complete = function () {\n        if (!this.isStopped) {\n            var _a = this, source = _a.source, count = _a.count;\n            if (count === 0) {\n                return _super.prototype.complete.call(this);\n            }\n            else if (count > -1) {\n                this.count = count - 1;\n            }\n            source.subscribe(this._unsubscribeAndRecycle());\n        }\n    };\n    return RepeatSubscriber;\n}(Subscriber));\n//# sourceMappingURL=repeat.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function repeatWhen(notifier) {\n    return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };\n}\nvar RepeatWhenOperator = /*@__PURE__*/ (function () {\n    function RepeatWhenOperator(notifier) {\n        this.notifier = notifier;\n    }\n    RepeatWhenOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n    };\n    return RepeatWhenOperator;\n}());\nvar RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RepeatWhenSubscriber, _super);\n    function RepeatWhenSubscriber(destination, notifier, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.notifier = notifier;\n        _this.source = source;\n        _this.sourceIsBeingSubscribedTo = true;\n        return _this;\n    }\n    RepeatWhenSubscriber.prototype.notifyNext = function () {\n        this.sourceIsBeingSubscribedTo = true;\n        this.source.subscribe(this);\n    };\n    RepeatWhenSubscriber.prototype.notifyComplete = function () {\n        if (this.sourceIsBeingSubscribedTo === false) {\n            return _super.prototype.complete.call(this);\n        }\n    };\n    RepeatWhenSubscriber.prototype.complete = function () {\n        this.sourceIsBeingSubscribedTo = false;\n        if (!this.isStopped) {\n            if (!this.retries) {\n                this.subscribeToRetries();\n            }\n            if (!this.retriesSubscription || this.retriesSubscription.closed) {\n                return _super.prototype.complete.call(this);\n            }\n            this._unsubscribeAndRecycle();\n            this.notifications.next(undefined);\n        }\n    };\n    RepeatWhenSubscriber.prototype._unsubscribe = function () {\n        var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;\n        if (notifications) {\n            notifications.unsubscribe();\n            this.notifications = undefined;\n        }\n        if (retriesSubscription) {\n            retriesSubscription.unsubscribe();\n            this.retriesSubscription = undefined;\n        }\n        this.retries = undefined;\n    };\n    RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {\n        var _unsubscribe = this._unsubscribe;\n        this._unsubscribe = null;\n        _super.prototype._unsubscribeAndRecycle.call(this);\n        this._unsubscribe = _unsubscribe;\n        return this;\n    };\n    RepeatWhenSubscriber.prototype.subscribeToRetries = function () {\n        this.notifications = new Subject();\n        var retries;\n        try {\n            var notifier = this.notifier;\n            retries = notifier(this.notifications);\n        }\n        catch (e) {\n            return _super.prototype.complete.call(this);\n        }\n        this.retries = retries;\n        this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n    };\n    return RepeatWhenSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=repeatWhen.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function retry(count) {\n    if (count === void 0) {\n        count = -1;\n    }\n    return function (source) { return source.lift(new RetryOperator(count, source)); };\n}\nvar RetryOperator = /*@__PURE__*/ (function () {\n    function RetryOperator(count, source) {\n        this.count = count;\n        this.source = source;\n    }\n    RetryOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n    };\n    return RetryOperator;\n}());\nvar RetrySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RetrySubscriber, _super);\n    function RetrySubscriber(destination, count, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.count = count;\n        _this.source = source;\n        return _this;\n    }\n    RetrySubscriber.prototype.error = function (err) {\n        if (!this.isStopped) {\n            var _a = this, source = _a.source, count = _a.count;\n            if (count === 0) {\n                return _super.prototype.error.call(this, err);\n            }\n            else if (count > -1) {\n                this.count = count - 1;\n            }\n            source.subscribe(this._unsubscribeAndRecycle());\n        }\n    };\n    return RetrySubscriber;\n}(Subscriber));\n//# sourceMappingURL=retry.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function retryWhen(notifier) {\n    return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };\n}\nvar RetryWhenOperator = /*@__PURE__*/ (function () {\n    function RetryWhenOperator(notifier, source) {\n        this.notifier = notifier;\n        this.source = source;\n    }\n    RetryWhenOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));\n    };\n    return RetryWhenOperator;\n}());\nvar RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RetryWhenSubscriber, _super);\n    function RetryWhenSubscriber(destination, notifier, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.notifier = notifier;\n        _this.source = source;\n        return _this;\n    }\n    RetryWhenSubscriber.prototype.error = function (err) {\n        if (!this.isStopped) {\n            var errors = this.errors;\n            var retries = this.retries;\n            var retriesSubscription = this.retriesSubscription;\n            if (!retries) {\n                errors = new Subject();\n                try {\n                    var notifier = this.notifier;\n                    retries = notifier(errors);\n                }\n                catch (e) {\n                    return _super.prototype.error.call(this, e);\n                }\n                retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n            }\n            else {\n                this.errors = undefined;\n                this.retriesSubscription = undefined;\n            }\n            this._unsubscribeAndRecycle();\n            this.errors = errors;\n            this.retries = retries;\n            this.retriesSubscription = retriesSubscription;\n            errors.next(err);\n        }\n    };\n    RetryWhenSubscriber.prototype._unsubscribe = function () {\n        var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;\n        if (errors) {\n            errors.unsubscribe();\n            this.errors = undefined;\n        }\n        if (retriesSubscription) {\n            retriesSubscription.unsubscribe();\n            this.retriesSubscription = undefined;\n        }\n        this.retries = undefined;\n    };\n    RetryWhenSubscriber.prototype.notifyNext = function () {\n        var _unsubscribe = this._unsubscribe;\n        this._unsubscribe = null;\n        this._unsubscribeAndRecycle();\n        this._unsubscribe = _unsubscribe;\n        this.source.subscribe(this);\n    };\n    return RetryWhenSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=retryWhen.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function sampleTime(period, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };\n}\nvar SampleTimeOperator = /*@__PURE__*/ (function () {\n    function SampleTimeOperator(period, scheduler) {\n        this.period = period;\n        this.scheduler = scheduler;\n    }\n    SampleTimeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n    };\n    return SampleTimeOperator;\n}());\nvar SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SampleTimeSubscriber, _super);\n    function SampleTimeSubscriber(destination, period, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.period = period;\n        _this.scheduler = scheduler;\n        _this.hasValue = false;\n        _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));\n        return _this;\n    }\n    SampleTimeSubscriber.prototype._next = function (value) {\n        this.lastValue = value;\n        this.hasValue = true;\n    };\n    SampleTimeSubscriber.prototype.notifyNext = function () {\n        if (this.hasValue) {\n            this.hasValue = false;\n            this.destination.next(this.lastValue);\n        }\n    };\n    return SampleTimeSubscriber;\n}(Subscriber));\nfunction dispatchNotification(state) {\n    var subscriber = state.subscriber, period = state.period;\n    subscriber.notifyNext();\n    this.schedule(state, period);\n}\n//# sourceMappingURL=sampleTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function sequenceEqual(compareTo, comparator) {\n    return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };\n}\nvar SequenceEqualOperator = /*@__PURE__*/ (function () {\n    function SequenceEqualOperator(compareTo, comparator) {\n        this.compareTo = compareTo;\n        this.comparator = comparator;\n    }\n    SequenceEqualOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));\n    };\n    return SequenceEqualOperator;\n}());\nexport { SequenceEqualOperator };\nvar SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SequenceEqualSubscriber, _super);\n    function SequenceEqualSubscriber(destination, compareTo, comparator) {\n        var _this = _super.call(this, destination) || this;\n        _this.compareTo = compareTo;\n        _this.comparator = comparator;\n        _this._a = [];\n        _this._b = [];\n        _this._oneComplete = false;\n        _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));\n        return _this;\n    }\n    SequenceEqualSubscriber.prototype._next = function (value) {\n        if (this._oneComplete && this._b.length === 0) {\n            this.emit(false);\n        }\n        else {\n            this._a.push(value);\n            this.checkValues();\n        }\n    };\n    SequenceEqualSubscriber.prototype._complete = function () {\n        if (this._oneComplete) {\n            this.emit(this._a.length === 0 && this._b.length === 0);\n        }\n        else {\n            this._oneComplete = true;\n        }\n        this.unsubscribe();\n    };\n    SequenceEqualSubscriber.prototype.checkValues = function () {\n        var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;\n        while (_a.length > 0 && _b.length > 0) {\n            var a = _a.shift();\n            var b = _b.shift();\n            var areEqual = false;\n            try {\n                areEqual = comparator ? comparator(a, b) : a === b;\n            }\n            catch (e) {\n                this.destination.error(e);\n            }\n            if (!areEqual) {\n                this.emit(false);\n            }\n        }\n    };\n    SequenceEqualSubscriber.prototype.emit = function (value) {\n        var destination = this.destination;\n        destination.next(value);\n        destination.complete();\n    };\n    SequenceEqualSubscriber.prototype.nextB = function (value) {\n        if (this._oneComplete && this._a.length === 0) {\n            this.emit(false);\n        }\n        else {\n            this._b.push(value);\n            this.checkValues();\n        }\n    };\n    SequenceEqualSubscriber.prototype.completeB = function () {\n        if (this._oneComplete) {\n            this.emit(this._a.length === 0 && this._b.length === 0);\n        }\n        else {\n            this._oneComplete = true;\n        }\n    };\n    return SequenceEqualSubscriber;\n}(Subscriber));\nexport { SequenceEqualSubscriber };\nvar SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SequenceEqualCompareToSubscriber, _super);\n    function SequenceEqualCompareToSubscriber(destination, parent) {\n        var _this = _super.call(this, destination) || this;\n        _this.parent = parent;\n        return _this;\n    }\n    SequenceEqualCompareToSubscriber.prototype._next = function (value) {\n        this.parent.nextB(value);\n    };\n    SequenceEqualCompareToSubscriber.prototype._error = function (err) {\n        this.parent.error(err);\n        this.unsubscribe();\n    };\n    SequenceEqualCompareToSubscriber.prototype._complete = function () {\n        this.parent.completeB();\n        this.unsubscribe();\n    };\n    return SequenceEqualCompareToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=sequenceEqual.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nexport function single(predicate) {\n    return function (source) { return source.lift(new SingleOperator(predicate, source)); };\n}\nvar SingleOperator = /*@__PURE__*/ (function () {\n    function SingleOperator(predicate, source) {\n        this.predicate = predicate;\n        this.source = source;\n    }\n    SingleOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n    };\n    return SingleOperator;\n}());\nvar SingleSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SingleSubscriber, _super);\n    function SingleSubscriber(destination, predicate, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.source = source;\n        _this.seenValue = false;\n        _this.index = 0;\n        return _this;\n    }\n    SingleSubscriber.prototype.applySingleValue = function (value) {\n        if (this.seenValue) {\n            this.destination.error('Sequence contains more than one element');\n        }\n        else {\n            this.seenValue = true;\n            this.singleValue = value;\n        }\n    };\n    SingleSubscriber.prototype._next = function (value) {\n        var index = this.index++;\n        if (this.predicate) {\n            this.tryNext(value, index);\n        }\n        else {\n            this.applySingleValue(value);\n        }\n    };\n    SingleSubscriber.prototype.tryNext = function (value, index) {\n        try {\n            if (this.predicate(value, index, this.source)) {\n                this.applySingleValue(value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    };\n    SingleSubscriber.prototype._complete = function () {\n        var destination = this.destination;\n        if (this.index > 0) {\n            destination.next(this.seenValue ? this.singleValue : undefined);\n            destination.complete();\n        }\n        else {\n            destination.error(new EmptyError);\n        }\n    };\n    return SingleSubscriber;\n}(Subscriber));\n//# sourceMappingURL=single.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nexport function skipLast(count) {\n    return function (source) { return source.lift(new SkipLastOperator(count)); };\n}\nvar SkipLastOperator = /*@__PURE__*/ (function () {\n    function SkipLastOperator(_skipCount) {\n        this._skipCount = _skipCount;\n        if (this._skipCount < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    SkipLastOperator.prototype.call = function (subscriber, source) {\n        if (this._skipCount === 0) {\n            return source.subscribe(new Subscriber(subscriber));\n        }\n        else {\n            return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n        }\n    };\n    return SkipLastOperator;\n}());\nvar SkipLastSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SkipLastSubscriber, _super);\n    function SkipLastSubscriber(destination, _skipCount) {\n        var _this = _super.call(this, destination) || this;\n        _this._skipCount = _skipCount;\n        _this._count = 0;\n        _this._ring = new Array(_skipCount);\n        return _this;\n    }\n    SkipLastSubscriber.prototype._next = function (value) {\n        var skipCount = this._skipCount;\n        var count = this._count++;\n        if (count < skipCount) {\n            this._ring[count] = value;\n        }\n        else {\n            var currentIndex = count % skipCount;\n            var ring = this._ring;\n            var oldValue = ring[currentIndex];\n            ring[currentIndex] = value;\n            this.destination.next(oldValue);\n        }\n    };\n    return SkipLastSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skipLast.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function skipUntil(notifier) {\n    return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}\nvar SkipUntilOperator = /*@__PURE__*/ (function () {\n    function SkipUntilOperator(notifier) {\n        this.notifier = notifier;\n    }\n    SkipUntilOperator.prototype.call = function (destination, source) {\n        return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));\n    };\n    return SkipUntilOperator;\n}());\nvar SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SkipUntilSubscriber, _super);\n    function SkipUntilSubscriber(destination, notifier) {\n        var _this = _super.call(this, destination) || this;\n        _this.hasValue = false;\n        var innerSubscriber = new SimpleInnerSubscriber(_this);\n        _this.add(innerSubscriber);\n        _this.innerSubscription = innerSubscriber;\n        var innerSubscription = innerSubscribe(notifier, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            _this.add(innerSubscription);\n            _this.innerSubscription = innerSubscription;\n        }\n        return _this;\n    }\n    SkipUntilSubscriber.prototype._next = function (value) {\n        if (this.hasValue) {\n            _super.prototype._next.call(this, value);\n        }\n    };\n    SkipUntilSubscriber.prototype.notifyNext = function () {\n        this.hasValue = true;\n        if (this.innerSubscription) {\n            this.innerSubscription.unsubscribe();\n        }\n    };\n    SkipUntilSubscriber.prototype.notifyComplete = function () {\n    };\n    return SkipUntilSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=skipUntil.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function skipWhile(predicate) {\n    return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}\nvar SkipWhileOperator = /*@__PURE__*/ (function () {\n    function SkipWhileOperator(predicate) {\n        this.predicate = predicate;\n    }\n    SkipWhileOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n    };\n    return SkipWhileOperator;\n}());\nvar SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SkipWhileSubscriber, _super);\n    function SkipWhileSubscriber(destination, predicate) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.skipping = true;\n        _this.index = 0;\n        return _this;\n    }\n    SkipWhileSubscriber.prototype._next = function (value) {\n        var destination = this.destination;\n        if (this.skipping) {\n            this.tryCallPredicate(value);\n        }\n        if (!this.skipping) {\n            destination.next(value);\n        }\n    };\n    SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {\n        try {\n            var result = this.predicate(value, this.index++);\n            this.skipping = Boolean(result);\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    };\n    return SkipWhileSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skipWhile.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from '../Observable';\nimport { asap } from '../scheduler/asap';\nimport { isNumeric } from '../util/isNumeric';\nvar SubscribeOnObservable = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SubscribeOnObservable, _super);\n    function SubscribeOnObservable(source, delayTime, scheduler) {\n        if (delayTime === void 0) {\n            delayTime = 0;\n        }\n        if (scheduler === void 0) {\n            scheduler = asap;\n        }\n        var _this = _super.call(this) || this;\n        _this.source = source;\n        _this.delayTime = delayTime;\n        _this.scheduler = scheduler;\n        if (!isNumeric(delayTime) || delayTime < 0) {\n            _this.delayTime = 0;\n        }\n        if (!scheduler || typeof scheduler.schedule !== 'function') {\n            _this.scheduler = asap;\n        }\n        return _this;\n    }\n    SubscribeOnObservable.create = function (source, delay, scheduler) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (scheduler === void 0) {\n            scheduler = asap;\n        }\n        return new SubscribeOnObservable(source, delay, scheduler);\n    };\n    SubscribeOnObservable.dispatch = function (arg) {\n        var source = arg.source, subscriber = arg.subscriber;\n        return this.add(source.subscribe(subscriber));\n    };\n    SubscribeOnObservable.prototype._subscribe = function (subscriber) {\n        var delay = this.delayTime;\n        var source = this.source;\n        var scheduler = this.scheduler;\n        return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {\n            source: source, subscriber: subscriber\n        });\n    };\n    return SubscribeOnObservable;\n}(Observable));\nexport { SubscribeOnObservable };\n//# sourceMappingURL=SubscribeOnObservable.js.map\n","/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */\nimport { SubscribeOnObservable } from '../observable/SubscribeOnObservable';\nexport function subscribeOn(scheduler, delay) {\n    if (delay === void 0) {\n        delay = 0;\n    }\n    return function subscribeOnOperatorFunction(source) {\n        return source.lift(new SubscribeOnOperator(scheduler, delay));\n    };\n}\nvar SubscribeOnOperator = /*@__PURE__*/ (function () {\n    function SubscribeOnOperator(scheduler, delay) {\n        this.scheduler = scheduler;\n        this.delay = delay;\n    }\n    SubscribeOnOperator.prototype.call = function (subscriber, source) {\n        return new SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);\n    };\n    return SubscribeOnOperator;\n}());\n//# sourceMappingURL=subscribeOn.js.map\n","/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n    return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map\n","/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\nexport function switchMapTo(innerObservable, resultSelector) {\n    return resultSelector ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function takeWhile(predicate, inclusive) {\n    if (inclusive === void 0) {\n        inclusive = false;\n    }\n    return function (source) {\n        return source.lift(new TakeWhileOperator(predicate, inclusive));\n    };\n}\nvar TakeWhileOperator = /*@__PURE__*/ (function () {\n    function TakeWhileOperator(predicate, inclusive) {\n        this.predicate = predicate;\n        this.inclusive = inclusive;\n    }\n    TakeWhileOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));\n    };\n    return TakeWhileOperator;\n}());\nvar TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TakeWhileSubscriber, _super);\n    function TakeWhileSubscriber(destination, predicate, inclusive) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.inclusive = inclusive;\n        _this.index = 0;\n        return _this;\n    }\n    TakeWhileSubscriber.prototype._next = function (value) {\n        var destination = this.destination;\n        var result;\n        try {\n            result = this.predicate(value, this.index++);\n        }\n        catch (err) {\n            destination.error(err);\n            return;\n        }\n        this.nextOrComplete(value, result);\n    };\n    TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {\n        var destination = this.destination;\n        if (Boolean(predicateResult)) {\n            destination.next(value);\n        }\n        else {\n            if (this.inclusive) {\n                destination.next(value);\n            }\n            destination.complete();\n        }\n    };\n    return TakeWhileSubscriber;\n}(Subscriber));\n//# sourceMappingURL=takeWhile.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport var defaultThrottleConfig = {\n    leading: true,\n    trailing: false\n};\nexport function throttle(durationSelector, config) {\n    if (config === void 0) {\n        config = defaultThrottleConfig;\n    }\n    return function (source) { return source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing)); };\n}\nvar ThrottleOperator = /*@__PURE__*/ (function () {\n    function ThrottleOperator(durationSelector, leading, trailing) {\n        this.durationSelector = durationSelector;\n        this.leading = leading;\n        this.trailing = trailing;\n    }\n    ThrottleOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n    };\n    return ThrottleOperator;\n}());\nvar ThrottleSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ThrottleSubscriber, _super);\n    function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        _this.durationSelector = durationSelector;\n        _this._leading = _leading;\n        _this._trailing = _trailing;\n        _this._hasValue = false;\n        return _this;\n    }\n    ThrottleSubscriber.prototype._next = function (value) {\n        this._hasValue = true;\n        this._sendValue = value;\n        if (!this._throttled) {\n            if (this._leading) {\n                this.send();\n            }\n            else {\n                this.throttle(value);\n            }\n        }\n    };\n    ThrottleSubscriber.prototype.send = function () {\n        var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;\n        if (_hasValue) {\n            this.destination.next(_sendValue);\n            this.throttle(_sendValue);\n        }\n        this._hasValue = false;\n        this._sendValue = undefined;\n    };\n    ThrottleSubscriber.prototype.throttle = function (value) {\n        var duration = this.tryDurationSelector(value);\n        if (!!duration) {\n            this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n        }\n    };\n    ThrottleSubscriber.prototype.tryDurationSelector = function (value) {\n        try {\n            return this.durationSelector(value);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return null;\n        }\n    };\n    ThrottleSubscriber.prototype.throttlingDone = function () {\n        var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;\n        if (_throttled) {\n            _throttled.unsubscribe();\n        }\n        this._throttled = undefined;\n        if (_trailing) {\n            this.send();\n        }\n    };\n    ThrottleSubscriber.prototype.notifyNext = function () {\n        this.throttlingDone();\n    };\n    ThrottleSubscriber.prototype.notifyComplete = function () {\n        this.throttlingDone();\n    };\n    return ThrottleSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=throttle.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { defaultThrottleConfig } from './throttle';\nexport function throttleTime(duration, scheduler, config) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    if (config === void 0) {\n        config = defaultThrottleConfig;\n    }\n    return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };\n}\nvar ThrottleTimeOperator = /*@__PURE__*/ (function () {\n    function ThrottleTimeOperator(duration, scheduler, leading, trailing) {\n        this.duration = duration;\n        this.scheduler = scheduler;\n        this.leading = leading;\n        this.trailing = trailing;\n    }\n    ThrottleTimeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n    };\n    return ThrottleTimeOperator;\n}());\nvar ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ThrottleTimeSubscriber, _super);\n    function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {\n        var _this = _super.call(this, destination) || this;\n        _this.duration = duration;\n        _this.scheduler = scheduler;\n        _this.leading = leading;\n        _this.trailing = trailing;\n        _this._hasTrailingValue = false;\n        _this._trailingValue = null;\n        return _this;\n    }\n    ThrottleTimeSubscriber.prototype._next = function (value) {\n        if (this.throttled) {\n            if (this.trailing) {\n                this._trailingValue = value;\n                this._hasTrailingValue = true;\n            }\n        }\n        else {\n            this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));\n            if (this.leading) {\n                this.destination.next(value);\n            }\n            else if (this.trailing) {\n                this._trailingValue = value;\n                this._hasTrailingValue = true;\n            }\n        }\n    };\n    ThrottleTimeSubscriber.prototype._complete = function () {\n        if (this._hasTrailingValue) {\n            this.destination.next(this._trailingValue);\n            this.destination.complete();\n        }\n        else {\n            this.destination.complete();\n        }\n    };\n    ThrottleTimeSubscriber.prototype.clearThrottle = function () {\n        var throttled = this.throttled;\n        if (throttled) {\n            if (this.trailing && this._hasTrailingValue) {\n                this.destination.next(this._trailingValue);\n                this._trailingValue = null;\n                this._hasTrailingValue = false;\n            }\n            throttled.unsubscribe();\n            this.remove(throttled);\n            this.throttled = null;\n        }\n    };\n    return ThrottleTimeSubscriber;\n}(Subscriber));\nfunction dispatchNext(arg) {\n    var subscriber = arg.subscriber;\n    subscriber.clearThrottle();\n}\n//# sourceMappingURL=throttleTime.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { scan } from './scan';\nimport { defer } from '../observable/defer';\nimport { map } from './map';\nexport function timeInterval(scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return function (source) {\n        return defer(function () {\n            return source.pipe(scan(function (_a, value) {\n                var current = _a.current;\n                return ({ value: value, current: scheduler.now(), last: current });\n            }, { current: scheduler.now(), value: undefined, last: undefined }), map(function (_a) {\n                var current = _a.current, last = _a.last, value = _a.value;\n                return new TimeInterval(value, current - last);\n            }));\n        });\n    };\n}\nvar TimeInterval = /*@__PURE__*/ (function () {\n    function TimeInterval(value, interval) {\n        this.value = value;\n        this.interval = interval;\n    }\n    return TimeInterval;\n}());\nexport { TimeInterval };\n//# sourceMappingURL=timeInterval.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function timeoutWith(due, withObservable, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return function (source) {\n        var absoluteTimeout = isDate(due);\n        var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);\n        return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n    };\n}\nvar TimeoutWithOperator = /*@__PURE__*/ (function () {\n    function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {\n        this.waitFor = waitFor;\n        this.absoluteTimeout = absoluteTimeout;\n        this.withObservable = withObservable;\n        this.scheduler = scheduler;\n    }\n    TimeoutWithOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n    };\n    return TimeoutWithOperator;\n}());\nvar TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TimeoutWithSubscriber, _super);\n    function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.absoluteTimeout = absoluteTimeout;\n        _this.waitFor = waitFor;\n        _this.withObservable = withObservable;\n        _this.scheduler = scheduler;\n        _this.scheduleTimeout();\n        return _this;\n    }\n    TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {\n        var withObservable = subscriber.withObservable;\n        subscriber._unsubscribeAndRecycle();\n        subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber)));\n    };\n    TimeoutWithSubscriber.prototype.scheduleTimeout = function () {\n        var action = this.action;\n        if (action) {\n            this.action = action.schedule(this, this.waitFor);\n        }\n        else {\n            this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));\n        }\n    };\n    TimeoutWithSubscriber.prototype._next = function (value) {\n        if (!this.absoluteTimeout) {\n            this.scheduleTimeout();\n        }\n        _super.prototype._next.call(this, value);\n    };\n    TimeoutWithSubscriber.prototype._unsubscribe = function () {\n        this.action = undefined;\n        this.scheduler = null;\n        this.withObservable = null;\n    };\n    return TimeoutWithSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=timeoutWith.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { TimeoutError } from '../util/TimeoutError';\nimport { timeoutWith } from './timeoutWith';\nimport { throwError } from '../observable/throwError';\nexport function timeout(due, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return timeoutWith(due, throwError(new TimeoutError()), scheduler);\n}\n//# sourceMappingURL=timeout.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { map } from './map';\nexport function timestamp(scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return map(function (value) { return new Timestamp(value, scheduler.now()); });\n}\nvar Timestamp = /*@__PURE__*/ (function () {\n    function Timestamp(value, timestamp) {\n        this.value = value;\n        this.timestamp = timestamp;\n    }\n    return Timestamp;\n}());\nexport { Timestamp };\n//# sourceMappingURL=timestamp.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function window(windowBoundaries) {\n    return function windowOperatorFunction(source) {\n        return source.lift(new WindowOperator(windowBoundaries));\n    };\n}\nvar WindowOperator = /*@__PURE__*/ (function () {\n    function WindowOperator(windowBoundaries) {\n        this.windowBoundaries = windowBoundaries;\n    }\n    WindowOperator.prototype.call = function (subscriber, source) {\n        var windowSubscriber = new WindowSubscriber(subscriber);\n        var sourceSubscription = source.subscribe(windowSubscriber);\n        if (!sourceSubscription.closed) {\n            windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n        }\n        return sourceSubscription;\n    };\n    return WindowOperator;\n}());\nvar WindowSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WindowSubscriber, _super);\n    function WindowSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.window = new Subject();\n        destination.next(_this.window);\n        return _this;\n    }\n    WindowSubscriber.prototype.notifyNext = function () {\n        this.openWindow();\n    };\n    WindowSubscriber.prototype.notifyError = function (error) {\n        this._error(error);\n    };\n    WindowSubscriber.prototype.notifyComplete = function () {\n        this._complete();\n    };\n    WindowSubscriber.prototype._next = function (value) {\n        this.window.next(value);\n    };\n    WindowSubscriber.prototype._error = function (err) {\n        this.window.error(err);\n        this.destination.error(err);\n    };\n    WindowSubscriber.prototype._complete = function () {\n        this.window.complete();\n        this.destination.complete();\n    };\n    WindowSubscriber.prototype._unsubscribe = function () {\n        this.window = null;\n    };\n    WindowSubscriber.prototype.openWindow = function () {\n        var prevWindow = this.window;\n        if (prevWindow) {\n            prevWindow.complete();\n        }\n        var destination = this.destination;\n        var newWindow = this.window = new Subject();\n        destination.next(newWindow);\n    };\n    return WindowSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=window.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subject } from '../Subject';\nexport function windowCount(windowSize, startWindowEvery) {\n    if (startWindowEvery === void 0) {\n        startWindowEvery = 0;\n    }\n    return function windowCountOperatorFunction(source) {\n        return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n    };\n}\nvar WindowCountOperator = /*@__PURE__*/ (function () {\n    function WindowCountOperator(windowSize, startWindowEvery) {\n        this.windowSize = windowSize;\n        this.startWindowEvery = startWindowEvery;\n    }\n    WindowCountOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n    };\n    return WindowCountOperator;\n}());\nvar WindowCountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WindowCountSubscriber, _super);\n    function WindowCountSubscriber(destination, windowSize, startWindowEvery) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        _this.windowSize = windowSize;\n        _this.startWindowEvery = startWindowEvery;\n        _this.windows = [new Subject()];\n        _this.count = 0;\n        destination.next(_this.windows[0]);\n        return _this;\n    }\n    WindowCountSubscriber.prototype._next = function (value) {\n        var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;\n        var destination = this.destination;\n        var windowSize = this.windowSize;\n        var windows = this.windows;\n        var len = windows.length;\n        for (var i = 0; i < len && !this.closed; i++) {\n            windows[i].next(value);\n        }\n        var c = this.count - windowSize + 1;\n        if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {\n            windows.shift().complete();\n        }\n        if (++this.count % startWindowEvery === 0 && !this.closed) {\n            var window_1 = new Subject();\n            windows.push(window_1);\n            destination.next(window_1);\n        }\n    };\n    WindowCountSubscriber.prototype._error = function (err) {\n        var windows = this.windows;\n        if (windows) {\n            while (windows.length > 0 && !this.closed) {\n                windows.shift().error(err);\n            }\n        }\n        this.destination.error(err);\n    };\n    WindowCountSubscriber.prototype._complete = function () {\n        var windows = this.windows;\n        if (windows) {\n            while (windows.length > 0 && !this.closed) {\n                windows.shift().complete();\n            }\n        }\n        this.destination.complete();\n    };\n    WindowCountSubscriber.prototype._unsubscribe = function () {\n        this.count = 0;\n        this.windows = null;\n    };\n    return WindowCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=windowCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function windowTime(windowTimeSpan) {\n    var scheduler = async;\n    var windowCreationInterval = null;\n    var maxWindowSize = Number.POSITIVE_INFINITY;\n    if (isScheduler(arguments[3])) {\n        scheduler = arguments[3];\n    }\n    if (isScheduler(arguments[2])) {\n        scheduler = arguments[2];\n    }\n    else if (isNumeric(arguments[2])) {\n        maxWindowSize = Number(arguments[2]);\n    }\n    if (isScheduler(arguments[1])) {\n        scheduler = arguments[1];\n    }\n    else if (isNumeric(arguments[1])) {\n        windowCreationInterval = Number(arguments[1]);\n    }\n    return function windowTimeOperatorFunction(source) {\n        return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));\n    };\n}\nvar WindowTimeOperator = /*@__PURE__*/ (function () {\n    function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n        this.windowTimeSpan = windowTimeSpan;\n        this.windowCreationInterval = windowCreationInterval;\n        this.maxWindowSize = maxWindowSize;\n        this.scheduler = scheduler;\n    }\n    WindowTimeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));\n    };\n    return WindowTimeOperator;\n}());\nvar CountedSubject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(CountedSubject, _super);\n    function CountedSubject() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this._numberOfNextedValues = 0;\n        return _this;\n    }\n    CountedSubject.prototype.next = function (value) {\n        this._numberOfNextedValues++;\n        _super.prototype.next.call(this, value);\n    };\n    Object.defineProperty(CountedSubject.prototype, \"numberOfNextedValues\", {\n        get: function () {\n            return this._numberOfNextedValues;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    return CountedSubject;\n}(Subject));\nvar WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WindowTimeSubscriber, _super);\n    function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        _this.windowTimeSpan = windowTimeSpan;\n        _this.windowCreationInterval = windowCreationInterval;\n        _this.maxWindowSize = maxWindowSize;\n        _this.scheduler = scheduler;\n        _this.windows = [];\n        var window = _this.openWindow();\n        if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n            var closeState = { subscriber: _this, window: window, context: null };\n            var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };\n            _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));\n            _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));\n        }\n        else {\n            var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };\n            _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));\n        }\n        return _this;\n    }\n    WindowTimeSubscriber.prototype._next = function (value) {\n        var windows = this.windows;\n        var len = windows.length;\n        for (var i = 0; i < len; i++) {\n            var window_1 = windows[i];\n            if (!window_1.closed) {\n                window_1.next(value);\n                if (window_1.numberOfNextedValues >= this.maxWindowSize) {\n                    this.closeWindow(window_1);\n                }\n            }\n        }\n    };\n    WindowTimeSubscriber.prototype._error = function (err) {\n        var windows = this.windows;\n        while (windows.length > 0) {\n            windows.shift().error(err);\n        }\n        this.destination.error(err);\n    };\n    WindowTimeSubscriber.prototype._complete = function () {\n        var windows = this.windows;\n        while (windows.length > 0) {\n            var window_2 = windows.shift();\n            if (!window_2.closed) {\n                window_2.complete();\n            }\n        }\n        this.destination.complete();\n    };\n    WindowTimeSubscriber.prototype.openWindow = function () {\n        var window = new CountedSubject();\n        this.windows.push(window);\n        var destination = this.destination;\n        destination.next(window);\n        return window;\n    };\n    WindowTimeSubscriber.prototype.closeWindow = function (window) {\n        window.complete();\n        var windows = this.windows;\n        windows.splice(windows.indexOf(window), 1);\n    };\n    return WindowTimeSubscriber;\n}(Subscriber));\nfunction dispatchWindowTimeSpanOnly(state) {\n    var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;\n    if (window) {\n        subscriber.closeWindow(window);\n    }\n    state.window = subscriber.openWindow();\n    this.schedule(state, windowTimeSpan);\n}\nfunction dispatchWindowCreation(state) {\n    var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;\n    var window = subscriber.openWindow();\n    var action = this;\n    var context = { action: action, subscription: null };\n    var timeSpanState = { subscriber: subscriber, window: window, context: context };\n    context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);\n    action.add(context.subscription);\n    action.schedule(state, windowCreationInterval);\n}\nfunction dispatchWindowClose(state) {\n    var subscriber = state.subscriber, window = state.window, context = state.context;\n    if (context && context.action && context.subscription) {\n        context.action.remove(context.subscription);\n    }\n    subscriber.closeWindow(window);\n}\n//# sourceMappingURL=windowTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function windowToggle(openings, closingSelector) {\n    return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };\n}\nvar WindowToggleOperator = /*@__PURE__*/ (function () {\n    function WindowToggleOperator(openings, closingSelector) {\n        this.openings = openings;\n        this.closingSelector = closingSelector;\n    }\n    WindowToggleOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));\n    };\n    return WindowToggleOperator;\n}());\nvar WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WindowToggleSubscriber, _super);\n    function WindowToggleSubscriber(destination, openings, closingSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.openings = openings;\n        _this.closingSelector = closingSelector;\n        _this.contexts = [];\n        _this.add(_this.openSubscription = subscribeToResult(_this, openings, openings));\n        return _this;\n    }\n    WindowToggleSubscriber.prototype._next = function (value) {\n        var contexts = this.contexts;\n        if (contexts) {\n            var len = contexts.length;\n            for (var i = 0; i < len; i++) {\n                contexts[i].window.next(value);\n            }\n        }\n    };\n    WindowToggleSubscriber.prototype._error = function (err) {\n        var contexts = this.contexts;\n        this.contexts = null;\n        if (contexts) {\n            var len = contexts.length;\n            var index = -1;\n            while (++index < len) {\n                var context_1 = contexts[index];\n                context_1.window.error(err);\n                context_1.subscription.unsubscribe();\n            }\n        }\n        _super.prototype._error.call(this, err);\n    };\n    WindowToggleSubscriber.prototype._complete = function () {\n        var contexts = this.contexts;\n        this.contexts = null;\n        if (contexts) {\n            var len = contexts.length;\n            var index = -1;\n            while (++index < len) {\n                var context_2 = contexts[index];\n                context_2.window.complete();\n                context_2.subscription.unsubscribe();\n            }\n        }\n        _super.prototype._complete.call(this);\n    };\n    WindowToggleSubscriber.prototype._unsubscribe = function () {\n        var contexts = this.contexts;\n        this.contexts = null;\n        if (contexts) {\n            var len = contexts.length;\n            var index = -1;\n            while (++index < len) {\n                var context_3 = contexts[index];\n                context_3.window.unsubscribe();\n                context_3.subscription.unsubscribe();\n            }\n        }\n    };\n    WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n        if (outerValue === this.openings) {\n            var closingNotifier = void 0;\n            try {\n                var closingSelector = this.closingSelector;\n                closingNotifier = closingSelector(innerValue);\n            }\n            catch (e) {\n                return this.error(e);\n            }\n            var window_1 = new Subject();\n            var subscription = new Subscription();\n            var context_4 = { window: window_1, subscription: subscription };\n            this.contexts.push(context_4);\n            var innerSubscription = subscribeToResult(this, closingNotifier, context_4);\n            if (innerSubscription.closed) {\n                this.closeWindow(this.contexts.length - 1);\n            }\n            else {\n                innerSubscription.context = context_4;\n                subscription.add(innerSubscription);\n            }\n            this.destination.next(window_1);\n        }\n        else {\n            this.closeWindow(this.contexts.indexOf(outerValue));\n        }\n    };\n    WindowToggleSubscriber.prototype.notifyError = function (err) {\n        this.error(err);\n    };\n    WindowToggleSubscriber.prototype.notifyComplete = function (inner) {\n        if (inner !== this.openSubscription) {\n            this.closeWindow(this.contexts.indexOf(inner.context));\n        }\n    };\n    WindowToggleSubscriber.prototype.closeWindow = function (index) {\n        if (index === -1) {\n            return;\n        }\n        var contexts = this.contexts;\n        var context = contexts[index];\n        var window = context.window, subscription = context.subscription;\n        contexts.splice(index, 1);\n        window.complete();\n        subscription.unsubscribe();\n    };\n    return WindowToggleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=windowToggle.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function windowWhen(closingSelector) {\n    return function windowWhenOperatorFunction(source) {\n        return source.lift(new WindowOperator(closingSelector));\n    };\n}\nvar WindowOperator = /*@__PURE__*/ (function () {\n    function WindowOperator(closingSelector) {\n        this.closingSelector = closingSelector;\n    }\n    WindowOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));\n    };\n    return WindowOperator;\n}());\nvar WindowSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WindowSubscriber, _super);\n    function WindowSubscriber(destination, closingSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.destination = destination;\n        _this.closingSelector = closingSelector;\n        _this.openWindow();\n        return _this;\n    }\n    WindowSubscriber.prototype.notifyNext = function (_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n        this.openWindow(innerSub);\n    };\n    WindowSubscriber.prototype.notifyError = function (error) {\n        this._error(error);\n    };\n    WindowSubscriber.prototype.notifyComplete = function (innerSub) {\n        this.openWindow(innerSub);\n    };\n    WindowSubscriber.prototype._next = function (value) {\n        this.window.next(value);\n    };\n    WindowSubscriber.prototype._error = function (err) {\n        this.window.error(err);\n        this.destination.error(err);\n        this.unsubscribeClosingNotification();\n    };\n    WindowSubscriber.prototype._complete = function () {\n        this.window.complete();\n        this.destination.complete();\n        this.unsubscribeClosingNotification();\n    };\n    WindowSubscriber.prototype.unsubscribeClosingNotification = function () {\n        if (this.closingNotification) {\n            this.closingNotification.unsubscribe();\n        }\n    };\n    WindowSubscriber.prototype.openWindow = function (innerSub) {\n        if (innerSub === void 0) {\n            innerSub = null;\n        }\n        if (innerSub) {\n            this.remove(innerSub);\n            innerSub.unsubscribe();\n        }\n        var prevWindow = this.window;\n        if (prevWindow) {\n            prevWindow.complete();\n        }\n        var window = this.window = new Subject();\n        this.destination.next(window);\n        var closingNotifier;\n        try {\n            var closingSelector = this.closingSelector;\n            closingNotifier = closingSelector();\n        }\n        catch (e) {\n            this.destination.error(e);\n            this.window.error(e);\n            return;\n        }\n        this.add(this.closingNotification = subscribeToResult(this, closingNotifier));\n    };\n    return WindowSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=windowWhen.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function withLatestFrom() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    return function (source) {\n        var project;\n        if (typeof args[args.length - 1] === 'function') {\n            project = args.pop();\n        }\n        var observables = args;\n        return source.lift(new WithLatestFromOperator(observables, project));\n    };\n}\nvar WithLatestFromOperator = /*@__PURE__*/ (function () {\n    function WithLatestFromOperator(observables, project) {\n        this.observables = observables;\n        this.project = project;\n    }\n    WithLatestFromOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n    };\n    return WithLatestFromOperator;\n}());\nvar WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(WithLatestFromSubscriber, _super);\n    function WithLatestFromSubscriber(destination, observables, project) {\n        var _this = _super.call(this, destination) || this;\n        _this.observables = observables;\n        _this.project = project;\n        _this.toRespond = [];\n        var len = observables.length;\n        _this.values = new Array(len);\n        for (var i = 0; i < len; i++) {\n            _this.toRespond.push(i);\n        }\n        for (var i = 0; i < len; i++) {\n            var observable = observables[i];\n            _this.add(subscribeToResult(_this, observable, undefined, i));\n        }\n        return _this;\n    }\n    WithLatestFromSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) {\n        this.values[outerIndex] = innerValue;\n        var toRespond = this.toRespond;\n        if (toRespond.length > 0) {\n            var found = toRespond.indexOf(outerIndex);\n            if (found !== -1) {\n                toRespond.splice(found, 1);\n            }\n        }\n    };\n    WithLatestFromSubscriber.prototype.notifyComplete = function () {\n    };\n    WithLatestFromSubscriber.prototype._next = function (value) {\n        if (this.toRespond.length === 0) {\n            var args = [value].concat(this.values);\n            if (this.project) {\n                this._tryProject(args);\n            }\n            else {\n                this.destination.next(args);\n            }\n        }\n    };\n    WithLatestFromSubscriber.prototype._tryProject = function (args) {\n        var result;\n        try {\n            result = this.project.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    };\n    return WithLatestFromSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.js.map\n","/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */\nimport { zip as zipStatic } from '../observable/zip';\nexport function zip() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    return function zipOperatorFunction(source) {\n        return source.lift.call(zipStatic.apply(void 0, [source].concat(observables)));\n    };\n}\n//# sourceMappingURL=zip.js.map\n","/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */\nimport { ZipOperator } from '../observable/zip';\nexport function zipAll(project) {\n    return function (source) { return source.lift(new ZipOperator(project)); };\n}\n//# sourceMappingURL=zipAll.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar InnerSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(InnerSubscriber, _super);\n    function InnerSubscriber(parent, outerValue, outerIndex) {\n        var _this = _super.call(this) || this;\n        _this.parent = parent;\n        _this.outerValue = outerValue;\n        _this.outerIndex = outerIndex;\n        _this.index = 0;\n        return _this;\n    }\n    InnerSubscriber.prototype._next = function (value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n    };\n    InnerSubscriber.prototype._error = function (error) {\n        this.parent.notifyError(error, this);\n        this.unsubscribe();\n    };\n    InnerSubscriber.prototype._complete = function () {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    };\n    return InnerSubscriber;\n}(Subscriber));\nexport { InnerSubscriber };\n//# sourceMappingURL=InnerSubscriber.js.map\n","/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {\n    if (innerSubscriber === void 0) {\n        innerSubscriber = new InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n    }\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    return subscribeTo(result)(innerSubscriber);\n}\n//# sourceMappingURL=subscribeToResult.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport var config = {\n    Promise: undefined,\n    set useDeprecatedSynchronousErrorHandling(value) {\n        if (value) {\n            var error = /*@__PURE__*/ new Error();\n            /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n        }\n        else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n            /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');\n        }\n        _enable_super_gross_mode_that_will_cause_bad_things = value;\n    },\n    get useDeprecatedSynchronousErrorHandling() {\n        return _enable_super_gross_mode_that_will_cause_bad_things;\n    },\n};\n//# sourceMappingURL=config.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function identity(x) {\n    return x;\n}\n//# sourceMappingURL=identity.js.map\n","/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */\nimport { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n    return function multicastOperatorFunction(source) {\n        var subjectFactory;\n        if (typeof subjectOrSubjectFactory === 'function') {\n            subjectFactory = subjectOrSubjectFactory;\n        }\n        else {\n            subjectFactory = function subjectFactory() {\n                return subjectOrSubjectFactory;\n            };\n        }\n        if (typeof selector === 'function') {\n            return source.lift(new MulticastOperator(subjectFactory, selector));\n        }\n        var connectable = Object.create(source, connectableObservableDescriptor);\n        connectable.source = source;\n        connectable.subjectFactory = subjectFactory;\n        return connectable;\n    };\n}\nvar MulticastOperator = /*@__PURE__*/ (function () {\n    function MulticastOperator(subjectFactory, selector) {\n        this.subjectFactory = subjectFactory;\n        this.selector = selector;\n    }\n    MulticastOperator.prototype.call = function (subscriber, source) {\n        var selector = this.selector;\n        var subject = this.subjectFactory();\n        var subscription = selector(subject).subscribe(subscriber);\n        subscription.add(source.subscribe(subject));\n        return subscription;\n    };\n    return MulticastOperator;\n}());\nexport { MulticastOperator };\n//# sourceMappingURL=multicast.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar OuterSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(OuterSubscriber, _super);\n    function OuterSubscriber() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n        this.destination.next(innerValue);\n    };\n    OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n        this.destination.error(error);\n    };\n    OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n        this.destination.complete();\n    };\n    return OuterSubscriber;\n}(Subscriber));\nexport { OuterSubscriber };\n//# sourceMappingURL=OuterSubscriber.js.map\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\n\nlet _DOM: DomAdapter = null !;\n\nexport function getDOM() {\n  return _DOM;\n}\n\nexport function setDOM(adapter: DomAdapter) {\n  _DOM = adapter;\n}\n\nexport function setRootDomAdapter(adapter: DomAdapter) {\n  if (!_DOM) {\n    _DOM = adapter;\n  }\n}\n\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class DomAdapter {\n  public resourceLoaderType: Type<any> = null !;\n  abstract hasProperty(element: any, name: string): boolean;\n  abstract setProperty(el: Element, name: string, value: any): any;\n  abstract getProperty(el: Element, name: string): any;\n  abstract invoke(el: Element, methodName: string, args: any[]): any;\n\n  abstract logError(error: any): any;\n  abstract log(error: any): any;\n  abstract logGroup(error: any): any;\n  abstract logGroupEnd(): any;\n\n  /**\n   * Maps attribute names to their corresponding property names for cases\n   * where attribute name doesn't match property name.\n   */\n  get attrToPropMap(): {[key: string]: string} { return this._attrToPropMap; }\n  set attrToPropMap(value: {[key: string]: string}) { this._attrToPropMap = value; }\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _attrToPropMap !: {[key: string]: string};\n\n  abstract contains(nodeA: any, nodeB: any): boolean;\n  abstract parse(templateHtml: string): any;\n  abstract querySelector(el: any, selector: string): any;\n  abstract querySelectorAll(el: any, selector: string): any[];\n  abstract on(el: any, evt: any, listener: any): any;\n  abstract onAndCancel(el: any, evt: any, listener: any): Function;\n  abstract dispatchEvent(el: any, evt: any): any;\n  abstract createMouseEvent(eventType: any): any;\n  abstract createEvent(eventType: string): any;\n  abstract preventDefault(evt: any): any;\n  abstract isPrevented(evt: any): boolean;\n  abstract getInnerHTML(el: any): string;\n  /** Returns content if el is a <template> element, null otherwise. */\n  abstract getTemplateContent(el: any): any;\n  abstract getOuterHTML(el: any): string;\n  abstract nodeName(node: any): string;\n  abstract nodeValue(node: any): string|null;\n  abstract type(node: any): string;\n  abstract content(node: any): any;\n  abstract firstChild(el: any): Node|null;\n  abstract nextSibling(el: any): Node|null;\n  abstract parentElement(el: any): Node|null;\n  abstract childNodes(el: any): Node[];\n  abstract childNodesAsList(el: any): Node[];\n  abstract clearNodes(el: any): any;\n  abstract appendChild(el: any, node: any): any;\n  abstract removeChild(el: any, node: any): any;\n  abstract replaceChild(el: any, newNode: any, oldNode: any): any;\n  abstract remove(el: any): Node;\n  abstract insertBefore(parent: any, ref: any, node: any): any;\n  abstract insertAllBefore(parent: any, ref: any, nodes: any): any;\n  abstract insertAfter(parent: any, el: any, node: any): any;\n  abstract setInnerHTML(el: any, value: any): any;\n  abstract getText(el: any): string|null;\n  abstract setText(el: any, value: string): any;\n  abstract getValue(el: any): string;\n  abstract setValue(el: any, value: string): any;\n  abstract getChecked(el: any): boolean;\n  abstract setChecked(el: any, value: boolean): any;\n  abstract createComment(text: string): any;\n  abstract createTemplate(html: any): HTMLElement;\n  abstract createElement(tagName: any, doc?: any): HTMLElement;\n  abstract createElementNS(ns: string, tagName: string, doc?: any): Element;\n  abstract createTextNode(text: string, doc?: any): Text;\n  abstract createScriptTag(attrName: string, attrValue: string, doc?: any): HTMLElement;\n  abstract createStyleElement(css: string, doc?: any): HTMLStyleElement;\n  abstract createShadowRoot(el: any): any;\n  abstract getShadowRoot(el: any): any;\n  abstract getHost(el: any): any;\n  abstract getDistributedNodes(el: any): Node[];\n  abstract clone /*<T extends Node>*/ (node: Node /*T*/): Node /*T*/;\n  abstract getElementsByClassName(element: any, name: string): HTMLElement[];\n  abstract getElementsByTagName(element: any, name: string): HTMLElement[];\n  abstract classList(element: any): any[];\n  abstract addClass(element: any, className: string): any;\n  abstract removeClass(element: any, className: string): any;\n  abstract hasClass(element: any, className: string): boolean;\n  abstract setStyle(element: any, styleName: string, styleValue: string): any;\n  abstract removeStyle(element: any, styleName: string): any;\n  abstract getStyle(element: any, styleName: string): string;\n  abstract hasStyle(element: any, styleName: string, styleValue?: string): boolean;\n  abstract tagName(element: any): string;\n  abstract attributeMap(element: any): Map<string, string>;\n  abstract hasAttribute(element: any, attribute: string): boolean;\n  abstract hasAttributeNS(element: any, ns: string, attribute: string): boolean;\n  abstract getAttribute(element: any, attribute: string): string|null;\n  abstract getAttributeNS(element: any, ns: string, attribute: string): string|null;\n  abstract setAttribute(element: any, name: string, value: string): any;\n  abstract setAttributeNS(element: any, ns: string, name: string, value: string): any;\n  abstract removeAttribute(element: any, attribute: string): any;\n  abstract removeAttributeNS(element: any, ns: string, attribute: string): any;\n  abstract templateAwareRoot(el: any): any;\n  abstract createHtmlDocument(): HTMLDocument;\n  abstract getDefaultDocument(): Document;\n  abstract getBoundingClientRect(el: any): any;\n  abstract getTitle(doc: Document): string;\n  abstract setTitle(doc: Document, newTitle: string): any;\n  abstract elementMatches(n: any, selector: string): boolean;\n  abstract isTemplateElement(el: any): boolean;\n  abstract isTextNode(node: any): boolean;\n  abstract isCommentNode(node: any): boolean;\n  abstract isElementNode(node: any): boolean;\n  abstract hasShadowRoot(node: any): boolean;\n  abstract isShadowRoot(node: any): boolean;\n  abstract importIntoDoc /*<T extends Node>*/ (node: Node /*T*/): Node /*T*/;\n  abstract adoptNode /*<T extends Node>*/ (node: Node /*T*/): Node /*T*/;\n  abstract getHref(element: any): string;\n  abstract getEventKey(event: any): string;\n  abstract resolveAndSetHref(element: any, baseUrl: string, href: string): any;\n  abstract supportsDOMEvents(): boolean;\n  abstract supportsNativeShadowDOM(): boolean;\n  abstract getGlobalEventTarget(doc: Document, target: string): any;\n  abstract getHistory(): History;\n  abstract getLocation(): Location;\n  abstract getBaseHref(doc: Document): string|null;\n  abstract resetBaseElement(): void;\n  abstract getUserAgent(): string;\n  abstract setData(element: any, name: string, value: string): any;\n  abstract getComputedStyle(element: any): any;\n  abstract getData(element: any, name: string): string|null;\n  abstract supportsWebAnimation(): boolean;\n  abstract performanceNow(): number;\n  abstract getAnimationPrefix(): string;\n  abstract getTransitionEnd(): string;\n  abstract supportsAnimation(): boolean;\n\n  abstract supportsCookies(): boolean;\n  abstract getCookie(name: string): string|null;\n  abstract setCookie(name: string, value: string): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµparseCookieValue as parseCookieValue} from '@angular/common';\nimport {Éµglobal as global} from '@angular/core';\n\nimport {setRootDomAdapter} from '../dom/dom_adapter';\n\nimport {GenericBrowserDomAdapter} from './generic_browser_adapter';\n\nconst _attrToPropMap = {\n  'class': 'className',\n  'innerHtml': 'innerHTML',\n  'readonly': 'readOnly',\n  'tabindex': 'tabIndex',\n};\n\nconst DOM_KEY_LOCATION_NUMPAD = 3;\n\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nconst _keyMap: {[k: string]: string} = {\n  // The following values are here for cross-browser compatibility and to match the W3C standard\n  // cf http://www.w3.org/TR/DOM-Level-3-Events-key/\n  '\\b': 'Backspace',\n  '\\t': 'Tab',\n  '\\x7F': 'Delete',\n  '\\x1B': 'Escape',\n  'Del': 'Delete',\n  'Esc': 'Escape',\n  'Left': 'ArrowLeft',\n  'Right': 'ArrowRight',\n  'Up': 'ArrowUp',\n  'Down': 'ArrowDown',\n  'Menu': 'ContextMenu',\n  'Scroll': 'ScrollLock',\n  'Win': 'OS'\n};\n\n// There is a bug in Chrome for numeric keypad keys:\n// https://code.google.com/p/chromium/issues/detail?id=155654\n// 1, 2, 3 ... are reported as A, B, C ...\nconst _chromeNumKeyPadMap = {\n  'A': '1',\n  'B': '2',\n  'C': '3',\n  'D': '4',\n  'E': '5',\n  'F': '6',\n  'G': '7',\n  'H': '8',\n  'I': '9',\n  'J': '*',\n  'K': '+',\n  'M': '-',\n  'N': '.',\n  'O': '/',\n  '\\x60': '0',\n  '\\x90': 'NumLock'\n};\n\nconst nodeContains: (this: Node, other: Node) => boolean = (() => {\n  if (global['Node']) {\n    return global['Node'].prototype.contains || function(this: Node, node: any) {\n      return !!(this.compareDocumentPosition(node) & 16);\n    };\n  }\n\n  return undefined as any;\n})();\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nexport class BrowserDomAdapter extends GenericBrowserDomAdapter {\n  parse(templateHtml: string) { throw new Error('parse not implemented'); }\n  static makeCurrent() { setRootDomAdapter(new BrowserDomAdapter()); }\n  hasProperty(element: Node, name: string): boolean { return name in element; }\n  setProperty(el: Node, name: string, value: any) { (<any>el)[name] = value; }\n  getProperty(el: Node, name: string): any { return (<any>el)[name]; }\n  invoke(el: Node, methodName: string, args: any[]): any { (<any>el)[methodName](...args); }\n\n  // TODO(tbosch): move this into a separate environment class once we have it\n  logError(error: string): void {\n    if (window.console) {\n      if (console.error) {\n        console.error(error);\n      } else {\n        console.log(error);\n      }\n    }\n  }\n\n  log(error: string): void {\n    if (window.console) {\n      window.console.log && window.console.log(error);\n    }\n  }\n\n  logGroup(error: string): void {\n    if (window.console) {\n      window.console.group && window.console.group(error);\n    }\n  }\n\n  logGroupEnd(): void {\n    if (window.console) {\n      window.console.groupEnd && window.console.groupEnd();\n    }\n  }\n\n  get attrToPropMap(): any { return _attrToPropMap; }\n\n  contains(nodeA: any, nodeB: any): boolean { return nodeContains.call(nodeA, nodeB); }\n  querySelector(el: HTMLElement, selector: string): any { return el.querySelector(selector); }\n  querySelectorAll(el: any, selector: string): any[] { return el.querySelectorAll(selector); }\n  on(el: Node, evt: any, listener: any) { el.addEventListener(evt, listener, false); }\n  onAndCancel(el: Node, evt: any, listener: any): Function {\n    el.addEventListener(evt, listener, false);\n    // Needed to follow Dart's subscription semantic, until fix of\n    // https://code.google.com/p/dart/issues/detail?id=17406\n    return () => { el.removeEventListener(evt, listener, false); };\n  }\n  dispatchEvent(el: Node, evt: any) { el.dispatchEvent(evt); }\n  createMouseEvent(eventType: string): MouseEvent {\n    const evt: MouseEvent = this.getDefaultDocument().createEvent('MouseEvent');\n    evt.initEvent(eventType, true, true);\n    return evt;\n  }\n  createEvent(eventType: any): Event {\n    const evt: Event = this.getDefaultDocument().createEvent('Event');\n    evt.initEvent(eventType, true, true);\n    return evt;\n  }\n  preventDefault(evt: Event) {\n    evt.preventDefault();\n    evt.returnValue = false;\n  }\n  isPrevented(evt: Event): boolean {\n    return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;\n  }\n  getInnerHTML(el: HTMLElement): string { return el.innerHTML; }\n  getTemplateContent(el: Node): Node|null {\n    return 'content' in el && this.isTemplateElement(el) ? (<any>el).content : null;\n  }\n  getOuterHTML(el: HTMLElement): string { return el.outerHTML; }\n  nodeName(node: Node): string { return node.nodeName; }\n  nodeValue(node: Node): string|null { return node.nodeValue; }\n  type(node: HTMLInputElement): string { return node.type; }\n  content(node: Node): Node {\n    if (this.hasProperty(node, 'content')) {\n      return (<any>node).content;\n    } else {\n      return node;\n    }\n  }\n  firstChild(el: Node): Node|null { return el.firstChild; }\n  nextSibling(el: Node): Node|null { return el.nextSibling; }\n  parentElement(el: Node): Node|null { return el.parentNode; }\n  childNodes(el: any): Node[] { return el.childNodes; }\n  childNodesAsList(el: Node): any[] {\n    const childNodes = el.childNodes;\n    const res = new Array(childNodes.length);\n    for (let i = 0; i < childNodes.length; i++) {\n      res[i] = childNodes[i];\n    }\n    return res;\n  }\n  clearNodes(el: Node) {\n    while (el.firstChild) {\n      el.removeChild(el.firstChild);\n    }\n  }\n  appendChild(el: Node, node: Node) { el.appendChild(node); }\n  removeChild(el: Node, node: Node) { el.removeChild(node); }\n  replaceChild(el: Node, newChild: Node, oldChild: Node) { el.replaceChild(newChild, oldChild); }\n  remove(node: Node): Node {\n    if (node.parentNode) {\n      node.parentNode.removeChild(node);\n    }\n    return node;\n  }\n  insertBefore(parent: Node, ref: Node, node: Node) { parent.insertBefore(node, ref); }\n  insertAllBefore(parent: Node, ref: Node, nodes: Node[]) {\n    nodes.forEach((n: any) => parent.insertBefore(n, ref));\n  }\n  insertAfter(parent: Node, ref: Node, node: any) { parent.insertBefore(node, ref.nextSibling); }\n  setInnerHTML(el: Element, value: string) { el.innerHTML = value; }\n  getText(el: Node): string|null { return el.textContent; }\n  setText(el: Node, value: string) { el.textContent = value; }\n  getValue(el: any): string { return el.value; }\n  setValue(el: any, value: string) { el.value = value; }\n  getChecked(el: any): boolean { return el.checked; }\n  setChecked(el: any, value: boolean) { el.checked = value; }\n  createComment(text: string): Comment { return this.getDefaultDocument().createComment(text); }\n  createTemplate(html: any): HTMLElement {\n    const t = this.getDefaultDocument().createElement('template');\n    t.innerHTML = html;\n    return t;\n  }\n  createElement(tagName: string, doc?: Document): HTMLElement {\n    doc = doc || this.getDefaultDocument();\n    return doc.createElement(tagName);\n  }\n  createElementNS(ns: string, tagName: string, doc?: Document): Element {\n    doc = doc || this.getDefaultDocument();\n    return doc.createElementNS(ns, tagName);\n  }\n  createTextNode(text: string, doc?: Document): Text {\n    doc = doc || this.getDefaultDocument();\n    return doc.createTextNode(text);\n  }\n  createScriptTag(attrName: string, attrValue: string, doc?: Document): HTMLScriptElement {\n    doc = doc || this.getDefaultDocument();\n    const el = <HTMLScriptElement>doc.createElement('SCRIPT');\n    el.setAttribute(attrName, attrValue);\n    return el;\n  }\n  createStyleElement(css: string, doc?: Document): HTMLStyleElement {\n    doc = doc || this.getDefaultDocument();\n    const style = <HTMLStyleElement>doc.createElement('style');\n    this.appendChild(style, this.createTextNode(css, doc));\n    return style;\n  }\n  createShadowRoot(el: HTMLElement): DocumentFragment { return (<any>el).createShadowRoot(); }\n  getShadowRoot(el: HTMLElement): DocumentFragment { return (<any>el).shadowRoot; }\n  getHost(el: HTMLElement): HTMLElement { return (<any>el).host; }\n  clone(node: Node): Node { return node.cloneNode(true); }\n  getElementsByClassName(element: any, name: string): HTMLElement[] {\n    return element.getElementsByClassName(name);\n  }\n  getElementsByTagName(element: any, name: string): HTMLElement[] {\n    return element.getElementsByTagName(name);\n  }\n  classList(element: any): any[] { return Array.prototype.slice.call(element.classList, 0); }\n  addClass(element: any, className: string) { element.classList.add(className); }\n  removeClass(element: any, className: string) { element.classList.remove(className); }\n  hasClass(element: any, className: string): boolean {\n    return element.classList.contains(className);\n  }\n  setStyle(element: any, styleName: string, styleValue: string) {\n    element.style[styleName] = styleValue;\n  }\n  removeStyle(element: any, stylename: string) {\n    // IE requires '' instead of null\n    // see https://github.com/angular/angular/issues/7916\n    element.style[stylename] = '';\n  }\n  getStyle(element: any, stylename: string): string { return element.style[stylename]; }\n  hasStyle(element: any, styleName: string, styleValue?: string|null): boolean {\n    const value = this.getStyle(element, styleName) || '';\n    return styleValue ? value == styleValue : value.length > 0;\n  }\n  tagName(element: any): string { return element.tagName; }\n  attributeMap(element: any): Map<string, string> {\n    const res = new Map<string, string>();\n    const elAttrs = element.attributes;\n    for (let i = 0; i < elAttrs.length; i++) {\n      const attrib = elAttrs.item(i);\n      res.set(attrib.name, attrib.value);\n    }\n    return res;\n  }\n  hasAttribute(element: Element, attribute: string): boolean {\n    return element.hasAttribute(attribute);\n  }\n  hasAttributeNS(element: Element, ns: string, attribute: string): boolean {\n    return element.hasAttributeNS(ns, attribute);\n  }\n  getAttribute(element: Element, attribute: string): string|null {\n    return element.getAttribute(attribute);\n  }\n  getAttributeNS(element: Element, ns: string, name: string): string|null {\n    return element.getAttributeNS(ns, name);\n  }\n  setAttribute(element: Element, name: string, value: string) { element.setAttribute(name, value); }\n  setAttributeNS(element: Element, ns: string, name: string, value: string) {\n    element.setAttributeNS(ns, name, value);\n  }\n  removeAttribute(element: Element, attribute: string) { element.removeAttribute(attribute); }\n  removeAttributeNS(element: Element, ns: string, name: string) {\n    element.removeAttributeNS(ns, name);\n  }\n  templateAwareRoot(el: Node): any { return this.isTemplateElement(el) ? this.content(el) : el; }\n  createHtmlDocument(): HTMLDocument {\n    return document.implementation.createHTMLDocument('fakeTitle');\n  }\n  getDefaultDocument(): Document { return document; }\n  getBoundingClientRect(el: Element): any {\n    try {\n      return el.getBoundingClientRect();\n    } catch {\n      return {top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0};\n    }\n  }\n  getTitle(doc: Document): string { return doc.title; }\n  setTitle(doc: Document, newTitle: string) { doc.title = newTitle || ''; }\n  elementMatches(n: any, selector: string): boolean {\n    if (this.isElementNode(n)) {\n      return n.matches && n.matches(selector) ||\n          n.msMatchesSelector && n.msMatchesSelector(selector) ||\n          n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n    }\n\n    return false;\n  }\n  isTemplateElement(el: Node): boolean {\n    return this.isElementNode(el) && el.nodeName === 'TEMPLATE';\n  }\n  isTextNode(node: Node): boolean { return node.nodeType === Node.TEXT_NODE; }\n  isCommentNode(node: Node): boolean { return node.nodeType === Node.COMMENT_NODE; }\n  isElementNode(node: Node): boolean { return node.nodeType === Node.ELEMENT_NODE; }\n  hasShadowRoot(node: any): boolean {\n    return node.shadowRoot != null && node instanceof HTMLElement;\n  }\n  isShadowRoot(node: any): boolean { return node instanceof DocumentFragment; }\n  importIntoDoc(node: Node): any { return document.importNode(this.templateAwareRoot(node), true); }\n  adoptNode(node: Node): any { return document.adoptNode(node); }\n  getHref(el: Element): string { return el.getAttribute('href') !; }\n\n  getEventKey(event: any): string {\n    let key = event.key;\n    if (key == null) {\n      key = event.keyIdentifier;\n      // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n      // Safari cf\n      // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n      if (key == null) {\n        return 'Unidentified';\n      }\n      if (key.startsWith('U+')) {\n        key = String.fromCharCode(parseInt(key.substring(2), 16));\n        if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {\n          // There is a bug in Chrome for numeric keypad keys:\n          // https://code.google.com/p/chromium/issues/detail?id=155654\n          // 1, 2, 3 ... are reported as A, B, C ...\n          key = (_chromeNumKeyPadMap as any)[key];\n        }\n      }\n    }\n\n    return _keyMap[key] || key;\n  }\n  getGlobalEventTarget(doc: Document, target: string): EventTarget|null {\n    if (target === 'window') {\n      return window;\n    }\n    if (target === 'document') {\n      return doc;\n    }\n    if (target === 'body') {\n      return doc.body;\n    }\n    return null;\n  }\n  getHistory(): History { return window.history; }\n  getLocation(): Location { return window.location; }\n  getBaseHref(doc: Document): string|null {\n    const href = getBaseElementHref();\n    return href == null ? null : relativePath(href);\n  }\n  resetBaseElement(): void { baseElement = null; }\n  getUserAgent(): string { return window.navigator.userAgent; }\n  setData(element: Element, name: string, value: string) {\n    this.setAttribute(element, 'data-' + name, value);\n  }\n  getData(element: Element, name: string): string|null {\n    return this.getAttribute(element, 'data-' + name);\n  }\n  getComputedStyle(element: any): any { return getComputedStyle(element); }\n  // TODO(tbosch): move this into a separate environment class once we have it\n  supportsWebAnimation(): boolean {\n    return typeof(<any>Element).prototype['animate'] === 'function';\n  }\n  performanceNow(): number {\n    // performance.now() is not available in all browsers, see\n    // http://caniuse.com/#search=performance.now\n    return window.performance && window.performance.now ? window.performance.now() :\n                                                          new Date().getTime();\n  }\n\n  supportsCookies(): boolean { return true; }\n\n  getCookie(name: string): string|null { return parseCookieValue(document.cookie, name); }\n\n  setCookie(name: string, value: string) {\n    // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does\n    // not clear other cookies.\n    document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);\n  }\n}\n\nlet baseElement: HTMLElement|null = null;\nfunction getBaseElementHref(): string|null {\n  if (!baseElement) {\n    baseElement = document.querySelector('base') !;\n    if (!baseElement) {\n      return null;\n    }\n  }\n  return baseElement.getAttribute('href');\n}\n\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode: any;\nfunction relativePath(url: any): string {\n  if (!urlParsingNode) {\n    urlParsingNode = document.createElement('a');\n  }\n  urlParsingNode.setAttribute('href', url);\n  return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :\n                                                       '/' + urlParsingNode.pathname;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DomAdapter} from '../dom/dom_adapter';\n\n\n\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class GenericBrowserDomAdapter extends DomAdapter {\n  private _animationPrefix: string|null = null;\n  private _transitionEnd: string|null = null;\n  constructor() {\n    super();\n    try {\n      const element = this.createElement('div', document);\n      if (this.getStyle(element, 'animationName') != null) {\n        this._animationPrefix = '';\n      } else {\n        const domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];\n\n        for (let i = 0; i < domPrefixes.length; i++) {\n          if (this.getStyle(element, domPrefixes[i] + 'AnimationName') != null) {\n            this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';\n            break;\n          }\n        }\n      }\n\n      const transEndEventNames: {[key: string]: string} = {\n        WebkitTransition: 'webkitTransitionEnd',\n        MozTransition: 'transitionend',\n        OTransition: 'oTransitionEnd otransitionend',\n        transition: 'transitionend'\n      };\n\n      Object.keys(transEndEventNames).forEach((key: string) => {\n        if (this.getStyle(element, key) != null) {\n          this._transitionEnd = transEndEventNames[key];\n        }\n      });\n    } catch {\n      this._animationPrefix = null;\n      this._transitionEnd = null;\n    }\n  }\n\n  getDistributedNodes(el: HTMLElement): Node[] { return (<any>el).getDistributedNodes(); }\n  resolveAndSetHref(el: HTMLAnchorElement, baseUrl: string, href: string) {\n    el.href = href == null ? baseUrl : baseUrl + '/../' + href;\n  }\n  supportsDOMEvents(): boolean { return true; }\n  supportsNativeShadowDOM(): boolean {\n    return typeof(<any>document.body).createShadowRoot === 'function';\n  }\n  getAnimationPrefix(): string { return this._animationPrefix ? this._animationPrefix : ''; }\n  getTransitionEnd(): string { return this._transitionEnd ? this._transitionEnd : ''; }\n  supportsAnimation(): boolean {\n    return this._animationPrefix != null && this._transitionEnd != null;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function supportsState(): boolean {\n  return !!window.history.pushState;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, LocationChangeListener, PlatformLocation} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\nimport {getDOM} from '../../dom/dom_adapter';\n\nimport {supportsState} from './history';\n\n\n\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\n@Injectable()\nexport class BrowserPlatformLocation extends PlatformLocation {\n  // TODO(issue/24571): remove '!'.\n  public readonly location !: Location;\n  // TODO(issue/24571): remove '!'.\n  private _history !: History;\n\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    super();\n    this._init();\n  }\n\n  // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n  /** @internal */\n  _init() {\n    (this as{location: Location}).location = getDOM().getLocation();\n    this._history = getDOM().getHistory();\n  }\n\n  getBaseHrefFromDOM(): string { return getDOM().getBaseHref(this._doc) !; }\n\n  onPopState(fn: LocationChangeListener): void {\n    getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);\n  }\n\n  onHashChange(fn: LocationChangeListener): void {\n    getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);\n  }\n\n  get href(): string { return this.location.href; }\n  get protocol(): string { return this.location.protocol; }\n  get hostname(): string { return this.location.hostname; }\n  get port(): string { return this.location.port; }\n  get pathname(): string { return this.location.pathname; }\n  get search(): string { return this.location.search; }\n  get hash(): string { return this.location.hash; }\n  set pathname(newPath: string) { this.location.pathname = newPath; }\n\n  pushState(state: any, title: string, url: string): void {\n    if (supportsState()) {\n      this._history.pushState(state, title, url);\n    } else {\n      this.location.hash = url;\n    }\n  }\n\n  replaceState(state: any, title: string, url: string): void {\n    if (supportsState()) {\n      this._history.replaceState(state, title, url);\n    } else {\n      this.location.hash = url;\n    }\n  }\n\n  forward(): void { this._history.forward(); }\n\n  back(): void { this._history.back(); }\n\n  getState(): unknown { return this._history.state; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {APP_INITIALIZER, ApplicationInitStatus, Inject, InjectionToken, Injector, StaticProvider} from '@angular/core';\n\nimport {getDOM} from '../dom/dom_adapter';\n\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nexport const TRANSITION_ID = new InjectionToken('TRANSITION_ID');\n\nexport function appInitializerFactory(transitionId: string, document: any, injector: Injector) {\n  return () => {\n    // Wait for all application initializers to be completed before removing the styles set by\n    // the server.\n    injector.get(ApplicationInitStatus).donePromise.then(() => {\n      const dom = getDOM();\n      const styles: any[] =\n          Array.prototype.slice.apply(dom.querySelectorAll(document, `style[ng-transition]`));\n      styles.filter(el => dom.getAttribute(el, 'ng-transition') === transitionId)\n          .forEach(el => dom.remove(el));\n    });\n  };\n}\n\nexport const SERVER_TRANSITION_PROVIDERS: StaticProvider[] = [\n  {\n    provide: APP_INITIALIZER,\n    useFactory: appInitializerFactory,\n    deps: [TRANSITION_ID, DOCUMENT, Injector],\n    multi: true\n  },\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {GetTestability, Testability, TestabilityRegistry, setTestabilityGetter, Éµglobal as global} from '@angular/core';\n\nimport {getDOM} from '../dom/dom_adapter';\n\nexport class BrowserGetTestability implements GetTestability {\n  static init() { setTestabilityGetter(new BrowserGetTestability()); }\n\n  addToWindow(registry: TestabilityRegistry): void {\n    global['getAngularTestability'] = (elem: any, findInAncestors: boolean = true) => {\n      const testability = registry.findTestabilityInTree(elem, findInAncestors);\n      if (testability == null) {\n        throw new Error('Could not find testability for element.');\n      }\n      return testability;\n    };\n\n    global['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n    global['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n    const whenAllStable = (callback: any /** TODO #9100 */) => {\n      const testabilities = global['getAllAngularTestabilities']();\n      let count = testabilities.length;\n      let didWork = false;\n      const decrement = function(didWork_: any /** TODO #9100 */) {\n        didWork = didWork || didWork_;\n        count--;\n        if (count == 0) {\n          callback(didWork);\n        }\n      };\n      testabilities.forEach(function(testability: any /** TODO #9100 */) {\n        testability.whenStable(decrement);\n      });\n    };\n\n    if (!global['frameworkStabilizers']) {\n      global['frameworkStabilizers'] = [];\n    }\n    global['frameworkStabilizers'].push(whenAllStable);\n  }\n\n  findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n      Testability|null {\n    if (elem == null) {\n      return null;\n    }\n    const t = registry.getTestability(elem);\n    if (t != null) {\n      return t;\n    } else if (!findInAncestors) {\n      return null;\n    }\n    if (getDOM().isShadowRoot(elem)) {\n      return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);\n    }\n    return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Éµglobal as global} from '@angular/core';\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nconst DASH_CASE_REGEXP = /-([a-z])/g;\n\n\nexport function camelCaseToDashCase(input: string): string {\n  return input.replace(CAMEL_CASE_REGEXP, (...m: string[]) => '-' + m[1].toLowerCase());\n}\n\nexport function dashCaseToCamelCase(input: string): string {\n  return input.replace(DASH_CASE_REGEXP, (...m: string[]) => m[1].toUpperCase());\n}\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nexport function exportNgVar(name: string, value: any): void {\n  if (typeof COMPILED === 'undefined' || !COMPILED) {\n    // Note: we can't export `ng` when using closure enhanced optimization as:\n    // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n    // - we can't declare a closure extern as the namespace `ng` is already used within Google\n    //   for typings for angularJS (via `goog.provide('ng....')`).\n    const ng = global['ng'] = (global['ng'] as{[key: string]: any} | undefined) || {};\n    ng[name] = value;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationRef, DebugNode, NgProbeToken, NgZone, Optional, Provider, getDebugNode} from '@angular/core';\n\nimport {exportNgVar} from '../util';\n\nconst CORE_TOKENS = (() => ({\n                       'ApplicationRef': ApplicationRef,\n                       'NgZone': NgZone,\n                     }))();\n\nconst INSPECT_GLOBAL_NAME = 'probe';\nconst CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\n\n/**\n * Returns a {@link DebugElement} for the given native DOM element, or\n * null if the given native element does not have an Angular view associated\n * with it.\n */\nexport function inspectNativeElement(element: any): DebugNode|null {\n  return getDebugNode(element);\n}\n\nexport function _createNgProbe(coreTokens: NgProbeToken[]): any {\n  exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);\n  exportNgVar(CORE_TOKENS_GLOBAL_NAME, {...CORE_TOKENS, ..._ngProbeTokensToMap(coreTokens || [])});\n  return () => inspectNativeElement;\n}\n\nfunction _ngProbeTokensToMap(tokens: NgProbeToken[]): {[name: string]: any} {\n  return tokens.reduce((prev: any, t: any) => (prev[t.name] = t.token, prev), {});\n}\n\n/**\n * In Ivy, we don't support NgProbe because we have our own set of testing utilities\n * with more robust functionality.\n *\n * We shouldn't bring in NgProbe because it prevents DebugNode and friends from\n * tree-shaking properly.\n */\nexport const ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];\n\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nexport const ELEMENT_PROBE_PROVIDERS__PRE_R3__: Provider[] = [\n  {\n    provide: APP_INITIALIZER,\n    useFactory: _createNgProbe,\n    deps: [\n      [NgProbeToken, new Optional()],\n    ],\n    multi: true,\n  },\n];\n\nexport const ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, InjectionToken, NgZone} from '@angular/core';\n\nimport {getDOM} from '../dom_adapter';\n\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nexport const EVENT_MANAGER_PLUGINS =\n    new InjectionToken<EventManagerPlugin[]>('EventManagerPlugins');\n\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\n@Injectable()\nexport class EventManager {\n  private _plugins: EventManagerPlugin[];\n  private _eventNameToPlugin = new Map<string, EventManagerPlugin>();\n\n  /**\n   * Initializes an instance of the event-manager service.\n   */\n  constructor(@Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[], private _zone: NgZone) {\n    plugins.forEach(p => p.manager = this);\n    this._plugins = plugins.slice().reverse();\n  }\n\n  /**\n   * Registers a handler for a specific element and event.\n   *\n   * @param element The HTML element to receive event notifications.\n   * @param eventName The name of the event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns  A callback function that can be used to remove the handler.\n   */\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const plugin = this._findPluginFor(eventName);\n    return plugin.addEventListener(element, eventName, handler);\n  }\n\n  /**\n   * Registers a global handler for an event in a target view.\n   *\n   * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n   * @param eventName The name of the event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns A callback function that can be used to remove the handler.\n   */\n  addGlobalEventListener(target: string, eventName: string, handler: Function): Function {\n    const plugin = this._findPluginFor(eventName);\n    return plugin.addGlobalEventListener(target, eventName, handler);\n  }\n\n  /**\n   * Retrieves the compilation zone in which event listeners are registered.\n   */\n  getZone(): NgZone { return this._zone; }\n\n  /** @internal */\n  _findPluginFor(eventName: string): EventManagerPlugin {\n    const plugin = this._eventNameToPlugin.get(eventName);\n    if (plugin) {\n      return plugin;\n    }\n\n    const plugins = this._plugins;\n    for (let i = 0; i < plugins.length; i++) {\n      const plugin = plugins[i];\n      if (plugin.supports(eventName)) {\n        this._eventNameToPlugin.set(eventName, plugin);\n        return plugin;\n      }\n    }\n    throw new Error(`No event manager plugin found for event ${eventName}`);\n  }\n}\n\nexport abstract class EventManagerPlugin {\n  constructor(private _doc: any) {}\n\n  // TODO(issue/24571): remove '!'.\n  manager !: EventManager;\n\n  abstract supports(eventName: string): boolean;\n\n  abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;\n\n  addGlobalEventListener(element: string, eventName: string, handler: Function): Function {\n    const target: HTMLElement = getDOM().getGlobalEventTarget(this._doc, element);\n    if (!target) {\n      throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n    }\n    return this.addEventListener(target, eventName, handler);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, OnDestroy} from '@angular/core';\nimport {getDOM} from './dom_adapter';\n\n@Injectable()\nexport class SharedStylesHost {\n  /** @internal */\n  protected _stylesSet = new Set<string>();\n\n  addStyles(styles: string[]): void {\n    const additions = new Set<string>();\n    styles.forEach(style => {\n      if (!this._stylesSet.has(style)) {\n        this._stylesSet.add(style);\n        additions.add(style);\n      }\n    });\n    this.onStylesAdded(additions);\n  }\n\n  onStylesAdded(additions: Set<string>): void {}\n\n  getAllStyles(): string[] { return Array.from(this._stylesSet); }\n}\n\n@Injectable()\nexport class DomSharedStylesHost extends SharedStylesHost implements OnDestroy {\n  private _hostNodes = new Set<Node>();\n  private _styleNodes = new Set<Node>();\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    super();\n    this._hostNodes.add(_doc.head);\n  }\n\n  private _addStylesToHost(styles: Set<string>, host: Node): void {\n    styles.forEach((style: string) => {\n      const styleEl = this._doc.createElement('style');\n      styleEl.textContent = style;\n      this._styleNodes.add(host.appendChild(styleEl));\n    });\n  }\n\n  addHost(hostNode: Node): void {\n    this._addStylesToHost(this._stylesSet, hostNode);\n    this._hostNodes.add(hostNode);\n  }\n\n  removeHost(hostNode: Node): void { this._hostNodes.delete(hostNode); }\n\n  onStylesAdded(additions: Set<string>): void {\n    this._hostNodes.forEach(hostNode => this._addStylesToHost(additions, hostNode));\n  }\n\n  ngOnDestroy(): void { this._styleNodes.forEach(styleNode => getDOM().remove(styleNode)); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_ID, Inject, Injectable, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2, ViewEncapsulation} from '@angular/core';\n\nimport {EventManager} from './events/event_manager';\nimport {DomSharedStylesHost} from './shared_styles_host';\n\nexport const NAMESPACE_URIS: {[ns: string]: string} = {\n  'svg': 'http://www.w3.org/2000/svg',\n  'xhtml': 'http://www.w3.org/1999/xhtml',\n  'xlink': 'http://www.w3.org/1999/xlink',\n  'xml': 'http://www.w3.org/XML/1998/namespace',\n  'xmlns': 'http://www.w3.org/2000/xmlns/',\n};\n\nconst COMPONENT_REGEX = /%COMP%/g;\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nexport function shimContentAttribute(componentShortId: string): string {\n  return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimHostAttribute(componentShortId: string): string {\n  return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function flattenStyles(\n    compId: string, styles: Array<any|any[]>, target: string[]): string[] {\n  for (let i = 0; i < styles.length; i++) {\n    let style = styles[i];\n\n    if (Array.isArray(style)) {\n      flattenStyles(compId, style, target);\n    } else {\n      style = style.replace(COMPONENT_REGEX, compId);\n      target.push(style);\n    }\n  }\n  return target;\n}\n\nfunction decoratePreventDefault(eventHandler: Function): Function {\n  return (event: any) => {\n    const allowDefaultBehavior = eventHandler(event);\n    if (allowDefaultBehavior === false) {\n      // TODO(tbosch): move preventDefault into event plugins...\n      event.preventDefault();\n      event.returnValue = false;\n    }\n  };\n}\n\n@Injectable()\nexport class DomRendererFactory2 implements RendererFactory2 {\n  private rendererByCompId = new Map<string, Renderer2>();\n  private defaultRenderer: Renderer2;\n\n  constructor(\n      private eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost,\n      @Inject(APP_ID) private appId: string) {\n    this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n  }\n\n  createRenderer(element: any, type: RendererType2|null): Renderer2 {\n    if (!element || !type) {\n      return this.defaultRenderer;\n    }\n    switch (type.encapsulation) {\n      case ViewEncapsulation.Emulated: {\n        let renderer = this.rendererByCompId.get(type.id);\n        if (!renderer) {\n          renderer = new EmulatedEncapsulationDomRenderer2(\n              this.eventManager, this.sharedStylesHost, type, this.appId);\n          this.rendererByCompId.set(type.id, renderer);\n        }\n        (<EmulatedEncapsulationDomRenderer2>renderer).applyToHost(element);\n        return renderer;\n      }\n      case ViewEncapsulation.Native:\n      case ViewEncapsulation.ShadowDom:\n        return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n      default: {\n        if (!this.rendererByCompId.has(type.id)) {\n          const styles = flattenStyles(type.id, type.styles, []);\n          this.sharedStylesHost.addStyles(styles);\n          this.rendererByCompId.set(type.id, this.defaultRenderer);\n        }\n        return this.defaultRenderer;\n      }\n    }\n  }\n\n  begin() {}\n  end() {}\n}\n\nclass DefaultDomRenderer2 implements Renderer2 {\n  data: {[key: string]: any} = Object.create(null);\n\n  constructor(private eventManager: EventManager) {}\n\n  destroy(): void {}\n\n  destroyNode: null;\n\n  createElement(name: string, namespace?: string): any {\n    if (namespace) {\n      // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key\n      // will result in undefined, so we just return the namespace here.\n      return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n    }\n\n    return document.createElement(name);\n  }\n\n  createComment(value: string): any { return document.createComment(value); }\n\n  createText(value: string): any { return document.createTextNode(value); }\n\n  appendChild(parent: any, newChild: any): void { parent.appendChild(newChild); }\n\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    if (parent) {\n      parent.insertBefore(newChild, refChild);\n    }\n  }\n\n  removeChild(parent: any, oldChild: any): void {\n    if (parent) {\n      parent.removeChild(oldChild);\n    }\n  }\n\n  selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n    let el: any = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n                                                       selectorOrNode;\n    if (!el) {\n      throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n    }\n    if (!preserveContent) {\n      el.textContent = '';\n    }\n    return el;\n  }\n\n  parentNode(node: any): any { return node.parentNode; }\n\n  nextSibling(node: any): any { return node.nextSibling; }\n\n  setAttribute(el: any, name: string, value: string, namespace?: string): void {\n    if (namespace) {\n      name = namespace + ':' + name;\n      // TODO(benlesh): Ivy may cause issues here because it's passing around\n      // full URIs for namespaces, therefore this lookup will fail.\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.setAttributeNS(namespaceUri, name, value);\n      } else {\n        el.setAttribute(name, value);\n      }\n    } else {\n      el.setAttribute(name, value);\n    }\n  }\n\n  removeAttribute(el: any, name: string, namespace?: string): void {\n    if (namespace) {\n      // TODO(benlesh): Ivy may cause issues here because it's passing around\n      // full URIs for namespaces, therefore this lookup will fail.\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.removeAttributeNS(namespaceUri, name);\n      } else {\n        // TODO(benlesh): Since ivy is passing around full URIs for namespaces\n        // this could result in properties like `http://www.w3.org/2000/svg:cx=\"123\"`,\n        // which is wrong.\n        el.removeAttribute(`${namespace}:${name}`);\n      }\n    } else {\n      el.removeAttribute(name);\n    }\n  }\n\n  addClass(el: any, name: string): void { el.classList.add(name); }\n\n  removeClass(el: any, name: string): void { el.classList.remove(name); }\n\n  setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n    if (flags & RendererStyleFlags2.DashCase) {\n      el.style.setProperty(\n          style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');\n    } else {\n      el.style[style] = value;\n    }\n  }\n\n  removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n    if (flags & RendererStyleFlags2.DashCase) {\n      el.style.removeProperty(style);\n    } else {\n      // IE requires '' instead of null\n      // see https://github.com/angular/angular/issues/7916\n      el.style[style] = '';\n    }\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    checkNoSyntheticProp(name, 'property');\n    el[name] = value;\n  }\n\n  setValue(node: any, value: string): void { node.nodeValue = value; }\n\n  listen(target: 'window'|'document'|'body'|any, event: string, callback: (event: any) => boolean):\n      () => void {\n    checkNoSyntheticProp(event, 'listener');\n    if (typeof target === 'string') {\n      return <() => void>this.eventManager.addGlobalEventListener(\n          target, event, decoratePreventDefault(callback));\n    }\n    return <() => void>this.eventManager.addEventListener(\n               target, event, decoratePreventDefault(callback)) as() => void;\n  }\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name: string, nameKind: string) {\n  if (name.charCodeAt(0) === AT_CHARCODE) {\n    throw new Error(\n        `Found the synthetic ${nameKind} ${name}. Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.`);\n  }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n  private contentAttr: string;\n  private hostAttr: string;\n\n  constructor(\n      eventManager: EventManager, sharedStylesHost: DomSharedStylesHost,\n      private component: RendererType2, appId: string) {\n    super(eventManager);\n    const styles = flattenStyles(appId + '-' + component.id, component.styles, []);\n    sharedStylesHost.addStyles(styles);\n\n    this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n    this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n  }\n\n  applyToHost(element: any) { super.setAttribute(element, this.hostAttr, ''); }\n\n  createElement(parent: any, name: string): Element {\n    const el = super.createElement(parent, name);\n    super.setAttribute(el, this.contentAttr, '');\n    return el;\n  }\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n  private shadowRoot: any;\n\n  constructor(\n      eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost,\n      private hostEl: any, private component: RendererType2) {\n    super(eventManager);\n    if (component.encapsulation === ViewEncapsulation.ShadowDom) {\n      this.shadowRoot = (hostEl as any).attachShadow({mode: 'open'});\n    } else {\n      this.shadowRoot = (hostEl as any).createShadowRoot();\n    }\n    this.sharedStylesHost.addHost(this.shadowRoot);\n    const styles = flattenStyles(component.id, component.styles, []);\n    for (let i = 0; i < styles.length; i++) {\n      const styleEl = document.createElement('style');\n      styleEl.textContent = styles[i];\n      this.shadowRoot.appendChild(styleEl);\n    }\n  }\n\n  private nodeOrShadowRoot(node: any): any { return node === this.hostEl ? this.shadowRoot : node; }\n\n  destroy() { this.sharedStylesHost.removeHost(this.shadowRoot); }\n\n  appendChild(parent: any, newChild: any): void {\n    return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n  }\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n  }\n  removeChild(parent: any, oldChild: any): void {\n    return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n  }\n  parentNode(node: any): any {\n    return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {Inject, Injectable, NgZone, Optional, PLATFORM_ID} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager';\n\n/**\n * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'\n * since Angular can do much more\n * efficient bookkeeping than Zone can, because we have additional information. This speeds up\n * addEventListener by 3x.\n */\nconst __symbol__ =\n    (() => (typeof Zone !== 'undefined') && (Zone as any)['__symbol__'] ||\n         function(v: string): string { return '__zone_symbol__' + v; })();\nconst ADD_EVENT_LISTENER: 'addEventListener' = __symbol__('addEventListener');\nconst REMOVE_EVENT_LISTENER: 'removeEventListener' = __symbol__('removeEventListener');\n\nconst symbolNames: {[key: string]: string} = {};\n\nconst FALSE = 'FALSE';\nconst ANGULAR = 'ANGULAR';\nconst NATIVE_ADD_LISTENER = 'addEventListener';\nconst NATIVE_REMOVE_LISTENER = 'removeEventListener';\n\n// use the same symbol string which is used in zone.js\nconst stopSymbol = '__zone_symbol__propagationStopped';\nconst stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';\n\n\nconst blackListedMap = (() => {\n  const blackListedEvents: string[] =\n      (typeof Zone !== 'undefined') && (Zone as any)[__symbol__('BLACK_LISTED_EVENTS')];\n  if (blackListedEvents) {\n    const res: {[eventName: string]: string} = {};\n    blackListedEvents.forEach(eventName => { res[eventName] = eventName; });\n    return res;\n  }\n  return undefined;\n})();\n\n\nconst isBlackListedEvent = function(eventName: string) {\n  if (!blackListedMap) {\n    return false;\n  }\n  return blackListedMap.hasOwnProperty(eventName);\n};\n\ninterface TaskData {\n  zone: any;\n  handler: Function;\n}\n\n// a global listener to handle all dom event,\n// so we do not need to create a closure every time\nconst globalListener = function(this: any, event: Event) {\n  const symbolName = symbolNames[event.type];\n  if (!symbolName) {\n    return;\n  }\n  const taskDatas: TaskData[] = this[symbolName];\n  if (!taskDatas) {\n    return;\n  }\n  const args: any = [event];\n  if (taskDatas.length === 1) {\n    // if taskDatas only have one element, just invoke it\n    const taskData = taskDatas[0];\n    if (taskData.zone !== Zone.current) {\n      // only use Zone.run when Zone.current not equals to stored zone\n      return taskData.zone.run(taskData.handler, this, args);\n    } else {\n      return taskData.handler.apply(this, args);\n    }\n  } else {\n    // copy tasks as a snapshot to avoid event handlers remove\n    // itself or others\n    const copiedTasks = taskDatas.slice();\n    for (let i = 0; i < copiedTasks.length; i++) {\n      // if other listener call event.stopImmediatePropagation\n      // just break\n      if ((event as any)[stopSymbol] === true) {\n        break;\n      }\n      const taskData = copiedTasks[i];\n      if (taskData.zone !== Zone.current) {\n        // only use Zone.run when Zone.current not equals to stored zone\n        taskData.zone.run(taskData.handler, this, args);\n      } else {\n        taskData.handler.apply(this, args);\n      }\n    }\n  }\n};\n\n@Injectable()\nexport class DomEventsPlugin extends EventManagerPlugin {\n  constructor(\n      @Inject(DOCUMENT) doc: any, private ngZone: NgZone,\n      @Optional() @Inject(PLATFORM_ID) platformId: {}|null) {\n    super(doc);\n\n    if (!platformId || !isPlatformServer(platformId)) {\n      this.patchEvent();\n    }\n  }\n\n  private patchEvent() {\n    if (typeof Event === 'undefined' || !Event || !Event.prototype) {\n      return;\n    }\n    if ((Event.prototype as any)[stopMethodSymbol]) {\n      // already patched by zone.js\n      return;\n    }\n    const delegate = (Event.prototype as any)[stopMethodSymbol] =\n        Event.prototype.stopImmediatePropagation;\n    Event.prototype.stopImmediatePropagation = function(this: any) {\n      if (this) {\n        this[stopSymbol] = true;\n      }\n\n      // We should call native delegate in case in some environment part of\n      // the application will not use the patched Event. Also we cast the\n      // \"arguments\" to any since \"stopImmediatePropagation\" technically does not\n      // accept any arguments, but we don't know what developers pass through the\n      // function and we want to not break these calls.\n      delegate && delegate.apply(this, arguments as any);\n    };\n  }\n\n  // This plugin should come last in the list of plugins, because it accepts all\n  // events.\n  supports(eventName: string): boolean { return true; }\n\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    /**\n     * This code is about to add a listener to the DOM. If Zone.js is present, than\n     * `addEventListener` has been patched. The patched code adds overhead in both\n     * memory and speed (3x slower) than native. For this reason if we detect that\n     * Zone.js is present we use a simple version of zone aware addEventListener instead.\n     * The result is faster registration and the zone will be restored.\n     * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask\n     * will not be invoked\n     * We also do manual zone restoration in element.ts renderEventHandlerClosure method.\n     *\n     * NOTE: it is possible that the element is from different iframe, and so we\n     * have to check before we execute the method.\n     */\n    const self = this;\n    const zoneJsLoaded = element[ADD_EVENT_LISTENER];\n    let callback: EventListener = handler as EventListener;\n    // if zonejs is loaded and current zone is not ngZone\n    // we keep Zone.current on target for later restoration.\n    if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {\n      let symbolName = symbolNames[eventName];\n      if (!symbolName) {\n        symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);\n      }\n      let taskDatas: TaskData[] = (element as any)[symbolName];\n      const globalListenerRegistered = taskDatas && taskDatas.length > 0;\n      if (!taskDatas) {\n        taskDatas = (element as any)[symbolName] = [];\n      }\n\n      const zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;\n      if (taskDatas.length === 0) {\n        taskDatas.push({zone: zone, handler: callback});\n      } else {\n        let callbackRegistered = false;\n        for (let i = 0; i < taskDatas.length; i++) {\n          if (taskDatas[i].handler === callback) {\n            callbackRegistered = true;\n            break;\n          }\n        }\n        if (!callbackRegistered) {\n          taskDatas.push({zone: zone, handler: callback});\n        }\n      }\n\n      if (!globalListenerRegistered) {\n        element[ADD_EVENT_LISTENER](eventName, globalListener, false);\n      }\n    } else {\n      element[NATIVE_ADD_LISTENER](eventName, callback, false);\n    }\n    return () => this.removeEventListener(element, eventName, callback);\n  }\n\n  removeEventListener(target: any, eventName: string, callback: Function): void {\n    let underlyingRemove = target[REMOVE_EVENT_LISTENER];\n    // zone.js not loaded, use native removeEventListener\n    if (!underlyingRemove) {\n      return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n    }\n    let symbolName = symbolNames[eventName];\n    let taskDatas: TaskData[] = symbolName && target[symbolName];\n    if (!taskDatas) {\n      // addEventListener not using patched version\n      // just call native removeEventListener\n      return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n    }\n    // fix issue 20532, should be able to remove\n    // listener which was added inside of ngZone\n    let found = false;\n    for (let i = 0; i < taskDatas.length; i++) {\n      // remove listener from taskDatas if the callback equals\n      if (taskDatas[i].handler === callback) {\n        found = true;\n        taskDatas.splice(i, 1);\n        break;\n      }\n    }\n    if (found) {\n      if (taskDatas.length === 0) {\n        // all listeners are removed, we can remove the globalListener from target\n        underlyingRemove.apply(target, [eventName, globalListener, false]);\n      }\n    } else {\n      // not found in taskDatas, the callback may be added inside of ngZone\n      // use native remove listener to remove the callback\n      target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, Optional, ÉµConsole as Console} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager';\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n  // pan\n  'pan': true,\n  'panstart': true,\n  'panmove': true,\n  'panend': true,\n  'pancancel': true,\n  'panleft': true,\n  'panright': true,\n  'panup': true,\n  'pandown': true,\n  // pinch\n  'pinch': true,\n  'pinchstart': true,\n  'pinchmove': true,\n  'pinchend': true,\n  'pinchcancel': true,\n  'pinchin': true,\n  'pinchout': true,\n  // press\n  'press': true,\n  'pressup': true,\n  // rotate\n  'rotate': true,\n  'rotatestart': true,\n  'rotatemove': true,\n  'rotateend': true,\n  'rotatecancel': true,\n  // swipe\n  'swipe': true,\n  'swipeleft': true,\n  'swiperight': true,\n  'swipeup': true,\n  'swipedown': true,\n  // tap\n  'tap': true,\n};\n\n/**\n * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @publicApi\n */\nexport const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>('HammerGestureConfig');\n\n\n/**\n * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.\n *\n * @publicApi\n */\nexport type HammerLoader = () => Promise<void>;\n\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nexport const HAMMER_LOADER = new InjectionToken<HammerLoader>('HammerLoader');\n\nexport interface HammerInstance {\n  on(eventName: string, callback?: Function): void;\n  off(eventName: string, callback?: Function): void;\n  destroy?(): void;\n}\n\n/**\n * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\n@Injectable()\nexport class HammerGestureConfig {\n  /**\n   * A set of supported event names for gestures to be used in Angular.\n   * Angular supports all built-in recognizers, as listed in\n   * [HammerJS documentation](http://hammerjs.github.io/).\n   */\n  events: string[] = [];\n\n  /**\n  * Maps gesture event names to a set of configuration options\n  * that specify overrides to the default values for specific properties.\n  *\n  * The key is a supported event name to be configured,\n  * and the options object contains a set of properties, with override values\n  * to be applied to the named recognizer event.\n  * For example, to disable recognition of the rotate event, specify\n  *  `{\"rotate\": {\"enable\": false}}`.\n  *\n  * Properties that are not present take the HammerJS default values.\n  * For information about which properties are supported for which events,\n  * and their allowed and default values, see\n  * [HammerJS documentation](http://hammerjs.github.io/).\n  *\n  */\n  overrides: {[key: string]: Object} = {};\n\n  /**\n   * Properties whose default values can be overridden for a given event.\n   * Different sets of properties apply to different events.\n   * For information about which properties are supported for which events,\n   * and their allowed and default values, see\n   * [HammerJS documentation](http://hammerjs.github.io/).\n   */\n  options?: {\n    cssProps?: any; domEvents?: boolean; enable?: boolean | ((manager: any) => boolean);\n    preset?: any[];\n    touchAction?: string;\n    recognizers?: any[];\n    inputClass?: any;\n    inputTarget?: EventTarget;\n  };\n\n  /**\n   * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n   * and attaches it to a given HTML element.\n   * @param element The element that will recognize gestures.\n   * @returns A HammerJS event-manager object.\n   */\n  buildHammer(element: HTMLElement): HammerInstance {\n    const mc = new Hammer !(element, this.options);\n\n    mc.get('pinch').set({enable: true});\n    mc.get('rotate').set({enable: true});\n\n    for (const eventName in this.overrides) {\n      mc.get(eventName).set(this.overrides[eventName]);\n    }\n\n    return mc;\n  }\n}\n\n@Injectable()\nexport class HammerGesturesPlugin extends EventManagerPlugin {\n  constructor(\n      @Inject(DOCUMENT) doc: any,\n      @Inject(HAMMER_GESTURE_CONFIG) private _config: HammerGestureConfig, private console: Console,\n      @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader|null) {\n    super(doc);\n  }\n\n  supports(eventName: string): boolean {\n    if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n      return false;\n    }\n\n    if (!(window as any).Hammer && !this.loader) {\n      this.console.warn(\n          `The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n          `loaded and no custom loader has been specified.`);\n      return false;\n    }\n\n    return true;\n  }\n\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const zone = this.manager.getZone();\n    eventName = eventName.toLowerCase();\n\n    // If Hammer is not present but a loader is specified, we defer adding the event listener\n    // until Hammer is loaded.\n    if (!(window as any).Hammer && this.loader) {\n      // This `addEventListener` method returns a function to remove the added listener.\n      // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n      // than remove anything.\n      let cancelRegistration = false;\n      let deregister: Function = () => { cancelRegistration = true; };\n\n      this.loader()\n          .then(() => {\n            // If Hammer isn't actually loaded when the custom loader resolves, give up.\n            if (!(window as any).Hammer) {\n              this.console.warn(\n                  `The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n              deregister = () => {};\n              return;\n            }\n\n            if (!cancelRegistration) {\n              // Now that Hammer is loaded and the listener is being loaded for real,\n              // the deregistration function changes from canceling registration to removal.\n              deregister = this.addEventListener(element, eventName, handler);\n            }\n          })\n          .catch(() => {\n            this.console.warn(\n                `The \"${eventName}\" event cannot be bound because the custom ` +\n                `Hammer.JS loader failed.`);\n            deregister = () => {};\n          });\n\n      // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n      // can change the behavior of `deregister` once the listener is added. Using a closure in\n      // this way allows us to avoid any additional data structures to track listener removal.\n      return () => { deregister(); };\n    }\n\n    return zone.runOutsideAngular(() => {\n      // Creating the manager bind events, must be done outside of angular\n      const mc = this._config.buildHammer(element);\n      const callback = function(eventObj: HammerInput) {\n        zone.runGuarded(function() { handler(eventObj); });\n      };\n      mc.on(eventName, callback);\n      return () => {\n        mc.off(eventName, callback);\n        // destroy mc to prevent memory leak\n        if (typeof mc.destroy === 'function') {\n          mc.destroy();\n        }\n      };\n    });\n  }\n\n  isCustomEvent(eventName: string): boolean { return this._config.events.indexOf(eventName) > -1; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, NgZone} from '@angular/core';\n\nimport {getDOM} from '../dom_adapter';\n\nimport {EventManagerPlugin} from './event_manager';\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS: {[key: string]: (event: KeyboardEvent) => boolean} = {\n  'alt': (event: KeyboardEvent) => event.altKey,\n  'control': (event: KeyboardEvent) => event.ctrlKey,\n  'meta': (event: KeyboardEvent) => event.metaKey,\n  'shift': (event: KeyboardEvent) => event.shiftKey\n};\n\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n@Injectable()\nexport class KeyEventsPlugin extends EventManagerPlugin {\n  /**\n   * Initializes an instance of the browser plug-in.\n   * @param doc The document in which key events will be detected.\n   */\n  constructor(@Inject(DOCUMENT) doc: any) { super(doc); }\n\n  /**\n    * Reports whether a named key event is supported.\n    * @param eventName The event name to query.\n    * @return True if the named key event is supported.\n   */\n  supports(eventName: string): boolean { return KeyEventsPlugin.parseEventName(eventName) != null; }\n\n  /**\n   * Registers a handler for a specific element and key event.\n   * @param element The HTML element to receive event notifications.\n   * @param eventName The name of the key event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns The key event that was registered.\n  */\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const parsedEvent = KeyEventsPlugin.parseEventName(eventName) !;\n\n    const outsideHandler =\n        KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n\n    return this.manager.getZone().runOutsideAngular(() => {\n      return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n    });\n  }\n\n  static parseEventName(eventName: string): {[key: string]: string}|null {\n    const parts: string[] = eventName.toLowerCase().split('.');\n\n    const domEventName = parts.shift();\n    if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n      return null;\n    }\n\n    const key = KeyEventsPlugin._normalizeKey(parts.pop() !);\n\n    let fullKey = '';\n    MODIFIER_KEYS.forEach(modifierName => {\n      const index: number = parts.indexOf(modifierName);\n      if (index > -1) {\n        parts.splice(index, 1);\n        fullKey += modifierName + '.';\n      }\n    });\n    fullKey += key;\n\n    if (parts.length != 0 || key.length === 0) {\n      // returning null instead of throwing to let another plugin process the event\n      return null;\n    }\n\n    const result: {[k: string]: string} = {};\n    result['domEventName'] = domEventName;\n    result['fullKey'] = fullKey;\n    return result;\n  }\n\n  static getEventFullKey(event: KeyboardEvent): string {\n    let fullKey = '';\n    let key = getDOM().getEventKey(event);\n    key = key.toLowerCase();\n    if (key === ' ') {\n      key = 'space';  // for readability\n    } else if (key === '.') {\n      key = 'dot';  // because '.' is used as a separator in event names\n    }\n    MODIFIER_KEYS.forEach(modifierName => {\n      if (modifierName != key) {\n        const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n        if (modifierGetter(event)) {\n          fullKey += modifierName + '.';\n        }\n      }\n    });\n    fullKey += key;\n    return fullKey;\n  }\n\n  /**\n   * Configures a handler callback for a key event.\n   * @param fullKey The event name that combines all simultaneous keystrokes.\n   * @param handler The function that responds to the key event.\n   * @param zone The zone in which the event occurred.\n   * @returns A callback function.\n   */\n  static eventCallback(fullKey: any, handler: Function, zone: NgZone): Function {\n    return (event: any /** TODO #9100 */) => {\n      if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {\n        zone.runGuarded(() => handler(event));\n      }\n    };\n  }\n\n  /** @internal */\n  static _normalizeKey(keyName: string): string {\n    // TODO: switch to a Map if the mapping grows too much\n    switch (keyName) {\n      case 'esc':\n        return 'escape';\n      default:\n        return keyName;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, Sanitizer, SecurityContext, Éµ_sanitizeHtml as _sanitizeHtml, Éµ_sanitizeStyle as _sanitizeStyle, Éµ_sanitizeUrl as _sanitizeUrl} from '@angular/core';\n\n\nexport {SecurityContext};\n\n\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\nexport abstract class DomSanitizer implements Sanitizer {\n  /**\n   * Sanitizes a value for use in the given SecurityContext.\n   *\n   * If value is trusted for the context, this method will unwrap the contained safe value and use\n   * it directly. Otherwise, value will be sanitized to be safe in the given context, for example\n   * by replacing URLs that have an unsafe protocol part (such as `javascript:`). The implementation\n   * is responsible to make sure that the value can definitely be safely used in the given context.\n   */\n  abstract sanitize(context: SecurityContext, value: SafeValue|string|null): string|null;\n\n  /**\n   * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML\n   * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will\n   * leave safe HTML intact, so in most situations this method should not be used.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustHtml(value: string): SafeHtml;\n\n  /**\n   * Bypass security and trust the given value to be safe style value (CSS).\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustStyle(value: string): SafeStyle;\n\n  /**\n   * Bypass security and trust the given value to be safe JavaScript.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustScript(value: string): SafeScript;\n\n  /**\n   * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used\n   * in hyperlinks or `<img src>`.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustUrl(value: string): SafeUrl;\n\n  /**\n   * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may\n   * be used to load executable code from, like `<script src>`, or `<iframe src>`.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;\n}\n\n\n@Injectable()\nexport class DomSanitizerImpl extends DomSanitizer {\n  constructor(@Inject(DOCUMENT) private _doc: any) { super(); }\n\n  sanitize(ctx: SecurityContext, value: SafeValue|string|null): string|null {\n    if (value == null) return null;\n    switch (ctx) {\n      case SecurityContext.NONE:\n        return value as string;\n      case SecurityContext.HTML:\n        if (value instanceof SafeHtmlImpl) return value.changingThisBreaksApplicationSecurity;\n        this.checkNotSafeValue(value, 'HTML');\n        return _sanitizeHtml(this._doc, String(value));\n      case SecurityContext.STYLE:\n        if (value instanceof SafeStyleImpl) return value.changingThisBreaksApplicationSecurity;\n        this.checkNotSafeValue(value, 'Style');\n        return _sanitizeStyle(value as string);\n      case SecurityContext.SCRIPT:\n        if (value instanceof SafeScriptImpl) return value.changingThisBreaksApplicationSecurity;\n        this.checkNotSafeValue(value, 'Script');\n        throw new Error('unsafe value used in a script context');\n      case SecurityContext.URL:\n        if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {\n          // Allow resource URLs in URL contexts, they are strictly more trusted.\n          return value.changingThisBreaksApplicationSecurity;\n        }\n        this.checkNotSafeValue(value, 'URL');\n        return _sanitizeUrl(String(value));\n      case SecurityContext.RESOURCE_URL:\n        if (value instanceof SafeResourceUrlImpl) {\n          return value.changingThisBreaksApplicationSecurity;\n        }\n        this.checkNotSafeValue(value, 'ResourceURL');\n        throw new Error(\n            'unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n      default:\n        throw new Error(`Unexpected SecurityContext ${ctx} (see http://g.co/ng/security#xss)`);\n    }\n  }\n\n  private checkNotSafeValue(value: any, expectedType: string) {\n    if (value instanceof SafeValueImpl) {\n      throw new Error(\n          `Required a safe ${expectedType}, got a ${value.getTypeName()} ` +\n          `(see http://g.co/ng/security#xss)`);\n    }\n  }\n\n  bypassSecurityTrustHtml(value: string): SafeHtml { return new SafeHtmlImpl(value); }\n  bypassSecurityTrustStyle(value: string): SafeStyle { return new SafeStyleImpl(value); }\n  bypassSecurityTrustScript(value: string): SafeScript { return new SafeScriptImpl(value); }\n  bypassSecurityTrustUrl(value: string): SafeUrl { return new SafeUrlImpl(value); }\n  bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl {\n    return new SafeResourceUrlImpl(value);\n  }\n}\n\nabstract class SafeValueImpl implements SafeValue {\n  constructor(public changingThisBreaksApplicationSecurity: string) {\n    // empty\n  }\n\n  abstract getTypeName(): string;\n\n  toString() {\n    return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n        ` (see http://g.co/ng/security#xss)`;\n  }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n  getTypeName() { return 'HTML'; }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n  getTypeName() { return 'Style'; }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n  getTypeName() { return 'Script'; }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n  getTypeName() { return 'URL'; }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n  getTypeName() { return 'ResourceURL'; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule, DOCUMENT, PlatformLocation, ÉµPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID} from '@angular/common';\nimport {APP_ID, ApplicationModule, ErrorHandler, Inject, ModuleWithProviders, NgModule, NgZone, Optional, PLATFORM_ID, PLATFORM_INITIALIZER, PlatformRef, RendererFactory2, Sanitizer, SkipSelf, StaticProvider, Testability, createPlatformFactory, platformCore, ÉµAPP_ROOT as APP_ROOT, ÉµConsole as Console} from '@angular/core';\n\nimport {BrowserDomAdapter} from './browser/browser_adapter';\nimport {BrowserPlatformLocation} from './browser/location/browser_platform_location';\nimport {SERVER_TRANSITION_PROVIDERS, TRANSITION_ID} from './browser/server-transition';\nimport {BrowserGetTestability} from './browser/testability';\nimport {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';\nimport {DomRendererFactory2} from './dom/dom_renderer';\nimport {DomEventsPlugin} from './dom/events/dom_events';\nimport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nimport {HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerGesturesPlugin} from './dom/events/hammer_gestures';\nimport {KeyEventsPlugin} from './dom/events/key_events';\nimport {DomSharedStylesHost, SharedStylesHost} from './dom/shared_styles_host';\nimport {DomSanitizer, DomSanitizerImpl} from './security/dom_sanitization_service';\n\nexport const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [\n  {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n  {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},\n  {provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT]},\n  {provide: DOCUMENT, useFactory: _document, deps: []},\n];\n\n/**\n * @security Replacing built-in sanitization providers exposes the application to XSS risks.\n * Attacker-controlled data introduced by an unsanitized provider could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n * @publicApi\n */\nexport const BROWSER_SANITIZATION_PROVIDERS: StaticProvider[] = [\n  {provide: Sanitizer, useExisting: DomSanitizer},\n  {provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT]},\n];\n\n/**\n * @publicApi\n */\nexport const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef =\n    createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n\nexport function initDomAdapter() {\n  BrowserDomAdapter.makeCurrent();\n  BrowserGetTestability.init();\n}\n\nexport function errorHandler(): ErrorHandler {\n  return new ErrorHandler();\n}\n\nexport function _document(): any {\n  return document;\n}\n\nexport const BROWSER_MODULE_PROVIDERS: StaticProvider[] = [\n  BROWSER_SANITIZATION_PROVIDERS,\n  {provide: APP_ROOT, useValue: true},\n  {provide: ErrorHandler, useFactory: errorHandler, deps: []},\n  {\n    provide: EVENT_MANAGER_PLUGINS,\n    useClass: DomEventsPlugin,\n    multi: true,\n    deps: [DOCUMENT, NgZone, PLATFORM_ID]\n  },\n  {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT]},\n  {\n    provide: EVENT_MANAGER_PLUGINS,\n    useClass: HammerGesturesPlugin,\n    multi: true,\n    deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]\n  },\n  {provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: []},\n  {\n    provide: DomRendererFactory2,\n    useClass: DomRendererFactory2,\n    deps: [EventManager, DomSharedStylesHost, APP_ID]\n  },\n  {provide: RendererFactory2, useExisting: DomRendererFactory2},\n  {provide: SharedStylesHost, useExisting: DomSharedStylesHost},\n  {provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT]},\n  {provide: Testability, useClass: Testability, deps: [NgZone]},\n  {provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone]},\n  ELEMENT_PROBE_PROVIDERS,\n];\n\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\n@NgModule({providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule]})\nexport class BrowserModule {\n  constructor(@Optional() @SkipSelf() @Inject(BrowserModule) parentModule: BrowserModule|null) {\n    if (parentModule) {\n      throw new Error(\n          `BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`);\n    }\n  }\n\n  /**\n   * Configures a browser-based app to transition from a server-rendered app, if\n   * one is present on the page.\n   *\n   * @param params An object containing an identifier for the app to transition.\n   * The ID must match between the client and server versions of the app.\n   * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n   */\n  static withServerTransition(params: {appId: string}): ModuleWithProviders<BrowserModule> {\n    return {\n      ngModule: BrowserModule,\n      providers: [\n        {provide: APP_ID, useValue: params.appId},\n        {provide: TRANSITION_ID, useExisting: APP_ID},\n        SERVER_TRANSITION_PROVIDERS,\n      ],\n    };\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, ÉµÉµinject} from '@angular/core';\n\nimport {DomAdapter, getDOM} from '../dom/dom_adapter';\n\n\n\n/**\n * Represents a meta element.\n *\n * @publicApi\n */\nexport type MetaDefinition = {\n  charset?: string; content?: string; httpEquiv?: string; id?: string; itemprop?: string;\n  name?: string;\n  property?: string;\n  scheme?: string;\n  url?: string;\n} &\n{\n  // TODO(IgorMinar): this type looks wrong\n  [prop: string]: string;\n};\n\n/**\n * Factory to create Meta service.\n */\nexport function createMeta() {\n  return new Meta(ÉµÉµinject(DOCUMENT));\n}\n\n/**\n * A service that can be used to get and add meta tags.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: createMeta, deps: []})\nexport class Meta {\n  private _dom: DomAdapter;\n  constructor(@Inject(DOCUMENT) private _doc: any) { this._dom = getDOM(); }\n\n  addTag(tag: MetaDefinition, forceCreation: boolean = false): HTMLMetaElement|null {\n    if (!tag) return null;\n    return this._getOrCreateElement(tag, forceCreation);\n  }\n\n  addTags(tags: MetaDefinition[], forceCreation: boolean = false): HTMLMetaElement[] {\n    if (!tags) return [];\n    return tags.reduce((result: HTMLMetaElement[], tag: MetaDefinition) => {\n      if (tag) {\n        result.push(this._getOrCreateElement(tag, forceCreation));\n      }\n      return result;\n    }, []);\n  }\n\n  getTag(attrSelector: string): HTMLMetaElement|null {\n    if (!attrSelector) return null;\n    return this._dom.querySelector(this._doc, `meta[${attrSelector}]`) || null;\n  }\n\n  getTags(attrSelector: string): HTMLMetaElement[] {\n    if (!attrSelector) return [];\n    const list /*NodeList*/ = this._dom.querySelectorAll(this._doc, `meta[${attrSelector}]`);\n    return list ? [].slice.call(list) : [];\n  }\n\n  updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement|null {\n    if (!tag) return null;\n    selector = selector || this._parseSelector(tag);\n    const meta: HTMLMetaElement = this.getTag(selector) !;\n    if (meta) {\n      return this._setMetaElementAttributes(tag, meta);\n    }\n    return this._getOrCreateElement(tag, true);\n  }\n\n  removeTag(attrSelector: string): void { this.removeTagElement(this.getTag(attrSelector) !); }\n\n  removeTagElement(meta: HTMLMetaElement): void {\n    if (meta) {\n      this._dom.remove(meta);\n    }\n  }\n\n  private _getOrCreateElement(meta: MetaDefinition, forceCreation: boolean = false):\n      HTMLMetaElement {\n    if (!forceCreation) {\n      const selector: string = this._parseSelector(meta);\n      const elem: HTMLMetaElement = this.getTag(selector) !;\n      // It's allowed to have multiple elements with the same name so it's not enough to\n      // just check that element with the same name already present on the page. We also need to\n      // check if element has tag attributes\n      if (elem && this._containsAttributes(meta, elem)) return elem;\n    }\n    const element: HTMLMetaElement = this._dom.createElement('meta') as HTMLMetaElement;\n    this._setMetaElementAttributes(meta, element);\n    const head = this._dom.getElementsByTagName(this._doc, 'head')[0];\n    this._dom.appendChild(head, element);\n    return element;\n  }\n\n  private _setMetaElementAttributes(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\n    Object.keys(tag).forEach((prop: string) => this._dom.setAttribute(el, prop, tag[prop]));\n    return el;\n  }\n\n  private _parseSelector(tag: MetaDefinition): string {\n    const attr: string = tag.name ? 'name' : 'property';\n    return `${attr}=\"${tag[attr]}\"`;\n  }\n\n  private _containsAttributes(tag: MetaDefinition, elem: HTMLMetaElement): boolean {\n    return Object.keys(tag).every((key: string) => this._dom.getAttribute(elem, key) === tag[key]);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, ÉµÉµinject} from '@angular/core';\n\nimport {getDOM} from '../dom/dom_adapter';\n\n/**\n * Factory to create Title service.\n */\nexport function createTitle() {\n  return new Title(ÉµÉµinject(DOCUMENT));\n}\n\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: createTitle, deps: []})\nexport class Title {\n  constructor(@Inject(DOCUMENT) private _doc: any) {}\n  /**\n   * Get the title of the current HTML document.\n   */\n  getTitle(): string { return getDOM().getTitle(this._doc); }\n\n  /**\n   * Set the title of the current HTML document.\n   * @param newTitle\n   */\n  setTitle(newTitle: string) { getDOM().setTitle(this._doc, newTitle); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst win = typeof window !== 'undefined' && window || <any>{};\nexport {win as window};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef, ComponentRef} from '@angular/core';\nimport {getDOM} from '../../dom/dom_adapter';\nimport {window} from './browser';\n\nexport class ChangeDetectionPerfRecord {\n  constructor(public msPerTick: number, public numTicks: number) {}\n}\n\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nexport class AngularProfiler {\n  appRef: ApplicationRef;\n\n  constructor(ref: ComponentRef<any>) { this.appRef = ref.injector.get(ApplicationRef); }\n\n  // tslint:disable:no-console\n  /**\n   * Exercises change detection in a loop and then prints the average amount of\n   * time in milliseconds how long a single round of change detection takes for\n   * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n   * of 500 milliseconds.\n   *\n   * Optionally, a user may pass a `config` parameter containing a map of\n   * options. Supported options are:\n   *\n   * `record` (boolean) - causes the profiler to record a CPU profile while\n   * it exercises the change detector. Example:\n   *\n   * ```\n   * ng.profiler.timeChangeDetection({record: true})\n   * ```\n   */\n  timeChangeDetection(config: any): ChangeDetectionPerfRecord {\n    const record = config && config['record'];\n    const profileName = 'Change Detection';\n    // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n    const isProfilerAvailable = window.console.profile != null;\n    if (record && isProfilerAvailable) {\n      window.console.profile(profileName);\n    }\n    const start = getDOM().performanceNow();\n    let numTicks = 0;\n    while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {\n      this.appRef.tick();\n      numTicks++;\n    }\n    const end = getDOM().performanceNow();\n    if (record && isProfilerAvailable) {\n      window.console.profileEnd(profileName);\n    }\n    const msPerTick = (end - start) / numTicks;\n    window.console.log(`ran ${numTicks} change detection cycles`);\n    window.console.log(`${msPerTick.toFixed(2)} ms per check`);\n\n    return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\nimport {exportNgVar} from '../../dom/util';\nimport {AngularProfiler} from './common_tools';\n\nconst PROFILER_GLOBAL_NAME = 'profiler';\n\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n *    then hit Enter.\n *\n * @publicApi\n */\nexport function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {\n  exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n  return ref;\n}\n\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nexport function disableDebugTools(): void {\n  exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {APP_ID, Injectable, NgModule} from '@angular/core';\n\nexport function escapeHtml(text: string): string {\n  const escapedText: {[k: string]: string} = {\n    '&': '&a;',\n    '\"': '&q;',\n    '\\'': '&s;',\n    '<': '&l;',\n    '>': '&g;',\n  };\n  return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\n\nexport function unescapeHtml(text: string): string {\n  const unescapedText: {[k: string]: string} = {\n    '&a;': '&',\n    '&q;': '\"',\n    '&s;': '\\'',\n    '&l;': '<',\n    '&g;': '>',\n  };\n  return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n\n/**\n * A type-safe key to use with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport type StateKey<T> = string & {__not_a_string: never};\n\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport function makeStateKey<T = void>(key: string): StateKey<T> {\n  return key as StateKey<T>;\n}\n\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * `TransferState` will be available as an injectable token. To use it import\n * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialzied in a\n * non-lossy manner.\n *\n * @publicApi\n */\n@Injectable()\nexport class TransferState {\n  private store: {[k: string]: {} | undefined} = {};\n  private onSerializeCallbacks: {[k: string]: () => {} | undefined} = {};\n\n  /** @internal */\n  static init(initState: {}) {\n    const transferState = new TransferState();\n    transferState.store = initState;\n    return transferState;\n  }\n\n  /**\n   * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n   */\n  get<T>(key: StateKey<T>, defaultValue: T): T {\n    return this.store[key] !== undefined ? this.store[key] as T : defaultValue;\n  }\n\n  /**\n   * Set the value corresponding to a key.\n   */\n  set<T>(key: StateKey<T>, value: T): void { this.store[key] = value; }\n\n  /**\n   * Remove a key from the store.\n   */\n  remove<T>(key: StateKey<T>): void { delete this.store[key]; }\n\n  /**\n   * Test whether a key exists in the store.\n   */\n  hasKey<T>(key: StateKey<T>) { return this.store.hasOwnProperty(key); }\n\n  /**\n   * Register a callback to provide the value for a key when `toJson` is called.\n   */\n  onSerialize<T>(key: StateKey<T>, callback: () => T): void {\n    this.onSerializeCallbacks[key] = callback;\n  }\n\n  /**\n   * Serialize the current state of the store to JSON.\n   */\n  toJson(): string {\n    // Call the onSerialize callbacks and put those values into the store.\n    for (const key in this.onSerializeCallbacks) {\n      if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n        try {\n          this.store[key] = this.onSerializeCallbacks[key]();\n        } catch (e) {\n          console.warn('Exception in onSerialize callback: ', e);\n        }\n      }\n    }\n    return JSON.stringify(this.store);\n  }\n}\n\nexport function initTransferState(doc: Document, appId: string) {\n  // Locate the script tag with the JSON data transferred from the server.\n  // The id of the script tag is set to the Angular appId + 'state'.\n  const script = doc.getElementById(appId + '-state');\n  let initialState = {};\n  if (script && script.textContent) {\n    try {\n      initialState = JSON.parse(unescapeHtml(script.textContent));\n    } catch (e) {\n      console.warn('Exception while restoring TransferState for app ' + appId, e);\n    }\n  }\n  return TransferState.init(initialState);\n}\n\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n */\n@NgModule({\n  providers: [{provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID]}],\n})\nexport class BrowserTransferStateModule {\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DebugElement, DebugNode, Predicate, Type} from '@angular/core';\nimport {getDOM} from '../../dom/dom_adapter';\n\n\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nexport class By {\n  /**\n   * Match all nodes.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n   */\n  static all(): Predicate<DebugNode> { return () => true; }\n\n  /**\n   * Match elements by the given CSS selector.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n   */\n  static css(selector: string): Predicate<DebugElement> {\n    return (debugElement) => {\n      return debugElement.nativeElement != null ?\n          getDOM().elementMatches(debugElement.nativeElement, selector) :\n          false;\n    };\n  }\n\n  /**\n   * Match nodes that have the given directive present.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n   */\n  static directive(type: Type<any>): Predicate<DebugNode> {\n    return (debugNode) => debugNode.providerTokens !.indexOf(type) !== -1;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */\nimport { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n/*@__PURE__*/ (function (NotificationKind) {\n    NotificationKind[\"NEXT\"] = \"N\";\n    NotificationKind[\"ERROR\"] = \"E\";\n    NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = /*@__PURE__*/ (function () {\n    function Notification(kind, value, error) {\n        this.kind = kind;\n        this.value = value;\n        this.error = error;\n        this.hasValue = kind === 'N';\n    }\n    Notification.prototype.observe = function (observer) {\n        switch (this.kind) {\n            case 'N':\n                return observer.next && observer.next(this.value);\n            case 'E':\n                return observer.error && observer.error(this.error);\n            case 'C':\n                return observer.complete && observer.complete();\n        }\n    };\n    Notification.prototype.do = function (next, error, complete) {\n        var kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return next && next(this.value);\n            case 'E':\n                return error && error(this.error);\n            case 'C':\n                return complete && complete();\n        }\n    };\n    Notification.prototype.accept = function (nextOrObserver, error, complete) {\n        if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n            return this.observe(nextOrObserver);\n        }\n        else {\n            return this.do(nextOrObserver, error, complete);\n        }\n    };\n    Notification.prototype.toObservable = function () {\n        var kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return of(this.value);\n            case 'E':\n                return throwError(this.error);\n            case 'C':\n                return empty();\n        }\n        throw new Error('unexpected notification kind value');\n    };\n    Notification.createNext = function (value) {\n        if (typeof value !== 'undefined') {\n            return new Notification('N', value);\n        }\n        return Notification.undefinedValueNotification;\n    };\n    Notification.createError = function (err) {\n        return new Notification('E', undefined, err);\n    };\n    Notification.createComplete = function () {\n        return Notification.completeNotification;\n    };\n    Notification.completeNotification = new Notification('C');\n    Notification.undefinedValueNotification = new Notification('N', undefined);\n    return Notification;\n}());\nexport { Notification };\n//# sourceMappingURL=Notification.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function getSymbolIterator() {\n    if (typeof Symbol !== 'function' || !Symbol.iterator) {\n        return '@@iterator';\n    }\n    return Symbol.iterator;\n}\nexport var iterator = /*@__PURE__*/ getSymbolIterator();\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function noop() { }\n//# sourceMappingURL=noop.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n    return function tapOperatorFunction(source) {\n        return source.lift(new DoOperator(nextOrObserver, error, complete));\n    };\n}\nvar DoOperator = /*@__PURE__*/ (function () {\n    function DoOperator(nextOrObserver, error, complete) {\n        this.nextOrObserver = nextOrObserver;\n        this.error = error;\n        this.complete = complete;\n    }\n    DoOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n    };\n    return DoOperator;\n}());\nvar TapSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TapSubscriber, _super);\n    function TapSubscriber(destination, observerOrNext, error, complete) {\n        var _this = _super.call(this, destination) || this;\n        _this._tapNext = noop;\n        _this._tapError = noop;\n        _this._tapComplete = noop;\n        _this._tapError = error || noop;\n        _this._tapComplete = complete || noop;\n        if (isFunction(observerOrNext)) {\n            _this._context = _this;\n            _this._tapNext = observerOrNext;\n        }\n        else if (observerOrNext) {\n            _this._context = observerOrNext;\n            _this._tapNext = observerOrNext.next || noop;\n            _this._tapError = observerOrNext.error || noop;\n            _this._tapComplete = observerOrNext.complete || noop;\n        }\n        return _this;\n    }\n    TapSubscriber.prototype._next = function (value) {\n        try {\n            this._tapNext.call(this._context, value);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(value);\n    };\n    TapSubscriber.prototype._error = function (err) {\n        try {\n            this._tapError.call(this._context, err);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.error(err);\n    };\n    TapSubscriber.prototype._complete = function () {\n        try {\n            this._tapComplete.call(this._context);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        return this.destination.complete();\n    };\n    return TapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=tap.js.map\n","export const LOADERS = {\n  'ball-8bits': 16,\n  'ball-atom': 4,\n  'ball-beat': 3,\n  'ball-circus': 5,\n  'ball-climbing-dot': 4,\n  'ball-clip-rotate': 1,\n  'ball-clip-rotate-multiple': 2,\n  'ball-clip-rotate-pulse': 2,\n  'ball-elastic-dots': 5,\n  'ball-fall': 3,\n  'ball-fussion': 4,\n  'ball-grid-beat': 9,\n  'ball-grid-pulse': 9,\n  'ball-newton-cradle': 4,\n  'ball-pulse': 3,\n  'ball-pulse-rise': 5,\n  'ball-pulse-sync': 3,\n  'ball-rotate': 1,\n  'ball-running-dots': 5,\n  'ball-scale': 1,\n  'ball-scale-multiple': 3,\n  'ball-scale-pulse': 2,\n  'ball-scale-ripple': 1,\n  'ball-scale-ripple-multiple': 3,\n  'ball-spin': 8,\n  'ball-spin-clockwise': 8,\n  'ball-spin-clockwise-fade': 8,\n  'ball-spin-clockwise-fade-rotating': 8,\n  'ball-spin-fade': 8,\n  'ball-spin-fade-rotating': 8,\n  'ball-spin-rotate': 2,\n  'ball-square-clockwise-spin': 8,\n  'ball-square-spin': 8,\n  'ball-triangle-path': 3,\n  'ball-zig-zag': 2,\n  'ball-zig-zag-deflect': 2,\n  'cog': 1,\n  'cube-transition': 2,\n  'fire': 3,\n  'line-scale': 5,\n  'line-scale-party': 5,\n  'line-scale-pulse-out': 5,\n  'line-scale-pulse-out-rapid': 5,\n  'line-spin-clockwise-fade': 8,\n  'line-spin-clockwise-fade-rotating': 8,\n  'line-spin-fade': 8,\n  'line-spin-fade-rotating': 8,\n  'pacman': 6,\n  'square-jelly-box': 2,\n  'square-loader': 1,\n  'square-spin': 1,\n  'timer': 1,\n  'triangle-skew-spin': 1\n};\n\nexport const DEFAULTS = {\n  BD_COLOR: 'rgba(51,51,51,0.8)',\n  SPINNER_COLOR: '#fff',\n  SPINNER_TYPE: 'ball-scale-multiple',\n  Z_INDEX: 99999,\n};\n\nexport const PRIMARY_SPINNER = 'primary';\n\nexport type Size = 'default' | 'small' | 'medium' | 'large';\n\nexport interface Spinner {\n  bdColor?: string;\n  size?: Size;\n  color?: string;\n  type?: string;\n  fullScreen?: boolean;\n  zIndex?: number;\n  template?: string;\n}\n\nexport class NgxSpinner {\n  name: string;\n  bdColor: string;\n  size: Size;\n  color: string;\n  type: string;\n  class: string;\n  divCount: number;\n  divArray: Array<number>;\n  fullScreen: boolean;\n  show: boolean;\n  zIndex: number;\n  template: string;\n\n  constructor(init?: Partial<NgxSpinner>) {\n    Object.assign(this, init);\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { NgxSpinner, PRIMARY_SPINNER, Spinner } from './ngx-spinner.enum';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class NgxSpinnerService {\n  /**\n   * Spinner observable\n   *\n   * @memberof NgxSpinnerService\n   */\n  private spinnerObservable = new ReplaySubject<NgxSpinner>(1);\n  /**\n   * Creates an instance of NgxSpinnerService.\n   * @memberof NgxSpinnerService\n   */\n  constructor() { }\n  /**\n  * Get subscription of desired spinner\n  * @memberof NgxSpinnerService\n  **/\n  getSpinner(name: string): Observable<NgxSpinner> {\n    return this.spinnerObservable.asObservable().pipe(filter((x: NgxSpinner) => x && x.name === name));\n  }\n  /**\n   * To show spinner\n   *\n   * @memberof NgxSpinnerService\n   */\n  show(name: string = PRIMARY_SPINNER, spinner?: Spinner) {\n    const showPromise = new Promise((resolve, _reject) => {\n      if (spinner && Object.keys(spinner).length) {\n        spinner['name'] = name;\n        this.spinnerObservable.next(new NgxSpinner({ ...spinner, show: true }));\n        resolve(true);\n      } else {\n        this.spinnerObservable.next(new NgxSpinner({ name, show: true }));\n        resolve(true);\n      }\n    });\n    return showPromise;\n  }\n  /**\n  * To hide spinner\n  *\n  * @memberof NgxSpinnerService\n  */\n  hide(name: string = PRIMARY_SPINNER, debounce: number = 0) {\n    const hidePromise = new Promise((resolve, _reject) => {\n      setTimeout(() => {\n        this.spinnerObservable.next(new NgxSpinner({ name, show: false }));\n        resolve(true);\n      }, debounce);\n    });\n    return hidePromise;\n  }\n}\n","import {\n  Component,\n  OnDestroy,\n  Input,\n  OnInit,\n  OnChanges,\n  SimpleChange,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef\n} from '@angular/core';\nimport { NgxSpinnerService } from './ngx-spinner.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { LOADERS, DEFAULTS, Size, NgxSpinner, PRIMARY_SPINNER } from './ngx-spinner.enum';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\n\n@Component({\n  selector: 'ngx-spinner',\n  templateUrl: 'ngx-spinner.component.html',\n  styleUrls: ['ngx-spinner.component.css'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  animations: [\n    trigger('fadeIn', [\n      state('in', style({ opacity: 1 })),\n      transition(':enter', [\n        style({ opacity: 0 }),\n        animate(300)\n      ]),\n      transition(':leave',\n        animate(200, style({ opacity: 0 })))\n    ])\n  ]\n})\nexport class NgxSpinnerComponent implements OnDestroy, OnInit, OnChanges {\n\n  /**\n   * To set backdrop color\n   * Only supports RGBA color format\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() bdColor: string;\n  /**\n   * To set spinner size\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() size: Size;\n  /**\n   * To set spinner color(DEFAULTS.SPINNER_COLOR)\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() color: string;\n  /**\n   * To set type of spinner\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() type: string;\n  /**\n   * To toggle fullscreen mode\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() fullScreen: boolean;\n  /**\n   * Spinner name\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() name: string;\n  /**\n   * z-index value\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() zIndex: number;\n  /**\n   * Custom template for spinner/loader\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  @Input() template: string;\n  /**\n   * Spinner Object\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  spinner: NgxSpinner = new NgxSpinner();\n  /**\n   * Array for spinner's divs\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  divArray: Array<number>;\n  /**\n   * Counter for div\n   *\n   * @memberof NgxSpinnerComponent\n   *\n   */\n  divCount: number;\n  /**\n   * Show spinner\n   *\n   * @memberof NgxSpinnerComponent\n  **/\n  show: boolean;\n  /**\n   * Unsubscribe from spinner's observable\n   *\n   * @memberof NgxSpinnerComponent\n  **/\n  ngUnsubscribe: Subject<void> = new Subject();\n\n  /**\n   * Creates an instance of NgxSpinnerComponent.\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  constructor(private spinnerService: NgxSpinnerService, private changeDetector: ChangeDetectorRef) {\n    this.bdColor = DEFAULTS.BD_COLOR;\n    this.zIndex = DEFAULTS.Z_INDEX;\n    this.color = DEFAULTS.SPINNER_COLOR;\n    this.type = DEFAULTS.SPINNER_TYPE;\n    this.size = 'large';\n    this.fullScreen = true;\n    this.name = PRIMARY_SPINNER;\n    this.template = null;\n\n    this.divArray = [];\n    this.divCount = 0;\n    this.show = false;\n  }\n  /**\n   * Initialization method\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  ngOnInit() {\n    this.setDefaultOptions();\n    this.spinnerService.getSpinner(this.name)\n      .pipe(\n        takeUntil(this.ngUnsubscribe)\n      )\n      .subscribe((spinner: NgxSpinner) => {\n        this.setDefaultOptions();\n        Object.assign(this.spinner, spinner);\n        if (spinner.show) {\n          this.onInputChange();\n        }\n        this.changeDetector.markForCheck();\n      });\n  }\n  /**\n   * To set default ngx-spinner options\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  setDefaultOptions = () => {\n    this.spinner = new NgxSpinner({\n      name: this.name,\n      bdColor: this.bdColor,\n      size: this.size,\n      color: this.color,\n      type: this.type,\n      fullScreen: this.fullScreen,\n      divArray: this.divArray,\n      divCount: this.divCount,\n      show: this.show,\n      zIndex: this.zIndex,\n      template: this.template,\n    });\n  }\n  /**\n   * On changes event for input variables\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  ngOnChanges(changes: { [propKey: string]: SimpleChange }) {\n    for (const propName in changes) {\n      if (propName) {\n        const changedProp = changes[propName];\n        if (changedProp.isFirstChange()) {\n          return;\n        } else if (typeof changedProp.currentValue !== 'undefined' && changedProp.currentValue !== changedProp.previousValue) {\n          if (changedProp.currentValue !== '') {\n            this.spinner[propName] = changedProp.currentValue;\n          }\n        }\n      }\n    }\n  }\n  /**\n   * To get class for spinner\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  getClass(type: string, size: Size): string {\n    this.spinner.divCount = LOADERS[type];\n    this.spinner.divArray = Array(this.spinner.divCount).fill(0).map((x, i) => i);\n    let sizeClass = '';\n    switch (size.toLowerCase()) {\n      case 'small':\n        sizeClass = 'la-sm';\n        break;\n      case 'medium':\n        sizeClass = 'la-2x';\n        break;\n      case 'large':\n        sizeClass = 'la-3x';\n        break;\n      default:\n        break;\n    }\n    return 'la-' + type + ' ' + sizeClass;\n  }\n  /**\n   * Check if input variables have changed\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  onInputChange() {\n    this.spinner.class = this.getClass(this.spinner.type, this.spinner.size);\n  }\n  /**\n   * Component destroy event\n   *\n   * @memberof NgxSpinnerComponent\n   */\n  ngOnDestroy() {\n    this.ngUnsubscribe.next();\n    this.ngUnsubscribe.complete();\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxSpinnerComponent } from './ngx-spinner.component';\n\n@NgModule({\n  imports: [\n    CommonModule\n  ],\n  declarations: [NgxSpinnerComponent],\n  exports: [NgxSpinnerComponent]\n})\nexport class NgxSpinnerModule { }\n","import moment = require('moment');\n\nexport class CmUtil {\n  static simpleSort(list: any[], sortProperty: string, direction: SORT_DIRECTION = SORT_DIRECTION.DESC): any[] {\n    try {\n      if (Array.isArray(list) && sortProperty) {\n        return list.sort((a, b) => {\n          let prop1 = a[sortProperty];\n          let prop2 = b[sortProperty];\n          if (prop1 && prop2) {\n            switch (direction) {\n              case SORT_DIRECTION.ASC:\n                return this.isNumber(prop1) && this.isNumber(prop2) ? prop1 - prop2 : prop1.localeCompare(prop2);\n              case SORT_DIRECTION.DESC:\n                return this.isNumber(prop1) && this.isNumber(prop2) ? prop2 - prop1 : prop2.localeCompare(prop1);\n              default:\n                break;\n            }\n          }\n          return -1;\n        });\n      }\n      return list;\n    } catch (error) {\n      console.error(error);\n      return list;\n    }\n  }\n\n  static isNumber(param: any): boolean {\n    return param ? typeof param === 'number' : false;\n  }\n\n  static formatDate(date, format = DEFAULT_DATE_FORMAT): string {\n    try {\n      return date ? moment(date).format(format) : date;\n    } catch (error) {\n      console.error(error);\n      return date;\n    }\n  }\n    public static  writeDownFile(csv, contentType, fileName){\n\n        const blob = new Blob([csv], { type: contentType });\n\n        console.log('start download:');\n        if (window.navigator.msSaveOrOpenBlob) {\n            window.navigator.msSaveBlob(blob, fileName);\n        }else {\n            var a = window.document.createElement(\"a\");\n            a.href = window.URL.createObjectURL(blob);\n            a.download = fileName;\n            document.body.appendChild(a);\n            a.click(); // IE: \"Access is denied\";\n            document.body.removeChild(a);\n        }\n    }\n    public static  CSVToArray (strData, strDelimiter) {\n\n        strDelimiter = (strDelimiter || \",\");\n\n        var objPattern = new RegExp(\n            (\n                \"(\\\\\" + strDelimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n                \"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n                \"([^\\\"\\\\\" + strDelimiter + \"\\\\r\\\\n]*))\"\n            ),\n            \"gi\"\n        );\n\n        var arrData = [[]];\n        var arrMatches = null;\n\n        while (arrMatches = objPattern.exec(strData)) {\n            var strMatchedDelimiter = arrMatches[1];\n            if (\n                strMatchedDelimiter.length &&\n                strMatchedDelimiter !== strDelimiter\n            ) {\n                arrData.push([]);\n            }\n            var strMatchedValue;\n            if (arrMatches[2]) {\n                strMatchedValue = arrMatches[2].replace(\n                    new RegExp(\"\\\"\\\"\", \"g\"),\n                    \"\\\"\"\n                );\n            } else {\n                strMatchedValue = arrMatches[3];\n            }\n            arrData[arrData.length - 1].push(strMatchedValue);\n        }\n\n        return (arrData);\n    }\n\n    static downloadFile(data: Response, fileName: string) {\n        let blob = data;//.blob();\n\n        if (window.navigator.msSaveOrOpenBlob)  // IE hack; see http://msdn.microsoft.com/en-us/library/ie/hh779016.aspx\n            window.navigator.msSaveBlob(blob, fileName);\n        else {\n            var a = window.document.createElement(\"a\");\n            a.href = window.URL.createObjectURL(blob);\n            a.download = fileName;\n            document.body.appendChild(a);\n            a.click();  // IE: \"Access is denied\"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access\n            document.body.removeChild(a);\n        }\n    }\n\n\n}\n\n\nexport const DEFAULT_DATE_FORMAT = 'DD.MM.YYYY HH:mm';\n\nexport enum SORT_DIRECTION {\n  ASC,\n  DESC\n}\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();\n//# sourceMappingURL=observable.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {\n    function ObjectUnsubscribedErrorImpl() {\n        Error.call(this);\n        this.message = 'object unsubscribed';\n        this.name = 'ObjectUnsubscribedError';\n        return this;\n    }\n    ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n    return ObjectUnsubscribedErrorImpl;\n})();\nexport var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./main.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!./main.css\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./main.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","export class SpinnerUtils {\n    static type: string = \"square-jelly-box\";\n    static text: string = \"\";\n    static color: string = \"grey\";\n    static bdColor: string = \"rgba(140,139,135,0.5)\";\n    static fullScreen: boolean = false;\n    static size: string = \"default\";\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nexport abstract class HttpHandler {\n  abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;\n}\n\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nexport abstract class HttpBackend implements HttpHandler {\n  abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\ninterface Update {\n  name: string;\n  value?: string|string[];\n  op: 'a'|'s'|'d';\n}\n\n/**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nexport class HttpHeaders {\n  /**\n   * Internal map of lowercase header names to values.\n   */\n  // TODO(issue/24571): remove '!'.\n  private headers !: Map<string, string[]>;\n\n\n  /**\n   * Internal map of lowercased header names to the normalized\n   * form of the name (the form seen first).\n   */\n  private normalizedNames: Map<string, string> = new Map();\n\n  /**\n   * Complete the lazy initialization of this object (needed before reading).\n   */\n  private lazyInit !: HttpHeaders | Function | null;\n\n  /**\n   * Queued updates to be materialized the next initialization.\n   */\n  private lazyUpdate: Update[]|null = null;\n\n  /**  Constructs a new HTTP header object with the given values.*/\n\n  constructor(headers?: string|{[name: string]: string | string[]}) {\n    if (!headers) {\n      this.headers = new Map<string, string[]>();\n    } else if (typeof headers === 'string') {\n      this.lazyInit = () => {\n        this.headers = new Map<string, string[]>();\n        headers.split('\\n').forEach(line => {\n          const index = line.indexOf(':');\n          if (index > 0) {\n            const name = line.slice(0, index);\n            const key = name.toLowerCase();\n            const value = line.slice(index + 1).trim();\n            this.maybeSetNormalizedName(name, key);\n            if (this.headers.has(key)) {\n              this.headers.get(key) !.push(value);\n            } else {\n              this.headers.set(key, [value]);\n            }\n          }\n        });\n      };\n    } else {\n      this.lazyInit = () => {\n        this.headers = new Map<string, string[]>();\n        Object.keys(headers).forEach(name => {\n          let values: string|string[] = headers[name];\n          const key = name.toLowerCase();\n          if (typeof values === 'string') {\n            values = [values];\n          }\n          if (values.length > 0) {\n            this.headers.set(key, values);\n            this.maybeSetNormalizedName(name, key);\n          }\n        });\n      };\n    }\n  }\n\n  /**\n   * Checks for existence of a given header.\n   *\n   * @param name The header name to check for existence.\n   *\n   * @returns True if the header exists, false otherwise.\n   */\n  has(name: string): boolean {\n    this.init();\n\n    return this.headers.has(name.toLowerCase());\n  }\n\n  /**\n   * Retrieves the first value of a given header.\n   *\n   * @param name The header name.\n   *\n   * @returns The value string if the header exists, null otherwise\n   */\n  get(name: string): string|null {\n    this.init();\n\n    const values = this.headers.get(name.toLowerCase());\n    return values && values.length > 0 ? values[0] : null;\n  }\n\n  /**\n   * Retrieves the names of the headers.\n   *\n   * @returns A list of header names.\n   */\n  keys(): string[] {\n    this.init();\n\n    return Array.from(this.normalizedNames.values());\n  }\n\n  /**\n   * Retrieves a list of values for a given header.\n   *\n   * @param name The header name from which to retrieve values.\n   *\n   * @returns A string of values if the header exists, null otherwise.\n   */\n  getAll(name: string): string[]|null {\n    this.init();\n\n    return this.headers.get(name.toLowerCase()) || null;\n  }\n\n  /**\n   * Appends a new value to the existing set of values for a header\n   * and returns them in a clone of the original instance.\n   *\n   * @param name The header name for which to append the value or values.\n   * @param value The new value or array of values.\n   *\n   * @returns A clone of the HTTP headers object with the value appended to the given header.\n   */\n\n  append(name: string, value: string|string[]): HttpHeaders {\n    return this.clone({name, value, op: 'a'});\n  }\n  /**\n   * Sets or modifies a value for a given header in a clone of the original instance.\n   * If the header already exists, its value is replaced with the given value\n   * in the returned object.\n   *\n   * @param name The header name.\n   * @param value The value or values to set or overide for the given header.\n   *\n   * @returns A clone of the HTTP headers object with the newly set header value.\n   */\n  set(name: string, value: string|string[]): HttpHeaders {\n    return this.clone({name, value, op: 's'});\n  }\n  /**\n   * Deletes values for a given header in a clone of the original instance.\n   *\n   * @param name The header name.\n   * @param value The value or values to delete for the given header.\n   *\n   * @returns A clone of the HTTP headers object with the given value deleted.\n   */\n  delete (name: string, value?: string|string[]): HttpHeaders {\n    return this.clone({name, value, op: 'd'});\n  }\n\n  private maybeSetNormalizedName(name: string, lcName: string): void {\n    if (!this.normalizedNames.has(lcName)) {\n      this.normalizedNames.set(lcName, name);\n    }\n  }\n\n  private init(): void {\n    if (!!this.lazyInit) {\n      if (this.lazyInit instanceof HttpHeaders) {\n        this.copyFrom(this.lazyInit);\n      } else {\n        this.lazyInit();\n      }\n      this.lazyInit = null;\n      if (!!this.lazyUpdate) {\n        this.lazyUpdate.forEach(update => this.applyUpdate(update));\n        this.lazyUpdate = null;\n      }\n    }\n  }\n\n  private copyFrom(other: HttpHeaders) {\n    other.init();\n    Array.from(other.headers.keys()).forEach(key => {\n      this.headers.set(key, other.headers.get(key) !);\n      this.normalizedNames.set(key, other.normalizedNames.get(key) !);\n    });\n  }\n\n  private clone(update: Update): HttpHeaders {\n    const clone = new HttpHeaders();\n    clone.lazyInit =\n        (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n    clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n    return clone;\n  }\n\n  private applyUpdate(update: Update): void {\n    const key = update.name.toLowerCase();\n    switch (update.op) {\n      case 'a':\n      case 's':\n        let value = update.value !;\n        if (typeof value === 'string') {\n          value = [value];\n        }\n        if (value.length === 0) {\n          return;\n        }\n        this.maybeSetNormalizedName(update.name, key);\n        const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n        base.push(...value);\n        this.headers.set(key, base);\n        break;\n      case 'd':\n        const toDelete = update.value as string | undefined;\n        if (!toDelete) {\n          this.headers.delete(key);\n          this.normalizedNames.delete(key);\n        } else {\n          let existing = this.headers.get(key);\n          if (!existing) {\n            return;\n          }\n          existing = existing.filter(value => toDelete.indexOf(value) === -1);\n          if (existing.length === 0) {\n            this.headers.delete(key);\n            this.normalizedNames.delete(key);\n          } else {\n            this.headers.set(key, existing);\n          }\n        }\n        break;\n    }\n  }\n\n  /**\n   * @internal\n   */\n  forEach(fn: (name: string, values: string[]) => void) {\n    this.init();\n    Array.from(this.normalizedNames.keys())\n        .forEach(key => fn(this.normalizedNames.get(key) !, this.headers.get(key) !));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A codec for encoding and decoding parameters in URLs.\n *\n * Used by `HttpParams`.\n *\n * @publicApi\n **/\nexport interface HttpParameterCodec {\n  encodeKey(key: string): string;\n  encodeValue(value: string): string;\n\n  decodeKey(key: string): string;\n  decodeValue(value: string): string;\n}\n\n/**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nexport class HttpUrlEncodingCodec implements HttpParameterCodec {\n  /**\n   * Encodes a key name for a URL parameter or query-string.\n   * @param key The key name.\n   * @returns The encoded key name.\n   */\n  encodeKey(key: string): string { return standardEncoding(key); }\n\n  /**\n   * Encodes the value of a URL parameter or query-string.\n   * @param value The value.\n   * @returns The encoded value.\n   */\n  encodeValue(value: string): string { return standardEncoding(value); }\n\n  /**\n   * Decodes an encoded URL parameter or query-string key.\n   * @param key The encoded key name.\n   * @returns The decoded key name.\n   */\n  decodeKey(key: string): string { return decodeURIComponent(key); }\n\n  /**\n   * Decodes an encoded URL parameter or query-string value.\n   * @param value The encoded value.\n   * @returns The decoded value.\n   */\n  decodeValue(value: string) { return decodeURIComponent(value); }\n}\n\n\nfunction paramParser(rawParams: string, codec: HttpParameterCodec): Map<string, string[]> {\n  const map = new Map<string, string[]>();\n  if (rawParams.length > 0) {\n    const params: string[] = rawParams.split('&');\n    params.forEach((param: string) => {\n      const eqIdx = param.indexOf('=');\n      const [key, val]: string[] = eqIdx == -1 ?\n          [codec.decodeKey(param), ''] :\n          [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n      const list = map.get(key) || [];\n      list.push(val);\n      map.set(key, list);\n    });\n  }\n  return map;\n}\nfunction standardEncoding(v: string): string {\n  return encodeURIComponent(v)\n      .replace(/%40/gi, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/gi, '$')\n      .replace(/%2C/gi, ',')\n      .replace(/%3B/gi, ';')\n      .replace(/%2B/gi, '+')\n      .replace(/%3D/gi, '=')\n      .replace(/%3F/gi, '?')\n      .replace(/%2F/gi, '/');\n}\n\ninterface Update {\n  param: string;\n  value?: string;\n  op: 'a'|'d'|'s';\n}\n\n/** Options used to construct an `HttpParams` instance.\n *\n * @publicApi\n */\nexport interface HttpParamsOptions {\n  /**\n   * String representation of the HTTP parameters in URL-query-string format.\n   * Mutually exclusive with `fromObject`.\n   */\n  fromString?: string;\n\n  /** Object map of the HTTP parameters. Mutually exclusive with `fromString`. */\n  fromObject?: {[param: string]: string | ReadonlyArray<string>};\n\n  /** Encoding codec used to parse and serialize the parameters. */\n  encoder?: HttpParameterCodec;\n}\n\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nexport class HttpParams {\n  private map: Map<string, string[]>|null;\n  private encoder: HttpParameterCodec;\n  private updates: Update[]|null = null;\n  private cloneFrom: HttpParams|null = null;\n\n  constructor(options: HttpParamsOptions = {} as HttpParamsOptions) {\n    this.encoder = options.encoder || new HttpUrlEncodingCodec();\n    if (!!options.fromString) {\n      if (!!options.fromObject) {\n        throw new Error(`Cannot specify both fromString and fromObject.`);\n      }\n      this.map = paramParser(options.fromString, this.encoder);\n    } else if (!!options.fromObject) {\n      this.map = new Map<string, string[]>();\n      Object.keys(options.fromObject).forEach(key => {\n        const value = (options.fromObject as any)[key];\n        this.map !.set(key, Array.isArray(value) ? value : [value]);\n      });\n    } else {\n      this.map = null;\n    }\n  }\n\n  /**\n   * Reports whether the body includes one or more values for a given parameter.\n   * @param param The parameter name.\n   * @returns True if the parameter has one or more values,\n   * false if it has no value or is not present.\n   */\n  has(param: string): boolean {\n    this.init();\n    return this.map !.has(param);\n  }\n\n  /**\n   * Retrieves the first value for a parameter.\n   * @param param The parameter name.\n   * @returns The first value of the given parameter,\n   * or `null` if the parameter is not present.\n   */\n  get(param: string): string|null {\n    this.init();\n    const res = this.map !.get(param);\n    return !!res ? res[0] : null;\n  }\n\n  /**\n   * Retrieves all values for a  parameter.\n   * @param param The parameter name.\n   * @returns All values in a string array,\n   * or `null` if the parameter not present.\n   */\n  getAll(param: string): string[]|null {\n    this.init();\n    return this.map !.get(param) || null;\n  }\n\n  /**\n   * Retrieves all the parameters for this body.\n   * @returns The parameter names in a string array.\n   */\n  keys(): string[] {\n    this.init();\n    return Array.from(this.map !.keys());\n  }\n\n  /**\n   * Appends a new value to existing values for a parameter.\n   * @param param The parameter name.\n   * @param value The new value to add.\n   * @return A new body with the appended value.\n   */\n  append(param: string, value: string): HttpParams { return this.clone({param, value, op: 'a'}); }\n\n  /**\n   * Replaces the value for a parameter.\n   * @param param The parameter name.\n   * @param value The new value.\n   * @return A new body with the new value.\n   */\n  set(param: string, value: string): HttpParams { return this.clone({param, value, op: 's'}); }\n\n  /**\n   * Removes a given value or all values from a parameter.\n   * @param param The parameter name.\n   * @param value The value to remove, if provided.\n   * @return A new body with the given value removed, or with all values\n   * removed if no value is specified.\n   */\n  delete (param: string, value?: string): HttpParams { return this.clone({param, value, op: 'd'}); }\n\n  /**\n   * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n   * separated by `&`s.\n   */\n  toString(): string {\n    this.init();\n    return this.keys()\n        .map(key => {\n          const eKey = this.encoder.encodeKey(key);\n          return this.map !.get(key) !.map(value => eKey + '=' + this.encoder.encodeValue(value))\n              .join('&');\n        })\n        .join('&');\n  }\n\n  private clone(update: Update): HttpParams {\n    const clone = new HttpParams({ encoder: this.encoder } as HttpParamsOptions);\n    clone.cloneFrom = this.cloneFrom || this;\n    clone.updates = (this.updates || []).concat([update]);\n    return clone;\n  }\n\n  private init() {\n    if (this.map === null) {\n      this.map = new Map<string, string[]>();\n    }\n    if (this.cloneFrom !== null) {\n      this.cloneFrom.init();\n      this.cloneFrom.keys().forEach(key => this.map !.set(key, this.cloneFrom !.map !.get(key) !));\n      this.updates !.forEach(update => {\n        switch (update.op) {\n          case 'a':\n          case 's':\n            const base = (update.op === 'a' ? this.map !.get(update.param) : undefined) || [];\n            base.push(update.value !);\n            this.map !.set(update.param, base);\n            break;\n          case 'd':\n            if (update.value !== undefined) {\n              let base = this.map !.get(update.param) || [];\n              const idx = base.indexOf(update.value);\n              if (idx !== -1) {\n                base.splice(idx, 1);\n              }\n              if (base.length > 0) {\n                this.map !.set(update.param, base);\n              } else {\n                this.map !.delete(update.param);\n              }\n            } else {\n              this.map !.delete(update.param);\n              break;\n            }\n        }\n      });\n      this.cloneFrom = this.updates = null;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\n\n/**\n * Construction interface for `HttpRequest`s.\n *\n * All values are optional and will override default values if provided.\n */\ninterface HttpRequestInit {\n  headers?: HttpHeaders;\n  reportProgress?: boolean;\n  params?: HttpParams;\n  responseType?: 'arraybuffer'|'blob'|'json'|'text';\n  withCredentials?: boolean;\n}\n\n/**\n * Determine whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method: string): boolean {\n  switch (method) {\n    case 'DELETE':\n    case 'GET':\n    case 'HEAD':\n    case 'OPTIONS':\n    case 'JSONP':\n      return false;\n    default:\n      return true;\n  }\n}\n\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value: any): value is ArrayBuffer {\n  return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value: any): value is Blob {\n  return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value: any): value is FormData {\n  return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nexport class HttpRequest<T> {\n  /**\n   * The request body, or `null` if one isn't set.\n   *\n   * Bodies are not enforced to be immutable, as they can include a reference to any\n   * user-defined data type. However, interceptors should take care to preserve\n   * idempotence by treating them as such.\n   */\n  readonly body: T|null = null;\n\n  /**\n   * Outgoing headers for this request.\n   */\n  // TODO(issue/24571): remove '!'.\n  readonly headers !: HttpHeaders;\n\n  /**\n   * Whether this request should be made in a way that exposes progress events.\n   *\n   * Progress events are expensive (change detection runs on each event) and so\n   * they should only be requested if the consumer intends to monitor them.\n   */\n  readonly reportProgress: boolean = false;\n\n  /**\n   * Whether this request should be sent with outgoing credentials (cookies).\n   */\n  readonly withCredentials: boolean = false;\n\n  /**\n   * The expected response type of the server.\n   *\n   * This is used to parse the response appropriately before returning it to\n   * the requestee.\n   */\n  readonly responseType: 'arraybuffer'|'blob'|'json'|'text' = 'json';\n\n  /**\n   * The outgoing HTTP request method.\n   */\n  readonly method: string;\n\n  /**\n   * Outgoing URL parameters.\n   */\n  // TODO(issue/24571): remove '!'.\n  readonly params !: HttpParams;\n\n  /**\n   * The outgoing URL with all URL parameters set.\n   */\n  readonly urlWithParams: string;\n\n  constructor(method: 'DELETE'|'GET'|'HEAD'|'JSONP'|'OPTIONS', url: string, init?: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  });\n  constructor(method: 'POST'|'PUT'|'PATCH', url: string, body: T|null, init?: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  });\n  constructor(method: string, url: string, body: T|null, init?: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  });\n  constructor(\n      method: string, readonly url: string, third?: T|{\n        headers?: HttpHeaders,\n        reportProgress?: boolean,\n        params?: HttpParams,\n        responseType?: 'arraybuffer'|'blob'|'json'|'text',\n        withCredentials?: boolean,\n      }|null,\n      fourth?: {\n        headers?: HttpHeaders,\n        reportProgress?: boolean,\n        params?: HttpParams,\n        responseType?: 'arraybuffer'|'blob'|'json'|'text',\n        withCredentials?: boolean,\n      }) {\n    this.method = method.toUpperCase();\n    // Next, need to figure out which argument holds the HttpRequestInit\n    // options, if any.\n    let options: HttpRequestInit|undefined;\n\n    // Check whether a body argument is expected. The only valid way to omit\n    // the body argument is to use a known no-body method like GET.\n    if (mightHaveBody(this.method) || !!fourth) {\n      // Body is the third argument, options are the fourth.\n      this.body = (third !== undefined) ? third as T : null;\n      options = fourth;\n    } else {\n      // No body required, options are the third argument. The body stays null.\n      options = third as HttpRequestInit;\n    }\n\n    // If options have been passed, interpret them.\n    if (options) {\n      // Normalize reportProgress and withCredentials.\n      this.reportProgress = !!options.reportProgress;\n      this.withCredentials = !!options.withCredentials;\n\n      // Override default response type of 'json' if one is provided.\n      if (!!options.responseType) {\n        this.responseType = options.responseType;\n      }\n\n      // Override headers if they're provided.\n      if (!!options.headers) {\n        this.headers = options.headers;\n      }\n\n      if (!!options.params) {\n        this.params = options.params;\n      }\n    }\n\n    // If no headers have been passed in, construct a new HttpHeaders instance.\n    if (!this.headers) {\n      this.headers = new HttpHeaders();\n    }\n\n    // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n    if (!this.params) {\n      this.params = new HttpParams();\n      this.urlWithParams = url;\n    } else {\n      // Encode the parameters to a string in preparation for inclusion in the URL.\n      const params = this.params.toString();\n      if (params.length === 0) {\n        // No parameters, the visible URL is just the URL given at creation time.\n        this.urlWithParams = url;\n      } else {\n        // Does the URL already have query parameters? Look for '?'.\n        const qIdx = url.indexOf('?');\n        // There are 3 cases to handle:\n        // 1) No existing parameters -> append '?' followed by params.\n        // 2) '?' exists and is followed by existing query string ->\n        //    append '&' followed by params.\n        // 3) '?' exists at the end of the url -> append params directly.\n        // This basically amounts to determining the character, if any, with\n        // which to join the URL and parameters.\n        const sep: string = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n        this.urlWithParams = url + sep + params;\n      }\n    }\n  }\n\n  /**\n   * Transform the free-form body into a serialized format suitable for\n   * transmission to the server.\n   */\n  serializeBody(): ArrayBuffer|Blob|FormData|string|null {\n    // If no body is present, no need to serialize it.\n    if (this.body === null) {\n      return null;\n    }\n    // Check whether the body is already in a serialized form. If so,\n    // it can just be returned directly.\n    if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n        typeof this.body === 'string') {\n      return this.body;\n    }\n    // Check whether the body is an instance of HttpUrlEncodedParams.\n    if (this.body instanceof HttpParams) {\n      return this.body.toString();\n    }\n    // Check whether the body is an object or array, and serialize with JSON if so.\n    if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n        Array.isArray(this.body)) {\n      return JSON.stringify(this.body);\n    }\n    // Fall back on toString() for everything else.\n    return (this.body as any).toString();\n  }\n\n  /**\n   * Examine the body and attempt to infer an appropriate MIME type\n   * for it.\n   *\n   * If no such type can be inferred, this method will return `null`.\n   */\n  detectContentTypeHeader(): string|null {\n    // An empty body has no content type.\n    if (this.body === null) {\n      return null;\n    }\n    // FormData bodies rely on the browser's content type assignment.\n    if (isFormData(this.body)) {\n      return null;\n    }\n    // Blobs usually have their own content type. If it doesn't, then\n    // no type can be inferred.\n    if (isBlob(this.body)) {\n      return this.body.type || null;\n    }\n    // Array buffers have unknown contents and thus no type can be inferred.\n    if (isArrayBuffer(this.body)) {\n      return null;\n    }\n    // Technically, strings could be a form of JSON data, but it's safe enough\n    // to assume they're plain strings.\n    if (typeof this.body === 'string') {\n      return 'text/plain';\n    }\n    // `HttpUrlEncodedParams` has its own content-type.\n    if (this.body instanceof HttpParams) {\n      return 'application/x-www-form-urlencoded;charset=UTF-8';\n    }\n    // Arrays, objects, and numbers will be encoded as JSON.\n    if (typeof this.body === 'object' || typeof this.body === 'number' ||\n        Array.isArray(this.body)) {\n      return 'application/json';\n    }\n    // No type could be inferred.\n    return null;\n  }\n\n  clone(): HttpRequest<T>;\n  clone(update: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n    body?: T|null,\n    method?: string,\n    url?: string,\n    setHeaders?: {[name: string]: string | string[]},\n    setParams?: {[param: string]: string},\n  }): HttpRequest<T>;\n  clone<V>(update: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n    body?: V|null,\n    method?: string,\n    url?: string,\n    setHeaders?: {[name: string]: string | string[]},\n    setParams?: {[param: string]: string},\n  }): HttpRequest<V>;\n  clone(update: {\n    headers?: HttpHeaders,\n    reportProgress?: boolean,\n    params?: HttpParams,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n    body?: any|null,\n    method?: string,\n    url?: string,\n    setHeaders?: {[name: string]: string | string[]},\n    setParams?: {[param: string]: string};\n  } = {}): HttpRequest<any> {\n    // For method, url, and responseType, take the current value unless\n    // it is overridden in the update hash.\n    const method = update.method || this.method;\n    const url = update.url || this.url;\n    const responseType = update.responseType || this.responseType;\n\n    // The body is somewhat special - a `null` value in update.body means\n    // whatever current body is present is being overridden with an empty\n    // body, whereas an `undefined` value in update.body implies no\n    // override.\n    const body = (update.body !== undefined) ? update.body : this.body;\n\n    // Carefully handle the boolean options to differentiate between\n    // `false` and `undefined` in the update args.\n    const withCredentials =\n        (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n    const reportProgress =\n        (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n\n    // Headers and params may be appended to if `setHeaders` or\n    // `setParams` are used.\n    let headers = update.headers || this.headers;\n    let params = update.params || this.params;\n\n    // Check whether the caller has asked to add headers.\n    if (update.setHeaders !== undefined) {\n      // Set every requested header.\n      headers =\n          Object.keys(update.setHeaders)\n              .reduce((headers, name) => headers.set(name, update.setHeaders ![name]), headers);\n    }\n\n    // Check whether the caller has asked to set params.\n    if (update.setParams) {\n      // Set every requested param.\n      params = Object.keys(update.setParams)\n                   .reduce((params, param) => params.set(param, update.setParams ![param]), params);\n    }\n\n    // Finally, construct the new HttpRequest using the pieces from above.\n    return new HttpRequest(\n        method, url, body, {\n                               params, headers, reportProgress, responseType, withCredentials,\n                           });\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HttpHeaders} from './headers';\n\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nexport enum HttpEventType {\n  /**\n   * The request was sent out over the wire.\n   */\n  Sent,\n\n  /**\n   * An upload progress event was received.\n   */\n  UploadProgress,\n\n  /**\n   * The response status code and headers were received.\n   */\n  ResponseHeader,\n\n  /**\n   * A download progress event was received.\n   */\n  DownloadProgress,\n\n  /**\n   * The full response including the body was received.\n   */\n  Response,\n\n  /**\n   * A custom event from an interceptor or a backend.\n   */\n  User,\n}\n\n/**\n * Base interface for progress events.\n *\n * @publicApi\n */\nexport interface HttpProgressEvent {\n  /**\n   * Progress event type is either upload or download.\n   */\n  type: HttpEventType.DownloadProgress|HttpEventType.UploadProgress;\n\n  /**\n   * Number of bytes uploaded or downloaded.\n   */\n  loaded: number;\n\n  /**\n   * Total number of bytes to upload or download. Depending on the request or\n   * response, this may not be computable and thus may not be present.\n   */\n  total?: number;\n}\n\n/**\n * A download progress event.\n *\n * @publicApi\n */\nexport interface HttpDownloadProgressEvent extends HttpProgressEvent {\n  type: HttpEventType.DownloadProgress;\n\n  /**\n   * The partial response body as downloaded so far.\n   *\n   * Only present if the responseType was `text`.\n   */\n  partialText?: string;\n}\n\n/**\n * An upload progress event.\n *\n * @publicApi\n */\nexport interface HttpUploadProgressEvent extends HttpProgressEvent {\n  type: HttpEventType.UploadProgress;\n}\n\n/**\n * An event indicating that the request was sent to the server. Useful\n * when a request may be retried multiple times, to distinguish between\n * retries on the final event stream.\n *\n * @publicApi\n */\nexport interface HttpSentEvent { type: HttpEventType.Sent; }\n\n/**\n * A user-defined event.\n *\n * Grouping all custom events under this type ensures they will be handled\n * and forwarded by all implementations of interceptors.\n *\n * @publicApi\n */\nexport interface HttpUserEvent<T> { type: HttpEventType.User; }\n\n/**\n * An error that represents a failed attempt to JSON.parse text coming back\n * from the server.\n *\n * It bundles the Error object with the actual response body that failed to parse.\n *\n *\n */\nexport interface HttpJsonParseError {\n  error: Error;\n  text: string;\n}\n\n/**\n * Union type for all possible events on the response stream.\n *\n * Typed according to the expected type of the response.\n *\n * @publicApi\n */\nexport type HttpEvent<T> =\n    HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;\n\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nexport abstract class HttpResponseBase {\n  /**\n   * All response headers.\n   */\n  readonly headers: HttpHeaders;\n\n  /**\n   * Response status code.\n   */\n  readonly status: number;\n\n  /**\n   * Textual description of response status code.\n   *\n   * Do not depend on this.\n   */\n  readonly statusText: string;\n\n  /**\n   * URL of the resource retrieved, or null if not available.\n   */\n  readonly url: string|null;\n\n  /**\n   * Whether the status code falls in the 2xx range.\n   */\n  readonly ok: boolean;\n\n  /**\n   * Type of the response, narrowed to either the full response or the header.\n   */\n  // TODO(issue/24571): remove '!'.\n  readonly type !: HttpEventType.Response | HttpEventType.ResponseHeader;\n\n  /**\n   * Super-constructor for all responses.\n   *\n   * The single parameter accepted is an initialization hash. Any properties\n   * of the response passed there will override the default values.\n   */\n  constructor(\n      init: {\n        headers?: HttpHeaders,\n        status?: number,\n        statusText?: string,\n        url?: string,\n      },\n      defaultStatus: number = 200, defaultStatusText: string = 'OK') {\n    // If the hash has values passed, use them to initialize the response.\n    // Otherwise use the default values.\n    this.headers = init.headers || new HttpHeaders();\n    this.status = init.status !== undefined ? init.status : defaultStatus;\n    this.statusText = init.statusText || defaultStatusText;\n    this.url = init.url || null;\n\n    // Cache the ok value to avoid defining a getter.\n    this.ok = this.status >= 200 && this.status < 300;\n  }\n}\n\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nexport class HttpHeaderResponse extends HttpResponseBase {\n  /**\n   * Create a new `HttpHeaderResponse` with the given parameters.\n   */\n  constructor(init: {\n    headers?: HttpHeaders,\n    status?: number,\n    statusText?: string,\n    url?: string,\n  } = {}) {\n    super(init);\n  }\n\n  readonly type: HttpEventType.ResponseHeader = HttpEventType.ResponseHeader;\n\n  /**\n   * Copy this `HttpHeaderResponse`, overriding its contents with the\n   * given parameter hash.\n   */\n  clone(update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string;} = {}):\n      HttpHeaderResponse {\n    // Perform a straightforward initialization of the new HttpHeaderResponse,\n    // overriding the current parameters with new ones if given.\n    return new HttpHeaderResponse({\n      headers: update.headers || this.headers,\n      status: update.status !== undefined ? update.status : this.status,\n      statusText: update.statusText || this.statusText,\n      url: update.url || this.url || undefined,\n    });\n  }\n}\n\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nexport class HttpResponse<T> extends HttpResponseBase {\n  /**\n   * The response body, or `null` if one was not returned.\n   */\n  readonly body: T|null;\n\n  /**\n   * Construct a new `HttpResponse`.\n   */\n  constructor(init: {\n    body?: T | null, headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n  } = {}) {\n    super(init);\n    this.body = init.body !== undefined ? init.body : null;\n  }\n\n  readonly type: HttpEventType.Response = HttpEventType.Response;\n\n  clone(): HttpResponse<T>;\n  clone(update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string;}):\n      HttpResponse<T>;\n  clone<V>(update: {\n    body?: V | null, headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n  }): HttpResponse<V>;\n  clone(update: {\n    body?: any | null; headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n  } = {}): HttpResponse<any> {\n    return new HttpResponse<any>({\n      body: (update.body !== undefined) ? update.body : this.body,\n      headers: update.headers || this.headers,\n      status: (update.status !== undefined) ? update.status : this.status,\n      statusText: update.statusText || this.statusText,\n      url: update.url || this.url || undefined,\n    });\n  }\n}\n\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nexport class HttpErrorResponse extends HttpResponseBase implements Error {\n  readonly name = 'HttpErrorResponse';\n  readonly message: string;\n  readonly error: any|null;\n\n  /**\n   * Errors are never okay, even when the status code is in the 2xx success range.\n   */\n  readonly ok = false;\n\n  constructor(init: {\n    error?: any; headers?: HttpHeaders; status?: number; statusText?: string; url?: string;\n  }) {\n    // Initialize with a default status of 0 / Unknown Error.\n    super(init, 0, 'Unknown Error');\n\n    // If the response was successful, then this was a parse error. Otherwise, it was\n    // a protocol-level failure of some sort. Either the request failed in transit\n    // or the server returned an unsuccessful status code.\n    if (this.status >= 200 && this.status < 300) {\n      this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n    } else {\n      this.message =\n          `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n    }\n    this.error = init.error || null;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Observable, of } from 'rxjs';\nimport {concatMap, filter, map} from 'rxjs/operators';\n\nimport {HttpHandler} from './backend';\nimport {HttpHeaders} from './headers';\nimport {HttpParams, HttpParamsOptions} from './params';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\n\n\n/**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody<T>(\n    options: {\n      headers?: HttpHeaders | {[header: string]: string | string[]},\n      observe?: HttpObserve,\n      params?: HttpParams | {[param: string]: string | string[]},\n      reportProgress?: boolean,\n      responseType?: 'arraybuffer' | 'blob' | 'json' | 'text',\n      withCredentials?: boolean,\n    },\n    body: T | null): any {\n  return {\n    body,\n    headers: options.headers,\n    observe: options.observe,\n    params: options.params,\n    reportProgress: options.reportProgress,\n    responseType: options.responseType,\n    withCredentials: options.withCredentials,\n  };\n}\n\nexport type HttpObserve = 'body' | 'events' | 'response';\n\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n *  // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n *  const params = new HttpParams({fromString: 'name=term'});\n *    return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n *  return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`;   // PATCH api/heroes/42\n *  return this.httpClient.patch(url, {name: heroName}, httpOptions)\n *    .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n *\n * @publicApi\n */\n@Injectable()\nexport class HttpClient {\n  constructor(private handler: HttpHandler) {}\n\n  /**\n   * Sends an `HTTPRequest` and returns a stream of `HTTPEvents`.\n   *\n   * @return An `Observable` of the response, with the response body as a stream of `HTTPEvents`.\n   */\n  request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;\n\n  /**\n   * Constructs a request that interprets the body as an `ArrayBuffer` and returns the response in an\n   * `ArrayBuffer`.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a request that interprets the body as a blob and returns\n   * the response as a blob.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type `Blob`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a request that interprets the body as a text string and\n   * returns a string value.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a request that interprets the body as an `ArrayBuffer` and returns the\n   * the full event stream.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as an array of `HTTPEvents` for the\n   * request.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    params?: HttpParams|{[param: string]: string | string[]},\n    observe: 'events', reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a request that interprets the body as a `Blob` and returns\n   * the full event stream.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of of all `HttpEvents` for the request,\n   * with the response body of type `Blob`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a request which interprets the body as a text string and returns the full event stream.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HttpEvents` for the reques,\n   * with the response body of type string.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the  request.\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   *  with the response body of type `Object`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    reportProgress?: boolean,\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<any>>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body of type `R`.\n   */\n  request<R>(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    reportProgress?: boolean,\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<R>>;\n\n  /**\n   * Constructs a request which interprets the body as an `ArrayBuffer`\n   * and returns the full `HTTPResponse`.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body as an `ArrayBuffer`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a request which interprets the body as a `Blob` and returns the full `HTTPResponse`.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of type `Blob`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a request which interprets the body as a text stream and returns the full `HTTPResponse`.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the HTTP response, with the response body of type string.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object and returns the full `HTTPResponse`.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the full `HTTPResponse`,\n   * with the response body of type `Object`.\n   */\n  request(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    reportProgress?: boolean,\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object and returns\n   * the full `HTTPResponse` with the response body in the requested type.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return  An `Observable` of the full `HTTPResponse`, with the response body of type `R`.\n   */\n  request<R>(method: string, url: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    reportProgress?: boolean,\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<R>>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object and returns the full\n   * `HTTPResponse` as a JSON object.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of type `Object`.\n   */\n  request(method: string, url: string, options?: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    reportProgress?: boolean,\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a request which interprets the body as a JSON object\n   * with the response body of the requested type.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of type `R`.\n   */\n  request<R>(method: string, url: string, options?: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    responseType?: 'json',\n    reportProgress?: boolean,\n    withCredentials?: boolean,\n  }): Observable<R>;\n\n  /**\n   * Constructs a request where response type and requested observable are not known statically.\n   *\n   * @param method  The HTTP method.\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the reuested response, wuth body of type `any`.\n   */\n  request(method: string, url: string, options?: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    params?: HttpParams|{[param: string]: string | string[]},\n    observe?: HttpObserve,\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  }): Observable<any>;\n\n  /**\n   * Constructs an observable for a generic HTTP request that, when subscribed,\n   * fires the request through the chain of registered interceptors and on to the\n   * server.\n   *\n   * You can pass an `HttpRequest` directly as the only parameter. In this case,\n   * the call returns an observable of the raw `HttpEvent` stream.\n   *\n   * Alternatively you can pass an HTTP method as the first parameter,\n   * a URL string as the second, and an options hash containing the request body as the third.\n   * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n   * type of returned observable.\n   *   * The `responseType` value determines how a successful response body is parsed.\n   *   * If `responseType` is the default `json`, you can pass a type interface for the resulting\n   * object as a type parameter to the call.\n   *\n   * The `observe` value determines the return type, according to what you are interested in\n   * observing.\n   *   * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n   * progress events by default.\n   *   * An `observe` value of response returns an observable of `HttpResponse<T>`,\n   * where the `T` parameter depends on the `responseType` and any optionally provided type\n   * parameter.\n   *   * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n   *\n   */\n  request(first: string|HttpRequest<any>, url?: string, options: {\n    body?: any,\n    headers?: HttpHeaders|{[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    let req: HttpRequest<any>;\n    // First, check whether the primary argument is an instance of `HttpRequest`.\n    if (first instanceof HttpRequest) {\n      // It is. The other arguments must be undefined (per the signatures) and can be\n      // ignored.\n      req = first as HttpRequest<any>;\n    } else {\n      // It's a string, so it represents a URL. Construct a request based on it,\n      // and incorporate the remaining arguments (assuming `GET` unless a method is\n      // provided.\n\n      // Figure out the headers.\n      let headers: HttpHeaders|undefined = undefined;\n      if (options.headers instanceof HttpHeaders) {\n        headers = options.headers;\n      } else {\n        headers = new HttpHeaders(options.headers);\n      }\n\n      // Sort out parameters.\n      let params: HttpParams|undefined = undefined;\n      if (!!options.params) {\n        if (options.params instanceof HttpParams) {\n          params = options.params;\n        } else {\n          params = new HttpParams({ fromObject: options.params } as HttpParamsOptions);\n        }\n      }\n\n      // Construct the request.\n      req = new HttpRequest(first, url !, (options.body !== undefined ? options.body : null), {\n        headers,\n        params,\n        reportProgress: options.reportProgress,\n        // By default, JSON is assumed to be returned for all calls.\n        responseType: options.responseType || 'json',\n        withCredentials: options.withCredentials,\n      });\n    }\n\n    // Start with an Observable.of() the initial request, and run the handler (which\n    // includes all interceptors) inside a concatMap(). This way, the handler runs\n    // inside an Observable chain, which causes interceptors to be re-run on every\n    // subscription (this also makes retries re-run the handler, including interceptors).\n    const events$: Observable<HttpEvent<any>> =\n        of (req).pipe(concatMap((req: HttpRequest<any>) => this.handler.handle(req)));\n\n    // If coming via the API signature which accepts a previously constructed HttpRequest,\n    // the only option is to get the event stream. Otherwise, return the event stream if\n    // that is what was requested.\n    if (first instanceof HttpRequest || options.observe === 'events') {\n      return events$;\n    }\n\n    // The requested stream contains either the full response or the body. In either\n    // case, the first step is to filter the event stream to extract a stream of\n    // responses(s).\n    const res$: Observable<HttpResponse<any>> = <Observable<HttpResponse<any>>>events$.pipe(\n        filter((event: HttpEvent<any>) => event instanceof HttpResponse));\n\n    // Decide which stream to return.\n    switch (options.observe || 'body') {\n      case 'body':\n        // The requested stream is the body. Map the response stream to the response\n        // body. This could be done more simply, but a misbehaving interceptor might\n        // transform the response body into a different format and ignore the requested\n        // responseType. Guard against this by validating that the response is of the\n        // requested type.\n        switch (req.responseType) {\n          case 'arraybuffer':\n            return res$.pipe(map((res: HttpResponse<any>) => {\n              // Validate that the body is an ArrayBuffer.\n              if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n                throw new Error('Response is not an ArrayBuffer.');\n              }\n              return res.body;\n            }));\n          case 'blob':\n            return res$.pipe(map((res: HttpResponse<any>) => {\n              // Validate that the body is a Blob.\n              if (res.body !== null && !(res.body instanceof Blob)) {\n                throw new Error('Response is not a Blob.');\n              }\n              return res.body;\n            }));\n          case 'text':\n            return res$.pipe(map((res: HttpResponse<any>) => {\n              // Validate that the body is a string.\n              if (res.body !== null && typeof res.body !== 'string') {\n                throw new Error('Response is not a string.');\n              }\n              return res.body;\n            }));\n          case 'json':\n          default:\n            // No validation needed for JSON responses, as they can be of any type.\n            return res$.pipe(map((res: HttpResponse<any>) => res.body));\n        }\n      case 'response':\n        // The response stream was requested directly, so return it.\n        return res$;\n      default:\n        // Guard against new future observe types being added.\n        throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n    }\n  }\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`\n   *  and returns the response as an `ArrayBuffer`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return  An `Observable` of the response body as an `ArrayBuffer`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a `Blob` and returns\n   * the response as a `Blob`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response body as a `Blob`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a text string and returns\n   * a string.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`\n   *  and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HTTPEvents` for the request,\n   * with response body as an `ArrayBuffer`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a `Blob`\n   *  and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all the `HTTPEvents` for the request, with the response body as a\n   * `Blob`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a text string\n   * and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HTTPEvents` for the request, with the response\n   *  body of type string.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HTTPEvents` for the request, with response body of\n   * type `Object`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a `DELETE`request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all the `HTTPEvents` for the request, with a response\n   * body in the requested type.\n   */\n  delete<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer` and returns\n   *  the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the full `HTTPResponse`, with the response body as an `ArrayBuffer`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a `Blob` and returns the full\n   * `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of type `Blob`.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a text stream and\n   *  returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the full `HTTPResponse`, with the response body of type string.\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `DELETE` request the interprets the body as a JSON object and returns\n   * the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of type `Object`.\n   *\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with the response body of the requested type.\n   */\n  delete<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `DELETE` request that interprets the body as a JSON object and\n   * returns the response body as a JSON object.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type `Object`.\n   */\n  delete (url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a DELETE request that interprets the body as a JSON object and returns\n   * the response in a given type.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with response body in the requested type.\n   */\n  delete<T>(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `DELETE` request to execute on the server. See the individual overloads for\n   * details on the return type.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   */\n  delete (url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('DELETE', url, options as any);\n  }\n\n\n  /**\n   * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns the response in\n   *  an `ArrayBuffer`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a `Blob`\n   * and returns the response as a `Blob`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a text string\n   * and returns the response as a string value.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns\n   *  the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HttpEvents` for the request, with the response\n   * body as an `ArrayBuffer`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a `Blob` and\n   * returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a text string and returns\n   * the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type `Object`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with a response body in the requested type.\n   */\n  get<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a `Blob` and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   *  with the response body as a `Blob`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a text stream and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body of type string.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the full `HttpResponse`,\n   * with the response body of type `Object`.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the full `HTTPResponse` for the request,\n   * with a response body in the requested type.\n   */\n  get<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object and\n   * returns the response body as a JSON object.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   *\n   * @return An `Observable` of the response body as a JSON object.\n   */\n  get(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a `GET` request that interprets the body as a JSON object and returns\n   * the response body in a given type.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with a response body in the requested type.\n   */\n  get<T>(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `GET` request to execute on the server. See the individual overloads for\n   * details on the return type.\n   */\n  get(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('GET', url, options as any);\n  }\n\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer` and\n   * returns the response as an `ArrayBuffer`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a `Blob` and returns\n   * the response as a `Blob`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return  An `Observable` of the response, with the response body as a `Blob`.\n   */\n\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a text string and returns the response\n   * as a string value.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as an  `ArrayBuffer`\n   *  and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of tall `HttpEvents` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a `Blob` and\n   * returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body as a `Blob`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a text string\n   * and returns the full event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all HttpEvents for the request, with the response body of type string.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object\n   * and returns the full HTTP event stream.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of all `HTTPEvents` for the request, with a response body of\n   * type `Object`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object and\n   * returns the full event stream.\n   *\n   * @return An `Observable` of all the `HTTPEvents` for the request\n   * , with a response body in the requested type.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   */\n  head<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`\n   *  and returns the full HTTP response.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a `Blob` and returns\n   * the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body as a blob.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as text stream\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body of type string.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body of type `Object`.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with a responmse body of the requested type.\n   */\n  head<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object and\n   * returns the response body as a JSON object.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the response, with the response body as a JSON object.\n   */\n  head(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a `HEAD` request that interprets the body as a JSON object and returns\n   * the response in a given type.\n   *\n   * @param url     The endpoint URL.\n   * @param options The HTTP options to send with the request.\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with a response body of the given type.\n   */\n  head<T>(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `HEAD` request to execute on the server. The `HEAD` method returns\n   * meta information about the resource without transferring the\n   * resource itself. See the individual overloads for\n   * details on the return type.\n   */\n  head(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('HEAD', url, options as any);\n  }\n\n  /**\n   * Constructs a `JSONP` request for the given URL and name of the callback parameter.\n   *\n   * @param url The resource URL.\n   * @param callbackParam The callback function name.\n   *\n   * @return An `Observable` of the response object, with response body as an object.\n   */\n  jsonp(url: string, callbackParam: string): Observable<Object>;\n\n  /**\n   * Constructs a `JSONP` request for the given URL and name of the callback parameter.\n   *\n   * @param url The resource URL.\n   * @param callbackParam The callback function name.\n   *\n   * You must install a suitable interceptor, such as one provided by `HttpClientJsonpModule`.\n   * If no such interceptor is reached,\n   * then the `JSONP` request can be rejected by the configured backend.\n   *\n   * @return An `Observable` of the response object, with response body in the requested type.\n   */\n  jsonp<T>(url: string, callbackParam: string): Observable<T>;\n\n  /**\n   * Constructs an `Observable` that, when subscribed, causes a request with the special method\n   * `JSONP` to be dispatched via the interceptor pipeline.\n   * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n   * API endpoints that don't support newer,\n   * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n   * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n   * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n   * application making the request.\n   * The endpoint API must support JSONP callback for JSONP requests to work.\n   * The resource API returns the JSON response wrapped in a callback function.\n   * You can pass the callback function name as one of the query parameters.\n   * Note that JSONP requests can only be used with `GET` requests.\n   *\n   * @param url The resource URL.\n   * @param callbackParam The callback function name.\n   *\n   */\n  jsonp<T>(url: string, callbackParam: string): Observable<T> {\n    return this.request<any>('JSONP', url, {\n      params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n      observe: 'body',\n      responseType: 'json',\n    });\n  }\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as an\n   * `ArrayBuffer` and returns the response as an `ArrayBuffer`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a `Blob` and returns\n   * the response as a `Blob`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a text string and\n   * returns a string value.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body of type string.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`\n   *  and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return  An `Observable` of all `HttpEvents` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a `Blob` and\n   * returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body as a `Blob`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a text string\n   * and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPEvents` for the request,\n   * with the response body of type string.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HttpEvents` for the request with the response\n   * body of type `Object`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object and\n   * returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HttpEvents` for the request,\n   * with a response body in the requested type.\n   */\n  options<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`\n   *  and returns the full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a `Blob`\n   *  and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   *  with the response body as a `Blob`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as text stream\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   *  with the response body of type string.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   * with the response body of type `Object`.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object and\n   * returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   * with a response body in the requested type.\n   */\n  options<T>(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object and returns the response\n   * body as a JSON object.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as a JSON object.\n   */\n  options(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs an `OPTIONS` request that interprets the body as a JSON object and returns the response\n   * in a given type.\n   *\n   * @param url The endpoint URL.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HTTPResponse`, with a response body of the given type.\n   */\n  options<T>(url: string, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an `Observable` that, when subscribed, causes the configured\n   * `OPTIONS` request to execute on the server. This method allows the client\n   * to determine the supported HTTP methods and other capabilites of an endpoint,\n   * without implying a resource action. See the individual overloads for\n   * details on the return type.\n   */\n  options(url: string, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('OPTIONS', url, options as any);\n  }\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and returns\n   * the response as an `ArrayBuffer`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the response\n   * as a `Blob`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as as a text string and\n   * returns the response as a string value.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with a response body of type string.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and\n   *  returns the the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPevents` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a `Blob`\n   *  and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPevents` for the request, with the\n   * response body as `Blob`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a text string and\n   * returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPevents`for the request, with a\n   * response body of type string.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPevents` for the request,\n   * with a response body of type `Object`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object\n   * and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of all the `HTTPevents` for the request,\n   *  with a response body in the requested type.\n   */\n  patch<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer`\n   *  and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return  An `Observable` of the `HttpResponse` for the request,\n   *  with the response body as an `ArrayBuffer`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the full\n   * `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return  An `Observable` of the `HttpResponse` for the request,\n   * with the response body as a `Blob`.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a text stream and returns the\n   * full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return  An `Observable` of the `HttpResponse` for the request,\n   * with a response body of type string.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   * with a response body in the requested type.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the `HttpResponse` for the request,\n   * with a response body in the given type.\n   */\n  patch<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object and\n   * returns the response body as a JSON object.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as a JSON object.\n   */\n  patch(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a `PATCH` request that interprets the body as a JSON object\n   * and returns the response in a given type.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to edit.\n   * @param options HTTP options.\n   *\n   * @return  An `Observable` of the `HttpResponse` for the request,\n   * with a response body in the given type.\n   */\n  patch<T>(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `PATCH` request to execute on the server. See the individual overloads for\n   * details on the return type.\n   */\n  patch(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('PATCH', url, addBody(options, body));\n  }\n\n  /**\n   * Constructs a `POST` request that interprets the body as an as an `ArrayBuffer` and returns\n   * an `ArrayBuffer`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options.\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a `Blob` and returns the\n   * response as a `Blob`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a text string and\n   * returns the response as a string value.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with a response body of type string.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and\n   * returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a `Blob`\n   * and returns the response in an observable of the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request, with the response body as `Blob`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a text string and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return  An `Observable` of all `HttpEvents` for the request,\n   * with a response body of type string.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a POST request that interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return  An `Observable` of all `HttpEvents` for the request,\n   * with a response body of type `Object`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a POST request that interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with a response body in the requested type.\n   */\n  post<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a POST request that interprets the body as an `ArrayBuffer`\n   *  and returns the full `HTTPresponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return  An `Observable` of the `HTTPResponse` for the request, with the response body as an `ArrayBuffer`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a `Blob` and returns the full\n   * `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body as a `Blob`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a text stream and returns\n   * the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return  An `Observable` of the `HTTPResponse` for the request,\n   * with a response body of type string.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a JSON object\n   * and returns the full `HTTPResponse`.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with a response body of type\n   * `Object`.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a JSON object and returns the full\n   * `HTTPResponse`.\n   *\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with a response body in the requested type.\n   */\n  post<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a\n   * JSON object and returns the response body as a JSON object.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with the response body as a JSON object.\n   */\n  post(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a `POST` request that interprets the body as a JSON object\n   * and returns an observable of the response.\n   *\n   * @param url The endpoint URL.\n   * @param body The content to replace with.\n   * @param options HTTP options\n   *\n   * @return  An `Observable` of the `HTTPResponse` for the request, with a response body in the requested type.\n   */\n  post<T>(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `POST` request to execute on the server. The server responds with the location of\n   * the replaced resource. See the individual overloads for\n   * details on the return type.\n   */\n  post(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('POST', url, addBody(options, body));\n  }\n\n  /**\n   * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and returns the\n   * response as an `ArrayBuffer`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<ArrayBuffer>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a `Blob` and returns\n   * the response as a `Blob`.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with the response body as a `Blob`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<Blob>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a text string and\n   * returns the response as a string value.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with a response body of type string.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<string>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and\n   * returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body as an `ArrayBuffer`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpEvent<ArrayBuffer>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a `Blob` and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with the response body as a `Blob`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpEvent<Blob>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a text string and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all HttpEvents for the request, with a response body\n   * of type string.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpEvent<string>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object and returns the full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request, with a response body of\n   * type `Object`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpEvent<Object>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object and returns the\n   * full event stream.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of all `HttpEvents` for the request,\n   * with a response body in the requested type.\n   */\n  put<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'events', responseType?: 'json', withCredentials?: boolean,\n  }): Observable<HttpEvent<T>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as an\n   * `ArrayBuffer` and returns an observable of the full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with the response body as an `ArrayBuffer`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'arraybuffer', withCredentials?: boolean,\n  }): Observable<HttpResponse<ArrayBuffer>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a `Blob` and returns the\n   * full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with the response body as a `Blob`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'blob', withCredentials?: boolean,\n  }): Observable<HttpResponse<Blob>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a text stream and returns the\n   * full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with a response body of type string.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType: 'text', withCredentials?: boolean,\n  }): Observable<HttpResponse<string>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object and returns the full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with a response body\n   * of type 'Object`.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<Object>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object and returns the full HTTP response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request,\n   * with a response body in the requested type.\n   */\n  put<T>(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe: 'response',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<HttpResponse<T>>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object and returns the response\n   * body as a JSON object.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the response, with the response body as a JSON object.\n   */\n  put(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<Object>;\n\n  /**\n   * Constructs a `PUT` request that interprets the body as a JSON object\n   * and returns an observable of the response.\n   *\n   * @param url The endpoint URL.\n   * @param body The resources to add/update.\n   * @param options HTTP options\n   *\n   * @return An `Observable` of the `HTTPResponse` for the request, with a response body in the requested type.\n   */\n  put<T>(url: string, body: any|null, options?: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: 'body',\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'json',\n    withCredentials?: boolean,\n  }): Observable<T>;\n\n  /**\n   * Constructs an observable that, when subscribed, causes the configured\n   * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n   * with a new set of values.\n   * See the individual overloads for details on the return type.\n   */\n  put(url: string, body: any|null, options: {\n    headers?: HttpHeaders | {[header: string]: string | string[]},\n    observe?: HttpObserve,\n    params?: HttpParams|{[param: string]: string | string[]},\n    reportProgress?: boolean,\n    responseType?: 'arraybuffer'|'blob'|'json'|'text',\n    withCredentials?: boolean,\n  } = {}): Observable<any> {\n    return this.request<any>('PUT', url, addBody(options, body));\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {HttpHandler} from './backend';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\n/**\n * Intercepts and handles an `HttpRequest` or `HttpResponse`.\n *\n * Most interceptors transform the outgoing request before passing it to the\n * next interceptor in the chain, by calling `next.handle(transformedReq)`.\n * An interceptor may transform the\n * response event stream as well, by applying additional RxJS operators on the stream\n * returned by `next.handle()`.\n *\n * More rarely, an interceptor may handle the request entirely,\n * and compose a new event stream instead of invoking `next.handle()`. This is an\n * acceptable behavior, but keep in mind that further interceptors will be skipped entirely.\n *\n * It is also rare but valid for an interceptor to return multiple responses on the\n * event stream for a single request.\n *\n * @publicApi\n *\n * @see [HTTP Guide](guide/http#intercepting-requests-and-responses)\n *\n * @usageNotes\n *\n * To use the same instance of `HttpInterceptors` for the entire app, import the `HttpClientModule`\n * only in your `AppModule`, and add the interceptors to the root application injector .\n * If you import `HttpClientModule` multiple times across different modules (for example, in lazy\n * loading modules), each import creates a new copy of the `HttpClientModule`, which overwrites the interceptors\n * provided in the root module.\n *\n */\nexport interface HttpInterceptor {\n  /**\n   * Identifies and handles a given HTTP request.\n   * @param req The outgoing request object to handle.\n   * @param next The next interceptor in the chain, or the backend\n   * if no interceptors remain in the chain.\n   * @returns An observable of the event stream.\n   */\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;\n}\n\n/**\n * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n *\n */\nexport class HttpInterceptorHandler implements HttpHandler {\n  constructor(private next: HttpHandler, private interceptor: HttpInterceptor) {}\n\n  handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n    return this.interceptor.intercept(req, this.next);\n  }\n}\n\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nexport const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS');\n\n@Injectable()\nexport class NoopInterceptor implements HttpInterceptor {\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    return next.handle(req);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable, Observer} from 'rxjs';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {HttpRequest} from './request';\nimport {HttpErrorResponse, HttpEvent, HttpEventType, HttpResponse} from './response';\n\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet nextRequestId: number = 0;\n\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nexport const JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nexport const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nexport const JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nexport abstract class JsonpCallbackContext { [key: string]: (data: any) => void; }\n\n/**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\n@Injectable()\nexport class JsonpClientBackend implements HttpBackend {\n  constructor(private callbackMap: JsonpCallbackContext, @Inject(DOCUMENT) private document: any) {}\n\n  /**\n   * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n   */\n  private nextCallback(): string { return `ng_jsonp_callback_${nextRequestId++}`; }\n\n  /**\n   * Processes a JSONP request and returns an event stream of the results.\n   * @param req The request object.\n   * @returns An observable of the response events.\n   *\n   */\n  handle(req: HttpRequest<never>): Observable<HttpEvent<any>> {\n    // Firstly, check both the method and response type. If either doesn't match\n    // then the request was improperly routed here and cannot be handled.\n    if (req.method !== 'JSONP') {\n      throw new Error(JSONP_ERR_WRONG_METHOD);\n    } else if (req.responseType !== 'json') {\n      throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n    }\n\n    // Everything else happens inside the Observable boundary.\n    return new Observable<HttpEvent<any>>((observer: Observer<HttpEvent<any>>) => {\n      // The first step to make a request is to generate the callback name, and replace the\n      // callback placeholder in the URL with the name. Care has to be taken here to ensure\n      // a trailing &, if matched, gets inserted back into the URL in the correct place.\n      const callback = this.nextCallback();\n      const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n\n      // Construct the <script> tag and point it at the URL.\n      const node = this.document.createElement('script');\n      node.src = url;\n\n      // A JSONP request requires waiting for multiple callbacks. These variables\n      // are closed over and track state across those callbacks.\n\n      // The response object, if one has been received, or null otherwise.\n      let body: any|null = null;\n\n      // Whether the response callback has been called.\n      let finished: boolean = false;\n\n      // Whether the request has been cancelled (and thus any other callbacks)\n      // should be ignored.\n      let cancelled: boolean = false;\n\n      // Set the response callback in this.callbackMap (which will be the window\n      // object in the browser. The script being loaded via the <script> tag will\n      // eventually call this callback.\n      this.callbackMap[callback] = (data?: any) => {\n        // Data has been received from the JSONP script. Firstly, delete this callback.\n        delete this.callbackMap[callback];\n\n        // Next, make sure the request wasn't cancelled in the meantime.\n        if (cancelled) {\n          return;\n        }\n\n        // Set state to indicate data was received.\n        body = data;\n        finished = true;\n      };\n\n      // cleanup() is a utility closure that removes the <script> from the page and\n      // the response callback from the window. This logic is used in both the\n      // success, error, and cancellation paths, so it's extracted out for convenience.\n      const cleanup = () => {\n        // Remove the <script> tag if it's still on the page.\n        if (node.parentNode) {\n          node.parentNode.removeChild(node);\n        }\n\n        // Remove the response callback from the callbackMap (window object in the\n        // browser).\n        delete this.callbackMap[callback];\n      };\n\n      // onLoad() is the success callback which runs after the response callback\n      // if the JSONP script loads successfully. The event itself is unimportant.\n      // If something went wrong, onLoad() may run without the response callback\n      // having been invoked.\n      const onLoad = (event: Event) => {\n        // Do nothing if the request has been cancelled.\n        if (cancelled) {\n          return;\n        }\n\n        // Cleanup the page.\n        cleanup();\n\n        // Check whether the response callback has run.\n        if (!finished) {\n          // It hasn't, something went wrong with the request. Return an error via\n          // the Observable error path. All JSONP errors have status 0.\n          observer.error(new HttpErrorResponse({\n            url,\n            status: 0,\n            statusText: 'JSONP Error',\n            error: new Error(JSONP_ERR_NO_CALLBACK),\n          }));\n          return;\n        }\n\n        // Success. body either contains the response body or null if none was\n        // returned.\n        observer.next(new HttpResponse({\n          body,\n          status: 200,\n          statusText: 'OK', url,\n        }));\n\n        // Complete the stream, the response is over.\n        observer.complete();\n      };\n\n      // onError() is the error callback, which runs if the script returned generates\n      // a Javascript error. It emits the error via the Observable error channel as\n      // a HttpErrorResponse.\n      const onError: any = (error: Error) => {\n        // If the request was already cancelled, no need to emit anything.\n        if (cancelled) {\n          return;\n        }\n        cleanup();\n\n        // Wrap the error in a HttpErrorResponse.\n        observer.error(new HttpErrorResponse({\n          error,\n          status: 0,\n          statusText: 'JSONP Error', url,\n        }));\n      };\n\n      // Subscribe to both the success (load) and error events on the <script> tag,\n      // and add it to the page.\n      node.addEventListener('load', onLoad);\n      node.addEventListener('error', onError);\n      this.document.body.appendChild(node);\n\n      // The request has now been successfully sent.\n      observer.next({type: HttpEventType.Sent});\n\n      // Cancellation handler.\n      return () => {\n        // Track the cancellation so event listeners won't do anything even if already scheduled.\n        cancelled = true;\n\n        // Remove the event listeners so they won't run if the events later fire.\n        node.removeEventListener('load', onLoad);\n        node.removeEventListener('error', onError);\n\n        // And finally, clean up the page.\n        cleanup();\n      };\n    });\n  }\n}\n\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\n@Injectable()\nexport class JsonpInterceptor {\n  constructor(private jsonp: JsonpClientBackend) {}\n\n  /**\n   * Identifies and handles a given JSONP request.\n   * @param req The outgoing request object to handle.\n   * @param next The next interceptor in the chain, or the backend\n   * if no interceptors remain in the chain.\n   * @returns An observable of the event stream.\n   */\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    if (req.method === 'JSONP') {\n      return this.jsonp.handle(req as HttpRequest<never>);\n    }\n    // Fall through for normal HTTP requests.\n    return next.handle(req);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Observable, Observer} from 'rxjs';\n\nimport {HttpBackend} from './backend';\nimport {HttpHeaders} from './headers';\nimport {HttpRequest} from './request';\nimport {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpJsonParseError, HttpResponse, HttpUploadProgressEvent} from './response';\n\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr: any): string|null {\n  if ('responseURL' in xhr && xhr.responseURL) {\n    return xhr.responseURL;\n  }\n  if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n    return xhr.getResponseHeader('X-Request-URL');\n  }\n  return null;\n}\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nexport abstract class XhrFactory { abstract build(): XMLHttpRequest; }\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n *\n */\n@Injectable()\nexport class BrowserXhr implements XhrFactory {\n  constructor() {}\n  build(): any { return <any>(new XMLHttpRequest()); }\n}\n\n/**\n * Tracks a response from the server that does not yet have a body.\n */\ninterface PartialResponse {\n  headers: HttpHeaders;\n  status: number;\n  statusText: string;\n  url: string;\n}\n\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\n@Injectable()\nexport class HttpXhrBackend implements HttpBackend {\n  constructor(private xhrFactory: XhrFactory) {}\n\n  /**\n   * Processes a request and returns a stream of response events.\n   * @param req The request object.\n   * @returns An observable of the response events.\n   */\n  handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n    // Quick check to give a better error message when a user attempts to use\n    // HttpClient.jsonp() without installing the JsonpClientModule\n    if (req.method === 'JSONP') {\n      throw new Error(`Attempted to construct Jsonp request without JsonpClientModule installed.`);\n    }\n\n    // Everything happens on Observable subscription.\n    return new Observable((observer: Observer<HttpEvent<any>>) => {\n      // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n      const xhr = this.xhrFactory.build();\n      xhr.open(req.method, req.urlWithParams);\n      if (!!req.withCredentials) {\n        xhr.withCredentials = true;\n      }\n\n      // Add all the requested headers.\n      req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n\n      // Add an Accept header if one isn't present already.\n      if (!req.headers.has('Accept')) {\n        xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n      }\n\n      // Auto-detect the Content-Type header if one isn't present already.\n      if (!req.headers.has('Content-Type')) {\n        const detectedType = req.detectContentTypeHeader();\n        // Sometimes Content-Type detection fails.\n        if (detectedType !== null) {\n          xhr.setRequestHeader('Content-Type', detectedType);\n        }\n      }\n\n      // Set the responseType if one was requested.\n      if (req.responseType) {\n        const responseType = req.responseType.toLowerCase();\n\n        // JSON responses need to be processed as text. This is because if the server\n        // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n        // xhr.response will be null, and xhr.responseText cannot be accessed to\n        // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n        // is parsed by first requesting text and then applying JSON.parse.\n        xhr.responseType = ((responseType !== 'json') ? responseType : 'text') as any;\n      }\n\n      // Serialize the request body if one is present. If not, this will be set to null.\n      const reqBody = req.serializeBody();\n\n      // If progress events are enabled, response headers will be delivered\n      // in two events - the HttpHeaderResponse event and the full HttpResponse\n      // event. However, since response headers don't change in between these\n      // two events, it doesn't make sense to parse them twice. So headerResponse\n      // caches the data extracted from the response whenever it's first parsed,\n      // to ensure parsing isn't duplicated.\n      let headerResponse: HttpHeaderResponse|null = null;\n\n      // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n      // state, and memoizes it into headerResponse.\n      const partialFromXhr = (): HttpHeaderResponse => {\n        if (headerResponse !== null) {\n          return headerResponse;\n        }\n\n        // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).\n        const status: number = xhr.status === 1223 ? 204 : xhr.status;\n        const statusText = xhr.statusText || 'OK';\n\n        // Parse headers from XMLHttpRequest - this step is lazy.\n        const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n\n        // Read the response URL from the XMLHttpResponse instance and fall back on the\n        // request URL.\n        const url = getResponseUrl(xhr) || req.url;\n\n        // Construct the HttpHeaderResponse and memoize it.\n        headerResponse = new HttpHeaderResponse({headers, status, statusText, url});\n        return headerResponse;\n      };\n\n      // Next, a few closures are defined for the various events which XMLHttpRequest can\n      // emit. This allows them to be unregistered as event listeners later.\n\n      // First up is the load event, which represents a response being fully available.\n      const onLoad = () => {\n        // Read response state from the memoized partial data.\n        let {headers, status, statusText, url} = partialFromXhr();\n\n        // The body will be read out if present.\n        let body: any|null = null;\n\n        if (status !== 204) {\n          // Use XMLHttpRequest.response if set, responseText otherwise.\n          body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n        }\n\n        // Normalize another potential bug (this one comes from CORS).\n        if (status === 0) {\n          status = !!body ? 200 : 0;\n        }\n\n        // ok determines whether the response will be transmitted on the event or\n        // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n        // but a successful status code can still result in an error if the user\n        // asked for JSON data and the body cannot be parsed as such.\n        let ok = status >= 200 && status < 300;\n\n        // Check whether the body needs to be parsed as JSON (in many cases the browser\n        // will have done that already).\n        if (req.responseType === 'json' && typeof body === 'string') {\n          // Save the original body, before attempting XSSI prefix stripping.\n          const originalBody = body;\n          body = body.replace(XSSI_PREFIX, '');\n          try {\n            // Attempt the parse. If it fails, a parse error should be delivered to the user.\n            body = body !== '' ? JSON.parse(body) : null;\n          } catch (error) {\n            // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n            // JSON response. Restore the original body (including any XSSI prefix) to deliver\n            // a better error response.\n            body = originalBody;\n\n            // If this was an error request to begin with, leave it as a string, it probably\n            // just isn't JSON. Otherwise, deliver the parsing error to the user.\n            if (ok) {\n              // Even though the response status was 2xx, this is still an error.\n              ok = false;\n              // The parse error contains the text of the body that failed to parse.\n              body = { error, text: body } as HttpJsonParseError;\n            }\n          }\n        }\n\n        if (ok) {\n          // A successful response is delivered on the event stream.\n          observer.next(new HttpResponse({\n            body,\n            headers,\n            status,\n            statusText,\n            url: url || undefined,\n          }));\n          // The full body has been received and delivered, no further events\n          // are possible. This request is complete.\n          observer.complete();\n        } else {\n          // An unsuccessful request is delivered on the error channel.\n          observer.error(new HttpErrorResponse({\n            // The error in this case is the response body (error from the server).\n            error: body,\n            headers,\n            status,\n            statusText,\n            url: url || undefined,\n          }));\n        }\n      };\n\n      // The onError callback is called when something goes wrong at the network level.\n      // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n      // transmitted on the error channel.\n      const onError = (error: ProgressEvent) => {\n        const {url} = partialFromXhr();\n        const res = new HttpErrorResponse({\n          error,\n          status: xhr.status || 0,\n          statusText: xhr.statusText || 'Unknown Error',\n          url: url || undefined,\n        });\n        observer.error(res);\n      };\n\n      // The sentHeaders flag tracks whether the HttpResponseHeaders event\n      // has been sent on the stream. This is necessary to track if progress\n      // is enabled since the event will be sent on only the first download\n      // progerss event.\n      let sentHeaders = false;\n\n      // The download progress event handler, which is only registered if\n      // progress events are enabled.\n      const onDownProgress = (event: ProgressEvent) => {\n        // Send the HttpResponseHeaders event if it hasn't been sent already.\n        if (!sentHeaders) {\n          observer.next(partialFromXhr());\n          sentHeaders = true;\n        }\n\n        // Start building the download progress event to deliver on the response\n        // event stream.\n        let progressEvent: HttpDownloadProgressEvent = {\n          type: HttpEventType.DownloadProgress,\n          loaded: event.loaded,\n        };\n\n        // Set the total number of bytes in the event if it's available.\n        if (event.lengthComputable) {\n          progressEvent.total = event.total;\n        }\n\n        // If the request was for text content and a partial response is\n        // available on XMLHttpRequest, include it in the progress event\n        // to allow for streaming reads.\n        if (req.responseType === 'text' && !!xhr.responseText) {\n          progressEvent.partialText = xhr.responseText;\n        }\n\n        // Finally, fire the event.\n        observer.next(progressEvent);\n      };\n\n      // The upload progress event handler, which is only registered if\n      // progress events are enabled.\n      const onUpProgress = (event: ProgressEvent) => {\n        // Upload progress events are simpler. Begin building the progress\n        // event.\n        let progress: HttpUploadProgressEvent = {\n          type: HttpEventType.UploadProgress,\n          loaded: event.loaded,\n        };\n\n        // If the total number of bytes being uploaded is available, include\n        // it.\n        if (event.lengthComputable) {\n          progress.total = event.total;\n        }\n\n        // Send the event.\n        observer.next(progress);\n      };\n\n      // By default, register for load and error events.\n      xhr.addEventListener('load', onLoad);\n      xhr.addEventListener('error', onError);\n\n      // Progress events are only enabled if requested.\n      if (req.reportProgress) {\n        // Download progress is always enabled if requested.\n        xhr.addEventListener('progress', onDownProgress);\n\n        // Upload progress depends on whether there is a body to upload.\n        if (reqBody !== null && xhr.upload) {\n          xhr.upload.addEventListener('progress', onUpProgress);\n        }\n      }\n\n      // Fire the request, and notify the event stream that it was fired.\n      xhr.send(reqBody !);\n      observer.next({type: HttpEventType.Sent});\n\n      // This is the return from the Observable function, which is the\n      // request cancellation handler.\n      return () => {\n        // On a cancellation, remove all registered event listeners.\n        xhr.removeEventListener('error', onError);\n        xhr.removeEventListener('load', onLoad);\n        if (req.reportProgress) {\n          xhr.removeEventListener('progress', onDownProgress);\n          if (reqBody !== null && xhr.upload) {\n            xhr.upload.removeEventListener('progress', onUpProgress);\n          }\n        }\n\n        // Finally, abort the in-flight request.\n        xhr.abort();\n      };\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ÉµparseCookieValue as parseCookieValue} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {HttpHandler} from './backend';\nimport {HttpInterceptor} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\nexport const XSRF_COOKIE_NAME = new InjectionToken<string>('XSRF_COOKIE_NAME');\nexport const XSRF_HEADER_NAME = new InjectionToken<string>('XSRF_HEADER_NAME');\n\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nexport abstract class HttpXsrfTokenExtractor {\n  /**\n   * Get the XSRF token to use with an outgoing request.\n   *\n   * Will be called for every request, so the token may change between requests.\n   */\n  abstract getToken(): string|null;\n}\n\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\n@Injectable()\nexport class HttpXsrfCookieExtractor implements HttpXsrfTokenExtractor {\n  private lastCookieString: string = '';\n  private lastToken: string|null = null;\n\n  /**\n   * @internal for testing\n   */\n  parseCount: number = 0;\n\n  constructor(\n      @Inject(DOCUMENT) private doc: any, @Inject(PLATFORM_ID) private platform: string,\n      @Inject(XSRF_COOKIE_NAME) private cookieName: string) {}\n\n  getToken(): string|null {\n    if (this.platform === 'server') {\n      return null;\n    }\n    const cookieString = this.doc.cookie || '';\n    if (cookieString !== this.lastCookieString) {\n      this.parseCount++;\n      this.lastToken = parseCookieValue(cookieString, this.cookieName);\n      this.lastCookieString = cookieString;\n    }\n    return this.lastToken;\n  }\n}\n\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\n@Injectable()\nexport class HttpXsrfInterceptor implements HttpInterceptor {\n  constructor(\n      private tokenService: HttpXsrfTokenExtractor,\n      @Inject(XSRF_HEADER_NAME) private headerName: string) {}\n\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    const lcUrl = req.url.toLowerCase();\n    // Skip both non-mutating requests and absolute URLs.\n    // Non-mutating requests don't require a token, and absolute URLs require special handling\n    // anyway as the cookie set\n    // on our origin is not the same as the token expected by another origin.\n    if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n        lcUrl.startsWith('https://')) {\n      return next.handle(req);\n    }\n    const token = this.tokenService.getToken();\n\n    // Be careful not to overwrite an existing header of the same name.\n    if (token !== null && !req.headers.has(this.headerName)) {\n      req = req.clone({headers: req.headers.set(this.headerName, token)});\n    }\n    return next.handle(req);\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Injector, ModuleWithProviders, NgModule} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {HttpClient} from './client';\nimport {HTTP_INTERCEPTORS, HttpInterceptor, HttpInterceptorHandler, NoopInterceptor} from './interceptor';\nimport {JsonpCallbackContext, JsonpClientBackend, JsonpInterceptor} from './jsonp';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\nimport {BrowserXhr, HttpXhrBackend, XhrFactory} from './xhr';\nimport {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor, XSRF_COOKIE_NAME, XSRF_HEADER_NAME} from './xsrf';\n\n/**\n * An injectable `HttpHandler` that applies multiple interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * The interceptors are loaded lazily from the injector, to allow\n * interceptors to themselves inject classes depending indirectly\n * on `HttpInterceptingHandler` itself.\n * @see `HttpInterceptor`\n */\n@Injectable()\nexport class HttpInterceptingHandler implements HttpHandler {\n  private chain: HttpHandler|null = null;\n\n  constructor(private backend: HttpBackend, private injector: Injector) {}\n\n  handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n    if (this.chain === null) {\n      const interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\n      this.chain = interceptors.reduceRight(\n          (next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend);\n    }\n    return this.chain.handle(req);\n  }\n}\n\n/**\n * Constructs an `HttpHandler` that applies interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * Use as a factory function within `HttpClientModule`.\n *\n *\n */\nexport function interceptingHandler(\n    backend: HttpBackend, interceptors: HttpInterceptor[] | null = []): HttpHandler {\n  if (!interceptors) {\n    return backend;\n  }\n  return interceptors.reduceRight(\n      (next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);\n}\n\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nexport function jsonpCallbackContext(): Object {\n  if (typeof window === 'object') {\n    return window;\n  }\n  return {};\n}\n\n/**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\n@NgModule({\n  providers: [\n    HttpXsrfInterceptor,\n    {provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true},\n    {provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor},\n    {provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN'},\n    {provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN'},\n  ],\n})\nexport class HttpClientXsrfModule {\n  /**\n   * Disable the default XSRF protection.\n   */\n  static disable(): ModuleWithProviders<HttpClientXsrfModule> {\n    return {\n      ngModule: HttpClientXsrfModule,\n      providers: [\n        {provide: HttpXsrfInterceptor, useClass: NoopInterceptor},\n      ],\n    };\n  }\n\n  /**\n   * Configure XSRF protection.\n   * @param options An object that can specify either or both\n   * cookie name or header name.\n   * - Cookie name default is `XSRF-TOKEN`.\n   * - Header name default is `X-XSRF-TOKEN`.\n   *\n   */\n  static withOptions(options: {\n    cookieName?: string,\n    headerName?: string,\n  } = {}): ModuleWithProviders<HttpClientXsrfModule> {\n    return {\n      ngModule: HttpClientXsrfModule,\n      providers: [\n        options.cookieName ? {provide: XSRF_COOKIE_NAME, useValue: options.cookieName} : [],\n        options.headerName ? {provide: XSRF_HEADER_NAME, useValue: options.headerName} : [],\n      ],\n    };\n  }\n}\n\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\n@NgModule({\n  /**\n   * Optional configuration for XSRF protection.\n   */\n  imports: [\n    HttpClientXsrfModule.withOptions({\n      cookieName: 'XSRF-TOKEN',\n      headerName: 'X-XSRF-TOKEN',\n    }),\n  ],\n  /**\n   * Configures the [dependency injector](guide/glossary#injector) where it is imported\n   * with supporting services for HTTP communications.\n   */\n  providers: [\n    HttpClient,\n    {provide: HttpHandler, useClass: HttpInterceptingHandler},\n    HttpXhrBackend,\n    {provide: HttpBackend, useExisting: HttpXhrBackend},\n    BrowserXhr,\n    {provide: XhrFactory, useExisting: BrowserXhr},\n  ],\n})\nexport class HttpClientModule {\n}\n\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\n@NgModule({\n  providers: [\n    JsonpClientBackend,\n    {provide: JsonpCallbackContext, useFactory: jsonpCallbackContext},\n    {provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true},\n  ],\n})\nexport class HttpClientJsonpModule {\n}\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {\n    function ArgumentOutOfRangeErrorImpl() {\n        Error.call(this);\n        this.message = 'argument out of range';\n        this.name = 'ArgumentOutOfRangeError';\n        return this;\n    }\n    ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n    return ArgumentOutOfRangeErrorImpl;\n})();\nexport var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar EmptyErrorImpl = /*@__PURE__*/ (function () {\n    function EmptyErrorImpl() {\n        Error.call(this);\n        this.message = 'no elements in sequence';\n        this.name = 'EmptyError';\n        return this;\n    }\n    EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n    return EmptyErrorImpl;\n})();\nexport var EmptyError = EmptyErrorImpl;\n//# sourceMappingURL=EmptyError.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function isFunction(x) {\n    return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n    return function (source) {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeOperator(count));\n        }\n    };\n}\nvar TakeOperator = /*@__PURE__*/ (function () {\n    function TakeOperator(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    TakeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new TakeSubscriber(subscriber, this.total));\n    };\n    return TakeOperator;\n}());\nvar TakeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TakeSubscriber, _super);\n    function TakeSubscriber(destination, total) {\n        var _this = _super.call(this, destination) || this;\n        _this.total = total;\n        _this.count = 0;\n        return _this;\n    }\n    TakeSubscriber.prototype._next = function (value) {\n        var total = this.total;\n        var count = ++this.count;\n        if (count <= total) {\n            this.destination.next(value);\n            if (count === total) {\n                this.destination.complete();\n                this.unsubscribe();\n            }\n        }\n    };\n    return TakeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=take.js.map\n","import { ASC_STRING, DESC_STRING } from \"../components/cm-sortable-th/cm-sortable-th.component\";\n\nexport class TableFilter {\n  public sortDirection: string;\n  public sortField: string;\n\n  private key: string;\n\n  constructor(localStorageKey) {\n    this.key = localStorageKey;\n    this.clone(JSON.parse(localStorage.getItem(this.key)));\n  }\n\n  public save() {\n    localStorage.setItem(this.key, JSON.stringify(this));\n  }\n\n  public sort(field) {\n    this.sortField = field;\n    if (this.sortDirection === ASC_STRING) {\n      this.sortDirection = DESC_STRING;\n    } else {\n      this.sortDirection = ASC_STRING;\n    }\n  }\n\n  public clear() {\n    this.sortDirection = null;\n    this.sortField = null;\n  }\n\n  public toString(): string {\n    if (this.sortField && this.sortDirection) return `&sortField=${this.sortField}&sortDirection=${this.sortDirection}`;\n    return \"\";\n  }\n\n  private clone(from) {\n    for (let objProperty in from) {\n      this[objProperty] = from[objProperty];\n    }\n  }\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue) {\n    if (defaultValue === void 0) {\n        defaultValue = null;\n    }\n    return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };\n}\nvar DefaultIfEmptyOperator = /*@__PURE__*/ (function () {\n    function DefaultIfEmptyOperator(defaultValue) {\n        this.defaultValue = defaultValue;\n    }\n    DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n    };\n    return DefaultIfEmptyOperator;\n}());\nvar DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DefaultIfEmptySubscriber, _super);\n    function DefaultIfEmptySubscriber(destination, defaultValue) {\n        var _this = _super.call(this, destination) || this;\n        _this.defaultValue = defaultValue;\n        _this.isEmpty = true;\n        return _this;\n    }\n    DefaultIfEmptySubscriber.prototype._next = function (value) {\n        this.isEmpty = false;\n        this.destination.next(value);\n    };\n    DefaultIfEmptySubscriber.prototype._complete = function () {\n        if (this.isEmpty) {\n            this.destination.next(this.defaultValue);\n        }\n        this.destination.complete();\n    };\n    return DefaultIfEmptySubscriber;\n}(Subscriber));\n//# sourceMappingURL=defaultIfEmpty.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscribeToArray(input));\n    }\n    else {\n        return scheduleArray(input, scheduler);\n    }\n}\n//# sourceMappingURL=fromArray.js.map\n","/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */\nimport { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    return concatAll()(of.apply(void 0, observables));\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AsyncScheduler, _super);\n    function AsyncScheduler(SchedulerAction, now) {\n        if (now === void 0) {\n            now = Scheduler.now;\n        }\n        var _this = _super.call(this, SchedulerAction, function () {\n            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {\n                return AsyncScheduler.delegate.now();\n            }\n            else {\n                return now();\n            }\n        }) || this;\n        _this.actions = [];\n        _this.active = false;\n        _this.scheduled = undefined;\n        return _this;\n    }\n    AsyncScheduler.prototype.schedule = function (work, delay, state) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n            return AsyncScheduler.delegate.schedule(work, delay, state);\n        }\n        else {\n            return _super.prototype.schedule.call(this, work, delay, state);\n        }\n    };\n    AsyncScheduler.prototype.flush = function (action) {\n        var actions = this.actions;\n        if (this.active) {\n            actions.push(action);\n            return;\n        }\n        var error;\n        this.active = true;\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (action = actions.shift());\n        this.active = false;\n        if (error) {\n            while (action = actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    };\n    return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { Subscription } from './Subscription';\nvar AsyncSubject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AsyncSubject, _super);\n    function AsyncSubject() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.value = null;\n        _this.hasNext = false;\n        _this.hasCompleted = false;\n        return _this;\n    }\n    AsyncSubject.prototype._subscribe = function (subscriber) {\n        if (this.hasError) {\n            subscriber.error(this.thrownError);\n            return Subscription.EMPTY;\n        }\n        else if (this.hasCompleted && this.hasNext) {\n            subscriber.next(this.value);\n            subscriber.complete();\n            return Subscription.EMPTY;\n        }\n        return _super.prototype._subscribe.call(this, subscriber);\n    };\n    AsyncSubject.prototype.next = function (value) {\n        if (!this.hasCompleted) {\n            this.value = value;\n            this.hasNext = true;\n        }\n    };\n    AsyncSubject.prototype.error = function (error) {\n        if (!this.hasCompleted) {\n            _super.prototype.error.call(this, error);\n        }\n    };\n    AsyncSubject.prototype.complete = function () {\n        this.hasCompleted = true;\n        if (this.hasNext) {\n            _super.prototype.next.call(this, this.value);\n        }\n        _super.prototype.complete.call(this);\n    };\n    return AsyncSubject;\n}(Subject));\nexport { AsyncSubject };\n//# sourceMappingURL=AsyncSubject.js.map\n","/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Action } from './Action';\nvar AsyncAction = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AsyncAction, _super);\n    function AsyncAction(scheduler, work) {\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        _this.pending = false;\n        return _this;\n    }\n    AsyncAction.prototype.schedule = function (state, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (this.closed) {\n            return this;\n        }\n        this.state = state;\n        var id = this.id;\n        var scheduler = this.scheduler;\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, delay);\n        }\n        this.pending = true;\n        this.delay = delay;\n        this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n        return this;\n    };\n    AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        return setInterval(scheduler.flush.bind(scheduler, this), delay);\n    };\n    AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (delay !== null && this.delay === delay && this.pending === false) {\n            return id;\n        }\n        clearInterval(id);\n        return undefined;\n    };\n    AsyncAction.prototype.execute = function (state, delay) {\n        if (this.closed) {\n            return new Error('executing a cancelled action');\n        }\n        this.pending = false;\n        var error = this._execute(state, delay);\n        if (error) {\n            return error;\n        }\n        else if (this.pending === false && this.id != null) {\n            this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n        }\n    };\n    AsyncAction.prototype._execute = function (state, delay) {\n        var errored = false;\n        var errorValue = undefined;\n        try {\n            this.work(state);\n        }\n        catch (e) {\n            errored = true;\n            errorValue = !!e && e || new Error(e);\n        }\n        if (errored) {\n            this.unsubscribe();\n            return errorValue;\n        }\n    };\n    AsyncAction.prototype._unsubscribe = function () {\n        var id = this.id;\n        var scheduler = this.scheduler;\n        var actions = scheduler.actions;\n        var index = actions.indexOf(this);\n        this.work = null;\n        this.state = null;\n        this.pending = false;\n        this.scheduler = null;\n        if (index !== -1) {\n            actions.splice(index, 1);\n        }\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, null);\n        }\n        this.delay = null;\n    };\n    return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(Action, _super);\n    function Action(scheduler, work) {\n        return _super.call(this) || this;\n    }\n    Action.prototype.schedule = function (state, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        return this;\n    };\n    return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map\n","/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */\nimport { isArray } from './isArray';\nexport function isNumeric(val) {\n    return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\n//# sourceMappingURL=isNumeric.js.map\n","import {Injectable} from \"@angular/core\";\nimport {Observable, of} from \"rxjs\";\n\nexport abstract class TranslateLoader {\n  abstract getTranslation(lang: string): Observable<any>;\n}\n\n/**\n * This loader is just a placeholder that does nothing, in case you don't need a loader at all\n */\n@Injectable()\nexport class TranslateFakeLoader extends TranslateLoader {\n  getTranslation(lang: string): Observable<any> {\n    return of({});\n  }\n}\n","import {Injectable} from \"@angular/core\";\nimport {TranslateService} from \"./translate.service\";\n\nexport interface MissingTranslationHandlerParams {\n  /**\n   * the key that's missing in translation files\n   */\n  key: string;\n\n  /**\n   * an instance of the service that was unable to translate the key.\n   */\n  translateService: TranslateService;\n\n  /**\n   * interpolation params that were passed along for translating the given key.\n   */\n  interpolateParams?: Object;\n}\n\nexport abstract class MissingTranslationHandler {\n  /**\n   * A function that handles missing translations.\n   *\n   * @param params context for resolving a missing translation\n   * @returns a value or an observable\n   * If it returns a value, then this value is used.\n   * If it return an observable, the value returned by this observable will be used (except if the method was \"instant\").\n   * If it doesn't return then the key will be used as a value\n   */\n  abstract handle(params: MissingTranslationHandlerParams): any;\n}\n\n/**\n * This handler is just a placeholder that does nothing, in case you don't need a missing translation handler at all\n */\n@Injectable()\nexport class FakeMissingTranslationHandler implements MissingTranslationHandler {\n  handle(params: MissingTranslationHandlerParams): string {\n    return params.key;\n  }\n}\n","import {Injectable} from \"@angular/core\";\n\nexport abstract class TranslateCompiler {\n  abstract compile(value: string, lang: string): string | Function;\n\n  abstract compileTranslations(translations: any, lang: string): any;\n}\n\n/**\n * This compiler is just a placeholder that does nothing, in case you don't need a compiler at all\n */\n@Injectable()\nexport class TranslateFakeCompiler extends TranslateCompiler {\n  compile(value: string, lang: string): string | Function {\n    return value;\n  }\n\n  compileTranslations(translations: any, lang: string): any {\n    return translations;\n  }\n}\n","/* tslint:disable */\n/**\n * Determines if two objects or two values are equivalent.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n *   comparing them with `equals`.\n *\n * @param o1 Object or value to compare.\n * @param o2 Object or value to compare.\n * @returns true if arguments are equal.\n */\nexport function 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, length: number, key: any, keySet: any;\n  if (t1 == t2 && t1 == 'object') {\n    if (Array.isArray(o1)) {\n      if (!Array.isArray(o2)) return false;\n      if ((length = o1.length) == o2.length) {\n        for (key = 0; key < length; key++) {\n          if (!equals(o1[key], o2[key])) return false;\n        }\n        return true;\n      }\n    } else {\n      if (Array.isArray(o2)) {\n        return false;\n      }\n      keySet = Object.create(null);\n      for (key in o1) {\n        if (!equals(o1[key], o2[key])) {\n          return false;\n        }\n        keySet[key] = true;\n      }\n      for (key in o2) {\n        if (!(key in keySet) && typeof o2[key] !== 'undefined') {\n          return false;\n        }\n      }\n      return true;\n    }\n  }\n  return false;\n}\n/* tslint:enable */\n\nexport function isDefined(value: any): boolean {\n  return typeof value !== 'undefined' && value !== null;\n}\n\nexport function isObject(item: any): boolean {\n  return (item && typeof item === 'object' && !Array.isArray(item));\n}\n\nexport function mergeDeep(target: any, source: any): any {\n  let output = Object.assign({}, target);\n  if (isObject(target) && isObject(source)) {\n    Object.keys(source).forEach((key: any) => {\n      if (isObject(source[key])) {\n        if (!(key in target)) {\n          Object.assign(output, {[key]: source[key]});\n        } else {\n          output[key] = mergeDeep(target[key], source[key]);\n        }\n      } else {\n        Object.assign(output, {[key]: source[key]});\n      }\n    });\n  }\n  return output;\n}\n","import {Injectable} from \"@angular/core\";\nimport {isDefined} from \"./util\";\n\nexport abstract class TranslateParser {\n  /**\n   * Interpolates a string to replace parameters\n   * \"This is a {{ key }}\" ==> \"This is a value\", with params = { key: \"value\" }\n   * @param expr\n   * @param params\n   */\n  abstract interpolate(expr: string | Function, params?: any): string;\n\n  /**\n   * Gets a value from an object by composed key\n   * parser.getValue({ key1: { keyA: 'valueI' }}, 'key1.keyA') ==> 'valueI'\n   * @param target\n   * @param key\n   */\n  abstract getValue(target: any, key: string): any\n}\n\n@Injectable()\nexport class TranslateDefaultParser extends TranslateParser {\n  templateMatcher: RegExp = /{{\\s?([^{}\\s]*)\\s?}}/g;\n\n  public interpolate(expr: string | Function, params?: any): string {\n    let result: string;\n\n    if (typeof expr === 'string') {\n      result = this.interpolateString(expr, params);\n    } else if (typeof expr === 'function') {\n      result = this.interpolateFunction(expr, params);\n    } else {\n      // this should not happen, but an unrelated TranslateService test depends on it\n      result = expr as string;\n    }\n\n    return result;\n  }\n\n  getValue(target: any, key: string): any {\n    let keys = key.split('.');\n    key = '';\n    do {\n      key += keys.shift();\n      if (isDefined(target) && isDefined(target[key]) && (typeof target[key] === 'object' || !keys.length)) {\n        target = target[key];\n        key = '';\n      } else if (!keys.length) {\n        target = undefined;\n      } else {\n        key += '.';\n      }\n    } while (keys.length);\n\n    return target;\n  }\n\n  private interpolateFunction(fn: Function, params?: any) {\n    return fn(params);\n  }\n\n  private interpolateString(expr: string, params?: any) {\n    if (!params) {\n      return expr;\n    }\n\n    return expr.replace(this.templateMatcher, (substring: string, b: string) => {\n      let r = this.getValue(params, b);\n      return isDefined(r) ? r : substring;\n    });\n  }\n}\n","import {EventEmitter} from \"@angular/core\";\nimport {DefaultLangChangeEvent, LangChangeEvent, TranslationChangeEvent} from \"./translate.service\";\n\nexport class TranslateStore {\n  /**\n   * The default lang to fallback when translations are missing on the current lang\n   */\n  public defaultLang: string;\n\n  /**\n   * The lang currently used\n   */\n  public currentLang: string = this.defaultLang;\n\n  /**\n   * a list of translations per lang\n   */\n  public translations: any = {};\n\n  /**\n   * an array of langs\n   */\n  public langs: Array<string> = [];\n\n  /**\n   * An EventEmitter to listen to translation change events\n   * onTranslationChange.subscribe((params: TranslationChangeEvent) => {\n     *     // do something\n     * });\n   */\n  public onTranslationChange: EventEmitter<TranslationChangeEvent> = new EventEmitter<TranslationChangeEvent>();\n\n  /**\n   * An EventEmitter to listen to lang change events\n   * onLangChange.subscribe((params: LangChangeEvent) => {\n     *     // do something\n     * });\n   */\n  public onLangChange: EventEmitter<LangChangeEvent> = new EventEmitter<LangChangeEvent>();\n\n  /**\n   * An EventEmitter to listen to default lang change events\n   * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {\n     *     // do something\n     * });\n   */\n  public onDefaultLangChange: EventEmitter<DefaultLangChangeEvent> = new EventEmitter<DefaultLangChangeEvent>();\n}\n","import {EventEmitter, Inject, Injectable, InjectionToken} from \"@angular/core\";\nimport {concat, merge, Observable, Observer, of} from \"rxjs\";\nimport {map, share, switchMap, take, toArray} from \"rxjs/operators\";\nimport {MissingTranslationHandler, MissingTranslationHandlerParams} from \"./missing-translation-handler\";\nimport {TranslateCompiler} from \"./translate.compiler\";\nimport {TranslateLoader} from \"./translate.loader\";\nimport {TranslateParser} from \"./translate.parser\";\n\nimport {TranslateStore} from \"./translate.store\";\nimport {isDefined, mergeDeep} from \"./util\";\n\nexport const USE_STORE = new InjectionToken<string>('USE_STORE');\nexport const USE_DEFAULT_LANG = new InjectionToken<string>('USE_DEFAULT_LANG');\n\nexport interface TranslationChangeEvent {\n  translations: any;\n  lang: string;\n}\n\nexport interface LangChangeEvent {\n  lang: string;\n  translations: any;\n}\n\nexport interface DefaultLangChangeEvent {\n  lang: string;\n  translations: any;\n}\n\ndeclare interface Window {\n  navigator: any;\n}\n\ndeclare const window: Window;\n\n@Injectable()\nexport class TranslateService {\n  private loadingTranslations: Observable<any>;\n  private pending: boolean = false;\n  private _onTranslationChange: EventEmitter<TranslationChangeEvent> = new EventEmitter<TranslationChangeEvent>();\n  private _onLangChange: EventEmitter<LangChangeEvent> = new EventEmitter<LangChangeEvent>();\n  private _onDefaultLangChange: EventEmitter<DefaultLangChangeEvent> = new EventEmitter<DefaultLangChangeEvent>();\n  private _defaultLang: string;\n  private _currentLang: string;\n  private _langs: Array<string> = [];\n  private _translations: any = {};\n  private _translationRequests: any = {};\n\n  /**\n   * An EventEmitter to listen to translation change events\n   * onTranslationChange.subscribe((params: TranslationChangeEvent) => {\n     *     // do something\n     * });\n   */\n  get onTranslationChange(): EventEmitter<TranslationChangeEvent> {\n    return this.isolate ? this._onTranslationChange : this.store.onTranslationChange;\n  }\n\n  /**\n   * An EventEmitter to listen to lang change events\n   * onLangChange.subscribe((params: LangChangeEvent) => {\n     *     // do something\n     * });\n   */\n  get onLangChange(): EventEmitter<LangChangeEvent> {\n    return this.isolate ? this._onLangChange : this.store.onLangChange;\n  }\n\n  /**\n   * An EventEmitter to listen to default lang change events\n   * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {\n     *     // do something\n     * });\n   */\n  get onDefaultLangChange() {\n    return this.isolate ? this._onDefaultLangChange : this.store.onDefaultLangChange;\n  }\n\n  /**\n   * The default lang to fallback when translations are missing on the current lang\n   */\n  get defaultLang(): string {\n    return this.isolate ? this._defaultLang : this.store.defaultLang;\n  }\n\n  set defaultLang(defaultLang: string) {\n    if (this.isolate) {\n      this._defaultLang = defaultLang;\n    } else {\n      this.store.defaultLang = defaultLang;\n    }\n  }\n\n  /**\n   * The lang currently used\n   */\n  get currentLang(): string {\n    return this.isolate ? this._currentLang : this.store.currentLang;\n  }\n\n  set currentLang(currentLang: string) {\n    if (this.isolate) {\n      this._currentLang = currentLang;\n    } else {\n      this.store.currentLang = currentLang;\n    }\n  }\n\n  /**\n   * an array of langs\n   */\n  get langs(): string[] {\n    return this.isolate ? this._langs : this.store.langs;\n  }\n\n  set langs(langs: string[]) {\n    if (this.isolate) {\n      this._langs = langs;\n    } else {\n      this.store.langs = langs;\n    }\n  }\n\n  /**\n   * a list of translations per lang\n   */\n  get translations(): any {\n    return this.isolate ? this._translations : this.store.translations;\n  }\n\n  set translations(translations: any) {\n    if (this.isolate) {\n      this._translations = translations;\n    } else {\n      this.store.translations = translations;\n    }\n  }\n\n  /**\n   *\n   * @param store an instance of the store (that is supposed to be unique)\n   * @param currentLoader An instance of the loader currently used\n   * @param compiler An instance of the compiler currently used\n   * @param parser An instance of the parser currently used\n   * @param missingTranslationHandler A handler for missing translations.\n   * @param isolate whether this service should use the store or not\n   * @param useDefaultLang whether we should use default language translation when current language translation is missing.\n   */\n  constructor(public store: TranslateStore,\n              public currentLoader: TranslateLoader,\n              public compiler: TranslateCompiler,\n              public parser: TranslateParser,\n              public missingTranslationHandler: MissingTranslationHandler,\n              @Inject(USE_DEFAULT_LANG) private useDefaultLang: boolean = true,\n              @Inject(USE_STORE) private isolate: boolean = false) {\n  }\n\n  /**\n   * Sets the default language to use as a fallback\n   */\n  public setDefaultLang(lang: string): void {\n    if (lang === this.defaultLang) {\n      return;\n    }\n\n    let pending: Observable<any> = this.retrieveTranslations(lang);\n\n    if (typeof pending !== \"undefined\") {\n      // on init set the defaultLang immediately\n      if (!this.defaultLang) {\n        this.defaultLang = lang;\n      }\n\n      pending.pipe(take(1))\n        .subscribe((res: any) => {\n          this.changeDefaultLang(lang);\n        });\n    } else { // we already have this language\n      this.changeDefaultLang(lang);\n    }\n  }\n\n  /**\n   * Gets the default language used\n   */\n  public getDefaultLang(): string {\n    return this.defaultLang;\n  }\n\n  /**\n   * Changes the lang currently used\n   */\n  public use(lang: string): Observable<any> {\n    // don't change the language if the language given is already selected\n    if (lang === this.currentLang) {\n      return of(this.translations[lang]);\n    }\n\n    let pending: Observable<any> = this.retrieveTranslations(lang);\n\n    if (typeof pending !== \"undefined\") {\n      // on init set the currentLang immediately\n      if (!this.currentLang) {\n        this.currentLang = lang;\n      }\n\n      pending.pipe(take(1))\n        .subscribe((res: any) => {\n          this.changeLang(lang);\n        });\n\n      return pending;\n    } else { // we have this language, return an Observable\n      this.changeLang(lang);\n\n      return of(this.translations[lang]);\n    }\n  }\n\n  /**\n   * Retrieves the given translations\n   */\n  private retrieveTranslations(lang: string): Observable<any> {\n    let pending: Observable<any>;\n\n    // if this language is unavailable, ask for it\n    if (typeof this.translations[lang] === \"undefined\") {\n      this._translationRequests[lang] = this._translationRequests[lang] || this.getTranslation(lang);\n      pending = this._translationRequests[lang];\n    }\n\n    return pending;\n  }\n\n  /**\n   * Gets an object of translations for a given language with the current loader\n   * and passes it through the compiler\n   */\n  public getTranslation(lang: string): Observable<any> {\n    this.pending = true;\n    const loadingTranslations = this.currentLoader.getTranslation(lang).pipe(share());\n    this.loadingTranslations = loadingTranslations.pipe(\n      take(1),\n      map((res: Object) => this.compiler.compileTranslations(res, lang)),\n      share()\n    );\n\n    this.loadingTranslations\n      .subscribe((res: Object) => {\n        this.translations[lang] = res;\n        this.updateLangs();\n        this.pending = false;\n      }, (err: any) => {\n        this.pending = false;\n      });\n\n    return loadingTranslations;\n  }\n\n  /**\n   * Manually sets an object of translations for a given language\n   * after passing it through the compiler\n   */\n  public setTranslation(lang: string, translations: Object, shouldMerge: boolean = false): void {\n    translations = this.compiler.compileTranslations(translations, lang);\n    if (shouldMerge && this.translations[lang]) {\n      this.translations[lang] = mergeDeep(this.translations[lang], translations);\n    } else {\n      this.translations[lang] = translations;\n    }\n    this.updateLangs();\n    this.onTranslationChange.emit({lang: lang, translations: this.translations[lang]});\n  }\n\n  /**\n   * Returns an array of currently available langs\n   */\n  public getLangs(): Array<string> {\n    return this.langs;\n  }\n\n  /**\n   * Add available langs\n   */\n  public addLangs(langs: Array<string>): void {\n    langs.forEach((lang: string) => {\n      if (this.langs.indexOf(lang) === -1) {\n        this.langs.push(lang);\n      }\n    });\n  }\n\n  /**\n   * Update the list of available langs\n   */\n  private updateLangs(): void {\n    this.addLangs(Object.keys(this.translations));\n  }\n\n  /**\n   * Returns the parsed result of the translations\n   */\n  public getParsedResult(translations: any, key: any, interpolateParams?: Object): any {\n    let res: string | Observable<string>;\n\n    if (key instanceof Array) {\n      let result: any = {},\n        observables: boolean = false;\n      for (let k of key) {\n        result[k] = this.getParsedResult(translations, k, interpolateParams);\n        if (typeof result[k].subscribe === \"function\") {\n          observables = true;\n        }\n      }\n      if (observables) {\n        let mergedObs: Observable<string>;\n        for (let k of key) {\n          let obs = typeof result[k].subscribe === \"function\" ? result[k] : of(result[k] as string);\n          if (typeof mergedObs === \"undefined\") {\n            mergedObs = obs;\n          } else {\n            mergedObs = merge(mergedObs, obs);\n          }\n        }\n        return mergedObs.pipe(\n          toArray(),\n          map((arr: Array<string>) => {\n            let obj: any = {};\n            arr.forEach((value: string, index: number) => {\n              obj[key[index]] = value;\n            });\n            return obj;\n          })\n        );\n      }\n      return result;\n    }\n\n    if (translations) {\n      res = this.parser.interpolate(this.parser.getValue(translations, key), interpolateParams);\n    }\n\n    if (typeof res === \"undefined\" && this.defaultLang && this.defaultLang !== this.currentLang && this.useDefaultLang) {\n      res = this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang], key), interpolateParams);\n    }\n\n    if (typeof res === \"undefined\") {\n      let params: MissingTranslationHandlerParams = {key, translateService: this};\n      if (typeof interpolateParams !== 'undefined') {\n        params.interpolateParams = interpolateParams;\n      }\n      res = this.missingTranslationHandler.handle(params);\n    }\n\n    return typeof res !== \"undefined\" ? res : key;\n  }\n\n  /**\n   * Gets the translated value of a key (or an array of keys)\n   * @returns the translated key, or an object of translated keys\n   */\n  public get(key: string | Array<string>, interpolateParams?: Object): Observable<string | any> {\n    if (!isDefined(key) || !key.length) {\n      throw new Error(`Parameter \"key\" required`);\n    }\n    // check if we are loading a new translation to use\n    if (this.pending) {\n      return Observable.create((observer: Observer<string>) => {\n        let onComplete = (res: string) => {\n          observer.next(res);\n          observer.complete();\n        };\n        let onError = (err: any) => {\n          observer.error(err);\n        };\n        this.loadingTranslations.subscribe((res: any) => {\n          res = this.getParsedResult(res, key, interpolateParams);\n          if (typeof res.subscribe === \"function\") {\n            res.subscribe(onComplete, onError);\n          } else {\n            onComplete(res);\n          }\n        }, onError);\n      });\n    } else {\n      let res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);\n      if (typeof res.subscribe === \"function\") {\n        return res;\n      } else {\n        return of(res);\n      }\n    }\n  }\n\n  /**\n   * Returns a stream of translated values of a key (or an array of keys) which updates\n   * whenever the language changes.\n   * @returns A stream of the translated key, or an object of translated keys\n   */\n  public stream(key: string | Array<string>, interpolateParams?: Object): Observable<string | any> {\n    if (!isDefined(key) || !key.length) {\n      throw new Error(`Parameter \"key\" required`);\n    }\n\n    return concat(\n      this.get(key, interpolateParams),\n      this.onLangChange.pipe(\n        switchMap((event: LangChangeEvent) => {\n          const res = this.getParsedResult(event.translations, key, interpolateParams);\n          if (typeof res.subscribe === \"function\") {\n            return res;\n          } else {\n            return of(res);\n          }\n        })\n      ));\n  }\n\n  /**\n   * Returns a translation instantly from the internal state of loaded translation.\n   * All rules regarding the current language, the preferred language of even fallback languages will be used except any promise handling.\n   */\n  public instant(key: string | Array<string>, interpolateParams?: Object): string | any {\n    if (!isDefined(key) || !key.length) {\n      throw new Error(`Parameter \"key\" required`);\n    }\n\n    let res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);\n    if (typeof res.subscribe !== \"undefined\") {\n      if (key instanceof Array) {\n        let obj: any = {};\n        key.forEach((value: string, index: number) => {\n          obj[key[index]] = key[index];\n        });\n        return obj;\n      }\n      return key;\n    } else {\n      return res;\n    }\n  }\n\n  /**\n   * Sets the translated value of a key, after compiling it\n   */\n  public set(key: string, value: string, lang: string = this.currentLang): void {\n    this.translations[lang][key] = this.compiler.compile(value, lang);\n    this.updateLangs();\n    this.onTranslationChange.emit({lang: lang, translations: this.translations[lang]});\n  }\n\n  /**\n   * Changes the current lang\n   */\n  private changeLang(lang: string): void {\n    this.currentLang = lang;\n    this.onLangChange.emit({lang: lang, translations: this.translations[lang]});\n\n    // if there is no default lang, use the one that we just set\n    if (!this.defaultLang) {\n      this.changeDefaultLang(lang);\n    }\n  }\n\n  /**\n   * Changes the default lang\n   */\n  private changeDefaultLang(lang: string): void {\n    this.defaultLang = lang;\n    this.onDefaultLangChange.emit({lang: lang, translations: this.translations[lang]});\n  }\n\n  /**\n   * Allows to reload the lang file from the file\n   */\n  public reloadLang(lang: string): Observable<any> {\n    this.resetLang(lang);\n    return this.getTranslation(lang);\n  }\n\n  /**\n   * Deletes inner translation\n   */\n  public resetLang(lang: string): void {\n    this._translationRequests[lang] = undefined;\n    this.translations[lang] = undefined;\n  }\n\n  /**\n   * Returns the language code name from the browser, e.g. \"de\"\n   */\n  public getBrowserLang(): string {\n    if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n      return undefined;\n    }\n\n    let browserLang: any = window.navigator.languages ? window.navigator.languages[0] : null;\n    browserLang = browserLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;\n\n    if (browserLang.indexOf('-') !== -1) {\n      browserLang = browserLang.split('-')[0];\n    }\n\n    if (browserLang.indexOf('_') !== -1) {\n      browserLang = browserLang.split('_')[0];\n    }\n\n    return browserLang;\n  }\n\n  /**\n   * Returns the culture language code name from the browser, e.g. \"de-DE\"\n   */\n  public getBrowserCultureLang(): string {\n    if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n      return undefined;\n    }\n\n    let browserCultureLang: any = window.navigator.languages ? window.navigator.languages[0] : null;\n    browserCultureLang = browserCultureLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;\n\n    return browserCultureLang;\n  }\n}\n","import {AfterViewChecked, ChangeDetectorRef, Directive, ElementRef, Input, OnDestroy} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {DefaultLangChangeEvent, LangChangeEvent, TranslateService, TranslationChangeEvent} from './translate.service';\nimport {equals, isDefined} from './util';\n\n@Directive({\n  selector: '[translate],[ngx-translate]'\n})\nexport class TranslateDirective implements AfterViewChecked, OnDestroy {\n  key: string;\n  lastParams: any;\n  currentParams: any;\n  onLangChangeSub: Subscription;\n  onDefaultLangChangeSub: Subscription;\n  onTranslationChangeSub: Subscription;\n\n  @Input() set translate(key: string) {\n    if (key) {\n      this.key = key;\n      this.checkNodes();\n    }\n  }\n\n  @Input() set translateParams(params: any) {\n    if (!equals(this.currentParams, params)) {\n      this.currentParams = params;\n      this.checkNodes(true);\n    }\n  }\n\n  constructor(private translateService: TranslateService, private element: ElementRef, private _ref: ChangeDetectorRef) {\n    // subscribe to onTranslationChange event, in case the translations of the current lang change\n    if (!this.onTranslationChangeSub) {\n      this.onTranslationChangeSub = this.translateService.onTranslationChange.subscribe((event: TranslationChangeEvent) => {\n        if (event.lang === this.translateService.currentLang) {\n          this.checkNodes(true, event.translations);\n        }\n      });\n    }\n\n    // subscribe to onLangChange event, in case the language changes\n    if (!this.onLangChangeSub) {\n      this.onLangChangeSub = this.translateService.onLangChange.subscribe((event: LangChangeEvent) => {\n        this.checkNodes(true, event.translations);\n      });\n    }\n\n    // subscribe to onDefaultLangChange event, in case the default language changes\n    if (!this.onDefaultLangChangeSub) {\n      this.onDefaultLangChangeSub = this.translateService.onDefaultLangChange.subscribe((event: DefaultLangChangeEvent) => {\n        this.checkNodes(true);\n      });\n    }\n  }\n\n  ngAfterViewChecked() {\n    this.checkNodes();\n  }\n\n  checkNodes(forceUpdate = false, translations?: any) {\n    let nodes: NodeList = this.element.nativeElement.childNodes;\n    // if the element is empty\n    if (!nodes.length) {\n      // we add the key as content\n      this.setContent(this.element.nativeElement, this.key);\n      nodes = this.element.nativeElement.childNodes;\n    }\n    for (let i = 0; i < nodes.length; ++i) {\n      let node: any = nodes[i];\n      if (node.nodeType === 3) { // node type 3 is a text node\n        let key: string;\n        if (this.key) {\n          key = this.key;\n          if (forceUpdate) {\n            node.lastKey = null;\n          }\n        } else {\n          let content = this.getContent(node);\n          let trimmedContent = content.trim();\n          if (trimmedContent.length) {\n            // we want to use the content as a key, not the translation value\n            if (content !== node.currentValue) {\n              key = trimmedContent;\n              // the content was changed from the user, we'll use it as a reference if needed\n              node.originalContent = this.getContent(node);\n            } else if (node.originalContent && forceUpdate) { // the content seems ok, but the lang has changed\n              node.lastKey = null;\n              // the current content is the translation, not the key, use the last real content as key\n              key = node.originalContent.trim();\n            }\n          }\n        }\n        this.updateValue(key, node, translations);\n      }\n    }\n  }\n\n  updateValue(key: string, node: any, translations: any) {\n    if (key) {\n      if (node.lastKey === key && this.lastParams === this.currentParams) {\n        return;\n      }\n\n      this.lastParams = this.currentParams;\n\n      let onTranslation = (res: string) => {\n        if (res !== key) {\n          node.lastKey = key;\n        }\n        if (!node.originalContent) {\n          node.originalContent = this.getContent(node);\n        }\n        node.currentValue = isDefined(res) ? res : (node.originalContent || key);\n        // we replace in the original content to preserve spaces that we might have trimmed\n        this.setContent(node, this.key ? node.currentValue : node.originalContent.replace(key, node.currentValue));\n        this._ref.markForCheck();\n      };\n\n      if (isDefined(translations)) {\n        let res = this.translateService.getParsedResult(translations, key, this.currentParams);\n        if (typeof res.subscribe === \"function\") {\n          res.subscribe(onTranslation);\n        } else {\n          onTranslation(res);\n        }\n      } else {\n        this.translateService.get(key, this.currentParams).subscribe(onTranslation);\n      }\n    }\n  }\n\n  getContent(node: any): string {\n    return isDefined(node.textContent) ? node.textContent : node.data;\n  }\n\n  setContent(node: any, content: string): void {\n    if (isDefined(node.textContent)) {\n      node.textContent = content;\n    } else {\n      node.data = content;\n    }\n  }\n\n  ngOnDestroy() {\n    if (this.onLangChangeSub) {\n      this.onLangChangeSub.unsubscribe();\n    }\n\n    if (this.onDefaultLangChangeSub) {\n      this.onDefaultLangChangeSub.unsubscribe();\n    }\n\n    if (this.onTranslationChangeSub) {\n      this.onTranslationChangeSub.unsubscribe();\n    }\n  }\n}\n","import {ChangeDetectorRef, EventEmitter, Injectable, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {DefaultLangChangeEvent, LangChangeEvent, TranslateService, TranslationChangeEvent} from './translate.service';\nimport {equals, isDefined} from './util';\n\n@Injectable()\n@Pipe({\n  name: 'translate',\n  pure: false // required to update the value when the promise is resolved\n})\nexport class TranslatePipe implements PipeTransform, OnDestroy {\n  value: string = '';\n  lastKey: string;\n  lastParams: any[];\n  onTranslationChange: EventEmitter<TranslationChangeEvent>;\n  onLangChange: EventEmitter<LangChangeEvent>;\n  onDefaultLangChange: EventEmitter<DefaultLangChangeEvent>;\n\n  constructor(private translate: TranslateService, private _ref: ChangeDetectorRef) {\n  }\n\n  updateValue(key: string, interpolateParams?: Object, translations?: any): void {\n    let onTranslation = (res: string) => {\n      this.value = res !== undefined ? res : key;\n      this.lastKey = key;\n      this._ref.markForCheck();\n    };\n    if (translations) {\n      let res = this.translate.getParsedResult(translations, key, interpolateParams);\n      if (typeof res.subscribe === 'function') {\n        res.subscribe(onTranslation);\n      } else {\n        onTranslation(res);\n      }\n    }\n    this.translate.get(key, interpolateParams).subscribe(onTranslation);\n  }\n\n  transform(query: string, ...args: any[]): any {\n    if (!query || query.length === 0) {\n      return query;\n    }\n\n    // if we ask another time for the same key, return the last value\n    if (equals(query, this.lastKey) && equals(args, this.lastParams)) {\n      return this.value;\n    }\n\n    let interpolateParams: Object;\n    if (isDefined(args[0]) && args.length) {\n      if (typeof args[0] === 'string' && args[0].length) {\n        // we accept objects written in the template such as {n:1}, {'n':1}, {n:'v'}\n        // which is why we might need to change it to real JSON objects such as {\"n\":1} or {\"n\":\"v\"}\n        let validArgs: string = args[0]\n          .replace(/(\\')?([a-zA-Z0-9_]+)(\\')?(\\s)?:/g, '\"$2\":')\n          .replace(/:(\\s)?(\\')(.*?)(\\')/g, ':\"$3\"');\n        try {\n          interpolateParams = JSON.parse(validArgs);\n        } catch (e) {\n          throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${args[0]}`);\n        }\n      } else if (typeof args[0] === 'object' && !Array.isArray(args[0])) {\n        interpolateParams = args[0];\n      }\n    }\n\n    // store the query, in case it changes\n    this.lastKey = query;\n\n    // store the params, in case they change\n    this.lastParams = args;\n\n    // set the value\n    this.updateValue(query, interpolateParams);\n\n    // if there is a subscription to onLangChange, clean it\n    this._dispose();\n\n    // subscribe to onTranslationChange event, in case the translations change\n    if (!this.onTranslationChange) {\n      this.onTranslationChange = this.translate.onTranslationChange.subscribe((event: TranslationChangeEvent) => {\n        if (this.lastKey && event.lang === this.translate.currentLang) {\n          this.lastKey = null;\n          this.updateValue(query, interpolateParams, event.translations);\n        }\n      });\n    }\n\n    // subscribe to onLangChange event, in case the language changes\n    if (!this.onLangChange) {\n      this.onLangChange = this.translate.onLangChange.subscribe((event: LangChangeEvent) => {\n        if (this.lastKey) {\n          this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated\n          this.updateValue(query, interpolateParams, event.translations);\n        }\n      });\n    }\n\n    // subscribe to onDefaultLangChange event, in case the default language changes\n    if (!this.onDefaultLangChange) {\n      this.onDefaultLangChange = this.translate.onDefaultLangChange.subscribe(() => {\n        if (this.lastKey) {\n          this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated\n          this.updateValue(query, interpolateParams);\n        }\n      });\n    }\n\n    return this.value;\n  }\n\n  /**\n   * Clean any existing subscription to change events\n   */\n  private _dispose(): void {\n    if (typeof this.onTranslationChange !== 'undefined') {\n      this.onTranslationChange.unsubscribe();\n      this.onTranslationChange = undefined;\n    }\n    if (typeof this.onLangChange !== 'undefined') {\n      this.onLangChange.unsubscribe();\n      this.onLangChange = undefined;\n    }\n    if (typeof this.onDefaultLangChange !== 'undefined') {\n      this.onDefaultLangChange.unsubscribe();\n      this.onDefaultLangChange = undefined;\n    }\n  }\n\n  ngOnDestroy(): void {\n    this._dispose();\n  }\n}\n","import {NgModule, ModuleWithProviders, Provider} from \"@angular/core\";\nimport {TranslateLoader, TranslateFakeLoader} from \"./lib/translate.loader\";\nimport {TranslateService} from \"./lib/translate.service\";\nimport {MissingTranslationHandler, FakeMissingTranslationHandler} from \"./lib/missing-translation-handler\";\nimport {TranslateParser, TranslateDefaultParser} from \"./lib/translate.parser\";\nimport {TranslateCompiler, TranslateFakeCompiler} from \"./lib/translate.compiler\";\nimport {TranslateDirective} from \"./lib/translate.directive\";\nimport {TranslatePipe} from \"./lib/translate.pipe\";\nimport {TranslateStore} from \"./lib/translate.store\";\nimport {USE_STORE} from \"./lib/translate.service\";\nimport {USE_DEFAULT_LANG} from \"./lib/translate.service\";\n\nexport * from \"./lib/translate.loader\";\nexport * from \"./lib/translate.service\";\nexport * from \"./lib/missing-translation-handler\";\nexport * from \"./lib/translate.parser\";\nexport * from \"./lib/translate.compiler\";\nexport * from \"./lib/translate.directive\";\nexport * from \"./lib/translate.pipe\";\nexport * from \"./lib/translate.store\";\n\nexport interface TranslateModuleConfig {\n  loader?: Provider;\n  compiler?: Provider;\n  parser?: Provider;\n  missingTranslationHandler?: Provider;\n  // isolate the service instance, only works for lazy loaded modules or components with the \"providers\" property\n  isolate?: boolean;\n  useDefaultLang?: boolean;\n}\n\n@NgModule({\n  declarations: [\n    TranslatePipe,\n    TranslateDirective\n  ],\n  exports: [\n    TranslatePipe,\n    TranslateDirective\n  ]\n})\nexport class TranslateModule {\n  /**\n   * Use this method in your root module to provide the TranslateService\n   */\n  static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders {\n    return {\n      ngModule: TranslateModule,\n      providers: [\n        config.loader || {provide: TranslateLoader, useClass: TranslateFakeLoader},\n        config.compiler || {provide: TranslateCompiler, useClass: TranslateFakeCompiler},\n        config.parser || {provide: TranslateParser, useClass: TranslateDefaultParser},\n        config.missingTranslationHandler || {provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler},\n        TranslateStore,\n        {provide: USE_STORE, useValue: config.isolate},\n        {provide: USE_DEFAULT_LANG, useValue: config.useDefaultLang},\n        TranslateService\n      ]\n    };\n  }\n\n  /**\n   * Use this method in your other (non root) modules to import the directive/pipe\n   */\n  static forChild(config: TranslateModuleConfig = {}): ModuleWithProviders {\n    return {\n      ngModule: TranslateModule,\n      providers: [\n        config.loader || {provide: TranslateLoader, useClass: TranslateFakeLoader},\n        config.compiler || {provide: TranslateCompiler, useClass: TranslateFakeCompiler},\n        config.parser || {provide: TranslateParser, useClass: TranslateDefaultParser},\n        config.missingTranslationHandler || {provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler},\n        {provide: USE_STORE, useValue: config.isolate},\n        {provide: USE_DEFAULT_LANG, useValue: config.useDefaultLang},\n        TranslateService\n      ]\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { CmHttpClient } from './http_client';\nimport {Observable, Subject} from 'rxjs';\nimport { OutsideJob } from '../components/cm-job-list/cm-job.model';\nimport { JobInLocationType, CmJobItem } from '../components/cm-job-list/item/cm-job-item.model';\nimport { CmTranslateService } from './localization/cm-translate.service';\nimport { CmGuardService } from './guards/cm-guard.service';\nimport {PageAdapter} from \"../components/cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {EventType} from \"./cm-bike-blocking.service\";\n\n@Injectable()\nexport class CmLocationsService {\n  public STATUS_ACTIVE = 'ACTIVE';\n  public STATUS_INACTIVE = 'INACTIVE';\n\n  private masterDataKey: string;\n  /*\n     Master data.\n     */\n  private masterDataLocations: Array<CmLocation> = [];\n  private masterDataMap: any = {};\n\n  private masterDataLoaded = new Subject<any>();\n  public masterDataLoaded$ = this.masterDataLoaded.asObservable();\n\n  private masterDataLoadedNew = new Subject<any>();\n  public masterDataLoadedNew$ = this.masterDataLoadedNew.asObservable();\n\n  /*\n     Database data.\n     */\n  private dataBaseData: CmDBJobList;\n\n  private dataBaseDataLoaded = new Subject<CmDBJobList>();\n  public dataBaseDataLoaded$ = this.dataBaseDataLoaded.asObservable();\n\n  //event for change MD\n  private changeMdSuccess = new Subject();\n  public changeMdSuccess$ = this.changeMdSuccess.asObservable();\n\n  //event for load data inside location\n  private locationItemLoaded = new Subject<Array<any>>();\n  public locationItemLoaded$ = this.locationItemLoaded.asObservable();\n\n  private retJson: any;\n\n  constructor(private http: CmHttpClient, private translate: CmTranslateService) {\n    this.masterDataKey = CmGuardService.getUserOrganizationFromToken();\n  }\n\n  public loadStationMD(callback?) {\n    if (this.masterDataLocations.length === 0) {\n      this.http.get('/master-data/api/v1/locations/' + this.masterDataKey).subscribe((data:any) => {\n        this.masterDataLocations = [];\n        let markers = data;\n        for (let marker in markers) {\n          let value = markers[marker];\n          value.fullName = this.getFullName(value);\n          value.ani = parseInt(marker);\n          if (!value.interval) {\n            value.interval = new CmLocationInterval();\n          }\n          this.masterDataLocations.push(value);\n          this.masterDataMap[marker] = value;\n        }\n        this.masterDataLoaded.next(this.masterDataLocations);\n        if (callback) {\n          callback.call(this);\n        }\n      });\n    } else {\n      this.masterDataLoaded.next(this.masterDataLocations);\n      if (callback) {\n        callback.call(this);\n      }\n    }\n  }\n\n    public loadStationMDNew(page, limit, filter?: string) {\n        this.http\n            .get<PageAdapter<CmLocation>>('/bikes-sql/api/v1/locations/list/?page=' + page + '&limit=' + limit + (filter ? filter : ''))\n            .subscribe(data => {\n                let val = data;\n                if (val.content) {\n                    val.content.forEach(el => {\n                        el.fullName = this.getFullName(el);\n                    });\n                }\n                this.masterDataLoadedNew.next(val);\n            });\n    }\n\n  public getById(id: number): CmLocation {\n    return this.masterDataMap[id] || { fullName: '' };\n  }\n\n  public getNameById(id: number): string {\n    let location = this.masterDataMap[id];\n    return location ? this.getFullName(location) : 'name';\n  }\n\n  public loadFullData(page: number, pageLimit: number, options?: any, filters?: string) {\n    this.http\n      .get<CmDBJobList>('/bikes/api/v1/tasks/list?page=' + page + '&limit=' + pageLimit + (filters ? filters : ''), options)\n      .subscribe(data => {\n        let dataParsed = data;\n        if (dataParsed.hasOwnProperty('total') && dataParsed.hasOwnProperty('list')) {\n          this.dataBaseData = dataParsed;\n        } else {\n          this.dataBaseData = {\n            list: [],\n            total: 0\n          };\n        }\n        this.loadStationMD(this.mergeDataBaseAndMasterData);\n      });\n  }\n\n  public submitData(key: number, value: CmLocation) {\n    this.http.put('/master-data/api/v1/locations/' + this.masterDataKey + '/' + key, value).subscribe(data => {\n      this.masterDataLocations = [];\n      this.masterDataMap = {};\n      this.loadStationMD(this.fireChangeSuccessEvent);\n    });\n  }\n\n  public loadDataByLocation(location) {\n    let jobItemList = [];\n    this.http.get<Array<JobItemServerData>>('/bikes/api/v1/tasks/list/location/' + location).subscribe(data => {\n      let serverData: Array<JobItemServerData> = data;\n      serverData.forEach(el => {\n        if (el.mv) this.addJobs(jobItemList, JobInLocationType.move, el.id, el.assignedTo, [el.mv]);\n        this.addJobs(jobItemList, JobInLocationType.check, el.id, el.assignedTo, this.convertCheck(el.check));\n        this.addJobs(jobItemList, JobInLocationType.moveToWs, el.id, el.assignedTo, this.convertCheck(el.toWs));\n      });\n      this.locationItemLoaded.next(jobItemList);\n    });\n  }\n\n  public locationStatusUpdate(locationId, locationStatus: string): Observable<any> {\n    return this.http.put(`/communication/api/v1/cm2dbrent/location/${locationId}`, { \"currentStatus\": locationStatus });\n  }\n\n  public getJobItemText(item: CmJobItem): string {\n    switch (item.taskType) {\n      case JobInLocationType.move:\n        let msg = '';\n        if (item.qty < 0) {\n          msg = this.translate.get('jobItem.UnloadLabel') + ' ' + -1 * item.qty;\n        } else {\n          msg = this.translate.get('jobItem.LoadLabel') + ' ' + item.qty;\n        }\n        return msg;\n      case JobInLocationType.check:\n        return this.translate.get('outsideJob.CheckLabel') + ' ' + item.bike;\n      case JobInLocationType.moveToWs:\n        return item.bike + ' ' + this.translate.get('outsideJob.ToWsLabel');\n    }\n  }\n\n  private addJobs(jobItemList: Array<any>, type: JobInLocationType, id: number, user: string, list: Array<number>) {\n    if (list) list.forEach(el => jobItemList.push(new CmJobItem(id, type, el, user, true)));\n  }\n\n  public getFullName(location) {\n    if (location) return location.locationName ? location.locationName : `${location.street1} / ${location.street2}`;\n\n    return '';\n  }\n\n  private mergeDataBaseAndMasterData() {\n    this.dataBaseData.list.forEach(job => {\n      let masterData = this.getById(job.location.locationId);\n      job.name = masterData ? this.getFullName(masterData) : '-';\n    });\n    this.dataBaseDataLoaded.next(this.dataBaseData);\n  }\n\n  private fireChangeSuccessEvent() {\n    this.changeMdSuccess.next(true);\n  }\n\n  private convertCheck(fromArray) {\n    let toArray = [];\n    for (let el of fromArray) {\n      toArray.push(el.bikeNumber);\n    }\n    return toArray;\n  }\n\n  public isLocationActive(location) {\n    return location.currentStatus !== this.STATUS_INACTIVE;\n  }\n\n\n}\n\nexport enum BikeType  {BIKE , PEDELEC , CARGOPEDELEC }\n\nexport class CmLocationInterval  {\n  startTime   : number = 0;\n  finishTime  : number = 0;\n  type : string;\n  min: number;\n  minFixTime: number;\n  thresholdMin: number;\n  max: number;\n  maxFixTime: number;\n  thresholdMax: number;\n  optimum: number;\n  locationId: number;\n}\n\nexport class CmLocation  {\n  locationNumber: number;\n  locationId: number;\n  locationName: string;\n  street1: string;\n  street2: string;\n  fullName: string;\n  postalCode: string;\n  district: string;\n  comment: string;\n  coordinates: any;\n  currentStatus: string;\n  type: string;\n}\n\nclass JobItemServerData {\n  id: number;\n  check: Array<number>;\n  mv: number;\n  location: number;\n  toWs: Array<number>;\n  assignedTo: string;\n}\n\nexport class CmDBJobList {\n  list: Array<OutsideJob> = [];\n  total: number;\n}\n","import {Serializable} from \"./serializable\";\nimport {CmCoordinates} from \"./coordinates\";\n\nexport class Marker extends Serializable {\n    name: string;\n    coordinates: CmCoordinates;\n    // latitude: number;\n    // longitude: number;\n    type: MarkerType;\n    quantities: any;\n    highlighted: boolean = true;\n    bordered: boolean = false;\n    hasLockedBikes: boolean;\n}\n\nexport enum MarkerType {\n    JOB,\n    BIKE,\n    EMPLOYEE,\n    BIKE_CLUSTER\n}","/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */\nimport { scan } from './scan';\nimport { takeLast } from './takeLast';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { pipe } from '../util/pipe';\nexport function reduce(accumulator, seed) {\n    if (arguments.length >= 2) {\n        return function reduceOperatorFunctionWithSeed(source) {\n            return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);\n        };\n    }\n    return function reduceOperatorFunction(source) {\n        return pipe(scan(function (acc, value, index) { return accumulator(acc, value, index + 1); }), takeLast(1))(source);\n    };\n}\n//# sourceMappingURL=reduce.js.map\n","/**\n * @copyright ngrx\n */\nimport { Action, ActionReducer } from './index';\nimport { BehaviorSubject, Observable, queueScheduler } from 'rxjs';\nimport { observeOn, scan } from 'rxjs/operators';\n\n\nexport class MiniState<T> extends BehaviorSubject<T> {\n  constructor(\n    _initialState: T,\n    actionsDispatcher$: Observable<Action>,\n    reducer: ActionReducer<T>\n  ) {\n    super(_initialState);\n\n    const actionInQueue$ = actionsDispatcher$.pipe(\n      observeOn(queueScheduler)\n    );\n    const state$ = actionInQueue$.pipe(\n      scan((state: T, action: Action) => {\n        if (!action) {\n          return state;\n        }\n\n        return reducer(state, action);\n      },\n      _initialState\n    ));\n\n    state$.subscribe((value: T) => this.next(value));\n  }\n}\n","/**\n * @copyright ngrx\n */\nimport { Observable, Observer, Operator } from 'rxjs';\nimport { distinctUntilChanged, map } from 'rxjs/operators';\nimport { Action, ActionReducer } from './index';\n\nexport class MiniStore<T> extends Observable<T> implements Observer<Action> {\n  constructor(\n    private _dispatcher: Observer<Action>,\n    /* tslint:disable-next-line: no-any */\n    private _reducer: ActionReducer<any>,\n    /* tslint:disable-next-line: no-any */\n    state$: Observable<any>\n  ) {\n    super();\n\n    /* tslint:disable-next-line: deprecation */\n    this.source = state$;\n  }\n\n  select<R>(pathOrMapFn: (state: T) => R): Observable<R> {\n    /* tslint:disable-next-line: deprecation */\n    const mapped$: Observable<R> = this.source.pipe(map(pathOrMapFn));\n\n    return mapped$.pipe(distinctUntilChanged());\n  }\n\n  lift<R>(operator: Operator<T, R>): MiniStore<R> {\n    const store = new MiniStore<R>(this._dispatcher, this._reducer, this);\n    /* tslint:disable-next-line: deprecation */\n    store.operator = operator;\n\n    return store;\n  }\n\n  dispatch(action: Action) {\n    this._dispatcher.next(action);\n  }\n\n  next(action: Action) {\n    this._dispatcher.next(action);\n  }\n\n  /* tslint:disable-next-line: no-any */\n  error(err: any) {\n    this._dispatcher.error(err);\n  }\n\n  complete() {\n    /*noop*/\n  }\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n    var hasSeed = false;\n    if (arguments.length >= 2) {\n        hasSeed = true;\n    }\n    return function scanOperatorFunction(source) {\n        return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n    };\n}\nvar ScanOperator = /*@__PURE__*/ (function () {\n    function ScanOperator(accumulator, seed, hasSeed) {\n        if (hasSeed === void 0) {\n            hasSeed = false;\n        }\n        this.accumulator = accumulator;\n        this.seed = seed;\n        this.hasSeed = hasSeed;\n    }\n    ScanOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n    };\n    return ScanOperator;\n}());\nvar ScanSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ScanSubscriber, _super);\n    function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n        var _this = _super.call(this, destination) || this;\n        _this.accumulator = accumulator;\n        _this._seed = _seed;\n        _this.hasSeed = hasSeed;\n        _this.index = 0;\n        return _this;\n    }\n    Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n        get: function () {\n            return this._seed;\n        },\n        set: function (value) {\n            this.hasSeed = true;\n            this._seed = value;\n        },\n        enumerable: true,\n        configurable: true\n    });\n    ScanSubscriber.prototype._next = function (value) {\n        if (!this.hasSeed) {\n            this.seed = value;\n            this.destination.next(value);\n        }\n        else {\n            return this._tryNext(value);\n        }\n    };\n    ScanSubscriber.prototype._tryNext = function (value) {\n        var index = this.index++;\n        var result;\n        try {\n            result = this.accumulator(this.seed, value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n        this.seed = result;\n        this.destination.next(result);\n    };\n    return ScanSubscriber;\n}(Subscriber));\n//# sourceMappingURL=scan.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nvar ReplaySubject = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ReplaySubject, _super);\n    function ReplaySubject(bufferSize, windowTime, scheduler) {\n        if (bufferSize === void 0) {\n            bufferSize = Number.POSITIVE_INFINITY;\n        }\n        if (windowTime === void 0) {\n            windowTime = Number.POSITIVE_INFINITY;\n        }\n        var _this = _super.call(this) || this;\n        _this.scheduler = scheduler;\n        _this._events = [];\n        _this._infiniteTimeWindow = false;\n        _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n        _this._windowTime = windowTime < 1 ? 1 : windowTime;\n        if (windowTime === Number.POSITIVE_INFINITY) {\n            _this._infiniteTimeWindow = true;\n            _this.next = _this.nextInfiniteTimeWindow;\n        }\n        else {\n            _this.next = _this.nextTimeWindow;\n        }\n        return _this;\n    }\n    ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {\n        if (!this.isStopped) {\n            var _events = this._events;\n            _events.push(value);\n            if (_events.length > this._bufferSize) {\n                _events.shift();\n            }\n        }\n        _super.prototype.next.call(this, value);\n    };\n    ReplaySubject.prototype.nextTimeWindow = function (value) {\n        if (!this.isStopped) {\n            this._events.push(new ReplayEvent(this._getNow(), value));\n            this._trimBufferThenGetEvents();\n        }\n        _super.prototype.next.call(this, value);\n    };\n    ReplaySubject.prototype._subscribe = function (subscriber) {\n        var _infiniteTimeWindow = this._infiniteTimeWindow;\n        var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n        var scheduler = this.scheduler;\n        var len = _events.length;\n        var subscription;\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else if (this.isStopped || this.hasError) {\n            subscription = Subscription.EMPTY;\n        }\n        else {\n            this.observers.push(subscriber);\n            subscription = new SubjectSubscription(this, subscriber);\n        }\n        if (scheduler) {\n            subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n        }\n        if (_infiniteTimeWindow) {\n            for (var i = 0; i < len && !subscriber.closed; i++) {\n                subscriber.next(_events[i]);\n            }\n        }\n        else {\n            for (var i = 0; i < len && !subscriber.closed; i++) {\n                subscriber.next(_events[i].value);\n            }\n        }\n        if (this.hasError) {\n            subscriber.error(this.thrownError);\n        }\n        else if (this.isStopped) {\n            subscriber.complete();\n        }\n        return subscription;\n    };\n    ReplaySubject.prototype._getNow = function () {\n        return (this.scheduler || queue).now();\n    };\n    ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n        var now = this._getNow();\n        var _bufferSize = this._bufferSize;\n        var _windowTime = this._windowTime;\n        var _events = this._events;\n        var eventsCount = _events.length;\n        var spliceCount = 0;\n        while (spliceCount < eventsCount) {\n            if ((now - _events[spliceCount].time) < _windowTime) {\n                break;\n            }\n            spliceCount++;\n        }\n        if (eventsCount > _bufferSize) {\n            spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n        }\n        if (spliceCount > 0) {\n            _events.splice(0, spliceCount);\n        }\n        return _events;\n    };\n    return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\nvar ReplayEvent = /*@__PURE__*/ (function () {\n    function ReplayEvent(time, value) {\n        this.time = time;\n        this.value = value;\n    }\n    return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map\n","/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */\nimport { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeTo = function (result) {\n    if (!!result && typeof result[Symbol_observable] === 'function') {\n        return subscribeToObservable(result);\n    }\n    else if (isArrayLike(result)) {\n        return subscribeToArray(result);\n    }\n    else if (isPromise(result)) {\n        return subscribeToPromise(result);\n    }\n    else if (!!result && typeof result[Symbol_iterator] === 'function') {\n        return subscribeToIterable(result);\n    }\n    else {\n        var value = isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n        var msg = \"You provided \" + value + \" where a stream was expected.\"\n            + ' You can provide an Observable, Promise, Array, or Iterable.';\n        throw new TypeError(msg);\n    }\n};\n//# sourceMappingURL=subscribeTo.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeToObservable = function (obj) {\n    return function (subscriber) {\n        var obs = obj[Symbol_observable]();\n        if (typeof obs.subscribe !== 'function') {\n            throw new TypeError('Provided object does not correctly implement Symbol.observable');\n        }\n        else {\n            return obs.subscribe(subscriber);\n        }\n    };\n};\n//# sourceMappingURL=subscribeToObservable.js.map\n","/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */\nimport { hostReportError } from './hostReportError';\nexport var subscribeToPromise = function (promise) {\n    return function (subscriber) {\n        promise.then(function (value) {\n            if (!subscriber.closed) {\n                subscriber.next(value);\n                subscriber.complete();\n            }\n        }, function (err) { return subscriber.error(err); })\n            .then(null, hostReportError);\n        return subscriber;\n    };\n};\n//# sourceMappingURL=subscribeToPromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport var subscribeToIterable = function (iterable) {\n    return function (subscriber) {\n        var iterator = iterable[Symbol_iterator]();\n        do {\n            var item = void 0;\n            try {\n                item = iterator.next();\n            }\n            catch (err) {\n                subscriber.error(err);\n                return subscriber;\n            }\n            if (item.done) {\n                subscriber.complete();\n                break;\n            }\n            subscriber.next(item.value);\n            if (subscriber.closed) {\n                break;\n            }\n        } while (true);\n        if (typeof iterator.return === 'function') {\n            subscriber.add(function () {\n                if (iterator.return) {\n                    iterator.return();\n                }\n            });\n        }\n        return subscriber;\n    };\n};\n//# sourceMappingURL=subscribeToIterable.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function hostReportError(err) {\n    setTimeout(function () { throw err; }, 0);\n}\n//# sourceMappingURL=hostReportError.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n    var hasDefaultValue = arguments.length >= 2;\n    return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=first.js.map\n","export const BIKE_TYPE = 'BIKE';\nexport const LOCATION_TYPE = 'LOCATION';\nexport const BIKE_AND_LOCATION_TYPES = 'BOTH';","import {Injectable} from \"@angular/core\";\nimport {NavigationStart, Router} from \"@angular/router\";\n\n@Injectable()\nexport class CmComponentTrackerService {\n    private isDetailedComponent: boolean;\n    private component: string;\n    private goFromParentComponentPage: number;\n    private componentLastPageMapping = {};\n    private isBackFromDetailedToParent: boolean;\n\n    readLastParentPageForCurrentComponentIfExist() {\n        return this.isBackFromDetailedToParent ? this.componentLastPageMapping[this.component] : null;\n    }\n\n    constructor(private router:Router){\n        router.events.subscribe(event => {\n            if(event instanceof NavigationStart) {\n                let parts: string[] = event.url.split(\"/\");\n                let isDetailedComponent: boolean = this.isNumeric(parts[parts.length-1].charAt(0));\n                let component = isDetailedComponent ? parts[parts.length -2] : parts[parts.length-1];\n\n                if(this.goFromParentComponentPage) {\n                    this.componentLastPageMapping[component] = this.goFromParentComponentPage;\n                    this.goFromParentComponentPage = null;\n                }\n\n                //calculate if we are back from details to main page\n                this.isBackFromDetailedToParent = this.isDetailedComponent && !isDetailedComponent && this.component == component;\n\n                this.isDetailedComponent = isDetailedComponent;\n                this.component = component;\n            }\n        });\n    }\n\n    private isNumeric(n) {\n        return !isNaN(parseFloat(n)) && isFinite(n);\n    }\n\n    public goToDetailsFromParentPage(page: number) {\n        this.goFromParentComponentPage = page;\n    }\n}","/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { EmptyError } from '../util/EmptyError';\nimport { Subscriber } from '../Subscriber';\nexport function throwIfEmpty(errorFactory) {\n    if (errorFactory === void 0) {\n        errorFactory = defaultErrorFactory;\n    }\n    return function (source) {\n        return source.lift(new ThrowIfEmptyOperator(errorFactory));\n    };\n}\nvar ThrowIfEmptyOperator = /*@__PURE__*/ (function () {\n    function ThrowIfEmptyOperator(errorFactory) {\n        this.errorFactory = errorFactory;\n    }\n    ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n    };\n    return ThrowIfEmptyOperator;\n}());\nvar ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ThrowIfEmptySubscriber, _super);\n    function ThrowIfEmptySubscriber(destination, errorFactory) {\n        var _this = _super.call(this, destination) || this;\n        _this.errorFactory = errorFactory;\n        _this.hasValue = false;\n        return _this;\n    }\n    ThrowIfEmptySubscriber.prototype._next = function (value) {\n        this.hasValue = true;\n        this.destination.next(value);\n    };\n    ThrowIfEmptySubscriber.prototype._complete = function () {\n        if (!this.hasValue) {\n            var err = void 0;\n            try {\n                err = this.errorFactory();\n            }\n            catch (e) {\n                err = e;\n            }\n            this.destination.error(err);\n        }\n        else {\n            return this.destination.complete();\n        }\n    };\n    return ThrowIfEmptySubscriber;\n}(Subscriber));\nfunction defaultErrorFactory() {\n    return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map\n","/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nvar NONE = {};\nexport function combineLatest() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    var resultSelector = undefined;\n    var scheduler = undefined;\n    if (isScheduler(observables[observables.length - 1])) {\n        scheduler = observables.pop();\n    }\n    if (typeof observables[observables.length - 1] === 'function') {\n        resultSelector = observables.pop();\n    }\n    if (observables.length === 1 && isArray(observables[0])) {\n        observables = observables[0];\n    }\n    return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nvar CombineLatestOperator = /*@__PURE__*/ (function () {\n    function CombineLatestOperator(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    CombineLatestOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n    };\n    return CombineLatestOperator;\n}());\nexport { CombineLatestOperator };\nvar CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(CombineLatestSubscriber, _super);\n    function CombineLatestSubscriber(destination, resultSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.resultSelector = resultSelector;\n        _this.active = 0;\n        _this.values = [];\n        _this.observables = [];\n        return _this;\n    }\n    CombineLatestSubscriber.prototype._next = function (observable) {\n        this.values.push(NONE);\n        this.observables.push(observable);\n    };\n    CombineLatestSubscriber.prototype._complete = function () {\n        var observables = this.observables;\n        var len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            this.active = len;\n            this.toRespond = len;\n            for (var i = 0; i < len; i++) {\n                var observable = observables[i];\n                this.add(subscribeToResult(this, observable, undefined, i));\n            }\n        }\n    };\n    CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n        if ((this.active -= 1) === 0) {\n            this.destination.complete();\n        }\n    };\n    CombineLatestSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) {\n        var values = this.values;\n        var oldVal = values[outerIndex];\n        var toRespond = !this.toRespond\n            ? 0\n            : oldVal === NONE ? --this.toRespond : this.toRespond;\n        values[outerIndex] = innerValue;\n        if (toRespond === 0) {\n            if (this.resultSelector) {\n                this._tryResultSelector(values);\n            }\n            else {\n                this.destination.next(values.slice());\n            }\n        }\n    };\n    CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n        var result;\n        try {\n            result = this.resultSelector.apply(this, values);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    };\n    return CombineLatestSubscriber;\n}(OuterSubscriber));\nexport { CombineLatestSubscriber };\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n    return new Observable(function (subscriber) {\n        var input;\n        try {\n            input = observableFactory();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        var source = input ? from(input) : empty();\n        return source.subscribe(subscriber);\n    });\n}\n//# sourceMappingURL=defer.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    var concurrent = Number.POSITIVE_INFINITY;\n    var scheduler = null;\n    var last = observables[observables.length - 1];\n    if (isScheduler(last)) {\n        scheduler = observables.pop();\n        if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n            concurrent = observables.pop();\n        }\n    }\n    else if (typeof last === 'number') {\n        concurrent = observables.pop();\n    }\n    if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n        return observables[0];\n    }\n    return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */\nimport { mergeAll } from './mergeAll';\nexport function concatAll() {\n    return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map\n","/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nexport function concatMap(project, resultSelector) {\n    return mergeMap(project, resultSelector, 1);\n}\n//# sourceMappingURL=concatMap.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function catchError(selector) {\n    return function catchErrorOperatorFunction(source) {\n        var operator = new CatchOperator(selector);\n        var caught = source.lift(operator);\n        return (operator.caught = caught);\n    };\n}\nvar CatchOperator = /*@__PURE__*/ (function () {\n    function CatchOperator(selector) {\n        this.selector = selector;\n    }\n    CatchOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n    };\n    return CatchOperator;\n}());\nvar CatchSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(CatchSubscriber, _super);\n    function CatchSubscriber(destination, selector, caught) {\n        var _this = _super.call(this, destination) || this;\n        _this.selector = selector;\n        _this.caught = caught;\n        return _this;\n    }\n    CatchSubscriber.prototype.error = function (err) {\n        if (!this.isStopped) {\n            var result = void 0;\n            try {\n                result = this.selector(err, this.caught);\n            }\n            catch (err2) {\n                _super.prototype.error.call(this, err2);\n                return;\n            }\n            this._unsubscribeAndRecycle();\n            var innerSubscriber = new SimpleInnerSubscriber(this);\n            this.add(innerSubscriber);\n            var innerSubscription = innerSubscribe(result, innerSubscriber);\n            if (innerSubscription !== innerSubscriber) {\n                this.add(innerSubscription);\n            }\n        }\n    };\n    return CatchSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=catchError.js.map\n","/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */\nimport { identity } from './identity';\nexport function pipe() {\n    var fns = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        fns[_i] = arguments[_i];\n    }\n    return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n    if (fns.length === 0) {\n        return identity;\n    }\n    if (fns.length === 1) {\n        return fns[0];\n    }\n    return function piped(input) {\n        return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n    };\n}\n//# sourceMappingURL=pipe.js.map\n","/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n    if (concurrent === void 0) {\n        concurrent = Number.POSITIVE_INFINITY;\n    }\n    return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n    return function takeLastOperatorFunction(source) {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeLastOperator(count));\n        }\n    };\n}\nvar TakeLastOperator = /*@__PURE__*/ (function () {\n    function TakeLastOperator(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    TakeLastOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n    };\n    return TakeLastOperator;\n}());\nvar TakeLastSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TakeLastSubscriber, _super);\n    function TakeLastSubscriber(destination, total) {\n        var _this = _super.call(this, destination) || this;\n        _this.total = total;\n        _this.ring = new Array();\n        _this.count = 0;\n        return _this;\n    }\n    TakeLastSubscriber.prototype._next = function (value) {\n        var ring = this.ring;\n        var total = this.total;\n        var count = this.count++;\n        if (ring.length < total) {\n            ring.push(value);\n        }\n        else {\n            var index = count % total;\n            ring[index] = value;\n        }\n    };\n    TakeLastSubscriber.prototype._complete = function () {\n        var destination = this.destination;\n        var count = this.count;\n        if (count > 0) {\n            var total = this.count >= this.total ? this.total : this.count;\n            var ring = this.ring;\n            for (var i = 0; i < total; i++) {\n                var idx = (count++) % total;\n                destination.next(ring[idx]);\n            }\n        }\n        destination.complete();\n    };\n    return TakeLastSubscriber;\n}(Subscriber));\n//# sourceMappingURL=takeLast.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n    if (!scheduler) {\n        return new Observable(function (subscriber) { return subscriber.error(error); });\n    }\n    else {\n        return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });\n    }\n}\nfunction dispatch(_a) {\n    var error = _a.error, subscriber = _a.subscriber;\n    subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar nextHandle = 1;\nvar RESOLVED = /*@__PURE__*/ (function () { return /*@__PURE__*/ Promise.resolve(); })();\nvar activeHandles = {};\nfunction findAndClearHandle(handle) {\n    if (handle in activeHandles) {\n        delete activeHandles[handle];\n        return true;\n    }\n    return false;\n}\nexport var Immediate = {\n    setImmediate: function (cb) {\n        var handle = nextHandle++;\n        activeHandles[handle] = true;\n        RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); });\n        return handle;\n    },\n    clearImmediate: function (handle) {\n        findAndClearHandle(handle);\n    },\n};\nexport var TestTools = {\n    pending: function () {\n        return Object.keys(activeHandles).length;\n    }\n};\n//# sourceMappingURL=Immediate.js.map\n","/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Immediate } from '../util/Immediate';\nimport { AsyncAction } from './AsyncAction';\nvar AsapAction = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AsapAction, _super);\n    function AsapAction(scheduler, work) {\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        return _this;\n    }\n    AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (delay !== null && delay > 0) {\n            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n    };\n    AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n        }\n        if (scheduler.actions.length === 0) {\n            Immediate.clearImmediate(id);\n            scheduler.scheduled = undefined;\n        }\n        return undefined;\n    };\n    return AsapAction;\n}(AsyncAction));\nexport { AsapAction };\n//# sourceMappingURL=AsapAction.js.map\n","/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */\nimport { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport var asapScheduler = /*@__PURE__*/ new AsapScheduler(AsapAction);\nexport var asap = asapScheduler;\n//# sourceMappingURL=asap.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AsapScheduler = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AsapScheduler, _super);\n    function AsapScheduler() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    AsapScheduler.prototype.flush = function (action) {\n        this.active = true;\n        this.scheduled = undefined;\n        var actions = this.actions;\n        var error;\n        var index = -1;\n        var count = actions.length;\n        action = action || actions.shift();\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (++index < count && (action = actions.shift()));\n        this.active = false;\n        if (error) {\n            while (++index < count && (action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    };\n    return AsapScheduler;\n}(AsyncScheduler));\nexport { AsapScheduler };\n//# sourceMappingURL=AsapScheduler.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {\n    function UnsubscriptionErrorImpl(errors) {\n        Error.call(this);\n        this.message = errors ?\n            errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n  ') : '';\n        this.name = 'UnsubscriptionError';\n        this.errors = errors;\n        return this;\n    }\n    UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n    return UnsubscriptionErrorImpl;\n})();\nexport var UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport var rxSubscriber = /*@__PURE__*/ (function () {\n    return typeof Symbol === 'function'\n        ? /*@__PURE__*/ Symbol('rxSubscriber')\n        : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();\n})();\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import {Component, Input} from '@angular/core';\n\n@Component({\n    selector: 'cm-sortable',\n    template: require('./cm-sortable-th.component.html'),\n    styles: [require('./cm-sortable-th.component.scss').toString()]\n})\nexport class CmSortableThComponent {\n\n    @Input() label: string;\n    @Input() sort: boolean = false;\n    @Input() state: string;\n\n    constructor() {\n    }\n\n    private isSortAsc() {\n        return this.sort && this.state === ASC_STRING;\n    }\n\n    private isSortDesc() {\n        return this.sort && this.state === DESC_STRING;\n    }\n\n    private isNoSort() {\n        return !this.sort || this.state !== ASC_STRING && this.state !== DESC_STRING;\n    }\n}\n\nexport const ASC_STRING = 'ASC';\nexport const DESC_STRING = 'DESC';","import {Marker, MarkerType} from \"./marker\";\n\nexport class Bike extends Marker {\n    bike: number;\n    bikeId: number;\n    bikeNumber : string;\n    status : string;\n    pedelec: boolean;\n    battery: Battery;\n}\n\nexport class Battery {\n    charging: boolean;\n    chargeInPercent: number;\n}\n\nexport enum BikeType {\n    BIKE = \"BIKE\",\n    PEDELEC = \"PEDELEC\",\n    CARGOPEDELEC = 'CARGOPEDELEC'\n}","import {Component, EventEmitter, Input, OnInit, Output} from \"@angular/core\";\nimport * as moment from \"moment/moment\";\nimport {timer, Subscription} from \"rxjs\";\nimport {DataService} from \"../../services/cm-data.service\";\nimport {CmArchivedReport} from \"./cm-archived-report.model\";\nimport {CmProgressbarConfModel} from \"./cm-progressbar-conf.model\";\nimport {CmUtil} from \"../../shared/cm-util\";\nimport {Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmTranslateService} from \"../../services/localization/cm-translate.service\";\n\n@Component({\n    selector: 'cm-report',\n    template: require('./cm-report.component.html'),\n    styles: [require('./cm-report.component.css').toString()]\n})\n\nexport class CmReportComponent implements OnInit {\n    @Input() reportType: string;\n    @Input() hideCancelButton: boolean;\n    @Output() processingAction = new EventEmitter();\n    @Output() onListSize = new EventEmitter<Number>();\n\n    private pbConf: CmProgressbarConfModel = new CmProgressbarConfModel();\n    private archivedReports: CmArchivedReport[];\n    processing: boolean = false;\n    private updateArchivedListSubs: Subscription;\n    private progressbarSubs: Subscription;\n\n    constructor(\n        private dataService: DataService,\n        private modal: Modal,\n        private translate: CmTranslateService){\n    }\n\n    ngOnDestroy() {\n        this.updateArchivedListSubs.unsubscribe();\n        this.progressbarSubs.unsubscribe();\n    }\n\n    ngOnInit() {\n        this.loadArchivedList();\n\n        this.updateArchivedListSubs = timer(1000, 1000)\n            .subscribe(x => {\n                if(this.processing) this.loadArchivedList();\n            });\n\n        this.progressbarSubs = timer(1000, this.pbConf.delay)\n            .subscribe(x => {\n                this.pbConf.value = this.pbConf.value + this.pbConf.step  > this.pbConf.max\n                    ? this.pbConf.min\n                    : this.pbConf.value += Math.floor(Math.random() * this.pbConf.step);\n            });\n    }\n\n\n    loadArchivedList() {\n        let substObjectMsg = this.translate.get('extractReporting.ObjectsName');\n        let substDonectMsg = this.translate.get('extractReporting.DoneName');\n        let subPocessing   = this.translate.get('excelReporting.processing');\n\n        this.dataService.getArchivedReportList(this.reportType).subscribe(\n            reports => {\n                let anyInProcess = false;\n                if(reports) {\n                    reports.forEach(r => {if(r.ready == false) anyInProcess = true});\n\n                    this.processing = anyInProcess;\n                    this.processingAction.emit(this.processing);\n                }\n                this.archivedReports = reports.sort((r1, r2) => r2.timestampCreated - r1.timestampCreated);\n                if(this.archivedReports) {\n                    this.archivedReports.forEach(rep => {\n                        rep.shortDetails = rep.shortDetails.replace(\"objects\",substObjectMsg ? substObjectMsg :\"objects\");\n                        rep.shortDetails =  rep.shortDetails.replace(/done/,substDonectMsg ? substDonectMsg :\"done\");\n                        if(rep.shortDetails == 'extractReporting.startFillingMsg'){\n                            rep.shortDetails = this.translate.get('extractReporting.startFillingMsg')\n                        }\n                        if(  rep.shortDetails.startsWith(\"excelReporting.processing\")  ){\n                            rep.shortDetails =  rep.shortDetails.replace(/excelReporting.processing/,subPocessing ? subPocessing : \"Processing...\")\n                        }\n                    }\n                    )\n                }\n                this.onListSize.emit(reports.length);\n            }, error1 => {\n                console.log(\"err: \" + error1);\n            });\n    }\n\n    startProcessingProcess(){\n        this.processing = true;\n        this.loadArchivedList();\n    }\n\n\n    removeArchivedReport(report: CmArchivedReport) {\n        this.modal.confirm()\n            .title( this.translate.get('extractReporting.confirmDeleteTitle'))\n            .message( this.translate.get('extractReporting.confirmDeleteMessage'))\n            .okBtn(this.translate.get('dialog.okBtn'))\n            .cancelBtn(this.translate.get('dialog.cancelBtn'))\n            .open().result\n            .then(result => this.dataService.deleteArchivedReport(report.fileUuid)\n                .subscribe(resp => {this.loadArchivedList()}),() => {});\n    }\n\n    removeLastReportFromList() {\n        let size = this.archivedReports.length;\n        if(size > 0){\n            this.dataService.deleteArchivedReport(this.archivedReports[size-1].fileUuid).subscribe(resp => {this.loadArchivedList()})\n        }\n    }\n\n    loadArchivedReport(report: CmArchivedReport) {\n        let dialogRef = this.modal.alert()\n            .message(this.translate.get('processing.Label'))\n            .okBtn(this.translate.get('cancel.Label'))\n            .open();\n\n        this.dataService.loadArchivedReport(report.fileUuid)\n            .subscribe(\n                data => {\n                            dialogRef.close(true);\n                            CmUtil.downloadFile(data, report.filename + '_' + this.timestampToDateStr(report.timestampCreated) + '.xlsx');\n                },\n                error => {\n                            dialogRef.close(true);\n                            console.log(\"Error downloading the file.\");\n                           this.modal.alert().message(\"Error downloading the file.\").okBtn(\"Ok\").open();\n                });\n    }\n\n    cancelReport() {\n        this.dataService.cancelReportProcessing(this.reportType)\n            .subscribe(resp => {\n                },\n                err => console.log(err));\n    }\n\n    timestampToDateStr(timestampCreated: number) {\n        // let offsetMillis = (new Date().getTimezoneOffset() * -1)*60*1000;\n        return moment(timestampCreated).format('DD.MM.YYYY HH:mm');\n    }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ProgressbarConfig {\n  /** if `true` changing value of progress bar will be animated */\n  animate: Boolean = false;\n  /** maximum total value of progress element */\n  max = 100;\n}\n","import { Component, HostBinding, Input } from '@angular/core';\nimport { ProgressbarConfig } from './progressbar.config';\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { BarComponent } from './bar.component';\n\n@Component({\n  selector: 'progressbar',\n  templateUrl: './progressbar.component.html',\n  styles: [\n    `\n    :host {\n      width: 100%;\n      display: flex;\n    }\n  `\n  ]\n})\nexport class ProgressbarComponent {\n  /** if `true` changing value of progress bar will be animated */\n  @Input()\n  set animate(value: boolean) {\n    this._animate = value;\n    this.bars.forEach((b: BarComponent) => {\n      b.animate = value;\n    });\n  }\n  /** If `true`, striped classes are applied */\n  @Input()\n  set striped(value: boolean) {\n    this._striped = value;\n    this.bars.forEach((b: BarComponent) => {\n      b.striped = value;\n    });\n  }\n\n  /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n  @Input() type: string;\n  /** current value of progress bar. Could be a number or array of objects\n   * like {\"value\":15,\"type\":\"info\",\"label\":\"15 %\"}\n   */\n  @Input()\n  /* tslint:disable-next-line:no-any */\n  set value(value: number | any[]) {\n    this.isStacked = Array.isArray(value);\n    this._value = value;\n  }\n  isStacked = false;\n  _striped: boolean;\n  _animate: boolean;\n  /* tslint:disable-next-line:no-any */\n  _value: number | any[];\n  get isBs3(): boolean {\n    return isBs3();\n  }\n\n  /** maximum total value of progress element */\n  @HostBinding('attr.max')\n  @Input()\n  get max(): number {\n    return this._max;\n  }\n\n  set max(v: number) {\n    this._max = v;\n    this.bars.forEach((bar: BarComponent) => {\n      bar.recalculatePercentage();\n    });\n  }\n\n  @HostBinding('class.progress') addClass = true;\n\n  /* tslint:disable-next-line:no-any */\n  bars: BarComponent[] = [];\n\n  protected _max = 100;\n\n  constructor(config: ProgressbarConfig) {\n    Object.assign(this, config);\n  }\n  addBar(bar: BarComponent): void {\n    bar.animate = this._animate;\n    bar.striped = this._striped;\n\n    this.bars.push(bar);\n  }\n\n  removeBar(bar: BarComponent): void {\n    this.bars.splice(this.bars.indexOf(bar), 1);\n  }\n}\n","import {\n  Component,\n  Host,\n  HostBinding,\n  Input,\n  OnDestroy,\n  OnInit\n} from '@angular/core';\n\nimport { ProgressbarComponent } from './progressbar.component';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n// todo: number pipe\n// todo: use query from progress?\n@Component({\n  selector: 'bar',\n  templateUrl: './bar.component.html',\n  host: {\n    role: 'progressbar',\n    'aria-valuemin': '0',\n    '[class]': '\"progress-bar \" + (type ? \"progress-bar-\" + type + \" bg-\" + type : \"\")',\n    '[class.progress-bar-animated]': '!isBs3 && animate',\n    '[class.progress-bar-striped]': 'striped',\n    '[class.active]': 'isBs3 && animate',\n    '[attr.aria-valuenow]': 'value',\n    '[attr.aria-valuetext]': 'percent ? percent.toFixed(0) + \"%\" : \"\"',\n    '[attr.aria-valuemax]': 'max',\n    '[style.height.%]': '\"100\"'\n  }\n})\nexport class BarComponent implements OnInit, OnDestroy {\n  max: number;\n\n  /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n  @Input() type: string;\n\n  /** current value of progress bar */\n  @Input()\n  get value(): number {\n    return this._value;\n  }\n\n  set value(v: number) {\n    if (!v && v !== 0) {\n      return;\n    }\n    this._value = v;\n    this.recalculatePercentage();\n  }\n\n  @HostBinding('style.width.%')\n  get setBarWidth() {\n    this.recalculatePercentage();\n\n    return this.percent;\n  }\n\n  get isBs3(): boolean {\n    return isBs3();\n  }\n\n  striped: boolean;\n  animate: boolean;\n  percent = 0;\n  progress: ProgressbarComponent;\n\n  protected _value: number;\n\n  constructor(@Host() progress: ProgressbarComponent) {\n    this.progress = progress;\n  }\n\n  ngOnInit(): void {\n    this.progress.addBar(this);\n  }\n\n  ngOnDestroy(): void {\n    this.progress.removeBar(this);\n  }\n\n  recalculatePercentage(): void {\n    this.percent = +(this.value / this.progress.max * 100).toFixed(2);\n\n    const totalPercentage = this.progress.bars\n      .reduce(function (total: number, bar: BarComponent): number {\n        return total + bar.percent;\n      }, 0);\n\n    if (totalPercentage > 100) {\n      this.percent -= totalPercentage - 100;\n    }\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\nimport { ProgressbarComponent } from './progressbar.component';\nimport { ProgressbarConfig } from './progressbar.config';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [BarComponent, ProgressbarComponent],\n  exports: [BarComponent, ProgressbarComponent]\n})\nexport class ProgressbarModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: ProgressbarModule, providers: [ProgressbarConfig] };\n  }\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function refCount() {\n    return function refCountOperatorFunction(source) {\n        return source.lift(new RefCountOperator(source));\n    };\n}\nvar RefCountOperator = /*@__PURE__*/ (function () {\n    function RefCountOperator(connectable) {\n        this.connectable = connectable;\n    }\n    RefCountOperator.prototype.call = function (subscriber, source) {\n        var connectable = this.connectable;\n        connectable._refCount++;\n        var refCounter = new RefCountSubscriber(subscriber, connectable);\n        var subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    };\n    return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RefCountSubscriber, _super);\n    function RefCountSubscriber(destination, connectable) {\n        var _this = _super.call(this, destination) || this;\n        _this.connectable = connectable;\n        return _this;\n    }\n    RefCountSubscriber.prototype._unsubscribe = function () {\n        var connectable = this.connectable;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        var refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        var connection = this.connection;\n        var sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    };\n    return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=refCount.js.map\n","/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_.._internal_symbol_iterator,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { fromArray } from './fromArray';\nimport { isArray } from '../util/isArray';\nimport { Subscriber } from '../Subscriber';\nimport { iterator as Symbol_iterator } from '../../internal/symbol/iterator';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function zip() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    var resultSelector = observables[observables.length - 1];\n    if (typeof resultSelector === 'function') {\n        observables.pop();\n    }\n    return fromArray(observables, undefined).lift(new ZipOperator(resultSelector));\n}\nvar ZipOperator = /*@__PURE__*/ (function () {\n    function ZipOperator(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    ZipOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));\n    };\n    return ZipOperator;\n}());\nexport { ZipOperator };\nvar ZipSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ZipSubscriber, _super);\n    function ZipSubscriber(destination, resultSelector, values) {\n        if (values === void 0) {\n            values = Object.create(null);\n        }\n        var _this = _super.call(this, destination) || this;\n        _this.resultSelector = resultSelector;\n        _this.iterators = [];\n        _this.active = 0;\n        _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined;\n        return _this;\n    }\n    ZipSubscriber.prototype._next = function (value) {\n        var iterators = this.iterators;\n        if (isArray(value)) {\n            iterators.push(new StaticArrayIterator(value));\n        }\n        else if (typeof value[Symbol_iterator] === 'function') {\n            iterators.push(new StaticIterator(value[Symbol_iterator]()));\n        }\n        else {\n            iterators.push(new ZipBufferIterator(this.destination, this, value));\n        }\n    };\n    ZipSubscriber.prototype._complete = function () {\n        var iterators = this.iterators;\n        var len = iterators.length;\n        this.unsubscribe();\n        if (len === 0) {\n            this.destination.complete();\n            return;\n        }\n        this.active = len;\n        for (var i = 0; i < len; i++) {\n            var iterator = iterators[i];\n            if (iterator.stillUnsubscribed) {\n                var destination = this.destination;\n                destination.add(iterator.subscribe());\n            }\n            else {\n                this.active--;\n            }\n        }\n    };\n    ZipSubscriber.prototype.notifyInactive = function () {\n        this.active--;\n        if (this.active === 0) {\n            this.destination.complete();\n        }\n    };\n    ZipSubscriber.prototype.checkIterators = function () {\n        var iterators = this.iterators;\n        var len = iterators.length;\n        var destination = this.destination;\n        for (var i = 0; i < len; i++) {\n            var iterator = iterators[i];\n            if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n                return;\n            }\n        }\n        var shouldComplete = false;\n        var args = [];\n        for (var i = 0; i < len; i++) {\n            var iterator = iterators[i];\n            var result = iterator.next();\n            if (iterator.hasCompleted()) {\n                shouldComplete = true;\n            }\n            if (result.done) {\n                destination.complete();\n                return;\n            }\n            args.push(result.value);\n        }\n        if (this.resultSelector) {\n            this._tryresultSelector(args);\n        }\n        else {\n            destination.next(args);\n        }\n        if (shouldComplete) {\n            destination.complete();\n        }\n    };\n    ZipSubscriber.prototype._tryresultSelector = function (args) {\n        var result;\n        try {\n            result = this.resultSelector.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    };\n    return ZipSubscriber;\n}(Subscriber));\nexport { ZipSubscriber };\nvar StaticIterator = /*@__PURE__*/ (function () {\n    function StaticIterator(iterator) {\n        this.iterator = iterator;\n        this.nextResult = iterator.next();\n    }\n    StaticIterator.prototype.hasValue = function () {\n        return true;\n    };\n    StaticIterator.prototype.next = function () {\n        var result = this.nextResult;\n        this.nextResult = this.iterator.next();\n        return result;\n    };\n    StaticIterator.prototype.hasCompleted = function () {\n        var nextResult = this.nextResult;\n        return Boolean(nextResult && nextResult.done);\n    };\n    return StaticIterator;\n}());\nvar StaticArrayIterator = /*@__PURE__*/ (function () {\n    function StaticArrayIterator(array) {\n        this.array = array;\n        this.index = 0;\n        this.length = 0;\n        this.length = array.length;\n    }\n    StaticArrayIterator.prototype[Symbol_iterator] = function () {\n        return this;\n    };\n    StaticArrayIterator.prototype.next = function (value) {\n        var i = this.index++;\n        var array = this.array;\n        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n    };\n    StaticArrayIterator.prototype.hasValue = function () {\n        return this.array.length > this.index;\n    };\n    StaticArrayIterator.prototype.hasCompleted = function () {\n        return this.array.length === this.index;\n    };\n    return StaticArrayIterator;\n}());\nvar ZipBufferIterator = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ZipBufferIterator, _super);\n    function ZipBufferIterator(destination, parent, observable) {\n        var _this = _super.call(this, destination) || this;\n        _this.parent = parent;\n        _this.observable = observable;\n        _this.stillUnsubscribed = true;\n        _this.buffer = [];\n        _this.isComplete = false;\n        return _this;\n    }\n    ZipBufferIterator.prototype[Symbol_iterator] = function () {\n        return this;\n    };\n    ZipBufferIterator.prototype.next = function () {\n        var buffer = this.buffer;\n        if (buffer.length === 0 && this.isComplete) {\n            return { value: null, done: true };\n        }\n        else {\n            return { value: buffer.shift(), done: false };\n        }\n    };\n    ZipBufferIterator.prototype.hasValue = function () {\n        return this.buffer.length > 0;\n    };\n    ZipBufferIterator.prototype.hasCompleted = function () {\n        return this.buffer.length === 0 && this.isComplete;\n    };\n    ZipBufferIterator.prototype.notifyComplete = function () {\n        if (this.buffer.length > 0) {\n            this.isComplete = true;\n            this.parent.notifyInactive();\n        }\n        else {\n            this.destination.complete();\n        }\n    };\n    ZipBufferIterator.prototype.notifyNext = function (innerValue) {\n        this.buffer.push(innerValue);\n        this.parent.checkIterators();\n    };\n    ZipBufferIterator.prototype.subscribe = function () {\n        return innerSubscribe(this.observable, new SimpleInnerSubscriber(this));\n    };\n    return ZipBufferIterator;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=zip.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(QueueAction, _super);\n    function QueueAction(scheduler, work) {\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        return _this;\n    }\n    QueueAction.prototype.schedule = function (state, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (delay > 0) {\n            return _super.prototype.schedule.call(this, state, delay);\n        }\n        this.delay = delay;\n        this.state = state;\n        this.scheduler.flush(this);\n        return this;\n    };\n    QueueAction.prototype.execute = function (state, delay) {\n        return (delay > 0 || this.closed) ?\n            _super.prototype.execute.call(this, state, delay) :\n            this._execute(state, delay);\n    };\n    QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n        }\n        return scheduler.flush(this);\n    };\n    return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map\n","/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */\nimport { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queueScheduler = /*@__PURE__*/ new QueueScheduler(QueueAction);\nexport var queue = queueScheduler;\n//# sourceMappingURL=queue.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(QueueScheduler, _super);\n    function QueueScheduler() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function isObject(x) {\n    return x !== null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map\n","/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n    while (observer) {\n        var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n        if (closed_1 || isStopped) {\n            return false;\n        }\n        else if (destination && destination instanceof Subscriber) {\n            observer = destination;\n        }\n        else {\n            observer = null;\n        }\n    }\n    return true;\n}\n//# sourceMappingURL=canReportError.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n    return new Observable(function (subscriber) {\n        var sub = new Subscription();\n        var i = 0;\n        sub.add(scheduler.schedule(function () {\n            if (i === input.length) {\n                subscriber.complete();\n                return;\n            }\n            subscriber.next(input[i++]);\n            if (!subscriber.closed) {\n                sub.add(this.schedule());\n            }\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleArray.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n    return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };\n}\nvar DistinctUntilChangedOperator = /*@__PURE__*/ (function () {\n    function DistinctUntilChangedOperator(compare, keySelector) {\n        this.compare = compare;\n        this.keySelector = keySelector;\n    }\n    DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n    };\n    return DistinctUntilChangedOperator;\n}());\nvar DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DistinctUntilChangedSubscriber, _super);\n    function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.keySelector = keySelector;\n        _this.hasKey = false;\n        if (typeof compare === 'function') {\n            _this.compare = compare;\n        }\n        return _this;\n    }\n    DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n        return x === y;\n    };\n    DistinctUntilChangedSubscriber.prototype._next = function (value) {\n        var key;\n        try {\n            var keySelector = this.keySelector;\n            key = keySelector ? keySelector(value) : value;\n        }\n        catch (err) {\n            return this.destination.error(err);\n        }\n        var result = false;\n        if (this.hasKey) {\n            try {\n                var compare = this.compare;\n                result = compare(this.key, key);\n            }\n            catch (err) {\n                return this.destination.error(err);\n            }\n        }\n        else {\n            this.hasKey = true;\n        }\n        if (!result) {\n            this.key = key;\n            this.destination.next(value);\n        }\n    };\n    return DistinctUntilChangedSubscriber;\n}(Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map\n","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n    closed: true,\n    next: function (value) { },\n    error: function (err) {\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            throw err;\n        }\n        else {\n            hostReportError(err);\n        }\n    },\n    complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */\nimport { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith() {\n    var array = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        array[_i] = arguments[_i];\n    }\n    var scheduler = array[array.length - 1];\n    if (isScheduler(scheduler)) {\n        array.pop();\n        return function (source) { return concat(array, source, scheduler); };\n    }\n    else {\n        return function (source) { return concat(array, source); };\n    }\n}\n//# sourceMappingURL=startWith.js.map\n","import {Injectable} from \"@angular/core\";\nimport {Router} from \"@angular/router\";\nimport {CmHttpClient} from \"./http_client\";\nimport {HttpClient, HttpHeaders, HttpParams} from \"@angular/common/http\";\nimport {Subject} from \"rxjs/Subject\";\nimport {CmTranslateService} from \"./localization/cm-translate.service\";\nimport {CmOrganizationService} from \"./cm-organization.service\";\n\n@Injectable()\nexport class CmAuthService {\n\n    private errorAuthText = new Subject<string>();\n    errorTextChanges$ = this.errorAuthText.asObservable();\n\n    private successLogin = new Subject<boolean>();\n    successLogin$ = this.successLogin.asObservable();\n    isLoggedIn: boolean;\n    alivePeriod = 60000;\n\n    private deviceManagementUrl: string = '/device-management';\n    private loginUrlPrefix: string = '/login/api/v1/in';\n    private loginRefreshPrefix: string = '/login/api/v1';\n    private logoutPrefix: string = '/login/api/v1/out';\n    private confPeriodPrefix: string = '/alive/api/v1/period';\n\n    constructor(private router: Router,\n                private сmHttpClient: CmHttpClient,\n                private translate: CmTranslateService,\n                private organizationService: CmOrganizationService,\n                private httpClient: HttpClient\n    ) {\n    }\n\n    login(username: string, password: string) {\n\n        let headers = this.createHeaders();\n        let requestOptions = {\n            headers: headers\n        };\n\n        let body =\n        {\n                'username': username,\n                'password': password,\n                'client_id':'employee-web-portal',\n                'grant_type':'password'\n        }\n\n        this.сmHttpClient.post(this.deviceManagementUrl + this.loginUrlPrefix,\n\n            body, requestOptions).subscribe(\n            data => {\n                let token = data;//.json();\n                localStorage.setItem(\"authToken\", JSON.stringify(token));\n                this.router.navigate(['/sec']);\n                this.successLogin.next(true);\n                this.isLoggedIn = true;\n                this.readAliveParameter();\n            },\n            error => this.loginError(error)\n        );\n    }\n\n    readAliveParameter() {\n        this.сmHttpClient.get<String>(this.deviceManagementUrl + this.confPeriodPrefix).subscribe(\n            (data:any) => {\n                let n = data;\n                if (n && !isNaN(parseFloat(n)) && isFinite(n)) this.alivePeriod = n*1000;\n            });\n    }\n\n    logout() {\n        this.сmHttpClient.post(this.deviceManagementUrl + this.logoutPrefix, {}).subscribe(\n            () => {},\n            error => console.log(error)\n        );\n\n        localStorage.removeItem('authToken');\n        this.organizationService.reset();\n        this.successLogin.next(false);\n        this.isLoggedIn = false;\n        this.router.navigate(['/login']);\n    }\n\n    refreshToken(token, urlToRedirect) {\n        let headers = this.createHeaders();\n        let requestOptions = {\n            headers: {Authorization: 'Basic ZW1wbG95ZWUtd2ViLXBvcnRhbDo='}\n        };\n\n        let body = new HttpParams()\n        .set('refresh_token', token)\n        .set('grant_type', 'refresh_token');\n\n        this.сmHttpClient.post(this.deviceManagementUrl + this.loginRefreshPrefix, body, requestOptions).subscribe(\n            data => {\n                let token = data;//.json();\n                localStorage.setItem(\"authToken\", JSON.stringify(token));\n                if(urlToRedirect) {\n                    this.router.navigate([urlToRedirect]);\n                }\n            },\n            error => {\n                this.logout();\n            }\n        );\n    }\n\n    private createHeaders(): HttpHeaders{\n        return new HttpHeaders().set('Authorization', 'Basic ZW1wbG95ZWUtd2ViLXBvcnRhbDo=');\n    }\n\n    private loginError(error) {\n        if (error.status == 400) {\n            if(error.error && error.error.error_description) {\n                this.errorAuthText.next(this.translate.get(error.error.error_description));\n            } else {\n                if (error.message) {\n                    this.errorAuthText.next(error.message);\n                } else {\n                    this.errorAuthText.next('Invalid user credentials!');\n                }\n            }\n        } else {\n            this.errorAuthText.next('Authentication service is unavailable!');\n        }\n    }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs/Observable\";\nimport { CmHttpClient } from \"./http_client\";\nimport { CmGuardService } from \"./guards/cm-guard.service\";\nimport { CmCoordinates } from \"./../shared/coordinates\";\nimport {CmCity} from \"./../components/cm-map/cm-map.component\"\nimport {map, share} from \"rxjs/operators\";\nimport {of} from \"rxjs\";\n\n@Injectable()\nexport class CmOrganizationService {\n  private citySettingsUrl = \"/bikes-sql/api/v1/cities\";\n\n  private settings: CmCity;\n\n  constructor(private http: CmHttpClient) {}\n\n  public loadOrganizationSettingsByLoginContext(): Observable<any> {\n    if (this.settings) {\n      return of(this.settings);\n    } else {\n      let orgaName: string = CmGuardService.getUserOrganizationFromToken();\n      // Extract organization name from login context\n      return this.http.get<CmCity>(this.citySettingsUrl + \"/name/\" + orgaName).pipe(map(settings => this.settings = settings));\n    }\n  }\n\n  private isSettingsValid(orgaSettings): boolean {\n    return (\n      orgaSettings &&\n      orgaSettings.eastLongitude &&\n      orgaSettings.westLongitude &&\n      orgaSettings.northLatitude &&\n      orgaSettings.southLatitude\n    );\n  }\n\n  // Loading the coordinates from remote service happens async. Make sure to use async pipe in template to subscribe to the returned Observable.\n  public loadCoordinatesByLoginContext(): Observable<CmCoordinates> {\n    let orgaSettings = this.loadOrganizationSettingsByLoginContext();\n    return orgaSettings\n      .pipe(map((response:any) =>\n        // Check for empty body to avoid parse error\n        this.extractCoordinates((<any>response))\n      ))\n      .pipe(share());\n  }\n\n  // Return the orgas coordinates or the coordinates of Berlin as fall back.\n  public extractCoordinates(orgaSettings?): CmCoordinates {\n    let coordinates: CmCoordinates = new CmCoordinates();\n\n    if (this.isSettingsValid(orgaSettings)) {\n      coordinates.latitude = (orgaSettings.northLatitude + orgaSettings.southLatitude) / 2;\n      coordinates.longitude = (orgaSettings.eastLongitude + orgaSettings.westLongitude) / 2;\n    } else {\n      console.warn(`Invalid orga settings ${JSON.stringify(orgaSettings)}. Refering to fall back orga Berlin instead!`);\n      coordinates.latitude = BERLIN_CENTER[0];\n      coordinates.longitude = BERLIN_CENTER[1];\n    }\n\n    return coordinates;\n  }\n\n  public reset() {\n    this.settings = null;\n  }\n}\nexport const BERLIN_CENTER = [52.520075, 13.404812];\n","import { Component } from \"@angular/core\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport {CmAliveService} from \"./services/cm-alive-service\";\n\n@Component({\n  selector: \"main\",\n  template: \"<router-outlet></router-outlet>\",\n})\nexport class AppComponent {\n  constructor(private translate: TranslateService, cmAliveService: CmAliveService) {\n    let selectedLang = localStorage.getItem(\"customerLang\") || DEFAULT_LANGUAGE;\n    this.translate.use(selectedLang);\n    cmAliveService.init();\n  }\n}\n\nexport const DEFAULT_LANGUAGE = \"de\";\n","export class Serializable {\n\n    fromJSON(json) {\n        for (var propName in json)\n            this[propName] = json[propName];\n        return this;\n    }\n\n}","import { Observable } from \"rxjs/Observable\";\nimport { BikeJobListItem, CmJobType } from \"./../cm-bike-job/cm-bike-job-list.model\";\nimport { EMPLOYEE_WORKLOAD_THRESHOLD } from \"./../../services/cm-user-workload.service\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { DialogRef, ModalComponent } from \"ngx-modialog\";\nimport { BSModalContext, Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { CmHttpClient } from \"../../services/http_client\";\nimport { CmTranslateService } from \"../../services/localization/cm-translate.service\";\nimport { CmUserWorkloadService } from \"../../services/cm-user-workload.service\";\n\n@Component({\n  selector: \"cm-assign\",\n  template: require(\"./cm-assign.component.html\"),\n  styles: [require(\"./cm-assign.component.scss\").toString()]\n})\nexport class CmAssignComponent implements OnInit, ModalComponent<CustomModalContext> {\n  context: CustomModalContext;\n\n  private employeeList: Array<Employee> = [];\n  private sourceEmployeeList: Array<Employee> = [];\n  private assignee: Employee;\n  private filter: string;\n\n  private unassign: string;\n\n  constructor(\n    public dialog: DialogRef<CustomModalContext>,\n    private http: CmHttpClient,\n    private translateService: CmTranslateService,\n    private workloadService: CmUserWorkloadService,\n    private modal: Modal\n  ) {\n    this.context = dialog.context;\n    this.unassign = this.translateService.get(\"unassign.Label\");\n  }\n\n  ngOnInit() {\n    this.http.get(\"/user-information/api/v1/users\").subscribe(data => {\n      if (this.unassign && this.unassign.length > 0) this.employeeList.push(new Employee(this.unassign));\n\n      let userList = Employee.sortUsers(data);\n      this.employeeList = this.employeeList.concat(userList);\n      this.sourceEmployeeList = JSON.parse(JSON.stringify(userList));\n    });\n  }\n\n  private close() {\n    this.context.parent.reloadData.call(this.context.parent);\n    this.dialog.close();\n  }\n\n  private selectEmployee(employee: Employee) {\n    this.assignee = employee;\n  }\n\n  private assign() {\n    if (this.assignee) {\n      let jobItems: BikeJobListItem[] = this.context.parent.jobItemList.filter(jobItem => jobItem.checked === true);\n\n      if (this.assignee.login === this.unassign) {\n        this.undispatch(jobItems);\n        return;\n      }\n\n      // For Check-Jobs we calculate the workload for the assignee and display a warning if the workload is too high\n      let checkJobs: BikeJobListItem[] = jobItems.filter(jobItem => CmJobType[CmJobType.TO_CHECK] === jobItem.task);\n      if (checkJobs && checkJobs.length > 0) {\n        this.workloadService.loadEmployeeWorkLoad(this.assignee).subscribe(\n          response => {\n            let employeeWorkLoad = response[this.assignee.login];\n            let jobsWorkLoad: number = this.workloadService.calculateJobsWorkload(checkJobs);\n            let workload = jobsWorkLoad || 0 + employeeWorkLoad || 0;\n            if (EMPLOYEE_WORKLOAD_THRESHOLD < workload) {\n              // Display warning\n              this.modal\n                .confirm()\n                .message(\n                  this.translateService.get(\"dispatching.workload.warning\", {\n                    assignee: this.getName(this.assignee),\n                    workload: workload\n                  })\n                )\n                .open()\n                  .result\n                .then(dialog => dialog.result)\n                .then(ok => this.dispatch(jobItems))\n                .catch(cancel => console.log(\"Cancel\"));\n            } else this.dispatch(jobItems);\n          },\n          error => {\n            console.log(JSON.stringify(error));\n            this.modal\n              .prompt()\n              .message(`Error occured while trying to load the workload for ${this.getName(this.assignee)}`)\n              .open();\n            this.dispatch(jobItems);\n          }\n        );\n      } else this.dispatch(jobItems);\n    }\n  }\n\n  private dispatch(jobItems: any[]) {\n    this.http\n      .post(`/bikes-sql/api/v1/tasks/booking?user=${this.assignee.login}`, jobItems.map(jobItem => jobItem.id))\n      .subscribe(data => this.close());\n  }\n\n  private undispatch(jobItems: any[]) {\n    this.http\n      .post(\"/bikes-sql/api/v1/tasks/unbooking\", jobItems.map(jobItem => jobItem.id))\n      .subscribe(data => this.close());\n  }\n\n  private filterUsers() {\n    if (this.filter) {\n      // this.employeeList = this.sourceEmployeeList.filter(el => el.login.indexOf(this.filter) >= 0);\n      this.employeeList = this.sourceEmployeeList.filter(el => {\n        let filterResult = -1;\n        if (el.lastName) {\n          filterResult = el.lastName.toLowerCase().search(this.filter.toLowerCase());\n          if (filterResult !== -1) return true;\n        }\n        if (el.firstName) {\n          filterResult = el.firstName.toLowerCase().search(this.filter.toLowerCase());\n          if (filterResult !== -1) return true;\n        }\n        if (el.login) {\n          filterResult = el.login.toLowerCase().search(this.filter.toLowerCase());\n          if (filterResult !== -1) return true;\n        }\n\n        return false;\n      });\n    } else {\n      this.employeeList = this.sourceEmployeeList;\n    }\n  }\n\n  private getName(employee: Employee): string {\n    // if (employee.firstName && employee.lastName) return `${employee.lastName} ${employee.firstName}`;\n\n    // return employee.login;\n    return Employee.getName(employee)\n  }\n}\n\nexport class CustomModalContext extends BSModalContext {\n  public parent: any;\n}\n\nexport class Employee {\n  login: string;\n  firstName: string;\n  lastName: string;\n\n  constructor(login) {\n    this.login = login;\n  }\n\n  // static getFullName(employee: Employee): string {\n  //   if (employee.firstName && employee.lastName) return `${employee.lastName} ${employee.firstName}`;\n  //   return employee.login;\n  // }\n  static getName(employee: Employee): string {\n    // if (employee.firstName && employee.lastName) return `${employee.lastName} ${employee.firstName}`;\n\n    return employee.login;\n  }\n\n  static sortUsers(userList) {\n    if (userList) {\n      return userList.sort((a, b) => {\n        // return Employee.getFullName(a).localeCompare(Employee.getFullName(b));\n        return Employee.getName(a).localeCompare(Employee.getName(b));\n      });\n    }\n    return [];\n  }\n}\n","import { CmOrganizationService } from './../../../services/cm-organization.service';\nimport { CmEmailServiceService } from './../../../services/cm-email-service.service';\nimport { Observable } from 'rxjs/Observable';\nimport { CmLocation } from '../../../services/cm-location.service';\nimport { CmUtil } from '../../../shared/cm-util';\nimport { OnDestroy } from '@angular/core';\nimport { Component, OnInit } from '@angular/core';\nimport { TroubleTicket, TroubleTicketBike } from '../cm-trouble-ticket.model';\nimport { Router } from '@angular/router';\nimport { CmHttpClient } from '../../../services/http_client';\nimport { DialogRef, ModalComponent, overlayConfigFactory } from 'ngx-modialog';\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { CmModalLocationListComponent } from '../../cm-location/modal-window/cm-modal-location-list.component';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport { CmModalBikeListComponent } from '../../cm-bike-short-list/modal-window/cm-modal-bike-list.component';\nimport { CmBikeListItem } from '../../cm-bike-short-list/cm-bike-list.model';\nimport { CmGuardService } from '../../../services/guards/cm-guard.service';\nimport { CmCoordinates } from '../../../shared/coordinates';\nimport { BikesJobListFilters } from '../../cm-bike-job/list/cm-bike-job-list.component';\nimport * as moment from 'moment/moment';\nimport { DataService } from '../../../services/cm-data.service';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { BIKE_TYPE, LOCATION_TYPE } from '../../../shared/const/missionType';\nimport { CmAmazonPicturesService } from '../../../services/cm-amazon-picture.service';\nimport { CmTroubleTicketListComponent } from '../list/cm-trouble-tiket-list.component';\nimport {zip} from 'rxjs';\nimport {CmTripModel} from \"./cm-trip-model\";\n\n@Component({\n  selector: 'cm-trouble-ticket',\n  template: require('./cm-trouble-ticket.component.html'),\n  styles: [require('./cm-trouble-ticket.component.scss').toString()]\n})\nexport class CmTroubleTicketComponent extends TabTitle implements OnInit, OnDestroy, ModalComponent<TTModalDialog> {\n  private ticket: TroubleTicket = new TroubleTicket();\n  private ticketId: number;\n  private missionType: string;\n  private types = [];\n  private priorityList = [1, 2, 3];\n\n  private isDataValid: boolean;\n\n  private emailToCustomer: boolean;\n\n  private emailToDispatcher: boolean;\n\n  private trip: CmTripModel = new CmTripModel();\n\n  private modelChanged: boolean = false;\n  private isSavePressed = false;\n\n  constructor(\n    public dialog: DialogRef<TTModalDialog>,\n    private http: CmHttpClient,\n    private dataService: DataService,\n    private router: Router,\n    private translate: CmTranslateService,\n    private modal: Modal,\n    private emailService: CmEmailServiceService,\n    private orgaService: CmOrganizationService,\n    private amazonPictures: CmAmazonPicturesService\n  ) {\n    super('troubleTickets.Title', translate);\n\n    this.ticketId = dialog.context.ticketId;\n    this.missionType = dialog.context.missionType;\n\n    if (dialog.context.bike) this.selectBike(dialog.context.bike);\n    if (dialog.context.location) this.selectLocation(dialog.context.location);\n  }\n\n  ngOnInit() {\n    this.dataService.returnLocalizedMap('troubleTicketsType').subscribe(\n        (data:any) => (this.types = data.troubleTicketsType)\n    );\n\n    if (this.ticketId > 0) {\n      this.http.get('/bikes-sql/api/v1/tickets/' + this.ticketId).subscribe(data => {\n        let ticket = data;\n        this.ticket = new TroubleTicket().fromJSON(ticket);\n        if(this.ticket.bike) {\n          this.ticket.bikes.push(\n              new TroubleTicketBike(this.ticket.bike.bikeId, this.ticket.bike.bikeNumber, this.ticket.coordinates)\n          );\n        }\n        this.loadTrip();\n      });\n    } else {\n      this.ticket.id = -1;\n    }\n\n    // DBREN-485: Prefill \"reporter\" with \"login\" of user\n    if (!this.ticket.reporter) this.ticket.reporter = CmGuardService.getUserName();\n  }\n\n\n  loadTrip():Observable<CmTripModel> {\n    if(!this.ticket || !this.ticket.bike || !this.ticket.bike.bikeId || !this.ticket.time ) return;\n    let url = '/bikes-sql/api/v1/bicycles/trip?bikeId='+this.ticket.bike.bikeId+'&after='+this.ticket.time;\n    this.http.get(url).subscribe(t => {\n      this.trip = new CmTripModel().fromJSON(t);\n    });\n  }\n\n  ngOnDestroy() {\n    // if (!this.dialog.destroyed) this.dialog.bailOut();\n    try {\n      this.dialog.bailOut();\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  public selectLocation(location: CmLocation) {\n    this.ticket.location = new CmLocation();\n    this.ticket.location.locationId = location.locationId;\n    this.ticket.location.locationName = location.fullName;\n  }\n\n  public selectBike(bike: CmBikeListItem) {\n    this.ticket.bike = bike;\n\n    if(bike.bikeId) {\n      this.http.get<TroubleTicket>('/bikes-sql/api/v1/bicycles/' + bike.bikeId).subscribe(data => {\n        this.ticket.coordinates = new CmCoordinates();\n        this.ticket.coordinates = data.coordinates;\n        this.ticket.bikes.push(new TroubleTicketBike(bike.bikeId, bike.bikeNumber, data.coordinates));\n      });\n    }else if(bike.bikeNumber){\n      this.http.get<TroubleTicket>('/bikes-sql/api/v1/bicycle/number/' + bike.bikeNumber).subscribe(data => {\n        if(!data){\n          return\n        }\n        this.ticket.coordinates = new CmCoordinates();\n        this.ticket.coordinates = data.coordinates;\n        this.ticket.bikes.push(new TroubleTicketBike(bike.bikeId, bike.bikeNumber, data.coordinates));\n      });\n    }\n\n  }\n\n  private setNoticeDate(value) {\n    setTimeout( () => this.ticket.time = value );\n  }\n\n  private closeAndRefreshParent() {\n    try {\n      this.dialog.context.parent.reloadData.call(this.dialog.context.parent);\n      this.dialog.close();\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private close() {\n    try {\n      this.dialog.close();\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private removeBike(row) {\n    let index = this.ticket.bikes.indexOf(row, 0);\n    if (index > -1) {\n      this.ticket.bikes.splice(index, 1);\n    }\n  }\n\n  submitPictures() {\n    let pictureLinks = [];\n    if (!this.ticket || !this.ticket.pictureNames || this.ticket.pictureNames.length < 1) return;\n    let pictures = this.ticket.pictureNames;\n\n    for (let i = 0; i < pictures.length; i++) {\n      if (pictures[i]) {\n        pictureLinks.push(this.amazonPictures.submitPicture(pictures[i]));\n      }\n    }\n\n    return pictureLinks;\n  }\n\n  private prepareSaveRequest() {\n    const url = '/script-support/api/v2/rules/run/saveComplain';\n    // Save pics remotely and store the links\n    // Why copy this.ticket?\n    let troubleTicket: TroubleTicket = JSON.parse(JSON.stringify(this.ticket));\n\n    // Allow changes on not closed tickets only\n    if (this.isExisting(troubleTicket) && !['Open', 'InProgress'].some(status => status === troubleTicket.status)) {\n      this.modal\n          .alert()\n          .message(this.translate.get('message.EditOnlyOpenTT'))\n          .open();\n      return;\n    }\n    troubleTicket.pictureNames = this.submitPictures();\n\n    const saveRequest: Observable<any> = this.http.post(this.isBikeTicketType() ? `${url}/bike` : `${url}/location`, {\n      complain: troubleTicket,\n      emailToCustomer: this.emailToCustomer,\n      emailToDispatcher: this.emailToDispatcher\n    });\n\n    return saveRequest;\n  }\n\n  private saveAndClose(isValid: boolean): any {\n    this.isSavePressed = true;\n    if(isValid == false){\n      return;\n    }\n    let saveRequest = this.prepareSaveRequest();\n\n    if (saveRequest) {\n      let dialogRef = this.modal.alert()\n          .message(this.translate.get('android.message.upload'))\n          .okBtn(this.translate.get('android.button.cancel'))\n          .open();\n      saveRequest.subscribe(\n        data => {\n          dialogRef.close();\n\n          this.modal\n            .alert()\n            .message(this.translate.get('message.SaveMsg'))\n            .open()\n              .result\n            .then(result => this.closeAndRefreshParent())\n            .catch(error => console.error(error))\n        },\n        error => {\n          dialogRef.close();\n\n          this.modal\n              .alert()\n              .message(error)\n              .open()\n        }\n      );\n    }\n  }\n\n  private isExisting(troubleTicket: TroubleTicket) {\n    return troubleTicket.id != -1;\n  }\n\n  private openLocations() {\n    this.modal.open(CmModalLocationListComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  private openBikes() {\n    this.modal.open(CmModalBikeListComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  private linkToHal() {\n    let linkToHal = () => {\n      let baseUrl = localStorage.getItem('halUrl') || 'https://hal-prod.service.dbrent.net';\n      let keyToHal = CmGuardService.getTokenParam('halKey') || '';\n      let url =\n          baseUrl +\n          '/buze/auto_buch_vergangen.php?auto_id=' +\n          (this.ticket.bike ? this.ticket.bike.bikeId : '') +\n          '&goto_buchung=' +\n          this.ticket.booking +\n          '&key=' +\n          keyToHal;\n      window.open(url, 'blank');\n    };\n    if (this.modelChanged) {\n      this.modelChangedConfirmDialog(linkToHal);\n      return;\n    } else {\n      linkToHal();\n    }\n  }\n\n  private modelChangedConfirmDialog(onYesListener) {\n    this.modal.confirm()\n        .okBtn(this.translate.get('common.yes')).okBtnClass('')\n        .cancelBtn(this.translate.get('common.no')).cancelBtnClass('')\n        .message(this.translate.get(\"troubleTickets.modelChanged\"))\n        .open().result.then(() => onYesListener(), () => {});\n  }\n\n  private turnIntoJob() {\n    let turnIntoJob = () => {\n      let url = '';\n      // Predefined filter for the following page\n      const bikeFilters: BikesJobListFilters = new BikesJobListFilters();\n      bikeFilters.clear();\n      switch (this.missionType) {\n        case BIKE_TYPE:\n          if (this.ticket.bike.bikeId) {\n            url = `/bikes-sql/api/v1/tasks/check/${this.ticket.bike.bikeId}`;\n            bikeFilters.bikeNumber = this.ticket.bike.bikeNumber;\n          }\n          break;\n        case LOCATION_TYPE:\n          if (this.ticket.location.locationId) {\n            url = `/bikes-sql/api/v1/tasks/location/${this.ticket.location.locationId}`;\n            bikeFilters.location = this.ticket.location.locationId.toString();\n          }\n          break;\n        default:\n          throw new Error(`Undefined missionType ${this.missionType}`);\n      }\n\n      // DBREN-481: First save ticket then turn into job\n      // Execute later\n      let saveRequest = this.prepareSaveRequest();\n      let turnIntoJobRequest = this.http.post(url, {});\n\n      zip(saveRequest, turnIntoJobRequest).subscribe(res => {\n        turnIntoJobRequest.subscribe(res => {\n          this.closeAndRefreshParent();\n          this.modal\n              .alert()\n              .message(this.translate.get('taskCreation.Label'))\n              .open()\n              .result\n              .then(dialog => dialog.result)\n              .then(result => {\n                if (this.dialog.context.parent instanceof CmTroubleTicketListComponent) {\n                  const now = new Date(bikeFilters.dateCreatedTo);\n                  bikeFilters.dateCreatedTo = moment(now.setMinutes(now.getMinutes() + 1)).format();\n                  bikeFilters.save();\n                  this.router.navigate(['/sec/bikeJobList']);\n                }\n              })\n              .catch(error => console.error(error));\n        });\n      });\n    };\n    if (this.modelChanged) {\n      this.modelChangedConfirmDialog(turnIntoJob);\n      return;\n    } else {\n      turnIntoJob();\n    }\n  }\n\n  private closeTicket() {\n    let closeTicket = () => {\n      this.http.put('/bikes-sql/api/v1/tickets/close/' + this.ticket.id, {}).subscribe(data => {\n        this.modal\n          .alert()\n          .message(this.translate.get('message.CloseTicket'))\n          .open()\n            .result\n          .then(dialog => dialog.result)\n          .then(result => this.closeAndRefreshParent())\n          .catch(error => console.error(error));\n      });\n    };\n    if (this.modelChanged) {\n      this.modelChangedConfirmDialog(closeTicket);\n      return;\n    } else {\n      closeTicket();\n    }\n  }\n\n  private formatTimestamp(dateStr) {\n    return CmUtil.formatDate(dateStr);\n  }\n\n  private isBikeTicketType() {\n    return (this.missionType && this.missionType == BIKE_TYPE) || this.ticket.type == BIKE_TYPE;\n  }\n\n  private isLocationTicketType() {\n    return (this.missionType && this.missionType == LOCATION_TYPE) || this.ticket.type == LOCATION_TYPE;\n  }\n\n  private getMissionType(): string {\n    return this.isLocationTicketType() ? LOCATION_TYPE : BIKE_TYPE;\n  }\n\n  private validate(): boolean {\n    // Validate Bike-Ticket\n    if (this.isBikeTicketType()) {\n      if (this.ticket.bikes && this.ticket.bikes.length <= 0) return false;\n      return true;\n    }\n\n    // Validate Location-Ticket\n    if (this.isLocationTicketType()) {\n      if (!this.ticket.location) return false;\n      return true;\n    }\n\n    return true;\n  }\n\n  userFormatTrip(firstTripInMinutes: number) {\n    if(!firstTripInMinutes) return \"\";\n    if(firstTripInMinutes == -1) return this.translate.get(\"report.troubleTicket.cell.Open\");\n    return CmTroubleTicketListComponent.convertMinutesToHhMmFormat(firstTripInMinutes);\n  }\n\n  getTripStart() {\n    if(!this.trip || (!this.trip.fromLocation && !this.trip.fromCoordinates)) return;\n    return this.trip.fromLocation ? this.trip.fromLocation.locationName\n        : this.trip.fromCoordinates.latitude + ' ' + this.trip.fromCoordinates.longitude;\n  }\n\n  getTripStop() {\n    if(!this.trip || (!this.trip.toLocation && !this.trip.toCoordinates)) return;\n    return this.trip.toLocation ? this.trip.toLocation.locationName\n        : this.trip.toCoordinates.latitude + ' ' + this.trip.toCoordinates.longitude;\n  }\n\n  private categoryChanged(category) {\n    this.ticket.category = category;\n    this.modelChanged = true;\n  }\n\n  getAdditionalBikeCategory() {\n    return this.ticket.category == 'Fahrrad kommuniziert nicht' ? this.ticket.category : null;\n  }\n}\n\nexport class TTModalDialog extends BSModalContext {\n  public ticketId: number;\n  public bike: CmBikeListItem;\n  public missionType: string;\n  public location: CmLocation;\n  public parent: any;\n}\n","export class ReportExtractParam {\n    method: string;\n    path: string;\n    body: any;\n    fields: Array<ReportExtractParamField>;\n    paging: boolean;\n}\n\nexport class ReportExtractParamField {\n    name: string;\n    label: string;\n    pattern: string;\n    timezone: string;\n    substitutions: any;\n\n    constructor(name: string, label?: string, pattern?: string, timezone?: string, substitutions?: any) {\n        this.name = name;\n        this.label = label;\n        this.pattern = pattern;\n        this.timezone = timezone;\n        this.substitutions = substitutions;\n    }\n}\n\n","import { Injectable } from '@angular/core';\nimport { Action } from 'ngx-bootstrap/mini-ngrx';\nimport {\n  TimeChangeEvent,\n  TimepickerComponentState,\n  Time\n} from '../timepicker.models';\n\n@Injectable()\nexport class TimepickerActions {\n  static readonly WRITE_VALUE = '[timepicker] write value from ng model';\n  static readonly CHANGE_HOURS = '[timepicker] change hours';\n  static readonly CHANGE_MINUTES = '[timepicker] change minutes';\n  static readonly CHANGE_SECONDS = '[timepicker] change seconds';\n  static readonly SET_TIME_UNIT = '[timepicker] set time unit';\n  static readonly UPDATE_CONTROLS = '[timepicker] update controls';\n\n  writeValue(value: Date | string) {\n    return {\n      type: TimepickerActions.WRITE_VALUE,\n      payload: value\n    };\n  }\n\n  changeHours(event: TimeChangeEvent) {\n    return {\n      type: TimepickerActions.CHANGE_HOURS,\n      payload: event\n    };\n  }\n\n  changeMinutes(event: TimeChangeEvent) {\n    return {\n      type: TimepickerActions.CHANGE_MINUTES,\n      payload: event\n    };\n  }\n\n  changeSeconds(event: TimeChangeEvent): Action {\n    return {\n      type: TimepickerActions.CHANGE_SECONDS,\n      payload: event\n    };\n  }\n\n  setTime(value: Time): Action {\n    return {\n      type: TimepickerActions.SET_TIME_UNIT,\n      payload: value\n    };\n  }\n\n  updateControls(value: TimepickerComponentState): Action {\n    return {\n      type: TimepickerActions.UPDATE_CONTROLS,\n      payload: value\n    };\n  }\n}\n","import { Time, TimepickerComponentState } from './timepicker.models';\n\nconst dex = 10;\nconst hoursPerDay = 24;\nconst hoursPerDayHalf = 12;\nconst minutesPerHour = 60;\nconst secondsPerMinute = 60;\n\nexport function isValidDate(value?: string | Date): boolean {\n  if (!value) {\n    return false;\n  }\n\n  if (value instanceof Date && isNaN(value.getHours())) {\n    return false;\n  }\n\n  if (typeof value === 'string') {\n    return isValidDate(new Date(value));\n  }\n\n  return true;\n}\n\nexport function isValidLimit(controls: TimepickerComponentState, newDate: Date): boolean {\n  if (controls.min && newDate < controls.min) {\n    return false;\n  }\n\n  if (controls.max && newDate > controls.max) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function toNumber(value: string | number): number {\n  if (typeof value === 'number') {\n    return value;\n  }\n\n  return parseInt(value, dex);\n}\n\nexport function isNumber(value: string | number): value is number {\n  return !isNaN(toNumber(value));\n}\n\nexport function parseHours(\n  value: string | number,\n  isPM = false\n): number {\n  const hour = toNumber(value);\n  if (\n    isNaN(hour) ||\n    hour < 0 ||\n    hour > (isPM ? hoursPerDayHalf : hoursPerDay)\n  ) {\n    return NaN;\n  }\n\n  return hour === hoursPerDayHalf && !isPM ? 0 : hour;\n}\n\nexport function parseMinutes(value: string | number): number {\n  const minute = toNumber(value);\n  if (isNaN(minute) || minute < 0 || minute > minutesPerHour) {\n    return NaN;\n  }\n\n  return minute;\n}\n\nexport function parseSeconds(value: string | number): number {\n  const seconds = toNumber(value);\n  if (isNaN(seconds) || seconds < 0 || seconds > secondsPerMinute) {\n    return NaN;\n  }\n\n  return seconds;\n}\n\nexport function parseTime(value: string | Date): Date {\n  if (typeof value === 'string') {\n    return new Date(value);\n  }\n\n  return value;\n}\n\nexport function changeTime(value: Date, diff: Time): Date {\n  if (!value) {\n    return changeTime(createDate(new Date(), 0, 0, 0), diff);\n  }\n\n  let hour = value.getHours();\n  let minutes = value.getMinutes();\n  let seconds = value.getSeconds();\n\n  if (diff.hour) {\n    hour = (hour + toNumber(diff.hour)) % hoursPerDay;\n    if (hour < 0) {\n      hour += hoursPerDay;\n    }\n  }\n\n  if (diff.minute) {\n    minutes = minutes + toNumber(diff.minute);\n  }\n\n  if (diff.seconds) {\n    seconds = seconds + toNumber(diff.seconds);\n  }\n\n  return createDate(value, hour, minutes, seconds);\n}\n\nexport function setTime(value: Date, opts: Time): Date {\n  let hour = parseHours(opts.hour);\n  const minute = parseMinutes(opts.minute);\n  const seconds = parseSeconds(opts.seconds) || 0;\n\n  if (opts.isPM && hour !== 12) {\n    hour += hoursPerDayHalf;\n  }\n\n  if (!value) {\n    if (!isNaN(hour) && !isNaN(minute)) {\n      return createDate(new Date(), hour, minute, seconds);\n    }\n\n    return value;\n  }\n\n  if (isNaN(hour) || isNaN(minute)) {\n    return value;\n  }\n\n  return createDate(value, hour, minute, seconds);\n}\n\nexport function createDate(\n  value: Date,\n  hours: number,\n  minutes: number,\n  seconds: number\n): Date {\n  return new Date(\n    value.getFullYear(),\n    value.getMonth(),\n    value.getDate(),\n    hours,\n    minutes,\n    seconds,\n    value.getMilliseconds()\n  );\n}\n\nexport function padNumber(value: number): string {\n  const _value = value.toString();\n  if (_value.length > 1) {\n    return _value;\n  }\n\n  return `0${_value}`;\n}\n\nexport function isHourInputValid(hours: string, isPM: boolean): boolean {\n  return !isNaN(parseHours(hours, isPM));\n}\n\nexport function isMinuteInputValid(minutes: string): boolean {\n  return !isNaN(parseMinutes(minutes));\n}\n\nexport function isSecondInputValid(seconds: string): boolean {\n  return !isNaN(parseSeconds(seconds));\n}\n\nexport function isInputLimitValid(diff: Time, max: Date, min: Date): boolean {\n  const newDate = setTime(new Date(), diff);\n\n  if (max && newDate > max) {\n    return false;\n  }\n\n  if (min && newDate < min) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function isInputValid(\n  hours: string,\n  minutes = '0',\n  seconds = '0',\n  isPM: boolean\n): boolean {\n  return isHourInputValid(hours, isPM)\n    && isMinuteInputValid(minutes)\n    && isSecondInputValid(seconds);\n}\n","import { changeTime } from './timepicker.utils';\nimport {\n  TimeChangeEvent,\n  TimepickerComponentState,\n  TimepickerControls\n} from './timepicker.models';\n\nexport function canChangeValue(\n  state: TimepickerComponentState,\n  event?: TimeChangeEvent\n): boolean {\n  if (state.readonlyInput || state.disabled) {\n    return false;\n  }\n\n  if (event) {\n    if (event.source === 'wheel' && !state.mousewheel) {\n      return false;\n    }\n\n    if (event.source === 'key' && !state.arrowkeys) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nexport function canChangeHours(\n  event: TimeChangeEvent,\n  controls: TimepickerControls\n): boolean {\n  if (!event.step) {\n    return false;\n  }\n\n  if (event.step > 0 && !controls.canIncrementHours) {\n    return false;\n  }\n\n  if (event.step < 0 && !controls.canDecrementHours) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function canChangeMinutes(\n  event: TimeChangeEvent,\n  controls: TimepickerControls\n): boolean {\n  if (!event.step) {\n    return false;\n  }\n  if (event.step > 0 && !controls.canIncrementMinutes) {\n    return false;\n  }\n  if (event.step < 0 && !controls.canDecrementMinutes) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function canChangeSeconds(\n  event: TimeChangeEvent,\n  controls: TimepickerControls\n): boolean {\n  if (!event.step) {\n    return false;\n  }\n  if (event.step > 0 && !controls.canIncrementSeconds) {\n    return false;\n  }\n  if (event.step < 0 && !controls.canDecrementSeconds) {\n    return false;\n  }\n\n  return true;\n}\n\nexport function getControlsValue(\n  state: TimepickerComponentState\n): TimepickerComponentState {\n  const {\n    hourStep,\n    minuteStep,\n    secondsStep,\n    readonlyInput,\n    disabled,\n    mousewheel,\n    arrowkeys,\n    showSpinners,\n    showMeridian,\n    showSeconds,\n    meridians,\n    min,\n    max\n  } = state;\n\n  return {\n    hourStep,\n    minuteStep,\n    secondsStep,\n    readonlyInput,\n    disabled,\n    mousewheel,\n    arrowkeys,\n    showSpinners,\n    showMeridian,\n    showSeconds,\n    meridians,\n    min,\n    max\n  };\n}\n\nexport function timepickerControls(\n  value: Date,\n  state: TimepickerComponentState\n): TimepickerControls {\n  const hoursPerDayHalf = 12;\n  const { min, max, hourStep, minuteStep, secondsStep, showSeconds } = state;\n  const res: TimepickerControls = {\n    canIncrementHours: true,\n    canIncrementMinutes: true,\n    canIncrementSeconds: true,\n\n    canDecrementHours: true,\n    canDecrementMinutes: true,\n    canDecrementSeconds: true,\n\n    canToggleMeridian: true\n  };\n\n  if (!value) {\n    return res;\n  }\n\n  // compare dates\n  if (max) {\n    const _newHour = changeTime(value, { hour: hourStep });\n    res.canIncrementHours = max > _newHour;\n\n    if (!res.canIncrementHours) {\n      const _newMinutes = changeTime(value, { minute: minuteStep });\n      res.canIncrementMinutes = showSeconds\n        ? max > _newMinutes\n        : max >= _newMinutes;\n    }\n\n    if (!res.canIncrementMinutes) {\n      const _newSeconds = changeTime(value, { seconds: secondsStep });\n      res.canIncrementSeconds = max >= _newSeconds;\n    }\n\n    if (value.getHours() < hoursPerDayHalf) {\n      res.canToggleMeridian = changeTime(value, { hour: hoursPerDayHalf }) < max;\n    }\n  }\n\n  if (min) {\n    const _newHour = changeTime(value, { hour: -hourStep });\n    res.canDecrementHours = min < _newHour;\n\n    if (!res.canDecrementHours) {\n      const _newMinutes = changeTime(value, { minute: -minuteStep });\n      res.canDecrementMinutes = showSeconds\n        ? min < _newMinutes\n        : min <= _newMinutes;\n    }\n\n    if (!res.canDecrementMinutes) {\n      const _newSeconds = changeTime(value, { seconds: -secondsStep });\n      res.canDecrementSeconds = min <= _newSeconds;\n    }\n\n    if (value.getHours() >= hoursPerDayHalf) {\n      res.canToggleMeridian = changeTime(value, { hour: -hoursPerDayHalf }) > min;\n    }\n  }\n\n  return res;\n}\n","import { Injectable } from '@angular/core';\n\n/** Provides default configuration values for timepicker */\n@Injectable()\nexport class TimepickerConfig {\n  /** hours change step */\n  hourStep = 1;\n  /** hours change step */\n  minuteStep = 5;\n  /** seconds changes step */\n  secondsStep = 10;\n  /** if true works in 12H mode and displays AM/PM. If false works in 24H mode and hides AM/PM */\n  showMeridian = true;\n  /** meridian labels based on locale */\n  meridians = ['AM', 'PM'];\n  /** if true hours and minutes fields will be readonly */\n  readonlyInput = false;\n  /** if true hours and minutes fields will be disabled */\n  disabled = false;\n  /** if true scroll inside hours and minutes inputs will change time */\n  mousewheel = true;\n  /** if true the values of hours and minutes can be changed using the up/down arrow keys on the keyboard */\n  arrowkeys = true;\n  /** if true spinner arrows above and below the inputs will be shown */\n  showSpinners = true;\n  /** show seconds in timepicker */\n  showSeconds = false;\n  /** show minutes in timepicker */\n  showMinutes = true;\n  /** minimum time user can select */\n  min: Date;\n  /** maximum time user can select */\n  max: Date;\n}\n","import { Action } from 'ngx-bootstrap/mini-ngrx';\nimport {\n  canChangeHours,\n  canChangeMinutes,\n  canChangeSeconds,\n  canChangeValue,\n  timepickerControls\n} from '../timepicker-controls.util';\nimport { TimepickerConfig } from '../timepicker.config';\nimport {\n  TimepickerComponentState,\n  TimepickerControls\n} from '../timepicker.models';\nimport { changeTime, setTime, isValidLimit } from '../timepicker.utils';\nimport { TimepickerActions } from './timepicker.actions';\n\nexport class TimepickerState {\n  value: Date;\n  config: TimepickerComponentState;\n  controls: TimepickerControls;\n}\n\nexport const initialState: TimepickerState = {\n  value: null,\n  config: new TimepickerConfig(),\n  controls: {\n    canIncrementHours: true,\n    canIncrementMinutes: true,\n    canIncrementSeconds: true,\n\n    canDecrementHours: true,\n    canDecrementMinutes: true,\n    canDecrementSeconds: true,\n\n    canToggleMeridian: true\n  }\n};\n\n// tslint:disable-next-line:cyclomatic-complexity\nexport function timepickerReducer(state = initialState, action: Action) {\n  switch (action.type) {\n    case TimepickerActions.WRITE_VALUE: {\n      return Object.assign({}, state, { value: action.payload });\n    }\n\n    case TimepickerActions.CHANGE_HOURS: {\n      if (\n        !canChangeValue(state.config, action.payload) ||\n        !canChangeHours(action.payload, state.controls)\n      ) {\n        return state;\n      }\n\n      const _newTime = changeTime(state.value, { hour: action.payload.step });\n\n      if ((state.config.max || state.config.min) && !isValidLimit(state.config, _newTime)) {\n          return state;\n      }\n\n      return Object.assign({}, state, { value: _newTime });\n    }\n\n    case TimepickerActions.CHANGE_MINUTES: {\n      if (\n        !canChangeValue(state.config, action.payload) ||\n        !canChangeMinutes(action.payload, state.controls)\n      ) {\n        return state;\n      }\n\n      const _newTime = changeTime(state.value, { minute: action.payload.step });\n\n      if ((state.config.max || state.config.min) && !isValidLimit(state.config, _newTime)) {\n        return state;\n      }\n\n      return Object.assign({}, state, { value: _newTime });\n    }\n\n    case TimepickerActions.CHANGE_SECONDS: {\n      if (\n        !canChangeValue(state.config, action.payload) ||\n        !canChangeSeconds(action.payload, state.controls)\n      ) {\n        return state;\n      }\n\n      const _newTime = changeTime(state.value, {\n        seconds: action.payload.step\n      });\n\n      if ((state.config.max || state.config.min) && !isValidLimit(state.config, _newTime)) {\n        return state;\n      }\n\n      return Object.assign({}, state, { value: _newTime });\n    }\n\n    case TimepickerActions.SET_TIME_UNIT: {\n      if (!canChangeValue(state.config)) {\n        return state;\n      }\n\n      const _newTime = setTime(state.value, action.payload);\n\n      return Object.assign({}, state, { value: _newTime });\n    }\n\n    case TimepickerActions.UPDATE_CONTROLS: {\n      const _newControlsState = timepickerControls(state.value, action.payload);\n      const _newState: TimepickerState = {\n        value: state.value,\n        config: action.payload,\n        controls: _newControlsState\n      };\n\n      if (state.config.showMeridian !== _newState.config.showMeridian) {\n        if (state.value) {\n          _newState.value = new Date(state.value);\n        }\n      }\n\n      return Object.assign({}, state, _newState);\n    }\n\n    default:\n      return state;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport {\n  timepickerReducer,\n  TimepickerState,\n  initialState\n} from './timepicker.reducer';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Action, MiniStore, MiniState } from 'ngx-bootstrap/mini-ngrx';\n\n@Injectable()\nexport class TimepickerStore extends MiniStore<TimepickerState> {\n  constructor() {\n    const _dispatcher = new BehaviorSubject<Action>({\n      type: '[mini-ngrx] dispatcher init'\n    });\n    const state = new MiniState<TimepickerState>(\n      initialState,\n      _dispatcher,\n      timepickerReducer\n    );\n    super(_dispatcher, timepickerReducer, state);\n  }\n}\n","/* tslint:disable:no-forward-ref max-file-line-count */\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  forwardRef,\n  Input,\n  OnChanges,\n  OnDestroy,\n  Output,\n  SimpleChanges, ViewEncapsulation\n} from '@angular/core';\n\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { TimepickerActions } from './reducer/timepicker.actions';\nimport { TimepickerStore } from './reducer/timepicker.store';\nimport { getControlsValue } from './timepicker-controls.util';\nimport { TimepickerConfig } from './timepicker.config';\n\nimport {\n  TimeChangeSource,\n  TimepickerComponentState,\n  TimepickerControls\n} from './timepicker.models';\n\nimport {\n  isValidDate,\n  padNumber,\n  parseTime,\n  isInputValid,\n  isHourInputValid,\n  isMinuteInputValid,\n  isSecondInputValid,\n  isInputLimitValid\n} from './timepicker.utils';\n\nimport { Subscription } from 'rxjs';\n\nimport { ControlValueAccessorModel } from './models';\n\nexport const TIMEPICKER_CONTROL_VALUE_ACCESSOR: ControlValueAccessorModel = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => TimepickerComponent),\n  multi: true\n};\n\n@Component({\n  selector: 'timepicker',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  providers: [TIMEPICKER_CONTROL_VALUE_ACCESSOR, TimepickerStore],\n  templateUrl: './timepicker.component.html',\n  styles: [`\n    .bs-chevron {\n      border-style: solid;\n      display: block;\n      width: 9px;\n      height: 9px;\n      position: relative;\n      border-width: 3px 0px 0 3px;\n    }\n\n    .bs-chevron-up {\n      -webkit-transform: rotate(45deg);\n      transform: rotate(45deg);\n      top: 2px;\n    }\n\n    .bs-chevron-down {\n      -webkit-transform: rotate(-135deg);\n      transform: rotate(-135deg);\n      top: -2px;\n    }\n\n    .bs-timepicker-field {\n      width: 50px;\n    }\n  `],\n  encapsulation: ViewEncapsulation.None\n})\nexport class TimepickerComponent\n  implements ControlValueAccessor,\n    TimepickerComponentState,\n    TimepickerControls,\n    OnChanges,\n    OnDestroy {\n  /** hours change step */\n  @Input() hourStep: number;\n  /** hours change step */\n  @Input() minuteStep: number;\n  /** seconds change step */\n  @Input() secondsStep: number;\n  /** if true hours and minutes fields will be readonly */\n  @Input() readonlyInput: boolean;\n  /** if true hours and minutes fields will be disabled */\n  @Input() disabled: boolean;\n  /** if true scroll inside hours and minutes inputs will change time */\n  @Input() mousewheel: boolean;\n  /** if true the values of hours and minutes can be changed using the up/down arrow keys on the keyboard */\n  @Input() arrowkeys: boolean;\n  /** if true spinner arrows above and below the inputs will be shown */\n  @Input() showSpinners: boolean;\n  /** if true meridian button will be shown */\n  @Input() showMeridian: boolean;\n  /** show minutes in timepicker */\n  @Input() showMinutes: boolean;\n  /** show seconds in timepicker */\n  @Input() showSeconds: boolean;\n  /** meridian labels based on locale */\n  @Input() meridians: string[];\n  /** minimum time user can select */\n  @Input() min: Date;\n  /** maximum time user can select */\n  @Input() max: Date;\n\n  /** emits true if value is a valid date */\n  @Output() isValid = new EventEmitter<boolean>();\n\n  // ui variables\n  hours: string;\n  minutes: string;\n  seconds: string;\n  meridian: string;\n\n  /** @deprecated - please use `isEditable` instead */\n  get isSpinnersVisible(): boolean {\n    return this.showSpinners && !this.readonlyInput;\n  }\n\n  get isEditable(): boolean {\n    return !(this.readonlyInput || this.disabled);\n  }\n\n  // min\\max validation for input fields\n  invalidHours = false;\n  invalidMinutes = false;\n  invalidSeconds = false;\n\n  // time picker controls state\n  canIncrementHours: boolean;\n  canIncrementMinutes: boolean;\n  canIncrementSeconds: boolean;\n\n  canDecrementHours: boolean;\n  canDecrementMinutes: boolean;\n  canDecrementSeconds: boolean;\n\n  canToggleMeridian: boolean;\n\n  // control value accessor methods\n  // tslint:disable-next-line:no-any\n  onChange = Function.prototype;\n  // tslint:disable-next-line:no-any\n  onTouched = Function.prototype;\n\n  timepickerSub: Subscription;\n\n  constructor(\n    _config: TimepickerConfig,\n    private _cd: ChangeDetectorRef,\n    private _store: TimepickerStore,\n    private _timepickerActions: TimepickerActions\n  ) {\n    Object.assign(this, _config);\n\n    this.timepickerSub = _store\n      .select(state => state.value)\n      .subscribe((value: Date) => {\n        // update UI values if date changed\n        this._renderTime(value);\n        this.onChange(value);\n\n        this._store.dispatch(\n          this._timepickerActions.updateControls(getControlsValue(this))\n        );\n      });\n\n    _store\n      .select(state => state.controls)\n      .subscribe((controlsState: TimepickerControls) => {\n        this.isValid.emit(isInputValid(this.hours, this.minutes, this.seconds, this.isPM()));\n        Object.assign(this, controlsState);\n        _cd.markForCheck();\n      });\n  }\n\n  resetValidation(): void {\n    this.invalidHours = false;\n    this.invalidMinutes = false;\n    this.invalidSeconds = false;\n  }\n\n  isPM(): boolean {\n    return this.showMeridian && this.meridian === this.meridians[1];\n  }\n\n  prevDef($event: Event) {\n    $event.preventDefault();\n  }\n\n  wheelSign($event: WheelEventInit): number {\n    return Math.sign($event.deltaY) * -1;\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    this._store.dispatch(\n      this._timepickerActions.updateControls(getControlsValue(this))\n    );\n  }\n\n  changeHours(step: number, source: TimeChangeSource = ''): void {\n    this.resetValidation();\n    this._store.dispatch(this._timepickerActions.changeHours({ step, source }));\n  }\n\n  changeMinutes(step: number, source: TimeChangeSource = ''): void {\n    this.resetValidation();\n    this._store.dispatch(\n      this._timepickerActions.changeMinutes({ step, source })\n    );\n  }\n\n  changeSeconds(step: number, source: TimeChangeSource = ''): void {\n    this.resetValidation();\n    this._store.dispatch(\n      this._timepickerActions.changeSeconds({ step, source })\n    );\n  }\n\n  updateHours(hours: string): void {\n    this.resetValidation();\n    this.hours = hours;\n\n    const isValid = isHourInputValid(this.hours, this.isPM()) && this.isValidLimit();\n\n    if (!isValid) {\n      this.invalidHours = true;\n      this.isValid.emit(false);\n      this.onChange(null);\n\n      return;\n    }\n\n    this._updateTime();\n  }\n\n  updateMinutes(minutes: string) {\n    this.resetValidation();\n    this.minutes = minutes;\n\n    const isValid = isMinuteInputValid(this.minutes) && this.isValidLimit();\n\n    if (!isValid) {\n      this.invalidMinutes = true;\n      this.isValid.emit(false);\n      this.onChange(null);\n\n      return;\n    }\n\n    this._updateTime();\n  }\n\n  updateSeconds(seconds: string) {\n    this.resetValidation();\n    this.seconds = seconds;\n\n    const isValid = isSecondInputValid(this.seconds) && this.isValidLimit();\n\n    if (!isValid) {\n      this.invalidSeconds = true;\n      this.isValid.emit(false);\n      this.onChange(null);\n\n      return;\n    }\n\n    this._updateTime();\n  }\n\n  isValidLimit(): boolean {\n    return isInputLimitValid({\n      hour: this.hours,\n      minute: this.minutes,\n      seconds: this.seconds,\n      isPM: this.isPM()\n    }, this.max, this.min);\n  }\n\n  _updateTime() {\n    const _seconds = this.showSeconds ? this.seconds : void 0;\n    const _minutes = this.showMinutes ? this.minutes : void 0;\n    if (!isInputValid(this.hours, _minutes, _seconds, this.isPM())) {\n      this.isValid.emit(false);\n      this.onChange(null);\n\n      return;\n    }\n\n    this._store.dispatch(\n      this._timepickerActions.setTime({\n        hour: this.hours,\n        minute: this.minutes,\n        seconds: this.seconds,\n        isPM: this.isPM()\n      })\n    );\n  }\n\n  toggleMeridian(): void {\n    if (!this.showMeridian || !this.isEditable) {\n      return;\n    }\n\n    const _hoursPerDayHalf = 12;\n    this._store.dispatch(\n      this._timepickerActions.changeHours({\n        step: _hoursPerDayHalf,\n        source: ''\n      })\n    );\n  }\n\n  /**\n   * Write a new value to the element.\n   */\n  writeValue(obj: string | null | undefined | Date): void {\n    if (isValidDate(obj)) {\n      this._store.dispatch(this._timepickerActions.writeValue(parseTime(obj)));\n    } else if (obj == null) {\n      this._store.dispatch(this._timepickerActions.writeValue(null));\n    }\n  }\n\n  /**\n   * Set the function to be called when the control receives a change event.\n   */\n  // tslint:disable-next-line:no-any\n  registerOnChange(fn: (_: any) => {}): void {\n    this.onChange = fn;\n  }\n\n  /**\n   * Set the function to be called when the control receives a touch event.\n   */\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * This function is called when the control status changes to or from \"disabled\".\n   * Depending on the value, it will enable or disable the appropriate DOM element.\n   *\n   * @param isDisabled\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n    this._cd.markForCheck();\n  }\n\n  ngOnDestroy(): void {\n    this.timepickerSub.unsubscribe();\n  }\n\n  private _renderTime(value: string | Date): void {\n    if (!isValidDate(value)) {\n      this.hours = '';\n      this.minutes = '';\n      this.seconds = '';\n      this.meridian = this.meridians[0];\n\n      return;\n    }\n\n    const _value = parseTime(value);\n    const _hoursPerDayHalf = 12;\n    let _hours = _value.getHours();\n\n    if (this.showMeridian) {\n      this.meridian = this.meridians[_hours >= _hoursPerDayHalf ? 1 : 0];\n      _hours = _hours % _hoursPerDayHalf;\n      // should be 12 PM, not 00 PM\n      if (_hours === 0) {\n        _hours = _hoursPerDayHalf;\n      }\n    }\n\n    this.hours = padNumber(_hours);\n    this.minutes = padNumber(_value.getMinutes());\n    this.seconds = padNumber(_value.getUTCSeconds());\n  }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TimepickerComponent } from './timepicker.component';\nimport { TimepickerActions } from './reducer/timepicker.actions';\nimport { TimepickerConfig } from './timepicker.config';\nimport { TimepickerStore } from './reducer/timepicker.store';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [TimepickerComponent],\n  exports: [TimepickerComponent]\n})\nexport class TimepickerModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: TimepickerModule,\n      providers: [TimepickerConfig, TimepickerActions, TimepickerStore]\n    };\n  }\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function observeOn(scheduler, delay) {\n    if (delay === void 0) {\n        delay = 0;\n    }\n    return function observeOnOperatorFunction(source) {\n        return source.lift(new ObserveOnOperator(scheduler, delay));\n    };\n}\nvar ObserveOnOperator = /*@__PURE__*/ (function () {\n    function ObserveOnOperator(scheduler, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        this.scheduler = scheduler;\n        this.delay = delay;\n    }\n    ObserveOnOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n    };\n    return ObserveOnOperator;\n}());\nexport { ObserveOnOperator };\nvar ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ObserveOnSubscriber, _super);\n    function ObserveOnSubscriber(destination, scheduler, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        var _this = _super.call(this, destination) || this;\n        _this.scheduler = scheduler;\n        _this.delay = delay;\n        return _this;\n    }\n    ObserveOnSubscriber.dispatch = function (arg) {\n        var notification = arg.notification, destination = arg.destination;\n        notification.observe(destination);\n        this.unsubscribe();\n    };\n    ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n        var destination = this.destination;\n        destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n    };\n    ObserveOnSubscriber.prototype._next = function (value) {\n        this.scheduleMessage(Notification.createNext(value));\n    };\n    ObserveOnSubscriber.prototype._error = function (err) {\n        this.scheduleMessage(Notification.createError(err));\n        this.unsubscribe();\n    };\n    ObserveOnSubscriber.prototype._complete = function () {\n        this.scheduleMessage(Notification.createComplete());\n        this.unsubscribe();\n    };\n    return ObserveOnSubscriber;\n}(Subscriber));\nexport { ObserveOnSubscriber };\nvar ObserveOnMessage = /*@__PURE__*/ (function () {\n    function ObserveOnMessage(notification, destination) {\n        this.notification = notification;\n        this.destination = destination;\n    }\n    return ObserveOnMessage;\n}());\nexport { ObserveOnMessage };\n//# sourceMappingURL=observeOn.js.map\n","var Scheduler = /*@__PURE__*/ (function () {\n    function Scheduler(SchedulerAction, now) {\n        if (now === void 0) {\n            now = Scheduler.now;\n        }\n        this.SchedulerAction = SchedulerAction;\n        this.now = now;\n    }\n    Scheduler.prototype.schedule = function (work, delay, state) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        return new this.SchedulerAction(this, work).schedule(state, delay);\n    };\n    Scheduler.now = function () { return Date.now(); };\n    return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map\n","/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function timer(dueTime, periodOrScheduler, scheduler) {\n    if (dueTime === void 0) {\n        dueTime = 0;\n    }\n    var period = -1;\n    if (isNumeric(periodOrScheduler)) {\n        period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);\n    }\n    else if (isScheduler(periodOrScheduler)) {\n        scheduler = periodOrScheduler;\n    }\n    if (!isScheduler(scheduler)) {\n        scheduler = async;\n    }\n    return new Observable(function (subscriber) {\n        var due = isNumeric(dueTime)\n            ? dueTime\n            : (+dueTime - scheduler.now());\n        return scheduler.schedule(dispatch, due, {\n            index: 0, period: period, subscriber: subscriber\n        });\n    });\n}\nfunction dispatch(state) {\n    var index = state.index, period = state.period, subscriber = state.subscriber;\n    subscriber.next(index);\n    if (subscriber.closed) {\n        return;\n    }\n    else if (period === -1) {\n        return subscriber.complete();\n    }\n    state.index = index + 1;\n    this.schedule(state, period);\n}\n//# sourceMappingURL=timer.js.map\n","/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n    return new Subject();\n}\nexport function share() {\n    return function (source) { return refCount()(multicast(shareSubjectFactory)(source)); };\n}\n//# sourceMappingURL=share.js.map\n","import {Injectable} from \"@angular/core\";\nimport {Subject} from \"rxjs/Subject\";\n\n@Injectable()\nexport class CmStationService {\n\n  private stationSubj = new Subject<any>();\n  stationChange$ = this.stationSubj.asObservable();\n\n  private _station: string;\n\n  get station(): string {\n    return this._station;\n  }\n\n  public setStation(station: string) {\n    this._station = station;\n    this.stationSubj.next(station);\n  }\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nexport function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n    return function (source) {\n        return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n    };\n}\nvar GroupByOperator = /*@__PURE__*/ (function () {\n    function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {\n        this.keySelector = keySelector;\n        this.elementSelector = elementSelector;\n        this.durationSelector = durationSelector;\n        this.subjectSelector = subjectSelector;\n    }\n    GroupByOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n    };\n    return GroupByOperator;\n}());\nvar GroupBySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(GroupBySubscriber, _super);\n    function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n        var _this = _super.call(this, destination) || this;\n        _this.keySelector = keySelector;\n        _this.elementSelector = elementSelector;\n        _this.durationSelector = durationSelector;\n        _this.subjectSelector = subjectSelector;\n        _this.groups = null;\n        _this.attemptedToUnsubscribe = false;\n        _this.count = 0;\n        return _this;\n    }\n    GroupBySubscriber.prototype._next = function (value) {\n        var key;\n        try {\n            key = this.keySelector(value);\n        }\n        catch (err) {\n            this.error(err);\n            return;\n        }\n        this._group(value, key);\n    };\n    GroupBySubscriber.prototype._group = function (value, key) {\n        var groups = this.groups;\n        if (!groups) {\n            groups = this.groups = new Map();\n        }\n        var group = groups.get(key);\n        var element;\n        if (this.elementSelector) {\n            try {\n                element = this.elementSelector(value);\n            }\n            catch (err) {\n                this.error(err);\n            }\n        }\n        else {\n            element = value;\n        }\n        if (!group) {\n            group = (this.subjectSelector ? this.subjectSelector() : new Subject());\n            groups.set(key, group);\n            var groupedObservable = new GroupedObservable(key, group, this);\n            this.destination.next(groupedObservable);\n            if (this.durationSelector) {\n                var duration = void 0;\n                try {\n                    duration = this.durationSelector(new GroupedObservable(key, group));\n                }\n                catch (err) {\n                    this.error(err);\n                    return;\n                }\n                this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));\n            }\n        }\n        if (!group.closed) {\n            group.next(element);\n        }\n    };\n    GroupBySubscriber.prototype._error = function (err) {\n        var groups = this.groups;\n        if (groups) {\n            groups.forEach(function (group, key) {\n                group.error(err);\n            });\n            groups.clear();\n        }\n        this.destination.error(err);\n    };\n    GroupBySubscriber.prototype._complete = function () {\n        var groups = this.groups;\n        if (groups) {\n            groups.forEach(function (group, key) {\n                group.complete();\n            });\n            groups.clear();\n        }\n        this.destination.complete();\n    };\n    GroupBySubscriber.prototype.removeGroup = function (key) {\n        this.groups.delete(key);\n    };\n    GroupBySubscriber.prototype.unsubscribe = function () {\n        if (!this.closed) {\n            this.attemptedToUnsubscribe = true;\n            if (this.count === 0) {\n                _super.prototype.unsubscribe.call(this);\n            }\n        }\n    };\n    return GroupBySubscriber;\n}(Subscriber));\nvar GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(GroupDurationSubscriber, _super);\n    function GroupDurationSubscriber(key, group, parent) {\n        var _this = _super.call(this, group) || this;\n        _this.key = key;\n        _this.group = group;\n        _this.parent = parent;\n        return _this;\n    }\n    GroupDurationSubscriber.prototype._next = function (value) {\n        this.complete();\n    };\n    GroupDurationSubscriber.prototype._unsubscribe = function () {\n        var _a = this, parent = _a.parent, key = _a.key;\n        this.key = this.parent = null;\n        if (parent) {\n            parent.removeGroup(key);\n        }\n    };\n    return GroupDurationSubscriber;\n}(Subscriber));\nvar GroupedObservable = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(GroupedObservable, _super);\n    function GroupedObservable(key, groupSubject, refCountSubscription) {\n        var _this = _super.call(this) || this;\n        _this.key = key;\n        _this.groupSubject = groupSubject;\n        _this.refCountSubscription = refCountSubscription;\n        return _this;\n    }\n    GroupedObservable.prototype._subscribe = function (subscriber) {\n        var subscription = new Subscription();\n        var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;\n        if (refCountSubscription && !refCountSubscription.closed) {\n            subscription.add(new InnerRefCountSubscription(refCountSubscription));\n        }\n        subscription.add(groupSubject.subscribe(subscriber));\n        return subscription;\n    };\n    return GroupedObservable;\n}(Observable));\nexport { GroupedObservable };\nvar InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(InnerRefCountSubscription, _super);\n    function InnerRefCountSubscription(parent) {\n        var _this = _super.call(this) || this;\n        _this.parent = parent;\n        parent.count++;\n        return _this;\n    }\n    InnerRefCountSubscription.prototype.unsubscribe = function () {\n        var parent = this.parent;\n        if (!parent.closed && !this.closed) {\n            _super.prototype.unsubscribe.call(this);\n            parent.count -= 1;\n            if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n                parent.unsubscribe();\n            }\n        }\n    };\n    return InnerRefCountSubscription;\n}(Subscription));\n//# sourceMappingURL=groupBy.js.map\n","import {Component} from \"@angular/core\";\nimport {DialogRef} from \"ngx-modialog\";\nimport {CustomModalContext} from \"../../cm-assign/cm-assign.component\";\nimport {CmLocation} from \"../../../services/cm-location.service\";\n\n@Component({\n    selector: 'cm-modal-location-list',\n    template: require('./cm-modal-location-list.component.html'),\n    styles: [require('./cm-modal-location-list.component.scss').toString()]\n})\nexport class CmModalLocationListComponent {\n    parent = null;\n\n    constructor(public dialog: DialogRef<CustomModalContext>) {\n        this.parent = dialog.context.parent;\n    }\n\n    private close() {\n        this.dialog.close();\n    }\n\n    private selectLocation(location: CmLocation) {\n        this.parent.selectLocation(location);\n        this.close();\n    }\n}","import {Serializable} from \"../../shared/serializable\";\nimport {CmLocationData} from \"../../shared/location\";\nimport {CmBikeListItem} from \"../cm-bike-short-list/cm-bike-list.model\";\nimport {CmCoordinates} from \"../../shared/coordinates\";\nimport {BikeType} from \"../../shared/bike\";\n\nexport class BikeJobListItem extends Serializable {\n    id: number;\n    bike: CmBikeListItem;\n    task: string;\n    user: string;\n    status: string;\n    location: CmLocationData;\n    priority: number;\n    dateAssigned: string;\n    dateCreated: string;\n    dateFinished: string;\n    issues: Array<string> = [];\n    coordinates: CmCoordinates;\n    categories: Array<string> = [];\n    fullCheck: boolean;\n    checkedLock: boolean;\n    repairTime: number;\n    comment: string;\n    spareParts = [];\n    estimatedRepairTime: number;\n    mustBeFixedAt: string;\n    quantities: any;\n}\n\nexport enum CmJobType {\n    TO_CHECK,\n    TO_MOVE,\n    TO_WORKSHOP,\n    FOR_LOCATION,\n    LOCATION,\n    TO_CHARGE\n}\n","import {Injectable} from \"@angular/core\";\nimport {CmHttpClient} from \"./http_client\";\nimport {v4} from \"uuid\";\nimport {HttpHeaders} from \"@angular/common/http\";\nconst uuidv4 = require('uuid/v4')\n\n@Injectable()\nexport class CmAmazonPicturesService {\n\n  private _url: string;\n\n  get url(): string {\n    return this._url;\n  }\n\n  constructor(private http: CmHttpClient) {\n    this.http.get('/object-storage/api/v1/object/baseUrl',{responseType: \"text\"}).subscribe(\n        (data:any) => this._url = data//.text()\n    );\n  }\n\n  public submitPicture(picture): string {\n\n    if (!picture) {\n      return picture;\n    }\n\n    if (!this.checkIfPictureFormat(picture)) {\n      //if it is not picture format then submit the data to server\n      return picture;\n    }\n\n    let contentType, data;\n    try {\n      contentType = this.getContentType(picture);\n      data = this.getData(picture);\n    } catch (e) {\n      throw new Error('incorrect image format');\n    }\n\n    let requestOptions = {\n      headers: this.createHeaders(contentType),\n      responseType: 'text'\n    };\n\n    let uuid4 = uuidv4();\n    let url = '/object-storage/api/v1/object/store/' + uuid4;\n\n    this.http.post(url, data, requestOptions).subscribe(data => {\n      console.log(\"success saving file \" + uuid4)\n    }, error => {\n      console.error(\"error saving file \" + uuid4);\n    });\n\n    return uuid4;\n  }\n\n  public getPicture(data: string) {\n    if (!data) {\n      return data;\n    }\n\n    if (this.checkIfPictureFormat(data)) {\n      return data;\n    } else {\n      return this.url + data;\n    }\n  }\n\n  private checkIfPictureFormat(picture: string): boolean {\n    return picture.indexOf(\";\") > 0 && picture.indexOf(':') > 0 && picture.indexOf(',') > 0;\n  }\n\n  private getContentType(picture: string): string {\n    return picture.split(';')[0].split(':')[1];\n  }\n\n  private getData(picture: string): string {\n    return picture.split(',')[1];\n  }\n\n  private createHeaders(contentType) {\n    let headers = new HttpHeaders();\n    headers = headers.append('Content-Type', contentType);\n    return headers;\n  }\n}\n","import {Component, OnInit, ViewChild} from \"@angular/core\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {TroubleTicket} from \"../cm-trouble-ticket.model\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {DataService} from \"../../../services/cm-data.service\";\n// import {HttpResponse} from \"@angular/common/http\";\nimport {TableFilter} from \"../../../shared/tableFilter\";\nimport {overlayConfigFactory} from \"ngx-modialog\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmTroubleTicketComponent} from \"../item/cm-trouble-ticket.component\";\nimport * as moment from \"moment/moment\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\nimport {BIKE_AND_LOCATION_TYPES, BIKE_TYPE, LOCATION_TYPE} from \"../../../shared/const/missionType\";\nimport {PagerComponent} from \"../../pager/pager.component\";\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {ReportExtractParam, ReportExtractParamField} from \"../../../shared/reportExtractParam\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\nimport {Bike} from \"../../../shared/bike\";\nimport {CmReportComponent} from \"../../cm-report/cm-report.component\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n    selector: 'cm-trouble-ticket-list',\n    template: require('./cm-trouble-ticket-list.component.html'),\n    styles: [require('../../cm-main/main.css').toString()]\n})\nexport class CmTroubleTicketListComponent extends TabTitle implements OnInit {\n    private tickets: TroubleTicket[] = [];\n\n    private pageLimit: number = 15;\n    private total: number;\n    private totalExport = 10000;\n\n    private subs: Array<Subscription> = [];\n\n    //filters\n    private filters: CmTroubleTicketFilters = new CmTroubleTicketFilters();\n    private statusList = [];\n\n    private missionTypes = [\n        {key:BIKE_TYPE,              label: 'mission.bikeType'},\n        {key:LOCATION_TYPE,          label: 'mission.locationType'},\n        {key:BIKE_AND_LOCATION_TYPES,label: 'mission.bothType'}\n    ];\n    private currentPage: number = 1;\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n\n    private childProcessing: boolean = false;\n    private reportType: string = \"TT\";\n    private reportsListLen: Number = 0;\n    private maxReportsListSize = 5;\n\n    @ViewChild('archivedrep', {static: false}) archivedChild: CmReportComponent;\n\n    @ViewChild(PagerComponent, {static: false})\n    private pager: PagerComponent;\n\n    constructor(private http: CmHttpClient,\n                private dataService: DataService,\n                private modal: Modal,\n                public translate: CmTranslateService,\n                private spinner: NgxSpinnerService\n    ) {\n        super('troubleTickets.Title', translate);\n    }\n\n    ngOnInit() {\n        this.dataService.returnLocalizedMap('troubleTicketsStatus').subscribe(\n            (data:any) => this.statusList = data.troubleTicketsStatus\n        );\n\n        this.missionTypes = this.missionTypes.map(e => {\n            e.label = this.translate.get(e.label) ? this.translate.get(e.label) : e.label;\n            return e;\n        });\n\n        this.loadData();\n    }\n\n    ngOnDestroy() {\n        for (let sub of this.subs) {\n            sub.unsubscribe();\n        }\n    }\n\n    private loadData() {\n        this.spinner.show();\n        this.http.get<PageAdapter<TroubleTicket>>('/bikes-sql/api/v1/tickets?page=' + (this.currentPage ? this.currentPage : 1) + '&limit=' + this.pageLimit +\n            this.filters.toString()).subscribe(\n            data => {\n                this.spinner.hide();\n                this.deserializeTickets(data);\n                this.total = data.total || 0;\n                if(this.total == 0){\n                    this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n                }\n            },\n            error => {\n                this.spinner.hide();\n                console.log(\"Error: \" + error);\n                this.modal.alert().message(\"Error: \" + error).open()\n            }\n        )\n    }\n\n    private deserializeTickets(data) {\n        this.tickets = [];\n        if (data.content) {\n            data.content.forEach(el => {\n                let ticket = new TroubleTicket().fromJSON(el);\n                this.tickets.push(ticket);\n            });\n        }\n    }\n\n    private openTicket(ticket: TroubleTicket) {\n        this.openTTModal({ticketId: ticket.id, missionType:ticket.type, parent: this});\n    }\n\n    private setPage(page: number) {\n        this.currentPage = page;\n        this.loadData();\n    }\n\n    private addNewBikeTicket(){\n        if (this.filters.bike) {\n            this.http.get<Bike>(\"/bikes-sql/api/v1/bicycle/number/\" + this.filters.bike).subscribe(data => {\n                this.openTTModal({ticketId: -1, bike: data, missionType:BIKE_TYPE, parent: this});\n            }, error => {\n                this.openTTModal({ticketId: -1, missionType:BIKE_TYPE, parent: this});\n            })\n        } else {\n            this.openTTModal({ticketId: -1, missionType:BIKE_TYPE, parent: this});\n        }\n    }\n\n    private addNewLocationTicket(){\n        this.openTTModal({ticketId: -1, missionType:LOCATION_TYPE, parent: this});\n    }\n\n    private openTTModal(data) {\n        this.modal.open(CmTroubleTicketComponent, overlayConfigFactory(data, BSModalContext));\n    }\n\n    private filter() {\n        this.currentPage = 1;\n        this.loadData();\n\n        this.filters.save();\n    }\n\n    private clearFilters() {\n        this.filters.clear();\n    }\n\n    private sort(field) {\n        this.filters.sort(field);\n        this.loadData();\n    }\n\n    private formatTimestamp(dateStr) {\n        if (dateStr) {\n            return moment(dateStr).format('DD.MM.YYYY HH:mm');\n        }\n        return '';\n    }\n\n    private substrText(text: string) {\n        if (text) {\n            if (text.length > 40) {\n                return text.substr(0, 40) + '...';\n            } else {\n                return text;\n            }\n        }\n\n        return '';\n    }\n\n    private reloadData() {\n        this.loadData();\n    }\n\n    exportTickets() {\n        if(this.reportsListLen >= this.maxReportsListSize){\n            this.archivedChild.removeLastReportFromList();\n        }\n\n        let urlParams = this.filters.toString();\n        if(urlParams.length > 0) {\n            urlParams = '?' + urlParams.substring(1);\n        }\n\n        let reportFileName = this.translate.get(\"report.troubleTicket.fileName\") ;\n        let reportParams = new ReportExtractParam();\n        reportParams.method = \"GET\";\n        reportParams.path = '/bikes-sql/api/v1/tickets/export/withTask' + urlParams;\n\n        let statusSubstitutions = {\n            \"Open\": this.translate.get(\"report.troubleTicket.cell.Open\"),\n            \"Closed\": this.translate.get(\"report.troubleTicket.cell.Closed\"),\n            \"InProgress\": this.translate.get(\"report.troubleTicket.cell.InProgress\")\n        };\n        reportParams.fields =\n            [\n                new ReportExtractParamField(\"id\", this.translate.get(\"report.troubleTicket.header.id\")),\n                new ReportExtractParamField(\"complainTime\", this.translate.get(\"report.troubleTicket.header.complainTime\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n                new ReportExtractParamField(\"ticketCreatedBy\", this.translate.get(\"report.troubleTicket.header.ticketCreatedBy\")),\n                new ReportExtractParamField(\"dateCloseTicket\", this.translate.get(\"report.troubleTicket.header.dateCloseTicket\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n                new ReportExtractParamField(\"ticketClosedBy\", this.translate.get(\"report.troubleTicket.header.ticketClosedBy\")),\n                new ReportExtractParamField(\"dateCreatedTask\", this.translate.get(\"report.troubleTicket.header.dateCreatedTask\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n                new ReportExtractParamField(\"whoCreatedTask\", this.translate.get(\"report.troubleTicket.header.whoCreatedTask\")),\n                new ReportExtractParamField(\"dateFinishedTask\", this.translate.get(\"report.troubleTicket.header.dateFinishedTask\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n                new ReportExtractParamField(\"whoClosedTask\", this.translate.get(\"report.troubleTicket.header.whoClosedTask\")),\n                new ReportExtractParamField(\"reporter\", this.translate.get(\"report.troubleTicket.reporter\")),\n                new ReportExtractParamField(\"ticketWhoCaused\", this.translate.get(\"report.troubleTicket.header.ticketWhoCaused\")),\n                new ReportExtractParamField(\"ticketBooking\", this.translate.get(\"report.troubleTicket.header.ticketBooking\")),\n                new ReportExtractParamField(\"priority\", this.translate.get(\"report.troubleTicket.header.priority\")),\n                new ReportExtractParamField(\"bikeId\", this.translate.get(\"report.troubleTicket.header.bikeId\")),\n                new ReportExtractParamField(\"bikeNumber\", this.translate.get(\"report.troubleTicket.header.bikeNumber\")),\n                new ReportExtractParamField(\"bikeBranding\", this.translate.get(\"report.troubleTicket.header.bikeBranding\")),\n                new ReportExtractParamField(\"ticketCoordinates\", this.translate.get(\"report.troubleTicket.header.ticketCoordinates\")),\n                new ReportExtractParamField(\"category\", this.translate.get(\"report.troubleTicket.header.category\")),\n                new ReportExtractParamField(\"issue\", this.translate.get(\"report.troubleTicket.header.issue\")),\n                new ReportExtractParamField(\"locationId\", this.translate.get(\"report.troubleTicket.header.locationId\")),\n                new ReportExtractParamField(\"locationName\", this.translate.get(\"report.troubleTicket.header.locationName\")),\n                new ReportExtractParamField(\"status\", this.translate.get(\"report.troubleTicket.header.status\"), null, null, statusSubstitutions)\n            ];\n\n        this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n            .subscribe(\n                data => {\n                    this.childProcessing = true;\n                    this.archivedChild.startProcessingProcess();\n\n                },\n                error => {\n                            console.log(\"Error downloading the file.\");\n                });\n    }\n\n\n\n    userFormatTrip(firstTripInMinutes: number) {\n        if(!firstTripInMinutes) return \"\";\n        if(firstTripInMinutes == -1) return this.translate.get(\"report.troubleTicket.cell.Open\");\n        return CmTroubleTicketListComponent.convertMinutesToHhMmFormat(firstTripInMinutes);\n    }\n\n    public static convertMinutesToHhMmFormat(minutes: number): string {\n        var h = Math.floor(minutes/60);\n        var m = minutes - h*60;\n        return (h > 0) ? h + 'h ' + m + 'm' : m + 'm';\n    }\n\n    canLoadXls():boolean {\n        return CmGuardService.isOrganizationAdmin();\n    }\n\n    processingMessage(event: any) {\n        this.childProcessing = event;\n    }\n\n    onListSize($event: Number) {\n        this.reportsListLen = $event\n        let i=0;\n    }\n}\n\nexport class CmTroubleTicketFilters extends TableFilter {\n    id: number;\n    bike: string;\n    location: string;\n    category: string;\n    statuses: string[];\n    type: string;\n    dateFrom: string;\n    dateTo: string;\n    bikeTypes: string[];\n    branding: string[];\n\n    constructor() {\n        super('ttList');\n    }\n\n    public toString(): string {\n        let types = [];\n        if(this.type == BIKE_AND_LOCATION_TYPES) {\n            types.push(BIKE_TYPE);\n            types.push(LOCATION_TYPE);\n        } else if (this.type) {\n            types.push(this.type);\n        }\n\n        let url: string = super.toString();\n        if (this.id) {\n            url += '&id=' + this.id;\n        }\n        if (this.bike) {\n            url += '&bikeNumber=' + this.bike;\n        }\n        if (this.location) {\n            url += '&location=' + this.location;\n        }\n        if (this.category) {\n            url += `&category=${encodeURIComponent(this.category)}`;\n        }\n        if (this.statuses && this.statuses.length > 0) {\n            url += '&statuses=' + this.statuses;\n        }\n        if (types && types.length > 0) {\n            url += '&types=' + types;\n        }\n        if (this.branding && this.branding.length > 0) {\n            url += '&bikeBranding=' + this.branding;\n        }\n        if (this.dateFrom) {\n            url += `&dateFrom=${encodeURIComponent(this.dateFrom)}`;\n        }\n        if (this.dateTo) {\n            url += `&dateTo=${encodeURIComponent(this.dateTo)}`;\n        }\n        if (this.bikeTypes && this.bikeTypes.length > 0) {\n            url += '&bikeTypes=' + this.bikeTypes;\n        }\n        return url;\n    }\n\n    public clear() {\n        super.clear();\n        this.id = null;\n        this.bike = null;\n        this.location = null;\n        this.category = null;\n        this.statuses = [];\n        this.type = null;\n        this.bikeTypes = [];\n        this.branding = [];\n        this.resetDates();\n        this.save();\n    }\n\n    private resetDates() {\n        let currDate = new Date();\n        this.dateTo = moment(currDate).format();\n        this.dateFrom = moment(currDate.setMonth(currDate.getMonth() - 1)).format();\n        this.dateFrom = null;\n        this.dateTo = null;\n    }\n}\n","/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nvar ConnectableObservable = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ConnectableObservable, _super);\n    function ConnectableObservable(source, subjectFactory) {\n        var _this = _super.call(this) || this;\n        _this.source = source;\n        _this.subjectFactory = subjectFactory;\n        _this._refCount = 0;\n        _this._isComplete = false;\n        return _this;\n    }\n    ConnectableObservable.prototype._subscribe = function (subscriber) {\n        return this.getSubject().subscribe(subscriber);\n    };\n    ConnectableObservable.prototype.getSubject = function () {\n        var subject = this._subject;\n        if (!subject || subject.isStopped) {\n            this._subject = this.subjectFactory();\n        }\n        return this._subject;\n    };\n    ConnectableObservable.prototype.connect = function () {\n        var connection = this._connection;\n        if (!connection) {\n            this._isComplete = false;\n            connection = this._connection = new Subscription();\n            connection.add(this.source\n                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n            if (connection.closed) {\n                this._connection = null;\n                connection = Subscription.EMPTY;\n            }\n        }\n        return connection;\n    };\n    ConnectableObservable.prototype.refCount = function () {\n        return higherOrderRefCount()(this);\n    };\n    return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\nexport var connectableObservableDescriptor = /*@__PURE__*/ (function () {\n    var connectableProto = ConnectableObservable.prototype;\n    return {\n        operator: { value: null },\n        _refCount: { value: 0, writable: true },\n        _subject: { value: null, writable: true },\n        _connection: { value: null, writable: true },\n        _subscribe: { value: connectableProto._subscribe },\n        _isComplete: { value: connectableProto._isComplete, writable: true },\n        getSubject: { value: connectableProto.getSubject },\n        connect: { value: connectableProto.connect },\n        refCount: { value: connectableProto.refCount }\n    };\n})();\nvar ConnectableSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(ConnectableSubscriber, _super);\n    function ConnectableSubscriber(destination, connectable) {\n        var _this = _super.call(this, destination) || this;\n        _this.connectable = connectable;\n        return _this;\n    }\n    ConnectableSubscriber.prototype._error = function (err) {\n        this._unsubscribe();\n        _super.prototype._error.call(this, err);\n    };\n    ConnectableSubscriber.prototype._complete = function () {\n        this.connectable._isComplete = true;\n        this._unsubscribe();\n        _super.prototype._complete.call(this);\n    };\n    ConnectableSubscriber.prototype._unsubscribe = function () {\n        var connectable = this.connectable;\n        if (connectable) {\n            this.connectable = null;\n            var connection = connectable._connection;\n            connectable._refCount = 0;\n            connectable._subject = null;\n            connectable._connection = null;\n            if (connection) {\n                connection.unsubscribe();\n            }\n        }\n    };\n    return ConnectableSubscriber;\n}(SubjectSubscriber));\nvar RefCountOperator = /*@__PURE__*/ (function () {\n    function RefCountOperator(connectable) {\n        this.connectable = connectable;\n    }\n    RefCountOperator.prototype.call = function (subscriber, source) {\n        var connectable = this.connectable;\n        connectable._refCount++;\n        var refCounter = new RefCountSubscriber(subscriber, connectable);\n        var subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    };\n    return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RefCountSubscriber, _super);\n    function RefCountSubscriber(destination, connectable) {\n        var _this = _super.call(this, destination) || this;\n        _this.connectable = connectable;\n        return _this;\n    }\n    RefCountSubscriber.prototype._unsubscribe = function () {\n        var connectable = this.connectable;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        var refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        var connection = this.connection;\n        var sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    };\n    return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nvar TimeoutErrorImpl = /*@__PURE__*/ (function () {\n    function TimeoutErrorImpl() {\n        Error.call(this);\n        this.message = 'Timeout has occurred';\n        this.name = 'TimeoutError';\n        return this;\n    }\n    TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n    return TimeoutErrorImpl;\n})();\nexport var TimeoutError = TimeoutErrorImpl;\n//# sourceMappingURL=TimeoutError.js.map\n","/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isArray } from '../util/isArray';\nimport { fromArray } from './fromArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function race() {\n    var observables = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        observables[_i] = arguments[_i];\n    }\n    if (observables.length === 1) {\n        if (isArray(observables[0])) {\n            observables = observables[0];\n        }\n        else {\n            return observables[0];\n        }\n    }\n    return fromArray(observables, undefined).lift(new RaceOperator());\n}\nvar RaceOperator = /*@__PURE__*/ (function () {\n    function RaceOperator() {\n    }\n    RaceOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new RaceSubscriber(subscriber));\n    };\n    return RaceOperator;\n}());\nexport { RaceOperator };\nvar RaceSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(RaceSubscriber, _super);\n    function RaceSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.hasFirst = false;\n        _this.observables = [];\n        _this.subscriptions = [];\n        return _this;\n    }\n    RaceSubscriber.prototype._next = function (observable) {\n        this.observables.push(observable);\n    };\n    RaceSubscriber.prototype._complete = function () {\n        var observables = this.observables;\n        var len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            for (var i = 0; i < len && !this.hasFirst; i++) {\n                var observable = observables[i];\n                var subscription = subscribeToResult(this, observable, undefined, i);\n                if (this.subscriptions) {\n                    this.subscriptions.push(subscription);\n                }\n                this.add(subscription);\n            }\n            this.observables = null;\n        }\n    };\n    RaceSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) {\n        if (!this.hasFirst) {\n            this.hasFirst = true;\n            for (var i = 0; i < this.subscriptions.length; i++) {\n                if (i !== outerIndex) {\n                    var subscription = this.subscriptions[i];\n                    subscription.unsubscribe();\n                    this.remove(subscription);\n                }\n            }\n            this.subscriptions = null;\n        }\n        this.destination.next(innerValue);\n    };\n    return RaceSubscriber;\n}(OuterSubscriber));\nexport { RaceSubscriber };\n//# sourceMappingURL=race.js.map\n","/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */\nimport { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return scheduleObservable(input, scheduler);\n        }\n        else if (isPromise(input)) {\n            return schedulePromise(input, scheduler);\n        }\n        else if (isArrayLike(input)) {\n            return scheduleArray(input, scheduler);\n        }\n        else if (isIterable(input) || typeof input === 'string') {\n            return scheduleIterable(input, scheduler);\n        }\n    }\n    throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=scheduled.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n    return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n    return new Observable(function (subscriber) {\n        var sub = new Subscription();\n        sub.add(scheduler.schedule(function () {\n            var observable = input[Symbol_observable]();\n            sub.add(observable.subscribe({\n                next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n                error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n                complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n            }));\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n    return new Observable(function (subscriber) {\n        var sub = new Subscription();\n        sub.add(scheduler.schedule(function () {\n            return input.then(function (value) {\n                sub.add(scheduler.schedule(function () {\n                    subscriber.next(value);\n                    sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n                }));\n            }, function (err) {\n                sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n            });\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=schedulePromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n    return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n    if (!input) {\n        throw new Error('Iterable cannot be null');\n    }\n    return new Observable(function (subscriber) {\n        var sub = new Subscription();\n        var iterator;\n        sub.add(function () {\n            if (iterator && typeof iterator.return === 'function') {\n                iterator.return();\n            }\n        });\n        sub.add(scheduler.schedule(function () {\n            iterator = input[Symbol_iterator]();\n            sub.add(scheduler.schedule(function () {\n                if (subscriber.closed) {\n                    return;\n                }\n                var value;\n                var done;\n                try {\n                    var result = iterator.next();\n                    value = result.value;\n                    done = result.done;\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return;\n                }\n                if (done) {\n                    subscriber.complete();\n                }\n                else {\n                    subscriber.next(value);\n                    this.schedule();\n                }\n            }));\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleIterable.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar AnimationFrameAction = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AnimationFrameAction, _super);\n    function AnimationFrameAction(scheduler, work) {\n        var _this = _super.call(this, scheduler, work) || this;\n        _this.scheduler = scheduler;\n        _this.work = work;\n        return _this;\n    }\n    AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if (delay !== null && delay > 0) {\n            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));\n    };\n    AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n        if (delay === void 0) {\n            delay = 0;\n        }\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n        }\n        if (scheduler.actions.length === 0) {\n            cancelAnimationFrame(id);\n            scheduler.scheduled = undefined;\n        }\n        return undefined;\n    };\n    return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map\n","/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */\nimport { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrameScheduler = /*@__PURE__*/ new AnimationFrameScheduler(AnimationFrameAction);\nexport var animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(AnimationFrameScheduler, _super);\n    function AnimationFrameScheduler() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    AnimationFrameScheduler.prototype.flush = function (action) {\n        this.active = true;\n        this.scheduled = undefined;\n        var actions = this.actions;\n        var error;\n        var index = -1;\n        var count = actions.length;\n        action = action || actions.shift();\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (++index < count && (action = actions.shift()));\n        this.active = false;\n        if (error) {\n            while (++index < count && (action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    };\n    return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from './Subscription';\nvar SubjectSubscription = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SubjectSubscription, _super);\n    function SubjectSubscription(subject, subscriber) {\n        var _this = _super.call(this) || this;\n        _this.subject = subject;\n        _this.subscriber = subscriber;\n        _this.closed = false;\n        return _this;\n    }\n    SubjectSubscription.prototype.unsubscribe = function () {\n        if (this.closed) {\n            return;\n        }\n        this.closed = true;\n        var subject = this.subject;\n        var observers = subject.observers;\n        this.subject = null;\n        if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n            return;\n        }\n        var subscriberIndex = observers.indexOf(this.subscriber);\n        if (subscriberIndex !== -1) {\n            observers.splice(subscriberIndex, 1);\n        }\n    };\n    return SubjectSubscription;\n}(Subscription));\nexport { SubjectSubscription };\n//# sourceMappingURL=SubjectSubscription.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport var subscribeToArray = function (array) {\n    return function (subscriber) {\n        for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n            subscriber.next(array[i]);\n        }\n        subscriber.complete();\n    };\n};\n//# sourceMappingURL=subscribeToArray.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function isPromise(value) {\n    return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n    var hasDefaultValue = arguments.length >= 2;\n    return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=last.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nvar toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();\nexport function fromEvent(target, eventName, options, resultSelector) {\n    if (isFunction(options)) {\n        resultSelector = options;\n        options = undefined;\n    }\n    if (resultSelector) {\n        return fromEvent(target, eventName, options).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n    }\n    return new Observable(function (subscriber) {\n        function handler(e) {\n            if (arguments.length > 1) {\n                subscriber.next(Array.prototype.slice.call(arguments));\n            }\n            else {\n                subscriber.next(e);\n            }\n        }\n        setupSubscription(target, eventName, handler, subscriber, options);\n    });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n    var unsubscribe;\n    if (isEventTarget(sourceObj)) {\n        var source_1 = sourceObj;\n        sourceObj.addEventListener(eventName, handler, options);\n        unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };\n    }\n    else if (isJQueryStyleEventEmitter(sourceObj)) {\n        var source_2 = sourceObj;\n        sourceObj.on(eventName, handler);\n        unsubscribe = function () { return source_2.off(eventName, handler); };\n    }\n    else if (isNodeStyleEventEmitter(sourceObj)) {\n        var source_3 = sourceObj;\n        sourceObj.addListener(eventName, handler);\n        unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n    }\n    else if (sourceObj && sourceObj.length) {\n        for (var i = 0, len = sourceObj.length; i < len; i++) {\n            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n        }\n    }\n    else {\n        throw new TypeError('Invalid event target');\n    }\n    subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n//# sourceMappingURL=fromEvent.js.map\n","/** PURE_IMPORTS_START  PURE_IMPORTS_END */\nexport function not(pred, thisArg) {\n    function notPred() {\n        return !(notPred.pred.apply(notPred.thisArg, arguments));\n    }\n    notPred.pred = pred;\n    notPred.thisArg = thisArg;\n    return notPred;\n}\n//# sourceMappingURL=not.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\nexport function takeUntil(notifier) {\n    return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nvar TakeUntilOperator = /*@__PURE__*/ (function () {\n    function TakeUntilOperator(notifier) {\n        this.notifier = notifier;\n    }\n    TakeUntilOperator.prototype.call = function (subscriber, source) {\n        var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n        var notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n        if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n            takeUntilSubscriber.add(notifierSubscription);\n            return source.subscribe(takeUntilSubscriber);\n        }\n        return takeUntilSubscriber;\n    };\n    return TakeUntilOperator;\n}());\nvar TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(TakeUntilSubscriber, _super);\n    function TakeUntilSubscriber(destination) {\n        var _this = _super.call(this, destination) || this;\n        _this.seenValue = false;\n        return _this;\n    }\n    TakeUntilSubscriber.prototype.notifyNext = function () {\n        this.seenValue = true;\n        this.complete();\n    };\n    TakeUntilSubscriber.prototype.notifyComplete = function () {\n    };\n    return TakeUntilSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n  // get current location\n  var location = typeof window !== \"undefined\" && window.location;\n\n  if (!location) {\n    throw new Error(\"fixUrls requires window.location\");\n  }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t  return css;\n  }\n\n  var baseUrl = location.protocol + \"//\" + location.host;\n  var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\(  = Match on the word \"url\" with any whitespace after it and then a parens\n\t   (  = Start a capturing group\n\t     (?:  = Start a non-capturing group\n\t         [^)(]  = Match anything that isn't a parentheses\n\t         |  = OR\n\t         \\(  = Match a start parentheses\n\t             (?:  = Start another non-capturing groups\n\t                 [^)(]+  = Match anything that isn't a parentheses\n\t                 |  = OR\n\t                 \\(  = Match a start parentheses\n\t                     [^)(]*  = Match anything that isn't a parentheses\n\t                 \\)  = Match a end parentheses\n\t             )  = End Group\n              *\\) = Match anything and then a close parens\n          )  = Close non-capturing group\n          *  = Match anything\n       )  = Close capturing group\n\t \\)  = Match a close parens\n\n\t /gi  = Get all matches, not the first.  Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t  return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t  \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n","export class CmCoordinates {\n    latitude: number;\n    longitude: number;\n}","import {Component, OnInit} from \"@angular/core\";\nimport {Router} from \"@angular/router\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {DialogRef, ModalComponent, overlayConfigFactory} from \"ngx-modialog\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport {CmBaseAutoTicketConfigComponent} from \"../cm-base-auto-ticket-config.component\";\nimport {CmAutoTicketConfig} from \"../cm-auto-ticket-conifg.model\";\nimport {CmModalBikeListComponent} from \"../../cm-bike-short-list/modal-window/cm-modal-bike-list.component\";\nimport {BIKE_TYPE} from \"../../../shared/const/missionType\";\nimport {CmModalLocationListComponent} from \"../../cm-location/modal-window/cm-modal-location-list.component\";\nimport {CmLocation} from \"../../../services/cm-location.service\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: \"cm-auto-ticket-config\",\n  template: require(\"./cm-auto-ticket-config.component.html\"),\n  styles: [require(\"./cm-auto-ticket-config.component.scss\").toString()]\n})\nexport class CmAutoTicketConfigComponent extends CmBaseAutoTicketConfigComponent\n  implements OnInit, ModalComponent<CmAutoTicketConfigModalDialog> {\n  private config: CmAutoTicketConfig;\n  private priorityList = [1, 2, 3];\n  private damageCategoryType = BIKE_TYPE;\n\n  constructor(\n    public dialog: DialogRef<CmAutoTicketConfigModalDialog>,\n    private http: CmHttpClient,\n    private dataService: DataService,\n    private router: Router,\n    protected translationService: CmTranslateService,\n    protected modal: Modal\n  ) {\n    super(\"autoTicketConfig.Title\", modal, translationService);\n\n    this.config = dialog.context.config;\n  }\n\n  ngOnInit() {}\n\n  private close() {\n    this.dialog.close();\n  }\n\n  private save() {\n    this.http.post(\"/bikes-sql/api/v1/auto-tickets-info\" + (this.isLocationAutoTroubleTicket() ? '/location' : ''), this.config).subscribe(\n        data => {this.modal.alert()\n            .message(this.translationService.get('message.SaveMsg'))\n            .open()\n            .result\n            .then(dialog => dialog.result)\n            .then(result => this.closeAndRefreshParent())\n            .catch(err => {});\n        },\n      error => {\n        console.error(JSON.stringify(error));\n        this.showMessage(`Error: ${this.translationService.get(error.message)}`);\n      }\n    );\n  }\n\n  private closeAndRefreshParent() {\n    try {\n      this.dialog.context.parent.reloadData.call(this.dialog.context.parent);\n      this.dialog.close();\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private openBikes() {\n    this.modal.open(CmModalBikeListComponent, overlayConfigFactory({parent: this}, BSModalContext))\n  }\n\n  public selectBike(bike: any) {\n    if(!this.config.bikes) this.config.bikes = [];\n    if(this.config.bikes.length == 10) {\n      this.showMessage(\"Sorry, you can't add more then 10 bikes.\");\n      return;\n    }\n\n    this.config.bikes.push(bike);\n  }\n\n  private removeBike(row) {\n    let index = this.config.bikes.indexOf(row, 0);\n    if (index > -1) {\n      this.config.bikes.splice(index, 1);\n    }\n  }\n\n  private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n\n  private isLocationAutoTroubleTicket() {\n    return this.config.type === 'LOCATION'\n  }\n\n  private isBikeAutoTroubleTicket() {\n    return this.config.type === 'BIKE'\n  }\n\n  private openLocations() {\n    this.modal.open(CmModalLocationListComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  public selectLocation(location: CmLocation) {\n    this.config.location = new CmLocation();\n    this.config.location.locationId = location.locationId;\n    this.config.location.locationName = location.fullName;\n  }\n\n}\n\nexport class CmAutoTicketConfigModalDialog extends BSModalContext {\n  public config: CmAutoTicketConfig;\n  public parent: any;\n}\n","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de = moment.defineLocale('de', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n            '_'\n        ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return de;\n\n})));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsShortStrictRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n        monthsRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsParse = [\n            /^janv/i,\n            /^févr/i,\n            /^mars/i,\n            /^avr/i,\n            /^mai/i,\n            /^juin/i,\n            /^juil/i,\n            /^août/i,\n            /^sept/i,\n            /^oct/i,\n            /^nov/i,\n            /^déc/i,\n        ];\n\n    var fr = moment.defineLocale('fr', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n            '_'\n        ),\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            w: 'une semaine',\n            ww: '%d semaines',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // TODO: Return 'e' when day of month > 1. Move this case inside\n                // block for masculine words below.\n                // See https://github.com/moment/moment/issues/3375\n                case 'D':\n                    return number + (number === 1 ? 'er' : '');\n\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n            hh: 'час_часа_часов',\n            dd: 'день_дня_дней',\n            ww: 'неделя_недели_недель',\n            MM: 'месяц_месяца_месяцев',\n            yy: 'год_года_лет',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'минута' : 'минуту';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    var monthsParse = [\n        /^янв/i,\n        /^фев/i,\n        /^мар/i,\n        /^апр/i,\n        /^ма[йя]/i,\n        /^июн/i,\n        /^июл/i,\n        /^авг/i,\n        /^сен/i,\n        /^окт/i,\n        /^ноя/i,\n        /^дек/i,\n    ];\n\n    // http://new.gramota.ru/spravka/rules/139-prop : § 103\n    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n    var ru = moment.defineLocale('ru', {\n        months: {\n            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n                '_'\n            ),\n            standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n                '_'\n            ),\n        },\n        monthsShort: {\n            // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n                '_'\n            ),\n            standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n                '_'\n            ),\n        },\n        weekdays: {\n            standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n                '_'\n            ),\n            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n                '_'\n            ),\n            isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n        },\n        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n        monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // копия предыдущего\n        monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // полные названия с падежами\n        monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n        // Выражение, которое соответствует только сокращённым формам\n        monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., H:mm',\n            LLLL: 'dddd, D MMMM YYYY г., H:mm',\n        },\n        calendar: {\n            sameDay: '[Сегодня, в] LT',\n            nextDay: '[Завтра, в] LT',\n            lastDay: '[Вчера, в] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В следующее] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В следующий] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В следующую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            lastWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В прошлое] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В прошлый] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В прошлую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'через %s',\n            past: '%s назад',\n            s: 'несколько секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'час',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            w: 'неделя',\n            ww: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночи|утра|дня|вечера/i,\n        isPM: function (input) {\n            return /^(дня|вечера)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночи';\n            } else if (hour < 12) {\n                return 'утра';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечера';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                case 'w':\n                case 'W':\n                    return number + '-я';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ru;\n\n})));\n","import {Component} from \"@angular/core\";\nimport {DialogRef} from \"ngx-modialog\";\nimport {CustomModalContext} from \"../../cm-assign/cm-assign.component\";\nimport {CmBikeListItem} from \"../cm-bike-list.model\";\n\n@Component({\n    selector: 'cm-modal-bike-list',\n    template: require('./cm-modal-bike-list.component.html'),\n    styles: [require('./cm-modal-bike-list.component.scss').toString()]\n})\nexport class CmModalBikeListComponent {\n    parent = null;\n\n    constructor(public dialog: DialogRef<CustomModalContext>) {\n        this.parent = dialog.context.parent;\n    }\n\n    private close() {\n        this.dialog.close();\n    }\n\n    private selectBike(bike: CmBikeListItem) {\n        this.parent.selectBike(bike);\n        this.close();\n    }\n}","import { Observable } from 'rxjs/Observable';\nimport {\n  Component,\n  EventEmitter,\n  Input,\n  OnInit,\n  OnChanges,\n  Output,\n  ViewChildren,\n  isDevMode,\n  OnDestroy\n} from '@angular/core';\nimport { AgmInfoWindow } from '@agm/core';\nimport * as moment from 'moment/moment';\nimport { CmCoordinates } from './../../shared/coordinates';\nimport { Marker, MarkerType } from '../../shared/marker';\nimport { CmOrganizationService } from './../../services/cm-organization.service';\nimport {DataService} from \"../../services/cm-data.service\";\n\n@Component({\n  selector: 'cm-map',\n  template: require('./cm-map.component.html'),\n  styles: [require('./cm-map.component.scss').toString()]\n})\nexport class CmMapComponent implements OnChanges, OnInit, OnDestroy {\n  @Input()\n  markers: Array<Marker> = [];\n\n  @Input()\n  mapHeight: number = 500;\n\n  @Input()\n  branding: []\n\n  @Input()\n  employee: []\n\n  @Output()\n  changeBound: EventEmitter<string> = new EventEmitter<string>();\n\n  openedMarker: Marker = null;\n\n  private mapCenter: Observable<CmCoordinates>;\n\n  private latitude: number;\n  private longitude: number;\n\n  private zoom: number = 12;\n\n  private delay: number = 2000;\n  private currentTimeout;\n\n  private bikeIconPath = {\n      red: {\n          normal: '/master-data/api/v1/bin/clientFiles/bike_red',\n          pedelec: '/master-data/api/v1/bin/clientFiles/bike_red_pedelec'\n      },\n      yellow: {\n          normal: '/master-data/api/v1/bin/clientFiles/bike_yellow',\n          pedelec: '/master-data/api/v1/bin/clientFiles/bike_yellow_pedelec'\n      },\n      green: {\n          normal: '/master-data/api/v1/bin/clientFiles/bike',\n          pedelec: '/master-data/api/v1/bin/clientFiles/bike_pedelec'\n      }\n  };\n\n  private bikeClusterPath: string = '/master-data/api/v1/bin/clientFiles/bike_cluster.png';\n\n  private stationUrlBase: string = '/report-format/api/v1/image/station';\n\n  private employeePath: string = '/master-data/api/v1/bin/clientFiles/employee.png';\n\n  styleFunc(feature) {\n    return ({\n      clickable: false,\n      strokeColor: feature.getProperty('strokeColor'),\n      zIndex: feature.getProperty('strokeColor') == 'red' ? 0 : 100,\n      fillOpacity: 0,\n      strokeWeight: 2\n    });\n  }\n\n  // TODO: For dev load it from local folder\n  // private bikeGreenPath = 'img/bike.png';\n  // private bikeYellowPath = 'img/bike_yellow.png';\n  // private bikeRedPath = 'img/bike_red.png';\n  // private bikeClusterPath = 'img/bike_cluster.png';\n\n  // private stationGreenPath = 'img/station.png';\n  // private stationYellowPath = 'img/station_yellow.png';\n  // private stationRedPath = 'img/station_red.png';\n\n  // private employeePath = 'img/employee.png';\n  //todo : just chech new argument\n  @ViewChildren(AgmInfoWindow)\n  childrenList;\n\n  private boundsInitialized: boolean = false;\n  areas: Object[];\n\n  constructor(private orgaService: CmOrganizationService,\n              private dataService: DataService) {}\n\n  ngOnInit(): void {\n    this.dataService.readCityAreas().subscribe(d => {\n      this.areas = d;\n      this.areas.forEach(a => {\n        let initialPolygon = a['polygon'];\n        let fullPolygon =\n        {\n          \"type\": \"FeatureCollection\",\n            \"features\": [\n          {\n            \"type\": \"Feature\",\n            \"properties\": {\n            },\n            \"geometry\": initialPolygon\n          }]\n        };\n        a['polygon'] = fullPolygon;\n      });\n      this.areas.forEach(a => a['polygon'].features.forEach(f => f.properties.strokeColor = a['type'] == 'OPERATIONAREA' ? 'red' : 'blue'));\n    });\n  }\n\n  ngOnChanges() {\n    // Display a single marker in the maps center\n    if (this.markers && this.markers.length === 1) this.displaySingleMarkerInMapCenter(this.markers[0]);\n    else this.loadMapCenterByLoginContext();\n  }\n\n  private displaySingleMarkerInMapCenter(marker: Marker) {\n    if (this.validCoords(marker)) {\n      // Do it only if center coordintates are different\n      if (marker.coordinates.latitude === this.latitude && marker.coordinates.longitude === this.longitude) return;\n      this.latitude = marker.coordinates.latitude;\n      this.longitude = marker.coordinates.longitude;\n      this.zoom = 16;\n      console.log(`MapCenter byMarker lat: ${this.latitude} long: ${this.longitude}`);\n    } else console.warn(`displaySingleMarkerInMapCenter: Marker ${JSON.stringify(marker)} invalid!`);\n  }\n\n  private validCoords(marker: Marker): boolean {\n    if (marker && marker.coordinates) {\n      if (marker.coordinates.latitude && marker.coordinates.longitude) return true;\n    }\n    return false;\n  }\n\n  private loadMapCenterByLoginContext() {\n    this.mapCenter = this.orgaService.loadCoordinatesByLoginContext();\n    this.mapCenter.subscribe(data => {\n      // If there is a longitude and latitude dont override it\n      if (this.longitude && this.latitude) return;\n      this.longitude = data.longitude;\n      this.latitude = data.latitude;\n      console.log(`MapCenter byLogin lat: ${this.latitude} long: ${this.longitude}`);\n    });\n  }\n\n  ngOnDestroy() {\n    this.closeMarkerDialogs();\n  }\n\n  private click(marker) {\n    this.closeMarkerDialogs();\n    this.openedMarker = marker;\n  }\n\n  private closeMarkerDialogs() {\n    try {\n      if (this.childrenList) {\n        this.childrenList.filter(child => child !== null).forEach(child => {\n          // child.close();\n          child.close().then(null, error => console.error(error));\n        });\n      }\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private getOpacity(marker){\n    return marker.highlighted ? 1.0 : 0.8;\n  }\n\n  private getZIndex(marker){\n    return marker.highlighted ? 1.0 : 0;\n  }\n\n  private getDotDev(marker){\n    // return \"https://dbconnect-test.checkmobile.com\" + this.getDot(marker);\n    return \"http://localhost:8081\" + this.getDot(marker);\n  }\n\n  private getDot(marker) {\n    switch (marker.type) {\n      case MarkerType.BIKE:\n        return this.getBikeMarker(marker);\n      case MarkerType.EMPLOYEE:\n        return this.employeePath;\n      case MarkerType.BIKE_CLUSTER:\n        return this.bikeClusterPath;\n      default:\n        return this.getStationMarker(marker);\n    }\n  }\n\n  private isJobType(marker: Marker): boolean {\n    return marker.type === MarkerType.JOB;\n  }\n\n  private isBikeType(marker: Marker): boolean {\n    return marker.type === MarkerType.BIKE;\n  }\n\n  private isEmployeeType(marker: Marker): boolean {\n    return marker.type === MarkerType.EMPLOYEE;\n  }\n\n  private isBikeClusterType(marker: Marker): boolean {\n    return marker.type === MarkerType.BIKE_CLUSTER;\n  }\n\n  private getLabel(marker) {\n    if (marker.type === MarkerType.BIKE) {\n      return marker.bikes.length.toString();\n    }\n  }\n\n  private boundsChange(bounds) {\n    try {\n      if (!this.boundsInitialized) {  // for first load\n        this.boundsInitialized = true;\n        this.sendBox(bounds);\n      } else {\n        if (this.currentTimeout) {\n          this.stopTimeout();\n        }\n        this.restartTimeout(bounds);\n      }\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private restartTimeout(bounds) {\n    try {\n      this.currentTimeout = setTimeout(() => {\n        this.sendBox(bounds);\n        this.currentTimeout = null;\n      }, this.delay);\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  private stopTimeout() {\n    clearTimeout(this.currentTimeout);\n  }\n\n  private sendBox(bounds){\n    let data = {\n      southLatitude: bounds.getSouthWest().lat(),\n      northLatitude: bounds.getNorthEast().lat(),\n      westLongitude: bounds.getSouthWest().lng(),\n      eastLongitude: bounds.getNorthEast().lng()\n    };\n    this.changeBound.next(JSON.stringify(data));\n\n  }\n\n  private getStationMarker(marker) {\n    let color, bike, pedelec, cargopedelec, hasLockedBikes = '_';\n    switch (marker.priority) {\n      case 1:\n        color = 'r';\n        break;\n      case 2:\n        color = 'y';\n        break;\n      default:\n        color = 'g';\n    }\n\n    hasLockedBikes = marker.hasLockedBikes ? \"!\" : \"_\";\n\n    if (marker.quantities) {\n      let quantities = marker.quantities;\n      bike = this.getStringValue(quantities['BIKE']);\n      pedelec = this.getStringValue(quantities['PEDELEC']);\n      cargopedelec = this.getStringValue(quantities['CARGOPEDELEC']);\n    }\n\n    const border = marker.bordered ? 'b' : '' ;\n\n    return this.stationUrlBase + `(${color}${bike}${pedelec}${cargopedelec}${hasLockedBikes})${border}.png`\n  }\n\n  private getStringValue(quantity){\n    if(quantity && quantity != 0){\n      return quantity > 0 ? '+'.concat(quantity) : quantity;\n    }else{\n      return '_';\n    }\n  }\n\n  /*\n   * Green -> No Job, or Job with Priority 3\n   * Yellow --> Job with Priority 2\n   * Red --> Job with Priority 1 or Bike has status \"Sperr\"\n   */\n  private getBikeMarker(marker) {\n    let type = marker.pedelec ? 'pedelec' : 'normal';\n    if (marker.status) {\n      if (SPERR_HAL_STATUS === marker.status.toLowerCase() || SPERR_MSP_STATUS.toLowerCase() === marker.status.toLowerCase())\n          return this.bikeIconPath.red[type] + (marker.bordered ? '_b.png' : '.png');\n    }\n\n    let color = this.bikeIconPath.green[type];\n\n    if (marker.priority) {\n      switch (marker.priority) {\n        case 1:\n          color = this.bikeIconPath.red[type];\n          break;\n        case 2:\n          color = this.bikeIconPath.yellow[type];\n          break;\n        case 3:\n          color = this.bikeIconPath.green[type];\n          break;\n      }\n    }\n\n\n    return color + (marker.bordered ? '_b.png' : '.png');\n  }\n\n  private formatTimestamp(dateStr) {\n    return moment(dateStr).format('DD.MM.YYYY HH:mm,ss');\n  }\n}\nexport const SPERR_HAL_STATUS = 'sperr';\nexport const SPERR_MSP_STATUS = 'LOCKED';\nexport const READY_HAL_STATUS = 'ready';\nexport const READY_MSP_STATUS = 'READY';\n\nexport interface CmCity {\n  id:number;\n  alias:Array<string>;\n  name:string;\n  northLatitude:number;\n  southLatitude:number;\n  westLongitude:number;\n  eastLongitude:number;\n  emailDispatcher:string;\n  emailCustomerCenter:string;\n}\n","import { Observable } from \"rxjs/Observable\";\nimport { CmHttpClient } from \"./http_client\";\nimport { Employee } from \"./../components/cm-assign/cm-assign.component\";\nimport { BikeJobListItem } from \"./../components/cm-bike-job/cm-bike-job-list.model\";\nimport { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class CmUserWorkloadService {\n  constructor(private http: CmHttpClient) {}\n\n  public loadEmployeeWorkLoad(employee: Employee): Observable<number> {\n    return this.http.get(`/bikes-sql/api/v1/tasks/repairTimeForUsers?user=${employee.login}`);\n  }\n\n  public calculateJobsWorkload(jobs: BikeJobListItem[]): number {\n    jobs = jobs.filter(job => job.estimatedRepairTime);\n    if (jobs && jobs.length > 0) return jobs.map(job => job.estimatedRepairTime).reduce((sum, repairTime) => sum + repairTime);\n    return 0;\n  }\n}\n\nexport const EMPLOYEE_WORKLOAD_THRESHOLD: number = 600;\n","import { CmLocationsService } from './../../../services/cm-location.service';\nimport { Component, EventEmitter, Input, OnChanges, Output, ViewContainerRef, OnInit, OnDestroy } from '@angular/core';\nimport {DialogRef, ModalComponent, overlayConfigFactory} from 'ngx-modialog';\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { CmAssignComponent } from '../../cm-assign/cm-assign.component';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport { CmHttpClient } from '../../../services/http_client';\nimport {BikeJobListItem, CmJobType} from '../../cm-bike-job/cm-bike-job-list.model';\nimport { CmTroubleTicketComponent } from '../../cm-trouble-ticket/item/cm-trouble-ticket.component';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { BIKE_TYPE, LOCATION_TYPE } from '../../../shared/const/missionType';\nimport { CmLocation } from '../../../services/cm-location.service';\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport * as moment from \"moment\";\nimport {BikeType} from \"../../../shared/bike\";\n\n@Component({\n  selector: 'cm-job-item',\n  template: require('./cm-job-item.component.html'),\n  styles: [require('./cm-job-item.component.scss').toString()]\n})\nexport class CmJobItemComponent extends TabTitle implements OnChanges, OnInit, OnDestroy, ModalComponent<CmJobListModalDialog> {\n  @Input()\n  locationName: string;\n  @Input()\n  locationId: number;\n  @Input()\n  bikeNumber: string;\n  @Input()\n  bikeId: number;\n  @Input()\n  bikeStatus: string;\n  @Input()\n  showClose: boolean = true;\n  @Input()\n  public branding: string[];\n\n  @Output()\n  closeJob: EventEmitter<any> = new EventEmitter();\n\n  private jobItemList: Array<CmJobListItem> = [];\n  private routeFrom: string;\n\n  private checkAll: boolean = true;\n\n  private inProgressOpenStatuses: string = 'InProgress,Open';\n\n  private currentTimeStr = moment().format();\n\n  constructor(\n    private modal: Modal,\n    private vcRef: ViewContainerRef,\n    private activatedRoute: ActivatedRoute,\n    private router: Router,\n    private http: CmHttpClient,\n    public translate: CmTranslateService,\n    public dialog: DialogRef<CmJobListModalDialog>,\n    private locationService: CmLocationsService\n  ) {\n    super('outsideJob.Title', translate);\n    // todo: 'defaultViewContainer' does not exist on type 'Overlay'\n    // modal.overlay.defaultViewContainer = vcRef;\n\n    this.branding = dialog.context.branding;\n    this.locationId = dialog.context.jobId;\n    this.reloadData();\n\n    setInterval(() => {\n      this.currentTimeStr = moment().format();\n    }, 1000);\n  }\n\n  ngOnInit() {\n    this.reloadData();\n  }\n  ngOnChanges() {\n    this.reloadData();\n  }\n\n  ngOnDestroy() {\n    try {\n      // todo - 'defaultViewContainer' does not exist on type 'Overlay'\n      //this.modal.overlay.defaultViewContainer.clear();\n    } catch (error) {\n      console.error(error);\n    }\n  }\n\n  public reloadData() {\n    let url = '/bikes-sql/api/v1/tasks/bikesJobList';\n    if (this.locationId) url += `?location=${this.locationId}`;\n    else if (this.bikeNumber) url += `?bikeNumber=${this.bikeNumber}`;\n    if(this.branding && this.branding.length > 0) url += `&bikeBranding=${this.branding.join(',')}`;\n\n\n    if (this.locationId || this.bikeNumber) {\n      this.http.get<PageAdapter<CmJobListItem>>(`${url}&status=${this.inProgressOpenStatuses}`).subscribe(data => {\n        let tempList = data.content;\n        tempList.forEach(el => (el.checked = true));\n        this.jobItemList = tempList;\n      });\n    }\n\n    /*\n     * DBREN-484: Display Station name in Details of Joblist\n     * NOTE:\n     * 1. All @Inputs are never filled because this component is only called by routes. This is a bug or it was changed.\n     * 2. All routes so far call this component only with the locationId. So we can load the complete station data by its id.\n     */\n    this.loadLocation();\n  }\n\n  //DBREN-484: Display Station name in Details of Joblist\n  private loadLocation() {\n    if (this.locationId)\n      this.http.get<CmLocation>(`/bikes-sql/api/v1/locations/${this.locationId}`).subscribe(data => {\n        let location = data;\n        if (location) this.locationName = this.locationService.getFullName(location);\n      });\n  }\n\n  private closeJobItem() {\n    this.dialog.close();\n    this.closeJob.next(true);\n  }\n\n  private assign() {\n    this.modal.open(CmAssignComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  private unassign() {\n    let idArray = [];\n    this.jobItemList.filter(el => el.checked === true).forEach(el => idArray.push(el.id));\n    this.http.post('/bikes-sql/api/v1/tasks/unbooking', idArray).subscribe(data => this.reloadData());\n  }\n\n  private getText(jobItem: CmJobListItem): string {\n    switch (jobItem.task) {\n      case CmJobType[CmJobType.TO_MOVE]:\n        return `${this.translate.get('bikesJobListType.list.TO_MOVE')}`;\n      case CmJobType[CmJobType.TO_CHECK]:\n        return `${this.translate.get('outsideJob.CheckLabel')} ${jobItem.bike.bikeNumber}`;\n      case CmJobType[CmJobType.TO_CHARGE]:\n        return `${this.translate.get('bikesJobListType.list.TO_CHARGE')} ${jobItem.bike.bikeNumber}`;\n      case CmJobType[CmJobType.TO_WORKSHOP]:\n        return `${jobItem.bike.bikeNumber} ${this.translate.get('outsideJob.ToWsLabel')}`;\n      case CmJobType[CmJobType.FOR_LOCATION]:\n        return `${this.translate.get('bikesJobListType.list.FOR_LOCATION')} ${this.locationName} (${this.locationId})`;\n      case CmJobType[CmJobType.LOCATION]:\n        return `${this.translate.get('bikesJobListType.list.LOCATION')}`;\n    }\n  }\n\n  private getBikeTypes() {\n    return Object.keys(BikeType)\n  }\n\n  private getQuantity(item: BikeJobListItem, bikeType: string) {\n    return item == null || item.quantities == null ? null : item.quantities[bikeType];\n  }\n\n  private selectAll() {\n    this.jobItemList.forEach(item => (item.checked = this.checkAll));\n  }\n\n  private isBikeValid(): boolean {\n    return this.bikeId && this.bikeId > 0;\n  }\n\n  private isLocationValid(): boolean {\n    return this.locationId && this.locationId > 0;\n  }\n\n  private addNewBikeTicket() {\n    let bike = { bikeId: this.bikeId, bikeNumber: this.bikeNumber };\n    this.modal.open(\n      CmTroubleTicketComponent,\n      overlayConfigFactory({ ticketId: -1, bike: bike, missionType: BIKE_TYPE, parent: this }, BSModalContext)\n    );\n  }\n\n  private addNewLocationTicket() {\n    let location = { locationId: this.locationId, fullName: this.locationName };\n    this.modal.open(\n      CmTroubleTicketComponent,\n      overlayConfigFactory({ ticketId: -1, location: location, missionType: LOCATION_TYPE, parent: this }, BSModalContext)\n    );\n  }\n}\n\nclass CmJobListItem extends BikeJobListItem {\n  checked: boolean;\n}\n\nexport class CmJobListModalDialog extends BSModalContext {\n  public jobId: number;\n  public branding: string[];\n}\n","import { CmUtil } from './../../../shared/cm-util';\nimport {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';\nimport { DataService } from '../../../services/cm-data.service';\nimport { CmHttpClient } from '../../../services/http_client';\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { overlayConfigFactory } from 'ngx-modialog';\nimport { CmAssignComponent } from '../../cm-assign/cm-assign.component';\nimport * as moment from 'moment/moment';\nimport { Router } from '@angular/router';\nimport {BikeJobListItem} from '../cm-bike-job-list.model';\nimport { TableFilter } from '../../../shared/tableFilter';\nimport { MarkerType } from '../../../shared/marker';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {ReportExtractParam, ReportExtractParamField} from \"../../../shared/reportExtractParam\";\nimport {HttpResponse} from \"@angular/common/http\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {CmBikeJobItemComponent} from \"../item/cm-bike-job-item.component\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\nimport {BikeType} from \"../../../shared/bike\";\nimport {CmReportComponent} from \"../../cm-report/cm-report.component\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: 'cm-bike-job-list',\n  template: require('./cm-bike-job-list.component.html'),\n  styles: [require('./cm-bike-job-list.component.scss').toString(), require('../../cm-main/main.css').toString()]\n})\nexport class CmBikeJobListComponent extends TabTitle implements OnInit {\n  private filters: BikesJobListFilters = new BikesJobListFilters();\n\n  private pageLimit: number = 15;\n  private total: number;\n  private page: number = 1;\n\n  private jobItemList: Array<BikeJobListItem> = [];\n  private typeList = [];\n  private statusList = [];\n  private stationList = [];\n\n  private currentTimeStr = moment().format();\n\n  private spType: string = SpinnerUtils.type;\n  private spText: string = SpinnerUtils.text;\n  private spColor: string = SpinnerUtils.color;\n  private spBdColor: string = SpinnerUtils.bdColor;\n  private spFullScreen: boolean = SpinnerUtils.fullScreen;\n  private spSize: string = SpinnerUtils.size;\n\n  private childProcessing: boolean = false;\n  private reportType: string = \"BikeJobList\";\n  private reportsListLen: Number = 0;\n  private maxReportsListSize = 5;\n\n  @ViewChild('archivedrep', {static: false}) archivedChild: CmReportComponent;\n\n\n  constructor(\n    private dataService: DataService,\n    private http: CmHttpClient,\n    private router: Router,\n    private modal: Modal,\n    public translate: CmTranslateService,\n    private componentTracker: CmComponentTrackerService,\n    private spinner: NgxSpinnerService\n  ) {\n    super('bikeJobList.Title', translate);\n\n    setInterval(() => {\n      this.currentTimeStr = moment().format();\n    }, 1000);\n  }\n\n  ngOnInit() {\n    this.dataService.returnLocalizedMap('/bikesJobListType').subscribe((data:any) => (this.typeList = data.bikesJobListType));\n    this.dataService.returnLocalizedMap('/jobStatus').subscribe((data:any) => (this.statusList = data.jobStatus));\n    this.dataService.getStationList().subscribe(data => this.stationList = data);\n\n    this.filters = new BikesJobListFilters();\n    this.loadData();\n  }\n\n  public reloadData() {\n    this.jobItemList = [];\n    this.loadData();\n  }\n\n  private loadData() {\n    this.spinner.show();\n    this.filters.save();\n\n    this.http\n      .get<PageAdapter<BikeJobListItem>>(`/bikes-sql/api/v1/tasks/bikesJobList?page=${this.page}&limit=${this.pageLimit}${this.filters.toString()}`)\n      .subscribe(\n        data => {\n          this.spinner.hide();\n          this.jobItemList = data.content;\n          this.total = data.total;\n          if(this.total == 0){\n            this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n          }\n        },\n        error => {\n          this.spinner.hide();\n          this.jobItemList = [];\n          this.total = 0;\n          console.error(error);\n          this.modal.alert().message(\" Error: \" + (error.error ? error.error.message : error.message)\n          ).open()\n        }\n      );\n  }\n\n  private setPage(page: number) {\n    this.page = page;\n    this.loadData();\n  }\n\n  private showDetails(row) {\n    this.modal.open(CmBikeJobItemComponent, overlayConfigFactory({id: row.id}, BSModalContext));\n  }\n\n  private assign(row) {\n    row.checked = true;\n    this.modal.open(CmAssignComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  private getTaskName(taskId): string {\n    if (this.typeList) {\n      for (let item of this.typeList) {\n        if (item.name === taskId) return item.text;\n      }\n    }\n\n    return taskId;\n  }\n\n  private getStatusName(taskId): string {\n    if (this.statusList) {\n      for (let item of this.statusList) {\n        if (item.name === taskId) return item.text;\n      }\n    }\n    return taskId;\n  }\n\n  private formatDate(date): string {\n    return CmUtil.formatDate(date);\n  }\n\n  private sort(field) {\n    this.filters.sort(field);\n    this.reloadData();\n  }\n\n  private getLocationType() {\n    return MarkerType.JOB;\n  }\n\n  private getBikeTypes() {\n    return Object.keys(BikeType)\n  }\n\n  private getQuantity(item: BikeJobListItem, bikeType: string) {\n    return item == null || item.quantities == null ? null : item.quantities[bikeType];\n  }\n\n  dataExtract() {\n    if(this.reportsListLen >= this.maxReportsListSize){\n      this.archivedChild.removeLastReportFromList();\n    }\n\n\n    let reportFileName = this.translate.get(\"report.jobAssign.fileName\") ;\n    let reportParams = new ReportExtractParam();\n    reportParams.method = \"POST\";\n    reportParams.path = `/bikes-sql/api/v1/history?${this.filters.toStringExportCase()}`;\n    reportParams.paging = true;\n\n    let stationSubstitution = {};\n    this.stationList.forEach(s => stationSubstitution[s.name] = s.text);\n\n    let typeSubstitution = {\n        LOAD: this.translate.get(\"report.jobAssign.cell.LOAD\"),\n        UNLOAD: this.translate.get(\"report.jobAssign.cell.UNLOAD\")\n    };\n\n    reportParams.fields =\n        [\n          new ReportExtractParamField(\"bike.bikeNumber\", this.translate.get(\"report.jobAssign.header.bikeNumber\")),\n          new ReportExtractParamField(\"bike.branding\", this.translate.get(\"report.bike.header.bikeBranding\")),\n          new ReportExtractParamField(\"employee\", this.translate.get(\"report.jobAssign.header.employee\")),\n          new ReportExtractParamField(\"when\", this.translate.get(\"report.jobAssign.header.date\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"type\", this.translate.get(\"report.jobAssign.header.type\"), null, null, typeSubstitution),\n          new ReportExtractParamField(\"station\", this.translate.get(\"report.jobAssign.header.station\"), null, null, stationSubstitution),\n          new ReportExtractParamField(\"location.locationName\", this.translate.get(\"report.jobAssign.header.location\"), null, null, stationSubstitution)\n        ];\n\n    this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n        .subscribe(\n            data => {\n              this.childProcessing = true;\n              this.archivedChild.startProcessingProcess();\n\n            },\n            error => {\n              console.log(\"Error downloading the file.\");\n            });\n\n  }\n\n  jobsDataExtractReport(){\n    if(this.reportsListLen >= this.maxReportsListSize){\n      this.archivedChild.removeLastReportFromList();\n    }\n\n    let filterString=this.filters.toString();\n\n    if (this.filters.type){\n      let first = filterString.indexOf(\"&type=\");\n      let last  = filterString.indexOf(\"&\",first+1);\n      let wordStr;\n      if(last==-1){\n        wordStr =  filterString.substring(first);\n      }else{\n        wordStr =  filterString.substring(first,last);\n      }\n      filterString = filterString.replace(wordStr,\"\");\n    }\n\n    let reportParams = new ReportExtractParam();\n    reportParams.method = \"GET\";\n    reportParams.path = `/bikes-sql/api/v1/tasks/bikesJobListExport?fullReport=true${filterString}`;\n    reportParams.paging = true;\n\n    let statusSubstitution = {\n      \"Open\":       this.translate.get(\"report.moving.cell.open\"),\n      \"Closed\":     this.translate.get(\"report.moving.cell.closed\"),\n      \"InProgress\": this.translate.get(\"report.moving.cell.inProgress\")\n    };\n\n    reportParams.fields =\n        [\n          new ReportExtractParamField(\"id\",this.translate.get('report.taskId.Label')),\n          new ReportExtractParamField(\"branding\",this.translate.get('branding.Label')),\n          new ReportExtractParamField(\"city\",this.translate.get('report.bike.header.city')),\n          new ReportExtractParamField(\"bike.bikeNumber\",this.translate.get('report.bike.header.bikeNumber')),\n          new ReportExtractParamField(\"bike.active\",this.translate.get('active.Label')),\n          new ReportExtractParamField(\"bike.type\",this.translate.get('bikeType.Label')),\n          new ReportExtractParamField(\"notAtStation\",this.translate.get('bikeType.notAtStation')),\n          new ReportExtractParamField(\"loadedBy\",this.translate.get('report.loadedBy')),\n          new ReportExtractParamField(\"loadedWhen\",this.translate.get('report.loadedWhen')),\n          new ReportExtractParamField(\"task\",this.translate.get('report.task.Label')),\n          new ReportExtractParamField(\"status\",this.translate.get('troubleTickets.StatusLabel'),null,null, statusSubstitution),\n          new ReportExtractParamField(\"location.locationNumber\",this.translate.get(\"report.bike.header.locationNumber\")),\n          new ReportExtractParamField(\"location.name\", this.translate.get('report.bike.header.locationName')),\n          new ReportExtractParamField(\"location.currentStatus\", this.translate.get('report.location.status.Label')),\n          new ReportExtractParamField(\"location.type\", this.translate.get('report.location.type.Label')),\n          new ReportExtractParamField(\"coordinates.latitude\", this.translate.get('report.location.latitude.Label')),\n          new ReportExtractParamField(\"coordinates.longitude\", this.translate.get('report.location.longitude.Label')),\n          new ReportExtractParamField(\"whoCreated\",this.translate.get('report.moving.whoCreated')),\n          new ReportExtractParamField(\"whoClosed\" ,this.translate.get('report.moving.whoClosed')),\n          new ReportExtractParamField(\"dateCreated\",this.translate.get('troubleTickets.CreationDateLabel'),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"dateFinished\",this.translate.get('finishDate.Label'),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"user\",this.translate.get('jobItem.AssignedToLabel')),\n          new ReportExtractParamField(\"dateAssigned\",this.translate.get(\"assignmentDate.Label\"),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"mustBeFixedAt\",this.translate.get('location.fixTime'),\"dd.MM.yyyy HH:mm\", \"CET\")     // -------------\n        ];\n    let quantitiesPrefix = \"quantities\";\n    Object.keys(BikeType).forEach(bikeType => {\n      let field = quantitiesPrefix + bikeType;\n      let label = 'bikeType.report' + \".\" + bikeType;\n      reportParams.fields.push(new ReportExtractParamField(field, this.translate.get(label)));\n    });\n    let reportFileName = this.translate.get(\"report.tasksExtract.fileName\") ;\n\n    this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n        .subscribe(\n            data => {\n              this.childProcessing = true;\n              this.archivedChild.startProcessingProcess();\n\n            },\n            error => {\n              console.log(\"Error downloading the file.\");\n            });\n\n  }\n\n  dataExtractMovingReport() {\n    if(this.reportsListLen >= this.maxReportsListSize){\n      this.archivedChild.removeLastReportFromList();\n    }\n\n\n    let filterString=this.filters.toString();\n    if (this.filters.type){\n      let first = filterString.indexOf(\"&type=\");\n      let last  = filterString.indexOf(\"&\",first+1);\n      let wordStr;\n      if(last==-1){\n        wordStr =  filterString.substring(first);\n      }else{\n        wordStr =  filterString.substring(first,last);\n      }\n      filterString = filterString.replace(wordStr,\"\");\n    }\n    let reportParams = new ReportExtractParam();\n    reportParams.method = \"GET\";\n    reportParams.path = `/bikes-sql/api/v1/tasks/bikesJobListExport?type=TO_MOVE&showMustBeFixedOnly=true${filterString}`;  // TO_MOVE!!!!!!!!\n    reportParams.paging = true;\n\n      let typeTaskSubstitution = {\n          TO_MOVE: this.translate.get('bikesJobListType.list.TO_MOVE')\n      };\n    let statusSubstitution = {\n      \"Open\":       this.translate.get(\"report.moving.cell.open\"),\n      \"Closed\":     this.translate.get(\"report.moving.cell.closed\"),\n      \"InProgress\": this.translate.get(\"report.moving.cell.inProgress\")\n    };\n\n\n      reportParams.fields =\n        [\n          new ReportExtractParamField(\"priority\",this.translate.get('priority.Label')),\n          new ReportExtractParamField(\"dateCreated\",this.translate.get('troubleTickets.CreationDateLabel'),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"dateFinished\",this.translate.get('finishDate.Label'),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"dateAssigned\",this.translate.get(\"assignmentDate.Label\"),\"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"status\",this.translate.get('troubleTickets.StatusLabel'),null,null, statusSubstitution),\n          new ReportExtractParamField(\"user\",this.translate.get('report.moving.user')),\n          new ReportExtractParamField(\"whoCreated\",this.translate.get('report.moving.whoCreated')),\n          new ReportExtractParamField(\"whoClosed\" ,this.translate.get('report.moving.whoClosed')),\n          new ReportExtractParamField(\"location.locationNumber\",this.translate.get(\"report.moving.locationNumber\")),\n          new ReportExtractParamField(\"location.locationName\", this.translate.get('location.Label')),\n          new ReportExtractParamField(\"mustBeFixedAt\",this.translate.get('location.fixTime'),\"dd.MM.yyyy HH:mm\", \"CET\")     // -------------\n          // new ReportExtractParamField(\"task\"),\n        ];\n      let quantitiesPrefix = \"quantities\";\n      Object.keys(BikeType).forEach(bikeType => {\n        let field = quantitiesPrefix + bikeType;\n        let label = quantitiesPrefix + \".\" + bikeType;\n        reportParams.fields.push(new ReportExtractParamField(field, this.translate.get(label)));\n      });\n    let reportFileName = this.translate.get(\"report.bikeJobList.fileName\") ;\n\n    this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n        .subscribe(\n            data => {\n              this.childProcessing = true;\n              this.archivedChild.startProcessingProcess();\n\n            },\n            error => {\n              console.log(\"Error downloading the file.\");\n            });\n\n\n  }\n\n  canLoadXls():boolean {\n    return CmGuardService.isOrganizationAdmin();\n  }\n\n  processingMessage(event: any) {\n    this.childProcessing = event;\n  }\n\n  onListSize($event: Number) {\n    this.reportsListLen = $event\n    let i=0;\n  }\n\n\n}\n\nexport class BikesJobListFilters extends TableFilter {\n  bikeNumber: string;\n  type: string;\n  haveNoLocation: boolean;\n  disabledBikes: boolean;\n  status: Array<string>;\n  branding: Array<string>;\n  bikeTypes: Array<string>;\n  location: string;\n  priority: number;\n  users: Array<string>;\n  dateCreatedFrom: string;\n  dateCreatedTo: string;\n  dateFinishedFrom: string;\n  dateFinishedTo: string;\n\n  constructor() {\n    super('bikeJobListFilters');\n    this.initDates();\n  }\n\n  public clear() {\n    super.clear();\n    this.bikeNumber = null;\n    this.type = null;\n    this.location = null;\n    this.disabledBikes = false;\n    this.haveNoLocation = false;\n    this.priority = null;\n    this.branding = [];\n    this.users = [];\n    this.status = [];\n    this.bikeTypes = [];\n    this.resetDates();\n    this.save();\n  }\n\n  public toString(): string {\n    let result = super.toString();\n    if (this.bikeNumber) {\n      result += `&bikeNumber=${this.bikeNumber}`;\n    }\n    if (this.type) {\n      result += `&type=${this.type}`;\n    }\n    if (this.location) {\n      result += `&location=${this.location}`;\n    }\n    if (this.haveNoLocation) {\n      result += `&haveNoLocation=${this.haveNoLocation}`;\n    }\n    if (this.disabledBikes) {\n      result += `&disabledBikes=${this.disabledBikes}`;\n    }\n    if (this.priority) {\n      result += `&priority=${this.priority}`;\n    }\n    if (this.users && this.users.length > 0) {\n      result += `&user=${this.users}`;\n    }\n    if (this.dateCreatedFrom) {\n      result += `&dateCreatedFrom=${encodeURIComponent(this.dateCreatedFrom)}`;\n    }\n    if (this.dateCreatedTo) {\n      result += `&dateCreatedTo=${encodeURIComponent(this.dateCreatedTo)}`;\n    }\n    if (this.dateFinishedFrom) {\n      result += `&dateFinishedFrom=${encodeURIComponent(this.dateFinishedFrom)}`;\n    }\n    if (this.dateFinishedTo) {\n      result += `&dateFinishedTo=${encodeURIComponent(this.dateFinishedTo)}`;\n    }\n    if (this.status && this.status.length > 0) {\n      result += `&status=${this.status}`;\n    }\n    if(this.branding && this.branding.length > 0){\n      result += `&bikeBranding=${this.branding}`;\n    }\n    if (this.bikeTypes && this.bikeTypes.length > 0) {\n      result += `&bikeTypes=${this.bikeTypes}`;\n    }\n\n    return result;\n  }\n\n  toStringExportCase() {\n    let result = super.toString();\n    if (this.bikeNumber) {\n      result += `&bikeNumbers=${this.bikeNumber}`;\n    }\n    if (this.location) {\n      result += `&locationIds=${this.location}`;\n    }\n    if (this.branding && this.branding.length > 0) {\n      if(result.length && result.length > 0){\n        result += `&`;\n      }\n      result += `bikeBranding=${this.branding}`;\n    }\n    if (this.users && this.users.length > 0) {\n      result += `&user=${this.users}`;\n    }\n    if (this.dateCreatedFrom) {\n      console.log(this.dateCreatedFrom);\n      result += `&dateFrom=${encodeURIComponent(this.dateCreatedFrom)}`;\n    }\n    if (this.dateCreatedTo) {\n      result += `&dateTo=${encodeURIComponent(this.dateCreatedTo)}`;\n    }\n\n    return result;\n\n  }\n\n  private resetDates() {\n    let currDate = new Date();\n    this.dateCreatedTo = moment(currDate).format();\n    this.dateCreatedFrom = moment(currDate.setMonth(currDate.getMonth() - 1)).format();\n    this.dateFinishedFrom = null;\n    this.dateFinishedTo = null;\n  }\n\n  private initDates() {\n    let currDate = new Date();\n    this.dateCreatedTo = this.dateCreatedTo || moment(currDate).format();\n    this.dateCreatedFrom = this.dateCreatedFrom || moment(currDate.setMonth(currDate.getMonth() - 1)).format();\n  }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { DataService } from \"../../../services/cm-data.service\";\nimport { BikeJobListItem } from \"../cm-bike-job-list.model\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport   \"rxjs/add/operator/map\";\nimport {BSModalContext} from \"ngx-modialog/plugins/bootstrap\";\nimport {DialogRef, ModalComponent} from \"ngx-modialog\";\n\n@Component({\n  selector: \"cm-bike-job-item\",\n  template: require(\"./cm-bike-job-item.component.html\"),\n  styles: [require('./cm-bike-job-item.component.scss').toString()]\n})\nexport class CmBikeJobItemComponent extends TabTitle implements ModalComponent<CmBikeJobItemModalDialog>, OnInit {\n  private model: BikeJobListItem = new BikeJobListItem();\n  private typeList = [];\n\n  constructor(\n    private http: CmHttpClient,\n    public dialog: DialogRef<CmBikeJobItemModalDialog>,\n    private router: Router,\n    private r: ActivatedRoute,\n    private dataService: DataService,\n    public translate: CmTranslateService\n  ) {\n    super(\"bikeJobList.Title\", translate);\n    this.model.id = dialog.context.id;\n  }\n\n  ngOnInit() {\n    this.dataService.returnLocalizedMap(\"/bikesJobListType\").subscribe((data:any) => {\n      this.typeList = data.bikesJobListType;\n      this.loadData();\n    });\n  }\n\n  private loadData() {\n    this.http\n      .get<BikeJobListItem>(\"/bikes-sql/api/v1/tasks/\" + this.model.id)\n      .subscribe(data => {\n        this.model = data;\n      });\n  }\n\n  private close() {\n    this.dialog.close();\n  }\n\n  private getTaskName(taskId): string {\n    if (this.typeList) {\n      for (let item of this.typeList) {\n        if (item.name === taskId) {\n          return item.text;\n        }\n      }\n    }\n\n    return taskId;\n  }\n}\n\nexport class CmBikeJobItemModalDialog extends BSModalContext {\n  public id: number;\n}\n","import {Injectable} from \"@angular/core\";\nimport {CmComponentTrackerService} from \"./cm-component-tracker-service\";\n\n@Injectable()\nexport class PagerService {\n    constructor(private componentTracker: CmComponentTrackerService) {\n    }\n\n    getPager(totalItems: number, currentPage: number = 1, pageSize: number = 10, init: boolean) {\n        if(init) {\n            let pageFromStorage = this.componentTracker.readLastParentPageForCurrentComponentIfExist();\n            currentPage = pageFromStorage ? pageFromStorage : currentPage;\n        }\n\n        // calculate total pages\n        let totalPages = Math.ceil(totalItems / pageSize);\n\n        let startPage: number, endPage: number;\n        if (totalPages <= 10) {\n            // less than 10 total pages so show all\n            startPage = 1;\n            endPage = totalPages;\n        } else {\n            // more than 10 total pages so calculate start and end pages\n            if (currentPage <= 6) {\n                startPage = 1;\n                endPage = 10;\n            } else if (currentPage + 4 >= totalPages) {\n                startPage = totalPages - 9;\n                endPage = totalPages;\n            } else {\n                startPage = currentPage - 5;\n                endPage = currentPage + 4;\n            }\n        }\n\n        // calculate start and end item indexes\n        let startIndex = (currentPage - 1) * pageSize;\n        let endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1);\n\n        // create an array of pages to ng-repeat in the pager control\n        let pages = [];\n        for (let i = startPage; i < endPage + 1; i++) {\n            pages.push(i);\n        }\n\n        // return object with all pager properties required by the view\n        return {\n            totalItems: totalItems,\n            currentPage: currentPage,\n            pageSize: pageSize,\n            totalPages: totalPages,\n            startPage: startPage,\n            endPage: endPage,\n            startIndex: startIndex,\n            endIndex: endIndex,\n            pages: pages\n        };\n    }\n}\n","import {Component, OnInit, ViewChild} from '@angular/core';\nimport {TableFilter} from \"../../../shared/tableFilter\";\nimport {CmRepairModel} from \"../cm-repair.model\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {Router} from \"@angular/router\";\nimport * as moment from \"moment/moment\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {BIKE_AND_LOCATION_TYPES, BIKE_TYPE, LOCATION_TYPE} from \"../../../shared/const/missionType\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {ReportExtractParam, ReportExtractParamField} from \"../../../shared/reportExtractParam\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {overlayConfigFactory} from \"ngx-modialog\";\nimport {CmRepairItemComponent} from \"../item/cm-repair-item.component\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\nimport {CmReportComponent} from \"../../cm-report/cm-report.component\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n    selector: 'cm-repair-list',\n    template: require('./cm-repair-list.component.html'),\n    styles: [require('../../cm-main/main.css').toString()]\n})\nexport class CmRepairListComponent extends TabTitle implements OnInit {\n    private itemList: Array<CmRepairModel> = [];\n    private totalExport = 10000;\n\n    private filters: CmBikeRepairFilters = new CmBikeRepairFilters();\n\n    private pageLimit: number = 15;\n    private total: number;\n    private initPage: number = 1;\n    private page: number;\n    private stationList = [];\n\n    private missionTypes = [\n        {key:BIKE_TYPE,              label: 'mission.bikeType'},\n        {key:LOCATION_TYPE,          label: 'mission.locationType'},\n        {key:BIKE_AND_LOCATION_TYPES,label: 'mission.bothType'}\n    ];\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n\n    private reportType: string = \"Repair\";\n    private reportsListLen: Number = 0;\n    private childProcessing: boolean = false;\n    private maxReportsListSize = 5;\n    @ViewChild('archivedrep', {static: false}) archivedChild: CmReportComponent;\n\n\n    constructor(private http: CmHttpClient,\n                private dataService: DataService,\n                private router: Router,\n                private modal: Modal,\n                public translate: CmTranslateService,\n                private componentTracker: CmComponentTrackerService,\n                private spinner: NgxSpinnerService\n    ) {\n    super('repairs.Label', translate);\n    }\n\n    ngOnInit() {\n        this.loadData();\n        this.dataService.getStationList().subscribe(data => this.stationList = data);\n    }\n\n    public reloadData() {\n        this.itemList = [];\n        this.loadData();\n    }\n\n    private loadData(page?: number) {\n        this.spinner.show();\n        this.page = page;\n\n        this.http.get<PageAdapter<CmRepairModel>>('/bikes-sql/api/v1/repair/?page=' + (page || this.initPage) +\n            '&limit=' + this.pageLimit + this.filters.toString()).subscribe(\n            data => {\n                this.spinner.hide();\n                this.itemList = data.content;\n                this.total = data.total;\n                if(this.total == 0){\n                    this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n                }\n            },\n            error => {\n                this.spinner.hide();\n                this.itemList = [];\n                this.modal.alert().message(\"error loading list of repairs\").open();\n            }\n        );\n\n        this.missionTypes = this.missionTypes.map(e => {\n            e.label = this.translate.get(e.label) ? this.translate.get(e.label) : e.label;\n            return e;\n        });\n    }\n\n    private filter() {\n        this.filters.save();\n        this.loadData();\n    }\n\n    private showDetails(row) {\n        this.modal.open(CmRepairItemComponent, overlayConfigFactory({repairId: row.id}, BSModalContext))\n    }\n\n    private formatDate(date): string {\n        if (date) {\n            return moment(date).format('DD.MM.YYYY HH:mm');\n        } else {\n            return '-';\n        }\n    }\n\n    private sort(field) {\n        this.filters.sort(field);\n        this.loadData();\n    }\n\n    exportRepairs() {\n\n        if(this.reportsListLen >= this.maxReportsListSize){\n            this.archivedChild.removeLastReportFromList();\n        }\n\n        let urlParams = this.filters.toString();\n        if(urlParams.length > 0) {\n            urlParams = '?' + urlParams.substring(1);\n        }\n\n        let reportFileName = this.translate.get(\"report.repair.fileName\") ;\n        let reportParams = new ReportExtractParam();\n        reportParams.method = \"GET\";\n        reportParams.path = '/bikes-sql/api/v1/repair/export/withComplain' + urlParams;\n\n        let trueFalseSubstitutions = {\n            \"true\": this.translate.get(\"report.repair,cell.true\"),\n            \"false\": this.translate.get(\"report.repair,cell.false\")\n        };\n        let sparePartTypeSubstitutions = {\n            \"Pieces\": this.translate.get(\"report.repair,cell.Pieces\"),\n            \"Box\": this.translate.get(\"report.repair,cell.Box\")\n        };\n\n        let stationSubstitution = {};\n        this.stationList.forEach(s => stationSubstitution[s.name] = s.text);\n\n        reportParams.fields =\n            [\n                new ReportExtractParamField(\"repairId\", this.translate.get(\"report.repair.header.repairId\")),\n                new ReportExtractParamField(\"bikeNumber\", this.translate.get(\"report.repair.header.bikeNumber\")),\n                new ReportExtractParamField(\"branding\", this.translate.get(\"report.repair.header.branding\")),\n                new ReportExtractParamField(\"locationName\", this.translate.get(\"report.repair.header.locationName\")),\n                new ReportExtractParamField(\"user\", this.translate.get(\"report.repair.header.user\")),\n                new ReportExtractParamField(\"dateFinished\", this.translate.get(\"report.repair.header.dateFinished\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n                new ReportExtractParamField(\"taskId\", this.translate.get(\"report.repair.header.task\")),\n                new ReportExtractParamField(\"repairTime\", this.translate.get(\"report.repair.header.repairTime\")),\n                new ReportExtractParamField(\"fullCheck\", this.translate.get(\"report.repair.header.fullCheck\"), undefined, undefined, trueFalseSubstitutions),\n                new ReportExtractParamField(\"checkedLock\", this.translate.get(\"report.repair.header.checkedLock\"), undefined, undefined, trueFalseSubstitutions),\n                new ReportExtractParamField(\"needAttention\", this.translate.get(\"report.repair.header.needAttention\"), undefined, undefined, trueFalseSubstitutions),\n                new ReportExtractParamField(\"moveToWs\", this.translate.get(\"report.repair.header.moveToWs\"), undefined, undefined, trueFalseSubstitutions),\n                new ReportExtractParamField(\"loadToTruck\", this.translate.get(\"report.repair.header.loadToTruck\"), undefined, undefined, trueFalseSubstitutions),\n                new ReportExtractParamField(\"additionalRepair\", this.translate.get(\"report.repair.header.additionalRepair\")),\n                new ReportExtractParamField(\"comment\", this.translate.get(\"report.repair.header.comment\")),\n                new ReportExtractParamField(\"station\", this.translate.get(\"report.repair.header.station\"), undefined, undefined, stationSubstitution),\n                new ReportExtractParamField(\"spareParts.id\", this.translate.get(\"report.repair.header.sparePartId\")),\n                new ReportExtractParamField(\"spareParts.part\", this.translate.get(\"report.repair.header.sparePartPart\")),\n                new ReportExtractParamField(\"spareParts.category\", this.translate.get(\"report.repair.header.sparePartCategory\")),\n                new ReportExtractParamField(\"spareParts.quantity\", this.translate.get(\"report.repair.header.sparePartQuantity\")),\n                new ReportExtractParamField(\"spareParts.type\", this.translate.get(\"report.repair.header.sparePartType\"), undefined, undefined, sparePartTypeSubstitutions),\n                new ReportExtractParamField(\"complains.id\", this.translate.get(\"report.repair.header.complainId\")),\n                new ReportExtractParamField(\"complains.category\", this.translate.get(\"report.repair.header.complainCategory\")),\n                new ReportExtractParamField(\"complains.issue\", this.translate.get(\"report.repair.header.complainIssue\"))\n            ];\n\n        this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n            .subscribe(\n                data => {\n                    this.childProcessing = true;\n                    this.archivedChild.startProcessingProcess();\n\n                },\n                error => {\n                    console.log(\"Error downloading the file.\");\n                });\n\n    }\n\n\n\n    canLoadXls():boolean {\n        return CmGuardService.isOrganizationAdmin();\n    }\n\n    processingMessage(event: any) {\n        this.childProcessing = event;\n    }\n\n    onListSize($event: Number) {\n        this.reportsListLen = $event\n        let i=0;\n    }\n\n}\n\nexport class CmBikeRepairFilters extends TableFilter {\n    job: number;\n    bikeNumber: string;\n    dateFinishedFrom: string;\n    dateFinishedTo: string;\n    users: Array<string>;\n    branding: string[];\n    type:string;\n\n    constructor() {\n        super('bikeRepairList');\n    }\n\n    public toString(): string {\n        let types = [];\n        if(this.type == BIKE_AND_LOCATION_TYPES) {\n            types.push(BIKE_TYPE);\n            types.push(LOCATION_TYPE);\n        } else if (this.type) {\n            types.push(this.type);\n        }\n\n        let result = super.toString();\n        if (this.bikeNumber) {\n            result += '&bikeNumber=' + this.bikeNumber;\n        }\n        if (this.job) {\n            result += '&job=' + this.job;\n        }\n        if (this.dateFinishedFrom) {\n            result += '&dateFinishedFrom=' + encodeURIComponent(this.dateFinishedFrom);\n        }\n        if (this.dateFinishedTo) {\n            result += '&dateFinishedTo=' + encodeURIComponent(this.dateFinishedTo);\n        }\n        if (this.users && this.users.length > 0) {\n            result += '&users=' + this.users;\n        }\n        if (this.branding && this.branding.length > 0) {\n            result += '&bikeBranding=' + this.branding;\n        }\n        if (types && types.length > 0) {\n            result += '&types=' + types;\n        }\n        return result;\n    }\n\n    public clear() {\n        super.clear();\n        this.job = null;\n        this.bikeNumber = null;\n        this.dateFinishedTo = null;\n        this.dateFinishedFrom = null;\n        this.users = [];\n        this.branding = [];\n        this.type = null;\n        this.save();\n    }\n}\n","import {Component} from \"@angular/core\";\nimport {ActivatedRoute, Router} from \"@angular/router\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {CmRepairModel} from \"../cm-repair.model\";\nimport * as moment from \"moment/moment\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\nimport {DialogRef, ModalComponent} from \"ngx-modialog\";\nimport {BSModalContext} from \"ngx-modialog/plugins/bootstrap\";\n\n@Component({\n    selector: 'cm-repair-item',\n    template: require('./cm-repair-item.component.html'),\n    styles: [require('./cm-repair-item.component.scss').toString()]\n})\nexport class CmRepairItemComponent extends TabTitle implements ModalComponent<CmRepairModalDialog> {\n\n    private model: CmRepairModel = new CmRepairModel();\n\n    constructor(private http: CmHttpClient,\n                public dialog: DialogRef<CmRepairModalDialog>,\n                private router: Router,\n                private r: ActivatedRoute,\n                public translate: CmTranslateService) {\n        super('repairs.Label', translate);\n        this.model.id = dialog.context.repairId;\n        this.loadData();\n    }\n\n    private loadData() {\n        this.http.get<CmRepairModel>('/bikes-sql/api/v1/repair/' + this.model.id).subscribe(\n            data => {\n                this.model = data;\n            }\n        );\n    }\n\n    private close() {\n        this.dialog.close();\n    }\n\n    private formatDate(date): string {\n        if (date) {\n            return moment(date).format('DD.MM.YYYY HH:mm');\n        } else {\n            return '-';\n        }\n    }\n}\n\nexport class CmRepairModalDialog extends BSModalContext {\n    public repairId: number;\n}","import { Component, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { ASC_STRING, DESC_STRING } from \"../../cm-sortable-th/cm-sortable-th.component\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { CmGuardService } from \"../../../services/guards/cm-guard.service\";\nimport {CmDamageBikeCategoryBasic, CmDamageBikeCategoryModel} from \"../cm-damage-cat-bike.model\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport * as moment from \"moment\";\nimport {CmUtil} from \"../../../shared/cm-util\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\n\n@Component({\n  selector: \"cm-damage-cat-config\",\n  template: require(\"./cm-damage-cat-bike-config-list.component.html\"),\n  styles: [require(\"../../cm-main/main.css\").toString(), require('./cm-damage-cat-bike-config-list.component.css').toString()]\n})\nexport class CmDamageBikeCatConfigComponent extends TabTitle implements OnInit {\n  private globalSettings: CmDamageCatBikeConfigGlobalModel = new CmDamageCatBikeConfigGlobalModel(0, 0, 0, 0);\n  private categoryConfigList: Array<CmDamageBikeCategoryModel> = [];\n\n  private sortField: string;\n  private sortDirection: string;\n\n  private csvFile;\n  private csvFileName: string;\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n\n    constructor(\n    private router: Router,\n    private modal: Modal,\n    private http: CmHttpClient,\n    private translationService: CmTranslateService,\n    private dataService: DataService,\n    private spinner: NgxSpinnerService\n    ) {\n    super(\"damageCategoryConfigBike.Label\", translationService);\n  }\n\n  ngOnInit() {\n      this.spinner.show();\n    this.http.get<Array<CmDamageBikeCategoryModel>>(`/bikes-sql/api/v1/damage-categories/for_bike`).subscribe(data => {\n        this.spinner.hide();\n      this.categoryConfigList = [];\n      let elements = data;\n\n      let tempArray: CmDamageBikeCategoryModel[] = [];\n      for (let key in elements) {\n        if (key === DAMAGE_CAT_BIKE_GLOBAL_KEY) {\n          let element = elements[key];\n          this.globalSettings = new CmDamageCatBikeConfigGlobalModel(\n            element.number,\n            element.check,\n            element.toBSC,\n            element.block,\n            element.checkTime,\n            element.estimatedRepairTime,\n            element.closeComplainDirectly,\n            element.closeWhenBikeMoves,\n            element.internal,\n            element.withoutReportDaysLimit\n          );\n        } else {\n          let element = elements[key];\n          tempArray.push(\n            new CmDamageBikeCategoryModel(element.number, key, element.mappingText, element.check, element.toBSC, element.block, element.estimatedRepairTime)\n          );\n        }\n      }\n\n      tempArray.sort((el1, el2) => el1.name.localeCompare(el2.name));\n      this.categoryConfigList = tempArray;\n            if(this.categoryConfigList.length == 0){\n                this.modal.alert().message(this.translationService.get(\"msg.NoResult\")).open();\n            }\n\n        },\n        error =>{\n            this.spinner.hide();\n            console.log(error);\n            this.modal.alert().message(\"Error: \" + error).open()\n        }\n    );\n    this.csvFileName = this.translationService.get('chooseFileToImport.label') || 'chooseFileToImport.label' ;\n  }\n\n  saveGlobal() {\n    this.http\n      .post(`/bikes-sql/api/v1/damage-categories/for_bike`, this.globalSettings)\n      .subscribe(data => {\n        this.modal\n          .alert()\n          .message(this.translationService.get(\"message.SaveMsg\"))\n          .open();\n      });\n  }\n\n  openCategory(id) {\n    this.router.navigate([\"/sec/damageBikeCatConfig\", id]);\n  }\n\n  removeCategory(row) {\n    this.http.delete(`/bikes-sql/api/v1/damage-categories/${row.number}`).subscribe(data => {\n      this.modal\n        .alert()\n        .message(this.translationService.get(\"message.SaveMsg\"))\n        .open();\n      this.ngOnInit();\n    });\n  }\n\n  private sort(field) {\n    this.sortField = field;\n    if (this.sortDirection === ASC_STRING) {\n      this.sortDirection = DESC_STRING;\n      this.categoryConfigList.sort((a, b) => {\n        try {\n          return b[field].localeCompare(a[field]);\n        } catch (ex) {\n          return (b[field] ? b[field] : -100) >= (a[field] ? a[field] : -100) ? 1 : -1;\n        }\n      });\n    } else {\n      this.sortDirection = ASC_STRING;\n      this.categoryConfigList.sort((a, b) => {\n        try {\n          return a[field].localeCompare(b[field]);\n        } catch (ex) {\n          return (a[field] ? a[field] : -100) >= (b[field] ? b[field] : -100) ? 1 : -1;\n        }\n      });\n    }\n  }\n\n  private importCSV() {\n\n        var newArr = CmUtil.CSVToArray(this.csvFile, ',');\n        let result = [];\n        for (let i = 1; i< newArr.length ;i++) {\n            let obj = {};\n            for (let j = 0; j < newArr[0].length; j++) { // headers\n                if ( newArr[0][j] === 'mappingText' ) {\n\n                    if ( newArr[i][j] !== null && newArr[i][j] !== '' ) {\n                        obj['mappingText'] = [];\n                        var str = newArr[i][j] + '';\n                        var set = str.split(',');\n                        set.forEach(function (item, i, arr) {\n                            obj['mappingText'].push(item);\n                        });\n                    } else {\n                        obj['mappingText'] = null;\n                    }\n                    continue;\n                }\n                obj[newArr[0][j]] = newArr[i][j];\n            }\n            // obj['suggestedParts'] = null;\n\n            let isNotEmptyObject=false;\n            for(var key in obj){\n                if(obj[key]){\n                    isNotEmptyObject=true;\n                    break;\n                }\n            }\n            if(!isNotEmptyObject)\n            {continue;\n            }\n            result.push(obj);\n        }\n\n        this.dataService.sendJson('/bikes-sql/api/v1/damage-categories/for_bike/importJson', result)\n            .subscribe(\n                reps => this.showMessage(this.translationService.get(\"successLabel\")),\n                err => this.showMessage(this.translationService.get(err))\n            );\n\n    }\n\n  private showMessage(message:any) {\n    this.modal.alert()\n        .message(message)\n        .open();\n  }\n\n  private loadCsvFile(event) {\n    let file = event.target.files[0];\n    if (!file) return;\n\n    this.csvFileName = file.name;\n    let reader = new FileReader();\n    let thisContext = this;\n\n    reader.addEventListener(\"load\",\n        function () {\n          thisContext.csvFile = reader.result;\n        }, false);\n\n    reader.readAsText(file);\n  }\n    private loadDataForCsv() {\n        this.http.get<Array<CmDamageBikeCategoryModel>>(`/bikes-sql/api/v1/damage-categories/for_bike/findAll`).subscribe(data => {\n                let elements = data;\n                let headers = Object.keys(elements[0]);\n                i=headers.indexOf('suggestedParts');\n                if (i>=0){\n                    headers.splice(i,1);\n                }\n                i=headers.indexOf('number');\n                if (i>=0){\n                    headers.splice(i,1);\n                }\n                elements.sort((el1, el2) => el1.name.localeCompare(el2.name));\n\n                var CSV = '';\n                CSV+=headers.join(',')+ '\\r\\n';\n                for (var i = 0; i < elements.length; i++) {\n                    var row = \"\";\n                    //2nd loop will extract each column and convert it in string comma-seprated\n                    for (var j=0; j< headers.length; j++) {\n                        if (elements[i][headers[j]] === null) {\n                            elements[i][headers[j]] = '';\n                        }\n                        row += '\"' + elements[i][headers[j]] + '\",';\n                    }\n                    row.slice(0, row.length - 1);\n                    //add a line break after each row\n                    CSV += row + '\\r\\n';\n                }\n\n                if (CSV == '') {\n                    alert(\"Invalid data\");\n                    return;\n                }\n                var csv = CSV;\n                let fileDate = moment(new  Date()).format('YYYYMMDD_HH-mm-ss');\n                const fileName = 'Damage_Bikes_export_'+fileDate+'.csv';\n                CmUtil.writeDownFile(csv, 'text/csv;charset=UTF-8', fileName)\n\n            }, error => {\n                console.log('download error:', JSON.stringify(error));\n            }, () => {\n                console.log('Completed file download.');\n            }\n\n        );\n\n    }\n\n\n    private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n}\n\nclass CmDamageCatBikeConfigGlobalModel extends CmDamageBikeCategoryBasic {\n  number: number;\n  checkTime: number;\n  withoutReportDaysLimit: number;\n  city: string;\n  name: string = DAMAGE_CAT_BIKE_GLOBAL_KEY;\n\n  constructor(\n    id: number,\n    check?: number,\n    toBSC?: number,\n    block?: number,\n    checkTime?: number,\n    estimatedRepairTime?: number,\n    closeComplainDirectly?: boolean,\n    closeWhenBikeMoves?: boolean,\n    internal?: boolean,\n    withoutReportDaysLimit?: number\n  ) {\n    super(check, toBSC, block, estimatedRepairTime, closeComplainDirectly, closeWhenBikeMoves, internal, withoutReportDaysLimit);\n    this.checkTime = checkTime;\n    this.number = id;\n\n    this.city = CmGuardService.getUserOrganizationFromToken();\n  }\n}\n\nexport const DAMAGE_CAT_BIKE_GLOBAL_KEY: string = \"-\";\n","import {Component, OnInit} from \"@angular/core\";\nimport {DialogRef} from \"ngx-modialog\";\nimport {CustomModalContext} from \"../../cm-assign/cm-assign.component\";\nimport {CmBikeListItem} from \"../cm-bike-list.model\";\nimport {TableFilter} from \"../../../shared/tableFilter\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport {CmSparePart} from \"../cm-spare-part-list.model\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {Router} from \"@angular/router\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\n\n@Component({\n    selector: 'cm-modal-spare-part-list',\n    template: require('./cm-spare-part-list-modal.component.html'),\n    styles: [require('./cm-spare-part-list-modal.component.scss').toString()]\n})\nexport class CmSparePartListModalComponent extends TabTitle implements OnInit {\n    private items: Array<CmSparePart> = [];\n\n    parent = null;\n\n    private pageLimit: number = 15;\n    private total: number;\n    private initPage: number = 1;\n\n    private sortField: string;\n    private sortDirection: string;\n\n    //filters\n    private filters: Filters = new Filters();\n    private categories = [];\n    private parts = [];\n    private stationList = [];\n    private stationCodes = [];\n\n    constructor(private http: CmHttpClient,\n                private dataService: DataService,\n                private router: Router,\n                public translate: CmTranslateService,\n                public dialog: DialogRef<CustomModalContext>) {\n        super('menu.InventoryLabel', translate);\n    }\n\n    ngOnInit() {\n        this.dataService.getStationList().subscribe(\n            data => {\n                this.stationList = data;\n                this.stationCodes = this.stationList === null ? null : this.stationList\n                    .map(function (station) {\n                            return station.name\n                         }\n                  );\n                this.filters.stationCodes = this.stationCodes;\n                this.dataService.getSparePartsCategoriesList().subscribe(\n                    data => {\n                        this.categories = data;\n                        if (this.filters.category) {\n                            this.loadInventoryPart();\n                        }\n                        this.loadData();\n\n                    }\n                );\n\n\n            }\n        );\n\n\n    }\n\n\n\n    private close() {\n        this.dialog.close();\n    }\n\n    private selectBike(bike: CmBikeListItem) {\n        this.parent.selectBike(bike);\n        this.close();\n    }\n\n    private loadData() {\n        this.setPage(this.initPage);\n    }\n\n    private loadInventoryPart() {\n        this.dataService.getSparePartsByCategory(this.filters.category).subscribe(\n            data => this.parts = data\n        );\n    }\n\n    private openItem(item: CmSparePart) {\n        this.dialog.context.parent.addSuggestedPart(item);\n       this.close();\n    }\n\n    private setPage(page: number) {\n\n        this.http.get('/bikes-sql/api/v1/availability/availability/parts?page=' + page + '&limit=' + this.pageLimit +\n            this.filters.createUrl()).map(result => result).subscribe(\n            (data:PageAdapter<CmSparePart>) => {\n                this.items = data.content;\n                this.total = data.total;\n            }\n        )\n    }\n\n    private filter() {\n        this.loadData();\n        this.filters.save();\n    }\n\n    private clearFilters() {\n        this.filters.clear();\n    }\n\n    private addGroup() {\n        this.router.navigate(['/sec/sparePart/addGroup']);\n    }\n\n    private addPart() {\n        this.router.navigate(['/sec/sparePart/-1']);\n    }\n\n    private createMovement() {\n        this.router.navigate(['/sec/sparePart/movePart'])\n    }\n\n    private exportData() {\n        window.open('/bikes-sql/api/v1/availability/availability/partsXls?' + this.filters.createUrl(), 'blank');\n    }\n\n    private sort(field) {\n        this.filters.sort(field);\n        this.reloadData();\n    }\n\n    public reloadData() {\n        this.items = [];\n        this.loadData();\n    }\n}\n\n\nclass Filters extends TableFilter {\n    id: number;\n    articleNumber: string;\n    station: number;\n    category: string;\n    part: string;\n    freeText: string;\n    showHidden: boolean;\n    showAllCities: boolean = false;\n    stationCodes = [];\n\n    constructor() {\n        super('sparePartListFilters');\n    }\n\n    public createUrl(): string {\n        let url: string = '';\n        if (this.id) {\n            url += '&id=' + this.id;\n        }\n        if (this.articleNumber) {\n            url += '&articleNumber=' + this.articleNumber;\n        }\n        if (this.station) {\n            url += '&station=' + this.station;\n        }\n        if (this.category) {\n            url += '&category=' + this.category;\n        }\n        if (this.part) {\n            url += '&part=' + this.part;\n        }\n        if (this.freeText) {\n            url += '&freeText=' + this.freeText;\n        }\n        if (this.showHidden) {\n            url += '&showHidden=' + this.showHidden\n        }\n        if(!this.showAllCities && this.stationCodes){\n            url +=  `&stations=${this.stationCodes}`;\n        }\n\n        return url;\n    }\n\n    public clear() {\n        this.id = null;\n        this.articleNumber = null;\n        this.station = null;\n        this.category = null;\n        this.part = null;\n        this.freeText = null;\n        this.showHidden = false;\n        this.showAllCities = false;\n        this.save();\n    }\n}\nexport interface PageAdapter<T> {\n    total: number;\n    content: Array<T>;\n}","import { Component, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { ASC_STRING, DESC_STRING } from \"../../cm-sortable-th/cm-sortable-th.component\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { CmGuardService } from \"../../../services/guards/cm-guard.service\";\nimport {CmDamageLocationCategoryModel} from \"../cm-damage-cat-location.model\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport * as moment from \"moment\";\nimport {CmUtil} from \"../../../shared/cm-util\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\n\n@Component({\n    selector: \"cm-damage-cat-config\",\n    template: require(\"./cm-damage-cat-location-config-list.component.html\"),\n    styles: [require(\"../../cm-main/main.css\").toString(), require('./cm-damage-cat-location-config-list.component.css').toString()]\n})\nexport class CmDamageLocationCatConfigComponent extends TabTitle implements OnInit {\n    private globalSettings: CmDamageLocationCategoryModel;\n    private categoryConfigList: Array<CmDamageLocationCategoryModel> = [];\n\n    private sortField: string;\n    private sortDirection: string;\n\n    private csvFile;\n    private csvFileName: string;\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n\n    constructor(\n        private router: Router,\n        private modal: Modal,\n        private http: CmHttpClient,\n        private translationService: CmTranslateService,\n        private dataService: DataService,\n        private spinner: NgxSpinnerService\n    ) {\n        super(\"damageCategoryConfig.Label\", translationService);\n    }\n\n    ngOnInit() {\n        this.spinner.show();\n        this.globalSettings = new CmDamageLocationCategoryModel();\n        this.globalSettings.name = DAMAGE_CAT_LOCATION_GLOBAL_KEY;\n\n        this.http.get<Array<CmDamageLocationCategoryModel>>(`/bikes-sql/api/v1/damage-categories/for_location`).subscribe(data => {\n            this.spinner.hide();\n            this.categoryConfigList = [];\n            let elements = data;\n\n            let tempArray: CmDamageLocationCategoryModel[] = [];\n            for (let key in elements) {\n                if (key === DAMAGE_CAT_LOCATION_GLOBAL_KEY) {\n                    this.globalSettings = elements[key];\n                    this.globalSettings.city = CmGuardService.getUserOrganizationFromToken();\n                } else {\n                    let element = elements[key];\n                    tempArray.push(element);\n                }\n            }\n\n            tempArray.sort((el1, el2) => el1.name.localeCompare(el2.name));\n            this.categoryConfigList = tempArray;\n                if(tempArray.length == 0){\n                    this.modal.alert().message(this.translationService.get(\"msg.NoResult\")).open();\n                }\n        },\n            error => {\n                this.spinner.hide();\n                console.log(\"Error : \"+error);\n                this.modal.alert().message(\"Error: \" + error).open()\n            }\n        );\n        this.csvFileName = this.translationService.get('chooseFileToImport.label') || 'chooseFileToImport.label' ;\n    }\n\n    saveGlobal() {\n        this.http\n            .post(`/bikes-sql/api/v1/damage-categories/for_location`, this.globalSettings)\n            .subscribe(data => {\n                this.modal\n                    .alert()\n                    .message(this.translationService.get(\"message.SaveMsg\"))\n                    .open();\n            });\n    }\n\n    openCategory(id) {\n        this.router.navigate([\"/sec/damageLocationCatConfig\", id]);\n    }\n\n    removeCategory(row) {\n        this.http.delete(`/bikes-sql/api/v1/damage-categories/${row.number}`).subscribe(data => {\n            this.modal\n                .alert()\n                .message(this.translationService.get(\"message.SaveMsg\"))\n                .open();\n            this.ngOnInit();\n        });\n    }\n\n    private sort(field) {\n        this.sortField = field;\n        if (this.sortDirection === ASC_STRING) {\n            this.sortDirection = DESC_STRING;\n            this.categoryConfigList.sort((a, b) => {\n                try {\n                    return b[field].localeCompare(a[field]);\n                } catch (ex) {\n                    return (b[field] ? b[field] : -100) >= (a[field] ? a[field] : -100) ? 1 : -1;\n                }\n            });\n        } else {\n            this.sortDirection = ASC_STRING;\n            this.categoryConfigList.sort((a, b) => {\n                try {\n                    return a[field].localeCompare(b[field]);\n                } catch (ex) {\n                    return (a[field] ? a[field] : -100) >= (b[field] ? b[field] : -100) ? 1 : -1;\n                }\n            });\n        }\n    }\n\n\n    private importCSV() {\n        var newArr = CmUtil.CSVToArray(this.csvFile, ',');\n        let result = [];\n        for (let i = 1; i< newArr.length ;i++) {\n            let obj = {};\n            for (let j = 0; j < newArr[0].length; j++) { // headers\n                if ( newArr[0][j] === 'mappingText' ) {\n\n                    if ( newArr[i][j] !== null && newArr[i][j] !== '' ) {\n                        obj['mappingText'] = [];\n                        var str = newArr[i][j] + '';\n                        var set = str.split(',');\n                        set.forEach(function (item, i, arr) {\n                            obj['mappingText'].push(item);\n                        });\n                    } else {\n                        obj['mappingText'] = null;\n                    }\n                    continue;\n                }\n                obj[newArr[0][j]] = newArr[i][j];\n            }\n\n            let isNotEmptyObject=false;\n            for(var key in obj){\n                if(obj[key]){\n                    isNotEmptyObject=true;\n                    break;\n                }\n            }\n            if(!isNotEmptyObject)\n            {continue;\n            }\n            result.push(obj);\n        }\n\n        this.dataService.sendJson('/bikes-sql/api/v1/damage-categories/for_location/importJson', result)\n            .subscribe(\n                reps => this.showMessage(this.translationService.get(\"successLabel\")),\n                err => this.showMessage(this.translationService.get(err))\n            );\n    }\n\n    private loadDataForCsv() {\n        this.http.get<Array<CmDamageLocationCategoryModel>>(`/bikes-sql/api/v1/damage-categories/for_location/findAll`).subscribe(data => {\n            let elements = data;\n            let headers = Object.keys(elements[0]);\n                i=headers.indexOf('suggestedParts');\n                if (i>=0){\n                    headers.splice(i,1);\n                }\n                i=headers.indexOf('number');\n                if (i>=0){\n                    headers.splice(i,1);\n                }\n            elements.sort((el1, el2) => el1.name.localeCompare(el2.name));\n\n            var CSV = '';\n            CSV+=headers.join(',')+ '\\r\\n';\n            for (var i = 0; i < elements.length; i++) {\n                var row = \"\";\n                //2nd loop will extract each column and convert it in string comma-seprated\n                for (var j=0; j< headers.length; j++) {\n                    if (elements[i][headers[j]] === null) {\n                        elements[i][headers[j]] = '';\n                    }\n                    elements[i][j]\n                    row += '\"' + elements[i][headers[j]] + '\",';\n                }\n                row.slice(0, row.length - 1);\n                //add a line break after each row\n                CSV += row + '\\r\\n';\n            }\n\n            if (CSV == '') {\n                alert(\"Invalid data\");\n                return;\n            }\n            var csv = CSV;\n            let fileDate = moment(new  Date()).format('YYYYMMDD_HH-mm-ss');\n            const fileName = 'Damage_Locations_export_'+fileDate+'.csv';\n            CmUtil.writeDownFile(csv, 'text/csv;charset=UTF-8', fileName)\n\n        }, error => {\n                console.log('download error:', JSON.stringify(error));\n            }, () => {\n                console.log('Completed file download.');\n            }\n\n        );\n\n    }\n\n    private showMessage(message:any) {\n        this.modal.alert()\n            .message(message)\n            .open();\n    }\n\n    private loadCsvFile(event) {\n        let file = event.target.files[0];\n        if (!file) return;\n\n        this.csvFileName = file.name;\n        let reader = new FileReader();\n        let thisContext = this;\n\n        reader.addEventListener(\"load\",\n            function () {\n                thisContext.csvFile = reader.result;\n            }, false);\n\n        reader.readAsText(file);\n    }\n\n    private allowedToEditSettings(): boolean {\n        return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n    }\n}\n\nexport const DAMAGE_CAT_LOCATION_GLOBAL_KEY = \"--\";\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function every(predicate, thisArg) {\n    return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };\n}\nvar EveryOperator = /*@__PURE__*/ (function () {\n    function EveryOperator(predicate, thisArg, source) {\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n        this.source = source;\n    }\n    EveryOperator.prototype.call = function (observer, source) {\n        return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n    };\n    return EveryOperator;\n}());\nvar EverySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(EverySubscriber, _super);\n    function EverySubscriber(destination, predicate, thisArg, source) {\n        var _this = _super.call(this, destination) || this;\n        _this.predicate = predicate;\n        _this.thisArg = thisArg;\n        _this.source = source;\n        _this.index = 0;\n        _this.thisArg = thisArg || _this;\n        return _this;\n    }\n    EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {\n        this.destination.next(everyValueMatch);\n        this.destination.complete();\n    };\n    EverySubscriber.prototype._next = function (value) {\n        var result = false;\n        try {\n            result = this.predicate.call(this.thisArg, value, this.index++, this.source);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (!result) {\n            this.notifyComplete(false);\n        }\n    };\n    EverySubscriber.prototype._complete = function () {\n        this.notifyComplete(true);\n    };\n    return EverySubscriber;\n}(Subscriber));\n//# sourceMappingURL=every.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n    return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n    function FinallyOperator(callback) {\n        this.callback = callback;\n    }\n    FinallyOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n    };\n    return FinallyOperator;\n}());\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(FinallySubscriber, _super);\n    function FinallySubscriber(destination, callback) {\n        var _this = _super.call(this, destination) || this;\n        _this.add(new Subscription(callback));\n        return _this;\n    }\n    return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { canReportError } from '../util/canReportError';\nimport { isArray } from '../util/isArray';\nimport { isScheduler } from '../util/isScheduler';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n    if (resultSelector) {\n        if (isScheduler(resultSelector)) {\n            scheduler = resultSelector;\n        }\n        else {\n            return function () {\n                var args = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    args[_i] = arguments[_i];\n                }\n                return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n            };\n        }\n    }\n    return function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var context = this;\n        var subject;\n        var params = {\n            context: context,\n            subject: subject,\n            callbackFunc: callbackFunc,\n            scheduler: scheduler,\n        };\n        return new Observable(function (subscriber) {\n            if (!scheduler) {\n                if (!subject) {\n                    subject = new AsyncSubject();\n                    var handler = function () {\n                        var innerArgs = [];\n                        for (var _i = 0; _i < arguments.length; _i++) {\n                            innerArgs[_i] = arguments[_i];\n                        }\n                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n                        subject.complete();\n                    };\n                    try {\n                        callbackFunc.apply(context, args.concat([handler]));\n                    }\n                    catch (err) {\n                        if (canReportError(subject)) {\n                            subject.error(err);\n                        }\n                        else {\n                            console.warn(err);\n                        }\n                    }\n                }\n                return subject.subscribe(subscriber);\n            }\n            else {\n                var state = {\n                    args: args, subscriber: subscriber, params: params,\n                };\n                return scheduler.schedule(dispatch, 0, state);\n            }\n        });\n    };\n}\nfunction dispatch(state) {\n    var _this = this;\n    var self = this;\n    var args = state.args, subscriber = state.subscriber, params = state.params;\n    var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;\n    var subject = params.subject;\n    if (!subject) {\n        subject = params.subject = new AsyncSubject();\n        var handler = function () {\n            var innerArgs = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                innerArgs[_i] = arguments[_i];\n            }\n            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n            _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n        };\n        try {\n            callbackFunc.apply(context, args.concat([handler]));\n        }\n        catch (err) {\n            subject.error(err);\n        }\n    }\n    this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(state) {\n    var value = state.value, subject = state.subject;\n    subject.next(value);\n    subject.complete();\n}\nfunction dispatchError(state) {\n    var err = state.err, subject = state.subject;\n    subject.error(err);\n}\n//# sourceMappingURL=bindCallback.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin() {\n    var sources = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        sources[_i] = arguments[_i];\n    }\n    if (sources.length === 1) {\n        var first_1 = sources[0];\n        if (isArray(first_1)) {\n            return forkJoinInternal(first_1, null);\n        }\n        if (isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {\n            var keys = Object.keys(first_1);\n            return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);\n        }\n    }\n    if (typeof sources[sources.length - 1] === 'function') {\n        var resultSelector_1 = sources.pop();\n        sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n        return forkJoinInternal(sources, null).pipe(map(function (args) { return resultSelector_1.apply(void 0, args); }));\n    }\n    return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n    return new Observable(function (subscriber) {\n        var len = sources.length;\n        if (len === 0) {\n            subscriber.complete();\n            return;\n        }\n        var values = new Array(len);\n        var completed = 0;\n        var emitted = 0;\n        var _loop_1 = function (i) {\n            var source = from(sources[i]);\n            var hasValue = false;\n            subscriber.add(source.subscribe({\n                next: function (value) {\n                    if (!hasValue) {\n                        hasValue = true;\n                        emitted++;\n                    }\n                    values[i] = value;\n                },\n                error: function (err) { return subscriber.error(err); },\n                complete: function () {\n                    completed++;\n                    if (completed === len || !hasValue) {\n                        if (emitted === len) {\n                            subscriber.next(keys ?\n                                keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :\n                                values);\n                        }\n                        subscriber.complete();\n                    }\n                }\n            }));\n        };\n        for (var i = 0; i < len; i++) {\n            _loop_1(i);\n        }\n    });\n}\n//# sourceMappingURL=forkJoin.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n    if (resultSelector) {\n        return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n    }\n    return new Observable(function (subscriber) {\n        var handler = function () {\n            var e = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                e[_i] = arguments[_i];\n            }\n            return subscriber.next(e.length === 1 ? e[0] : e);\n        };\n        var retValue;\n        try {\n            retValue = addHandler(handler);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        if (!isFunction(removeHandler)) {\n            return undefined;\n        }\n        return function () { return removeHandler(handler, retValue); };\n    });\n}\n//# sourceMappingURL=fromEventPattern.js.map\n","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function sample(notifier) {\n    return function (source) { return source.lift(new SampleOperator(notifier)); };\n}\nvar SampleOperator = /*@__PURE__*/ (function () {\n    function SampleOperator(notifier) {\n        this.notifier = notifier;\n    }\n    SampleOperator.prototype.call = function (subscriber, source) {\n        var sampleSubscriber = new SampleSubscriber(subscriber);\n        var subscription = source.subscribe(sampleSubscriber);\n        subscription.add(innerSubscribe(this.notifier, new SimpleInnerSubscriber(sampleSubscriber)));\n        return subscription;\n    };\n    return SampleOperator;\n}());\nvar SampleSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SampleSubscriber, _super);\n    function SampleSubscriber() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.hasValue = false;\n        return _this;\n    }\n    SampleSubscriber.prototype._next = function (value) {\n        this.value = value;\n        this.hasValue = true;\n    };\n    SampleSubscriber.prototype.notifyNext = function () {\n        this.emitValue();\n    };\n    SampleSubscriber.prototype.notifyComplete = function () {\n        this.emitValue();\n    };\n    SampleSubscriber.prototype.emitValue = function () {\n        if (this.hasValue) {\n            this.hasValue = false;\n            this.destination.next(this.value);\n        }\n    };\n    return SampleSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=sample.js.map\n","/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n    var config;\n    if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n        config = configOrBufferSize;\n    }\n    else {\n        config = {\n            bufferSize: configOrBufferSize,\n            windowTime: windowTime,\n            refCount: false,\n            scheduler: scheduler,\n        };\n    }\n    return function (source) { return source.lift(shareReplayOperator(config)); };\n}\nfunction shareReplayOperator(_a) {\n    var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;\n    var subject;\n    var refCount = 0;\n    var subscription;\n    var hasError = false;\n    var isComplete = false;\n    return function shareReplayOperation(source) {\n        refCount++;\n        var innerSub;\n        if (!subject || hasError) {\n            hasError = false;\n            subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n            innerSub = subject.subscribe(this);\n            subscription = source.subscribe({\n                next: function (value) {\n                    subject.next(value);\n                },\n                error: function (err) {\n                    hasError = true;\n                    subject.error(err);\n                },\n                complete: function () {\n                    isComplete = true;\n                    subscription = undefined;\n                    subject.complete();\n                },\n            });\n            if (isComplete) {\n                subscription = undefined;\n            }\n        }\n        else {\n            innerSub = subject.subscribe(this);\n        }\n        this.add(function () {\n            refCount--;\n            innerSub.unsubscribe();\n            innerSub = undefined;\n            if (subscription && !isComplete && useRefCount && refCount === 0) {\n                subscription.unsubscribe();\n                subscription = undefined;\n                subject = undefined;\n            }\n        });\n    };\n}\n//# sourceMappingURL=shareReplay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function skip(count) {\n    return function (source) { return source.lift(new SkipOperator(count)); };\n}\nvar SkipOperator = /*@__PURE__*/ (function () {\n    function SkipOperator(total) {\n        this.total = total;\n    }\n    SkipOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new SkipSubscriber(subscriber, this.total));\n    };\n    return SkipOperator;\n}());\nvar SkipSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(SkipSubscriber, _super);\n    function SkipSubscriber(destination, total) {\n        var _this = _super.call(this, destination) || this;\n        _this.total = total;\n        _this.count = 0;\n        return _this;\n    }\n    SkipSubscriber.prototype._next = function (x) {\n        if (++this.count > this.total) {\n            this.destination.next(x);\n        }\n    };\n    return SkipSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skip.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { reduce } from './reduce';\nfunction toArrayReducer(arr, item, index) {\n    if (index === 0) {\n        return [item];\n    }\n    arr.push(item);\n    return arr;\n}\nexport function toArray() {\n    return reduce(toArrayReducer, []);\n}\n//# sourceMappingURL=toArray.js.map\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 401;","\"use strict\";\nfunction __export(m) {\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"rxjs-compat/Subject\"));\n//# sourceMappingURL=Subject.js.map","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function isObservable(obj) {\n    return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n}\n//# sourceMappingURL=isObservable.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function debounceTime(dueTime, scheduler) {\n    if (scheduler === void 0) {\n        scheduler = async;\n    }\n    return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };\n}\nvar DebounceTimeOperator = /*@__PURE__*/ (function () {\n    function DebounceTimeOperator(dueTime, scheduler) {\n        this.dueTime = dueTime;\n        this.scheduler = scheduler;\n    }\n    DebounceTimeOperator.prototype.call = function (subscriber, source) {\n        return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n    };\n    return DebounceTimeOperator;\n}());\nvar DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {\n    tslib_1.__extends(DebounceTimeSubscriber, _super);\n    function DebounceTimeSubscriber(destination, dueTime, scheduler) {\n        var _this = _super.call(this, destination) || this;\n        _this.dueTime = dueTime;\n        _this.scheduler = scheduler;\n        _this.debouncedSubscription = null;\n        _this.lastValue = null;\n        _this.hasValue = false;\n        return _this;\n    }\n    DebounceTimeSubscriber.prototype._next = function (value) {\n        this.clearDebounce();\n        this.lastValue = value;\n        this.hasValue = true;\n        this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n    };\n    DebounceTimeSubscriber.prototype._complete = function () {\n        this.debouncedNext();\n        this.destination.complete();\n    };\n    DebounceTimeSubscriber.prototype.debouncedNext = function () {\n        this.clearDebounce();\n        if (this.hasValue) {\n            var lastValue = this.lastValue;\n            this.lastValue = null;\n            this.hasValue = false;\n            this.destination.next(lastValue);\n        }\n    };\n    DebounceTimeSubscriber.prototype.clearDebounce = function () {\n        var debouncedSubscription = this.debouncedSubscription;\n        if (debouncedSubscription !== null) {\n            this.remove(debouncedSubscription);\n            debouncedSubscription.unsubscribe();\n            this.debouncedSubscription = null;\n        }\n    };\n    return DebounceTimeSubscriber;\n}(Subscriber));\nfunction dispatchNext(subscriber) {\n    subscriber.debouncedNext();\n}\n//# sourceMappingURL=debounceTime.js.map\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import {Component} from \"@angular/core\";\nimport {Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {Router} from \"@angular/router\";\nimport {CmStationService} from \"../../services/cm-station.service\";\nimport {CmGuardService} from \"../../services/guards/cm-guard.service\";\nimport {TabTitle} from \"../../shared/tabTitle\";\nimport {CmTranslateService} from \"../../services/localization/cm-translate.service\";\n\n\n@Component({\n  selector: 'cm-home',\n  template: require('./cm-home.component.html'),\n  styles: [require('./cm-home.component.scss').toString(), require('./color_theme.css').toString(),\n    require('./main.css').toString()],\n})\n\nexport class CmHome {\n\n  mobileView: number = 992;\n  toggle: boolean = false;\n  menuList: any;\n  selectedMenu: string;\n\n  path: string[];\n\n  private rolesMapping: MainMenuRoles = new MainMenuRoles();\n\n  notifyUrl(item) {\n    this.path = [];\n    this.path.push(item);\n  }\n\n  constructor(private stationService: CmStationService,\n              private router: Router,\n              private modal: Modal,\n              public translate: CmTranslateService) {\n    this.attachEvents();\n    this.path = [];\n\n    stationService.stationChange$.subscribe(\n      station => this.processMenu(station)\n    )\n  }\n\n  selectMenu(menu) {\n    this.selectedMenu = menu;\n    this.notifyUrl(menu.name);\n  }\n\n  attachEvents() {\n    window.onresize = ()=> {\n      if (this.getWidth() >= this.mobileView) {\n        if (localStorage.getItem('toggle')) {\n          this.toggle = !!localStorage.getItem('toggle');\n        } else {\n          this.toggle = true;\n        }\n      } else {\n        this.toggle = false;\n      }\n    }\n  }\n\n  getWidth() {\n    return window.innerWidth;\n  }\n\n  toggleSidebar() {\n    this.toggle = !this.toggle;\n    localStorage.setItem('toggle', this.toggle.toString());\n  }\n\n  checkStationSelected(route: string) {\n\n    let message = 'Select station for this process!';\n    try {\n      message = this.translate.get('mainMenu.StationSelectedMsg');\n    } catch (e) {\n      console.log('Error: translation problems');\n    }\n\n    if (!this.stationService.station || this.stationService.station === \"no station selected\") {\n      this.modal.alert()\n        .message(message)\n        .open();\n      return;\n    }\n    this.router.navigate([route]);\n  }\n\n  disableStationSelect() {\n    let path = <any>window.location.href;\n    return path.includes('infleeting') ||\n      path.includes('defleeting') ||\n      path.includes('rent') ||\n      path.includes('exitGate') ||\n      path.includes('return') ||\n      path.includes('turnaround');\n  }\n\n  processMenu(station) {\n    if (station === \"no station selected\") {\n      for (let element in this.rolesMapping) {\n        if (this.rolesMapping.hasOwnProperty(element)) {\n          this.rolesMapping[element] = false;\n        }\n      }\n    } else {\n      for (let element in this.rolesMapping) {\n        if (this.rolesMapping.hasOwnProperty(element)) {\n          this.rolesMapping[element] = CmGuardService.isUserInRole(station + CmGuardService.delimiter + element);\n        }\n      }\n    }\n  }\n\n}\n\nclass MainMenuRoles {\n  infleeting: boolean;\n  defleeting: boolean;\n  rent: boolean;\n  delivery: boolean;\n  deliveryHAS: boolean;\n  gate: boolean;\n  return: boolean;\n  collection: boolean;\n  collectionHAS: boolean;\n  transit: boolean;\n  turnaround: boolean;\n  idleSighting: boolean;\n  movementIn: boolean;\n  movementInTransporter: boolean;\n  movementout: boolean;\n  movementoutTransporter: boolean;\n  damageUpdate: boolean;\n\n  constructor() {\n    this.infleeting = false;\n    this.defleeting = false;\n    this.rent = false;\n    this.delivery = false;\n    this.deliveryHAS = false;\n    this.gate = false;\n    this.return = false;\n    this.collection = false;\n    this.collectionHAS = false;\n    this.transit = false;\n    this.turnaround = false;\n    this.idleSighting = false;\n    this.movementIn = false;\n    this.movementout = false;\n    this.damageUpdate = false;\n    this.movementInTransporter = false;\n    this.movementoutTransporter = false;\n  }\n}\n","import {Component, OnDestroy} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {HttpClient} from '@angular/common/http';\nimport {CmAuthService} from \"../../services/cm-auth.service\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {CM_WEB_PORTAL} from \"../../shared/tabTitle\";\n\n@Component({\n    selector: 'login',\n    template: require('./cm-login.component.html'),\n    styles: [require('./cm-login.component.scss').toString()],\n})\nexport class CmLogin implements OnDestroy {\n\n    private errorText: string;\n\n    private subs: Array<Subscription> = [];\n\n    constructor(public router: Router, public http: HttpClient, private authService: CmAuthService) {\n        document.title = CM_WEB_PORTAL;\n        let subAuth = this.authService.errorTextChanges$.subscribe(\n            data => {\n                this.errorText = data;\n            }\n        );\n\n        this.subs.push(subAuth);\n    }\n\n    ngOnDestroy() {\n        this.subs.forEach(sub => sub.unsubscribe());\n    }\n\n    login(event, username, password) {\n        event.preventDefault();\n        this.authService.login(username, password);\n    }\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { overlayConfigFactory } from \"ngx-modialog\";\nimport { BSModalContext, Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { Subscription } from \"rxjs/Subscription\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { DataService } from \"../../../services/cm-data.service\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { TableFilter } from \"../../../shared/tableFilter\";\nimport { CmAutoTicketConfig } from \"../cm-auto-ticket-conifg.model\";\nimport { CmAutoTicketConfigComponent } from \"../item/cm-auto-ticket-config.component\";\nimport { CmBaseAutoTicketConfigComponent } from \"../cm-base-auto-ticket-config.component\";\nimport {BIKE_AND_LOCATION_TYPES, BIKE_TYPE, LOCATION_TYPE} from \"../../../shared/const/missionType\";\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {SpinnerUtils} from \"../../../shared/spinnerUtils\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: \"cm-auto-ticket-config-list\",\n  template: require(\"./cm-auto-ticket-config-list.component.html\"),\n  styles: [require(\"../../cm-main/main.css\").toString()]\n})\nexport class CmAutoTicketListComponent extends CmBaseAutoTicketConfigComponent implements OnInit {\n  private pageLimit: number = 15;\n  private total: number;\n  private initPage: number = 1;\n\n  private configs: CmAutoTicketConfig[] = [];\n  private filters: CmAutoTicketConfigFilters = new CmAutoTicketConfigFilters();\n  private prios = [1, 2, 3];\n  private subs: Array<Subscription> = [];\n\n  private missionTypes = [\n    {key:BIKE_TYPE,              label: 'mission.bikeType'},\n    {key:LOCATION_TYPE,          label: 'mission.locationType'},\n    {key:BIKE_AND_LOCATION_TYPES,label: 'mission.bothType'}\n  ];\n\n  private spType: string = SpinnerUtils.type;\n  private spText: string = SpinnerUtils.text;\n  private spColor: string = SpinnerUtils.color;\n  private spBdColor: string = SpinnerUtils.bdColor;\n  private spFullScreen: boolean = SpinnerUtils.fullScreen;\n  private spSize: string = SpinnerUtils.size;\n\n  constructor(\n    private http: CmHttpClient,\n    private dataService: DataService,\n    protected modal: Modal,\n    protected translate: CmTranslateService,\n    private spinner: NgxSpinnerService,\n  ) {\n    super(\"autoTicketsConfig.Title\", modal, translate);\n  }\n\n  ngOnInit() {\n    this.loadData();\n  }\n\n  ngOnDestroy() {\n    for (let sub of this.subs) {\n      sub.unsubscribe();\n    }\n  }\n\n  private loadData(showPage?: number) {\n    this.spinner.show();\n    let page = showPage || this.initPage;\n    this.http\n      .get<PageAdapter<CmAutoTicketConfig>>(\n        `/bikes-sql/api/v1/auto-tickets-info?page=${page}&limit=${this.pageLimit}${this.filters.toHttpGet()}`\n      )\n      .subscribe(\n        response => {\n          this.configs = response.content;\n          this.total = response.total || this.configs.length;\n          this.spinner.hide();\n          if(this.total == 0){\n            this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n          }\n        },\n        error => {\n          console.error(error);\n          this.spinner.hide();\n          this.showMessage(this.translationService.get(error.message));\n        }\n      );\n  }\n\n  private openConfig(config: CmAutoTicketConfig) {\n    this.modal.open(CmAutoTicketConfigComponent, overlayConfigFactory({ config: config, parent: this }, BSModalContext));\n  }\n\n  private setPage(page: number) {\n    this.loadData(page);\n  }\n\n  private addConfigForBike() {\n    this.addConfig('BIKE');\n  }\n\n  private addConfigForLocation() {\n    this.addConfig('LOCATION');\n  }\n\n  private addConfig(type: string) {\n    let config = new CmAutoTicketConfig();\n    config.bikes = [];\n    config.type = type;\n    this.modal.open(CmAutoTicketConfigComponent, overlayConfigFactory({ config: config, parent: this }, BSModalContext));\n  }\n\n  private deleteConfig(config: CmAutoTicketConfig) {\n    this.http\n      .delete(`/bikes-sql/api/v1/auto-tickets-info/${config.id}`)\n      .subscribe(\n        data => {\n          this.showMessage(this.translationService.get(\"message.DeleteMsg\"));\n          this.loadData();\n        },\n        error => {\n          console.error(JSON.stringify(error));\n          this.showMessage(`Error: ${this.translationService.get(error.message)}`);\n        }\n      );\n  }\n\n  private reloadData() {\n    this.loadData();\n  }\n\n  private filter() {\n    this.filters.save();\n    this.loadData();\n  }\n\n  private clearFilters() {\n    this.filters.clear();\n  }\n\n  private sort(field) {\n    this.filters.sort(field);\n    this.loadData();\n  }\n\n  private substrText(text: string) {\n    if (text) return text.length > 40 ? text.substr(0, 40) + \"...\" : text;\n    return \"\";\n  }\n\n  private isLocationAutoTroubleTicket() {\n    return this.filters.type === LOCATION_TYPE;\n  }\n\n  private isBikeAutoTroubleTicket() {\n    return this.filters.type === BIKE_TYPE;\n  }\n\n  private changeType(type) {\n    if (type == BIKE_TYPE) {\n      this.filters.locationId = null;\n    } else if (type == LOCATION_TYPE) {\n      this.filters.bikeId = null;\n      this.filters.bikeNumber = null;\n    }\n    this.filters.category = null;\n    this.filters.type = type;\n  }\n\n  private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n\n}\n\nexport class CmAutoTicketConfigFilters extends TableFilter {\n  type: string;\n  category: string;\n  locationId: number;\n  bikeId: number;\n  bikeNumber: number;\n\n  constructor() {\n    super(\"autoTicketConfigList\");\n  }\n\n  public toHttpGet(): string {\n    let types = [];\n    if(this.type == BIKE_AND_LOCATION_TYPES) {\n      types.push(BIKE_TYPE);\n      types.push(LOCATION_TYPE);\n    } else if (this.type) {\n      types.push(this.type);\n    }\n\n    let url: string = super.toString();\n    if (this.bikeId) {\n      url += '&bikeId=' + this.bikeId;\n    }\n    if (this.bikeNumber) {\n      url += '&bikeNumber=' + this.bikeNumber;\n    }\n    if (this.locationId) {\n      url += '&locationId=' + this.locationId;\n    }\n    if (this.category) {\n      url += `&category=${encodeURIComponent(this.category)}`;\n    }\n    if (types && types.length > 0) {\n      url += '&types=' + types;\n    }\n    return url;\n  }\n\n  public clear() {\n    super.clear();\n    this.type = null;\n    this.category = null;\n    this.locationId = null;\n    this.bikeId = null;\n    this.bikeNumber = null;\n    this.save();\n  }\n}\n","import {Injectable} from \"@angular/core\";\nimport {CmAuthService} from \"./cm-auth.service\";\nimport {CmGuardService} from \"./guards/cm-guard.service\";\nimport {CmHttpClient} from \"./http_client\";\n\n@Injectable()\nexport class CmAliveService {\n    private loggedInValue: boolean;\n    private aliveUrl = '/device-management/login/api/v1/alive';\n\n    constructor(private authService: CmAuthService,\n                private cmGuardService: CmGuardService,\n                private http: CmHttpClient,\n                private auth: CmAuthService) {\n        let subAuth = this.authService.successLogin$.subscribe(\n            data => {\n                this.changeLoggedStatus(data);\n            }\n        );\n\n        let thisSaved = this;\n        setTimeout(function alive() {\n            if(thisSaved.loggedInValue) {\n                thisSaved.http.post(thisSaved.aliveUrl, {}).subscribe(\n                    () => {},\n                    error => {\n                        console.log(error);\n                        thisSaved.auth.logout();\n                    });\n            }\n            setTimeout(alive, thisSaved.auth.alivePeriod);\n        }, thisSaved.auth.alivePeriod);\n    }\n\n    private changeLoggedStatus(isLogged: boolean) {\n        this.loggedInValue = isLogged;\n    }\n\n    init() {\n        this.loggedInValue = this.cmGuardService.isUserTokenAlive();\n        this.changeLoggedStatus(this.loggedInValue);\n    }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nrequire(\"rxjs-compat/add/operator/map\");\n//# sourceMappingURL=map.js.map","import { CmTranslateService } from \"./../../services/localization/cm-translate.service\";\nimport { TabTitle } from \"./../../shared/tabTitle\";\nimport { Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport * as moment from \"moment/moment\";\n\nexport abstract class CmBaseAutoTicketConfigComponent extends TabTitle {\n  constructor(protected title: string, protected modal: Modal, protected translationService: CmTranslateService) {\n    super(title, translationService);\n  }\n\n  protected showMessage(message: string) {\n    if (message)\n      this.modal\n        .alert()\n        .message(message)\n        .open();\n  }\n\n  protected formatTimestamp(dateString) {\n    return dateString ? moment(dateString).format(\"DD.MM.YYYY HH:mm\") : \"\";\n  }\n}\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var af = moment.defineLocale('af', {\n        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n        meridiemParse: /vm|nm/i,\n        isPM: function (input) {\n            return /^nm$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'vm' : 'VM';\n            } else {\n                return isLower ? 'nm' : 'NM';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Vandag om] LT',\n            nextDay: '[Môre om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[Gister om] LT',\n            lastWeek: '[Laas] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oor %s',\n            past: '%s gelede',\n            s: \"'n paar sekondes\",\n            ss: '%d sekondes',\n            m: \"'n minuut\",\n            mm: '%d minute',\n            h: \"'n uur\",\n            hh: '%d ure',\n            d: \"'n dag\",\n            dd: '%d dae',\n            M: \"'n maand\",\n            MM: '%d maande',\n            y: \"'n jaar\",\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            ); // Thanks to Joris Röling : https://github.com/jjupiter\n        },\n        week: {\n            dow: 1, // Maandag is die eerste dag van die week.\n            doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n        },\n    });\n\n    return af;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var ar = moment.defineLocale('ar', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ar;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'جانفي',\n            'فيفري',\n            'مارس',\n            'أفريل',\n            'ماي',\n            'جوان',\n            'جويلية',\n            'أوت',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arDz = moment.defineLocale('ar-dz', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arDz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arKw = moment.defineLocale('ar-kw', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arKw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '1',\n            2: '2',\n            3: '3',\n            4: '4',\n            5: '5',\n            6: '6',\n            7: '7',\n            8: '8',\n            9: '9',\n            0: '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arLy = moment.defineLocale('ar-ly', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arMa = moment.defineLocale('ar-ma', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arMa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        };\n\n    var arSa = moment.defineLocale('ar-sa', {\n        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return arSa;\n\n})));\n","//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arTn = moment.defineLocale('ar-tn', {\n        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arTn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: '-inci',\n        5: '-inci',\n        8: '-inci',\n        70: '-inci',\n        80: '-inci',\n        2: '-nci',\n        7: '-nci',\n        20: '-nci',\n        50: '-nci',\n        3: '-üncü',\n        4: '-üncü',\n        100: '-üncü',\n        6: '-ncı',\n        9: '-uncu',\n        10: '-uncu',\n        30: '-uncu',\n        60: '-ıncı',\n        90: '-ıncı',\n    };\n\n    var az = moment.defineLocale('az', {\n        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n        weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n            '_'\n        ),\n        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[sabah saat] LT',\n            nextWeek: '[gələn həftə] dddd [saat] LT',\n            lastDay: '[dünən] LT',\n            lastWeek: '[keçən həftə] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s əvvəl',\n            s: 'bir neçə saniyə',\n            ss: '%d saniyə',\n            m: 'bir dəqiqə',\n            mm: '%d dəqiqə',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir il',\n            yy: '%d il',\n        },\n        meridiemParse: /gecə|səhər|gündüz|axşam/,\n        isPM: function (input) {\n            return /^(gündüz|axşam)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'gecə';\n            } else if (hour < 12) {\n                return 'səhər';\n            } else if (hour < 17) {\n                return 'gündüz';\n            } else {\n                return 'axşam';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n        ordinal: function (number) {\n            if (number === 0) {\n                // special case for zero\n                return number + '-ıncı';\n            }\n            var a = number % 10,\n                b = (number % 100) - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return az;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n            hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n            dd: 'дзень_дні_дзён',\n            MM: 'месяц_месяцы_месяцаў',\n            yy: 'год_гады_гадоў',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвіліна' : 'хвіліну';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'гадзіна' : 'гадзіну';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n\n    var be = moment.defineLocale('be', {\n        months: {\n            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n                '_'\n            ),\n            standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(\n            '_'\n        ),\n        weekdays: {\n            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n                '_'\n            ),\n            standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n                '_'\n            ),\n            isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n        },\n        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n        },\n        calendar: {\n            sameDay: '[Сёння ў] LT',\n            nextDay: '[Заўтра ў] LT',\n            lastDay: '[Учора ў] LT',\n            nextWeek: function () {\n                return '[У] dddd [ў] LT';\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[У мінулую] dddd [ў] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[У мінулы] dddd [ў] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'праз %s',\n            past: '%s таму',\n            s: 'некалькі секунд',\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithPlural,\n            hh: relativeTimeWithPlural,\n            d: 'дзень',\n            dd: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночы|раніцы|дня|вечара/,\n        isPM: function (input) {\n            return /^(дня|вечара)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночы';\n            } else if (hour < 12) {\n                return 'раніцы';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечара';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return (number % 10 === 2 || number % 10 === 3) &&\n                        number % 100 !== 12 &&\n                        number % 100 !== 13\n                        ? number + '-і'\n                        : number + '-ы';\n                case 'D':\n                    return number + '-га';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return be;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bg = moment.defineLocale('bg', {\n        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Днес в] LT',\n            nextDay: '[Утре в] LT',\n            nextWeek: 'dddd [в] LT',\n            lastDay: '[Вчера в] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Миналата] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Миналия] dddd [в] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'след %s',\n            past: 'преди %s',\n            s: 'няколко секунди',\n            ss: '%d секунди',\n            m: 'минута',\n            mm: '%d минути',\n            h: 'час',\n            hh: '%d часа',\n            d: 'ден',\n            dd: '%d дена',\n            w: 'седмица',\n            ww: '%d седмици',\n            M: 'месец',\n            MM: '%d месеца',\n            y: 'година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bm = moment.defineLocale('bm', {\n        months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n            '_'\n        ),\n        monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n        weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n        weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n        weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'MMMM [tile] D [san] YYYY',\n            LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n            LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bi lɛrɛ] LT',\n            nextDay: '[Sini lɛrɛ] LT',\n            nextWeek: 'dddd [don lɛrɛ] LT',\n            lastDay: '[Kunu lɛrɛ] LT',\n            lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s kɔnɔ',\n            past: 'a bɛ %s bɔ',\n            s: 'sanga dama dama',\n            ss: 'sekondi %d',\n            m: 'miniti kelen',\n            mm: 'miniti %d',\n            h: 'lɛrɛ kelen',\n            hh: 'lɛrɛ %d',\n            d: 'tile kelen',\n            dd: 'tile %d',\n            M: 'kalo kelen',\n            MM: 'kalo %d',\n            y: 'san kelen',\n            yy: 'san %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return bm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bn = moment.defineLocale('bn', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n            '_'\n        ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'রাত' && hour >= 4) ||\n                (meridiem === 'দুপুর' && hour < 5) ||\n                meridiem === 'বিকাল'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 10) {\n                return 'সকাল';\n            } else if (hour < 17) {\n                return 'দুপুর';\n            } else if (hour < 20) {\n                return 'বিকাল';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bnBd = moment.defineLocale('bn-bd', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n            '_'\n        ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n\n        meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'রাত') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ভোর') {\n                return hour;\n            } else if (meridiem === 'সকাল') {\n                return hour;\n            } else if (meridiem === 'দুপুর') {\n                return hour >= 3 ? hour : hour + 12;\n            } else if (meridiem === 'বিকাল') {\n                return hour + 12;\n            } else if (meridiem === 'সন্ধ্যা') {\n                return hour + 12;\n            }\n        },\n\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 6) {\n                return 'ভোর';\n            } else if (hour < 12) {\n                return 'সকাল';\n            } else if (hour < 15) {\n                return 'দুপুর';\n            } else if (hour < 18) {\n                return 'বিকাল';\n            } else if (hour < 20) {\n                return 'সন্ধ্যা';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bnBd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '༡',\n            2: '༢',\n            3: '༣',\n            4: '༤',\n            5: '༥',\n            6: '༦',\n            7: '༧',\n            8: '༨',\n            9: '༩',\n            0: '༠',\n        },\n        numberMap = {\n            '༡': '1',\n            '༢': '2',\n            '༣': '3',\n            '༤': '4',\n            '༥': '5',\n            '༦': '6',\n            '༧': '7',\n            '༨': '8',\n            '༩': '9',\n            '༠': '0',\n        };\n\n    var bo = moment.defineLocale('bo', {\n        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n            '_'\n        ),\n        monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n            '_'\n        ),\n        monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n        monthsParseExact: true,\n        weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n            '_'\n        ),\n        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n            '_'\n        ),\n        weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[དི་རིང] LT',\n            nextDay: '[སང་ཉིན] LT',\n            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n            lastDay: '[ཁ་སང] LT',\n            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ལ་',\n            past: '%s སྔན་ལ',\n            s: 'ལམ་སང',\n            ss: '%d སྐར་ཆ།',\n            m: 'སྐར་མ་གཅིག',\n            mm: '%d སྐར་མ',\n            h: 'ཆུ་ཚོད་གཅིག',\n            hh: '%d ཆུ་ཚོད',\n            d: 'ཉིན་གཅིག',\n            dd: '%d ཉིན་',\n            M: 'ཟླ་བ་གཅིག',\n            MM: '%d ཟླ་བ',\n            y: 'ལོ་གཅིག',\n            yy: '%d ལོ',\n        },\n        preparse: function (string) {\n            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'མཚན་མོ' && hour >= 4) ||\n                (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                meridiem === 'དགོང་དག'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'མཚན་མོ';\n            } else if (hour < 10) {\n                return 'ཞོགས་ཀས';\n            } else if (hour < 17) {\n                return 'ཉིན་གུང';\n            } else if (hour < 20) {\n                return 'དགོང་དག';\n            } else {\n                return 'མཚན་མོ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithMutation(number, withoutSuffix, key) {\n        var format = {\n            mm: 'munutenn',\n            MM: 'miz',\n            dd: 'devezh',\n        };\n        return number + ' ' + mutation(format[key], number);\n    }\n    function specialMutationForYears(number) {\n        switch (lastNumber(number)) {\n            case 1:\n            case 3:\n            case 4:\n            case 5:\n            case 9:\n                return number + ' bloaz';\n            default:\n                return number + ' vloaz';\n        }\n    }\n    function lastNumber(number) {\n        if (number > 9) {\n            return lastNumber(number % 10);\n        }\n        return number;\n    }\n    function mutation(text, number) {\n        if (number === 2) {\n            return softMutation(text);\n        }\n        return text;\n    }\n    function softMutation(text) {\n        var mutationTable = {\n            m: 'v',\n            b: 'v',\n            d: 'z',\n        };\n        if (mutationTable[text.charAt(0)] === undefined) {\n            return text;\n        }\n        return mutationTable[text.charAt(0)] + text.substring(1);\n    }\n\n    var monthsParse = [\n            /^gen/i,\n            /^c[ʼ\\']hwe/i,\n            /^meu/i,\n            /^ebr/i,\n            /^mae/i,\n            /^(mez|eve)/i,\n            /^gou/i,\n            /^eos/i,\n            /^gwe/i,\n            /^her/i,\n            /^du/i,\n            /^ker/i,\n        ],\n        monthsRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        monthsStrictRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n        monthsShortStrictRegex = /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        fullWeekdaysParse = [\n            /^sul/i,\n            /^lun/i,\n            /^meurzh/i,\n            /^merc[ʼ\\']her/i,\n            /^yaou/i,\n            /^gwener/i,\n            /^sadorn/i,\n        ],\n        shortWeekdaysParse = [\n            /^Sul/i,\n            /^Lun/i,\n            /^Meu/i,\n            /^Mer/i,\n            /^Yao/i,\n            /^Gwe/i,\n            /^Sad/i,\n        ],\n        minWeekdaysParse = [\n            /^Su/i,\n            /^Lu/i,\n            /^Me([^r]|$)/i,\n            /^Mer/i,\n            /^Ya/i,\n            /^Gw/i,\n            /^Sa/i,\n        ];\n\n    var br = moment.defineLocale('br', {\n        months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n            '_'\n        ),\n        monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n        weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n        weekdaysParse: minWeekdaysParse,\n        fullWeekdaysParse: fullWeekdaysParse,\n        shortWeekdaysParse: shortWeekdaysParse,\n        minWeekdaysParse: minWeekdaysParse,\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [a viz] MMMM YYYY',\n            LLL: 'D [a viz] MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hiziv da] LT',\n            nextDay: '[Warcʼhoazh da] LT',\n            nextWeek: 'dddd [da] LT',\n            lastDay: '[Decʼh da] LT',\n            lastWeek: 'dddd [paset da] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'a-benn %s',\n            past: '%s ʼzo',\n            s: 'un nebeud segondennoù',\n            ss: '%d eilenn',\n            m: 'ur vunutenn',\n            mm: relativeTimeWithMutation,\n            h: 'un eur',\n            hh: '%d eur',\n            d: 'un devezh',\n            dd: relativeTimeWithMutation,\n            M: 'ur miz',\n            MM: relativeTimeWithMutation,\n            y: 'ur bloaz',\n            yy: specialMutationForYears,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'añ' : 'vet';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n        isPM: function (token) {\n            return token === 'g.m.';\n        },\n        meridiem: function (hour, minute, isLower) {\n            return hour < 12 ? 'a.m.' : 'g.m.';\n        },\n    });\n\n    return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var bs = moment.defineLocale('bs', {\n        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ca = moment.defineLocale('ca', {\n        months: {\n            standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n                '_'\n            ),\n            format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n            '_'\n        ),\n        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a les] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextDay: function () {\n                return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastDay: function () {\n                return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [passat a ' +\n                    (this.hours() !== 1 ? 'les' : 'la') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'uns segons',\n            ss: '%d segons',\n            m: 'un minut',\n            mm: '%d minuts',\n            h: 'una hora',\n            hh: '%d hores',\n            d: 'un dia',\n            dd: '%d dies',\n            M: 'un mes',\n            MM: '%d mesos',\n            y: 'un any',\n            yy: '%d anys',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                    ? 'n'\n                    : number === 3\n                    ? 'r'\n                    : number === 4\n                    ? 't'\n                    : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n            '_'\n        ),\n        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n        monthsParse = [\n            /^led/i,\n            /^úno/i,\n            /^bře/i,\n            /^dub/i,\n            /^kvě/i,\n            /^(čvn|červen$|června)/i,\n            /^(čvc|červenec|července)/i,\n            /^srp/i,\n            /^zář/i,\n            /^říj/i,\n            /^lis/i,\n            /^pro/i,\n        ],\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n    function plural(n) {\n        return n > 1 && n < 5 && ~~(n / 10) !== 1;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekund');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minuty' : 'minut');\n                } else {\n                    return result + 'minutami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodin');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'den' : 'dnem';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dny' : 'dní');\n                } else {\n                    return result + 'dny';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'měsíce' : 'měsíců');\n                } else {\n                    return result + 'měsíci';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokem';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'let');\n                } else {\n                    return result + 'lety';\n                }\n        }\n    }\n\n    var cs = moment.defineLocale('cs', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n        monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n            l: 'D. M. YYYY',\n        },\n        calendar: {\n            sameDay: '[dnes v] LT',\n            nextDay: '[zítra v] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [v] LT';\n                    case 3:\n                        return '[ve středu v] LT';\n                    case 4:\n                        return '[ve čtvrtek v] LT';\n                    case 5:\n                        return '[v pátek v] LT';\n                    case 6:\n                        return '[v sobotu v] LT';\n                }\n            },\n            lastDay: '[včera v] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulou neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[minulé] dddd [v] LT';\n                    case 3:\n                        return '[minulou středu v] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [v] LT';\n                    case 6:\n                        return '[minulou sobotu v] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'před %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cv = moment.defineLocale('cv', {\n        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n            '_'\n        ),\n        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n        weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n            '_'\n        ),\n        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n        },\n        calendar: {\n            sameDay: '[Паян] LT [сехетре]',\n            nextDay: '[Ыран] LT [сехетре]',\n            lastDay: '[Ӗнер] LT [сехетре]',\n            nextWeek: '[Ҫитес] dddd LT [сехетре]',\n            lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (output) {\n                var affix = /сехет$/i.exec(output)\n                    ? 'рен'\n                    : /ҫул$/i.exec(output)\n                    ? 'тан'\n                    : 'ран';\n                return output + affix;\n            },\n            past: '%s каялла',\n            s: 'пӗр-ик ҫеккунт',\n            ss: '%d ҫеккунт',\n            m: 'пӗр минут',\n            mm: '%d минут',\n            h: 'пӗр сехет',\n            hh: '%d сехет',\n            d: 'пӗр кун',\n            dd: '%d кун',\n            M: 'пӗр уйӑх',\n            MM: '%d уйӑх',\n            y: 'пӗр ҫул',\n            yy: '%d ҫул',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n        ordinal: '%d-мӗш',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return cv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cy = moment.defineLocale('cy', {\n        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n            '_'\n        ),\n        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n            '_'\n        ),\n        weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n        weekdaysParseExact: true,\n        // time formats are the same as en-gb\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Heddiw am] LT',\n            nextDay: '[Yfory am] LT',\n            nextWeek: 'dddd [am] LT',\n            lastDay: '[Ddoe am] LT',\n            lastWeek: 'dddd [diwethaf am] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'mewn %s',\n            past: '%s yn ôl',\n            s: 'ychydig eiliadau',\n            ss: '%d eiliad',\n            m: 'munud',\n            mm: '%d munud',\n            h: 'awr',\n            hh: '%d awr',\n            d: 'diwrnod',\n            dd: '%d diwrnod',\n            M: 'mis',\n            MM: '%d mis',\n            y: 'blwyddyn',\n            yy: '%d flynedd',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n        ordinal: function (number) {\n            var b = number,\n                output = '',\n                lookup = [\n                    '',\n                    'af',\n                    'il',\n                    'ydd',\n                    'ydd',\n                    'ed',\n                    'ed',\n                    'ed',\n                    'fed',\n                    'fed',\n                    'fed', // 1af to 10fed\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'fed', // 11eg to 20fed\n                ];\n            if (b > 20) {\n                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                    output = 'fed'; // not 30ain, 70ain or 90ain\n                } else {\n                    output = 'ain';\n                }\n            } else if (b > 0) {\n                output = lookup[b];\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var da = moment.defineLocale('da', {\n        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'på dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[i] dddd[s kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'få sekunder',\n            ss: '%d sekunder',\n            m: 'et minut',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dage',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'et år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return da;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deAt = moment.defineLocale('de-at', {\n        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n            '_'\n        ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deAt;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deCh = moment.defineLocale('de-ch', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n            '_'\n        ),\n        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'ޖެނުއަރީ',\n            'ފެބްރުއަރީ',\n            'މާރިޗު',\n            'އޭޕްރީލު',\n            'މޭ',\n            'ޖޫން',\n            'ޖުލައި',\n            'އޯގަސްޓު',\n            'ސެޕްޓެމްބަރު',\n            'އޮކްޓޯބަރު',\n            'ނޮވެމްބަރު',\n            'ޑިސެމްބަރު',\n        ],\n        weekdays = [\n            'އާދިއްތަ',\n            'ހޯމަ',\n            'އަންގާރަ',\n            'ބުދަ',\n            'ބުރާސްފަތި',\n            'ހުކުރު',\n            'ހޮނިހިރު',\n        ];\n\n    var dv = moment.defineLocale('dv', {\n        months: months,\n        monthsShort: months,\n        weekdays: weekdays,\n        weekdaysShort: weekdays,\n        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/M/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /މކ|މފ/,\n        isPM: function (input) {\n            return 'މފ' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'މކ';\n            } else {\n                return 'މފ';\n            }\n        },\n        calendar: {\n            sameDay: '[މިއަދު] LT',\n            nextDay: '[މާދަމާ] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[އިއްޔެ] LT',\n            lastWeek: '[ފާއިތުވި] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ތެރޭގައި %s',\n            past: 'ކުރިން %s',\n            s: 'ސިކުންތުކޮޅެއް',\n            ss: 'd% ސިކުންތު',\n            m: 'މިނިޓެއް',\n            mm: 'މިނިޓު %d',\n            h: 'ގަޑިއިރެއް',\n            hh: 'ގަޑިއިރު %d',\n            d: 'ދުވަހެއް',\n            dd: 'ދުވަސް %d',\n            M: 'މަހެއް',\n            MM: 'މަސް %d',\n            y: 'އަހަރެއް',\n            yy: 'އަހަރު %d',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 7, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return dv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    var el = moment.defineLocale('el', {\n        monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n            '_'\n        ),\n        monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n            '_'\n        ),\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return this._monthsNominativeEl;\n            } else if (\n                typeof format === 'string' &&\n                /D/.test(format.substring(0, format.indexOf('MMMM')))\n            ) {\n                // if there is a day number before 'MMMM'\n                return this._monthsGenitiveEl[momentToFormat.month()];\n            } else {\n                return this._monthsNominativeEl[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n            '_'\n        ),\n        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'μμ' : 'ΜΜ';\n            } else {\n                return isLower ? 'πμ' : 'ΠΜ';\n            }\n        },\n        isPM: function (input) {\n            return (input + '').toLowerCase()[0] === 'μ';\n        },\n        meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendarEl: {\n            sameDay: '[Σήμερα {}] LT',\n            nextDay: '[Αύριο {}] LT',\n            nextWeek: 'dddd [{}] LT',\n            lastDay: '[Χθες {}] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 6:\n                        return '[το προηγούμενο] dddd [{}] LT';\n                    default:\n                        return '[την προηγούμενη] dddd [{}] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        calendar: function (key, mom) {\n            var output = this._calendarEl[key],\n                hours = mom && mom.hours();\n            if (isFunction(output)) {\n                output = output.apply(mom);\n            }\n            return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n        },\n        relativeTime: {\n            future: 'σε %s',\n            past: '%s πριν',\n            s: 'λίγα δευτερόλεπτα',\n            ss: '%d δευτερόλεπτα',\n            m: 'ένα λεπτό',\n            mm: '%d λεπτά',\n            h: 'μία ώρα',\n            hh: '%d ώρες',\n            d: 'μία μέρα',\n            dd: '%d μέρες',\n            M: 'ένας μήνας',\n            MM: '%d μήνες',\n            y: 'ένας χρόνος',\n            yy: '%d χρόνια',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}η/,\n        ordinal: '%dη',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4st is the first week of the year.\n        },\n    });\n\n    return el;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enAu = moment.defineLocale('en-au', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enAu;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enCa = moment.defineLocale('en-ca', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'YYYY-MM-DD',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY h:mm A',\n            LLLL: 'dddd, MMMM D, YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enGb = moment.defineLocale('en-gb', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enGb;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIe = moment.defineLocale('en-ie', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIl = moment.defineLocale('en-il', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    return enIl;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIn = moment.defineLocale('en-in', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return enIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enNz = moment.defineLocale('en-nz', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enNz;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enSg = moment.defineLocale('en-sg', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eo = moment.defineLocale('eo', {\n        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: '[la] D[-an de] MMMM, YYYY',\n            LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n            LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n            llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n        },\n        meridiemParse: /[ap]\\.t\\.m/i,\n        isPM: function (input) {\n            return input.charAt(0).toLowerCase() === 'p';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'p.t.m.' : 'P.T.M.';\n            } else {\n                return isLower ? 'a.t.m.' : 'A.T.M.';\n            }\n        },\n        calendar: {\n            sameDay: '[Hodiaŭ je] LT',\n            nextDay: '[Morgaŭ je] LT',\n            nextWeek: 'dddd[n je] LT',\n            lastDay: '[Hieraŭ je] LT',\n            lastWeek: '[pasintan] dddd[n je] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'post %s',\n            past: 'antaŭ %s',\n            s: 'kelkaj sekundoj',\n            ss: '%d sekundoj',\n            m: 'unu minuto',\n            mm: '%d minutoj',\n            h: 'unu horo',\n            hh: '%d horoj',\n            d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n            dd: '%d tagoj',\n            M: 'unu monato',\n            MM: '%d monatoj',\n            y: 'unu jaro',\n            yy: '%d jaroj',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}a/,\n        ordinal: '%da',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n            '_'\n        ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var es = moment.defineLocale('es', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return es;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n            '_'\n        ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esDo = moment.defineLocale('es-do', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return esDo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n            '_'\n        ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esMx = moment.defineLocale('es-mx', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n            '_'\n        ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esUs = moment.defineLocale('es-us', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'MM/DD/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return esUs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n            ss: [number + 'sekundi', number + 'sekundit'],\n            m: ['ühe minuti', 'üks minut'],\n            mm: [number + ' minuti', number + ' minutit'],\n            h: ['ühe tunni', 'tund aega', 'üks tund'],\n            hh: [number + ' tunni', number + ' tundi'],\n            d: ['ühe päeva', 'üks päev'],\n            M: ['kuu aja', 'kuu aega', 'üks kuu'],\n            MM: [number + ' kuu', number + ' kuud'],\n            y: ['ühe aasta', 'aasta', 'üks aasta'],\n            yy: [number + ' aasta', number + ' aastat'],\n        };\n        if (withoutSuffix) {\n            return format[key][2] ? format[key][2] : format[key][1];\n        }\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var et = moment.defineLocale('et', {\n        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n            '_'\n        ),\n        monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(\n            '_'\n        ),\n        weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n            '_'\n        ),\n        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Täna,] LT',\n            nextDay: '[Homme,] LT',\n            nextWeek: '[Järgmine] dddd LT',\n            lastDay: '[Eile,] LT',\n            lastWeek: '[Eelmine] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s pärast',\n            past: '%s tagasi',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: '%d päeva',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return et;\n\n})));\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eu = moment.defineLocale('eu', {\n        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n            '_'\n        ),\n        monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n            '_'\n        ),\n        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY[ko] MMMM[ren] D[a]',\n            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n            l: 'YYYY-M-D',\n            ll: 'YYYY[ko] MMM D[a]',\n            lll: 'YYYY[ko] MMM D[a] HH:mm',\n            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n        },\n        calendar: {\n            sameDay: '[gaur] LT[etan]',\n            nextDay: '[bihar] LT[etan]',\n            nextWeek: 'dddd LT[etan]',\n            lastDay: '[atzo] LT[etan]',\n            lastWeek: '[aurreko] dddd LT[etan]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s barru',\n            past: 'duela %s',\n            s: 'segundo batzuk',\n            ss: '%d segundo',\n            m: 'minutu bat',\n            mm: '%d minutu',\n            h: 'ordu bat',\n            hh: '%d ordu',\n            d: 'egun bat',\n            dd: '%d egun',\n            M: 'hilabete bat',\n            MM: '%d hilabete',\n            y: 'urte bat',\n            yy: '%d urte',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '۱',\n            2: '۲',\n            3: '۳',\n            4: '۴',\n            5: '۵',\n            6: '۶',\n            7: '۷',\n            8: '۸',\n            9: '۹',\n            0: '۰',\n        },\n        numberMap = {\n            '۱': '1',\n            '۲': '2',\n            '۳': '3',\n            '۴': '4',\n            '۵': '5',\n            '۶': '6',\n            '۷': '7',\n            '۸': '8',\n            '۹': '9',\n            '۰': '0',\n        };\n\n    var fa = moment.defineLocale('fa', {\n        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n            '_'\n        ),\n        monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n            '_'\n        ),\n        weekdays: 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n            '_'\n        ),\n        weekdaysShort: 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n            '_'\n        ),\n        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /قبل از ظهر|بعد از ظهر/,\n        isPM: function (input) {\n            return /بعد از ظهر/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'قبل از ظهر';\n            } else {\n                return 'بعد از ظهر';\n            }\n        },\n        calendar: {\n            sameDay: '[امروز ساعت] LT',\n            nextDay: '[فردا ساعت] LT',\n            nextWeek: 'dddd [ساعت] LT',\n            lastDay: '[دیروز ساعت] LT',\n            lastWeek: 'dddd [پیش] [ساعت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'در %s',\n            past: '%s پیش',\n            s: 'چند ثانیه',\n            ss: '%d ثانیه',\n            m: 'یک دقیقه',\n            mm: '%d دقیقه',\n            h: 'یک ساعت',\n            hh: '%d ساعت',\n            d: 'یک روز',\n            dd: '%d روز',\n            M: 'یک ماه',\n            MM: '%d ماه',\n            y: 'یک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[۰-۹]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}م/,\n        ordinal: '%dم',\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return fa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n            ' '\n        ),\n        numbersFuture = [\n            'nolla',\n            'yhden',\n            'kahden',\n            'kolmen',\n            'neljän',\n            'viiden',\n            'kuuden',\n            numbersPast[7],\n            numbersPast[8],\n            numbersPast[9],\n        ];\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = '';\n        switch (key) {\n            case 's':\n                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n            case 'ss':\n                result = isFuture ? 'sekunnin' : 'sekuntia';\n                break;\n            case 'm':\n                return isFuture ? 'minuutin' : 'minuutti';\n            case 'mm':\n                result = isFuture ? 'minuutin' : 'minuuttia';\n                break;\n            case 'h':\n                return isFuture ? 'tunnin' : 'tunti';\n            case 'hh':\n                result = isFuture ? 'tunnin' : 'tuntia';\n                break;\n            case 'd':\n                return isFuture ? 'päivän' : 'päivä';\n            case 'dd':\n                result = isFuture ? 'päivän' : 'päivää';\n                break;\n            case 'M':\n                return isFuture ? 'kuukauden' : 'kuukausi';\n            case 'MM':\n                result = isFuture ? 'kuukauden' : 'kuukautta';\n                break;\n            case 'y':\n                return isFuture ? 'vuoden' : 'vuosi';\n            case 'yy':\n                result = isFuture ? 'vuoden' : 'vuotta';\n                break;\n        }\n        result = verbalNumber(number, isFuture) + ' ' + result;\n        return result;\n    }\n    function verbalNumber(number, isFuture) {\n        return number < 10\n            ? isFuture\n                ? numbersFuture[number]\n                : numbersPast[number]\n            : number;\n    }\n\n    var fi = moment.defineLocale('fi', {\n        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n            '_'\n        ),\n        monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n            '_'\n        ),\n        weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n            '_'\n        ),\n        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[ta] YYYY',\n            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n            l: 'D.M.YYYY',\n            ll: 'Do MMM YYYY',\n            lll: 'Do MMM YYYY, [klo] HH.mm',\n            llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n        },\n        calendar: {\n            sameDay: '[tänään] [klo] LT',\n            nextDay: '[huomenna] [klo] LT',\n            nextWeek: 'dddd [klo] LT',\n            lastDay: '[eilen] [klo] LT',\n            lastWeek: '[viime] dddd[na] [klo] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s päästä',\n            past: '%s sitten',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fil = moment.defineLocale('fil', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fo = moment.defineLocale('fo', {\n        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n            '_'\n        ),\n        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D. MMMM, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Í dag kl.] LT',\n            nextDay: '[Í morgin kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[Í gjár kl.] LT',\n            lastWeek: '[síðstu] dddd [kl] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'um %s',\n            past: '%s síðani',\n            s: 'fá sekund',\n            ss: '%d sekundir',\n            m: 'ein minuttur',\n            mm: '%d minuttir',\n            h: 'ein tími',\n            hh: '%d tímar',\n            d: 'ein dagur',\n            dd: '%d dagar',\n            M: 'ein mánaður',\n            MM: '%d mánaðir',\n            y: 'eitt ár',\n            yy: '%d ár',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fo;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCa = moment.defineLocale('fr-ca', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n    });\n\n    return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCh = moment.defineLocale('fr-ch', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(\n            '_'\n        ),\n        monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(\n            '_'\n        );\n\n    var fy = moment.defineLocale('fy', {\n        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n        monthsParseExact: true,\n        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n            '_'\n        ),\n        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[hjoed om] LT',\n            nextDay: '[moarn om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[juster om] LT',\n            lastWeek: '[ôfrûne] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oer %s',\n            past: '%s lyn',\n            s: 'in pear sekonden',\n            ss: '%d sekonden',\n            m: 'ien minút',\n            mm: '%d minuten',\n            h: 'ien oere',\n            hh: '%d oeren',\n            d: 'ien dei',\n            dd: '%d dagen',\n            M: 'ien moanne',\n            MM: '%d moannen',\n            y: 'ien jier',\n            yy: '%d jierren',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Eanáir',\n            'Feabhra',\n            'Márta',\n            'Aibreán',\n            'Bealtaine',\n            'Meitheamh',\n            'Iúil',\n            'Lúnasa',\n            'Meán Fómhair',\n            'Deireadh Fómhair',\n            'Samhain',\n            'Nollaig',\n        ],\n        monthsShort = [\n            'Ean',\n            'Feabh',\n            'Márt',\n            'Aib',\n            'Beal',\n            'Meith',\n            'Iúil',\n            'Lún',\n            'M.F.',\n            'D.F.',\n            'Samh',\n            'Noll',\n        ],\n        weekdays = [\n            'Dé Domhnaigh',\n            'Dé Luain',\n            'Dé Máirt',\n            'Dé Céadaoin',\n            'Déardaoin',\n            'Dé hAoine',\n            'Dé Sathairn',\n        ],\n        weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n        weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n    var ga = moment.defineLocale('ga', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Inniu ag] LT',\n            nextDay: '[Amárach ag] LT',\n            nextWeek: 'dddd [ag] LT',\n            lastDay: '[Inné ag] LT',\n            lastWeek: 'dddd [seo caite] [ag] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i %s',\n            past: '%s ó shin',\n            s: 'cúpla soicind',\n            ss: '%d soicind',\n            m: 'nóiméad',\n            mm: '%d nóiméad',\n            h: 'uair an chloig',\n            hh: '%d uair an chloig',\n            d: 'lá',\n            dd: '%d lá',\n            M: 'mí',\n            MM: '%d míonna',\n            y: 'bliain',\n            yy: '%d bliain',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Am Faoilleach',\n            'An Gearran',\n            'Am Màrt',\n            'An Giblean',\n            'An Cèitean',\n            'An t-Ògmhios',\n            'An t-Iuchar',\n            'An Lùnastal',\n            'An t-Sultain',\n            'An Dàmhair',\n            'An t-Samhain',\n            'An Dùbhlachd',\n        ],\n        monthsShort = [\n            'Faoi',\n            'Gear',\n            'Màrt',\n            'Gibl',\n            'Cèit',\n            'Ògmh',\n            'Iuch',\n            'Lùn',\n            'Sult',\n            'Dàmh',\n            'Samh',\n            'Dùbh',\n        ],\n        weekdays = [\n            'Didòmhnaich',\n            'Diluain',\n            'Dimàirt',\n            'Diciadain',\n            'Diardaoin',\n            'Dihaoine',\n            'Disathairne',\n        ],\n        weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n        weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n    var gd = moment.defineLocale('gd', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[An-diugh aig] LT',\n            nextDay: '[A-màireach aig] LT',\n            nextWeek: 'dddd [aig] LT',\n            lastDay: '[An-dè aig] LT',\n            lastWeek: 'dddd [seo chaidh] [aig] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ann an %s',\n            past: 'bho chionn %s',\n            s: 'beagan diogan',\n            ss: '%d diogan',\n            m: 'mionaid',\n            mm: '%d mionaidean',\n            h: 'uair',\n            hh: '%d uairean',\n            d: 'latha',\n            dd: '%d latha',\n            M: 'mìos',\n            MM: '%d mìosan',\n            y: 'bliadhna',\n            yy: '%d bliadhna',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var gl = moment.defineLocale('gl', {\n        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n            },\n            lastDay: function () {\n                return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (str) {\n                if (str.indexOf('un') === 0) {\n                    return 'n' + str;\n                }\n                return 'en ' + str;\n            },\n            past: 'hai %s',\n            s: 'uns segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'unha hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n            ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n            m: ['एका मिणटान', 'एक मिनूट'],\n            mm: [number + ' मिणटांनी', number + ' मिणटां'],\n            h: ['एका वरान', 'एक वर'],\n            hh: [number + ' वरांनी', number + ' वरां'],\n            d: ['एका दिसान', 'एक दीस'],\n            dd: [number + ' दिसांनी', number + ' दीस'],\n            M: ['एका म्हयन्यान', 'एक म्हयनो'],\n            MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n            y: ['एका वर्सान', 'एक वर्स'],\n            yy: [number + ' वर्सांनी', number + ' वर्सां'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomDeva = moment.defineLocale('gom-deva', {\n        months: {\n            standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n                '_'\n            ),\n            format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n        weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n        weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [वाजतां]',\n            LTS: 'A h:mm:ss [वाजतां]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n            llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n        },\n        calendar: {\n            sameDay: '[आयज] LT',\n            nextDay: '[फाल्यां] LT',\n            nextWeek: '[फुडलो] dddd[,] LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[फाटलो] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s आदीं',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'वेर' only applies to day of the month\n                case 'D':\n                    return number + 'वेर';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राती') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सकाळीं') {\n                return hour;\n            } else if (meridiem === 'दनपारां') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'सांजे') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'राती';\n            } else if (hour < 12) {\n                return 'सकाळीं';\n            } else if (hour < 16) {\n                return 'दनपारां';\n            } else if (hour < 20) {\n                return 'सांजे';\n            } else {\n                return 'राती';\n            }\n        },\n    });\n\n    return gomDeva;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['thoddea sekondamni', 'thodde sekond'],\n            ss: [number + ' sekondamni', number + ' sekond'],\n            m: ['eka mintan', 'ek minut'],\n            mm: [number + ' mintamni', number + ' mintam'],\n            h: ['eka voran', 'ek vor'],\n            hh: [number + ' voramni', number + ' voram'],\n            d: ['eka disan', 'ek dis'],\n            dd: [number + ' disamni', number + ' dis'],\n            M: ['eka mhoinean', 'ek mhoino'],\n            MM: [number + ' mhoineamni', number + ' mhoine'],\n            y: ['eka vorsan', 'ek voros'],\n            yy: [number + ' vorsamni', number + ' vorsam'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomLatn = moment.defineLocale('gom-latn', {\n        months: {\n            standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n                '_'\n            ),\n            format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [vazta]',\n            LTS: 'A h:mm:ss [vazta]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [vazta]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n            llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n        },\n        calendar: {\n            sameDay: '[Aiz] LT',\n            nextDay: '[Faleam] LT',\n            nextWeek: '[Fuddlo] dddd[,] LT',\n            lastDay: '[Kal] LT',\n            lastWeek: '[Fattlo] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s adim',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'er' only applies to day of the month\n                case 'D':\n                    return number + 'er';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /rati|sokallim|donparam|sanje/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'rati') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'sokallim') {\n                return hour;\n            } else if (meridiem === 'donparam') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'sanje') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'rati';\n            } else if (hour < 12) {\n                return 'sokallim';\n            } else if (hour < 16) {\n                return 'donparam';\n            } else if (hour < 20) {\n                return 'sanje';\n            } else {\n                return 'rati';\n            }\n        },\n    });\n\n    return gomLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '૧',\n            2: '૨',\n            3: '૩',\n            4: '૪',\n            5: '૫',\n            6: '૬',\n            7: '૭',\n            8: '૮',\n            9: '૯',\n            0: '૦',\n        },\n        numberMap = {\n            '૧': '1',\n            '૨': '2',\n            '૩': '3',\n            '૪': '4',\n            '૫': '5',\n            '૬': '6',\n            '૭': '7',\n            '૮': '8',\n            '૯': '9',\n            '૦': '0',\n        };\n\n    var gu = moment.defineLocale('gu', {\n        months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n            '_'\n        ),\n        monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n            '_'\n        ),\n        weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n        weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm વાગ્યે',\n            LTS: 'A h:mm:ss વાગ્યે',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n        },\n        calendar: {\n            sameDay: '[આજ] LT',\n            nextDay: '[કાલે] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ગઇકાલે] LT',\n            lastWeek: '[પાછલા] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s મા',\n            past: '%s પહેલા',\n            s: 'અમુક પળો',\n            ss: '%d સેકંડ',\n            m: 'એક મિનિટ',\n            mm: '%d મિનિટ',\n            h: 'એક કલાક',\n            hh: '%d કલાક',\n            d: 'એક દિવસ',\n            dd: '%d દિવસ',\n            M: 'એક મહિનો',\n            MM: '%d મહિનો',\n            y: 'એક વર્ષ',\n            yy: '%d વર્ષ',\n        },\n        preparse: function (string) {\n            return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n        meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'રાત') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'સવાર') {\n                return hour;\n            } else if (meridiem === 'બપોર') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'સાંજ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'રાત';\n            } else if (hour < 10) {\n                return 'સવાર';\n            } else if (hour < 17) {\n                return 'બપોર';\n            } else if (hour < 20) {\n                return 'સાંજ';\n            } else {\n                return 'રાત';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return gu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var he = moment.defineLocale('he', {\n        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n            '_'\n        ),\n        monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(\n            '_'\n        ),\n        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [ב]MMMM YYYY',\n            LLL: 'D [ב]MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[היום ב־]LT',\n            nextDay: '[מחר ב־]LT',\n            nextWeek: 'dddd [בשעה] LT',\n            lastDay: '[אתמול ב־]LT',\n            lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'בעוד %s',\n            past: 'לפני %s',\n            s: 'מספר שניות',\n            ss: '%d שניות',\n            m: 'דקה',\n            mm: '%d דקות',\n            h: 'שעה',\n            hh: function (number) {\n                if (number === 2) {\n                    return 'שעתיים';\n                }\n                return number + ' שעות';\n            },\n            d: 'יום',\n            dd: function (number) {\n                if (number === 2) {\n                    return 'יומיים';\n                }\n                return number + ' ימים';\n            },\n            M: 'חודש',\n            MM: function (number) {\n                if (number === 2) {\n                    return 'חודשיים';\n                }\n                return number + ' חודשים';\n            },\n            y: 'שנה',\n            yy: function (number) {\n                if (number === 2) {\n                    return 'שנתיים';\n                } else if (number % 10 === 0 && number !== 10) {\n                    return number + ' שנה';\n                }\n                return number + ' שנים';\n            },\n        },\n        meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n        isPM: function (input) {\n            return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 5) {\n                return 'לפנות בוקר';\n            } else if (hour < 10) {\n                return 'בבוקר';\n            } else if (hour < 12) {\n                return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n            } else if (hour < 18) {\n                return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n            } else {\n                return 'בערב';\n            }\n        },\n    });\n\n    return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        },\n        monthsParse = [\n            /^जन/i,\n            /^फ़र|फर/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सितं|सित/i,\n            /^अक्टू/i,\n            /^नव|नवं/i,\n            /^दिसं|दिस/i,\n        ],\n        shortMonthsParse = [\n            /^जन/i,\n            /^फ़र/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सित/i,\n            /^अक्टू/i,\n            /^नव/i,\n            /^दिस/i,\n        ];\n\n    var hi = moment.defineLocale('hi', {\n        months: {\n            format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n                '_'\n            ),\n            standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(\n            '_'\n        ),\n        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm बजे',\n            LTS: 'A h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n        },\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: shortMonthsParse,\n\n        monthsRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsShortRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n        monthsShortStrictRegex: /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[कल] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[कल] LT',\n            lastWeek: '[पिछले] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s में',\n            past: '%s पहले',\n            s: 'कुछ ही क्षण',\n            ss: '%d सेकंड',\n            m: 'एक मिनट',\n            mm: '%d मिनट',\n            h: 'एक घंटा',\n            hh: '%d घंटे',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महीने',\n            MM: '%d महीने',\n            y: 'एक वर्ष',\n            yy: '%d वर्ष',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n        meridiemParse: /रात|सुबह|दोपहर|शाम/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सुबह') {\n                return hour;\n            } else if (meridiem === 'दोपहर') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'शाम') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात';\n            } else if (hour < 10) {\n                return 'सुबह';\n            } else if (hour < 17) {\n                return 'दोपहर';\n            } else if (hour < 20) {\n                return 'शाम';\n            } else {\n                return 'रात';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return hi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var hr = moment.defineLocale('hr', {\n        months: {\n            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n                '_'\n            ),\n            standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM YYYY',\n            LLL: 'Do MMMM YYYY H:mm',\n            LLLL: 'dddd, Do MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prošlu] [nedjelju] [u] LT';\n                    case 3:\n                        return '[prošlu] [srijedu] [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt  : https://github.com/passatgt\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(\n        ' '\n    );\n    function translate(number, withoutSuffix, key, isFuture) {\n        var num = number;\n        switch (key) {\n            case 's':\n                return isFuture || withoutSuffix\n                    ? 'néhány másodperc'\n                    : 'néhány másodperce';\n            case 'ss':\n                return num + (isFuture || withoutSuffix)\n                    ? ' másodperc'\n                    : ' másodperce';\n            case 'm':\n                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'mm':\n                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'h':\n                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'hh':\n                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'd':\n                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'dd':\n                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'M':\n                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'MM':\n                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'y':\n                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n            case 'yy':\n                return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n        }\n        return '';\n    }\n    function week(isFuture) {\n        return (\n            (isFuture ? '' : '[múlt] ') +\n            '[' +\n            weekEndings[this.day()] +\n            '] LT[-kor]'\n        );\n    }\n\n    var hu = moment.defineLocale('hu', {\n        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY. MMMM D.',\n            LLL: 'YYYY. MMMM D. H:mm',\n            LLLL: 'YYYY. MMMM D., dddd H:mm',\n        },\n        meridiemParse: /de|du/i,\n        isPM: function (input) {\n            return input.charAt(1).toLowerCase() === 'u';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower === true ? 'de' : 'DE';\n            } else {\n                return isLower === true ? 'du' : 'DU';\n            }\n        },\n        calendar: {\n            sameDay: '[ma] LT[-kor]',\n            nextDay: '[holnap] LT[-kor]',\n            nextWeek: function () {\n                return week.call(this, true);\n            },\n            lastDay: '[tegnap] LT[-kor]',\n            lastWeek: function () {\n                return week.call(this, false);\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s múlva',\n            past: '%s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return hu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var hyAm = moment.defineLocale('hy-am', {\n        months: {\n            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n                '_'\n            ),\n            standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n        weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n            '_'\n        ),\n        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY թ.',\n            LLL: 'D MMMM YYYY թ., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n        },\n        calendar: {\n            sameDay: '[այսօր] LT',\n            nextDay: '[վաղը] LT',\n            lastDay: '[երեկ] LT',\n            nextWeek: function () {\n                return 'dddd [օրը ժամը] LT';\n            },\n            lastWeek: function () {\n                return '[անցած] dddd [օրը ժամը] LT';\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s հետո',\n            past: '%s առաջ',\n            s: 'մի քանի վայրկյան',\n            ss: '%d վայրկյան',\n            m: 'րոպե',\n            mm: '%d րոպե',\n            h: 'ժամ',\n            hh: '%d ժամ',\n            d: 'օր',\n            dd: '%d օր',\n            M: 'ամիս',\n            MM: '%d ամիս',\n            y: 'տարի',\n            yy: '%d տարի',\n        },\n        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n        isPM: function (input) {\n            return /^(ցերեկվա|երեկոյան)$/.test(input);\n        },\n        meridiem: function (hour) {\n            if (hour < 4) {\n                return 'գիշերվա';\n            } else if (hour < 12) {\n                return 'առավոտվա';\n            } else if (hour < 17) {\n                return 'ցերեկվա';\n            } else {\n                return 'երեկոյան';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'DDD':\n                case 'w':\n                case 'W':\n                case 'DDDo':\n                    if (number === 1) {\n                        return number + '-ին';\n                    }\n                    return number + '-րդ';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var id = moment.defineLocale('id', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|siang|sore|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'siang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sore' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'siang';\n            } else if (hours < 19) {\n                return 'sore';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Besok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kemarin pukul] LT',\n            lastWeek: 'dddd [lalu pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lalu',\n            s: 'beberapa detik',\n            ss: '%d detik',\n            m: 'semenit',\n            mm: '%d menit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return id;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(n) {\n        if (n % 100 === 11) {\n            return true;\n        } else if (n % 10 === 1) {\n            return false;\n        }\n        return true;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nokkrar sekúndur'\n                    : 'nokkrum sekúndum';\n            case 'ss':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n                    );\n                }\n                return result + 'sekúnda';\n            case 'm':\n                return withoutSuffix ? 'mínúta' : 'mínútu';\n            case 'mm':\n                if (plural(number)) {\n                    return (\n                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n                    );\n                } else if (withoutSuffix) {\n                    return result + 'mínúta';\n                }\n                return result + 'mínútu';\n            case 'hh':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture\n                            ? 'klukkustundir'\n                            : 'klukkustundum')\n                    );\n                }\n                return result + 'klukkustund';\n            case 'd':\n                if (withoutSuffix) {\n                    return 'dagur';\n                }\n                return isFuture ? 'dag' : 'degi';\n            case 'dd':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'dagar';\n                    }\n                    return result + (isFuture ? 'daga' : 'dögum');\n                } else if (withoutSuffix) {\n                    return result + 'dagur';\n                }\n                return result + (isFuture ? 'dag' : 'degi');\n            case 'M':\n                if (withoutSuffix) {\n                    return 'mánuður';\n                }\n                return isFuture ? 'mánuð' : 'mánuði';\n            case 'MM':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'mánuðir';\n                    }\n                    return result + (isFuture ? 'mánuði' : 'mánuðum');\n                } else if (withoutSuffix) {\n                    return result + 'mánuður';\n                }\n                return result + (isFuture ? 'mánuð' : 'mánuði');\n            case 'y':\n                return withoutSuffix || isFuture ? 'ár' : 'ári';\n            case 'yy':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n                }\n                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n        }\n    }\n\n    var is = moment.defineLocale('is', {\n        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n        weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n            '_'\n        ),\n        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n        },\n        calendar: {\n            sameDay: '[í dag kl.] LT',\n            nextDay: '[á morgun kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[í gær kl.] LT',\n            lastWeek: '[síðasta] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'eftir %s',\n            past: 'fyrir %s síðan',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: 'klukkustund',\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return is;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var it = moment.defineLocale('it', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return (\n                    '[Oggi a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextDay: function () {\n                return (\n                    '[Domani a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextWeek: function () {\n                return (\n                    'dddd [a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastDay: function () {\n                return (\n                    '[Ieri a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return (\n                            '[La scorsa] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                ? ' '\n                                : \"ll'\") +\n                            ']LT'\n                        );\n                    default:\n                        return (\n                            '[Lo scorso] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                ? ' '\n                                : \"ll'\") +\n                            ']LT'\n                        );\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'tra %s',\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            w: 'una settimana',\n            ww: '%d settimane',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var itCh = moment.defineLocale('it-ch', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Oggi alle] LT',\n            nextDay: '[Domani alle] LT',\n            nextWeek: 'dddd [alle] LT',\n            lastDay: '[Ieri alle] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[la scorsa] dddd [alle] LT';\n                    default:\n                        return '[lo scorso] dddd [alle] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n            },\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ja = moment.defineLocale('ja', {\n        eras: [\n            {\n                since: '2019-05-01',\n                offset: 1,\n                name: '令和',\n                narrow: '㋿',\n                abbr: 'R',\n            },\n            {\n                since: '1989-01-08',\n                until: '2019-04-30',\n                offset: 1,\n                name: '平成',\n                narrow: '㍻',\n                abbr: 'H',\n            },\n            {\n                since: '1926-12-25',\n                until: '1989-01-07',\n                offset: 1,\n                name: '昭和',\n                narrow: '㍼',\n                abbr: 'S',\n            },\n            {\n                since: '1912-07-30',\n                until: '1926-12-24',\n                offset: 1,\n                name: '大正',\n                narrow: '㍽',\n                abbr: 'T',\n            },\n            {\n                since: '1873-01-01',\n                until: '1912-07-29',\n                offset: 6,\n                name: '明治',\n                narrow: '㍾',\n                abbr: 'M',\n            },\n            {\n                since: '0001-01-01',\n                until: '1873-12-31',\n                offset: 1,\n                name: '西暦',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: '紀元前',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        eraYearOrdinalRegex: /(元|\\d+)年/,\n        eraYearOrdinalParse: function (input, match) {\n            return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n        },\n        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日 dddd HH:mm',\n            l: 'YYYY/MM/DD',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日(ddd) HH:mm',\n        },\n        meridiemParse: /午前|午後/i,\n        isPM: function (input) {\n            return input === '午後';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return '午前';\n            } else {\n                return '午後';\n            }\n        },\n        calendar: {\n            sameDay: '[今日] LT',\n            nextDay: '[明日] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[来週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            lastDay: '[昨日] LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[先週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}日/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'y':\n                    return number === 1 ? '元年' : number + '年';\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '数秒',\n            ss: '%d秒',\n            m: '1分',\n            mm: '%d分',\n            h: '1時間',\n            hh: '%d時間',\n            d: '1日',\n            dd: '%d日',\n            M: '1ヶ月',\n            MM: '%dヶ月',\n            y: '1年',\n            yy: '%d年',\n        },\n    });\n\n    return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var jv = moment.defineLocale('jv', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /enjing|siyang|sonten|ndalu/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'enjing') {\n                return hour;\n            } else if (meridiem === 'siyang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'enjing';\n            } else if (hours < 15) {\n                return 'siyang';\n            } else if (hours < 19) {\n                return 'sonten';\n            } else {\n                return 'ndalu';\n            }\n        },\n        calendar: {\n            sameDay: '[Dinten puniko pukul] LT',\n            nextDay: '[Mbenjang pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kala wingi pukul] LT',\n            lastWeek: 'dddd [kepengker pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'wonten ing %s',\n            past: '%s ingkang kepengker',\n            s: 'sawetawis detik',\n            ss: '%d detik',\n            m: 'setunggal menit',\n            mm: '%d menit',\n            h: 'setunggal jam',\n            hh: '%d jam',\n            d: 'sedinten',\n            dd: '%d dinten',\n            M: 'sewulan',\n            MM: '%d wulan',\n            y: 'setaun',\n            yy: '%d taun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ka = moment.defineLocale('ka', {\n        months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n            '_'\n        ),\n        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n        weekdays: {\n            standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n                '_'\n            ),\n            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n                '_'\n            ),\n            isFormat: /(წინა|შემდეგ)/,\n        },\n        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[დღეს] LT[-ზე]',\n            nextDay: '[ხვალ] LT[-ზე]',\n            lastDay: '[გუშინ] LT[-ზე]',\n            nextWeek: '[შემდეგ] dddd LT[-ზე]',\n            lastWeek: '[წინა] dddd LT-ზე',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (\n                    $0,\n                    $1,\n                    $2\n                ) {\n                    return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n                });\n            },\n            past: function (s) {\n                if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n                    return s.replace(/(ი|ე)$/, 'ის წინ');\n                }\n                if (/წელი/.test(s)) {\n                    return s.replace(/წელი$/, 'წლის წინ');\n                }\n                return s;\n            },\n            s: 'რამდენიმე წამი',\n            ss: '%d წამი',\n            m: 'წუთი',\n            mm: '%d წუთი',\n            h: 'საათი',\n            hh: '%d საათი',\n            d: 'დღე',\n            dd: '%d დღე',\n            M: 'თვე',\n            MM: '%d თვე',\n            y: 'წელი',\n            yy: '%d წელი',\n        },\n        dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n        ordinal: function (number) {\n            if (number === 0) {\n                return number;\n            }\n            if (number === 1) {\n                return number + '-ლი';\n            }\n            if (\n                number < 20 ||\n                (number <= 100 && number % 20 === 0) ||\n                number % 100 === 0\n            ) {\n                return 'მე-' + number;\n            }\n            return number + '-ე';\n        },\n        week: {\n            dow: 1,\n            doy: 7,\n        },\n    });\n\n    return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ші',\n        1: '-ші',\n        2: '-ші',\n        3: '-ші',\n        4: '-ші',\n        5: '-ші',\n        6: '-шы',\n        7: '-ші',\n        8: '-ші',\n        9: '-шы',\n        10: '-шы',\n        20: '-шы',\n        30: '-шы',\n        40: '-шы',\n        50: '-ші',\n        60: '-шы',\n        70: '-ші',\n        80: '-ші',\n        90: '-шы',\n        100: '-ші',\n    };\n\n    var kk = moment.defineLocale('kk', {\n        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n            '_'\n        ),\n        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n            '_'\n        ),\n        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгін сағат] LT',\n            nextDay: '[Ертең сағат] LT',\n            nextWeek: 'dddd [сағат] LT',\n            lastDay: '[Кеше сағат] LT',\n            lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ішінде',\n            past: '%s бұрын',\n            s: 'бірнеше секунд',\n            ss: '%d секунд',\n            m: 'бір минут',\n            mm: '%d минут',\n            h: 'бір сағат',\n            hh: '%d сағат',\n            d: 'бір күн',\n            dd: '%d күн',\n            M: 'бір ай',\n            MM: '%d ай',\n            y: 'бір жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '១',\n            2: '២',\n            3: '៣',\n            4: '៤',\n            5: '៥',\n            6: '៦',\n            7: '៧',\n            8: '៨',\n            9: '៩',\n            0: '០',\n        },\n        numberMap = {\n            '១': '1',\n            '២': '2',\n            '៣': '3',\n            '៤': '4',\n            '៥': '5',\n            '៦': '6',\n            '៧': '7',\n            '៨': '8',\n            '៩': '9',\n            '០': '0',\n        };\n\n    var km = moment.defineLocale('km', {\n        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n            '_'\n        ),\n        monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n            '_'\n        ),\n        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ព្រឹក|ល្ងាច/,\n        isPM: function (input) {\n            return input === 'ល្ងាច';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ព្រឹក';\n            } else {\n                return 'ល្ងាច';\n            }\n        },\n        calendar: {\n            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n            nextDay: '[ស្អែក ម៉ោង] LT',\n            nextWeek: 'dddd [ម៉ោង] LT',\n            lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sទៀត',\n            past: '%sមុន',\n            s: 'ប៉ុន្មានវិនាទី',\n            ss: '%d វិនាទី',\n            m: 'មួយនាទី',\n            mm: '%d នាទី',\n            h: 'មួយម៉ោង',\n            hh: '%d ម៉ោង',\n            d: 'មួយថ្ងៃ',\n            dd: '%d ថ្ងៃ',\n            M: 'មួយខែ',\n            MM: '%d ខែ',\n            y: 'មួយឆ្នាំ',\n            yy: '%d ឆ្នាំ',\n        },\n        dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n        ordinal: 'ទី%d',\n        preparse: function (string) {\n            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '೧',\n            2: '೨',\n            3: '೩',\n            4: '೪',\n            5: '೫',\n            6: '೬',\n            7: '೭',\n            8: '೮',\n            9: '೯',\n            0: '೦',\n        },\n        numberMap = {\n            '೧': '1',\n            '೨': '2',\n            '೩': '3',\n            '೪': '4',\n            '೫': '5',\n            '೬': '6',\n            '೭': '7',\n            '೮': '8',\n            '೯': '9',\n            '೦': '0',\n        };\n\n    var kn = moment.defineLocale('kn', {\n        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n            '_'\n        ),\n        monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[ಇಂದು] LT',\n            nextDay: '[ನಾಳೆ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ನಿನ್ನೆ] LT',\n            lastWeek: '[ಕೊನೆಯ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ನಂತರ',\n            past: '%s ಹಿಂದೆ',\n            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n            ss: '%d ಸೆಕೆಂಡುಗಳು',\n            m: 'ಒಂದು ನಿಮಿಷ',\n            mm: '%d ನಿಮಿಷ',\n            h: 'ಒಂದು ಗಂಟೆ',\n            hh: '%d ಗಂಟೆ',\n            d: 'ಒಂದು ದಿನ',\n            dd: '%d ದಿನ',\n            M: 'ಒಂದು ತಿಂಗಳು',\n            MM: '%d ತಿಂಗಳು',\n            y: 'ಒಂದು ವರ್ಷ',\n            yy: '%d ವರ್ಷ',\n        },\n        preparse: function (string) {\n            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ರಾತ್ರಿ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n                return hour;\n            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ಸಂಜೆ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ರಾತ್ರಿ';\n            } else if (hour < 10) {\n                return 'ಬೆಳಿಗ್ಗೆ';\n            } else if (hour < 17) {\n                return 'ಮಧ್ಯಾಹ್ನ';\n            } else if (hour < 20) {\n                return 'ಸಂಜೆ';\n            } else {\n                return 'ರಾತ್ರಿ';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n        ordinal: function (number) {\n            return number + 'ನೇ';\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return kn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ko = moment.defineLocale('ko', {\n        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n            '_'\n        ),\n        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY년 MMMM D일',\n            LLL: 'YYYY년 MMMM D일 A h:mm',\n            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n            l: 'YYYY.MM.DD.',\n            ll: 'YYYY년 MMMM D일',\n            lll: 'YYYY년 MMMM D일 A h:mm',\n            llll: 'YYYY년 MMMM D일 dddd A h:mm',\n        },\n        calendar: {\n            sameDay: '오늘 LT',\n            nextDay: '내일 LT',\n            nextWeek: 'dddd LT',\n            lastDay: '어제 LT',\n            lastWeek: '지난주 dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s 후',\n            past: '%s 전',\n            s: '몇 초',\n            ss: '%d초',\n            m: '1분',\n            mm: '%d분',\n            h: '한 시간',\n            hh: '%d시간',\n            d: '하루',\n            dd: '%d일',\n            M: '한 달',\n            MM: '%d달',\n            y: '일 년',\n            yy: '%d년',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '일';\n                case 'M':\n                    return number + '월';\n                case 'w':\n                case 'W':\n                    return number + '주';\n                default:\n                    return number;\n            }\n        },\n        meridiemParse: /오전|오후/,\n        isPM: function (token) {\n            return token === '오후';\n        },\n        meridiem: function (hour, minute, isUpper) {\n            return hour < 12 ? '오전' : '오후';\n        },\n    });\n\n    return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        months = [\n            'کانونی دووەم',\n            'شوبات',\n            'ئازار',\n            'نیسان',\n            'ئایار',\n            'حوزەیران',\n            'تەمموز',\n            'ئاب',\n            'ئەیلوول',\n            'تشرینی یەكەم',\n            'تشرینی دووەم',\n            'كانونی یەکەم',\n        ];\n\n    var ku = moment.defineLocale('ku', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n            '_'\n        ),\n        weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split(\n            '_'\n        ),\n        weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ئێواره‌|به‌یانی/,\n        isPM: function (input) {\n            return /ئێواره‌/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'به‌یانی';\n            } else {\n                return 'ئێواره‌';\n            }\n        },\n        calendar: {\n            sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n            nextDay: '[به‌یانی كاتژمێر] LT',\n            nextWeek: 'dddd [كاتژمێر] LT',\n            lastDay: '[دوێنێ كاتژمێر] LT',\n            lastWeek: 'dddd [كاتژمێر] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'له‌ %s',\n            past: '%s',\n            s: 'چه‌ند چركه‌یه‌ك',\n            ss: 'چركه‌ %d',\n            m: 'یه‌ك خوله‌ك',\n            mm: '%d خوله‌ك',\n            h: 'یه‌ك كاتژمێر',\n            hh: '%d كاتژمێر',\n            d: 'یه‌ك ڕۆژ',\n            dd: '%d ڕۆژ',\n            M: 'یه‌ك مانگ',\n            MM: '%d مانگ',\n            y: 'یه‌ك ساڵ',\n            yy: '%d ساڵ',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ku;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-чү',\n        1: '-чи',\n        2: '-чи',\n        3: '-чү',\n        4: '-чү',\n        5: '-чи',\n        6: '-чы',\n        7: '-чи',\n        8: '-чи',\n        9: '-чу',\n        10: '-чу',\n        20: '-чы',\n        30: '-чу',\n        40: '-чы',\n        50: '-чү',\n        60: '-чы',\n        70: '-чи',\n        80: '-чи',\n        90: '-чу',\n        100: '-чү',\n    };\n\n    var ky = moment.defineLocale('ky', {\n        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n            '_'\n        ),\n        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n            '_'\n        ),\n        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгүн саат] LT',\n            nextDay: '[Эртең саат] LT',\n            nextWeek: 'dddd [саат] LT',\n            lastDay: '[Кечээ саат] LT',\n            lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ичинде',\n            past: '%s мурун',\n            s: 'бирнече секунд',\n            ss: '%d секунд',\n            m: 'бир мүнөт',\n            mm: '%d мүнөт',\n            h: 'бир саат',\n            hh: '%d саат',\n            d: 'бир күн',\n            dd: '%d күн',\n            M: 'бир ай',\n            MM: '%d ай',\n            y: 'бир жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ky;\n\n})));\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eng Minutt', 'enger Minutt'],\n            h: ['eng Stonn', 'enger Stonn'],\n            d: ['een Dag', 'engem Dag'],\n            M: ['ee Mount', 'engem Mount'],\n            y: ['ee Joer', 'engem Joer'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    function processFutureTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'a ' + string;\n        }\n        return 'an ' + string;\n    }\n    function processPastTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'viru ' + string;\n        }\n        return 'virun ' + string;\n    }\n    /**\n     * Returns true if the word before the given number loses the '-n' ending.\n     * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n     *\n     * @param number {integer}\n     * @returns {boolean}\n     */\n    function eifelerRegelAppliesToNumber(number) {\n        number = parseInt(number, 10);\n        if (isNaN(number)) {\n            return false;\n        }\n        if (number < 0) {\n            // Negative Number --> always true\n            return true;\n        } else if (number < 10) {\n            // Only 1 digit\n            if (4 <= number && number <= 7) {\n                return true;\n            }\n            return false;\n        } else if (number < 100) {\n            // 2 digits\n            var lastDigit = number % 10,\n                firstDigit = number / 10;\n            if (lastDigit === 0) {\n                return eifelerRegelAppliesToNumber(firstDigit);\n            }\n            return eifelerRegelAppliesToNumber(lastDigit);\n        } else if (number < 10000) {\n            // 3 or 4 digits --> recursively check first digit\n            while (number >= 10) {\n                number = number / 10;\n            }\n            return eifelerRegelAppliesToNumber(number);\n        } else {\n            // Anything larger than 4 digits: recursively check first n-3 digits\n            number = number / 1000;\n            return eifelerRegelAppliesToNumber(number);\n        }\n    }\n\n    var lb = moment.defineLocale('lb', {\n        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n            '_'\n        ),\n        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm [Auer]',\n            LTS: 'H:mm:ss [Auer]',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm [Auer]',\n            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n        },\n        calendar: {\n            sameDay: '[Haut um] LT',\n            sameElse: 'L',\n            nextDay: '[Muer um] LT',\n            nextWeek: 'dddd [um] LT',\n            lastDay: '[Gëschter um] LT',\n            lastWeek: function () {\n                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n                switch (this.day()) {\n                    case 2:\n                    case 4:\n                        return '[Leschten] dddd [um] LT';\n                    default:\n                        return '[Leschte] dddd [um] LT';\n                }\n            },\n        },\n        relativeTime: {\n            future: processFutureTime,\n            past: processPastTime,\n            s: 'e puer Sekonnen',\n            ss: '%d Sekonnen',\n            m: processRelativeTime,\n            mm: '%d Minutten',\n            h: processRelativeTime,\n            hh: '%d Stonnen',\n            d: processRelativeTime,\n            dd: '%d Deeg',\n            M: processRelativeTime,\n            MM: '%d Méint',\n            y: processRelativeTime,\n            yy: '%d Joer',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var lo = moment.defineLocale('lo', {\n        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n            '_'\n        ),\n        monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n            '_'\n        ),\n        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n        isPM: function (input) {\n            return input === 'ຕອນແລງ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ຕອນເຊົ້າ';\n            } else {\n                return 'ຕອນແລງ';\n            }\n        },\n        calendar: {\n            sameDay: '[ມື້ນີ້ເວລາ] LT',\n            nextDay: '[ມື້ອື່ນເວລາ] LT',\n            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n            lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ອີກ %s',\n            past: '%sຜ່ານມາ',\n            s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n            ss: '%d ວິນາທີ',\n            m: '1 ນາທີ',\n            mm: '%d ນາທີ',\n            h: '1 ຊົ່ວໂມງ',\n            hh: '%d ຊົ່ວໂມງ',\n            d: '1 ມື້',\n            dd: '%d ມື້',\n            M: '1 ເດືອນ',\n            MM: '%d ເດືອນ',\n            y: '1 ປີ',\n            yy: '%d ປີ',\n        },\n        dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n        ordinal: function (number) {\n            return 'ທີ່' + number;\n        },\n    });\n\n    return lo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundė_sekundžių_sekundes',\n        m: 'minutė_minutės_minutę',\n        mm: 'minutės_minučių_minutes',\n        h: 'valanda_valandos_valandą',\n        hh: 'valandos_valandų_valandas',\n        d: 'diena_dienos_dieną',\n        dd: 'dienos_dienų_dienas',\n        M: 'mėnuo_mėnesio_mėnesį',\n        MM: 'mėnesiai_mėnesių_mėnesius',\n        y: 'metai_metų_metus',\n        yy: 'metai_metų_metus',\n    };\n    function translateSeconds(number, withoutSuffix, key, isFuture) {\n        if (withoutSuffix) {\n            return 'kelios sekundės';\n        } else {\n            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n        }\n    }\n    function translateSingular(number, withoutSuffix, key, isFuture) {\n        return withoutSuffix\n            ? forms(key)[0]\n            : isFuture\n            ? forms(key)[1]\n            : forms(key)[2];\n    }\n    function special(number) {\n        return number % 10 === 0 || (number > 10 && number < 20);\n    }\n    function forms(key) {\n        return units[key].split('_');\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        if (number === 1) {\n            return (\n                result + translateSingular(number, withoutSuffix, key[0], isFuture)\n            );\n        } else if (withoutSuffix) {\n            return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n        } else {\n            if (isFuture) {\n                return result + forms(key)[1];\n            } else {\n                return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n            }\n        }\n    }\n    var lt = moment.defineLocale('lt', {\n        months: {\n            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n                '_'\n            ),\n            standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n        },\n        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n        weekdays: {\n            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n                '_'\n            ),\n            standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n                '_'\n            ),\n            isFormat: /dddd HH:mm/,\n        },\n        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY [m.] MMMM D [d.]',\n            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n            l: 'YYYY-MM-DD',\n            ll: 'YYYY [m.] MMMM D [d.]',\n            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n        },\n        calendar: {\n            sameDay: '[Šiandien] LT',\n            nextDay: '[Rytoj] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[Vakar] LT',\n            lastWeek: '[Praėjusį] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'po %s',\n            past: 'prieš %s',\n            s: translateSeconds,\n            ss: translate,\n            m: translateSingular,\n            mm: translate,\n            h: translateSingular,\n            hh: translate,\n            d: translateSingular,\n            dd: translate,\n            M: translateSingular,\n            MM: translate,\n            y: translateSingular,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n        ordinal: function (number) {\n            return number + '-oji';\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n        m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        h: 'stundas_stundām_stunda_stundas'.split('_'),\n        hh: 'stundas_stundām_stunda_stundas'.split('_'),\n        d: 'dienas_dienām_diena_dienas'.split('_'),\n        dd: 'dienas_dienām_diena_dienas'.split('_'),\n        M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        y: 'gada_gadiem_gads_gadi'.split('_'),\n        yy: 'gada_gadiem_gads_gadi'.split('_'),\n    };\n    /**\n     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n     */\n    function format(forms, number, withoutSuffix) {\n        if (withoutSuffix) {\n            // E.g. \"21 minūte\", \"3 minūtes\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n        } else {\n            // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n            // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n        }\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        return number + ' ' + format(units[key], number, withoutSuffix);\n    }\n    function relativeTimeWithSingular(number, withoutSuffix, key) {\n        return format(units[key], number, withoutSuffix);\n    }\n    function relativeSeconds(number, withoutSuffix) {\n        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n    }\n\n    var lv = moment.defineLocale('lv', {\n        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY.',\n            LL: 'YYYY. [gada] D. MMMM',\n            LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n        },\n        calendar: {\n            sameDay: '[Šodien pulksten] LT',\n            nextDay: '[Rīt pulksten] LT',\n            nextWeek: 'dddd [pulksten] LT',\n            lastDay: '[Vakar pulksten] LT',\n            lastWeek: '[Pagājušā] dddd [pulksten] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'pēc %s',\n            past: 'pirms %s',\n            s: relativeSeconds,\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithSingular,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithSingular,\n            hh: relativeTimeWithPlural,\n            d: relativeTimeWithSingular,\n            dd: relativeTimeWithPlural,\n            M: relativeTimeWithSingular,\n            MM: relativeTimeWithPlural,\n            y: relativeTimeWithSingular,\n            yy: relativeTimeWithPlural,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekund', 'sekunda', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mjesec', 'mjeseca', 'mjeseci'],\n            yy: ['godina', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                ? wordKey[1]\n                : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var me = moment.defineLocale('me', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sjutra u] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedjelje] [u] LT',\n                    '[prošlog] [ponedjeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srijede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'dan',\n            dd: translator.translate,\n            M: 'mjesec',\n            MM: translator.translate,\n            y: 'godinu',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return me;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mi = moment.defineLocale('mi', {\n        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n            '_'\n        ),\n        monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n            '_'\n        ),\n        monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [i] HH:mm',\n            LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i teie mahana, i] LT',\n            nextDay: '[apopo i] LT',\n            nextWeek: 'dddd [i] LT',\n            lastDay: '[inanahi i] LT',\n            lastWeek: 'dddd [whakamutunga i] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i roto i %s',\n            past: '%s i mua',\n            s: 'te hēkona ruarua',\n            ss: '%d hēkona',\n            m: 'he meneti',\n            mm: '%d meneti',\n            h: 'te haora',\n            hh: '%d haora',\n            d: 'he ra',\n            dd: '%d ra',\n            M: 'he marama',\n            MM: '%d marama',\n            y: 'he tau',\n            yy: '%d tau',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mk = moment.defineLocale('mk', {\n        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Денес во] LT',\n            nextDay: '[Утре во] LT',\n            nextWeek: '[Во] dddd [во] LT',\n            lastDay: '[Вчера во] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Изминатата] dddd [во] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Изминатиот] dddd [во] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пред %s',\n            s: 'неколку секунди',\n            ss: '%d секунди',\n            m: 'една минута',\n            mm: '%d минути',\n            h: 'еден час',\n            hh: '%d часа',\n            d: 'еден ден',\n            dd: '%d дена',\n            M: 'еден месец',\n            MM: '%d месеци',\n            y: 'една година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return mk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ml = moment.defineLocale('ml', {\n        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n            '_'\n        ),\n        monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n            '_'\n        ),\n        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm -നു',\n            LTS: 'A h:mm:ss -നു',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm -നു',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n        },\n        calendar: {\n            sameDay: '[ഇന്ന്] LT',\n            nextDay: '[നാളെ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ഇന്നലെ] LT',\n            lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s കഴിഞ്ഞ്',\n            past: '%s മുൻപ്',\n            s: 'അൽപ നിമിഷങ്ങൾ',\n            ss: '%d സെക്കൻഡ്',\n            m: 'ഒരു മിനിറ്റ്',\n            mm: '%d മിനിറ്റ്',\n            h: 'ഒരു മണിക്കൂർ',\n            hh: '%d മണിക്കൂർ',\n            d: 'ഒരു ദിവസം',\n            dd: '%d ദിവസം',\n            M: 'ഒരു മാസം',\n            MM: '%d മാസം',\n            y: 'ഒരു വർഷം',\n            yy: '%d വർഷം',\n        },\n        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'രാത്രി' && hour >= 4) ||\n                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                meridiem === 'വൈകുന്നേരം'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'രാത്രി';\n            } else if (hour < 12) {\n                return 'രാവിലെ';\n            } else if (hour < 17) {\n                return 'ഉച്ച കഴിഞ്ഞ്';\n            } else if (hour < 20) {\n                return 'വൈകുന്നേരം';\n            } else {\n                return 'രാത്രി';\n            }\n        },\n    });\n\n    return ml;\n\n})));\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 's':\n                return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n            case 'ss':\n                return number + (withoutSuffix ? ' секунд' : ' секундын');\n            case 'm':\n            case 'mm':\n                return number + (withoutSuffix ? ' минут' : ' минутын');\n            case 'h':\n            case 'hh':\n                return number + (withoutSuffix ? ' цаг' : ' цагийн');\n            case 'd':\n            case 'dd':\n                return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n            case 'M':\n            case 'MM':\n                return number + (withoutSuffix ? ' сар' : ' сарын');\n            case 'y':\n            case 'yy':\n                return number + (withoutSuffix ? ' жил' : ' жилийн');\n            default:\n                return number;\n        }\n    }\n\n    var mn = moment.defineLocale('mn', {\n        months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n            '_'\n        ),\n        monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n        weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n        weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY оны MMMMын D',\n            LLL: 'YYYY оны MMMMын D HH:mm',\n            LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n        },\n        meridiemParse: /ҮӨ|ҮХ/i,\n        isPM: function (input) {\n            return input === 'ҮХ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ҮӨ';\n            } else {\n                return 'ҮХ';\n            }\n        },\n        calendar: {\n            sameDay: '[Өнөөдөр] LT',\n            nextDay: '[Маргааш] LT',\n            nextWeek: '[Ирэх] dddd LT',\n            lastDay: '[Өчигдөр] LT',\n            lastWeek: '[Өнгөрсөн] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s дараа',\n            past: '%s өмнө',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + ' өдөр';\n                default:\n                    return number;\n            }\n        },\n    });\n\n    return mn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n        var output = '';\n        if (withoutSuffix) {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंद';\n                    break;\n                case 'ss':\n                    output = '%d सेकंद';\n                    break;\n                case 'm':\n                    output = 'एक मिनिट';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटे';\n                    break;\n                case 'h':\n                    output = 'एक तास';\n                    break;\n                case 'hh':\n                    output = '%d तास';\n                    break;\n                case 'd':\n                    output = 'एक दिवस';\n                    break;\n                case 'dd':\n                    output = '%d दिवस';\n                    break;\n                case 'M':\n                    output = 'एक महिना';\n                    break;\n                case 'MM':\n                    output = '%d महिने';\n                    break;\n                case 'y':\n                    output = 'एक वर्ष';\n                    break;\n                case 'yy':\n                    output = '%d वर्षे';\n                    break;\n            }\n        } else {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंदां';\n                    break;\n                case 'ss':\n                    output = '%d सेकंदां';\n                    break;\n                case 'm':\n                    output = 'एका मिनिटा';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटां';\n                    break;\n                case 'h':\n                    output = 'एका तासा';\n                    break;\n                case 'hh':\n                    output = '%d तासां';\n                    break;\n                case 'd':\n                    output = 'एका दिवसा';\n                    break;\n                case 'dd':\n                    output = '%d दिवसां';\n                    break;\n                case 'M':\n                    output = 'एका महिन्या';\n                    break;\n                case 'MM':\n                    output = '%d महिन्यां';\n                    break;\n                case 'y':\n                    output = 'एका वर्षा';\n                    break;\n                case 'yy':\n                    output = '%d वर्षां';\n                    break;\n            }\n        }\n        return output.replace(/%d/i, number);\n    }\n\n    var mr = moment.defineLocale('mr', {\n        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n            '_'\n        ),\n        monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm वाजता',\n            LTS: 'A h:mm:ss वाजता',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm वाजता',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[उद्या] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[मागील] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमध्ये',\n            past: '%sपूर्वी',\n            s: relativeTimeMr,\n            ss: relativeTimeMr,\n            m: relativeTimeMr,\n            mm: relativeTimeMr,\n            h: relativeTimeMr,\n            hh: relativeTimeMr,\n            d: relativeTimeMr,\n            dd: relativeTimeMr,\n            M: relativeTimeMr,\n            MM: relativeTimeMr,\n            y: relativeTimeMr,\n            yy: relativeTimeMr,\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n                return hour;\n            } else if (\n                meridiem === 'दुपारी' ||\n                meridiem === 'सायंकाळी' ||\n                meridiem === 'रात्री'\n            ) {\n                return hour >= 12 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour >= 0 && hour < 6) {\n                return 'पहाटे';\n            } else if (hour < 12) {\n                return 'सकाळी';\n            } else if (hour < 17) {\n                return 'दुपारी';\n            } else if (hour < 20) {\n                return 'सायंकाळी';\n            } else {\n                return 'रात्री';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ms = moment.defineLocale('ms', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ms;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var msMy = moment.defineLocale('ms-my', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return msMy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mt = moment.defineLocale('mt', {\n        months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n        weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n            '_'\n        ),\n        weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n        weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Illum fil-]LT',\n            nextDay: '[Għada fil-]LT',\n            nextWeek: 'dddd [fil-]LT',\n            lastDay: '[Il-bieraħ fil-]LT',\n            lastWeek: 'dddd [li għadda] [fil-]LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'f’ %s',\n            past: '%s ilu',\n            s: 'ftit sekondi',\n            ss: '%d sekondi',\n            m: 'minuta',\n            mm: '%d minuti',\n            h: 'siegħa',\n            hh: '%d siegħat',\n            d: 'ġurnata',\n            dd: '%d ġranet',\n            M: 'xahar',\n            MM: '%d xhur',\n            y: 'sena',\n            yy: '%d sni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '၁',\n            2: '၂',\n            3: '၃',\n            4: '၄',\n            5: '၅',\n            6: '၆',\n            7: '၇',\n            8: '၈',\n            9: '၉',\n            0: '၀',\n        },\n        numberMap = {\n            '၁': '1',\n            '၂': '2',\n            '၃': '3',\n            '၄': '4',\n            '၅': '5',\n            '၆': '6',\n            '၇': '7',\n            '၈': '8',\n            '၉': '9',\n            '၀': '0',\n        };\n\n    var my = moment.defineLocale('my', {\n        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n            '_'\n        ),\n        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n            '_'\n        ),\n        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ယနေ.] LT [မှာ]',\n            nextDay: '[မနက်ဖြန်] LT [မှာ]',\n            nextWeek: 'dddd LT [မှာ]',\n            lastDay: '[မနေ.က] LT [မှာ]',\n            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'လာမည့် %s မှာ',\n            past: 'လွန်ခဲ့သော %s က',\n            s: 'စက္ကန်.အနည်းငယ်',\n            ss: '%d စက္ကန့်',\n            m: 'တစ်မိနစ်',\n            mm: '%d မိနစ်',\n            h: 'တစ်နာရီ',\n            hh: '%d နာရီ',\n            d: 'တစ်ရက်',\n            dd: '%d ရက်',\n            M: 'တစ်လ',\n            MM: '%d လ',\n            y: 'တစ်နှစ်',\n            yy: '%d နှစ်',\n        },\n        preparse: function (string) {\n            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return my;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nb = moment.defineLocale('nb', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[forrige] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'noen sekunder',\n            ss: '%d sekunder',\n            m: 'ett minutt',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dager',\n            w: 'en uke',\n            ww: '%d uker',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    var ne = moment.defineLocale('ne', {\n        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n            '_'\n        ),\n        monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n            '_'\n        ),\n        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'Aको h:mm बजे',\n            LTS: 'Aको h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, Aको h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राति') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'बिहान') {\n                return hour;\n            } else if (meridiem === 'दिउँसो') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'साँझ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 3) {\n                return 'राति';\n            } else if (hour < 12) {\n                return 'बिहान';\n            } else if (hour < 16) {\n                return 'दिउँसो';\n            } else if (hour < 20) {\n                return 'साँझ';\n            } else {\n                return 'राति';\n            }\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[भोलि] LT',\n            nextWeek: '[आउँदो] dddd[,] LT',\n            lastDay: '[हिजो] LT',\n            lastWeek: '[गएको] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमा',\n            past: '%s अगाडि',\n            s: 'केही क्षण',\n            ss: '%d सेकेण्ड',\n            m: 'एक मिनेट',\n            mm: '%d मिनेट',\n            h: 'एक घण्टा',\n            hh: '%d घण्टा',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महिना',\n            MM: '%d महिना',\n            y: 'एक बर्ष',\n            yy: '%d बर्ष',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(\n            '_'\n        ),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^maart|mrt.?$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nl = moment.defineLocale('nl', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            w: 'één week',\n            ww: '%d weken',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(\n            '_'\n        ),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^maart|mrt.?$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nlBe = moment.defineLocale('nl-be', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nlBe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nn = moment.defineLocale('nn', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n        weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n        weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[I dag klokka] LT',\n            nextDay: '[I morgon klokka] LT',\n            nextWeek: 'dddd [klokka] LT',\n            lastDay: '[I går klokka] LT',\n            lastWeek: '[Føregåande] dddd [klokka] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s sidan',\n            s: 'nokre sekund',\n            ss: '%d sekund',\n            m: 'eit minutt',\n            mm: '%d minutt',\n            h: 'ein time',\n            hh: '%d timar',\n            d: 'ein dag',\n            dd: '%d dagar',\n            w: 'ei veke',\n            ww: '%d veker',\n            M: 'ein månad',\n            MM: '%d månader',\n            y: 'eit år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ocLnc = moment.defineLocale('oc-lnc', {\n        months: {\n            standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n                '_'\n            ),\n            format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n            '_'\n        ),\n        weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: '[uèi a] LT',\n            nextDay: '[deman a] LT',\n            nextWeek: 'dddd [a] LT',\n            lastDay: '[ièr a] LT',\n            lastWeek: 'dddd [passat a] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'unas segondas',\n            ss: '%d segondas',\n            m: 'una minuta',\n            mm: '%d minutas',\n            h: 'una ora',\n            hh: '%d oras',\n            d: 'un jorn',\n            dd: '%d jorns',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                    ? 'n'\n                    : number === 3\n                    ? 'r'\n                    : number === 4\n                    ? 't'\n                    : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4,\n        },\n    });\n\n    return ocLnc;\n\n})));\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '੧',\n            2: '੨',\n            3: '੩',\n            4: '੪',\n            5: '੫',\n            6: '੬',\n            7: '੭',\n            8: '੮',\n            9: '੯',\n            0: '੦',\n        },\n        numberMap = {\n            '੧': '1',\n            '੨': '2',\n            '੩': '3',\n            '੪': '4',\n            '੫': '5',\n            '੬': '6',\n            '੭': '7',\n            '੮': '8',\n            '੯': '9',\n            '੦': '0',\n        };\n\n    var paIn = moment.defineLocale('pa-in', {\n        // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n            '_'\n        ),\n        monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n            '_'\n        ),\n        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm ਵਜੇ',\n            LTS: 'A h:mm:ss ਵਜੇ',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n        },\n        calendar: {\n            sameDay: '[ਅਜ] LT',\n            nextDay: '[ਕਲ] LT',\n            nextWeek: '[ਅਗਲਾ] dddd, LT',\n            lastDay: '[ਕਲ] LT',\n            lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ਵਿੱਚ',\n            past: '%s ਪਿਛਲੇ',\n            s: 'ਕੁਝ ਸਕਿੰਟ',\n            ss: '%d ਸਕਿੰਟ',\n            m: 'ਇਕ ਮਿੰਟ',\n            mm: '%d ਮਿੰਟ',\n            h: 'ਇੱਕ ਘੰਟਾ',\n            hh: '%d ਘੰਟੇ',\n            d: 'ਇੱਕ ਦਿਨ',\n            dd: '%d ਦਿਨ',\n            M: 'ਇੱਕ ਮਹੀਨਾ',\n            MM: '%d ਮਹੀਨੇ',\n            y: 'ਇੱਕ ਸਾਲ',\n            yy: '%d ਸਾਲ',\n        },\n        preparse: function (string) {\n            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ਰਾਤ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ਸਵੇਰ') {\n                return hour;\n            } else if (meridiem === 'ਦੁਪਹਿਰ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ਸ਼ਾਮ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ਰਾਤ';\n            } else if (hour < 10) {\n                return 'ਸਵੇਰ';\n            } else if (hour < 17) {\n                return 'ਦੁਪਹਿਰ';\n            } else if (hour < 20) {\n                return 'ਸ਼ਾਮ';\n            } else {\n                return 'ਰਾਤ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return paIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n            '_'\n        ),\n        monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n            '_'\n        ),\n        monthsParse = [\n            /^sty/i,\n            /^lut/i,\n            /^mar/i,\n            /^kwi/i,\n            /^maj/i,\n            /^cze/i,\n            /^lip/i,\n            /^sie/i,\n            /^wrz/i,\n            /^paź/i,\n            /^lis/i,\n            /^gru/i,\n        ];\n    function plural(n) {\n        return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n    }\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                return result + (plural(number) ? 'sekundy' : 'sekund');\n            case 'm':\n                return withoutSuffix ? 'minuta' : 'minutę';\n            case 'mm':\n                return result + (plural(number) ? 'minuty' : 'minut');\n            case 'h':\n                return withoutSuffix ? 'godzina' : 'godzinę';\n            case 'hh':\n                return result + (plural(number) ? 'godziny' : 'godzin');\n            case 'ww':\n                return result + (plural(number) ? 'tygodnie' : 'tygodni');\n            case 'MM':\n                return result + (plural(number) ? 'miesiące' : 'miesięcy');\n            case 'yy':\n                return result + (plural(number) ? 'lata' : 'lat');\n        }\n    }\n\n    var pl = moment.defineLocale('pl', {\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return monthsNominative;\n            } else if (/D MMMM/.test(format)) {\n                return monthsSubjective[momentToFormat.month()];\n            } else {\n                return monthsNominative[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Dziś o] LT',\n            nextDay: '[Jutro o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W niedzielę o] LT';\n\n                    case 2:\n                        return '[We wtorek o] LT';\n\n                    case 3:\n                        return '[W środę o] LT';\n\n                    case 6:\n                        return '[W sobotę o] LT';\n\n                    default:\n                        return '[W] dddd [o] LT';\n                }\n            },\n            lastDay: '[Wczoraj o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W zeszłą niedzielę o] LT';\n                    case 3:\n                        return '[W zeszłą środę o] LT';\n                    case 6:\n                        return '[W zeszłą sobotę o] LT';\n                    default:\n                        return '[W zeszły] dddd [o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: '%s temu',\n            s: 'kilka sekund',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: '1 dzień',\n            dd: '%d dni',\n            w: 'tydzień',\n            ww: translate,\n            M: 'miesiąc',\n            MM: translate,\n            y: 'rok',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pt = moment.defineLocale('pt', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            w: 'uma semana',\n            ww: '%d semanas',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ptBr = moment.defineLocale('pt-br', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n        weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'poucos segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        invalidDate: 'Data inválida',\n    });\n\n    return ptBr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n                ss: 'secunde',\n                mm: 'minute',\n                hh: 'ore',\n                dd: 'zile',\n                ww: 'săptămâni',\n                MM: 'luni',\n                yy: 'ani',\n            },\n            separator = ' ';\n        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n            separator = ' de ';\n        }\n        return number + separator + format[key];\n    }\n\n    var ro = moment.defineLocale('ro', {\n        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n            '_'\n        ),\n        monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[azi la] LT',\n            nextDay: '[mâine la] LT',\n            nextWeek: 'dddd [la] LT',\n            lastDay: '[ieri la] LT',\n            lastWeek: '[fosta] dddd [la] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'peste %s',\n            past: '%s în urmă',\n            s: 'câteva secunde',\n            ss: relativeTimeWithPlural,\n            m: 'un minut',\n            mm: relativeTimeWithPlural,\n            h: 'o oră',\n            hh: relativeTimeWithPlural,\n            d: 'o zi',\n            dd: relativeTimeWithPlural,\n            w: 'o săptămână',\n            ww: relativeTimeWithPlural,\n            M: 'o lună',\n            MM: relativeTimeWithPlural,\n            y: 'un an',\n            yy: relativeTimeWithPlural,\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ro;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوري',\n            'فيبروري',\n            'مارچ',\n            'اپريل',\n            'مئي',\n            'جون',\n            'جولاءِ',\n            'آگسٽ',\n            'سيپٽمبر',\n            'آڪٽوبر',\n            'نومبر',\n            'ڊسمبر',\n        ],\n        days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n    var sd = moment.defineLocale('sd', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[اڄ] LT',\n            nextDay: '[سڀاڻي] LT',\n            nextWeek: 'dddd [اڳين هفتي تي] LT',\n            lastDay: '[ڪالهه] LT',\n            lastWeek: '[گزريل هفتي] dddd [تي] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s پوء',\n            past: '%s اڳ',\n            s: 'چند سيڪنڊ',\n            ss: '%d سيڪنڊ',\n            m: 'هڪ منٽ',\n            mm: '%d منٽ',\n            h: 'هڪ ڪلاڪ',\n            hh: '%d ڪلاڪ',\n            d: 'هڪ ڏينهن',\n            dd: '%d ڏينهن',\n            M: 'هڪ مهينو',\n            MM: '%d مهينا',\n            y: 'هڪ سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var se = moment.defineLocale('se', {\n        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n            '_'\n        ),\n        monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(\n            '_'\n        ),\n        weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n            '_'\n        ),\n        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'MMMM D. [b.] YYYY',\n            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[otne ti] LT',\n            nextDay: '[ihttin ti] LT',\n            nextWeek: 'dddd [ti] LT',\n            lastDay: '[ikte ti] LT',\n            lastWeek: '[ovddit] dddd [ti] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s geažes',\n            past: 'maŋit %s',\n            s: 'moadde sekunddat',\n            ss: '%d sekunddat',\n            m: 'okta minuhta',\n            mm: '%d minuhtat',\n            h: 'okta diimmu',\n            hh: '%d diimmut',\n            d: 'okta beaivi',\n            dd: '%d beaivvit',\n            M: 'okta mánnu',\n            MM: '%d mánut',\n            y: 'okta jahki',\n            yy: '%d jagit',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    /*jshint -W100*/\n    var si = moment.defineLocale('si', {\n        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n            '_'\n        ),\n        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n            '_'\n        ),\n        weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n            '_'\n        ),\n        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'a h:mm',\n            LTS: 'a h:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY MMMM D',\n            LLL: 'YYYY MMMM D, a h:mm',\n            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n        },\n        calendar: {\n            sameDay: '[අද] LT[ට]',\n            nextDay: '[හෙට] LT[ට]',\n            nextWeek: 'dddd LT[ට]',\n            lastDay: '[ඊයේ] LT[ට]',\n            lastWeek: '[පසුගිය] dddd LT[ට]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sකින්',\n            past: '%sකට පෙර',\n            s: 'තත්පර කිහිපය',\n            ss: 'තත්පර %d',\n            m: 'මිනිත්තුව',\n            mm: 'මිනිත්තු %d',\n            h: 'පැය',\n            hh: 'පැය %d',\n            d: 'දිනය',\n            dd: 'දින %d',\n            M: 'මාසය',\n            MM: 'මාස %d',\n            y: 'වසර',\n            yy: 'වසර %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n        ordinal: function (number) {\n            return number + ' වැනි';\n        },\n        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n        isPM: function (input) {\n            return input === 'ප.ව.' || input === 'පස් වරු';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'ප.ව.' : 'පස් වරු';\n            } else {\n                return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n            }\n        },\n    });\n\n    return si;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n            '_'\n        ),\n        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n    function plural(n) {\n        return n > 1 && n < 5;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekúnd');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minúty' : 'minút');\n                } else {\n                    return result + 'minútami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodín');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'deň' : 'dňom';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dni' : 'dní');\n                } else {\n                    return result + 'dňami';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'mesiace' : 'mesiacov');\n                } else {\n                    return result + 'mesiacmi';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokom';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'rokov');\n                } else {\n                    return result + 'rokmi';\n                }\n        }\n    }\n\n    var sk = moment.defineLocale('sk', {\n        months: months,\n        monthsShort: monthsShort,\n        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[dnes o] LT',\n            nextDay: '[zajtra o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [o] LT';\n                    case 3:\n                        return '[v stredu o] LT';\n                    case 4:\n                        return '[vo štvrtok o] LT';\n                    case 5:\n                        return '[v piatok o] LT';\n                    case 6:\n                        return '[v sobotu o] LT';\n                }\n            },\n            lastDay: '[včera o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulú nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[minulý] dddd [o] LT';\n                    case 3:\n                        return '[minulú stredu o] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [o] LT';\n                    case 6:\n                        return '[minulú sobotu o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pred %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nekaj sekund'\n                    : 'nekaj sekundami';\n            case 'ss':\n                if (number === 1) {\n                    result += withoutSuffix ? 'sekundo' : 'sekundi';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n                } else {\n                    result += 'sekund';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'ena minuta' : 'eno minuto';\n            case 'mm':\n                if (number === 1) {\n                    result += withoutSuffix ? 'minuta' : 'minuto';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'ena ura' : 'eno uro';\n            case 'hh':\n                if (number === 1) {\n                    result += withoutSuffix ? 'ura' : 'uro';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'uri' : 'urama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'ure' : 'urami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'ur' : 'urami';\n                }\n                return result;\n            case 'd':\n                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n            case 'dd':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n                } else {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n                }\n                return result;\n            case 'M':\n                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n            case 'MM':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n                } else {\n                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n                }\n                return result;\n            case 'y':\n                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n            case 'yy':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'leto' : 'letom';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'leta' : 'leti';\n                } else {\n                    result += withoutSuffix || isFuture ? 'let' : 'leti';\n                }\n                return result;\n        }\n    }\n\n    var sl = moment.defineLocale('sl', {\n        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD. MM. YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danes ob] LT',\n            nextDay: '[jutri ob] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[v] [sredo] [ob] LT';\n                    case 6:\n                        return '[v] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[v] dddd [ob] LT';\n                }\n            },\n            lastDay: '[včeraj ob] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prejšnjo] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[prejšnjo] [sredo] [ob] LT';\n                    case 6:\n                        return '[prejšnjo] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prejšnji] dddd [ob] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'čez %s',\n            past: 'pred %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sq = moment.defineLocale('sq', {\n        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n            '_'\n        ),\n        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /PD|MD/,\n        isPM: function (input) {\n            return input.charAt(0) === 'M';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            return hours < 12 ? 'PD' : 'MD';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Sot në] LT',\n            nextDay: '[Nesër në] LT',\n            nextWeek: 'dddd [në] LT',\n            lastDay: '[Dje në] LT',\n            lastWeek: 'dddd [e kaluar në] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'në %s',\n            past: '%s më parë',\n            s: 'disa sekonda',\n            ss: '%d sekonda',\n            m: 'një minutë',\n            mm: '%d minuta',\n            h: 'një orë',\n            hh: '%d orë',\n            d: 'një ditë',\n            dd: '%d ditë',\n            M: 'një muaj',\n            MM: '%d muaj',\n            y: 'një vit',\n            yy: '%d vite',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekunda', 'sekunde', 'sekundi'],\n            m: ['jedan minut', 'jedne minute'],\n            mm: ['minut', 'minute', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mesec', 'meseca', 'meseci'],\n            yy: ['godina', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                ? wordKey[1]\n                : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var sr = moment.defineLocale('sr', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedelju] [u] LT';\n                    case 3:\n                        return '[u] [sredu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedelje] [u] LT',\n                    '[prošlog] [ponedeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pre %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'dan',\n            dd: translator.translate,\n            M: 'mesec',\n            MM: translator.translate,\n            y: 'godinu',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['секунда', 'секунде', 'секунди'],\n            m: ['један минут', 'једне минуте'],\n            mm: ['минут', 'минуте', 'минута'],\n            h: ['један сат', 'једног сата'],\n            hh: ['сат', 'сата', 'сати'],\n            dd: ['дан', 'дана', 'дана'],\n            MM: ['месец', 'месеца', 'месеци'],\n            yy: ['година', 'године', 'година'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                ? wordKey[1]\n                : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var srCyrl = moment.defineLocale('sr-cyrl', {\n        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n            '_'\n        ),\n        monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[данас у] LT',\n            nextDay: '[сутра у] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[у] [недељу] [у] LT';\n                    case 3:\n                        return '[у] [среду] [у] LT';\n                    case 6:\n                        return '[у] [суботу] [у] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[у] dddd [у] LT';\n                }\n            },\n            lastDay: '[јуче у] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[прошле] [недеље] [у] LT',\n                    '[прошлог] [понедељка] [у] LT',\n                    '[прошлог] [уторка] [у] LT',\n                    '[прошле] [среде] [у] LT',\n                    '[прошлог] [четвртка] [у] LT',\n                    '[прошлог] [петка] [у] LT',\n                    '[прошле] [суботе] [у] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пре %s',\n            s: 'неколико секунди',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'дан',\n            dd: translator.translate,\n            M: 'месец',\n            MM: translator.translate,\n            y: 'годину',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return srCyrl;\n\n})));\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ss = moment.defineLocale('ss', {\n        months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n            '_'\n        ),\n        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n        weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Namuhla nga] LT',\n            nextDay: '[Kusasa nga] LT',\n            nextWeek: 'dddd [nga] LT',\n            lastDay: '[Itolo nga] LT',\n            lastWeek: 'dddd [leliphelile] [nga] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'nga %s',\n            past: 'wenteka nga %s',\n            s: 'emizuzwana lomcane',\n            ss: '%d mzuzwana',\n            m: 'umzuzu',\n            mm: '%d emizuzu',\n            h: 'lihora',\n            hh: '%d emahora',\n            d: 'lilanga',\n            dd: '%d emalanga',\n            M: 'inyanga',\n            MM: '%d tinyanga',\n            y: 'umnyaka',\n            yy: '%d iminyaka',\n        },\n        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'ekuseni';\n            } else if (hours < 15) {\n                return 'emini';\n            } else if (hours < 19) {\n                return 'entsambama';\n            } else {\n                return 'ebusuku';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ekuseni') {\n                return hour;\n            } else if (meridiem === 'emini') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n                if (hour === 0) {\n                    return 0;\n                }\n                return hour + 12;\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: '%d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ss;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sv = moment.defineLocale('sv', {\n        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Idag] LT',\n            nextDay: '[Imorgon] LT',\n            lastDay: '[Igår] LT',\n            nextWeek: '[På] dddd LT',\n            lastWeek: '[I] dddd[s] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: 'för %s sedan',\n            s: 'några sekunder',\n            ss: '%d sekunder',\n            m: 'en minut',\n            mm: '%d minuter',\n            h: 'en timme',\n            hh: '%d timmar',\n            d: 'en dag',\n            dd: '%d dagar',\n            M: 'en månad',\n            MM: '%d månader',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? ':e'\n                        : b === 1\n                        ? ':a'\n                        : b === 2\n                        ? ':a'\n                        : b === 3\n                        ? ':e'\n                        : ':e';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sw = moment.defineLocale('sw', {\n        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n            '_'\n        ),\n        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'hh:mm A',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[leo saa] LT',\n            nextDay: '[kesho saa] LT',\n            nextWeek: '[wiki ijayo] dddd [saat] LT',\n            lastDay: '[jana] LT',\n            lastWeek: '[wiki iliyopita] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s baadaye',\n            past: 'tokea %s',\n            s: 'hivi punde',\n            ss: 'sekunde %d',\n            m: 'dakika moja',\n            mm: 'dakika %d',\n            h: 'saa limoja',\n            hh: 'masaa %d',\n            d: 'siku moja',\n            dd: 'siku %d',\n            M: 'mwezi mmoja',\n            MM: 'miezi %d',\n            y: 'mwaka mmoja',\n            yy: 'miaka %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '௧',\n            2: '௨',\n            3: '௩',\n            4: '௪',\n            5: '௫',\n            6: '௬',\n            7: '௭',\n            8: '௮',\n            9: '௯',\n            0: '௦',\n        },\n        numberMap = {\n            '௧': '1',\n            '௨': '2',\n            '௩': '3',\n            '௪': '4',\n            '௫': '5',\n            '௬': '6',\n            '௭': '7',\n            '௮': '8',\n            '௯': '9',\n            '௦': '0',\n        };\n\n    var ta = moment.defineLocale('ta', {\n        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n            '_'\n        ),\n        monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n            '_'\n        ),\n        weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n            '_'\n        ),\n        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n            '_'\n        ),\n        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, HH:mm',\n            LLLL: 'dddd, D MMMM YYYY, HH:mm',\n        },\n        calendar: {\n            sameDay: '[இன்று] LT',\n            nextDay: '[நாளை] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[நேற்று] LT',\n            lastWeek: '[கடந்த வாரம்] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s இல்',\n            past: '%s முன்',\n            s: 'ஒரு சில விநாடிகள்',\n            ss: '%d விநாடிகள்',\n            m: 'ஒரு நிமிடம்',\n            mm: '%d நிமிடங்கள்',\n            h: 'ஒரு மணி நேரம்',\n            hh: '%d மணி நேரம்',\n            d: 'ஒரு நாள்',\n            dd: '%d நாட்கள்',\n            M: 'ஒரு மாதம்',\n            MM: '%d மாதங்கள்',\n            y: 'ஒரு வருடம்',\n            yy: '%d ஆண்டுகள்',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n        ordinal: function (number) {\n            return number + 'வது';\n        },\n        preparse: function (string) {\n            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // refer http://ta.wikipedia.org/s/1er1\n        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 2) {\n                return ' யாமம்';\n            } else if (hour < 6) {\n                return ' வைகறை'; // வைகறை\n            } else if (hour < 10) {\n                return ' காலை'; // காலை\n            } else if (hour < 14) {\n                return ' நண்பகல்'; // நண்பகல்\n            } else if (hour < 18) {\n                return ' எற்பாடு'; // எற்பாடு\n            } else if (hour < 22) {\n                return ' மாலை'; // மாலை\n            } else {\n                return ' யாமம்';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'யாமம்') {\n                return hour < 2 ? hour : hour + 12;\n            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n                return hour;\n            } else if (meridiem === 'நண்பகல்') {\n                return hour >= 10 ? hour : hour + 12;\n            } else {\n                return hour + 12;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ta;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var te = moment.defineLocale('te', {\n        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n            '_'\n        ),\n        monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n            '_'\n        ),\n        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[నేడు] LT',\n            nextDay: '[రేపు] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[నిన్న] LT',\n            lastWeek: '[గత] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s లో',\n            past: '%s క్రితం',\n            s: 'కొన్ని క్షణాలు',\n            ss: '%d సెకన్లు',\n            m: 'ఒక నిమిషం',\n            mm: '%d నిమిషాలు',\n            h: 'ఒక గంట',\n            hh: '%d గంటలు',\n            d: 'ఒక రోజు',\n            dd: '%d రోజులు',\n            M: 'ఒక నెల',\n            MM: '%d నెలలు',\n            y: 'ఒక సంవత్సరం',\n            yy: '%d సంవత్సరాలు',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n        ordinal: '%dవ',\n        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'రాత్రి') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ఉదయం') {\n                return hour;\n            } else if (meridiem === 'మధ్యాహ్నం') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'సాయంత్రం') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'రాత్రి';\n            } else if (hour < 10) {\n                return 'ఉదయం';\n            } else if (hour < 17) {\n                return 'మధ్యాహ్నం';\n            } else if (hour < 20) {\n                return 'సాయంత్రం';\n            } else {\n                return 'రాత్రి';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return te;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tet = moment.defineLocale('tet', {\n        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Ohin iha] LT',\n            nextDay: '[Aban iha] LT',\n            nextWeek: 'dddd [iha] LT',\n            lastDay: '[Horiseik iha] LT',\n            lastWeek: 'dddd [semana kotuk] [iha] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'iha %s',\n            past: '%s liuba',\n            s: 'segundu balun',\n            ss: 'segundu %d',\n            m: 'minutu ida',\n            mm: 'minutu %d',\n            h: 'oras ida',\n            hh: 'oras %d',\n            d: 'loron ida',\n            dd: 'loron %d',\n            M: 'fulan ida',\n            MM: 'fulan %d',\n            y: 'tinan ida',\n            yy: 'tinan %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tet;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ум',\n        1: '-ум',\n        2: '-юм',\n        3: '-юм',\n        4: '-ум',\n        5: '-ум',\n        6: '-ум',\n        7: '-ум',\n        8: '-ум',\n        9: '-ум',\n        10: '-ум',\n        12: '-ум',\n        13: '-ум',\n        20: '-ум',\n        30: '-юм',\n        40: '-ум',\n        50: '-ум',\n        60: '-ум',\n        70: '-ум',\n        80: '-ум',\n        90: '-ум',\n        100: '-ум',\n    };\n\n    var tg = moment.defineLocale('tg', {\n        months: {\n            format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n                '_'\n            ),\n            standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n            '_'\n        ),\n        weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n        weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Имрӯз соати] LT',\n            nextDay: '[Фардо соати] LT',\n            lastDay: '[Дирӯз соати] LT',\n            nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n            lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'баъди %s',\n            past: '%s пеш',\n            s: 'якчанд сония',\n            m: 'як дақиқа',\n            mm: '%d дақиқа',\n            h: 'як соат',\n            hh: '%d соат',\n            d: 'як рӯз',\n            dd: '%d рӯз',\n            M: 'як моҳ',\n            MM: '%d моҳ',\n            y: 'як сол',\n            yy: '%d сол',\n        },\n        meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'шаб') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'субҳ') {\n                return hour;\n            } else if (meridiem === 'рӯз') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'бегоҳ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'шаб';\n            } else if (hour < 11) {\n                return 'субҳ';\n            } else if (hour < 16) {\n                return 'рӯз';\n            } else if (hour < 19) {\n                return 'бегоҳ';\n            } else {\n                return 'шаб';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1th is the first week of the year.\n        },\n    });\n\n    return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var th = moment.defineLocale('th', {\n        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n            '_'\n        ),\n        monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY เวลา H:mm',\n            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n        },\n        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n        isPM: function (input) {\n            return input === 'หลังเที่ยง';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ก่อนเที่ยง';\n            } else {\n                return 'หลังเที่ยง';\n            }\n        },\n        calendar: {\n            sameDay: '[วันนี้ เวลา] LT',\n            nextDay: '[พรุ่งนี้ เวลา] LT',\n            nextWeek: 'dddd[หน้า เวลา] LT',\n            lastDay: '[เมื่อวานนี้ เวลา] LT',\n            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'อีก %s',\n            past: '%sที่แล้ว',\n            s: 'ไม่กี่วินาที',\n            ss: '%d วินาที',\n            m: '1 นาที',\n            mm: '%d นาที',\n            h: '1 ชั่วโมง',\n            hh: '%d ชั่วโมง',\n            d: '1 วัน',\n            dd: '%d วัน',\n            w: '1 สัปดาห์',\n            ww: '%d สัปดาห์',\n            M: '1 เดือน',\n            MM: '%d เดือน',\n            y: '1 ปี',\n            yy: '%d ปี',\n        },\n    });\n\n    return th;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inji\",\n        5: \"'inji\",\n        8: \"'inji\",\n        70: \"'inji\",\n        80: \"'inji\",\n        2: \"'nji\",\n        7: \"'nji\",\n        20: \"'nji\",\n        50: \"'nji\",\n        3: \"'ünji\",\n        4: \"'ünji\",\n        100: \"'ünji\",\n        6: \"'njy\",\n        9: \"'unjy\",\n        10: \"'unjy\",\n        30: \"'unjy\",\n        60: \"'ynjy\",\n        90: \"'ynjy\",\n    };\n\n    var tk = moment.defineLocale('tk', {\n        months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n        weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n            '_'\n        ),\n        weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n        weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün sagat] LT',\n            nextDay: '[ertir sagat] LT',\n            nextWeek: '[indiki] dddd [sagat] LT',\n            lastDay: '[düýn] LT',\n            lastWeek: '[geçen] dddd [sagat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s soň',\n            past: '%s öň',\n            s: 'birnäçe sekunt',\n            m: 'bir minut',\n            mm: '%d minut',\n            h: 'bir sagat',\n            hh: '%d sagat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir aý',\n            MM: '%d aý',\n            y: 'bir ýyl',\n            yy: '%d ýyl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'unjy\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tlPh = moment.defineLocale('tl-ph', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlPh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n    function translateFuture(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'leS'\n                : output.indexOf('jar') !== -1\n                ? time.slice(0, -3) + 'waQ'\n                : output.indexOf('DIS') !== -1\n                ? time.slice(0, -3) + 'nem'\n                : time + ' pIq';\n        return time;\n    }\n\n    function translatePast(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'Hu’'\n                : output.indexOf('jar') !== -1\n                ? time.slice(0, -3) + 'wen'\n                : output.indexOf('DIS') !== -1\n                ? time.slice(0, -3) + 'ben'\n                : time + ' ret';\n        return time;\n    }\n\n    function translate(number, withoutSuffix, string, isFuture) {\n        var numberNoun = numberAsNoun(number);\n        switch (string) {\n            case 'ss':\n                return numberNoun + ' lup';\n            case 'mm':\n                return numberNoun + ' tup';\n            case 'hh':\n                return numberNoun + ' rep';\n            case 'dd':\n                return numberNoun + ' jaj';\n            case 'MM':\n                return numberNoun + ' jar';\n            case 'yy':\n                return numberNoun + ' DIS';\n        }\n    }\n\n    function numberAsNoun(number) {\n        var hundred = Math.floor((number % 1000) / 100),\n            ten = Math.floor((number % 100) / 10),\n            one = number % 10,\n            word = '';\n        if (hundred > 0) {\n            word += numbersNouns[hundred] + 'vatlh';\n        }\n        if (ten > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n        }\n        if (one > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[one];\n        }\n        return word === '' ? 'pagh' : word;\n    }\n\n    var tlh = moment.defineLocale('tlh', {\n        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n            '_'\n        ),\n        monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[DaHjaj] LT',\n            nextDay: '[wa’leS] LT',\n            nextWeek: 'LLL',\n            lastDay: '[wa’Hu’] LT',\n            lastWeek: 'LLL',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: translateFuture,\n            past: translatePast,\n            s: 'puS lup',\n            ss: translate,\n            m: 'wa’ tup',\n            mm: translate,\n            h: 'wa’ rep',\n            hh: translate,\n            d: 'wa’ jaj',\n            dd: translate,\n            M: 'wa’ jar',\n            MM: translate,\n            y: 'wa’ DIS',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inci\",\n        5: \"'inci\",\n        8: \"'inci\",\n        70: \"'inci\",\n        80: \"'inci\",\n        2: \"'nci\",\n        7: \"'nci\",\n        20: \"'nci\",\n        50: \"'nci\",\n        3: \"'üncü\",\n        4: \"'üncü\",\n        100: \"'üncü\",\n        6: \"'ncı\",\n        9: \"'uncu\",\n        10: \"'uncu\",\n        30: \"'uncu\",\n        60: \"'ıncı\",\n        90: \"'ıncı\",\n    };\n\n    var tr = moment.defineLocale('tr', {\n        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n            '_'\n        ),\n        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n            '_'\n        ),\n        weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'öö' : 'ÖÖ';\n            } else {\n                return isLower ? 'ös' : 'ÖS';\n            }\n        },\n        meridiemParse: /öö|ÖÖ|ös|ÖS/,\n        isPM: function (input) {\n            return input === 'ös' || input === 'ÖS';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[yarın saat] LT',\n            nextWeek: '[gelecek] dddd [saat] LT',\n            lastDay: '[dün] LT',\n            lastWeek: '[geçen] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s önce',\n            s: 'birkaç saniye',\n            ss: '%d saniye',\n            m: 'bir dakika',\n            mm: '%d dakika',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            w: 'bir hafta',\n            ww: '%d hafta',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir yıl',\n            yy: '%d yıl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'ıncı\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n    // This is currently too difficult (maybe even impossible) to add.\n    var tzl = moment.defineLocale('tzl', {\n        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM [dallas] YYYY',\n            LLL: 'D. MMMM [dallas] YYYY HH.mm',\n            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n        },\n        meridiemParse: /d\\'o|d\\'a/i,\n        isPM: function (input) {\n            return \"d'o\" === input.toLowerCase();\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? \"d'o\" : \"D'O\";\n            } else {\n                return isLower ? \"d'a\" : \"D'A\";\n            }\n        },\n        calendar: {\n            sameDay: '[oxhi à] LT',\n            nextDay: '[demà à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[ieiri à] LT',\n            lastWeek: '[sür el] dddd [lasteu à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'osprei %s',\n            past: 'ja%s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['viensas secunds', \"'iensas secunds\"],\n            ss: [number + ' secunds', '' + number + ' secunds'],\n            m: [\"'n míut\", \"'iens míut\"],\n            mm: [number + ' míuts', '' + number + ' míuts'],\n            h: [\"'n þora\", \"'iensa þora\"],\n            hh: [number + ' þoras', '' + number + ' þoras'],\n            d: [\"'n ziua\", \"'iensa ziua\"],\n            dd: [number + ' ziuas', '' + number + ' ziuas'],\n            M: [\"'n mes\", \"'iens mes\"],\n            MM: [number + ' mesen', '' + number + ' mesen'],\n            y: [\"'n ar\", \"'iens ar\"],\n            yy: [number + ' ars', '' + number + ' ars'],\n        };\n        return isFuture\n            ? format[key][0]\n            : withoutSuffix\n            ? format[key][0]\n            : format[key][1];\n    }\n\n    return tzl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzm = moment.defineLocale('tzm', {\n        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n            '_'\n        ),\n        monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n            '_'\n        ),\n        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n            nextWeek: 'dddd [ⴴ] LT',\n            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n            lastWeek: 'dddd [ⴴ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n            past: 'ⵢⴰⵏ %s',\n            s: 'ⵉⵎⵉⴽ',\n            ss: '%d ⵉⵎⵉⴽ',\n            m: 'ⵎⵉⵏⵓⴺ',\n            mm: '%d ⵎⵉⵏⵓⴺ',\n            h: 'ⵙⴰⵄⴰ',\n            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n            d: 'ⴰⵙⵙ',\n            dd: '%d oⵙⵙⴰⵏ',\n            M: 'ⴰⵢoⵓⵔ',\n            MM: '%d ⵉⵢⵢⵉⵔⵏ',\n            y: 'ⴰⵙⴳⴰⵙ',\n            yy: '%d ⵉⵙⴳⴰⵙⵏ',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzmLatn = moment.defineLocale('tzm-latn', {\n        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n            '_'\n        ),\n        monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n            '_'\n        ),\n        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[asdkh g] LT',\n            nextDay: '[aska g] LT',\n            nextWeek: 'dddd [g] LT',\n            lastDay: '[assant g] LT',\n            lastWeek: 'dddd [g] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dadkh s yan %s',\n            past: 'yan %s',\n            s: 'imik',\n            ss: '%d imik',\n            m: 'minuḍ',\n            mm: '%d minuḍ',\n            h: 'saɛa',\n            hh: '%d tassaɛin',\n            d: 'ass',\n            dd: '%d ossan',\n            M: 'ayowr',\n            MM: '%d iyyirn',\n            y: 'asgas',\n            yy: '%d isgasn',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzmLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ugCn = moment.defineLocale('ug-cn', {\n        months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n            '_'\n        ),\n        monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n            '_'\n        ),\n        weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n            '_'\n        ),\n        weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n            LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n            LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n        },\n        meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                meridiem === 'يېرىم كېچە' ||\n                meridiem === 'سەھەر' ||\n                meridiem === 'چۈشتىن بۇرۇن'\n            ) {\n                return hour;\n            } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n                return hour + 12;\n            } else {\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return 'يېرىم كېچە';\n            } else if (hm < 900) {\n                return 'سەھەر';\n            } else if (hm < 1130) {\n                return 'چۈشتىن بۇرۇن';\n            } else if (hm < 1230) {\n                return 'چۈش';\n            } else if (hm < 1800) {\n                return 'چۈشتىن كېيىن';\n            } else {\n                return 'كەچ';\n            }\n        },\n        calendar: {\n            sameDay: '[بۈگۈن سائەت] LT',\n            nextDay: '[ئەتە سائەت] LT',\n            nextWeek: '[كېلەركى] dddd [سائەت] LT',\n            lastDay: '[تۆنۈگۈن] LT',\n            lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s كېيىن',\n            past: '%s بۇرۇن',\n            s: 'نەچچە سېكونت',\n            ss: '%d سېكونت',\n            m: 'بىر مىنۇت',\n            mm: '%d مىنۇت',\n            h: 'بىر سائەت',\n            hh: '%d سائەت',\n            d: 'بىر كۈن',\n            dd: '%d كۈن',\n            M: 'بىر ئاي',\n            MM: '%d ئاي',\n            y: 'بىر يىل',\n            yy: '%d يىل',\n        },\n\n        dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '-كۈنى';\n                case 'w':\n                case 'W':\n                    return number + '-ھەپتە';\n                default:\n                    return number;\n            }\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n            mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n            hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n            dd: 'день_дні_днів',\n            MM: 'місяць_місяці_місяців',\n            yy: 'рік_роки_років',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвилина' : 'хвилину';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'година' : 'годину';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    function weekdaysCaseReplace(m, format) {\n        var weekdays = {\n                nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n                    '_'\n                ),\n                accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n                    '_'\n                ),\n                genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n                    '_'\n                ),\n            },\n            nounCase;\n\n        if (m === true) {\n            return weekdays['nominative']\n                .slice(1, 7)\n                .concat(weekdays['nominative'].slice(0, 1));\n        }\n        if (!m) {\n            return weekdays['nominative'];\n        }\n\n        nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n            ? 'accusative'\n            : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n            ? 'genitive'\n            : 'nominative';\n        return weekdays[nounCase][m.day()];\n    }\n    function processHoursFunction(str) {\n        return function () {\n            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n        };\n    }\n\n    var uk = moment.defineLocale('uk', {\n        months: {\n            format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n                '_'\n            ),\n            standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n                '_'\n            ),\n        },\n        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n            '_'\n        ),\n        weekdays: weekdaysCaseReplace,\n        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY р.',\n            LLL: 'D MMMM YYYY р., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n        },\n        calendar: {\n            sameDay: processHoursFunction('[Сьогодні '),\n            nextDay: processHoursFunction('[Завтра '),\n            lastDay: processHoursFunction('[Вчора '),\n            nextWeek: processHoursFunction('[У] dddd ['),\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return processHoursFunction('[Минулої] dddd [').call(this);\n                    case 1:\n                    case 2:\n                    case 4:\n                        return processHoursFunction('[Минулого] dddd [').call(this);\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: '%s тому',\n            s: 'декілька секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'годину',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            M: 'місяць',\n            MM: relativeTimeWithPlural,\n            y: 'рік',\n            yy: relativeTimeWithPlural,\n        },\n        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n        meridiemParse: /ночі|ранку|дня|вечора/,\n        isPM: function (input) {\n            return /^(дня|вечора)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночі';\n            } else if (hour < 12) {\n                return 'ранку';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечора';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوری',\n            'فروری',\n            'مارچ',\n            'اپریل',\n            'مئی',\n            'جون',\n            'جولائی',\n            'اگست',\n            'ستمبر',\n            'اکتوبر',\n            'نومبر',\n            'دسمبر',\n        ],\n        days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n    var ur = moment.defineLocale('ur', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[آج بوقت] LT',\n            nextDay: '[کل بوقت] LT',\n            nextWeek: 'dddd [بوقت] LT',\n            lastDay: '[گذشتہ روز بوقت] LT',\n            lastWeek: '[گذشتہ] dddd [بوقت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s بعد',\n            past: '%s قبل',\n            s: 'چند سیکنڈ',\n            ss: '%d سیکنڈ',\n            m: 'ایک منٹ',\n            mm: '%d منٹ',\n            h: 'ایک گھنٹہ',\n            hh: '%d گھنٹے',\n            d: 'ایک دن',\n            dd: '%d دن',\n            M: 'ایک ماہ',\n            MM: '%d ماہ',\n            y: 'ایک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ur;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uz = moment.defineLocale('uz', {\n        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бугун соат] LT [да]',\n            nextDay: '[Эртага] LT [да]',\n            nextWeek: 'dddd [куни соат] LT [да]',\n            lastDay: '[Кеча соат] LT [да]',\n            lastWeek: '[Утган] dddd [куни соат] LT [да]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Якин %s ичида',\n            past: 'Бир неча %s олдин',\n            s: 'фурсат',\n            ss: '%d фурсат',\n            m: 'бир дакика',\n            mm: '%d дакика',\n            h: 'бир соат',\n            hh: '%d соат',\n            d: 'бир кун',\n            dd: '%d кун',\n            M: 'бир ой',\n            MM: '%d ой',\n            y: 'бир йил',\n            yy: '%d йил',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return uz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uzLatn = moment.defineLocale('uz-latn', {\n        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n        weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n            '_'\n        ),\n        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bugun soat] LT [da]',\n            nextDay: '[Ertaga] LT [da]',\n            nextWeek: 'dddd [kuni soat] LT [da]',\n            lastDay: '[Kecha soat] LT [da]',\n            lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Yaqin %s ichida',\n            past: 'Bir necha %s oldin',\n            s: 'soniya',\n            ss: '%d soniya',\n            m: 'bir daqiqa',\n            mm: '%d daqiqa',\n            h: 'bir soat',\n            hh: '%d soat',\n            d: 'bir kun',\n            dd: '%d kun',\n            M: 'bir oy',\n            MM: '%d oy',\n            y: 'bir yil',\n            yy: '%d yil',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var vi = moment.defineLocale('vi', {\n        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n            '_'\n        ),\n        monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n            '_'\n        ),\n        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /sa|ch/i,\n        isPM: function (input) {\n            return /^ch$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'sa' : 'SA';\n            } else {\n                return isLower ? 'ch' : 'CH';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [năm] YYYY',\n            LLL: 'D MMMM [năm] YYYY HH:mm',\n            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n            l: 'DD/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hôm nay lúc] LT',\n            nextDay: '[Ngày mai lúc] LT',\n            nextWeek: 'dddd [tuần tới lúc] LT',\n            lastDay: '[Hôm qua lúc] LT',\n            lastWeek: 'dddd [tuần trước lúc] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s tới',\n            past: '%s trước',\n            s: 'vài giây',\n            ss: '%d giây',\n            m: 'một phút',\n            mm: '%d phút',\n            h: 'một giờ',\n            hh: '%d giờ',\n            d: 'một ngày',\n            dd: '%d ngày',\n            w: 'một tuần',\n            ww: '%d tuần',\n            M: 'một tháng',\n            MM: '%d tháng',\n            y: 'một năm',\n            yy: '%d năm',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return vi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var xPseudo = moment.defineLocale('x-pseudo', {\n        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n            '_'\n        ),\n        monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n            '_'\n        ),\n        monthsParseExact: true,\n        weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n            '_'\n        ),\n        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[T~ódá~ý át] LT',\n            nextDay: '[T~ómó~rró~w át] LT',\n            nextWeek: 'dddd [át] LT',\n            lastDay: '[Ý~ést~érdá~ý át] LT',\n            lastWeek: '[L~ást] dddd [át] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'í~ñ %s',\n            past: '%s á~gó',\n            s: 'á ~féw ~sécó~ñds',\n            ss: '%d s~écóñ~ds',\n            m: 'á ~míñ~úté',\n            mm: '%d m~íñú~tés',\n            h: 'á~ñ hó~úr',\n            hh: '%d h~óúrs',\n            d: 'á ~dáý',\n            dd: '%d d~áýs',\n            M: 'á ~móñ~th',\n            MM: '%d m~óñt~hs',\n            y: 'á ~ýéár',\n            yy: '%d ý~éárs',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return xPseudo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var yo = moment.defineLocale('yo', {\n        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n            '_'\n        ),\n        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Ònì ni] LT',\n            nextDay: '[Ọ̀la ni] LT',\n            nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n            lastDay: '[Àna ni] LT',\n            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ní %s',\n            past: '%s kọjá',\n            s: 'ìsẹjú aayá die',\n            ss: 'aayá %d',\n            m: 'ìsẹjú kan',\n            mm: 'ìsẹjú %d',\n            h: 'wákati kan',\n            hh: 'wákati %d',\n            d: 'ọjọ́ kan',\n            dd: 'ọjọ́ %d',\n            M: 'osù kan',\n            MM: 'osù %d',\n            y: 'ọdún kan',\n            yy: 'ọdún %d',\n        },\n        dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n        ordinal: 'ọjọ́ %d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhCn = moment.defineLocale('zh-cn', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日Ah点mm分',\n            LLLL: 'YYYY年M月D日ddddAh点mm分',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            } else {\n                // '中午'\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[下]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            lastDay: '[昨天]LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[上]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '周';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s后',\n            past: '%s前',\n            s: '几秒',\n            ss: '%d 秒',\n            m: '1 分钟',\n            mm: '%d 分钟',\n            h: '1 小时',\n            hh: '%d 小时',\n            d: '1 天',\n            dd: '%d 天',\n            w: '1 周',\n            ww: '%d 周',\n            M: '1 个月',\n            MM: '%d 个月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return zhCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhHk = moment.defineLocale('zh-hk', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1200) {\n                return '上午';\n            } else if (hm === 1200) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: '[下]ddddLT',\n            lastDay: '[昨天]LT',\n            lastWeek: '[上]ddddLT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhHk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhMo = moment.defineLocale('zh-mo', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s內',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhMo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhTw = moment.defineLocale('zh-tw', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhTw;\n\n})));\n","import { DEFAULT_LANGUAGE } from \"./../../../app.component\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { DataService } from \"../../../services/cm-data.service\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport { Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\n\n@Component({\n  template: require(\"./cm-settings.component.html\")\n})\nexport class CmSettingsComponent extends TabTitle implements OnInit {\n  //language configuration vars\n  langList: any[];\n  selectedLang: string;\n  halUrl: string;\n  timeoutValue: number;\n  lang = \"settings.Language\";\n\n  constructor(\n    private _dataService: DataService,\n    private translate: TranslateService,\n    private modal: Modal,\n    public translateService: CmTranslateService\n  ) {\n    super(\"menu.SettingsLabel\", translateService);\n  }\n\n  selectLang(langValue) {\n    this.selectedLang = this.langList.filter(lang => lang.id == langValue)[0].id;\n  }\n\n  save() {\n    localStorage.setItem(\"customerLang\", this.selectedLang);\n    localStorage.setItem(\"timeoutVal\", this.timeoutValue.toString());\n    localStorage.setItem(\"halUrl\", this.halUrl);\n    this.translate.use(this.selectedLang);\n\n    this.modal\n      .alert()\n      .message(\"Saved!\")\n      .open();\n  }\n\n  ngOnInit(): any {\n    this.selectedLang = localStorage.getItem(\"customerLang\") || DEFAULT_LANGUAGE;\n    this.timeoutValue = parseInt(localStorage.getItem(\"timeoutVal\")) || 60000;\n    this.halUrl = localStorage.getItem(\"halUrl\") || \"https://hal-prod.service.dbrent.net\";\n    localStorage.setItem(\"halUrl\", this.halUrl);\n    this._dataService.getLanguages().then(languages => (this.langList = languages));\n  }\n}\n","import {Component, ElementRef, HostListener, ViewChild} from '@angular/core';\nimport {OutsideJob} from '../cm-job-list/cm-job.model';\nimport {CmHttpClient} from '../../services/http_client';\nimport {MarkerType} from '../../shared/marker';\nimport {Bike} from '../../shared/bike';\nimport {HttpHeaders as Headers} from '@angular/common/http';\nimport {READY_HAL_STATUS, READY_MSP_STATUS, SPERR_HAL_STATUS, SPERR_MSP_STATUS} from '../cm-map/cm-map.component';\nimport {CmTranslateService} from '../../services/localization/cm-translate.service';\nimport {BikeCluster} from '../../shared/bikeCluster';\nimport {ActivatedRoute} from '@angular/router';\nimport {EmployeeMap} from '../../shared/employee';\nimport {TabTitle} from '../../shared/tabTitle';\n\n/**\n * Created by anikinma on 01.08.16.\n */\n@Component({\n  selector: 'cm-root-page',\n  template: require('./cm-map-with-filters.component.html'),\n  styles: [require('./cm-map-with-filters.component.scss').toString()]\n})\nexport class CmRootPageComponent extends TabTitle {\n  private filterModel: CmMapFiltersModel = new CmMapFiltersModel();\n  private markerList = [];\n  private jobList: Array<OutsideJob> = [];\n  private bikesList = [];\n  private employeeList = [];\n  private bikesTotal: number = 0;\n\n  private maxPointsCount: number = 100000;\n  private bikeLimit: number = 100000;\n  private stationLimits: number = 10000;\n\n  private boundingBox: string;\n\n  //data from URL\n  private center: CmMapCenter;\n\n  private scrHeight;\n\n  @ViewChild('filtersContainer', {static: false})\n  filtersContainer: ElementRef;\n\n  private mapHeight: number = 500;\n\n  private chargeSliderConfig = {\n    start: [0, 100],\n    step: 1,\n    tooltips: true,\n    range: {\n      'min': 0,\n      'max': 100\n    }\n  };\n\n  @HostListener('window:resize', ['$event'])\n  getScreenSize(event?) {\n    this.scrHeight = window.innerHeight;\n    this.calculateMapHeight();\n  }\n\n  constructor(\n    private http: CmHttpClient,\n    private translateService: CmTranslateService,\n    private activatedRoute: ActivatedRoute\n  ) {\n    super('dispatching.Title', translateService);\n\n    this.activatedRoute.queryParams.subscribe(params => {\n      // If entity is null, and bikeId is definded in parameters - show this bike.\n      if (\n        (!params['entity'] || params['entity'].toLowerCase() == 'null') &&\n        (params['bikeId'] && params['bikeId'].toLowerCase() != 'null')\n      ) {\n        this.center = new CmMapCenter(params['bikeId'], MarkerType.BIKE);\n      } else {\n        this.center = new CmMapCenter(params['entity'], params['type']);\n      }\n\n      if (this.center.isFull()) this.openOnCenter();\n    });\n\n    this.getScreenSize();\n  }\n\n  ngOnInit() {\n    setTimeout(() => {\n      this.calculateMapHeight();\n    }, 2000);\n  }\n  \n  private calculateMapHeight(){\n    if(!this.filtersContainer) return;\n    let filtersHeight = (<HTMLElement>this.filtersContainer.nativeElement).getBoundingClientRect().height;\n\n    let calculatedHeight = this.scrHeight - 120 - filtersHeight;\n    if(calculatedHeight) this.mapHeight = calculatedHeight;\n  }\n\n  private reloadMarkers() {\n    this.markerList = [];\n    this.markerList = this.markerList\n      .concat(this.jobList)\n      .concat(this.bikesList)\n      .concat(this.employeeList);\n  }\n\n  private updateMarkers($event){\n    this.filterModel.stationFilters.assignments = $event;\n    this.filterModel.bikeFilters.assignments = $event;\n    this.updateBikeAndLocations();\n  }\n\n  //locations\n  private loadLocations(filter, locationId?) {\n    this.jobList = [];\n    this.filterModel.showStation = filter;\n    if (filter || locationId > 0) {\n      let url = '/bikes-sql/api/v1/tasks/list?' +\n          'page=1&limit=' +\n          this.stationLimits +\n          (this.filterModel.bikeFilters.branding.length > 0 ?\n              '&bikeBranding=' + this.filterModel.bikeFilters.branding.join(',') : '') +\n          (locationId ? '&location=' + locationId : '');\n      this.http\n        .get(url,\n          { headers: this.createBoundHeader() }\n        )\n        .subscribe((data:any) => {\n          let locationList = data.content;\n\n          if (locationList.length !== this.jobList.length) {\n            data.content.forEach(el => {\n              let item = new OutsideJob().fromJSON(el);\n              item.type = MarkerType.JOB;\n\n\n              if(this.filterModel && this.filterModel.stationFilters && this.filterModel.stationFilters.assignments && this.filterModel.stationFilters.assignments.length > 0){\n                const filterEmployees = this.filterModel.stationFilters.assignments;\n                item.highlighted = false;\n                for (let i = 0; i < item.assignedTo.length; i++) {\n                  for (let j = 0; j < filterEmployees.length; j++) {\n                    if(item.assignedTo[i] == filterEmployees[j]){\n                      item.highlighted = true;\n                      item.bordered = true;\n                      break;\n                    }\n                  }\n                }\n              }\n\n\n              if (item.coordinates) {\n                this.jobList.push(item);\n              }\n            });\n            this.reloadMarkers();\n          }\n        });\n    } else {\n      this.reloadMarkers();\n    }\n  }\n\n  //Without additional clearing of jobList and reloadMarkers() invocation\n  //markers can be shown incorrect with slow connection to DB\n  private updateBikeAndLocations(){\n    this.jobList = [];\n    this.loadBikes();\n    this.loadLocations(this.filterModel.showStation);\n    this.reloadMarkers();\n  }\n\n  //bikes\n  private loadBikes() {\n    this.bikesList = [];\n    this.filterModel.singleBike = null;\n    let bikeFilters = this.filterModel.bikeFilters;\n    if (bikeFilters.mustLoad()) {\n      let url =\n        '/bikes-sql/api/v1/bikeCluster?page=1&limit=' +\n        this.bikeLimit +\n        '&statuses=' +\n        bikeFilters.statuses.join(',') +\n          (this.filterModel.bikeFilters.branding.length > 0 ? '&bikeBranding='\n              + this.filterModel.bikeFilters.branding.join(',') : '') +\n        '&types=' +\n        bikeFilters.types.join(',') +\n        '&loaded=false';\n      if (bikeFilters.filterGoal === CmBikeFilterGoal.bikesWithCheckTasks) {\n        url += '&check=true';\n      } else if (bikeFilters.filterGoal === CmBikeFilterGoal.bikesWithLogisticTasks) {\n        url += '&logistic=true';\n      } else if (bikeFilters.filterGoal == CmBikeFilterGoal.bikesWithTasks) {\n        url += '&check=true&logistic=true';\n      }\n      if (bikeFilters.statusChangedHoursAgo) {\n        url += '&statusChangedHoursAgo=' + bikeFilters.statusChangedHoursAgo;\n      }\n      if (bikeFilters.chargeInPercentFrom != null && bikeFilters.chargeInPercentTo != null) {\n        url += '&chargeInPercentFrom=' + bikeFilters.chargeInPercentFrom + '&chargeInPercentTo=' + bikeFilters.chargeInPercentTo;\n      }\n      if (bikeFilters.isCharging() != null) {\n        url += \"&charging=\" + bikeFilters.isCharging();\n      }\n      this.http\n        .get<Array<BikeCluster>>(url, { headers: this.createBoundHeader() })\n        .subscribe(data => {\n          this.bikesList = [];\n          if (data) {\n            data.forEach(el => {\n              let item;\n              if (el.cnt) {\n                item = new BikeCluster().fromJSON(el);\n                item.type = MarkerType.BIKE_CLUSTER;\n              } else {\n                item = new Bike().fromJSON(el);\n                item.type = MarkerType.BIKE;\n              }\n              if (item.coordinates) {\n                this.bikesList.push(item);\n              }\n            });\n          }\n          this.performAdditionalFiltering();\n          this.reloadMarkers();\n        });\n    } else {\n      this.performAdditionalFiltering();\n      this.reloadMarkers();\n    }\n  }\n\n  private performAdditionalFiltering(){\n    let filters = this.filterModel.bikeFilters;\n    this.bikesList.forEach(bike => {\n      if(filters && filters.assignments.length > 0){\n        bike.highlighted = filters.assignments.indexOf(bike.user) > -1;\n        bike.bordered = bike.highlighted;\n      }\n    });\n  }\n\n  private changeChargeLevel(value: number[]) {\n    let [from, to] = value;\n    if (from == 0 && to == 100) {\n      from = null;\n      to = null;\n    }\n    let bikeFilters = this.filterModel.bikeFilters;\n    bikeFilters.chargeInPercentFrom = from;\n    bikeFilters.chargeInPercentTo = to;\n    this.loadBikes();\n  }\n\n  private showTotalBikes(data: any) {\n    this.bikesTotal = data['total'];\n  }\n\n  //employees\n  private loadEmployees(show) {\n    this.employeeList = [];\n\n    if (show) {\n      this.http\n        .get('/bikes-sql/api/v1/employee-coordinates')\n        .subscribe((data:any) => {\n          if (data.content) {\n            data.content.forEach(el => {\n              let item = new EmployeeMap().fromJSON(el);\n              item.type = MarkerType.EMPLOYEE;\n              this.employeeList.push(item);\n            });\n          }\n          this.reloadMarkers();\n        });\n    } else {\n      this.reloadMarkers();\n    }\n  }\n\n  private changeBound(bound: string) {\n    this.boundingBox = bound;\n    if (this.filterModel.showStation) {\n      this.loadLocations(true);\n    }\n    if (this.filterModel.bikeFilters.mustLoad() && !this.filterModel.singleBike) {\n      this.loadBikes();\n    }\n  }\n\n  private createBoundHeader() {\n    let headers: Headers = new Headers();\n    if (this.boundingBox) {\n      headers=headers.append('X-GPS-BBox', this.boundingBox);\n    }\n    return headers;\n  }\n\n  private getEnterBikeNumberText() {\n    return this.translateService.get('bikeNumber.hint');\n  }\n\n  private searchSignleBike() {\n    this.bikesList = [];\n    this.http\n      .get('/bikes-sql/api/v1/bicycles-short?page=1&limit=1&number=' + this.filterModel.singleBike + '&loaded=false')\n      .subscribe(data => {\n        let dataParsed = data;\n        if (dataParsed && dataParsed[0]) {\n          this.http.get('/bikes-sql/api/v1/bicycles/' + dataParsed[0].bikeId).subscribe((data:any) => {\n            let item = data;\n            item.type = MarkerType.BIKE;\n            this.http\n                .get('/bikes-sql/api/v1/tasks/bikesJobList?bikeNumber='+this.filterModel.singleBike + '&status=InProgress,Open')\n                .subscribe(\n                    (data:any) => {\n                      let tmpContent = data.content;\n                      if(tmpContent && tmpContent[0]) {\n                        item.priority = tmpContent[0].priority;\n                      }\n                      if (item.coordinates) {\n                          this.bikesList.push(item);\n                      }\n                      this.reloadMarkers();\n                    },\n                    error => {\n                      console.error(error);\n                    }\n                );\n          });\n        }\n      });\n  }\n\n  private openOnCenter() {\n    switch (this.center.type.toString()) {\n      case MarkerType.BIKE.toString(): {\n        this.bikesList = [];\n        this.http.get<Bike>('/bikes-sql/api/v1/bicycles/' + this.center.id).subscribe(data => {\n          let item = new Bike().fromJSON(data);\n          item.type = MarkerType.BIKE;\n          if (item.coordinates) {\n            this.bikesList.push(item);\n          }\n          this.reloadMarkers();\n        });\n        break;\n      }\n      case MarkerType.JOB.toString(): {\n        this.loadLocations(false, this.center.id);\n        break;\n      }\n    }\n  }\n\n\n  private bikeFilterGoals() {\n    return Object.keys(CmBikeFilterGoal);\n  }\n\n  private bikeFilterGoalLabel(filterGoalStr: string) {\n    let filterGoal = CmBikeFilterGoal[filterGoalStr];\n    switch (filterGoal) {\n      case CmBikeFilterGoal.allBikes:\n        return 'dispatching.ShowBikesLabel';\n      case CmBikeFilterGoal.bikesWithTasks:\n        return 'bikesWithJobs.Label';\n      case CmBikeFilterGoal.bikesWithLogisticTasks:\n        return 'bikesWithLogisticTasks.Label';\n      case CmBikeFilterGoal.bikesWithCheckTasks:\n        return 'dispatching.BikeWithCheckTasks';\n      case CmBikeFilterGoal.noBikes:\n        return 'dispatching.NoBikesLabel';\n    }\n  }\n}\n\nclass CmMapFiltersModel {\n  showStation: boolean;\n  showServiceAgents: boolean;\n  bikeFilters: CmBikeFilter;\n  singleBike: string;\n  stationFilters: CmLocationFilter;\n\n  constructor() {\n    this.showStation = false;\n    this.showServiceAgents = false;\n    this.bikeFilters = new CmBikeFilter(CmBikeFilterGoal.noBikes);\n    this.stationFilters = new CmLocationFilter();\n  }\n}\n\nexport enum CmBikeFilterGoal {\n  allBikes = 'allBikes',\n  bikesWithTasks = 'bikesWithTasks',\n  bikesWithLogisticTasks = 'bikesWithLogisticTasks',\n  bikesWithCheckTasks = 'bikesWithCheckTasks',\n  noBikes = 'noBikes'\n}\n\nexport class CmLocationFilter {\n  assignments : Array<string>;\n  constructor() {\n    this.assignments = [];\n  }\n}\n\nexport class CmBikeFilter {\n\n  filterGoal: CmBikeFilterGoal;\n  statuses: Array<string>;\n  types: string[] = [];\n  branding: Array<string> = new Array<string>();\n  statusChangedHoursAgo: number;\n  chargeInPercentFrom: number;\n  chargeInPercentTo: number;\n  charging: boolean;\n  notCharging: boolean;\n  assignments : Array<string> = [];\n\n  constructor(filterGoal: CmBikeFilterGoal) {\n    this.statuses = [SPERR_HAL_STATUS, SPERR_MSP_STATUS, READY_HAL_STATUS, READY_MSP_STATUS];\n    this.filterGoal = filterGoal;\n  }\n\n  public mustLoad(): boolean {\n    return this.filterGoal !== CmBikeFilterGoal.noBikes;\n  }\n\n  public isCharging(): boolean {\n    return this.charging && !this.notCharging ? true : !this.charging && this.notCharging ? false : null;\n  }\n}\n\nexport class CmMapCenter {\n  id: number;\n  type: number;\n\n  constructor(id: number, type: MarkerType) {\n    this.id = id;\n    this.type = type;\n  }\n\n  public isFull(): boolean {\n    return this && this.id > 0 && this.type >= 0;\n  }\n}\n\nclass BikesTotals {\n  status: string;\n  count: number;\n\n  constructor(status: string, cnt: number) {\n    this.status = status;\n    this.count = cnt;\n  }\n}\n","import { __decorate, __metadata, __param, __awaiter, __generator, __spread, __read, __extends } from 'tslib';\nimport { Injectable, NgZone, Input, Directive, EventEmitter, Output, Self, ElementRef, Component, Inject, PLATFORM_ID, QueryList, ContentChildren, forwardRef, ɵɵdefineInjectable, ɵɵinject, InjectionToken, Optional, LOCALE_ID, NgModule } from '@angular/core';\nimport { Observable, BehaviorSubject, from, timer, Subject, fromEventPattern, merge, ReplaySubject, bindCallback, of, throwError } from 'rxjs';\nimport { flatMap, sample, switchMap, map, shareReplay, distinctUntilChanged, takeUntil, startWith, skip, multicast } from 'rxjs/operators';\nimport { isPlatformServer } from '@angular/common';\n\nvar MapsAPILoader = /** @class */ (function () {\n    function MapsAPILoader() {\n    }\n    MapsAPILoader = __decorate([\n        Injectable()\n    ], MapsAPILoader);\n    return MapsAPILoader;\n}());\n\n/**\n * Wrapper class that handles the communication with the Google Maps Javascript\n * API v3\n */\nvar GoogleMapsAPIWrapper = /** @class */ (function () {\n    function GoogleMapsAPIWrapper(_loader, _zone) {\n        var _this = this;\n        this._loader = _loader;\n        this._zone = _zone;\n        this._map =\n            new Promise(function (resolve) { _this._mapResolver = resolve; });\n    }\n    GoogleMapsAPIWrapper.prototype.createMap = function (el, mapOptions) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._loader.load().then(function () {\n                var map = new google.maps.Map(el, mapOptions);\n                _this._mapResolver(map);\n                return;\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.setMapOptions = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            _this._map.then(function (m) { m.setOptions(options); });\n        });\n    };\n    /**\n     * Creates a google map marker with the map context\n     */\n    GoogleMapsAPIWrapper.prototype.createMarker = function (options, addToMap) {\n        var _this = this;\n        if (options === void 0) { options = {}; }\n        if (addToMap === void 0) { addToMap = true; }\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) {\n                if (addToMap) {\n                    options.map = map;\n                }\n                return new google.maps.Marker(options);\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.createInfoWindow = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function () { return new google.maps.InfoWindow(options); });\n        });\n    };\n    /**\n     * Creates a google.map.Circle for the current map.\n     */\n    GoogleMapsAPIWrapper.prototype.createCircle = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) {\n                if (typeof options.strokePosition === 'string') {\n                    options.strokePosition = google.maps.StrokePosition[options.strokePosition];\n                }\n                options.map = map;\n                return new google.maps.Circle(options);\n            });\n        });\n    };\n    /**\n     * Creates a google.map.Rectangle for the current map.\n     */\n    GoogleMapsAPIWrapper.prototype.createRectangle = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) {\n                options.map = map;\n                return new google.maps.Rectangle(options);\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.createPolyline = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this.getNativeMap().then(function (map) {\n                var line = new google.maps.Polyline(options);\n                line.setMap(map);\n                return line;\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.createPolygon = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this.getNativeMap().then(function (map) {\n                var polygon = new google.maps.Polygon(options);\n                polygon.setMap(map);\n                return polygon;\n            });\n        });\n    };\n    /**\n     * Creates a new google.map.Data layer for the current map\n     */\n    GoogleMapsAPIWrapper.prototype.createDataLayer = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (m) {\n                var data = new google.maps.Data(options);\n                data.setMap(m);\n                return data;\n            });\n        });\n    };\n    /**\n     * Creates a TransitLayer instance for a map\n     * @param {TransitLayerOptions} options - used for setting layer options\n     * @returns {Promise<TransitLayer>} a new transit layer object\n     */\n    GoogleMapsAPIWrapper.prototype.createTransitLayer = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) {\n                var newLayer = new google.maps.TransitLayer();\n                newLayer.setMap(options.visible ? map : null);\n                return newLayer;\n            });\n        });\n    };\n    /**\n     * Creates a BicyclingLayer instance for a map\n     * @param {BicyclingLayerOptions} options - used for setting layer options\n     * @returns {Promise<BicyclingLayer>} a new bicycling layer object\n     */\n    GoogleMapsAPIWrapper.prototype.createBicyclingLayer = function (options) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) {\n                var newLayer = new google.maps.BicyclingLayer();\n                newLayer.setMap(options.visible ? map : null);\n                return newLayer;\n            });\n        });\n    };\n    /**\n     * Determines if given coordinates are insite a Polygon path.\n     */\n    GoogleMapsAPIWrapper.prototype.containsLocation = function (latLng, polygon) {\n        return google.maps.geometry.poly.containsLocation(latLng, polygon);\n    };\n    GoogleMapsAPIWrapper.prototype.subscribeToMapEvent = function (eventName) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._map.then(function (m) {\n                m.addListener(eventName, function (arg) { _this._zone.run(function () { return observer.next(arg); }); });\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.clearInstanceListeners = function () {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            _this._map.then(function (map) {\n                google.maps.event.clearInstanceListeners(map);\n            });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.setCenter = function (latLng) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.setCenter(latLng); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.getZoom = function () {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.getZoom(); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.getBounds = function () {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.getBounds(); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.getMapTypeId = function () {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.getMapTypeId(); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.setZoom = function (zoom) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.setZoom(zoom); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.getCenter = function () {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.getCenter(); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.panTo = function (latLng) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.panTo(latLng); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.panBy = function (x, y) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.panBy(x, y); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.fitBounds = function (latLng, padding) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.fitBounds(latLng, padding); });\n        });\n    };\n    GoogleMapsAPIWrapper.prototype.panToBounds = function (latLng, padding) {\n        var _this = this;\n        return this._zone.runOutsideAngular(function () {\n            return _this._map.then(function (map) { return map.panToBounds(latLng, padding); });\n        });\n    };\n    /**\n     * Returns the native Google Maps Map instance. Be careful when using this instance directly.\n     */\n    GoogleMapsAPIWrapper.prototype.getNativeMap = function () { return this._map; };\n    /**\n     * Triggers the given event name on the map instance.\n     */\n    GoogleMapsAPIWrapper.prototype.triggerMapEvent = function (eventName) {\n        return this._map.then(function (m) { return google.maps.event.trigger(m, eventName); });\n    };\n    GoogleMapsAPIWrapper.ctorParameters = function () { return [\n        { type: MapsAPILoader },\n        { type: NgZone }\n    ]; };\n    GoogleMapsAPIWrapper = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [MapsAPILoader, NgZone])\n    ], GoogleMapsAPIWrapper);\n    return GoogleMapsAPIWrapper;\n}());\n\n/**\n * This class manages Transit and Bicycling Layers for a Google Map instance.\n */\nvar LayerManager = /** @class */ (function () {\n    function LayerManager(_wrapper) {\n        this._wrapper = _wrapper;\n        this._layers = new Map();\n    }\n    /**\n     * Adds a transit layer to a map instance.\n     * @param {AgmTransitLayer} layer - a TransitLayer object\n     * @param {TransitLayerOptions} options - TransitLayerOptions options\n     * @returns void\n     */\n    LayerManager.prototype.addTransitLayer = function (layer, options) {\n        var newLayer = this._wrapper.createTransitLayer(options);\n        this._layers.set(layer, newLayer);\n    };\n    /**\n     * Adds a bicycling layer to a map instance.\n     * @param {AgmBicyclingLayer} layer - a bicycling layer object\n     * @param {BicyclingLayerOptions} options - BicyclingLayer options\n     * @returns void\n     */\n    LayerManager.prototype.addBicyclingLayer = function (layer, options) {\n        var newLayer = this._wrapper.createBicyclingLayer(options);\n        this._layers.set(layer, newLayer);\n    };\n    /**\n     * Deletes a map layer\n     * @param {AgmTransitLayer|AgmBicyclingLayer} layer - the layer to delete\n     * @returns  Promise<void>\n     */\n    LayerManager.prototype.deleteLayer = function (layer) {\n        var _this = this;\n        return this._layers.get(layer).then(function (currentLayer) {\n            currentLayer.setMap(null);\n            _this._layers.delete(layer);\n        });\n    };\n    /**\n     * Hide/Show a google map layer\n     * @param { AgmTransitLayer|AgmBicyclingLayer} layer - the layer to hide/show\n     * @param {TransitLayerOptions|BicyclingLayerOptions} options - used to set visibility of the layer\n     * @returns Promise<void>\n     */\n    LayerManager.prototype.toggleLayerVisibility = function (layer, options) {\n        var _this = this;\n        return this._layers.get(layer).then(function (currentLayer) {\n            if (!options.visible) {\n                currentLayer.setMap(null);\n                return;\n            }\n            else {\n                return _this._wrapper.getNativeMap().then(function (map) {\n                    currentLayer.setMap(map);\n                });\n            }\n        });\n    };\n    LayerManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper }\n    ]; };\n    LayerManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper])\n    ], LayerManager);\n    return LayerManager;\n}());\n\nvar layerId = 0;\n/*\n * This directive adds a bicycling layer to a google map instance\n * <agm-bicycling-layer [visible]=\"true|false\"> <agm-bicycling-layer>\n * */\nvar AgmBicyclingLayer = /** @class */ (function () {\n    function AgmBicyclingLayer(_manager) {\n        this._manager = _manager;\n        this._addedToManager = false;\n        this._id = (layerId++).toString();\n        /**\n         * Hide/show bicycling layer\n         */\n        this.visible = true;\n    }\n    AgmBicyclingLayer.prototype.ngOnInit = function () {\n        if (this._addedToManager) {\n            return;\n        }\n        this._manager.addBicyclingLayer(this, { visible: this.visible });\n        this._addedToManager = true;\n    };\n    AgmBicyclingLayer.prototype.ngOnChanges = function (changes) {\n        if (!this._addedToManager) {\n            return;\n        }\n        if (changes['visible'] != null) {\n            this._manager.toggleLayerVisibility(this, { visible: changes['visible'].currentValue });\n        }\n    };\n    /** @internal */\n    AgmBicyclingLayer.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmBicyclingLayer.prototype.toString = function () { return \"AgmBicyclingLayer-\" + this._id.toString(); };\n    /** @internal */\n    AgmBicyclingLayer.prototype.ngOnDestroy = function () {\n        this._manager.deleteLayer(this);\n    };\n    AgmBicyclingLayer.ctorParameters = function () { return [\n        { type: LayerManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmBicyclingLayer.prototype, \"visible\", void 0);\n    AgmBicyclingLayer = __decorate([\n        Directive({\n            selector: 'agm-bicycling-layer',\n        }),\n        __metadata(\"design:paramtypes\", [LayerManager])\n    ], AgmBicyclingLayer);\n    return AgmBicyclingLayer;\n}());\n\nvar CircleManager = /** @class */ (function () {\n    function CircleManager(_apiWrapper, _zone) {\n        this._apiWrapper = _apiWrapper;\n        this._zone = _zone;\n        this._circles = new Map();\n    }\n    CircleManager.prototype.addCircle = function (circle) {\n        this._circles.set(circle, this._apiWrapper.createCircle({\n            center: { lat: circle.latitude, lng: circle.longitude },\n            clickable: circle.clickable,\n            draggable: circle.draggable,\n            editable: circle.editable,\n            fillColor: circle.fillColor,\n            fillOpacity: circle.fillOpacity,\n            radius: circle.radius,\n            strokeColor: circle.strokeColor,\n            strokeOpacity: circle.strokeOpacity,\n            strokePosition: circle.strokePosition,\n            strokeWeight: circle.strokeWeight,\n            visible: circle.visible,\n            zIndex: circle.zIndex,\n        }));\n    };\n    /**\n     * Removes the given circle from the map.\n     */\n    CircleManager.prototype.removeCircle = function (circle) {\n        var _this = this;\n        return this._circles.get(circle).then(function (c) {\n            c.setMap(null);\n            _this._circles.delete(circle);\n        });\n    };\n    CircleManager.prototype.setOptions = function (circle, options) {\n        return this._circles.get(circle).then(function (c) {\n            if (typeof options.strokePosition === 'string') {\n                options.strokePosition = google.maps.StrokePosition[options.strokePosition];\n            }\n            c.setOptions(options);\n        });\n    };\n    CircleManager.prototype.getBounds = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.getBounds(); });\n    };\n    CircleManager.prototype.getCenter = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.getCenter(); });\n    };\n    CircleManager.prototype.getRadius = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.getRadius(); });\n    };\n    CircleManager.prototype.setCenter = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.setCenter({ lat: circle.latitude, lng: circle.longitude }); });\n    };\n    CircleManager.prototype.setEditable = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.setEditable(circle.editable); });\n    };\n    CircleManager.prototype.setDraggable = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.setDraggable(circle.draggable); });\n    };\n    CircleManager.prototype.setVisible = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.setVisible(circle.visible); });\n    };\n    CircleManager.prototype.setRadius = function (circle) {\n        return this._circles.get(circle).then(function (c) { return c.setRadius(circle.radius); });\n    };\n    CircleManager.prototype.getNativeCircle = function (circle) {\n        return this._circles.get(circle);\n    };\n    CircleManager.prototype.createEventObservable = function (eventName, circle) {\n        var _this = this;\n        return new Observable(function (observer) {\n            var listener = null;\n            _this._circles.get(circle).then(function (c) {\n                listener = c.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n            return function () {\n                if (listener !== null) {\n                    listener.remove();\n                }\n            };\n        });\n    };\n    CircleManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    CircleManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], CircleManager);\n    return CircleManager;\n}());\n\nvar AgmCircle = /** @class */ (function () {\n    function AgmCircle(_manager) {\n        this._manager = _manager;\n        /**\n         * Indicates whether this Circle handles mouse events. Defaults to true.\n         */\n        this.clickable = true;\n        /**\n         * If set to true, the user can drag this circle over the map. Defaults to false.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = false;\n        /**\n         * If set to true, the user can edit this circle by dragging the control points shown at\n         * the center and around the circumference of the circle. Defaults to false.\n         */\n        this.editable = false;\n        /**\n         * The radius in meters on the Earth's surface.\n         */\n        this.radius = 0;\n        /**\n         * The stroke position. Defaults to CENTER.\n         * This property is not supported on Internet Explorer 8 and earlier.\n         */\n        this.strokePosition = 'CENTER';\n        /**\n         * The stroke width in pixels.\n         */\n        this.strokeWeight = 0;\n        /**\n         * Whether this circle is visible on the map. Defaults to true.\n         */\n        this.visible = true;\n        /**\n         * This event is fired when the circle's center is changed.\n         */\n        this.centerChange = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks on the circle.\n         */\n        this.circleClick = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks on the circle.\n         */\n        this.circleDblClick = new EventEmitter();\n        /**\n         * This event is repeatedly fired while the user drags the circle.\n         */\n        this.drag = new EventEmitter();\n        /**\n         * This event is fired when the user stops dragging the circle.\n         */\n        this.dragEnd = new EventEmitter();\n        /**\n         * This event is fired when the user starts dragging the circle.\n         */\n        this.dragStart = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousedown event is fired on the circle.\n         */\n        this.mouseDown = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousemove event is fired on the circle.\n         */\n        this.mouseMove = new EventEmitter();\n        /**\n         * This event is fired on circle mouseout.\n         */\n        this.mouseOut = new EventEmitter();\n        /**\n         * This event is fired on circle mouseover.\n         */\n        this.mouseOver = new EventEmitter();\n        /**\n         * This event is fired when the DOM mouseup event is fired on the circle.\n         */\n        this.mouseUp = new EventEmitter();\n        /**\n         * This event is fired when the circle's radius is changed.\n         */\n        this.radiusChange = new EventEmitter();\n        /**\n         * This event is fired when the circle is right-clicked on.\n         */\n        this.rightClick = new EventEmitter();\n        this._circleAddedToManager = false;\n        this._eventSubscriptions = [];\n    }\n    AgmCircle_1 = AgmCircle;\n    /** @internal */\n    AgmCircle.prototype.ngOnInit = function () {\n        this._manager.addCircle(this);\n        this._circleAddedToManager = true;\n        this._registerEventListeners();\n    };\n    /** @internal */\n    AgmCircle.prototype.ngOnChanges = function (changes) {\n        if (!this._circleAddedToManager) {\n            return;\n        }\n        if (changes['latitude'] || changes['longitude']) {\n            this._manager.setCenter(this);\n        }\n        if (changes['editable']) {\n            this._manager.setEditable(this);\n        }\n        if (changes['draggable']) {\n            this._manager.setDraggable(this);\n        }\n        if (changes['visible']) {\n            this._manager.setVisible(this);\n        }\n        if (changes['radius']) {\n            this._manager.setRadius(this);\n        }\n        this._updateCircleOptionsChanges(changes);\n    };\n    AgmCircle.prototype._updateCircleOptionsChanges = function (changes) {\n        var options = {};\n        var optionKeys = Object.keys(changes).filter(function (k) { return AgmCircle_1._mapOptions.indexOf(k) !== -1; });\n        optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n        if (optionKeys.length > 0) {\n            this._manager.setOptions(this, options);\n        }\n    };\n    AgmCircle.prototype._registerEventListeners = function () {\n        var _this = this;\n        var events = new Map();\n        events.set('center_changed', this.centerChange);\n        events.set('click', this.circleClick);\n        events.set('dblclick', this.circleDblClick);\n        events.set('drag', this.drag);\n        events.set('dragend', this.dragEnd);\n        events.set('dragstart', this.dragStart);\n        events.set('mousedown', this.mouseDown);\n        events.set('mousemove', this.mouseMove);\n        events.set('mouseout', this.mouseOut);\n        events.set('mouseover', this.mouseOver);\n        events.set('mouseup', this.mouseUp);\n        events.set('radius_changed', this.radiusChange);\n        events.set('rightclick', this.rightClick);\n        events.forEach(function (eventEmitter, eventName) {\n            _this._eventSubscriptions.push(_this._manager.createEventObservable(eventName, _this).subscribe(function (value) {\n                switch (eventName) {\n                    case 'radius_changed':\n                        _this._manager.getRadius(_this).then(function (radius) { return eventEmitter.emit(radius); });\n                        break;\n                    case 'center_changed':\n                        _this._manager.getCenter(_this).then(function (center) {\n                            return eventEmitter.emit({ lat: center.lat(), lng: center.lng() });\n                        });\n                        break;\n                    default:\n                        eventEmitter.emit({ coords: { lat: value.latLng.lat(), lng: value.latLng.lng() } });\n                }\n            }));\n        });\n    };\n    /** @internal */\n    AgmCircle.prototype.ngOnDestroy = function () {\n        this._eventSubscriptions.forEach(function (s) { s.unsubscribe(); });\n        this._eventSubscriptions = null;\n        this._manager.removeCircle(this);\n    };\n    /**\n     * Gets the LatLngBounds of this Circle.\n     */\n    AgmCircle.prototype.getBounds = function () { return this._manager.getBounds(this); };\n    AgmCircle.prototype.getCenter = function () { return this._manager.getCenter(this); };\n    var AgmCircle_1;\n    AgmCircle._mapOptions = [\n        'fillColor', 'fillOpacity', 'strokeColor', 'strokeOpacity', 'strokePosition', 'strokeWeight',\n        'visible', 'zIndex', 'clickable',\n    ];\n    AgmCircle.ctorParameters = function () { return [\n        { type: CircleManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmCircle.prototype, \"latitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmCircle.prototype, \"longitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"clickable\", void 0);\n    __decorate([\n        Input('circleDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"editable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmCircle.prototype, \"fillColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmCircle.prototype, \"fillOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"radius\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmCircle.prototype, \"strokeColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmCircle.prototype, \"strokeOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmCircle.prototype, \"strokePosition\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"strokeWeight\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmCircle.prototype, \"visible\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmCircle.prototype, \"zIndex\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"centerChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"circleClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"circleDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"drag\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"dragEnd\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"dragStart\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"mouseDown\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"mouseMove\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"mouseOut\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"mouseOver\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"mouseUp\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"radiusChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmCircle.prototype, \"rightClick\", void 0);\n    AgmCircle = AgmCircle_1 = __decorate([\n        Directive({\n            selector: 'agm-circle',\n        }),\n        __metadata(\"design:paramtypes\", [CircleManager])\n    ], AgmCircle);\n    return AgmCircle;\n}());\n\n/**\n * Manages all Data Layers for a Google Map instance.\n */\nvar DataLayerManager = /** @class */ (function () {\n    function DataLayerManager(_wrapper, _zone) {\n        this._wrapper = _wrapper;\n        this._zone = _zone;\n        this._layers = new Map();\n    }\n    /**\n     * Adds a new Data Layer to the map.\n     */\n    DataLayerManager.prototype.addDataLayer = function (layer) {\n        var _this = this;\n        var newLayer = this._wrapper.createDataLayer({\n            style: layer.style,\n        })\n            .then(function (d) {\n            if (layer.geoJson) {\n                _this.getDataFeatures(d, layer.geoJson).then(function (features) { return d.features = features; });\n            }\n            return d;\n        });\n        this._layers.set(layer, newLayer);\n    };\n    DataLayerManager.prototype.deleteDataLayer = function (layer) {\n        var _this = this;\n        this._layers.get(layer).then(function (l) {\n            l.setMap(null);\n            _this._layers.delete(layer);\n        });\n    };\n    DataLayerManager.prototype.updateGeoJson = function (layer, geoJson) {\n        var _this = this;\n        this._layers.get(layer).then(function (l) {\n            l.forEach(function (feature) {\n                l.remove(feature);\n                var index = l.features.indexOf(feature, 0);\n                if (index > -1) {\n                    l.features.splice(index, 1);\n                }\n            });\n            _this.getDataFeatures(l, geoJson).then(function (features) { return l.features = features; });\n        });\n    };\n    DataLayerManager.prototype.setDataOptions = function (layer, options) {\n        this._layers.get(layer).then(function (l) {\n            l.setControlPosition(options.controlPosition);\n            l.setControls(options.controls);\n            l.setDrawingMode(options.drawingMode);\n            l.setStyle(options.style);\n        });\n    };\n    /**\n     * Creates a Google Maps event listener for the given DataLayer as an Observable\n     */\n    DataLayerManager.prototype.createEventObservable = function (eventName, layer) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._layers.get(layer).then(function (d) {\n                d.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    /**\n     * Extract features from a geoJson using google.maps Data Class\n     * @param d : google.maps.Data class instance\n     * @param geoJson : url or geojson object\n     */\n    DataLayerManager.prototype.getDataFeatures = function (d, geoJson) {\n        return new Promise(function (resolve, reject) {\n            if (typeof geoJson === 'object') {\n                try {\n                    var features = d.addGeoJson(geoJson);\n                    resolve(features);\n                }\n                catch (e) {\n                    reject(e);\n                }\n            }\n            else if (typeof geoJson === 'string') {\n                d.loadGeoJson(geoJson, null, resolve);\n            }\n            else {\n                reject(\"Impossible to extract features from geoJson: wrong argument type\");\n            }\n        });\n    };\n    DataLayerManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    DataLayerManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], DataLayerManager);\n    return DataLayerManager;\n}());\n\nvar layerId$1 = 0;\n/**\n * AgmDataLayer enables the user to add data layers to the map.\n *\n * ### Example\n * ```typescript\n * import { Component } from 'angular2/core';\n * import { AgmMap, AgmDataLayer } from\n * 'angular-google-maps/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  directives: [AgmMap, AgmDataLayer],\n *  styles: [`\n *    .agm-container {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * \t  <agm-data-layer [geoJson]=\"geoJsonObject\" (layerClick)=\"clicked($event)\" [style]=\"styleFunc\">\n * \t  </agm-data-layer>\n * </agm-map>\n *  `\n * })\n * export class MyMapCmp {\n *   lat: number = -25.274449;\n *   lng: number = 133.775060;\n *   zoom: number = 5;\n *\n * clicked(clickEvent) {\n *    console.log(clickEvent);\n *  }\n *\n *  styleFunc(feature) {\n *    return ({\n *      clickable: false,\n *      fillColor: feature.getProperty('color'),\n *      strokeWeight: 1\n *    });\n *  }\n *\n *  geoJsonObject: Object = {\n *    \"type\": \"FeatureCollection\",\n *    \"features\": [\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"G\",\n *          \"color\": \"blue\",\n *          \"rank\": \"7\",\n *          \"ascii\": \"71\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [123.61, -22.14], [122.38, -21.73], [121.06, -21.69], [119.66, -22.22], [119.00, -23.40],\n *              [118.65, -24.76], [118.43, -26.07], [118.78, -27.56], [119.22, -28.57], [120.23, -29.49],\n *              [121.77, -29.87], [123.57, -29.64], [124.45, -29.03], [124.71, -27.95], [124.80, -26.70],\n *              [124.80, -25.60], [123.61, -25.64], [122.56, -25.64], [121.72, -25.72], [121.81, -26.62],\n *              [121.86, -26.98], [122.60, -26.90], [123.57, -27.05], [123.57, -27.68], [123.35, -28.18],\n *              [122.51, -28.38], [121.77, -28.26], [121.02, -27.91], [120.49, -27.21], [120.14, -26.50],\n *              [120.10, -25.64], [120.27, -24.52], [120.67, -23.68], [121.72, -23.32], [122.43, -23.48],\n *              [123.04, -24.04], [124.54, -24.28], [124.58, -23.20], [123.61, -22.14]\n *            ]\n *          ]\n *        }\n *      },\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"o\",\n *          \"color\": \"red\",\n *          \"rank\": \"15\",\n *          \"ascii\": \"111\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [128.84, -25.76], [128.18, -25.60], [127.96, -25.52], [127.88, -25.52], [127.70, -25.60],\n *              [127.26, -25.79], [126.60, -26.11], [126.16, -26.78], [126.12, -27.68], [126.21, -28.42],\n *              [126.69, -29.49], [127.74, -29.80], [128.80, -29.72], [129.41, -29.03], [129.72, -27.95],\n *              [129.68, -27.21], [129.33, -26.23], [128.84, -25.76]\n *            ],\n *            [\n *              [128.45, -27.44], [128.32, -26.94], [127.70, -26.82], [127.35, -27.05], [127.17, -27.80],\n *              [127.57, -28.22], [128.10, -28.42], [128.49, -27.80], [128.45, -27.44]\n *            ]\n *          ]\n *        }\n *      },\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"o\",\n *          \"color\": \"yellow\",\n *          \"rank\": \"15\",\n *          \"ascii\": \"111\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [131.87, -25.76], [131.35, -26.07], [130.95, -26.78], [130.82, -27.64], [130.86, -28.53],\n *              [131.26, -29.22], [131.92, -29.76], [132.45, -29.87], [133.06, -29.76], [133.72, -29.34],\n *              [134.07, -28.80], [134.20, -27.91], [134.07, -27.21], [133.81, -26.31], [133.37, -25.83],\n *              [132.71, -25.64], [131.87, -25.76]\n *            ],\n *            [\n *              [133.15, -27.17], [132.71, -26.86], [132.09, -26.90], [131.74, -27.56], [131.79, -28.26],\n *              [132.36, -28.45], [132.93, -28.34], [133.15, -27.76], [133.15, -27.17]\n *            ]\n *          ]\n *        }\n *      },\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"g\",\n *          \"color\": \"blue\",\n *          \"rank\": \"7\",\n *          \"ascii\": \"103\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [138.12, -25.04], [136.84, -25.16], [135.96, -25.36], [135.26, -25.99], [135, -26.90],\n *              [135.04, -27.91], [135.26, -28.88], [136.05, -29.45], [137.02, -29.49], [137.81, -29.49],\n *              [137.94, -29.99], [137.90, -31.20], [137.85, -32.24], [136.88, -32.69], [136.45, -32.36],\n *              [136.27, -31.80], [134.95, -31.84], [135.17, -32.99], [135.52, -33.43], [136.14, -33.76],\n *              [137.06, -33.83], [138.12, -33.65], [138.86, -33.21], [139.30, -32.28], [139.30, -31.24],\n *              [139.30, -30.14], [139.21, -28.96], [139.17, -28.22], [139.08, -27.41], [139.08, -26.47],\n *              [138.99, -25.40], [138.73, -25.00], [138.12, -25.04]\n *            ],\n *            [\n *              [137.50, -26.54], [136.97, -26.47], [136.49, -26.58], [136.31, -27.13], [136.31, -27.72],\n *              [136.58, -27.99], [137.50, -28.03], [137.68, -27.68], [137.59, -26.78], [137.50, -26.54]\n *            ]\n *          ]\n *        }\n *      },\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"l\",\n *          \"color\": \"green\",\n *          \"rank\": \"12\",\n *          \"ascii\": \"108\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [140.14, -21.04], [140.31, -29.42], [141.67, -29.49], [141.59, -20.92], [140.14, -21.04]\n *            ]\n *          ]\n *        }\n *      },\n *      {\n *        \"type\": \"Feature\",\n *        \"properties\": {\n *          \"letter\": \"e\",\n *          \"color\": \"red\",\n *          \"rank\": \"5\",\n *          \"ascii\": \"101\"\n *        },\n *        \"geometry\": {\n *          \"type\": \"Polygon\",\n *          \"coordinates\": [\n *            [\n *              [144.14, -27.41], [145.67, -27.52], [146.86, -27.09], [146.82, -25.64], [146.25, -25.04],\n *              [145.45, -24.68], [144.66, -24.60], [144.09, -24.76], [143.43, -25.08], [142.99, -25.40],\n *              [142.64, -26.03], [142.64, -27.05], [142.64, -28.26], [143.30, -29.11], [144.18, -29.57],\n *              [145.41, -29.64], [146.46, -29.19], [146.64, -28.72], [146.82, -28.14], [144.84, -28.42],\n *              [144.31, -28.26], [144.14, -27.41]\n *            ],\n *            [\n *              [144.18, -26.39], [144.53, -26.58], [145.19, -26.62], [145.72, -26.35], [145.81, -25.91],\n *              [145.41, -25.68], [144.97, -25.68], [144.49, -25.64], [144, -25.99], [144.18, -26.39]\n *            ]\n *          ]\n *        }\n *      }\n *    ]\n *  };\n * }\n * ```\n */\nvar AgmDataLayer = /** @class */ (function () {\n    function AgmDataLayer(_manager) {\n        this._manager = _manager;\n        this._addedToManager = false;\n        this._id = (layerId$1++).toString();\n        this._subscriptions = [];\n        /**\n         * This event is fired when a feature in the layer is clicked.\n         */\n        this.layerClick = new EventEmitter();\n        /**\n         * The geoJson to be displayed\n         */\n        this.geoJson = null;\n    }\n    AgmDataLayer_1 = AgmDataLayer;\n    AgmDataLayer.prototype.ngOnInit = function () {\n        if (this._addedToManager) {\n            return;\n        }\n        this._manager.addDataLayer(this);\n        this._addedToManager = true;\n        this._addEventListeners();\n    };\n    AgmDataLayer.prototype._addEventListeners = function () {\n        var _this = this;\n        var listeners = [\n            { name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },\n        ];\n        listeners.forEach(function (obj) {\n            var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n            _this._subscriptions.push(os);\n        });\n    };\n    /** @internal */\n    AgmDataLayer.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmDataLayer.prototype.toString = function () { return \"AgmDataLayer-\" + this._id.toString(); };\n    /** @internal */\n    AgmDataLayer.prototype.ngOnDestroy = function () {\n        this._manager.deleteDataLayer(this);\n        // unsubscribe all registered observable subscriptions\n        this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n    };\n    /** @internal */\n    AgmDataLayer.prototype.ngOnChanges = function (changes) {\n        var _this = this;\n        if (!this._addedToManager) {\n            return;\n        }\n        var geoJsonChange = changes['geoJson'];\n        if (geoJsonChange) {\n            this._manager.updateGeoJson(this, geoJsonChange.currentValue);\n        }\n        var dataOptions = {};\n        AgmDataLayer_1._dataOptionsAttributes.forEach(function (k) { return dataOptions[k] = changes.hasOwnProperty(k) ? changes[k].currentValue : _this[k]; });\n        this._manager.setDataOptions(this, dataOptions);\n    };\n    var AgmDataLayer_1;\n    AgmDataLayer._dataOptionsAttributes = ['style'];\n    AgmDataLayer.ctorParameters = function () { return [\n        { type: DataLayerManager }\n    ]; };\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmDataLayer.prototype, \"layerClick\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmDataLayer.prototype, \"geoJson\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Function)\n    ], AgmDataLayer.prototype, \"style\", void 0);\n    AgmDataLayer = AgmDataLayer_1 = __decorate([\n        Directive({\n            selector: 'agm-data-layer',\n        }),\n        __metadata(\"design:paramtypes\", [DataLayerManager])\n    ], AgmDataLayer);\n    return AgmDataLayer;\n}());\n\n/**\n * Class to implement when you what to be able to make it work with the auto fit bounds feature\n * of AGM.\n */\nvar FitBoundsAccessor = /** @class */ (function () {\n    function FitBoundsAccessor() {\n    }\n    return FitBoundsAccessor;\n}());\n/**\n * The FitBoundsService is responsible for computing the bounds of the a single map.\n */\nvar FitBoundsService = /** @class */ (function () {\n    function FitBoundsService(loader) {\n        var _this = this;\n        this._boundsChangeSampleTime$ = new BehaviorSubject(200);\n        this._includeInBounds$ = new BehaviorSubject(new Map());\n        this.bounds$ = from(loader.load()).pipe(flatMap(function () { return _this._includeInBounds$; }), sample(this._boundsChangeSampleTime$.pipe(switchMap(function (time) { return timer(0, time); }))), map(function (includeInBounds) { return _this._generateBounds(includeInBounds); }), shareReplay(1));\n    }\n    FitBoundsService.prototype._generateBounds = function (includeInBounds) {\n        var bounds = new google.maps.LatLngBounds();\n        includeInBounds.forEach(function (b) { return bounds.extend(b); });\n        return bounds;\n    };\n    FitBoundsService.prototype.addToBounds = function (latLng) {\n        var id = this._createIdentifier(latLng);\n        if (this._includeInBounds$.value.has(id)) {\n            return;\n        }\n        var map = this._includeInBounds$.value;\n        map.set(id, latLng);\n        this._includeInBounds$.next(map);\n    };\n    FitBoundsService.prototype.removeFromBounds = function (latLng) {\n        var map = this._includeInBounds$.value;\n        map.delete(this._createIdentifier(latLng));\n        this._includeInBounds$.next(map);\n    };\n    FitBoundsService.prototype.changeFitBoundsChangeSampleTime = function (timeMs) {\n        this._boundsChangeSampleTime$.next(timeMs);\n    };\n    FitBoundsService.prototype.getBounds$ = function () {\n        return this.bounds$;\n    };\n    FitBoundsService.prototype._createIdentifier = function (latLng) {\n        return latLng.lat + \"+\" + latLng.lng;\n    };\n    FitBoundsService.ctorParameters = function () { return [\n        { type: MapsAPILoader }\n    ]; };\n    FitBoundsService = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [MapsAPILoader])\n    ], FitBoundsService);\n    return FitBoundsService;\n}());\n\n/**\n * Adds the given directive to the auto fit bounds feature when the value is true.\n * To make it work with you custom AGM component, you also have to implement the {@link FitBoundsAccessor} abstract class.\n * @example\n * <agm-marker [agmFitBounds]=\"true\"></agm-marker>\n */\nvar AgmFitBounds = /** @class */ (function () {\n    function AgmFitBounds(_fitBoundsAccessor, _fitBoundsService) {\n        this._fitBoundsAccessor = _fitBoundsAccessor;\n        this._fitBoundsService = _fitBoundsService;\n        /**\n         * If the value is true, the element gets added to the bounds of the map.\n         * Default: true.\n         */\n        this.agmFitBounds = true;\n        this._destroyed$ = new Subject();\n        this._latestFitBoundsDetails = null;\n    }\n    /**\n     * @internal\n     */\n    AgmFitBounds.prototype.ngOnChanges = function () {\n        this._updateBounds();\n    };\n    /**\n     * @internal\n     */\n    AgmFitBounds.prototype.ngOnInit = function () {\n        var _this = this;\n        this._fitBoundsAccessor\n            .getFitBoundsDetails$()\n            .pipe(distinctUntilChanged(function (x, y) {\n            return x.latLng.lat === y.latLng.lat && x.latLng.lng === y.latLng.lng;\n        }), takeUntil(this._destroyed$))\n            .subscribe(function (details) { return _this._updateBounds(details); });\n    };\n    /*\n     Either the location changed, or visible status changed.\n     Possible state changes are\n     invisible -> visible\n     visible -> invisible\n     visible -> visible (new location)\n    */\n    AgmFitBounds.prototype._updateBounds = function (newFitBoundsDetails) {\n        // either visibility will change, or location, so remove the old one anyway\n        if (this._latestFitBoundsDetails) {\n            this._fitBoundsService.removeFromBounds(this._latestFitBoundsDetails.latLng);\n            // don't set latestFitBoundsDetails to null, because we can toggle visibility from\n            // true -> false -> true, in which case we still need old value cached here\n        }\n        if (newFitBoundsDetails) {\n            this._latestFitBoundsDetails = newFitBoundsDetails;\n        }\n        if (!this._latestFitBoundsDetails) {\n            return;\n        }\n        if (this.agmFitBounds === true) {\n            this._fitBoundsService.addToBounds(this._latestFitBoundsDetails.latLng);\n        }\n    };\n    /**\n     * @internal\n     */\n    AgmFitBounds.prototype.ngOnDestroy = function () {\n        this._destroyed$.next();\n        this._destroyed$.complete();\n        if (this._latestFitBoundsDetails !== null) {\n            this._fitBoundsService.removeFromBounds(this._latestFitBoundsDetails.latLng);\n        }\n    };\n    AgmFitBounds.ctorParameters = function () { return [\n        { type: FitBoundsAccessor, decorators: [{ type: Self }] },\n        { type: FitBoundsService }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmFitBounds.prototype, \"agmFitBounds\", void 0);\n    AgmFitBounds = __decorate([\n        Directive({\n            selector: '[agmFitBounds]',\n        }),\n        __param(0, Self()),\n        __metadata(\"design:paramtypes\", [FitBoundsAccessor,\n            FitBoundsService])\n    ], AgmFitBounds);\n    return AgmFitBounds;\n}());\n\nvar MarkerManager = /** @class */ (function () {\n    function MarkerManager(_mapsWrapper, _zone) {\n        this._mapsWrapper = _mapsWrapper;\n        this._zone = _zone;\n        this._markers = new Map();\n    }\n    MarkerManager.prototype.convertAnimation = function (uiAnim) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                if (uiAnim === null) {\n                    return [2 /*return*/, null];\n                }\n                else {\n                    return [2 /*return*/, this._mapsWrapper.getNativeMap().then(function () { return google.maps.Animation[uiAnim]; })];\n                }\n                return [2 /*return*/];\n            });\n        });\n    };\n    MarkerManager.prototype.deleteMarker = function (marker) {\n        var _this = this;\n        var m = this._markers.get(marker);\n        if (m == null) {\n            // marker already deleted\n            return Promise.resolve();\n        }\n        return m.then(function (m) {\n            return _this._zone.run(function () {\n                m.setMap(null);\n                _this._markers.delete(marker);\n            });\n        });\n    };\n    MarkerManager.prototype.updateMarkerPosition = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setPosition({ lat: marker.latitude, lng: marker.longitude }); });\n    };\n    MarkerManager.prototype.updateTitle = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setTitle(marker.title); });\n    };\n    MarkerManager.prototype.updateLabel = function (marker) {\n        return this._markers.get(marker).then(function (m) { m.setLabel(marker.label); });\n    };\n    MarkerManager.prototype.updateDraggable = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setDraggable(marker.draggable); });\n    };\n    MarkerManager.prototype.updateIcon = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setIcon(marker.iconUrl); });\n    };\n    MarkerManager.prototype.updateOpacity = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setOpacity(marker.opacity); });\n    };\n    MarkerManager.prototype.updateVisible = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setVisible(marker.visible); });\n    };\n    MarkerManager.prototype.updateZIndex = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setZIndex(marker.zIndex); });\n    };\n    MarkerManager.prototype.updateClickable = function (marker) {\n        return this._markers.get(marker).then(function (m) { return m.setClickable(marker.clickable); });\n    };\n    MarkerManager.prototype.updateAnimation = function (marker) {\n        return __awaiter(this, void 0, void 0, function () {\n            var m, _a, _b;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0: return [4 /*yield*/, this._markers.get(marker)];\n                    case 1:\n                        m = _c.sent();\n                        _b = (_a = m).setAnimation;\n                        return [4 /*yield*/, this.convertAnimation(marker.animation)];\n                    case 2:\n                        _b.apply(_a, [_c.sent()]);\n                        return [2 /*return*/];\n                }\n            });\n        });\n    };\n    MarkerManager.prototype.addMarker = function (marker) {\n        var _this = this;\n        var markerPromise = new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {\n            var _a, _b, _c;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0:\n                        _b = (_a = this._mapsWrapper).createMarker;\n                        _c = {\n                            position: { lat: marker.latitude, lng: marker.longitude },\n                            label: marker.label,\n                            draggable: marker.draggable,\n                            icon: marker.iconUrl,\n                            opacity: marker.opacity,\n                            visible: marker.visible,\n                            zIndex: marker.zIndex,\n                            title: marker.title,\n                            clickable: marker.clickable\n                        };\n                        return [4 /*yield*/, this.convertAnimation(marker.animation)];\n                    case 1: return [2 /*return*/, _b.apply(_a, [(_c.animation = _d.sent(),\n                                _c)]).then(resolve)];\n                }\n            });\n        }); });\n        this._markers.set(marker, markerPromise);\n    };\n    MarkerManager.prototype.getNativeMarker = function (marker) {\n        return this._markers.get(marker);\n    };\n    MarkerManager.prototype.createEventObservable = function (eventName, marker) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._markers.get(marker).then(function (m) {\n                m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    MarkerManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    MarkerManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], MarkerManager);\n    return MarkerManager;\n}());\n\nvar InfoWindowManager = /** @class */ (function () {\n    function InfoWindowManager(_mapsWrapper, _zone, _markerManager) {\n        this._mapsWrapper = _mapsWrapper;\n        this._zone = _zone;\n        this._markerManager = _markerManager;\n        this._infoWindows = new Map();\n    }\n    InfoWindowManager.prototype.deleteInfoWindow = function (infoWindow) {\n        var _this = this;\n        var iWindow = this._infoWindows.get(infoWindow);\n        if (iWindow == null) {\n            // info window already deleted\n            return Promise.resolve();\n        }\n        return iWindow.then(function (i) {\n            return _this._zone.run(function () {\n                i.close();\n                _this._infoWindows.delete(infoWindow);\n            });\n        });\n    };\n    InfoWindowManager.prototype.setPosition = function (infoWindow) {\n        return this._infoWindows.get(infoWindow).then(function (i) { return i.setPosition({\n            lat: infoWindow.latitude,\n            lng: infoWindow.longitude,\n        }); });\n    };\n    InfoWindowManager.prototype.setZIndex = function (infoWindow) {\n        return this._infoWindows.get(infoWindow)\n            .then(function (i) { return i.setZIndex(infoWindow.zIndex); });\n    };\n    InfoWindowManager.prototype.open = function (infoWindow) {\n        var _this = this;\n        return this._infoWindows.get(infoWindow).then(function (w) {\n            if (infoWindow.hostMarker != null) {\n                return _this._markerManager.getNativeMarker(infoWindow.hostMarker).then(function (marker) {\n                    return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map, marker); });\n                });\n            }\n            return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map); });\n        });\n    };\n    InfoWindowManager.prototype.close = function (infoWindow) {\n        return this._infoWindows.get(infoWindow).then(function (w) { return w.close(); });\n    };\n    InfoWindowManager.prototype.setOptions = function (infoWindow, options) {\n        return this._infoWindows.get(infoWindow).then(function (i) { return i.setOptions(options); });\n    };\n    InfoWindowManager.prototype.addInfoWindow = function (infoWindow) {\n        var options = {\n            content: infoWindow.content,\n            maxWidth: infoWindow.maxWidth,\n            zIndex: infoWindow.zIndex,\n            disableAutoPan: infoWindow.disableAutoPan,\n        };\n        if (typeof infoWindow.latitude === 'number' && typeof infoWindow.longitude === 'number') {\n            options.position = { lat: infoWindow.latitude, lng: infoWindow.longitude };\n        }\n        var infoWindowPromise = this._mapsWrapper.createInfoWindow(options);\n        this._infoWindows.set(infoWindow, infoWindowPromise);\n    };\n    /**\n     * Creates a Google Maps event listener for the given InfoWindow as an Observable\n     */\n    InfoWindowManager.prototype.createEventObservable = function (eventName, infoWindow) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._infoWindows.get(infoWindow).then(function (i) {\n                i.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    InfoWindowManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone },\n        { type: MarkerManager }\n    ]; };\n    InfoWindowManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone,\n            MarkerManager])\n    ], InfoWindowManager);\n    return InfoWindowManager;\n}());\n\nvar infoWindowId = 0;\n/**\n * AgmInfoWindow renders a info window inside a {@link AgmMarker} or standalone.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  styles: [`\n *    .agm-map-container {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *      <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n *        <agm-info-window [disableAutoPan]=\"true\">\n *          Hi, this is the content of the <strong>info window</strong>\n *        </agm-info-window>\n *      </agm-marker>\n *    </agm-map>\n *  `\n * })\n * ```\n */\nvar AgmInfoWindow = /** @class */ (function () {\n    function AgmInfoWindow(_infoWindowManager, _el) {\n        this._infoWindowManager = _infoWindowManager;\n        this._el = _el;\n        /**\n         * Sets the open state for the InfoWindow. You can also call the open() and close() methods.\n         */\n        this.isOpen = false;\n        /**\n         * Emits an event when the info window is closed.\n         */\n        this.infoWindowClose = new EventEmitter();\n        this._infoWindowAddedToManager = false;\n        this._id = (infoWindowId++).toString();\n    }\n    AgmInfoWindow_1 = AgmInfoWindow;\n    AgmInfoWindow.prototype.ngOnInit = function () {\n        this.content = this._el.nativeElement.querySelector('.agm-info-window-content');\n        this._infoWindowManager.addInfoWindow(this);\n        this._infoWindowAddedToManager = true;\n        this._updateOpenState();\n        this._registerEventListeners();\n    };\n    /** @internal */\n    AgmInfoWindow.prototype.ngOnChanges = function (changes) {\n        if (!this._infoWindowAddedToManager) {\n            return;\n        }\n        if ((changes['latitude'] || changes['longitude']) && typeof this.latitude === 'number' &&\n            typeof this.longitude === 'number') {\n            this._infoWindowManager.setPosition(this);\n        }\n        if (changes['zIndex']) {\n            this._infoWindowManager.setZIndex(this);\n        }\n        if (changes['isOpen']) {\n            this._updateOpenState();\n        }\n        this._setInfoWindowOptions(changes);\n    };\n    AgmInfoWindow.prototype._registerEventListeners = function () {\n        var _this = this;\n        this._infoWindowManager.createEventObservable('closeclick', this).subscribe(function () {\n            _this.isOpen = false;\n            _this.infoWindowClose.emit();\n        });\n    };\n    AgmInfoWindow.prototype._updateOpenState = function () {\n        this.isOpen ? this.open() : this.close();\n    };\n    AgmInfoWindow.prototype._setInfoWindowOptions = function (changes) {\n        var options = {};\n        var optionKeys = Object.keys(changes).filter(function (k) { return AgmInfoWindow_1._infoWindowOptionsInputs.indexOf(k) !== -1; });\n        optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n        this._infoWindowManager.setOptions(this, options);\n    };\n    /**\n     * Opens the info window.\n     */\n    AgmInfoWindow.prototype.open = function () { return this._infoWindowManager.open(this); };\n    /**\n     * Closes the info window.\n     */\n    AgmInfoWindow.prototype.close = function () {\n        var _this = this;\n        return this._infoWindowManager.close(this).then(function () { _this.infoWindowClose.emit(); });\n    };\n    /** @internal */\n    AgmInfoWindow.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmInfoWindow.prototype.toString = function () { return 'AgmInfoWindow-' + this._id.toString(); };\n    /** @internal */\n    AgmInfoWindow.prototype.ngOnDestroy = function () { this._infoWindowManager.deleteInfoWindow(this); };\n    var AgmInfoWindow_1;\n    AgmInfoWindow._infoWindowOptionsInputs = ['disableAutoPan', 'maxWidth'];\n    AgmInfoWindow.ctorParameters = function () { return [\n        { type: InfoWindowManager },\n        { type: ElementRef }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmInfoWindow.prototype, \"latitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmInfoWindow.prototype, \"longitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Boolean)\n    ], AgmInfoWindow.prototype, \"disableAutoPan\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmInfoWindow.prototype, \"zIndex\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmInfoWindow.prototype, \"maxWidth\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmInfoWindow.prototype, \"isOpen\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmInfoWindow.prototype, \"infoWindowClose\", void 0);\n    AgmInfoWindow = AgmInfoWindow_1 = __decorate([\n        Component({\n            selector: 'agm-info-window',\n            template: \"<div class='agm-info-window-content'>\\n      <ng-content></ng-content>\\n    </div>\\n  \"\n        }),\n        __metadata(\"design:paramtypes\", [InfoWindowManager, ElementRef])\n    ], AgmInfoWindow);\n    return AgmInfoWindow;\n}());\n\n/**\n * Manages all KML Layers for a Google Map instance.\n */\nvar KmlLayerManager = /** @class */ (function () {\n    function KmlLayerManager(_wrapper, _zone) {\n        this._wrapper = _wrapper;\n        this._zone = _zone;\n        this._layers = new Map();\n    }\n    /**\n     * Adds a new KML Layer to the map.\n     */\n    KmlLayerManager.prototype.addKmlLayer = function (layer) {\n        var newLayer = this._wrapper.getNativeMap().then(function (m) {\n            return new google.maps.KmlLayer({\n                clickable: layer.clickable,\n                map: m,\n                preserveViewport: layer.preserveViewport,\n                screenOverlays: layer.screenOverlays,\n                suppressInfoWindows: layer.suppressInfoWindows,\n                url: layer.url,\n                zIndex: layer.zIndex,\n            });\n        });\n        this._layers.set(layer, newLayer);\n    };\n    KmlLayerManager.prototype.setOptions = function (layer, options) {\n        this._layers.get(layer).then(function (l) { return l.setOptions(options); });\n    };\n    KmlLayerManager.prototype.deleteKmlLayer = function (layer) {\n        var _this = this;\n        this._layers.get(layer).then(function (l) {\n            l.setMap(null);\n            _this._layers.delete(layer);\n        });\n    };\n    /**\n     * Creates a Google Maps event listener for the given KmlLayer as an Observable\n     */\n    KmlLayerManager.prototype.createEventObservable = function (eventName, layer) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._layers.get(layer).then(function (m) {\n                m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    KmlLayerManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    KmlLayerManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], KmlLayerManager);\n    return KmlLayerManager;\n}());\n\nvar layerId$2 = 0;\nvar AgmKmlLayer = /** @class */ (function () {\n    function AgmKmlLayer(_manager) {\n        this._manager = _manager;\n        this._addedToManager = false;\n        this._id = (layerId$2++).toString();\n        this._subscriptions = [];\n        /**\n         * If true, the layer receives mouse events. Default value is true.\n         */\n        this.clickable = true;\n        /**\n         * By default, the input map is centered and zoomed to the bounding box of the contents of the\n         * layer.\n         * If this option is set to true, the viewport is left unchanged, unless the map's center and zoom\n         * were never set.\n         */\n        this.preserveViewport = false;\n        /**\n         * Whether to render the screen overlays. Default true.\n         */\n        this.screenOverlays = true;\n        /**\n         * Suppress the rendering of info windows when layer features are clicked.\n         */\n        this.suppressInfoWindows = false;\n        /**\n         * The URL of the KML document to display.\n         */\n        this.url = null;\n        /**\n         * The z-index of the layer.\n         */\n        this.zIndex = null;\n        /**\n         * This event is fired when a feature in the layer is clicked.\n         */\n        this.layerClick = new EventEmitter();\n        /**\n         * This event is fired when the KML layers default viewport has changed.\n         */\n        this.defaultViewportChange = new EventEmitter();\n        /**\n         * This event is fired when the KML layer has finished loading.\n         * At this point it is safe to read the status property to determine if the layer loaded\n         * successfully.\n         */\n        this.statusChange = new EventEmitter();\n    }\n    AgmKmlLayer_1 = AgmKmlLayer;\n    AgmKmlLayer.prototype.ngOnInit = function () {\n        if (this._addedToManager) {\n            return;\n        }\n        this._manager.addKmlLayer(this);\n        this._addedToManager = true;\n        this._addEventListeners();\n    };\n    AgmKmlLayer.prototype.ngOnChanges = function (changes) {\n        if (!this._addedToManager) {\n            return;\n        }\n        this._updatePolygonOptions(changes);\n    };\n    AgmKmlLayer.prototype._updatePolygonOptions = function (changes) {\n        var options = Object.keys(changes)\n            .filter(function (k) { return AgmKmlLayer_1._kmlLayerOptions.indexOf(k) !== -1; })\n            .reduce(function (obj, k) {\n            obj[k] = changes[k].currentValue;\n            return obj;\n        }, {});\n        if (Object.keys(options).length > 0) {\n            this._manager.setOptions(this, options);\n        }\n    };\n    AgmKmlLayer.prototype._addEventListeners = function () {\n        var _this = this;\n        var listeners = [\n            { name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },\n            { name: 'defaultviewport_changed', handler: function () { return _this.defaultViewportChange.emit(); } },\n            { name: 'status_changed', handler: function () { return _this.statusChange.emit(); } },\n        ];\n        listeners.forEach(function (obj) {\n            var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n            _this._subscriptions.push(os);\n        });\n    };\n    /** @internal */\n    AgmKmlLayer.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmKmlLayer.prototype.toString = function () { return \"AgmKmlLayer-\" + this._id.toString(); };\n    /** @internal */\n    AgmKmlLayer.prototype.ngOnDestroy = function () {\n        this._manager.deleteKmlLayer(this);\n        // unsubscribe all registered observable subscriptions\n        this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n    };\n    var AgmKmlLayer_1;\n    AgmKmlLayer._kmlLayerOptions = ['clickable', 'preserveViewport', 'screenOverlays', 'suppressInfoWindows', 'url', 'zIndex'];\n    AgmKmlLayer.ctorParameters = function () { return [\n        { type: KmlLayerManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmKmlLayer.prototype, \"clickable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmKmlLayer.prototype, \"preserveViewport\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmKmlLayer.prototype, \"screenOverlays\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmKmlLayer.prototype, \"suppressInfoWindows\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmKmlLayer.prototype, \"url\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmKmlLayer.prototype, \"zIndex\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmKmlLayer.prototype, \"layerClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmKmlLayer.prototype, \"defaultViewportChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmKmlLayer.prototype, \"statusChange\", void 0);\n    AgmKmlLayer = AgmKmlLayer_1 = __decorate([\n        Directive({\n            selector: 'agm-kml-layer',\n        }),\n        __metadata(\"design:paramtypes\", [KmlLayerManager])\n    ], AgmKmlLayer);\n    return AgmKmlLayer;\n}());\n\nfunction createMVCEventObservable(array) {\n    var eventNames = ['insert_at', 'remove_at', 'set_at'];\n    return fromEventPattern(function (handler) { return eventNames.map(function (evName) { return array.addListener(evName, function (index, previous) { return handler.apply(array, [{ 'newArr': array.getArray(), evName: evName, index: index, previous: previous }]); }); }); }, function (_handler, evListeners) { return evListeners.forEach(function (evListener) { return evListener.remove(); }); });\n}\nvar MvcArrayMock = /** @class */ (function () {\n    function MvcArrayMock() {\n        this.vals = [];\n        this.listeners = {\n            'remove_at': [],\n            'insert_at': [],\n            'set_at': [],\n        };\n    }\n    MvcArrayMock.prototype.clear = function () {\n        for (var i = this.vals.length - 1; i >= 0; i--) {\n            this.removeAt(i);\n        }\n    };\n    MvcArrayMock.prototype.getArray = function () {\n        return __spread(this.vals);\n    };\n    MvcArrayMock.prototype.getAt = function (i) {\n        return this.vals[i];\n    };\n    MvcArrayMock.prototype.getLength = function () {\n        return this.vals.length;\n    };\n    MvcArrayMock.prototype.insertAt = function (i, elem) {\n        this.vals.splice(i, 0, elem);\n        this.listeners.insert_at.map(function (listener) { return listener(i); });\n    };\n    MvcArrayMock.prototype.pop = function () {\n        var _this = this;\n        var deleted = this.vals.pop();\n        this.listeners.remove_at.map(function (listener) { return listener(_this.vals.length, deleted); });\n        return deleted;\n    };\n    MvcArrayMock.prototype.push = function (elem) {\n        var _this = this;\n        this.vals.push(elem);\n        this.listeners.insert_at.map(function (listener) { return listener(_this.vals.length - 1); });\n        return this.vals.length;\n    };\n    MvcArrayMock.prototype.removeAt = function (i) {\n        var deleted = this.vals.splice(i, 1)[0];\n        this.listeners.remove_at.map(function (listener) { return listener(i, deleted); });\n        return deleted;\n    };\n    MvcArrayMock.prototype.setAt = function (i, elem) {\n        var deleted = this.vals[i];\n        this.vals[i] = elem;\n        this.listeners.set_at.map(function (listener) { return listener(i, deleted); });\n    };\n    MvcArrayMock.prototype.forEach = function (callback) {\n        this.vals.forEach(callback);\n    };\n    MvcArrayMock.prototype.addListener = function (eventName, handler) {\n        var listenerArr = this.listeners[eventName];\n        listenerArr.push(handler);\n        return {\n            remove: function () {\n                listenerArr.splice(listenerArr.indexOf(handler), 1);\n            },\n        };\n    };\n    return MvcArrayMock;\n}());\n\nvar PolygonManager = /** @class */ (function () {\n    function PolygonManager(_mapsWrapper, _zone) {\n        this._mapsWrapper = _mapsWrapper;\n        this._zone = _zone;\n        this._polygons = new Map();\n    }\n    PolygonManager.prototype.addPolygon = function (path) {\n        var polygonPromise = this._mapsWrapper.createPolygon({\n            clickable: path.clickable,\n            draggable: path.draggable,\n            editable: path.editable,\n            fillColor: path.fillColor,\n            fillOpacity: path.fillOpacity,\n            geodesic: path.geodesic,\n            paths: path.paths,\n            strokeColor: path.strokeColor,\n            strokeOpacity: path.strokeOpacity,\n            strokeWeight: path.strokeWeight,\n            visible: path.visible,\n            zIndex: path.zIndex,\n        });\n        this._polygons.set(path, polygonPromise);\n    };\n    PolygonManager.prototype.updatePolygon = function (polygon) {\n        var _this = this;\n        var m = this._polygons.get(polygon);\n        if (m == null) {\n            return Promise.resolve();\n        }\n        return m.then(function (l) { return _this._zone.run(function () { l.setPaths(polygon.paths); }); });\n    };\n    PolygonManager.prototype.setPolygonOptions = function (path, options) {\n        return this._polygons.get(path).then(function (l) { l.setOptions(options); });\n    };\n    PolygonManager.prototype.deletePolygon = function (paths) {\n        var _this = this;\n        var m = this._polygons.get(paths);\n        if (m == null) {\n            return Promise.resolve();\n        }\n        return m.then(function (l) {\n            return _this._zone.run(function () {\n                l.setMap(null);\n                _this._polygons.delete(paths);\n            });\n        });\n    };\n    PolygonManager.prototype.getPath = function (polygon) {\n        return this._polygons.get(polygon)\n            .then(function (polygon) { return polygon.getPath().getArray(); });\n    };\n    PolygonManager.prototype.getPaths = function (polygon) {\n        return this._polygons.get(polygon)\n            .then(function (polygon) { return polygon.getPaths().getArray().map(function (p) { return p.getArray(); }); });\n    };\n    PolygonManager.prototype.createEventObservable = function (eventName, path) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._polygons.get(path).then(function (l) {\n                l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    PolygonManager.prototype.createPathEventObservable = function (agmPolygon) {\n        return __awaiter(this, void 0, void 0, function () {\n            var polygon, paths, pathsChanges$;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, this._polygons.get(agmPolygon)];\n                    case 1:\n                        polygon = _a.sent();\n                        paths = polygon.getPaths();\n                        pathsChanges$ = createMVCEventObservable(paths);\n                        return [2 /*return*/, pathsChanges$.pipe(startWith({ newArr: paths.getArray() }), // in order to subscribe to them all\n                            switchMap(function (parentMVEvent) { return merge.apply(void 0, __spread(// rest parameter\n                            parentMVEvent.newArr.map(function (chMVC, index) {\n                                return createMVCEventObservable(chMVC)\n                                    .pipe(map(function (chMVCEvent) { return ({ parentMVEvent: parentMVEvent, chMVCEvent: chMVCEvent, pathIndex: index }); }));\n                            }))).pipe(startWith({ parentMVEvent: parentMVEvent, chMVCEvent: null, pathIndex: null })); }), // start the merged ob with an event signinifing change to parent\n                            skip(1), // skip the manually added event\n                            map(function (_a) {\n                                var parentMVEvent = _a.parentMVEvent, chMVCEvent = _a.chMVCEvent, pathIndex = _a.pathIndex;\n                                var retVal;\n                                if (!chMVCEvent) {\n                                    retVal = {\n                                        newArr: parentMVEvent.newArr.map(function (subArr) { return subArr.getArray().map(function (latLng) { return latLng.toJSON(); }); }),\n                                        eventName: parentMVEvent.evName,\n                                        index: parentMVEvent.index,\n                                    };\n                                    if (parentMVEvent.previous) {\n                                        retVal.previous = parentMVEvent.previous.getArray();\n                                    }\n                                }\n                                else {\n                                    retVal = {\n                                        newArr: parentMVEvent.newArr.map(function (subArr) { return subArr.getArray().map(function (latLng) { return latLng.toJSON(); }); }),\n                                        pathIndex: pathIndex,\n                                        eventName: chMVCEvent.evName,\n                                        index: chMVCEvent.index,\n                                    };\n                                    if (chMVCEvent.previous) {\n                                        retVal.previous = chMVCEvent.previous;\n                                    }\n                                }\n                                return retVal;\n                            }))];\n                }\n            });\n        });\n    };\n    PolygonManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    PolygonManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], PolygonManager);\n    return PolygonManager;\n}());\n\nvar PolylineManager = /** @class */ (function () {\n    function PolylineManager(_mapsWrapper, _zone) {\n        this._mapsWrapper = _mapsWrapper;\n        this._zone = _zone;\n        this._polylines = new Map();\n    }\n    PolylineManager_1 = PolylineManager;\n    PolylineManager._convertPoints = function (line) {\n        var path = line._getPoints().map(function (point) {\n            return { lat: point.latitude, lng: point.longitude };\n        });\n        return path;\n    };\n    PolylineManager._convertPath = function (path) {\n        var symbolPath = google.maps.SymbolPath[path];\n        if (typeof symbolPath === 'number') {\n            return symbolPath;\n        }\n        else {\n            return path;\n        }\n    };\n    PolylineManager._convertIcons = function (line) {\n        var icons = line._getIcons().map(function (agmIcon) { return ({\n            fixedRotation: agmIcon.fixedRotation,\n            offset: agmIcon.offset,\n            repeat: agmIcon.repeat,\n            icon: {\n                anchor: new google.maps.Point(agmIcon.anchorX, agmIcon.anchorY),\n                fillColor: agmIcon.fillColor,\n                fillOpacity: agmIcon.fillOpacity,\n                path: PolylineManager_1._convertPath(agmIcon.path),\n                rotation: agmIcon.rotation,\n                scale: agmIcon.scale,\n                strokeColor: agmIcon.strokeColor,\n                strokeOpacity: agmIcon.strokeOpacity,\n                strokeWeight: agmIcon.strokeWeight,\n            },\n        }); });\n        // prune undefineds;\n        icons.forEach(function (icon) {\n            Object.entries(icon).forEach(function (_a) {\n                var _b = __read(_a, 2), key = _b[0], val = _b[1];\n                if (typeof val === 'undefined') {\n                    delete icon[key];\n                }\n            });\n            if (typeof icon.icon.anchor.x === 'undefined' ||\n                typeof icon.icon.anchor.y === 'undefined') {\n                delete icon.icon.anchor;\n            }\n        });\n        return icons;\n    };\n    PolylineManager.prototype.addPolyline = function (line) {\n        var _this = this;\n        var polylinePromise = this._mapsWrapper.getNativeMap()\n            .then(function () { return [PolylineManager_1._convertPoints(line),\n            PolylineManager_1._convertIcons(line)]; })\n            .then(function (_a) {\n            var _b = __read(_a, 2), path = _b[0], icons = _b[1];\n            return _this._mapsWrapper.createPolyline({\n                clickable: line.clickable,\n                draggable: line.draggable,\n                editable: line.editable,\n                geodesic: line.geodesic,\n                strokeColor: line.strokeColor,\n                strokeOpacity: line.strokeOpacity,\n                strokeWeight: line.strokeWeight,\n                visible: line.visible,\n                zIndex: line.zIndex,\n                path: path,\n                icons: icons,\n            });\n        });\n        this._polylines.set(line, polylinePromise);\n    };\n    PolylineManager.prototype.updatePolylinePoints = function (line) {\n        var _this = this;\n        var path = PolylineManager_1._convertPoints(line);\n        var m = this._polylines.get(line);\n        if (m == null) {\n            return Promise.resolve();\n        }\n        return m.then(function (l) { return _this._zone.run(function () { l.setPath(path); }); });\n    };\n    PolylineManager.prototype.updateIconSequences = function (line) {\n        return __awaiter(this, void 0, void 0, function () {\n            var icons, m;\n            var _this = this;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, this._mapsWrapper.getNativeMap()];\n                    case 1:\n                        _a.sent();\n                        icons = PolylineManager_1._convertIcons(line);\n                        m = this._polylines.get(line);\n                        if (m == null) {\n                            return [2 /*return*/];\n                        }\n                        return [2 /*return*/, m.then(function (l) { return _this._zone.run(function () { return l.setOptions({ icons: icons }); }); })];\n                }\n            });\n        });\n    };\n    PolylineManager.prototype.setPolylineOptions = function (line, options) {\n        return this._polylines.get(line).then(function (l) { l.setOptions(options); });\n    };\n    PolylineManager.prototype.deletePolyline = function (line) {\n        var _this = this;\n        var m = this._polylines.get(line);\n        if (m == null) {\n            return Promise.resolve();\n        }\n        return m.then(function (l) {\n            return _this._zone.run(function () {\n                l.setMap(null);\n                _this._polylines.delete(line);\n            });\n        });\n    };\n    PolylineManager.prototype.getMVCPath = function (agmPolyline) {\n        return __awaiter(this, void 0, void 0, function () {\n            var polyline;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, this._polylines.get(agmPolyline)];\n                    case 1:\n                        polyline = _a.sent();\n                        return [2 /*return*/, polyline.getPath()];\n                }\n            });\n        });\n    };\n    PolylineManager.prototype.getPath = function (agmPolyline) {\n        return __awaiter(this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, this.getMVCPath(agmPolyline)];\n                    case 1: return [2 /*return*/, (_a.sent()).getArray()];\n                }\n            });\n        });\n    };\n    PolylineManager.prototype.createEventObservable = function (eventName, line) {\n        var _this = this;\n        return new Observable(function (observer) {\n            _this._polylines.get(line).then(function (l) {\n                l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n        });\n    };\n    PolylineManager.prototype.createPathEventObservable = function (line) {\n        return __awaiter(this, void 0, void 0, function () {\n            var mvcPath;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0: return [4 /*yield*/, this.getMVCPath(line)];\n                    case 1:\n                        mvcPath = _a.sent();\n                        return [2 /*return*/, createMVCEventObservable(mvcPath)];\n                }\n            });\n        });\n    };\n    var PolylineManager_1;\n    PolylineManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    PolylineManager = PolylineManager_1 = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], PolylineManager);\n    return PolylineManager;\n}());\n\nvar RectangleManager = /** @class */ (function () {\n    function RectangleManager(_apiWrapper, _zone) {\n        this._apiWrapper = _apiWrapper;\n        this._zone = _zone;\n        this._rectangles = new Map();\n    }\n    RectangleManager.prototype.addRectangle = function (rectangle) {\n        this._rectangles.set(rectangle, this._apiWrapper.createRectangle({\n            bounds: {\n                north: rectangle.north,\n                east: rectangle.east,\n                south: rectangle.south,\n                west: rectangle.west,\n            },\n            clickable: rectangle.clickable,\n            draggable: rectangle.draggable,\n            editable: rectangle.editable,\n            fillColor: rectangle.fillColor,\n            fillOpacity: rectangle.fillOpacity,\n            strokeColor: rectangle.strokeColor,\n            strokeOpacity: rectangle.strokeOpacity,\n            strokePosition: rectangle.strokePosition,\n            strokeWeight: rectangle.strokeWeight,\n            visible: rectangle.visible,\n            zIndex: rectangle.zIndex,\n        }));\n    };\n    /**\n     * Removes the given rectangle from the map.\n     */\n    RectangleManager.prototype.removeRectangle = function (rectangle) {\n        var _this = this;\n        return this._rectangles.get(rectangle).then(function (r) {\n            r.setMap(null);\n            _this._rectangles.delete(rectangle);\n        });\n    };\n    RectangleManager.prototype.setOptions = function (rectangle, options) {\n        return this._rectangles.get(rectangle).then(function (r) { return r.setOptions(options); });\n    };\n    RectangleManager.prototype.getBounds = function (rectangle) {\n        return this._rectangles.get(rectangle).then(function (r) { return r.getBounds(); });\n    };\n    RectangleManager.prototype.setBounds = function (rectangle) {\n        return this._rectangles.get(rectangle).then(function (r) {\n            return r.setBounds({\n                north: rectangle.north,\n                east: rectangle.east,\n                south: rectangle.south,\n                west: rectangle.west,\n            });\n        });\n    };\n    RectangleManager.prototype.setEditable = function (rectangle) {\n        return this._rectangles.get(rectangle).then(function (r) {\n            return r.setEditable(rectangle.editable);\n        });\n    };\n    RectangleManager.prototype.setDraggable = function (rectangle) {\n        return this._rectangles.get(rectangle).then(function (r) {\n            return r.setDraggable(rectangle.draggable);\n        });\n    };\n    RectangleManager.prototype.setVisible = function (rectangle) {\n        return this._rectangles.get(rectangle).then(function (r) {\n            return r.setVisible(rectangle.visible);\n        });\n    };\n    RectangleManager.prototype.createEventObservable = function (eventName, rectangle) {\n        var _this = this;\n        return Observable.create(function (observer) {\n            var listener = null;\n            _this._rectangles.get(rectangle).then(function (r) {\n                listener = r.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n            });\n            return function () {\n                if (listener !== null) {\n                    listener.remove();\n                }\n            };\n        });\n    };\n    RectangleManager.ctorParameters = function () { return [\n        { type: GoogleMapsAPIWrapper },\n        { type: NgZone }\n    ]; };\n    RectangleManager = __decorate([\n        Injectable(),\n        __metadata(\"design:paramtypes\", [GoogleMapsAPIWrapper, NgZone])\n    ], RectangleManager);\n    return RectangleManager;\n}());\n\n/**\n * AgmMap renders a Google Map.\n * **Important note**: To be able see a map in the browser, you have to define a height for the\n * element `agm-map`.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  styles: [`\n *    agm-map {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *    </agm-map>\n *  `\n * })\n * ```\n */\nvar AgmMap = /** @class */ (function () {\n    function AgmMap(_elem, _mapsWrapper, _platformId, _fitBoundsService, _zone) {\n        this._elem = _elem;\n        this._mapsWrapper = _mapsWrapper;\n        this._platformId = _platformId;\n        this._fitBoundsService = _fitBoundsService;\n        this._zone = _zone;\n        /**\n         * The longitude that defines the center of the map.\n         */\n        this.longitude = 0;\n        /**\n         * The latitude that defines the center of the map.\n         */\n        this.latitude = 0;\n        /**\n         * The zoom level of the map. The default zoom level is 8.\n         */\n        this.zoom = 8;\n        /**\n         * Enables/disables if map is draggable.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = true;\n        /**\n         * Enables/disables zoom and center on double click. Enabled by default.\n         */\n        this.disableDoubleClickZoom = false;\n        /**\n         * Enables/disables all default UI of the Google map. Please note: When the map is created, this\n         * value cannot get updated.\n         */\n        this.disableDefaultUI = false;\n        /**\n         * If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.\n         */\n        this.scrollwheel = true;\n        /**\n         * If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are\n         * enabled by default.\n         */\n        this.keyboardShortcuts = true;\n        /**\n         * Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain\n         * modes, these styles will only apply to labels and geometry.\n         */\n        this.styles = [];\n        /**\n         * When true and the latitude and/or longitude values changes, the Google Maps panTo method is\n         * used to\n         * center the map. See: https://developers.google.com/maps/documentation/javascript/reference#Map\n         */\n        this.usePanning = false;\n        /**\n         * Sets the viewport to contain the given bounds.\n         * If this option to `true`, the bounds get automatically computed from all elements that use the {@link AgmFitBounds} directive.\n         */\n        this.fitBounds = false;\n        /**\n         * The initial enabled/disabled state of the Scale control. This is disabled by default.\n         */\n        this.scaleControl = false;\n        /**\n         * The initial enabled/disabled state of the Map type control.\n         */\n        this.mapTypeControl = false;\n        /**\n         * The initial enabled/disabled state of the Pan control.\n         */\n        this.panControl = false;\n        /**\n         * The initial enabled/disabled state of the Rotate control.\n         */\n        this.rotateControl = false;\n        /**\n         * The initial enabled/disabled state of the Fullscreen control.\n         */\n        this.fullscreenControl = false;\n        /**\n         * The map mapTypeId. Defaults to 'roadmap'.\n         */\n        this.mapTypeId = 'roadmap';\n        /**\n         * When false, map icons are not clickable. A map icon represents a point of interest,\n         * also known as a POI. By default map icons are clickable.\n         */\n        this.clickableIcons = true;\n        /**\n         * A map icon represents a point of interest, also known as a POI.\n         * When map icons are clickable by default, an info window is displayed.\n         * When this property is set to false, the info window will not be shown but the click event\n         * will still fire\n         */\n        this.showDefaultInfoWindow = true;\n        /**\n         * This setting controls how gestures on the map are handled.\n         * Allowed values:\n         * - 'cooperative' (Two-finger touch gestures pan and zoom the map. One-finger touch gestures are not handled by the map.)\n         * - 'greedy'      (All touch gestures pan or zoom the map.)\n         * - 'none'        (The map cannot be panned or zoomed by user gestures.)\n         * - 'auto'        [default] (Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or not.\n         */\n        this.gestureHandling = 'auto';\n        /**\n         * Controls the automatic switching behavior for the angle of incidence of\n         * the map. The only allowed values are 0 and 45. The value 0 causes the map\n         * to always use a 0° overhead view regardless of the zoom level and\n         * viewport. The value 45 causes the tilt angle to automatically switch to\n         * 45 whenever 45° imagery is available for the current zoom level and\n         * viewport, and switch back to 0 whenever 45° imagery is not available\n         * (this is the default behavior). 45° imagery is only available for\n         * satellite and hybrid map types, within some locations, and at some zoom\n         * levels. Note: getTilt returns the current tilt angle, not the value\n         * specified by this option. Because getTilt and this option refer to\n         * different things, do not bind() the tilt property; doing so may yield\n         * unpredictable effects. (Default of AGM is 0 (disabled). Enable it with value 45.)\n         */\n        this.tilt = 0;\n        this._observableSubscriptions = [];\n        /**\n         * This event emitter gets emitted when the user clicks on the map (but not when they click on a\n         * marker or infoWindow).\n         */\n        this.mapClick = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user right-clicks on the map (but not when they click\n         * on a marker or infoWindow).\n         */\n        this.mapRightClick = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user double-clicks on the map (but not when they click\n         * on a marker or infoWindow).\n         */\n        this.mapDblClick = new EventEmitter();\n        /**\n         * This event emitter is fired when the map center changes.\n         */\n        this.centerChange = new EventEmitter();\n        /**\n         * This event is fired when the viewport bounds have changed.\n         */\n        this.boundsChange = new EventEmitter();\n        /**\n         * This event is fired when the mapTypeId property changes.\n         */\n        this.mapTypeIdChange = new EventEmitter();\n        /**\n         * This event is fired when the map becomes idle after panning or zooming.\n         */\n        this.idle = new EventEmitter();\n        /**\n         * This event is fired when the zoom level has changed.\n         */\n        this.zoomChange = new EventEmitter();\n        /**\n         * This event is fired when the google map is fully initialized.\n         * You get the google.maps.Map instance as a result of this EventEmitter.\n         */\n        this.mapReady = new EventEmitter();\n        /**\n         * This event is fired when the visible tiles have finished loading.\n         */\n        this.tilesLoaded = new EventEmitter();\n    }\n    AgmMap_1 = AgmMap;\n    /** @internal */\n    AgmMap.prototype.ngOnInit = function () {\n        if (isPlatformServer(this._platformId)) {\n            // The code is running on the server, do nothing\n            return;\n        }\n        // todo: this should be solved with a new component and a viewChild decorator\n        var container = this._elem.nativeElement.querySelector('.agm-map-container-inner');\n        this._initMapInstance(container);\n    };\n    AgmMap.prototype._initMapInstance = function (el) {\n        var _this = this;\n        this._mapsWrapper.createMap(el, {\n            center: { lat: this.latitude || 0, lng: this.longitude || 0 },\n            zoom: this.zoom,\n            minZoom: this.minZoom,\n            maxZoom: this.maxZoom,\n            controlSize: this.controlSize,\n            disableDefaultUI: this.disableDefaultUI,\n            disableDoubleClickZoom: this.disableDoubleClickZoom,\n            scrollwheel: this.scrollwheel,\n            backgroundColor: this.backgroundColor,\n            draggable: this.draggable,\n            draggableCursor: this.draggableCursor,\n            draggingCursor: this.draggingCursor,\n            keyboardShortcuts: this.keyboardShortcuts,\n            styles: this.styles,\n            zoomControl: this.zoomControl,\n            zoomControlOptions: this.zoomControlOptions,\n            streetViewControl: this.streetViewControl,\n            streetViewControlOptions: this.streetViewControlOptions,\n            scaleControl: this.scaleControl,\n            scaleControlOptions: this.scaleControlOptions,\n            mapTypeControl: this.mapTypeControl,\n            mapTypeControlOptions: this.mapTypeControlOptions,\n            panControl: this.panControl,\n            panControlOptions: this.panControlOptions,\n            rotateControl: this.rotateControl,\n            rotateControlOptions: this.rotateControlOptions,\n            fullscreenControl: this.fullscreenControl,\n            fullscreenControlOptions: this.fullscreenControlOptions,\n            mapTypeId: this.mapTypeId,\n            clickableIcons: this.clickableIcons,\n            gestureHandling: this.gestureHandling,\n            tilt: this.tilt,\n            restriction: this.restriction,\n        })\n            .then(function () { return _this._mapsWrapper.getNativeMap(); })\n            .then(function (map) { return _this.mapReady.emit(map); });\n        // register event listeners\n        this._handleMapCenterChange();\n        this._handleMapZoomChange();\n        this._handleMapMouseEvents();\n        this._handleBoundsChange();\n        this._handleMapTypeIdChange();\n        this._handleTilesLoadedEvent();\n        this._handleIdleEvent();\n    };\n    /** @internal */\n    AgmMap.prototype.ngOnDestroy = function () {\n        // unsubscribe all registered observable subscriptions\n        this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });\n        // remove all listeners from the map instance\n        this._mapsWrapper.clearInstanceListeners();\n        if (this._fitBoundsSubscription) {\n            this._fitBoundsSubscription.unsubscribe();\n        }\n    };\n    /* @internal */\n    AgmMap.prototype.ngOnChanges = function (changes) {\n        this._updateMapOptionsChanges(changes);\n        this._updatePosition(changes);\n    };\n    AgmMap.prototype._updateMapOptionsChanges = function (changes) {\n        var options = {};\n        var optionKeys = Object.keys(changes).filter(function (k) { return AgmMap_1._mapOptionsAttributes.indexOf(k) !== -1; });\n        optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n        this._mapsWrapper.setMapOptions(options);\n    };\n    /**\n     * Triggers a resize event on the google map instance.\n     * When recenter is true, the of the google map gets called with the current lat/lng values or fitBounds value to recenter the map.\n     * Returns a promise that gets resolved after the event was triggered.\n     */\n    AgmMap.prototype.triggerResize = function (recenter) {\n        var _this = this;\n        if (recenter === void 0) { recenter = true; }\n        // Note: When we would trigger the resize event and show the map in the same turn (which is a\n        // common case for triggering a resize event), then the resize event would not\n        // work (to show the map), so we trigger the event in a timeout.\n        return new Promise(function (resolve) {\n            setTimeout(function () {\n                return _this._mapsWrapper.triggerMapEvent('resize').then(function () {\n                    if (recenter) {\n                        _this.fitBounds != null ? _this._fitBounds() : _this._setCenter();\n                    }\n                    resolve();\n                });\n            });\n        });\n    };\n    AgmMap.prototype._updatePosition = function (changes) {\n        if (changes['latitude'] == null && changes['longitude'] == null &&\n            !changes['fitBounds']) {\n            // no position update needed\n            return;\n        }\n        // we prefer fitBounds in changes\n        if ('fitBounds' in changes) {\n            this._fitBounds();\n            return;\n        }\n        if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n            return;\n        }\n        this._setCenter();\n    };\n    AgmMap.prototype._setCenter = function () {\n        var newCenter = {\n            lat: this.latitude,\n            lng: this.longitude,\n        };\n        if (this.usePanning) {\n            this._mapsWrapper.panTo(newCenter);\n        }\n        else {\n            this._mapsWrapper.setCenter(newCenter);\n        }\n    };\n    AgmMap.prototype._fitBounds = function () {\n        switch (this.fitBounds) {\n            case true:\n                this._subscribeToFitBoundsUpdates();\n                break;\n            case false:\n                if (this._fitBoundsSubscription) {\n                    this._fitBoundsSubscription.unsubscribe();\n                }\n                break;\n            default:\n                this._updateBounds(this.fitBounds, this.fitBoundsPadding);\n        }\n    };\n    AgmMap.prototype._subscribeToFitBoundsUpdates = function () {\n        var _this = this;\n        this._zone.runOutsideAngular(function () {\n            _this._fitBoundsSubscription = _this._fitBoundsService.getBounds$().subscribe(function (b) {\n                _this._zone.run(function () { return _this._updateBounds(b, _this.fitBoundsPadding); });\n            });\n        });\n    };\n    AgmMap.prototype._updateBounds = function (bounds, padding) {\n        if (!bounds) {\n            return;\n        }\n        if (this._isLatLngBoundsLiteral(bounds) && typeof google !== 'undefined' && google && google.maps && google.maps.LatLngBounds) {\n            var newBounds = new google.maps.LatLngBounds();\n            newBounds.union(bounds);\n            bounds = newBounds;\n        }\n        if (this.usePanning) {\n            this._mapsWrapper.panToBounds(bounds, padding);\n            return;\n        }\n        this._mapsWrapper.fitBounds(bounds, padding);\n    };\n    AgmMap.prototype._isLatLngBoundsLiteral = function (bounds) {\n        return bounds != null && bounds.extend === undefined;\n    };\n    AgmMap.prototype._handleMapCenterChange = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('center_changed').subscribe(function () {\n            _this._mapsWrapper.getCenter().then(function (center) {\n                _this.latitude = center.lat();\n                _this.longitude = center.lng();\n                _this.centerChange.emit({ lat: _this.latitude, lng: _this.longitude });\n            });\n        });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleBoundsChange = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('bounds_changed').subscribe(function () {\n            _this._mapsWrapper.getBounds().then(function (bounds) { _this.boundsChange.emit(bounds); });\n        });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleMapTypeIdChange = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('maptypeid_changed').subscribe(function () {\n            _this._mapsWrapper.getMapTypeId().then(function (mapTypeId) { _this.mapTypeIdChange.emit(mapTypeId); });\n        });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleMapZoomChange = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('zoom_changed').subscribe(function () {\n            _this._mapsWrapper.getZoom().then(function (z) {\n                _this.zoom = z;\n                _this.zoomChange.emit(z);\n            });\n        });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleIdleEvent = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('idle').subscribe(function () { _this.idle.emit(void 0); });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleTilesLoadedEvent = function () {\n        var _this = this;\n        var s = this._mapsWrapper.subscribeToMapEvent('tilesloaded').subscribe(function () { return _this.tilesLoaded.emit(void 0); });\n        this._observableSubscriptions.push(s);\n    };\n    AgmMap.prototype._handleMapMouseEvents = function () {\n        var _this = this;\n        var events = [\n            { name: 'click', emitter: this.mapClick },\n            { name: 'rightclick', emitter: this.mapRightClick },\n            { name: 'dblclick', emitter: this.mapDblClick },\n        ];\n        events.forEach(function (e) {\n            var s = _this._mapsWrapper.subscribeToMapEvent(e.name).subscribe(function (event) {\n                var value = {\n                    coords: {\n                        lat: event.latLng.lat(),\n                        lng: event.latLng.lng(),\n                    },\n                    placeId: event.placeId,\n                };\n                // the placeId will be undefined in case the event was not an IconMouseEvent (google types)\n                if (value.placeId && !_this.showDefaultInfoWindow) {\n                    event.stop();\n                }\n                e.emitter.emit(value);\n            });\n            _this._observableSubscriptions.push(s);\n        });\n    };\n    var AgmMap_1;\n    /**\n     * Map option attributes that can change over time\n     */\n    AgmMap._mapOptionsAttributes = [\n        'disableDoubleClickZoom', 'scrollwheel', 'draggable', 'draggableCursor', 'draggingCursor',\n        'keyboardShortcuts', 'zoomControl', 'zoomControlOptions', 'styles', 'streetViewControl',\n        'streetViewControlOptions', 'zoom', 'mapTypeControl', 'mapTypeControlOptions', 'minZoom',\n        'maxZoom', 'panControl', 'panControlOptions', 'rotateControl', 'rotateControlOptions',\n        'fullscreenControl', 'fullscreenControlOptions', 'scaleControl', 'scaleControlOptions',\n        'mapTypeId', 'clickableIcons', 'gestureHandling', 'tilt', 'restriction',\n    ];\n    AgmMap.ctorParameters = function () { return [\n        { type: ElementRef },\n        { type: GoogleMapsAPIWrapper },\n        { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n        { type: FitBoundsService },\n        { type: NgZone }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"longitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"latitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"zoom\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmMap.prototype, \"minZoom\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmMap.prototype, \"maxZoom\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmMap.prototype, \"controlSize\", void 0);\n    __decorate([\n        Input('mapDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"disableDoubleClickZoom\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"disableDefaultUI\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"scrollwheel\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMap.prototype, \"backgroundColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMap.prototype, \"draggableCursor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMap.prototype, \"draggingCursor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"keyboardShortcuts\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Boolean)\n    ], AgmMap.prototype, \"zoomControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"zoomControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Array)\n    ], AgmMap.prototype, \"styles\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"usePanning\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Boolean)\n    ], AgmMap.prototype, \"streetViewControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"streetViewControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"fitBounds\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"fitBoundsPadding\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"scaleControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"scaleControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"mapTypeControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"mapTypeControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"panControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"panControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"rotateControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"rotateControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"fullscreenControl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"fullscreenControlOptions\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMap.prototype, \"mapTypeId\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"clickableIcons\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"showDefaultInfoWindow\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMap.prototype, \"gestureHandling\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"tilt\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMap.prototype, \"restriction\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"mapClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"mapRightClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"mapDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"centerChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"boundsChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"mapTypeIdChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"idle\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"zoomChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"mapReady\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMap.prototype, \"tilesLoaded\", void 0);\n    AgmMap = AgmMap_1 = __decorate([\n        Component({\n            selector: 'agm-map',\n            providers: [\n                CircleManager,\n                DataLayerManager,\n                DataLayerManager,\n                FitBoundsService,\n                GoogleMapsAPIWrapper,\n                InfoWindowManager,\n                KmlLayerManager,\n                LayerManager,\n                MarkerManager,\n                PolygonManager,\n                PolylineManager,\n                RectangleManager,\n            ],\n            host: {\n                // todo: deprecated - we will remove it with the next version\n                '[class.sebm-google-map-container]': 'true',\n            },\n            template: \"\\n              <div class='agm-map-container-inner sebm-google-map-container-inner'></div>\\n              <div class='agm-map-content'>\\n                <ng-content></ng-content>\\n              </div>\\n  \",\n            styles: [\"\\n    .agm-map-container-inner {\\n      width: inherit;\\n      height: inherit;\\n    }\\n    .agm-map-content {\\n      display:none;\\n    }\\n  \"]\n        }),\n        __param(2, Inject(PLATFORM_ID)),\n        __metadata(\"design:paramtypes\", [ElementRef,\n            GoogleMapsAPIWrapper,\n            Object,\n            FitBoundsService,\n            NgZone])\n    ], AgmMap);\n    return AgmMap;\n}());\n\nvar markerId = 0;\n/**\n * AgmMarker renders a map marker inside a {@link AgmMap}.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  styles: [`\n *    .agm-map-container {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *      <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n *      </agm-marker>\n *    </agm-map>\n *  `\n * })\n * ```\n */\nvar AgmMarker = /** @class */ (function () {\n    function AgmMarker(_markerManager) {\n        this._markerManager = _markerManager;\n        /**\n         * If true, the marker can be dragged. Default value is false.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = false;\n        /**\n         * If true, the marker is visible\n         */\n        this.visible = true;\n        /**\n         * Whether to automatically open the child info window when the marker is clicked.\n         */\n        this.openInfoWindow = true;\n        /**\n         * The marker's opacity between 0.0 and 1.0.\n         */\n        this.opacity = 1;\n        /**\n         * All markers are displayed on the map in order of their zIndex, with higher values displaying in\n         * front of markers with lower values. By default, markers are displayed according to their\n         * vertical position on screen, with lower markers appearing in front of markers further up the\n         * screen.\n         */\n        this.zIndex = 1;\n        /**\n         * If true, the marker can be clicked. Default value is true.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.clickable = true;\n        /**\n         * This event is fired when the marker's animation property changes.\n         *\n         * @memberof AgmMarker\n         */\n        this.animationChange = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks on the marker.\n         */\n        this.markerClick = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks twice on the marker.\n         */\n        this.markerDblClick = new EventEmitter();\n        /**\n         * This event is fired when the user rightclicks on the marker.\n         */\n        this.markerRightClick = new EventEmitter();\n        /**\n         * This event is fired when the user starts dragging the marker.\n         */\n        this.dragStart = new EventEmitter();\n        /**\n         * This event is repeatedly fired while the user drags the marker.\n         */\n        this.drag = new EventEmitter();\n        /**\n         * This event is fired when the user stops dragging the marker.\n         */\n        this.dragEnd = new EventEmitter();\n        /**\n         * This event is fired when the user mouses over the marker.\n         */\n        this.mouseOver = new EventEmitter();\n        /**\n         * This event is fired when the user mouses outside the marker.\n         */\n        this.mouseOut = new EventEmitter();\n        /** @internal */\n        this.infoWindow = new QueryList();\n        this._markerAddedToManger = false;\n        this._observableSubscriptions = [];\n        this._fitBoundsDetails$ = new ReplaySubject(1);\n        this._id = (markerId++).toString();\n    }\n    AgmMarker_1 = AgmMarker;\n    /* @internal */\n    AgmMarker.prototype.ngAfterContentInit = function () {\n        var _this = this;\n        this.handleInfoWindowUpdate();\n        this.infoWindow.changes.subscribe(function () { return _this.handleInfoWindowUpdate(); });\n    };\n    AgmMarker.prototype.handleInfoWindowUpdate = function () {\n        var _this = this;\n        if (this.infoWindow.length > 1) {\n            throw new Error('Expected no more than one info window.');\n        }\n        this.infoWindow.forEach(function (marker) {\n            marker.hostMarker = _this;\n        });\n    };\n    /** @internal */\n    AgmMarker.prototype.ngOnChanges = function (changes) {\n        if (typeof this.latitude === 'string') {\n            this.latitude = Number(this.latitude);\n        }\n        if (typeof this.longitude === 'string') {\n            this.longitude = Number(this.longitude);\n        }\n        if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n            return;\n        }\n        if (!this._markerAddedToManger) {\n            this._markerManager.addMarker(this);\n            this._updateFitBoundsDetails();\n            this._markerAddedToManger = true;\n            this._addEventListeners();\n            return;\n        }\n        if (changes['latitude'] || changes['longitude']) {\n            this._markerManager.updateMarkerPosition(this);\n            this._updateFitBoundsDetails();\n        }\n        if (changes['title']) {\n            this._markerManager.updateTitle(this);\n        }\n        if (changes['label']) {\n            this._markerManager.updateLabel(this);\n        }\n        if (changes['draggable']) {\n            this._markerManager.updateDraggable(this);\n        }\n        if (changes['iconUrl']) {\n            this._markerManager.updateIcon(this);\n        }\n        if (changes['opacity']) {\n            this._markerManager.updateOpacity(this);\n        }\n        if (changes['visible']) {\n            this._markerManager.updateVisible(this);\n        }\n        if (changes['zIndex']) {\n            this._markerManager.updateZIndex(this);\n        }\n        if (changes['clickable']) {\n            this._markerManager.updateClickable(this);\n        }\n        if (changes['animation']) {\n            this._markerManager.updateAnimation(this);\n        }\n    };\n    /** @internal */\n    AgmMarker.prototype.getFitBoundsDetails$ = function () {\n        return this._fitBoundsDetails$.asObservable();\n    };\n    AgmMarker.prototype._updateFitBoundsDetails = function () {\n        this._fitBoundsDetails$.next({ latLng: { lat: this.latitude, lng: this.longitude } });\n    };\n    AgmMarker.prototype._addEventListeners = function () {\n        var _this = this;\n        var cs = this._markerManager.createEventObservable('click', this).subscribe(function () {\n            if (_this.openInfoWindow) {\n                _this.infoWindow.forEach(function (infoWindow) { return infoWindow.open(); });\n            }\n            _this.markerClick.emit(_this);\n        });\n        this._observableSubscriptions.push(cs);\n        var dcs = this._markerManager.createEventObservable('dblclick', this).subscribe(function () {\n            _this.markerDblClick.emit(null);\n        });\n        this._observableSubscriptions.push(dcs);\n        var rc = this._markerManager.createEventObservable('rightclick', this).subscribe(function () {\n            _this.markerRightClick.emit(null);\n        });\n        this._observableSubscriptions.push(rc);\n        var ds = this._markerManager.createEventObservable('dragstart', this)\n            .subscribe(function (e) {\n            _this.dragStart.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n        });\n        this._observableSubscriptions.push(ds);\n        var d = this._markerManager.createEventObservable('drag', this)\n            .subscribe(function (e) {\n            _this.drag.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n        });\n        this._observableSubscriptions.push(d);\n        var de = this._markerManager.createEventObservable('dragend', this)\n            .subscribe(function (e) {\n            _this.dragEnd.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n        });\n        this._observableSubscriptions.push(de);\n        var mover = this._markerManager.createEventObservable('mouseover', this)\n            .subscribe(function (e) {\n            _this.mouseOver.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n        });\n        this._observableSubscriptions.push(mover);\n        var mout = this._markerManager.createEventObservable('mouseout', this)\n            .subscribe(function (e) {\n            _this.mouseOut.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n        });\n        this._observableSubscriptions.push(mout);\n        var anChng = this._markerManager.createEventObservable('animation_changed', this)\n            .subscribe(function () {\n            _this.animationChange.emit(_this.animation);\n        });\n        this._observableSubscriptions.push(anChng);\n    };\n    /** @internal */\n    AgmMarker.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmMarker.prototype.toString = function () { return 'AgmMarker-' + this._id.toString(); };\n    /** @internal */\n    AgmMarker.prototype.ngOnDestroy = function () {\n        this._markerManager.deleteMarker(this);\n        // unsubscribe all registered observable subscriptions\n        this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });\n    };\n    var AgmMarker_1;\n    AgmMarker.ctorParameters = function () { return [\n        { type: MarkerManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmMarker.prototype, \"latitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmMarker.prototype, \"longitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMarker.prototype, \"title\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"label\", void 0);\n    __decorate([\n        Input('markerDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMarker.prototype, \"iconUrl\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"visible\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"openInfoWindow\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"opacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"zIndex\", void 0);\n    __decorate([\n        Input('markerClickable'),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"clickable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmMarker.prototype, \"animation\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", Object)\n    ], AgmMarker.prototype, \"animationChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"markerClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"markerDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"markerRightClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"dragStart\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"drag\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"dragEnd\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"mouseOver\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmMarker.prototype, \"mouseOut\", void 0);\n    __decorate([\n        ContentChildren(AgmInfoWindow),\n        __metadata(\"design:type\", QueryList)\n    ], AgmMarker.prototype, \"infoWindow\", void 0);\n    AgmMarker = AgmMarker_1 = __decorate([\n        Directive({\n            selector: 'agm-marker',\n            providers: [\n                { provide: FitBoundsAccessor, useExisting: forwardRef(function () { return AgmMarker_1; }) },\n            ],\n            inputs: [\n                'latitude', 'longitude', 'title', 'label', 'draggable: markerDraggable', 'iconUrl',\n                'openInfoWindow', 'opacity', 'visible', 'zIndex', 'animation',\n            ],\n            outputs: ['markerClick', 'dragStart', 'drag', 'dragEnd', 'mouseOver', 'mouseOut'],\n        }),\n        __metadata(\"design:paramtypes\", [MarkerManager])\n    ], AgmMarker);\n    return AgmMarker;\n}());\n\n/**\n * AgmPolygon renders a polygon on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  styles: [`\n *    agm-map {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *      <agm-polygon [paths]=\"paths\">\n *      </agm-polygon>\n *    </agm-map>\n *  `\n * })\n * export class MyMapCmp {\n *   lat: number = 0;\n *   lng: number = 0;\n *   zoom: number = 10;\n *   paths: Array<LatLngLiteral> = [\n *     { lat: 0,  lng: 10 },\n *     { lat: 0,  lng: 20 },\n *     { lat: 10, lng: 20 },\n *     { lat: 10, lng: 10 },\n *     { lat: 0,  lng: 10 }\n *   ]\n *   // Nesting paths will create a hole where they overlap;\n *   nestedPaths: Array<Array<LatLngLiteral>> = [[\n *     { lat: 0,  lng: 10 },\n *     { lat: 0,  lng: 20 },\n *     { lat: 10, lng: 20 },\n *     { lat: 10, lng: 10 },\n *     { lat: 0,  lng: 10 }\n *   ], [\n *     { lat: 0, lng: 15 },\n *     { lat: 0, lng: 20 },\n *     { lat: 5, lng: 20 },\n *     { lat: 5, lng: 15 },\n *     { lat: 0, lng: 15 }\n *   ]]\n * }\n * ```\n */\nvar AgmPolygon = /** @class */ (function () {\n    function AgmPolygon(_polygonManager) {\n        this._polygonManager = _polygonManager;\n        /**\n         * Indicates whether this Polygon handles mouse events. Defaults to true.\n         */\n        this.clickable = true;\n        /**\n         * If set to true, the user can drag this shape over the map. The geodesic\n         * property defines the mode of dragging. Defaults to false.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = false;\n        /**\n         * If set to true, the user can edit this shape by dragging the control\n         * points shown at the vertices and on each segment. Defaults to false.\n         */\n        this.editable = false;\n        /**\n         * When true, edges of the polygon are interpreted as geodesic and will\n         * follow the curvature of the Earth. When false, edges of the polygon are\n         * rendered as straight lines in screen space. Note that the shape of a\n         * geodesic polygon may appear to change when dragged, as the dimensions\n         * are maintained relative to the surface of the earth. Defaults to false.\n         */\n        this.geodesic = false;\n        /**\n         * The ordered sequence of coordinates that designates a closed loop.\n         * Unlike polylines, a polygon may consist of one or more paths.\n         *  As a result, the paths property may specify one or more arrays of\n         * LatLng coordinates. Paths are closed automatically; do not repeat the\n         * first vertex of the path as the last vertex. Simple polygons may be\n         * defined using a single array of LatLngs. More complex polygons may\n         * specify an array of arrays. Any simple arrays are converted into Arrays.\n         * Inserting or removing LatLngs from the Array will automatically update\n         * the polygon on the map.\n         */\n        this.paths = [];\n        /**\n         * This event is fired when the DOM click event is fired on the Polygon.\n         */\n        this.polyClick = new EventEmitter();\n        /**\n         * This event is fired when the DOM dblclick event is fired on the Polygon.\n         */\n        this.polyDblClick = new EventEmitter();\n        /**\n         * This event is repeatedly fired while the user drags the polygon.\n         */\n        this.polyDrag = new EventEmitter();\n        /**\n         * This event is fired when the user stops dragging the polygon.\n         */\n        this.polyDragEnd = new EventEmitter();\n        /**\n         * This event is fired when the user starts dragging the polygon.\n         */\n        this.polyDragStart = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousedown event is fired on the Polygon.\n         */\n        this.polyMouseDown = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousemove event is fired on the Polygon.\n         */\n        this.polyMouseMove = new EventEmitter();\n        /**\n         * This event is fired on Polygon mouseout.\n         */\n        this.polyMouseOut = new EventEmitter();\n        /**\n         * This event is fired on Polygon mouseover.\n         */\n        this.polyMouseOver = new EventEmitter();\n        /**\n         * This event is fired whe the DOM mouseup event is fired on the Polygon\n         */\n        this.polyMouseUp = new EventEmitter();\n        /**\n         * This event is fired when the Polygon is right-clicked on.\n         */\n        this.polyRightClick = new EventEmitter();\n        /**\n         * This event is fired after Polygon first path changes.\n         */\n        this.polyPathsChange = new EventEmitter();\n        this._polygonAddedToManager = false;\n        this._subscriptions = [];\n    }\n    AgmPolygon_1 = AgmPolygon;\n    /** @internal */\n    AgmPolygon.prototype.ngAfterContentInit = function () {\n        if (!this._polygonAddedToManager) {\n            this._init();\n        }\n    };\n    AgmPolygon.prototype.ngOnChanges = function (changes) {\n        if (!this._polygonAddedToManager) {\n            this._init();\n            return;\n        }\n        this._polygonManager.setPolygonOptions(this, this._updatePolygonOptions(changes));\n    };\n    AgmPolygon.prototype._init = function () {\n        this._polygonManager.addPolygon(this);\n        this._polygonAddedToManager = true;\n        this._addEventListeners();\n    };\n    AgmPolygon.prototype._addEventListeners = function () {\n        var _this = this;\n        var handlers = [\n            { name: 'click', handler: function (ev) { return _this.polyClick.emit(ev); } },\n            { name: 'dblclick', handler: function (ev) { return _this.polyDblClick.emit(ev); } },\n            { name: 'drag', handler: function (ev) { return _this.polyDrag.emit(ev); } },\n            { name: 'dragend', handler: function (ev) { return _this.polyDragEnd.emit(ev); } },\n            { name: 'dragstart', handler: function (ev) { return _this.polyDragStart.emit(ev); } },\n            { name: 'mousedown', handler: function (ev) { return _this.polyMouseDown.emit(ev); } },\n            { name: 'mousemove', handler: function (ev) { return _this.polyMouseMove.emit(ev); } },\n            { name: 'mouseout', handler: function (ev) { return _this.polyMouseOut.emit(ev); } },\n            { name: 'mouseover', handler: function (ev) { return _this.polyMouseOver.emit(ev); } },\n            { name: 'mouseup', handler: function (ev) { return _this.polyMouseUp.emit(ev); } },\n            { name: 'rightclick', handler: function (ev) { return _this.polyRightClick.emit(ev); } },\n        ];\n        handlers.forEach(function (obj) {\n            var os = _this._polygonManager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n            _this._subscriptions.push(os);\n        });\n        this._polygonManager.createPathEventObservable(this)\n            .then(function (paths$) {\n            var os = paths$.subscribe(function (pathEvent) { return _this.polyPathsChange.emit(pathEvent); });\n            _this._subscriptions.push(os);\n        });\n    };\n    AgmPolygon.prototype._updatePolygonOptions = function (changes) {\n        return Object.keys(changes)\n            .filter(function (k) { return AgmPolygon_1._polygonOptionsAttributes.indexOf(k) !== -1; })\n            .reduce(function (obj, k) {\n            obj[k] = changes[k].currentValue;\n            return obj;\n        }, {});\n    };\n    /** @internal */\n    AgmPolygon.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmPolygon.prototype.ngOnDestroy = function () {\n        this._polygonManager.deletePolygon(this);\n        // unsubscribe all registered observable subscriptions\n        this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n    };\n    AgmPolygon.prototype.getPath = function () {\n        return this._polygonManager.getPath(this);\n    };\n    AgmPolygon.prototype.getPaths = function () {\n        return this._polygonManager.getPaths(this);\n    };\n    var AgmPolygon_1;\n    AgmPolygon._polygonOptionsAttributes = [\n        'clickable', 'draggable', 'editable', 'fillColor', 'fillOpacity', 'geodesic', 'icon', 'map',\n        'paths', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'visible', 'zIndex', 'draggable',\n        'editable', 'visible',\n    ];\n    AgmPolygon.ctorParameters = function () { return [\n        { type: PolygonManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolygon.prototype, \"clickable\", void 0);\n    __decorate([\n        Input('polyDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmPolygon.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolygon.prototype, \"editable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolygon.prototype, \"fillColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolygon.prototype, \"fillOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolygon.prototype, \"geodesic\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Array)\n    ], AgmPolygon.prototype, \"paths\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolygon.prototype, \"strokeColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolygon.prototype, \"strokeOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolygon.prototype, \"strokeWeight\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Boolean)\n    ], AgmPolygon.prototype, \"visible\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolygon.prototype, \"zIndex\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyDrag\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyDragEnd\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyDragStart\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyMouseDown\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyMouseMove\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyMouseOut\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyMouseOver\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyMouseUp\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolygon.prototype, \"polyRightClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolygon.prototype, \"polyPathsChange\", void 0);\n    AgmPolygon = AgmPolygon_1 = __decorate([\n        Directive({\n            selector: 'agm-polygon',\n        }),\n        __metadata(\"design:paramtypes\", [PolygonManager])\n    ], AgmPolygon);\n    return AgmPolygon;\n}());\n\n/**\n * AgmPolylineIcon enables to add polyline sequences to add arrows, circle,\n * or custom icons either along the entire line, or in a specific part of it.\n * See https://developers.google.com/maps/documentation/javascript/shapes#polyline_customize\n *\n * ### Example\n * ```html\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *      <agm-polyline>\n *          <agm-icon-sequence [fixedRotation]=\"true\" [path]=\"'FORWARD_OPEN_ARROW'\">\n *          </agm-icon-sequence>\n *      </agm-polyline>\n *    </agm-map>\n * ```\n *\n * @export\n * @class AgmPolylineIcon\n */\nvar AgmPolylineIcon = /** @class */ (function () {\n    function AgmPolylineIcon() {\n    }\n    AgmPolylineIcon.prototype.ngOnInit = function () {\n        if (this.path == null) {\n            throw new Error('Icon Sequence path is required');\n        }\n    };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Boolean)\n    ], AgmPolylineIcon.prototype, \"fixedRotation\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolylineIcon.prototype, \"offset\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolylineIcon.prototype, \"repeat\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"anchorX\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"anchorY\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolylineIcon.prototype, \"fillColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"fillOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolylineIcon.prototype, \"path\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"rotation\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"scale\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolylineIcon.prototype, \"strokeColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"strokeOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylineIcon.prototype, \"strokeWeight\", void 0);\n    AgmPolylineIcon = __decorate([\n        Directive({ selector: 'agm-polyline agm-icon-sequence' })\n    ], AgmPolylineIcon);\n    return AgmPolylineIcon;\n}());\n\n/**\n * AgmPolylinePoint represents one element of a polyline within a  {@link\n * AgmPolyline}\n */\nvar AgmPolylinePoint = /** @class */ (function () {\n    function AgmPolylinePoint() {\n        /**\n         * This event emitter gets emitted when the position of the point changed.\n         */\n        this.positionChanged = new EventEmitter();\n    }\n    AgmPolylinePoint_1 = AgmPolylinePoint;\n    AgmPolylinePoint.prototype.ngOnChanges = function (changes) {\n        if (changes['latitude'] || changes['longitude']) {\n            var position = {\n                lat: changes['latitude'] ? changes['latitude'].currentValue : this.latitude,\n                lng: changes['longitude'] ? changes['longitude'].currentValue : this.longitude,\n            };\n            this.positionChanged.emit(position);\n        }\n    };\n    /** @internal */\n    AgmPolylinePoint.prototype.getFitBoundsDetails$ = function () {\n        return this.positionChanged.pipe(startWith({ lat: this.latitude, lng: this.longitude }), map(function (position) { return ({ latLng: position }); }));\n    };\n    var AgmPolylinePoint_1;\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylinePoint.prototype, \"latitude\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolylinePoint.prototype, \"longitude\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolylinePoint.prototype, \"positionChanged\", void 0);\n    AgmPolylinePoint = AgmPolylinePoint_1 = __decorate([\n        Directive({\n            selector: 'agm-polyline-point',\n            providers: [\n                { provide: FitBoundsAccessor, useExisting: forwardRef(function () { return AgmPolylinePoint_1; }) },\n            ],\n        }),\n        __metadata(\"design:paramtypes\", [])\n    ], AgmPolylinePoint);\n    return AgmPolylinePoint;\n}());\n\nvar polylineId = 0;\n/**\n * AgmPolyline renders a polyline on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n *  selector: 'my-map-cmp',\n *  styles: [`\n *    .agm-map-container {\n *      height: 300px;\n *    }\n * `],\n *  template: `\n *    <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n *      <agm-polyline>\n *          <agm-polyline-point [latitude]=\"latA\" [longitude]=\"lngA\">\n *          </agm-polyline-point>\n *          <agm-polyline-point [latitude]=\"latB\" [longitude]=\"lngB\">\n *          </agm-polyline-point>\n *      </agm-polyline>\n *    </agm-map>\n *  `\n * })\n * ```\n */\nvar AgmPolyline = /** @class */ (function () {\n    function AgmPolyline(_polylineManager) {\n        this._polylineManager = _polylineManager;\n        /**\n         * Indicates whether this Polyline handles mouse events. Defaults to true.\n         */\n        this.clickable = true;\n        /**\n         * If set to true, the user can drag this shape over the map. The geodesic property defines the\n         * mode of dragging. Defaults to false.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = false;\n        /**\n         * If set to true, the user can edit this shape by dragging the control points shown at the\n         * vertices and on each segment. Defaults to false.\n         */\n        this.editable = false;\n        /**\n         * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of\n         * the Earth. When false, edges of the polygon are rendered as straight lines in screen space.\n         * Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions\n         * are maintained relative to the surface of the earth. Defaults to false.\n         */\n        this.geodesic = false;\n        /**\n         * Whether this polyline is visible on the map. Defaults to true.\n         */\n        this.visible = true;\n        /**\n         * This event is fired when the DOM click event is fired on the Polyline.\n         */\n        this.lineClick = new EventEmitter();\n        /**\n         * This event is fired when the DOM dblclick event is fired on the Polyline.\n         */\n        this.lineDblClick = new EventEmitter();\n        /**\n         * This event is repeatedly fired while the user drags the polyline.\n         */\n        this.lineDrag = new EventEmitter();\n        /**\n         * This event is fired when the user stops dragging the polyline.\n         */\n        this.lineDragEnd = new EventEmitter();\n        /**\n         * This event is fired when the user starts dragging the polyline.\n         */\n        this.lineDragStart = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousedown event is fired on the Polyline.\n         */\n        this.lineMouseDown = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousemove event is fired on the Polyline.\n         */\n        this.lineMouseMove = new EventEmitter();\n        /**\n         * This event is fired on Polyline mouseout.\n         */\n        this.lineMouseOut = new EventEmitter();\n        /**\n         * This event is fired on Polyline mouseover.\n         */\n        this.lineMouseOver = new EventEmitter();\n        /**\n         * This event is fired whe the DOM mouseup event is fired on the Polyline\n         */\n        this.lineMouseUp = new EventEmitter();\n        /**\n         * This event is fired when the Polyline is right-clicked on.\n         */\n        this.lineRightClick = new EventEmitter();\n        /**\n         * This event is fired after Polyline's path changes.\n         */\n        this.polyPathChange = new EventEmitter();\n        this._polylineAddedToManager = false;\n        this._subscriptions = [];\n        this._id = (polylineId++).toString();\n    }\n    AgmPolyline_1 = AgmPolyline;\n    /** @internal */\n    AgmPolyline.prototype.ngAfterContentInit = function () {\n        var _this = this;\n        if (this.points.length) {\n            this.points.forEach(function (point) {\n                var s = point.positionChanged.subscribe(function () { _this._polylineManager.updatePolylinePoints(_this); });\n                _this._subscriptions.push(s);\n            });\n        }\n        if (!this._polylineAddedToManager) {\n            this._init();\n        }\n        var pointSub = this.points.changes.subscribe(function () { return _this._polylineManager.updatePolylinePoints(_this); });\n        this._subscriptions.push(pointSub);\n        this._polylineManager.updatePolylinePoints(this);\n        var iconSub = this.iconSequences.changes.subscribe(function () { return _this._polylineManager.updateIconSequences(_this); });\n        this._subscriptions.push(iconSub);\n    };\n    AgmPolyline.prototype.ngOnChanges = function (changes) {\n        if (!this._polylineAddedToManager) {\n            this._init();\n            return;\n        }\n        var options = {};\n        var optionKeys = Object.keys(changes).filter(function (k) { return AgmPolyline_1._polylineOptionsAttributes.indexOf(k) !== -1; });\n        optionKeys.forEach(function (k) { return options[k] = changes[k].currentValue; });\n        this._polylineManager.setPolylineOptions(this, options);\n    };\n    AgmPolyline.prototype.getPath = function () {\n        return this._polylineManager.getPath(this);\n    };\n    AgmPolyline.prototype._init = function () {\n        this._polylineManager.addPolyline(this);\n        this._polylineAddedToManager = true;\n        this._addEventListeners();\n    };\n    AgmPolyline.prototype._addEventListeners = function () {\n        var _this = this;\n        var handlers = [\n            { name: 'click', handler: function (ev) { return _this.lineClick.emit(ev); } },\n            { name: 'dblclick', handler: function (ev) { return _this.lineDblClick.emit(ev); } },\n            { name: 'drag', handler: function (ev) { return _this.lineDrag.emit(ev); } },\n            { name: 'dragend', handler: function (ev) { return _this.lineDragEnd.emit(ev); } },\n            { name: 'dragstart', handler: function (ev) { return _this.lineDragStart.emit(ev); } },\n            { name: 'mousedown', handler: function (ev) { return _this.lineMouseDown.emit(ev); } },\n            { name: 'mousemove', handler: function (ev) { return _this.lineMouseMove.emit(ev); } },\n            { name: 'mouseout', handler: function (ev) { return _this.lineMouseOut.emit(ev); } },\n            { name: 'mouseover', handler: function (ev) { return _this.lineMouseOver.emit(ev); } },\n            { name: 'mouseup', handler: function (ev) { return _this.lineMouseUp.emit(ev); } },\n            { name: 'rightclick', handler: function (ev) { return _this.lineRightClick.emit(ev); } },\n        ];\n        handlers.forEach(function (obj) {\n            var os = _this._polylineManager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n            _this._subscriptions.push(os);\n        });\n        this._polylineManager.createPathEventObservable(this).then(function (ob$) {\n            var os = ob$.subscribe(function (pathEvent) { return _this.polyPathChange.emit(pathEvent); });\n            _this._subscriptions.push(os);\n        });\n    };\n    /** @internal */\n    AgmPolyline.prototype._getPoints = function () {\n        if (this.points) {\n            return this.points.toArray();\n        }\n        return [];\n    };\n    AgmPolyline.prototype._getIcons = function () {\n        if (this.iconSequences) {\n            return this.iconSequences.toArray();\n        }\n        return [];\n    };\n    /** @internal */\n    AgmPolyline.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmPolyline.prototype.ngOnDestroy = function () {\n        this._polylineManager.deletePolyline(this);\n        // unsubscribe all registered observable subscriptions\n        this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n    };\n    var AgmPolyline_1;\n    AgmPolyline._polylineOptionsAttributes = [\n        'draggable', 'editable', 'visible', 'geodesic', 'strokeColor', 'strokeOpacity', 'strokeWeight',\n        'zIndex',\n    ];\n    AgmPolyline.ctorParameters = function () { return [\n        { type: PolylineManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"clickable\", void 0);\n    __decorate([\n        Input('polylineDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"editable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"geodesic\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmPolyline.prototype, \"strokeColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolyline.prototype, \"strokeOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolyline.prototype, \"strokeWeight\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"visible\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmPolyline.prototype, \"zIndex\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineDrag\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineDragEnd\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineDragStart\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineMouseDown\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineMouseMove\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineMouseOut\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineMouseOver\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineMouseUp\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmPolyline.prototype, \"lineRightClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", Object)\n    ], AgmPolyline.prototype, \"polyPathChange\", void 0);\n    __decorate([\n        ContentChildren(AgmPolylinePoint),\n        __metadata(\"design:type\", QueryList)\n    ], AgmPolyline.prototype, \"points\", void 0);\n    __decorate([\n        ContentChildren(AgmPolylineIcon),\n        __metadata(\"design:type\", QueryList)\n    ], AgmPolyline.prototype, \"iconSequences\", void 0);\n    AgmPolyline = AgmPolyline_1 = __decorate([\n        Directive({\n            selector: 'agm-polyline',\n        }),\n        __metadata(\"design:paramtypes\", [PolylineManager])\n    ], AgmPolyline);\n    return AgmPolyline;\n}());\n\nvar AgmRectangle = /** @class */ (function () {\n    function AgmRectangle(_manager) {\n        this._manager = _manager;\n        /**\n         * Indicates whether this Rectangle handles mouse events. Defaults to true.\n         */\n        this.clickable = true;\n        /**\n         * If set to true, the user can drag this rectangle over the map. Defaults to false.\n         */\n        // tslint:disable-next-line:no-input-rename\n        this.draggable = false;\n        /**\n         * If set to true, the user can edit this rectangle by dragging the control points shown at\n         * the center and around the circumference of the rectangle. Defaults to false.\n         */\n        this.editable = false;\n        /**\n         * The stroke position. Defaults to CENTER.\n         * This property is not supported on Internet Explorer 8 and earlier.\n         */\n        this.strokePosition = 'CENTER';\n        /**\n         * The stroke width in pixels.\n         */\n        this.strokeWeight = 0;\n        /**\n         * Whether this rectangle is visible on the map. Defaults to true.\n         */\n        this.visible = true;\n        /**\n         * This event is fired when the rectangle's is changed.\n         */\n        this.boundsChange = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks on the rectangle.\n         */\n        this.rectangleClick = new EventEmitter();\n        /**\n         * This event emitter gets emitted when the user clicks on the rectangle.\n         */\n        this.rectangleDblClick = new EventEmitter();\n        /**\n         * This event is repeatedly fired while the user drags the rectangle.\n         */\n        this.drag = new EventEmitter();\n        /**\n         * This event is fired when the user stops dragging the rectangle.\n         */\n        this.dragEnd = new EventEmitter();\n        /**\n         * This event is fired when the user starts dragging the rectangle.\n         */\n        this.dragStart = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousedown event is fired on the rectangle.\n         */\n        this.mouseDown = new EventEmitter();\n        /**\n         * This event is fired when the DOM mousemove event is fired on the rectangle.\n         */\n        this.mouseMove = new EventEmitter();\n        /**\n         * This event is fired on rectangle mouseout.\n         */\n        this.mouseOut = new EventEmitter();\n        /**\n         * This event is fired on rectangle mouseover.\n         */\n        this.mouseOver = new EventEmitter();\n        /**\n         * This event is fired when the DOM mouseup event is fired on the rectangle.\n         */\n        this.mouseUp = new EventEmitter();\n        /**\n         * This event is fired when the rectangle is right-clicked on.\n         */\n        this.rightClick = new EventEmitter();\n        this._rectangleAddedToManager = false;\n        this._eventSubscriptions = [];\n    }\n    AgmRectangle_1 = AgmRectangle;\n    /** @internal */\n    AgmRectangle.prototype.ngOnInit = function () {\n        this._manager.addRectangle(this);\n        this._rectangleAddedToManager = true;\n        this._registerEventListeners();\n    };\n    /** @internal */\n    AgmRectangle.prototype.ngOnChanges = function (changes) {\n        if (!this._rectangleAddedToManager) {\n            return;\n        }\n        if (changes['north'] ||\n            changes['east'] ||\n            changes['south'] ||\n            changes['west']) {\n            this._manager.setBounds(this);\n        }\n        if (changes['editable']) {\n            this._manager.setEditable(this);\n        }\n        if (changes['draggable']) {\n            this._manager.setDraggable(this);\n        }\n        if (changes['visible']) {\n            this._manager.setVisible(this);\n        }\n        this._updateRectangleOptionsChanges(changes);\n    };\n    AgmRectangle.prototype._updateRectangleOptionsChanges = function (changes) {\n        var options = {};\n        var optionKeys = Object.keys(changes).filter(function (k) { return AgmRectangle_1._mapOptions.indexOf(k) !== -1; });\n        optionKeys.forEach(function (k) {\n            options[k] = changes[k].currentValue;\n        });\n        if (optionKeys.length > 0) {\n            this._manager.setOptions(this, options);\n        }\n    };\n    AgmRectangle.prototype._registerEventListeners = function () {\n        var _this = this;\n        var events = new Map();\n        events.set('bounds_changed', this.boundsChange);\n        events.set('click', this.rectangleClick);\n        events.set('dblclick', this.rectangleDblClick);\n        events.set('drag', this.drag);\n        events.set('dragend', this.dragEnd);\n        events.set('dragStart', this.dragStart);\n        events.set('mousedown', this.mouseDown);\n        events.set('mousemove', this.mouseMove);\n        events.set('mouseout', this.mouseOut);\n        events.set('mouseover', this.mouseOver);\n        events.set('mouseup', this.mouseUp);\n        events.set('rightclick', this.rightClick);\n        events.forEach(function (eventEmitter, eventName) {\n            _this._eventSubscriptions.push(_this._manager\n                .createEventObservable(eventName, _this)\n                .subscribe(function (value) {\n                switch (eventName) {\n                    case 'bounds_changed':\n                        _this._manager.getBounds(_this).then(function (bounds) {\n                            return eventEmitter.emit({\n                                north: bounds.getNorthEast().lat(),\n                                east: bounds.getNorthEast().lng(),\n                                south: bounds.getSouthWest().lat(),\n                                west: bounds.getSouthWest().lng(),\n                            });\n                        });\n                        break;\n                    default:\n                        eventEmitter.emit({\n                            coords: { lat: value.latLng.lat(), lng: value.latLng.lng() },\n                        });\n                }\n            }));\n        });\n    };\n    /** @internal */\n    AgmRectangle.prototype.ngOnDestroy = function () {\n        this._eventSubscriptions.forEach(function (s) {\n            s.unsubscribe();\n        });\n        this._eventSubscriptions = null;\n        this._manager.removeRectangle(this);\n    };\n    /**\n     * Gets the LatLngBounds of this Rectangle.\n     */\n    AgmRectangle.prototype.getBounds = function () {\n        return this._manager.getBounds(this);\n    };\n    var AgmRectangle_1;\n    AgmRectangle._mapOptions = [\n        'fillColor',\n        'fillOpacity',\n        'strokeColor',\n        'strokeOpacity',\n        'strokePosition',\n        'strokeWeight',\n        'visible',\n        'zIndex',\n        'clickable',\n    ];\n    AgmRectangle.ctorParameters = function () { return [\n        { type: RectangleManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"north\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"east\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"south\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"west\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmRectangle.prototype, \"clickable\", void 0);\n    __decorate([\n        Input('rectangleDraggable'),\n        __metadata(\"design:type\", Object)\n    ], AgmRectangle.prototype, \"draggable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmRectangle.prototype, \"editable\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmRectangle.prototype, \"fillColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"fillOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmRectangle.prototype, \"strokeColor\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"strokeOpacity\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", String)\n    ], AgmRectangle.prototype, \"strokePosition\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmRectangle.prototype, \"strokeWeight\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmRectangle.prototype, \"visible\", void 0);\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Number)\n    ], AgmRectangle.prototype, \"zIndex\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"boundsChange\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"rectangleClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"rectangleDblClick\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"drag\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"dragEnd\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"dragStart\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"mouseDown\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"mouseMove\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"mouseOut\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"mouseOver\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"mouseUp\", void 0);\n    __decorate([\n        Output(),\n        __metadata(\"design:type\", EventEmitter)\n    ], AgmRectangle.prototype, \"rightClick\", void 0);\n    AgmRectangle = AgmRectangle_1 = __decorate([\n        Directive({\n            selector: 'agm-rectangle',\n        }),\n        __metadata(\"design:paramtypes\", [RectangleManager])\n    ], AgmRectangle);\n    return AgmRectangle;\n}());\n\nvar layerId$3 = 0;\n/*\n * This directive adds a transit layer to a google map instance\n * <agm-transit-layer [visible]=\"true|false\"> <agm-transit-layer>\n * */\nvar AgmTransitLayer = /** @class */ (function () {\n    function AgmTransitLayer(_manager) {\n        this._manager = _manager;\n        this._addedToManager = false;\n        this._id = (layerId$3++).toString();\n        /**\n         * Hide/show transit layer\n         */\n        this.visible = true;\n    }\n    AgmTransitLayer.prototype.ngOnInit = function () {\n        if (this._addedToManager) {\n            return;\n        }\n        this._manager.addTransitLayer(this, { visible: this.visible });\n        this._addedToManager = true;\n    };\n    AgmTransitLayer.prototype.ngOnChanges = function (changes) {\n        if (!this._addedToManager) {\n            return;\n        }\n        if (changes['visible'] != null) {\n            this._manager.toggleLayerVisibility(this, { visible: changes['visible'].currentValue });\n        }\n    };\n    /** @internal */\n    AgmTransitLayer.prototype.id = function () { return this._id; };\n    /** @internal */\n    AgmTransitLayer.prototype.toString = function () { return \"AgmTransitLayer-\" + this._id.toString(); };\n    /** @internal */\n    AgmTransitLayer.prototype.ngOnDestroy = function () {\n        this._manager.deleteLayer(this);\n    };\n    AgmTransitLayer.ctorParameters = function () { return [\n        { type: LayerManager }\n    ]; };\n    __decorate([\n        Input(),\n        __metadata(\"design:type\", Object)\n    ], AgmTransitLayer.prototype, \"visible\", void 0);\n    AgmTransitLayer = __decorate([\n        Directive({\n            selector: 'agm-transit-layer',\n        }),\n        __metadata(\"design:paramtypes\", [LayerManager])\n    ], AgmTransitLayer);\n    return AgmTransitLayer;\n}());\n\nvar google$1;\nvar SymbolPath;\n(function (SymbolPath) {\n    SymbolPath[SymbolPath[\"BACKWARD_CLOSED_ARROW\"] = 3] = \"BACKWARD_CLOSED_ARROW\";\n    SymbolPath[SymbolPath[\"BACKWARD_OPEN_ARROW\"] = 4] = \"BACKWARD_OPEN_ARROW\";\n    SymbolPath[SymbolPath[\"CIRCLE\"] = 0] = \"CIRCLE\";\n    SymbolPath[SymbolPath[\"FORWARD_CLOSED_ARROW\"] = 1] = \"FORWARD_CLOSED_ARROW\";\n    SymbolPath[SymbolPath[\"FORWARD_OPEN_ARROW\"] = 2] = \"FORWARD_OPEN_ARROW\";\n})(SymbolPath || (SymbolPath = {}));\n/**\n * Identifiers used to specify the placement of controls on the map. Controls are\n * positioned relative to other controls in the same layout position. Controls that\n * are added first are positioned closer to the edge of the map.\n */\nvar ControlPosition;\n(function (ControlPosition) {\n    ControlPosition[ControlPosition[\"RIGHT_BOTTOM\"] = 0] = \"RIGHT_BOTTOM\";\n    ControlPosition[ControlPosition[\"TOP_LEFT\"] = 1] = \"TOP_LEFT\";\n    ControlPosition[ControlPosition[\"TOP_CENTER\"] = 2] = \"TOP_CENTER\";\n    ControlPosition[ControlPosition[\"TOP_RIGHT\"] = 3] = \"TOP_RIGHT\";\n    ControlPosition[ControlPosition[\"LEFT_CENTER\"] = 4] = \"LEFT_CENTER\";\n    ControlPosition[ControlPosition[\"LEFT_TOP\"] = 5] = \"LEFT_TOP\";\n    ControlPosition[ControlPosition[\"LEFT_BOTTOM\"] = 6] = \"LEFT_BOTTOM\";\n    ControlPosition[ControlPosition[\"RIGHT_TOP\"] = 7] = \"RIGHT_TOP\";\n    ControlPosition[ControlPosition[\"RIGHT_CENTER\"] = 8] = \"RIGHT_CENTER\";\n    ControlPosition[ControlPosition[\"BOTTOM_RIGHT\"] = 9] = \"BOTTOM_RIGHT\";\n    ControlPosition[ControlPosition[\"BOTTOM_LEFT\"] = 10] = \"BOTTOM_LEFT\";\n    ControlPosition[ControlPosition[\"BOTTOM_CENTER\"] = 11] = \"BOTTOM_CENTER\";\n})(ControlPosition || (ControlPosition = {}));\nvar MapTypeId;\n(function (MapTypeId) {\n    /** This map type displays a transparent layer of major streets on satellite images. */\n    MapTypeId[MapTypeId[\"HYBRID\"] = 0] = \"HYBRID\";\n    /** This map type displays a normal street map. */\n    MapTypeId[MapTypeId[\"ROADMAP\"] = 1] = \"ROADMAP\";\n    /** This map type displays satellite images. */\n    MapTypeId[MapTypeId[\"SATELLITE\"] = 2] = \"SATELLITE\";\n    /** This map type displays maps with physical features such as terrain and vegetation. */\n    MapTypeId[MapTypeId[\"TERRAIN\"] = 3] = \"TERRAIN\";\n})(MapTypeId || (MapTypeId = {}));\nvar MapTypeControlStyle;\n(function (MapTypeControlStyle) {\n    MapTypeControlStyle[MapTypeControlStyle[\"DEFAULT\"] = 0] = \"DEFAULT\";\n    MapTypeControlStyle[MapTypeControlStyle[\"DROPDOWN_MENU\"] = 2] = \"DROPDOWN_MENU\";\n    MapTypeControlStyle[MapTypeControlStyle[\"HORIZONTAL_BAR\"] = 1] = \"HORIZONTAL_BAR\";\n})(MapTypeControlStyle || (MapTypeControlStyle = {}));\nvar ScaleControlStyle;\n(function (ScaleControlStyle) {\n    ScaleControlStyle[ScaleControlStyle[\"DEFAULT\"] = 0] = \"DEFAULT\";\n})(ScaleControlStyle || (ScaleControlStyle = {}));\nvar ZoomControlStyle;\n(function (ZoomControlStyle) {\n    ZoomControlStyle[ZoomControlStyle[\"DEFAULT\"] = 0] = \"DEFAULT\";\n    ZoomControlStyle[ZoomControlStyle[\"LARGE\"] = 1] = \"LARGE\";\n    ZoomControlStyle[ZoomControlStyle[\"SMALL\"] = 2] = \"SMALL\";\n})(ZoomControlStyle || (ZoomControlStyle = {}));\nvar GeocoderLocationType;\n(function (GeocoderLocationType) {\n    GeocoderLocationType[\"APPROXIMATE\"] = \"APPROXIMATE\";\n    GeocoderLocationType[\"GEOMETRIC_CENTER\"] = \"GEOMETRIC_CENTER\";\n    GeocoderLocationType[\"RANGE_INTERPOLATED\"] = \"RANGE_INTERPOLATED\";\n    GeocoderLocationType[\"ROOFTOP\"] = \"ROOFTOP\";\n})(GeocoderLocationType || (GeocoderLocationType = {}));\nvar GeocoderStatus;\n(function (GeocoderStatus) {\n    GeocoderStatus[\"ERROR\"] = \"ERROR\";\n    GeocoderStatus[\"INVALID_REQUEST\"] = \"INVALID_REQUEST\";\n    GeocoderStatus[\"OK\"] = \"OK\";\n    GeocoderStatus[\"OVER_QUERY_LIMIT\"] = \"OVER_QUERY_LIMIT\";\n    GeocoderStatus[\"REQUEST_DENIED\"] = \"REQUEST_DENIED\";\n    GeocoderStatus[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n    GeocoderStatus[\"ZERO_RESULTS\"] = \"ZERO_RESULTS\";\n})(GeocoderStatus || (GeocoderStatus = {}));\n\nvar AgmGeocoder = /** @class */ (function () {\n    function AgmGeocoder(loader) {\n        var _this = this;\n        var connectableGeocoder$ = new Observable(function (subscriber) {\n            loader.load().then(function () { return subscriber.next(); });\n        })\n            .pipe(map(function () { return _this._createGeocoder(); }), multicast(new ReplaySubject(1)));\n        connectableGeocoder$.connect(); // ignore the subscription\n        // since we will remain subscribed till application exits\n        this.geocoder$ = connectableGeocoder$;\n    }\n    AgmGeocoder.prototype.geocode = function (request) {\n        var _this = this;\n        return this.geocoder$.pipe(switchMap(function (geocoder) { return _this._getGoogleResults(geocoder, request); }));\n    };\n    AgmGeocoder.prototype._getGoogleResults = function (geocoder, request) {\n        var geocodeObservable = bindCallback(geocoder.geocode);\n        return geocodeObservable(request).pipe(switchMap(function (_a) {\n            var _b = __read(_a, 2), results = _b[0], status = _b[1];\n            if (status === GeocoderStatus.OK) {\n                return of(results);\n            }\n            return throwError(status);\n        }));\n    };\n    AgmGeocoder.prototype._createGeocoder = function () {\n        return new google.maps.Geocoder();\n    };\n    AgmGeocoder.ctorParameters = function () { return [\n        { type: MapsAPILoader }\n    ]; };\n    AgmGeocoder.ngInjectableDef = ɵɵdefineInjectable({ factory: function AgmGeocoder_Factory() { return new AgmGeocoder(ɵɵinject(MapsAPILoader)); }, token: AgmGeocoder, providedIn: \"root\" });\n    AgmGeocoder = __decorate([\n        Injectable({ providedIn: 'root' }),\n        __metadata(\"design:paramtypes\", [MapsAPILoader])\n    ], AgmGeocoder);\n    return AgmGeocoder;\n}());\n\nvar WindowRef = /** @class */ (function () {\n    function WindowRef() {\n    }\n    WindowRef.prototype.getNativeWindow = function () { return window; };\n    return WindowRef;\n}());\nvar DocumentRef = /** @class */ (function () {\n    function DocumentRef() {\n    }\n    DocumentRef.prototype.getNativeDocument = function () { return document; };\n    return DocumentRef;\n}());\nvar BROWSER_GLOBALS_PROVIDERS = [WindowRef, DocumentRef];\n\nvar GoogleMapsScriptProtocol;\n(function (GoogleMapsScriptProtocol) {\n    GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"HTTP\"] = 1] = \"HTTP\";\n    GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"HTTPS\"] = 2] = \"HTTPS\";\n    GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"AUTO\"] = 3] = \"AUTO\";\n})(GoogleMapsScriptProtocol || (GoogleMapsScriptProtocol = {}));\n/**\n * Token for the config of the LazyMapsAPILoader. Please provide an object of type {@link\n * LazyMapsAPILoaderConfig}.\n */\nvar LAZY_MAPS_API_CONFIG = new InjectionToken('angular-google-maps LAZY_MAPS_API_CONFIG');\nvar LazyMapsAPILoader = /** @class */ (function (_super) {\n    __extends(LazyMapsAPILoader, _super);\n    function LazyMapsAPILoader(config, w, d, localeId) {\n        if (config === void 0) { config = null; }\n        var _this = _super.call(this) || this;\n        _this.localeId = localeId;\n        _this._SCRIPT_ID = 'agmGoogleMapsApiScript';\n        _this.callbackName = \"agmLazyMapsAPILoader\";\n        _this._config = config || {};\n        _this._windowRef = w;\n        _this._documentRef = d;\n        return _this;\n    }\n    LazyMapsAPILoader.prototype.load = function () {\n        var window = this._windowRef.getNativeWindow();\n        if (window.google && window.google.maps) {\n            // Google maps already loaded on the page.\n            return Promise.resolve();\n        }\n        if (this._scriptLoadingPromise) {\n            return this._scriptLoadingPromise;\n        }\n        // this can happen in HMR situations or Stackblitz.io editors.\n        var scriptOnPage = this._documentRef.getNativeDocument().getElementById(this._SCRIPT_ID);\n        if (scriptOnPage) {\n            this._assignScriptLoadingPromise(scriptOnPage);\n            return this._scriptLoadingPromise;\n        }\n        var script = this._documentRef.getNativeDocument().createElement('script');\n        script.type = 'text/javascript';\n        script.async = true;\n        script.defer = true;\n        script.id = this._SCRIPT_ID;\n        script.src = this._getScriptSrc(this.callbackName);\n        this._assignScriptLoadingPromise(script);\n        this._documentRef.getNativeDocument().body.appendChild(script);\n        return this._scriptLoadingPromise;\n    };\n    LazyMapsAPILoader.prototype._assignScriptLoadingPromise = function (scriptElem) {\n        var _this = this;\n        this._scriptLoadingPromise = new Promise(function (resolve, reject) {\n            _this._windowRef.getNativeWindow()[_this.callbackName] = function () {\n                resolve();\n            };\n            scriptElem.onerror = function (error) {\n                reject(error);\n            };\n        });\n    };\n    LazyMapsAPILoader.prototype._getScriptSrc = function (callbackName) {\n        var protocolType = (this._config && this._config.protocol) || GoogleMapsScriptProtocol.HTTPS;\n        var protocol;\n        switch (protocolType) {\n            case GoogleMapsScriptProtocol.AUTO:\n                protocol = '';\n                break;\n            case GoogleMapsScriptProtocol.HTTP:\n                protocol = 'http:';\n                break;\n            case GoogleMapsScriptProtocol.HTTPS:\n                protocol = 'https:';\n                break;\n        }\n        var hostAndPath = this._config.hostAndPath || 'maps.googleapis.com/maps/api/js';\n        var queryParams = {\n            v: this._config.apiVersion || 'quarterly',\n            callback: callbackName,\n            key: this._config.apiKey,\n            client: this._config.clientId,\n            channel: this._config.channel,\n            libraries: this._config.libraries,\n            region: this._config.region,\n            language: this._config.language || this.localeId !== 'en-US' ? this.localeId : null,\n        };\n        var params = Object.keys(queryParams)\n            .filter(function (k) { return queryParams[k] != null; })\n            .filter(function (k) {\n            // remove empty arrays\n            return !Array.isArray(queryParams[k]) ||\n                (Array.isArray(queryParams[k]) && queryParams[k].length > 0);\n        })\n            .map(function (k) {\n            // join arrays as comma seperated strings\n            var i = queryParams[k];\n            if (Array.isArray(i)) {\n                return { key: k, value: i.join(',') };\n            }\n            return { key: k, value: queryParams[k] };\n        })\n            .map(function (entry) {\n            return entry.key + \"=\" + entry.value;\n        })\n            .join('&');\n        return protocol + \"//\" + hostAndPath + \"?\" + params;\n    };\n    LazyMapsAPILoader.ctorParameters = function () { return [\n        { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [LAZY_MAPS_API_CONFIG,] }] },\n        { type: WindowRef },\n        { type: DocumentRef },\n        { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n    ]; };\n    LazyMapsAPILoader = __decorate([\n        Injectable(),\n        __param(0, Optional()), __param(0, Inject(LAZY_MAPS_API_CONFIG)),\n        __param(3, Inject(LOCALE_ID)),\n        __metadata(\"design:paramtypes\", [Object, WindowRef, DocumentRef, String])\n    ], LazyMapsAPILoader);\n    return LazyMapsAPILoader;\n}(MapsAPILoader));\n\n/**\n * When using the NoOpMapsAPILoader, the Google Maps API must be added to the page via a `<script>`\n * Tag.\n * It's important that the Google Maps API script gets loaded first on the page.\n */\nvar NoOpMapsAPILoader = /** @class */ (function () {\n    function NoOpMapsAPILoader() {\n    }\n    NoOpMapsAPILoader.prototype.load = function () {\n        if (!window.google || !window.google.maps) {\n            throw new Error('Google Maps API not loaded on page. Make sure window.google.maps is available!');\n        }\n        return Promise.resolve();\n    };\n    return NoOpMapsAPILoader;\n}());\n\n// exported map types\n\n/**\n * @internal\n */\nfunction coreDirectives() {\n    return [\n        AgmBicyclingLayer,\n        AgmCircle,\n        AgmDataLayer,\n        AgmFitBounds,\n        AgmInfoWindow,\n        AgmKmlLayer,\n        AgmMap,\n        AgmMarker,\n        AgmPolygon,\n        AgmPolyline,\n        AgmPolylineIcon,\n        AgmPolylinePoint,\n        AgmRectangle,\n        AgmTransitLayer,\n    ];\n}\n/**\n * The angular-google-maps core module. Contains all Directives/Services/Pipes\n * of the core module. Please use `AgmCoreModule.forRoot()` in your app module.\n */\nvar AgmCoreModule = /** @class */ (function () {\n    function AgmCoreModule() {\n    }\n    AgmCoreModule_1 = AgmCoreModule;\n    /**\n     * Please use this method when you register the module at the root level.\n     */\n    AgmCoreModule.forRoot = function (lazyMapsAPILoaderConfig) {\n        return {\n            ngModule: AgmCoreModule_1,\n            providers: __spread(BROWSER_GLOBALS_PROVIDERS, [\n                { provide: MapsAPILoader, useClass: LazyMapsAPILoader },\n                { provide: LAZY_MAPS_API_CONFIG, useValue: lazyMapsAPILoaderConfig },\n            ]),\n        };\n    };\n    var AgmCoreModule_1;\n    AgmCoreModule = AgmCoreModule_1 = __decorate([\n        NgModule({ declarations: coreDirectives(), exports: coreDirectives() })\n    ], AgmCoreModule);\n    return AgmCoreModule;\n}());\n\n// main modules\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AgmBicyclingLayer, AgmCircle, AgmCoreModule, AgmDataLayer, AgmFitBounds, AgmGeocoder, AgmInfoWindow, AgmKmlLayer, AgmMap, AgmMarker, AgmPolygon, AgmPolyline, AgmPolylineIcon, AgmPolylinePoint, AgmRectangle, AgmTransitLayer, CircleManager, ControlPosition, DataLayerManager, FitBoundsAccessor, GeocoderLocationType, GeocoderStatus, GoogleMapsAPIWrapper, GoogleMapsScriptProtocol, InfoWindowManager, KmlLayerManager, LAZY_MAPS_API_CONFIG, LayerManager, LazyMapsAPILoader, MapTypeId, MapsAPILoader, MarkerManager, NoOpMapsAPILoader, PolygonManager, PolylineManager, RectangleManager, ScaleControlStyle, ZoomControlStyle, FitBoundsService as ɵa, coreDirectives as ɵb, WindowRef as ɵc, DocumentRef as ɵd, BROWSER_GLOBALS_PROVIDERS as ɵe };\n//# sourceMappingURL=agm-core.js.map\n","import {Component} from '@angular/core'\n\n/**\n * Created by anikinma on 03.08.16.\n */\n@Component({\n    selector: 'cm-no-roles',\n    template: '<h1>{{\"noRoles.Msg\" | translate}}</h1>',\n})\n\nexport class CmNoRolesComponent {\n\n}\n","import {Component, OnInit, ViewChild} from '@angular/core';\nimport {OutsideJob} from '../cm-job.model';\nimport {Router} from '@angular/router';\nimport {CmHttpClient} from '../../../services/http_client';\nimport {Employee} from '../../cm-assign/cm-assign.component';\nimport {TableFilter} from '../../../shared/tableFilter';\nimport {TabTitle} from '../../../shared/tabTitle';\nimport {CmTranslateService} from '../../../services/localization/cm-translate.service';\nimport {CmLocationFilterComponent} from \"../../cm-filters/cm-location-filter/cm-location-filter.component\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {Modal, overlayConfigFactory} from \"ngx-modialog\";\nimport {BSModalContext, Modal as ModalDialog} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmJobItemComponent} from \"../item/cm-job-item.component\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport {SpinnerUtils} from '../../../shared/spinnerUtils';\nimport {CmLocationsService} from \"../../../services/cm-location.service\";\nimport {BikeType} from \"../../../shared/bike\";\nimport * as moment from \"moment\";\n\n@Component({\n  selector: 'cm-job-list',\n  template: require('./cm-job-list.component.html'),\n  styles: [require('../../cm-main/main.css').toString(), require('./cm-job-list.component.scss').toString()]\n})\nexport class CmJobListComponent extends TabTitle implements OnInit {\n  private jobList: Array<OutsideJob> = [];\n  private userList: Array<Employee> = [];\n\n  private currentTimeStr = moment().format();\n\n  private tableSummary;\n\n  private pageLimit: number = 15;\n  private total: number;\n  private page: number = 1;\n\n  private filtersSorters: JobListFiltersAndSorters = new JobListFiltersAndSorters();\n\n  private spType: string = SpinnerUtils.type;\n  private spText: string = SpinnerUtils.text;\n  private spColor: string = SpinnerUtils.color;\n  private spBdColor: string = SpinnerUtils.bdColor;\n  private spFullScreen: boolean = SpinnerUtils.fullScreen;\n  private spSize: string = SpinnerUtils.size;\n\n\n  @ViewChild(CmLocationFilterComponent,{static:false})\n  private locationFilter: CmLocationFilterComponent;\n\n  constructor(private router: Router,\n              private http: CmHttpClient,\n              public translate: CmTranslateService,\n              private modal: Modal,\n              private componentTracker: CmComponentTrackerService,\n              private spinner: NgxSpinnerService,\n              private modalDialog: ModalDialog,\n              private locationsService: CmLocationsService\n) {\n    super('outsideJob.Title', translate);\n\n    this.http.get <Array<Employee>>('/user-information/api/v1/users').subscribe(data => {\n      this.userList = Employee.sortUsers(data);\n    });\n  }\n\n  ngOnInit() {\n    this.loadData();\n  }\n\n  private loadData() {\n    this.spinner.show();\n    this.http\n      .get(\n        '/bikes-sql/api/v1/tasks/list?' +\n          'page=' +\n          this.page +\n          '&limit=' +\n          this.pageLimit +\n          this.filtersSorters.toString()\n      )\n      .subscribe((data:any) => {\n        this.spinner.hide();\n        this.jobList = data.content;\n        this.total = data.total;\n        this.tableSummary = data.sum;\n        if(this.total == 0){\n          this.modalDialog.alert().message(this.translate.get(\"msg.NoResult\")).open();\n        }\n      }, error => {\n        console.log('Error', error);\n        this.spinner.hide();\n        this.modalDialog.alert().message(\"Error: \" + error);\n      }  );\n  }\n\n  private openLocation(outsideJob: OutsideJob) {\n    this.modal.open(CmJobItemComponent, overlayConfigFactory({jobId: outsideJob.location.locationId, branding: this.filtersSorters.branding}, BSModalContext))\n  }\n\n  private setPage(page: number) {\n    this.page = page;\n    this.loadData();\n  }\n\n  private sort(field) {\n    this.filtersSorters.sort(field);\n    this.loadData();\n  }\n\n  private filter() {\n    this.loadData();\n    this.filtersSorters.save();\n  }\n\n  private clearFilters() {\n    this.filtersSorters.clear();\n    this.locationsService.loadStationMDNew(1, 1000000 , this.filtersSorters.toString())  // like  CmLocationFilterComponent ngOnInit\n  }\n\n  changeDistrict($event) {\n    this.filtersSorters.district = $event;\n    this.filtersSorters.locations = null;\n    this.locationFilter.readRelatedLocations($event);\n  }\n\n  private getBikeTypes() {\n    return Object.keys(BikeType)\n  }\n\n  private getQuantity(item: OutsideJob, bikeType: string) {\n    return item == null || item.quantities == null ? null : item.quantities[bikeType];\n  }\n\n}\n\nclass JobListFiltersAndSorters extends TableFilter {\n  district: string;\n  locations: string;\n  priority: number;\n  users: Array<string>;\n  branding: Array<string>;\n\n  constructor() {\n    super('jobListFilters');\n  }\n\n  public clear() {\n    super.clear();\n    this.district = null;\n    this.locations = null;\n    this.priority = null;\n    this.users = [];\n    this.branding = [];\n    this.save();\n  }\n\n  public toString() {\n    let result = super.toString();\n    if (this.priority) {\n      result += '&priority=' + this.priority;\n    }\n    if (this.locations) {\n      result += '&location=' + this.locations;\n    }\n    if (this.district) {\n      result += '&district=' + this.district;\n    }\n    if (this.branding && this.branding.length > 0) {\n      result += '&bikeBranding=' + this.branding;\n    }\n    if (this.users && this.users.length > 0) {\n      result += '&users=' + this.users;\n    }\n\n    return result;\n  }\n}\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmLocation, CmLocationsService} from \"../../../services/cm-location.service\";\nimport {CmHttpClient} from \"../../../services/http_client\";\n\n@Component({\n    selector: 'cm-location-filter',\n    template: require('./cm-location-filter.component.html')\n})\nexport class CmLocationFilterComponent implements OnInit {\n\n    @Input() location: number = null;\n    @Output() changeLocation: EventEmitter<number> = new EventEmitter<number>();\n\n    private locationList: Array<CmLocation> = [];\n\n    constructor(private locationService : CmLocationsService,\n                private http: CmHttpClient) {\n        locationService.masterDataLoadedNew$.subscribe(\n            data => {\n                let content = data.content;\n                content.sort((a,b)=>a.fullName.localeCompare(b.fullName));\n                this.locationList = content;\n            }\n        );\n    }\n\n    ngOnInit() {\n        this.locationService.loadStationMDNew(1, 1000000); // also clearFilters() in CmJobListComponent\n    }\n\n    private _changeLocation() {\n        this.changeLocation.next(this.location);\n    }\n\n    readRelatedLocations(district) {\n        if(district) {\n            this.http.get<Array<CmLocation>>('/bikes-sql/api/v1/locations/byDistrict?district='+district).subscribe(data => {\n                let content = data;\n                if (content) {\n                    content.forEach(el => {\n                        el.fullName = this.locationService.getFullName(el);\n                    });\n                }\n                content.sort((a,b)=>a.fullName.localeCompare(b.fullName));\n                this.locationList = content;\n            });\n        }\n    }\n\n}","import { Injectable } from '@angular/core';\nimport { CmHttpClient } from './http_client';\n\n/**\n * Maybe one day we are smart enough to realize that we want to send any kind of email to any recipient. Then we can use this service.\n */\n@Injectable()\nexport class CmEmailServiceService {\n\n  private readonly url = '/script-support/api/v2/rules/run/saveComplain';\n\n  constructor(private http: CmHttpClient) {}\n\n}\n","import {Serializable} from \"../../shared/serializable\";\nimport {CmCoordinates} from \"../../shared/coordinates\";\nimport {CmLocationData} from \"../../shared/location\";\nimport {CmBikeListItem} from \"../cm-bike-short-list/cm-bike-list.model\";\n\nexport interface TroubleTicketList {\n    tickets: Array<TroubleTicket>;\n    total: number;\n}\n\nexport class TroubleTicket extends Serializable {\n    //list data\n    id: number;\n    bike: CmBikeListItem;\n    bikes: Array<TroubleTicketBike> = [];\n    category: string;\n    location: CmLocationData;\n    status: string;\n    priority: number;\n    firstTripInMinutes: number;\n\n    //details data\n    coordinates: CmCoordinates;\n    time: string;\n    reporter: string;\n    whoCaused: string;\n    booking: number;\n    customer: number;\n    // type: string;\n    issue: string;\n    creationDate: string;\n    createdHow: string;\n    createdBy: string;\n    type: string;\n\n    pictureNames: Array<string> = [];\n\n    constructor() {\n        super();\n        this.priority = 3;\n    }\n}\n\nexport class TroubleTicketBike {\n    bikeId: number;\n    bikeNumber: string;\n    coordinates: CmCoordinates;\n\n    constructor(bikeId: number, bikeNumber: string, coordinates: CmCoordinates) {\n        this.bikeId = bikeId;\n        this.bikeNumber = bikeNumber;\n        this.coordinates = coordinates;\n    }\n}\n","import {Component, EventEmitter, Input, Output} from \"@angular/core\";\nimport {PagerService} from \"../../services/cm-pager.service\";\n\n@Component({\n    selector: 'pager',\n    template: require('./pager.component.html'),\n    styles: ['.cursCm{cursor:pointer}']\n})\nexport class PagerComponent {\n\n    @Input() total = 15;\n    @Input() pageLimit = 15;\n    @Input() pageNo : number = 1;\n    @Output() page: EventEmitter<number> = new EventEmitter<number>();\n    @Output() pager: EventEmitter<any> = new EventEmitter<any>();\n\n    private _pager;\n\n    constructor(private pagerService: PagerService) {\n    }\n\n    ngOnChanges() {\n        this._pager = this.pagerService.getPager(this.total, 1, this.pageLimit,true);\n        this.setPage(this.pageNo)\n    }\n\n    private setPage(page: number) {\n        if (page >= 1 && (page -1) < this._pager.totalPages && page != this._pager.currentPage) {\n            this._pager = this.pagerService.getPager(this.total, page, this.pageLimit, false);\n            this.page.next(page);\n            this.pager.next(this._pager);\n        }\n    }\n\n    public skipPage(): void {\n        this.setPage(1);\n    }\n\n    private setLastPage( current:number) {\n        if (current  != this._pager.totalPages) {\n            this.setPage(this._pager.totalPages);\n        }\n    }\n    private setFirstPage( current:number) {\n        if (current  != 1) {\n            this.setPage(1);\n        }\n    }\n    private setNextPage( current:number , next : number) {\n        if (current  != next) {\n            this.setPage(next);\n        }\n    }\n\n}","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\nimport { Subscription } from 'rxjs/Subscription';\nimport { Router } from '@angular/router';\nimport { CmLocation, CmLocationsService } from '../../../services/cm-location.service';\nimport { TableFilter } from '../../../shared/tableFilter';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport { Modal } from 'ngx-modialog/plugins/bootstrap';\nimport {CmUtil} from \"../../../shared/cm-util\";\nimport * as moment from \"moment\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\n\n@Component({\n  selector: 'cm-locations',\n  template: require('./cm-location-list.component.html'),\n  styles: [require('../../cm-main/main.css').toString()]\n})\nexport class CmLocationListComponent extends TabTitle implements OnInit, OnDestroy {\n  private locationList: Array<CmLocation> = [];\n  private csvFile;\n  private csvFileName: string;\n  private totalExport = 10000;\n\n\n    private filter: LocationFilters = new LocationFilters();\n\n  private pageLimit: number = 15;\n  private total: number;\n  private page: number = 1;\n\n  private sub: Subscription;\n\n  private spType: string = SpinnerUtils.type;\n  private spText: string = SpinnerUtils.text;\n  private spColor: string = SpinnerUtils.color;\n  private spBdColor: string = SpinnerUtils.bdColor;\n  private spFullScreen: boolean = SpinnerUtils.fullScreen;\n  private spSize: string = SpinnerUtils.size;\n\n    @Input() parent = null;\n  @Output() selectLocation: EventEmitter<CmLocation> = new EventEmitter<CmLocation>();\n\n  constructor(\n    private modal:Modal,\n    private http: CmHttpClient,\n    private router: Router,\n    private locationsService: CmLocationsService,\n    public translate: CmTranslateService,\n    private dataService: DataService,\n    private componentTracker: CmComponentTrackerService,\n    private spinner: NgxSpinnerService,\n  ) {\n    super('jobList.LocationsLabel', translate);\n\n  }\n\n    ngOnDestroy(): void {\n        if(this.sub) {\n            this.sub.unsubscribe();\n        }\n    }\n\n  ngOnInit() {\n      if(!this.sub) {\n          this.sub = this.locationsService.masterDataLoadedNew$.subscribe(data => {\n                  this.spinner.hide();\n                  this.locationList = data.content;\n                  this.total = data.total;\n                  if (this.total == 0) {\n                      this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n                  }\n              },\n              error => {\n                  this.spinner.hide();\n                  console.log(\"error:  \" + +error)\n              }\n          );\n      }\n      let lastPage = this.componentTracker.readLastParentPageForCurrentComponentIfExist()\n      if(lastPage)\n          this.page = lastPage;\n      this.loadData();\n    this.csvFileName = this.translate.get('chooseFileToImport.label') || 'chooseFileToImport.label' ;\n  }\n\n  private loadData() {\n          setTimeout(() => this.spinner.show());\n\n          if(this.allowedToEditSettings() && this.filter.statuses.length != 2){\n              this.filter.statuses.push(this.locationsService.STATUS_INACTIVE, this.locationsService.STATUS_ACTIVE);\n          }\n          this.locationsService.loadStationMDNew(this.page, this.pageLimit, this.filter.toString())\n  }\n\n  private openLocation(location: CmLocation) {\n    if (this.parent) {\n      this.selectLocation.emit(location);\n    } else {\n        this.componentTracker.goToDetailsFromParentPage(this.page);\n        this.router.navigate(['/sec/locations', location.locationId]);\n    }\n  }\n\n  private setPage(page: number) {\n    this.page = page;\n    this.loadData();\n  }\n\n  private sort(field) {\n    this.filter.sort(field);\n    this.loadData();\n  }\n\n  private allowedToEditSettings(): boolean {\n      return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n\n  private uploadFileChoose(event) {\n        let file = event.target.files[0];\n        if (!file) return;\n\n        this.csvFileName = file.name;\n        let reader = new FileReader();\n        let thisContext = this;\n\n        reader.addEventListener(\"load\",\n            function () {\n                thisContext.csvFile = reader.result;\n            }, false);\n\n        reader.readAsText(file);\n  }\n\n  private showMessage(message:any) {\n      this.modal.alert()\n          .message(\n              message.error? (message.error.message ? (message.error.message) : message.error): message\n          )\n          .open();\n  }\n\n}\n\nclass LocationFilters extends TableFilter {\n  like: string;\n  statuses: Array<string>;\n\n  constructor() {\n    super('locationListFilters');\n    this.statuses = new Array<string>();\n  }\n\n  public clear() {\n    super.clear();\n    this.like = null;\n    this.save();\n  }\n\n  public toString() {\n    let result = super.toString();\n    if (this.like) result += '&like=' + this.like;\n    if (this.statuses) result += '&statuses=' + this.statuses;\n\n    return result;\n  }\n\n}\n","import {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {CmLocation, CmLocationInterval, CmLocationsService} from '../../../services/cm-location.service';\nimport {Modal} from 'ngx-modialog/plugins/bootstrap';\nimport {CmTranslateService} from '../../../services/localization/cm-translate.service';\nimport {CmValidatable} from '../../cm-validatable/cm-validatable';\nimport {CmHttpClient} from '../../../services/http_client';\nimport {TabTitle} from '../../../shared/tabTitle';\nimport {BikeType} from \"../../../shared/bike\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: 'cm-location-item',\n  template: require('./cm-location-item.component.html'),\n  styles: [require('./cm-location-item.component.scss').toString()]\n})\nexport class CmLocationItemComponent extends TabTitle implements OnInit {\n  private locationId: number;\n  location: CmLocation;\n  private intervals: Array<CmLocationInterval> = [];\n\n  private validList: Array<CmValidatable> = [];\n  private maxValue: number = 999;\n  private maxIntervalsCount = 6;\n\n  private intervalDefault        : CmLocationInterval = null;\n  private intervalCurrent        : CmLocationInterval = null;\n\n  private pedelecIntervalDefault : CmLocationInterval = null;\n  private pedelecIntervalCurrent : CmLocationInterval = null;\n\n  private cargoIntervalDefault : CmLocationInterval = null;\n  private cargoIntervalCurrent : CmLocationInterval = null;\n\n  INTERVAL_DEFAULT = 'INTERVAL_DEFAULT';\n  INTERVAL_CURRENT = 'INTERVAL_CURRENT'\n\n  PEDELEC_DEFAULT  = 'INRERVAL_DEFAULT_PEDELEC';\n  PEDELEC_CURRENT  = 'INRERVAL_CURRENT_PEDELEC';\n\n  CARGO_DEFAULT = 'INTERVAL_DEFAULT_CARGO';\n  CARGO_CURRENT = 'INTERVAL_CURRENT_CARGO';\n\n  private statusChanged: boolean = false;\n\n  constructor(\n    private router: Router,\n    private r: ActivatedRoute,\n    public locationService: CmLocationsService,\n    private modal: Modal,\n    private http: CmHttpClient,\n    private translationService: CmTranslateService\n  ) {\n    super('jobList.LocationsLabel', translationService);\n\n    r.params.map(p => p).subscribe(data => {\n      this.locationId = (<any>data).id;\n    });\n  }\n\n  ngOnInit() {\n    this.http.get<CmLocation>('/bikes-sql/api/v1/locations/' + this.locationId).subscribe(data => {\n      let tmpLocation = data;\n      tmpLocation.fullName = this.locationService.getFullName(tmpLocation);\n      this.location = tmpLocation;\n    }); // ext sub\n    this.loadIntervals();\n  }\n\n  loadIntervals(){\n    this.http.get<Array<CmLocationInterval>>('/bikes-sql/api/v1/locations/' + this.locationId + '/intervals').subscribe(\n        (data:Array<CmLocationInterval>) => {\n          this.intervals = data;\n          let i = this.intervals.length;\n          if(i > this.maxIntervalsCount){\n            this.modal.alert().message(\"error: intervals so march!!\").open();\n          }\n          let map = new Map();\n\n          while (i>0){\n            i--;\n            let t = this.intervals[i];\n            let t1 = BikeType.PEDELEC;\n            let t2 = BikeType.CARGOPEDELEC;\n            let t3 = BikeType.BIKE;\n            let t4 = BikeType[BikeType.PEDELEC];\n            let t5 = BikeType[BikeType.CARGOPEDELEC];\n            let t6 = BikeType[BikeType.BIKE];\n            let t7 = BikeType[t.type];\n            if(this.intervals[i].startTime == null && this.intervals[i].finishTime == null){  // Defaults\n\n              if( this.intervals[i].type == BikeType[BikeType.PEDELEC] ) {\n                this.pedelecIntervalDefault = this.intervals[i];\n                map.set(this.PEDELEC_DEFAULT, this.pedelecIntervalDefault)\n              }else if(this.intervals[i].type == BikeType[BikeType.CARGOPEDELEC]){\n                this.cargoIntervalDefault = this.intervals[i];\n                map.set(this.CARGO_DEFAULT, this.cargoIntervalDefault)\n              }else{\n                this.intervalDefault = this.intervals[i];\n                map.set(this.INTERVAL_DEFAULT,this.intervalDefault)\n              }\n\n\n            }else{\n\n\n              if(this.intervals[i].type == BikeType[BikeType.PEDELEC]){\n                this.pedelecIntervalCurrent = this.intervals[i];\n                map.set(this.PEDELEC_CURRENT,this.pedelecIntervalCurrent)\n              }else if(this.intervals[i].type == BikeType[BikeType.CARGOPEDELEC]){\n                this.cargoIntervalCurrent  = this.intervals[i];\n                map.set(this.CARGO_CURRENT,this.cargoIntervalCurrent)\n              }else {\n                this.intervalCurrent =  this.intervals[i];\n                map.set(this.INTERVAL_CURRENT,this.intervalCurrent)\n              }\n            }\n\n          }\n\n\n\n//-----------------------------------------------------\n\n          if( !map.has(this.PEDELEC_DEFAULT)  ){\n            this.pedelecIntervalDefault = new CmLocationInterval();\n            this.pedelecIntervalDefault.type = BikeType[BikeType.PEDELEC];\n            this.pedelecIntervalDefault.startTime = null;\n            this.pedelecIntervalDefault.finishTime = null;\n            this.pedelecIntervalDefault.locationId = this.locationId;\n            this.intervals.push(this.pedelecIntervalDefault);\n          }\n          if( !map.has(this.CARGO_DEFAULT)  ){\n            this.cargoIntervalDefault = new CmLocationInterval();\n            this.cargoIntervalDefault.type = BikeType[BikeType.CARGOPEDELEC];\n            this.cargoIntervalDefault.startTime = null;\n            this.cargoIntervalDefault.finishTime = null;\n            this.cargoIntervalDefault.locationId = this.locationId;\n            this.intervals.push(this.cargoIntervalDefault);\n          }\n          if( !map.has(this.INTERVAL_DEFAULT)  ){\n            this.intervalDefault = new CmLocationInterval();\n            this.intervalDefault.type = BikeType[BikeType.BIKE];\n            this.intervalDefault.startTime = null;\n            this.intervalDefault.finishTime = null;\n            this.intervalDefault.locationId = this.locationId;\n            this.intervals.push(this.intervalDefault);\n          }\n          if( !map.has(this.PEDELEC_CURRENT)  ){\n            this.pedelecIntervalCurrent = new CmLocationInterval();\n            this.pedelecIntervalCurrent.type = BikeType[BikeType.PEDELEC];\n            this.pedelecIntervalCurrent.locationId = this.locationId;\n            this.intervals.push(this.pedelecIntervalCurrent);\n          }\n          if( !map.has(this.CARGO_CURRENT)  ){\n            this.cargoIntervalCurrent = new CmLocationInterval();\n            this.cargoIntervalCurrent.type = BikeType[BikeType.CARGOPEDELEC];\n            this.cargoIntervalCurrent.locationId = this.locationId;\n            this.intervals.push(this.cargoIntervalCurrent);\n          }\n          if( !map.has(this.INTERVAL_CURRENT)  ){\n            this.intervalCurrent = new CmLocationInterval();\n            this.intervalCurrent.type = BikeType[BikeType.BIKE];\n            this.intervalCurrent.locationId = this.locationId;\n            this.intervals.push(this.intervalCurrent);\n          }\n        }// int subscribe\n        ,error => {\n          console.log(\"error: \" + error);\n        }\n    ) //=====================================================\n\n  }\n\n  private changeLocationStatus(status){\n    this.location.currentStatus = status.target.checked ? this.locationService.STATUS_ACTIVE : this.locationService.STATUS_INACTIVE;\n    this.statusChanged = this.statusChanged == false;\n  }\n\n  private close() {\n    this.router.navigate(['/sec/locations']);\n  }\n\n  private save() {\n    let valid = true;\n    this.validList.forEach(el => {\n      let val = el.validate();\n      valid = valid ? val : false;\n    });\n\n    if (valid) {\n\n      if(!this.intervalCurrent.finishTime)\n        this.intervalCurrent.finishTime = 0;\n      if(!this.intervalCurrent.startTime)\n        this.intervalCurrent.startTime = 0;\n\n      if (!this.pedelecIntervalCurrent.finishTime)\n        this.pedelecIntervalCurrent.finishTime = 0;\n      if(!this.pedelecIntervalCurrent.startTime)\n        this.pedelecIntervalCurrent.startTime = 0;\n\n      if (!this.cargoIntervalCurrent.finishTime)\n        this.cargoIntervalCurrent.finishTime = 0;\n      if(!this.cargoIntervalCurrent.startTime)\n        this.cargoIntervalCurrent.startTime = 0;\n\n      let validIntervals = [];\n      for(let loc of this.intervals) {\n\n\n        if(\n               ( loc.max         ==null  )\n            && ( loc.min         ==null  )\n            && ( loc.optimum     ==null  )\n            && ( loc.thresholdMax==null  )\n            && ( loc.thresholdMin==null  )\n            && ( !loc.finishTime   || loc.finishTime   == 0 )\n            && ( !loc.startTime    || loc.startTime     == 0 )\n\n        ){\n                  // this.location.interval=null;\n        }else{\n          let isCorrect=true;\n          if( loc.max == null)          isCorrect=false;\n          if( loc.min == null)          isCorrect=false;\n          if( loc.optimum == null)      isCorrect=false;\n          if( loc.thresholdMin == null) isCorrect=false;\n          if( loc.thresholdMax == null) isCorrect=false;\n\n          if(!isCorrect) {\n            this.modal\n                .alert().message(this.translationService.get(\"message.fill.error\")).open()\n            return\n          };\n\n          validIntervals.push(loc)\n        }\n\n     }\n\n\n      this.http.post('/bikes-sql/api/v1/locations/' + this.locationId + '/intervals', validIntervals).subscribe(() => {\n\n        if(this.statusChanged){\n\n          this.locationService.locationStatusUpdate(this.locationId, this.location.currentStatus).subscribe((data)=>{\n\n            this.http.put('/bikes-sql/api/v1/locations/' + this.locationId, {\"currentStatus\" : this.location.currentStatus}).subscribe(() => {\n\n              let message = this.translationService.get('message.SaveMsg')\n                  + ' <br/> ' + this.translationService.get(this.locationService.isLocationActive(this.location) ? 'message.stationActivated' : 'message.stationDeactivated');\n\n              this.modal\n                  .alert()\n                  .message(message)\n                  .message(message)\n                  .open()\n                  .result\n                  .then(dialog => dialog.result)\n                  .then(result => window.location.reload());\n\n\n              this.statusChanged = false;\n            })\n          });\n\n        }else{\n          this.modal\n              .alert()\n              .message(this.translationService.get('message.SaveMsg'))\n              .open()\n              .result\n              .then(dialog => dialog.result)\n              .then(result => window.location.reload());\n        }\n      });\n    }\n\n  }\n\n\n\n  private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n\n}\n","import {Component, OnChanges, OnInit, SimpleChanges, ViewChild} from \"@angular/core\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { DataService } from \"../../../services/cm-data.service\";\nimport { CmSparePart } from \"../cm-spare-part-list.model\";\nimport { Router } from \"@angular/router\";\nimport { TableFilter } from \"../../../shared/tableFilter\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { CmUtil } from \"../../../shared/cm-util\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\nimport * as moment from 'moment/moment';\nimport {Modal, OneButtonPreset} from \"ngx-modialog/plugins/bootstrap\";\nimport {HttpHeaders, HttpResponse} from \"@angular/common/http\";\nimport {PageAdapter} from \"../list-modal/cm-spare-part-list-modal.component\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../../shared/spinnerUtils';\nimport {CmReportComponent} from \"../../cm-report/cm-report.component\";\nimport {ReportExtractParam, ReportExtractParamField} from \"../../../shared/reportExtractParam\";\nimport {PagerService} from \"../../../services/cm-pager.service\";\n\n@Component({\n  selector: \"cm-spare-part-list\",\n  template: require(\"./cm-spare-part-list.component.html\"),\n  styles: [require(\"../../cm-main/main.css\").toString()]\n})\nexport class CmSparePartListComponent extends TabTitle implements OnInit {\n  private spareParts: Array<CmSparePart> = [];\n  private totalExport = 10000;\n\n  private pageLimit: number = 15;\n  private total: number;\n  private page: number = 1;\n\n  private filters: Filters = new Filters();\n  private categories = [];\n  private parts = [];\n  private stationList = [];\n  private stationCodes = [];\n\n  private csvFile;\n  private csvFileName: string;\n\n  private reportType: string = \"Inventory\";\n  private reportsListLen: Number = 0;\n  private childProcessing: boolean = false;\n  private maxReportsListSize = 5;\n    @ViewChild('archivedrep', {static: false}) archivedChild: CmReportComponent;\n\n\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n    private _pager;\n\n    constructor(\n    private http: CmHttpClient,\n    private dataService: DataService,\n    private router: Router,\n    public translate: CmTranslateService,\n    private modal:Modal,\n    private componentTracker: CmComponentTrackerService,\n    private spinner: NgxSpinnerService,\n    private pagerService: PagerService\n  ) {\n    super(\"menu.InventoryLabel\", translate);\n  }\n\n  ngOnInit() {\n      this._pager = this.pagerService.getPager(this.total, 1, this.pageLimit,true);\n    this.csvFileName = this.translate.get('chooseFileToImport.label') || 'chooseFileToImport.label' ;\n    this.dataService.getStationList().subscribe(data => {\n        this.stationList = this.simpleSort(data, \"text\");\n        this.stationCodes= this.stationList===null? null : this.stationList.map(function(station){return station.name});\n        let lastPage = this.componentTracker.readLastParentPageForCurrentComponentIfExist()\n        if(lastPage)\n            this.page = lastPage;\n        // this.loadData();\n            this.setPage(this._pager.currentPage);\n       },\n        err => {\n            console.log(\"err!!!\" + err)\n        }\n    );\n\n    this.reloadCategories(true);\n\n  }\n\n    private simpleSort(list: any[], sortProperty: string): any[] {\n    if (list) {\n      return list.sort((a, b) => {\n        if (a[sortProperty]) return a[sortProperty].localeCompare(b[sortProperty]);\n        return 0;\n      });\n    }\n    return list;\n  }\n\n  private  reloadCategories(init: boolean){\n      var go : boolean = false;\n      if(init==true){\n          go=this.filters.showHidden;\n      }else{\n          go=!this.filters.showHidden;\n      }\n\n      this.dataService.getSparePartsCategoriesList(go).subscribe(data => {\n          this.categories = this.simpleSort(data, \"text\");\n          if (this.filters.category) this.loadInventoryPart();\n      }\n      , err => {\n          console.log(\"error downloading category list!  \" + err);\n          }\n      );\n  }\n\n  private loadData() {\n    this.setPage(this.page);\n  }\n\n  private loadInventoryPart() {\n    this.dataService\n      .getSparePartsByCategory(this.filters.category)\n      .subscribe(data =>\n          (this.parts = this.simpleSort(data, \"text\")));\n  }\n\n  private openSparePart(sparePart: CmSparePart) {\n      this.componentTracker.goToDetailsFromParentPage(this.page);\n      this.router.navigate([`/sec/sparePart/${sparePart.id}`]);\n  }\n\n    onPager(pager: any){\n\n    }\n\n  private setPage(page: number) {\n      this.spinner.show();\n      this.page = page;\n      let stationsVar =\"\";\n      if( !this.filters.showAllCities){\n          stationsVar = stationsVar + `&stations=${this.stationCodes}`;\n      }\n\n      this.http\n      .get<PageAdapter<CmSparePart>>(\n        `/bikes-sql/api/v1/availability/availability/parts?page=${page}&limit=${\n          this.pageLimit\n        }${this.filters.toString()}${stationsVar}`)\n      // .map(result => result.json())\n      .subscribe(data => {\n        this.spareParts = data.content;\n        this.total = data.total;\n        this.spinner.hide();\n            if(this.total == 0){\n              this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n             }\n        }\n      ,\n      error => {\n               this.spinner.hide();\n               console.error(error);\n               let msg = error.message;\n               if(!msg) {\n                   msg = \"Error receiving data\";\n               }\n               this.modal.alert().message(msg).size(\"lg\").title(\"Error\").open();\n\n           }\n      );\n  }\n  private filter() {\n    this.page = 1;\n    this.loadData();\n    this.filters.save();\n  }\n\n  private clearFilters() {\n    this.filters.clear();\n  }\n\n  private addGroup() {\n    this.router.navigate([\"/sec/sparePart/addGroup\"]);\n  }\n\n  private addPart() {\n    this.router.navigate([\"/sec/sparePart/-1\"]);\n  }\n\n  private createMovement() {\n    this.router.navigate([\"/sec/sparePart/movePart\"]);\n  }\n\n  private exportData() {\n      if(this.total > this.totalExport ){\n          this.modal.alert().message(this.translate.get('troubleTickets.reportFilterMessage')).open();\n          return;\n      }\n\n      let stationsVar =\"\";\n      if( !this.filters.showAllCities){\n          stationsVar = stationsVar + `&stations=${this.stationCodes}`;\n      }\n\n     window.open(this.http.getUrlPrefix() + `/bikes-sql/api/v1/availability/availability/partsXls?${this.filters.toString()}${stationsVar}`, \"blank\");\n  }\n\n  private sort(field) {\n    this.filters.sort(field);\n    this.reloadData();\n  }\n\n  public reloadData() {\n    this.spareParts = [];\n    this.loadData();\n  }\n\n     loadReportCsv(){\n         if(this.reportsListLen >= this.maxReportsListSize){\n             this.archivedChild.removeLastReportFromList();\n         }\n\n        let urlParams = this.filters.toString();\n        if(urlParams.length > 0) {\n            urlParams = '?' + urlParams.substring(1);\n        }\n\n        let pathVar = `/bikes-sql/api/v1/availability/availability/parts-report?${this.filters.toString()}`;\n\n        if( !this.filters.showAllCities){\n            pathVar = pathVar + `&stations=${this.stationCodes}`;\n        }\n\n        let substitutionsQuantityType = {\n            \"Pieces\": this.translate.get(\"report.inventory.cell.Pieces\"),\n            \"Box\": this.translate.get(\"report.inventory.cell.Box\")\n        };\n        let substitutionsType = {\n            \"USAGE\": this.translate.get(\"report.inventory.cell.USAGE\"),\n            \"TRANSFER\": this.translate.get(\"report.inventory.cell.TRANSFER\"),\n            \"INCOME\": this.translate.get(\"report.inventory.cell.INCOME\"),\n            \"WASTING\": this.translate.get(\"report.inventory.cell.WASTING\")\n        };\n\n         let stationSubstitution = {};\n         this.stationList.forEach(s => stationSubstitution[s.name] = s.text);\n\n         let reportParams = new ReportExtractParam();\n         reportParams.method = \"GET\";\n         reportParams.path = pathVar;\n         reportParams.fields =\n             [\n             new ReportExtractParamField(\"id\"         , this.translate.get(\"report.inventory.header.id\")),\n             new ReportExtractParamField(\"category\"   , this.translate.get(\"report.inventory.header.category\")),\n             new ReportExtractParamField(\"part\"       , this.translate.get(\"report.inventory.header.part\")),\n             new ReportExtractParamField(\"quantity\"   , this.translate.get(\"report.inventory.header.quantity\")),\n             new ReportExtractParamField(\"barcode\"    , this.translate.get(\"report.inventory.header.barcode\")),\n             new ReportExtractParamField(\"supplier\"   , this.translate.get(\"report.inventory.header.supplier\")),\n             new ReportExtractParamField(\"description\", this.translate.get(\"report.inventory.header.description\")),\n             new ReportExtractParamField(\"articleNumber\", this.translate.get(\"report.inventory.header.articleNumber\")),\n             new ReportExtractParamField(\"supplierArticleNumber\", this.translate.get(\"report.inventory.header.supplierArticleNumber\")),\n             new ReportExtractParamField(\"lastMovements.beforeMoving\", this.translate.get(\"report.inventory.header.before\")),\n             new ReportExtractParamField(\"lastMovements.quantity\", this.translate.get(\"report.inventory.header.lastMovements.quantity\")),\n             new ReportExtractParamField(\"lastMovements.afterMoving\",  this.translate.get(\"report.inventory.header.lastMovements.after\")),\n             new ReportExtractParamField(\"lastMovements.quantityType\", this.translate.get(\"report.inventory.header.lastMovements.quantityType\"), null, null, substitutionsQuantityType),\n             new ReportExtractParamField(\"lastMovements.when\", this.translate.get(\"report.inventory.header.lastMovements.when\"), \"dd.MM.yyyy HH:mm\",  \"CET\"),\n             new ReportExtractParamField(\"lastMovements.from\", this.translate.get(\"report.inventory.header.lastMovements.from\"), null, null, stationSubstitution),\n             new ReportExtractParamField(\"lastMovements.to\", this.translate.get(\"report.inventory.header.lastMovements.to\"), null, null, stationSubstitution),\n             new ReportExtractParamField(\"lastMovements.who\", this.translate.get(\"report.inventory.header.lastMovements.who\")),\n             new ReportExtractParamField(\"lastMovements.type\", this.translate.get(\"report.inventory.header.lastMovements.type\"), null, null, substitutionsType),\n             new ReportExtractParamField(\"lastMovements.comment\", this.translate.get(\"report.inventory.header.lastMovements.comment\")),\n             new ReportExtractParamField(\"lastMovements.bikeNumber\", this.translate.get(\"report.inventory.header.lastMovements.bikeNumber\")),\n             new ReportExtractParamField(\"lastMovements.availableQuantity\", this.translate.get(\"report.inventory.header.lastMovements.availableQuantity\")),\n             new ReportExtractParamField(\"lastMovements.availableQuantityTo\", this.translate.get(\"report.inventory.header.lastMovements.availableQuantityTo\")),\n             new ReportExtractParamField(\"usedParts\", this.translate.get(\"report.inventory.header.usedParts\"))\n             ];\n\n         let reportFileName = this.translate.get(\"report.inventory.fileName\") ;\n\n         this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n             .subscribe(\n                 data => {\n                     this.childProcessing = true;\n                     this.archivedChild.startProcessingProcess();\n\n                 },\n                 error => {\n                     console.log(\"Error downloading the file.\");\n                 });\n\n\n\n     };\n\n\n    private getStationName(testId) : string {\n        try {\n            for (let station of this.stationList) {\n                if (parseInt(testId) === parseInt(station.name)) {\n                    return station.text;\n                }\n            }\n        } catch (e) {\n            //ignore the parse error and return testId\n        }\n        return testId;\n    }\n\n    uploadFileChoose(event){\n        let file = event.target.files[0];\n        if (!file) return;\n\n        this.csvFileName = file.name;\n        let reader = new FileReader();\n        let thisContext = this;\n\n        reader.addEventListener(\"load\",\n            function () {\n                thisContext.csvFile = reader.result;\n            }, false);\n\n        reader.readAsText(file);\n\n    };\n\n    uploadCSVasJSON() {\n\n        var newArr = CmUtil.CSVToArray(this.csvFile, ',');\n        let result = [];\n        for (let i = 1; i< newArr.length ;i++) {\n            let obj = {};\n            for (let j = 0; j < newArr[0].length; j++) {\n                obj[newArr[0][j]] = newArr[i][j];\n            }\n            let isNotEmptyObject=false;\n            for(var key in obj){\n                if(obj[key]){\n                    isNotEmptyObject=true;\n                    break;\n                }\n            }\n            if(!isNotEmptyObject)\n            {continue;\n            }\n            result.push(obj);\n        }\n\n        this.dataService.sendJson('/bikes-sql/api/v1/parts/saveall', result)\n            .subscribe(\n                reps => {\n                    const msgArr = reps;//.json();\n                    if ( msgArr.length > 0 ) {\n                        let msg = \"Results: Bikes did not uploaded!<br/>\";\n                        for (var i = 0; i < msgArr.length; i++) {\n                            msg += \"<br/> err no: \" + i+1 + \"<br/>\" + msgArr[i];\n                        }\n                        this.showMessage(msg)\n                    } else {\n                        this.showMessage(this.translate.get(\"successLabel\"))\n                    }\n                }\n                ,    err => this.showMessage(this.translate.get(err))\n            );\n\n    };\n\n    private canAddSparePart() {\n        let params = CmGuardService.getTokenParam(\"parameters\");\n        return params[\"canAddSparePart\"] == true\n    }\n\n    private canAddStockMovement() {\n        let params = CmGuardService.getTokenParam(\"parameters\");\n        return params[\"canAddStockMovement\"] == true\n    }\n\n    private allowedToEditSettings(): boolean {\n        return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n    }\n    private showMessage(message:any) {\n        this.modal.alert()\n            .message(message)\n            .open();\n    }\n\n    canLoadXls():boolean {\n        return CmGuardService.isOrganizationAdmin();\n    }\n\n\n    processingMessage(event: any) {\n        this.childProcessing = event;\n    }\n\n    onListSize($event: Number) {\n        this.reportsListLen = $event\n        let i=0;\n    }\n\n\n}\n\nclass Filters extends TableFilter {\n  id: number;\n  articleNumber: string;\n  station: number;\n  category: string;\n  part: string;\n  freeText: string;\n  showHidden: boolean;\n  showAllCities: boolean; // don't put to toString() !!!\n  dateMovingStarted: string;\n  dateMovingFinished: string;\n\n  constructor() {\n    super(\"sparePartListFilters\");\n  }\n\n  public toString(): string {\n    let url: string = super.toString();\n    if (this.id) url += \"&id=\" + this.id;\n    if (this.articleNumber) url += \"&articleNumber=\" + this.articleNumber;\n    if (this.station) url += \"&station=\" + this.station;\n    if (this.category) url += \"&category=\" + this.category;\n    if (this.part) url += \"&part=\" + this.part;\n    if (this.freeText) url += \"&freeText=\" + encodeURIComponent(this.freeText);\n    if (this.showHidden) url += \"&showHidden=\" + this.showHidden;\n    if (this.dateMovingStarted) {\n          url += '&dateMovingStarted=' + encodeURIComponent(this.dateMovingStarted);\n    }\n    if (this.dateMovingFinished) {\n          url += '&dateMovingFinished=' + encodeURIComponent(this.dateMovingFinished);\n    }\n\n    return url;\n  }\n\n  public clear() {\n    super.clear();\n    this.id = null;\n    this.articleNumber  = null;\n    this.station = null;\n    this.category = null;\n    this.part = null;\n    this.freeText = null;\n    this.showHidden = false;\n    this.showAllCities = false;\n    this.dateMovingFinished = null;\n    this.dateMovingStarted = null;\n    this.save();\n  }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { CmHttpClient } from '../../services/http_client';\nimport { DataService } from '../../services/cm-data.service';\nimport { Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { CmTranslateService } from '../../services/localization/cm-translate.service';\nimport { TabTitle } from '../../shared/tabTitle';\nimport { CmUtil, SORT_DIRECTION } from '../../shared/cm-util';\n\n@Component({\n  selector: 'cm-move-spare-part',\n  template: require('./cm-move-spare-part.component.html'),\n  styles: ['.cm-warn{  border-color:red;}']\n})\nexport class CmMoveSparePartComponent extends TabTitle implements OnInit {\n  private model: CmSparePartMovement = new CmSparePartMovement();\n\n  private stationFromList = [];\n  private stationToList = [];\n  private categories = [];\n  private parts = [];\n  private quantityTypeList = [];\n\n  private newFrom = 'new';\n  private wasteTo = 'waste';\n  private isSavePressed = false;\n\n  constructor(\n    private router: Router,\n    private http: CmHttpClient,\n    private dataService: DataService,\n    private modal: Modal,\n    private translationService: CmTranslateService\n  ) {\n    super('inventory.CreateMovementLabel', translationService);\n  }\n\n  ngOnInit() {\n    this.dataService.getStationList().subscribe(data => {\n      this.stationFromList = CmUtil.simpleSort(data.slice(0), 'text', SORT_DIRECTION.ASC);\n      this.stationFromList.push({ name: this.newFrom, text: 'new.Label' });\n      this.stationToList = CmUtil.simpleSort(data.slice(0), 'text', SORT_DIRECTION.ASC);\n      this.stationToList.push({ name: this.wasteTo, text: 'waste.Label' });\n    });\n\n    this.dataService\n      .getSparePartsCategoriesList()\n      .subscribe(\n        data => (this.categories = CmUtil.simpleSort(data.filter(d => d.text !== null), 'text', SORT_DIRECTION.ASC))\n      );\n\n    this.dataService.returnLocalizedMap('quantityType').subscribe((data:any) => {\n      this.quantityTypeList = data.quantityType;\n      this.model.quantityType = 'Pieces';\n    });\n  }\n\n  private save(isValid: boolean) {\n    this.isSavePressed = true;\n    if(isValid == false){\n      return;\n    }\n    let url: string = '/bikes-sql/api/v1/transfer';\n    if (this.model.from === this.newFrom) {\n      url = '/bikes-sql/api/v1/bring';\n    } else if (this.model.to === this.wasteTo) {\n      url = '/bikes-sql/api/v1/waste';\n    }\n\n    this.http.post(url, this.model).subscribe(\n      () =>\n        this.modal\n          .alert()\n          .message(this.translationService.get('message.SaveMsg'))\n          .open()\n            .result\n          .then(dialog => dialog.result)\n          .then(result => this.close())\n          .catch(err => {}),\n      error =>\n        this.modal\n          .alert()\n          .message(this.translationService.get(\n              error.error? (error.error.message ? (error.error.message) : error.error): error\n          ))\n          .open()\n    );\n  }\n\n  private close() {\n    this.router.navigate(['/sec/sparePart']);\n  }\n\n  private loadInventoryPart() {\n    this.dataService\n      .getSparePartsByCategory(this.model.category)\n      .subscribe(\n        data => (this.parts = CmUtil.simpleSort(data.filter(d => d.text !== null), 'text', SORT_DIRECTION.ASC))\n      );\n  }\n}\n\nclass CmSparePartMovement {\n  category: string;\n  part: number;\n  from: string;\n  to: string;\n  quantity: number;\n  quantityType: string;\n  comment: string;\n}\n","import {Component, Input} from \"@angular/core\";\nimport {Router} from \"@angular/router\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {CmSparePartCategory} from \"../cm-spare-part-category.model\";\nimport {DialogRef} from \"ngx-modialog\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\n\n@Component({\n    selector: 'cm-add-spare-part-category',\n    template: require('./cm-spare-part-category.component.html'),\n    styles: ['.cm-warn{border-color:red;}']\n})\nexport class CmAddSparePartCategoryComponent extends TabTitle {\n\n    @Input() modalDialog: DialogRef<RenameSparePartContext>;\n\n    private category: CmSparePartCategory = new CmSparePartCategory(-1, null);\n    private isSavePressed = false;\n\n    constructor(private router: Router,\n                private http: CmHttpClient,\n                private modal: Modal,\n                private translationService: CmTranslateService) {\n        super('inventory.AddGroupBtn', translationService);\n    }\n\n    ngOnChanges() {\n        if (this.modalDialog) {\n            this.category = this.modalDialog.context.category;\n        }\n    }\n\n    private save(isValid: boolean) {\n        this.isSavePressed = true;\n        if(isValid == false){\n            // this.modal.alert().message(this.translationService.get('damageCategoryConfig.EmptyFieldLabel')).open();\n            return;\n        }\n        let saveData = {\n            number: this.category.number > 0 ? this.category.number : null,\n            code: this.category.code\n        };\n        this.http.put('/bikes-sql/api/v1/category', saveData).subscribe(\n            data => this.modal.alert()\n                .message(this.translationService.get('message.SaveMsg'))\n                .open()\n                .result\n                .then(dialog => dialog.result)\n                .then(result => this.close())\n                .catch(err => {\n                }),\n            error => this.modal.alert()\n                .message(\n                    this.translationService.get(\n                        error.error?(error.error.errors?error.error.errors[0].defaultMessage:error.error.message):\n                        error.message\n                    )\n                )\n                .open()\n        )\n    }\n\n    private close() {\n        if (this.modalDialog) {\n            this.modalDialog.context.parent.loadCategories();\n            this.modalDialog.close();\n        } else {\n            this.router.navigate(['/sec/sparePart']);\n        }\n    }\n\n    onNameChange(){\n        this.category.code = this.category.code.trimLeft();\n    }\n}\n\nexport class RenameSparePartContext extends BSModalContext {\n    public parent: any;\n    public category: CmSparePartCategory;\n}\n","export class CmSparePartCategory {\n    number: number;\n    code: string;\n\n    constructor(number: number, code: string) {\n        this.number = number;\n        this.code = code;\n    }\n}","import { CmUtil, SORT_DIRECTION } from './../../../shared/cm-util';\nimport {Component, OnInit, ViewContainerRef} from '@angular/core';\nimport {ActivatedRoute, Router} from \"@angular/router\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport * as moment from \"moment/moment\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\nimport {DataService} from \"../../../services/cm-data.service\";\nimport {CmSparePart} from \"../cm-spare-part-list.model\";\nimport {overlayConfigFactory} from \"ngx-modialog\";\nimport {CmModalSparePartCatWindow} from \"../../cm-spare-parts-category/rename/cm-spare-part-cat-window.component\";\nimport {CmSparePartCategory} from \"../../cm-spare-parts-category/cm-spare-part-category.model\";\nimport {TabTitle} from \"../../../shared/tabTitle\";\nimport {CmAmazonPicturesService} from \"../../../services/cm-amazon-picture.service\";\n\n@Component({\n    selector: 'cm-spare-part-detail',\n    template: require('./cm-spare-part-detail.component.html'),\n    styles: [require('./cm-spare-part-detail.component.scss').toString()]\n})\nexport class CmSparePartDetailComponent extends TabTitle implements OnInit {\n\n    private movementList: Array<MovementItem> = [];\n    private id: number;\n    private partData: CmSparePart = new CmSparePart();\n\n    private stationList = [];\n    private stationCodes = [];\n    private categories = [];\n\n    private movementLimit: number = 10;\n    private isSavePressed = false;\n\n    constructor(private router: Router,\n                private r: ActivatedRoute,\n                private http: CmHttpClient,\n                private modal: Modal,\n                private dataService: DataService,\n                private translationService: CmTranslateService,\n                private amazonPictures: CmAmazonPicturesService) {\n        super('menu.InventoryLabel', translationService);\n\n        r.params.map(p => p).subscribe(data => {\n            this.id = parseInt((<any>data).id);\n        });\n    }\n\n    ngOnInit() {\n        this.loadCategories();\n\n        if (this.id !== -1) {\n            this.dataService.getStationList().subscribe(\n                stations => {\n                    if(stations.length > 0) {\n                        this.stationList = stations;\n                        this.stationCodes= this.stationList===null? null : this.stationList.map(function(station){return station.name});\n                        this.http.post<Array<MovementItem>>('/bikes-sql/api/v1/moving/' + this.id + '?limit=' + this.movementLimit, this.stationCodes)\n                            .subscribe(\n                                data => {\n                                if (data.length > 0) {\n                                    this.movementList = data;\n                                }\n                            }\n                        );\n\n                    }\n                }\n            )//\n            this.http.get<CmSparePart>('/bikes-sql/api/v1/parts/' + this.id).subscribe(\n                data => this.partData = data\n            )\n        } else {\n            this.id = null;\n        }\n    }\n\n    public loadCategories(showHidden=false) {\n        this.dataService.getSparePartsCategoriesList(showHidden).subscribe(\n            data => this.categories = CmUtil.simpleSort(data.filter(d => d.text !== null), \"text\", SORT_DIRECTION.ASC)\n        );\n    }\n\n    private close() {\n        this.router.navigate(['/sec/sparePart']);\n    }\n\n    submitPictures() {\n        let pictureLinks = [];\n\n        if (!this.partData || !this.partData.pictures || this.partData.pictures.length < 1) return;\n\n        let pictures = this.partData.pictures;\n        for (let i = 0; i < pictures.length; i++) {\n            if (pictures[i]) {\n                pictureLinks.push(this.amazonPictures.submitPicture(pictures[i]));\n            }\n        }\n\n        return pictureLinks;\n    }\n\n    private save(isValid: boolean) {\n        this.isSavePressed = true;\n        if(isValid == false){\n            // this.modal.alert().message(this.translationService.get('damageCategoryConfig.EmptyFieldLabel')).open();\n            return;\n        }\n        let pictureLinks = this.submitPictures();\n\n        let partDataCopy = JSON.parse(JSON.stringify(this.partData));\n        partDataCopy.pictures = pictureLinks;\n\n        if (this.id) {\n            this.http.put('/bikes-sql/api/v1/parts/' + this.id, partDataCopy).subscribe(\n                () => this.modal.alert()\n                    .message(this.translationService.get('message.SaveMsg'))\n                    .open()\n                    .result\n                    .then(dialog => dialog.result)\n                    .then(result => this.close())\n                    .catch(err => {\n                    }),\n                error => this.modal.alert()\n                    .message(\n                        this.translationService.get(\n                            DataService.getErrorMsg(error)\n                        )\n                    )\n                    .open()\n            )\n        } else {\n            this.http.post('/bikes-sql/api/v1/parts/add/' + partDataCopy.categoryId, partDataCopy).subscribe(\n                () => this.modal.alert()\n                    .message(this.translationService.get('message.SaveMsg'))\n                    .open()\n                    .result\n                    .then(dialog => dialog.result)\n                    .then(result => this.close())\n                    .catch(err => {\n                    }),\n                error => this.modal.alert()\n                    .message(\n                        this.translationService.get(\n                            DataService.getErrorMsg(error)\n                        )\n                    )\n                    .open()\n            )\n        }\n    }\n\n    private formatDate(date): string {\n        return date ? moment(date).format('DD.MM.YYYY') : '-';\n    }\n\n    private getStationName(testId) : string {\n        try {\n            for (let station of this.stationList) {\n                if (parseInt(testId) === parseInt(station.name)) {\n                    return station.text;\n                }\n            }\n        } catch (e) {\n            //ignore the parse error and return testId\n        }\n        return testId;\n    }\n\n    private renameCategory() {\n        if (this.partData.categoryId) {\n            let catNameItemList = this.categories.filter(el => el.name ===this.partData.categoryId);\n            if (catNameItemList && catNameItemList.length === 1) {\n                this.modal.open(CmModalSparePartCatWindow,\n                    overlayConfigFactory({\n                            parent: this,\n                            category: new CmSparePartCategory(this.partData.categoryId, catNameItemList[0].text)\n                        },\n                        BSModalContext));\n            }\n        }\n    }\n    private  reloadCategories(event){\n        this.loadCategories( event.currentTarget.checked);\n    }\n\n    onTextChange(text){\n        return text.trimLeft();\n    }\n\n\n}\n\nclass MovementItem {\n    when: string;\n    quantity: number;\n    from: string;\n    to: string;\n    who: string;\n}\n","import {Component} from '@angular/core';\nimport {DialogRef} from \"ngx-modialog\";\nimport {RenameSparePartContext} from \"../add/cm-spare-part-category.component\";\n\n@Component({\n    selector: 'cm-spare-part-cat-window',\n    template: require('./cm-spare-part-cat-window.component.html'),\n    styles : [require('./cm-spare-part-cat-window.component.scss').toString()]\n})\nexport class CmModalSparePartCatWindow {\n    constructor(public dialog: DialogRef<RenameSparePartContext>) {\n    }\n}","import {Component, OnInit} from \"@angular/core\";\nimport {Router} from \"@angular/router\";\nimport {CmLocationsService} from \"../../services/cm-location.service\";\nimport {Subscription} from \"rxjs/Subscription\";\nimport {CmHttpClient} from \"../../services/http_client\";\nimport {Employee} from \"../cm-assign/cm-assign.component\";\nimport {OutsideJob} from \"../cm-job-list/cm-job.model\";\n\n@Component({\n    selector: 'cm-job-list',\n    template: require('./cm-job-list-by-district.component.html'),\n    styles: [require('./cm-job-list-by-district.component.scss').toString()]\n})\nexport class CmJobListByDistrictComponent implements OnInit {\n\n    private jobList: Array<OutsideJob> = [];\n    private userList: Array<Employee> = [];\n\n    private districtList: Array<OutsideJob> = [];\n    private districtSourceList: Array<OutsideJob> = [];\n\n    private districtObject = {};\n    private districtHashMap = {};\n    private openedDistrict: OutsideJob;\n\n    private pageLimit: number = 400;\n    private total: number;\n\n    private sub: Subscription;\n\n    private dragAndDropEl: OutsideJob;\n    private dragAndDropLogin: string;\n\n    private showUserJob: boolean = false;\n\n    // constructor(private router: Router,\n    //             private locationsService: CmLocationsService,\n    //             private http: CmHttpClient) {\n    //\n    //\n    //     this.sub = locationsService.dataBaseDataLoaded$.subscribe(\n    //         data => {\n    //             this.jobList = data.list;\n    //             this.districtObject = {};\n    //             this.districtHashMap = {};\n    //\n    //             this.jobList.forEach(item => {\n    //                 if (item.location === null) {\n    //                     console.log(item);\n    //                 }\n    //\n    //                 if (this.districtHashMap.hasOwnProperty(item.district)) {\n    //                     this.districtHashMap[item.district].push(item);\n    //                 } else {\n    //                     this.districtHashMap[item.district] = [item];\n    //                 }\n    //\n    //\n    //                 let calcualtedObj = new OutsideJob();\n    //                 if (this.districtObject.hasOwnProperty(item.district)) {\n    //                     calcualtedObj = this.districtObject[item.district];\n    //                     calcualtedObj.mv += item.mv;\n    //                     calcualtedObj.toWs += item.toWs;\n    //                     calcualtedObj.check += item.check;\n    //                     // calcualtedObj.priority = calcualtedObj.priority > item.priority ? item.priority : calcualtedObj.priority;\n    //                 } else {\n    //                     calcualtedObj.mv = item.mv;\n    //                     calcualtedObj.toWs = item.toWs;\n    //                     calcualtedObj.check = item.check;\n    //                     // calcualtedObj.priority = item.priority;\n    //                     calcualtedObj.district = item.district;\n    //                     calcualtedObj.location = null;\n    //                 }\n    //                 this.districtObject[item.district] = calcualtedObj;\n    //\n    //             });\n    //\n    //\n    //             for (let el in this.districtHashMap) {\n    //                 this.districtHashMap[el].sort((a, b) => a.name.localeCompare(b.name));\n    //             }\n    //\n    //             let list = [];\n    //             for (let el in this.districtObject) {\n    //                 let value = this.districtObject[el];\n    //                 // value.location = null;\n    //                 list.push(value);\n    //             }\n    //             list.sort((a, b) => {\n    //                 return a.district.localeCompare(b.district);\n    //             });\n    //             this.districtList = list;\n    //             this.districtSourceList = list;\n    //\n    //             this.total = 400;\n    //\n    //\n    //         }\n    //     );\n    //\n    //     this.http.get('/user-information/api/v1/users').subscribe(\n    //         data => {\n    //             let list = data.json();\n    //             list.sort((a, b) => {\n    //                 return a.login.localeCompare(b.login);\n    //             });\n    //             this.userList = list;\n    //         }\n    //     );\n    //\n    //     locationsService.locationItemLoaded$.subscribe(\n    //         data => {\n    //             let idArr = [];\n    //             data.forEach(el => idArr.push(el.id));\n    //             let url = '/bikes/api/v1/tasks/booking/' + this.dragAndDropLogin;\n    //             this.http.post(url, idArr).subscribe(\n    //                 () => this.ngOnInit()\n    //             );\n    //         }\n    //     );\n    // }\n    //\n    //\n    // allowDrop(ev) {\n    //     ev.preventDefault();\n    // }\n    //\n    // drag(ev) {\n    //     this.dragAndDropEl = ev;\n    // }\n    //\n    // drop(ev, login) {\n    //     ev.preventDefault();\n    //\n    //     if (this.dragAndDropEl && this.dragAndDropEl.location) {\n    //         this.dragAndDropLogin = login;\n    //         this.locationsService.loadDataByLocation(this.dragAndDropEl.location);\n    //\n    //         this.openedDistrict = null;\n    //     }\n    // }\n    //\n    // private openDistrict(row) {\n    //     if (this.openedDistrict) {\n    //         this.openedDistrict = null;\n    //         this.districtList = this.districtSourceList;\n    //     } else {\n    //         this.openedDistrict = row;\n    //         let index = this.districtList.indexOf(row);\n    //         let firstPart = this.districtList.slice(0, index + 1);\n    //         let secondPart = this.districtList.slice(index + 1, this.districtList.length);\n    //         this.districtList = firstPart.concat(this.districtHashMap[row.district]).concat(secondPart);\n    //     }\n    // }\n    //\n    // private openLocation(outsideJob: OutsideJob) {\n    //     this.router.navigate(['/sec/joblist', outsideJob.location, {from: 'joblist'}]);\n    // }\n    //\n    // private setPage(page: number) {\n    //     this.sub.unsubscribe();\n    //     this.locationsService.dataBaseDataLoaded$.subscribe(\n    //         data => {\n    //             this.jobList = data.list;\n    //         }\n    //     );\n    //\n    //     this.locationsService.loadFullData(page, this.pageLimit);\n    // }\n    //\n    // setShowUserJob(value) {\n    //     this.showUserJob = value;\n    // }\n    ngOnInit() {\n        // this.locationsService.loadFullData(1, this.pageLimit);\n    }\n\n}","import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {Subscription} from 'rxjs/Subscription';\nimport {CmBikeDispatchModel} from '../cm-bike-dispatch.model';\nimport {CmHttpClient} from '../../../services/http_client';\nimport {DataService} from '../../../services/cm-data.service';\nimport {TableFilter} from '../../../shared/tableFilter';\nimport {MarkerType} from '../../../shared/marker';\nimport {TabTitle} from '../../../shared/tabTitle';\nimport {CmTranslateService} from '../../../services/localization/cm-translate.service';\nimport {CmGuardService} from '../../../services/guards/cm-guard.service';\nimport {Modal} from 'ngx-modialog/plugins/bootstrap';\nimport {CmUtil} from '../../../shared/cm-util';\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {CmComponentTrackerService} from \"../../../services/cm-component-tracker-service\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport {SpinnerUtils} from '../../../shared/spinnerUtils';\nimport {CmReportComponent} from \"../../cm-report/cm-report.component\";\nimport {ReportExtractParam, ReportExtractParamField} from \"../../../shared/reportExtractParam\";\nimport moment = require('moment');\n\n@Component({\n  selector: 'cm-bike-dispatch',\n  template: require('./cm-bike-dispatch.component.html'),\n  styles: [require('./cm-bike-dispatch.component.scss').toString(), require('../../cm-main/main.css').toString()]\n})\nexport class CmBikeDispatchComponent extends TabTitle implements OnInit, OnDestroy {\n  private filters: CmBikeDispatchFilters = new CmBikeDispatchFilters();\n\n  private pageLimit: number = 15;\n  private total: number;\n  private initPage: number = 1;\n  private page: number;\n\n  private jobItemList: Array<CmBikeDispatchModel> = [];\n\n  private stationList = [];\n  private statusList = [];\n\n  private subList: Array<Subscription> = [];\n\n  private csvFile;\n  private csvFileName: string;\n\n  private spType: string = SpinnerUtils.type;\n  private spText: string = SpinnerUtils.text;\n  private spColor: string = SpinnerUtils.color;\n  private spBdColor: string = SpinnerUtils.bdColor;\n  private spFullScreen: boolean = SpinnerUtils.fullScreen;\n  private spSize: string = SpinnerUtils.size;\n\n  private reportType: string = \"BikesData\";\n  private reportsListLen: Number = 0;\n  private childProcessing: boolean = false;\n  private maxReportsListSize = 5;\n\n  @ViewChild('archivedrep', {static: false}) archivedChild: CmReportComponent;\n\n  constructor(\n    private dataService: DataService,\n    private http: CmHttpClient,\n    private router: Router,\n    private modal: Modal,\n    public translate: CmTranslateService,\n    private componentTracker: CmComponentTrackerService,\n    private spinner: NgxSpinnerService\n  ) {\n    super('bikeDispatch.Label', translate);\n  }\n\n  ngOnInit() {\n    let stationSub = this.dataService.getStationList().subscribe(data => {\n      this.stationList = data;\n      this.dataService.returnLocalizedMap('bikeStatus').subscribe((data:any) => {\n        this.statusList = data.bikeStatus;\n        let lastPage = this.componentTracker.readLastParentPageForCurrentComponentIfExist()\n        if(lastPage)\n          this.loadData(this.page = lastPage)\n        else\n        this.loadData();\n      });\n    });\n    this.subList.push(stationSub);\n    this.csvFileName = this.translate.get('chooseFileToImport.label') || 'chooseFileToImport.label';\n  }\n\n  ngOnDestroy() {\n    for (let sub of this.subList) {\n      sub.unsubscribe();\n    }\n  }\n\n  public reloadData() {\n    this.jobItemList = [];\n    this.loadData();\n  }\n\n  private loadData(page?: number) {\n    this.spinner.show();\n    this.page = page;\n    this.http\n      .get<PageAdapter<CmBikeDispatchModel>>(\n        '/bikes-sql/api/v1/dispatch/list?page=' +\n          (page || this.initPage) +\n          '&limit=' +\n          this.pageLimit +\n          this.filters.toString()\n      )\n      .subscribe(\n        data => {\n          this.spinner.hide();\n          this.jobItemList = data.content;\n          this.total = data.total;\n          if(this.total == 0){\n            this.modal.alert().message(this.translate.get(\"msg.NoResult\")).open();\n          }\n        },\n        error => {\n          this.spinner.hide();\n          console.log(\"Error : \" + error);\n          this.jobItemList = [];\n          this.modal.alert().message(\"Error : \" + error);\n        }\n      );\n  }\n\n  private filter() {\n    this.filters.save();\n    this.loadData();\n  }\n\n  private showDetails(row) {\n    this.componentTracker.goToDetailsFromParentPage(this.page);\n    this.router.navigate(['/sec/bikeDispatch/' + row.bikeId]);\n  }\n\n  private formatDate(date): string {\n    if (date) return moment(date).format('DD.MM.YYYY HH:mm');\n    return '';\n  }\n\n  private getRowColor(value) {\n    if (value) {\n      return 'red';\n    } else {\n      return 'green';\n    }\n  }\n\n  private isBikeMissing(row) {\n    if (row.status === 'missing' || row.status === 'MISSING') {\n      return 'red';\n    } else {\n      return 'green';\n    }\n  }\n\n  private isActive(row) {\n    if (row.active) {\n      return 'green';\n    } else {\n      return 'red';\n    }\n  }\n\n  private getStation(station: string) {\n    return this.dataService.getStationFromList(station, this.stationList);\n  }\n\n  private getStatus(statusId: string) {\n    if (!statusId)\n      return '';\n    let item = this.statusList.filter(el => el.name.toLowerCase() === statusId.toLowerCase())[0];\n    if (item) {\n      return item.text;\n    } else {\n      return statusId;\n    }\n  }\n\n  private sort(field) {\n    this.filters.sort(field);\n    this.loadData();\n  }\n\n  private getBikeType() {\n    return MarkerType.BIKE;\n  }\n\n  private hasLock(lock) {\n    if (lock) {\n      return 'green';\n    } else {\n      return 'red';\n    }\n  }\n  private importCSV() {\n    // uploadCSVasJSON\n    var rows = this.csvFile.split(/\\r\\n|\\r|\\n/g); // as 'split(\"\\n\")' doesn't works for mac os files\n\n    let headers = rows[0].split(',');\n    headers = headers.map(e => e.trim());\n    let latitudeIndex = headers.indexOf('latitude');\n    let longitudeIndex = headers.indexOf('longitude');\n    let locationIdIndex = headers.indexOf('locationId');\n    let result = [];\n    for (var i = 1; i < rows.length - 1; i++) {\n      var obj = {};\n      var currentline = rows[i].split(',');\n      for (var j = 0; j < headers.length; j++) {\n        if (headers[j] === 'latitude') continue;\n        if (headers[j] === 'longitude') continue;\n\n        if (headers[j] === 'locationId') continue;\n        if (headers[j] === 'locationNumber') continue;\n        if (headers[j] === 'locationName') continue;\n\n        obj[headers[j]] = currentline[j];\n      }\n      if (\n        currentline[latitudeIndex] !== null &&\n        currentline[latitudeIndex] !== '0' &&\n        currentline[latitudeIndex] !== '' &&\n        currentline[longitudeIndex] !== null &&\n        currentline[longitudeIndex] !== '0' &&\n        currentline[longitudeIndex] !== ''\n      ) {\n        obj['coordinates'] = {};\n        obj['coordinates']['latitude'] = currentline[latitudeIndex];\n        obj['coordinates']['longitude'] = currentline[longitudeIndex];\n      }\n      if (\n        currentline[locationIdIndex] !== null &&\n        currentline[locationIdIndex] !== '0' &&\n        currentline[locationIdIndex] !== ''\n      ) {\n        obj['location'] = {};\n        obj['location']['locationId'] = currentline[locationIdIndex];\n      }\n\n      result.push(obj);\n    }\n    this.dataService\n      .sendJson('/bikes-sql/api/v1/bicycles/all', result)\n      .subscribe(\n        reps => this.showMessage(this.translate.get('successLabel')),\n        err => this.showMessage(this.translate.get(err))\n      );\n  }\n\n  exportRepairs() {\n\n    if(this.reportsListLen >= this.maxReportsListSize){\n      this.archivedChild.removeLastReportFromList();\n    }\n\n    let urlParams = this.filters.toString();\n    if(urlParams.length > 0) {\n      urlParams = '?' + urlParams.substring(1);\n    }\n\n    let lockTypeSubstitutions = {\n      \"bike\": this.translate.get(\"bikeLockType.bike\"),\n      \"station\": this.translate.get(\"bikeLockType.station\"),\n      \"none\": this.translate.get(\"bikeLockType.none\")\n    };\n\n    let stationSubstitutions = {};\n    this.stationList.forEach(st => {\n      stationSubstitutions[st['name']] = st['text']\n    })\n\n    let reportFileName = this.translate.get(\"report.bike.fileName\") ;\n    let reportParams = new ReportExtractParam();\n    reportParams.method = \"GET\";\n    reportParams.path = '/bikes-sql/api/v1/bicycles/export/' + urlParams;\n\n    reportParams.fields =\n        [\n          new ReportExtractParamField(\"bikeId\", this.translate.get(\"report.bike.header.bikeId\")),\n          new ReportExtractParamField(\"bikeNumber\", this.translate.get(\"report.bike.header.bikeNumber\")),\n          new ReportExtractParamField(\"branding\", this.translate.get(\"report.bike.header.bikeBranding\")),\n          new ReportExtractParamField(\"city\", this.translate.get(\"report.bike.header.city\")),\n          new ReportExtractParamField(\"location.locationId\", this.translate.get(\"report.bike.header.locationId\")),\n          new ReportExtractParamField(\"location.locationNumber\", this.translate.get(\"report.bike.header.locationNumber\")),\n          new ReportExtractParamField(\"location.locationName\", this.translate.get(\"report.bike.header.locationName\")),\n          new ReportExtractParamField(\"coordinates.latitude\", this.translate.get(\"report.bike.header.latitude\")),\n          new ReportExtractParamField(\"coordinates.longitude\", this.translate.get(\"report.bike.header.longitude\")),\n          new ReportExtractParamField(\"frame\", this.translate.get(\"report.bike.header.frame\")),\n          new ReportExtractParamField(\"lock\", this.translate.get(\"report.bike.header.lock\")),\n          new ReportExtractParamField(\"lockVersion\", this.translate.get(\"report.bike.header.lockVersion\")),\n          new ReportExtractParamField(\"lockVoltage\", this.translate.get(\"report.bike.header.lockVoltage\")),\n          new ReportExtractParamField(\"battery.chargeInPercent\", this.translate.get(\"dispatching.chargeLevel\")),\n          new ReportExtractParamField(\"status\", this.translate.get(\"report.bike.header.status\")),\n          new ReportExtractParamField(\"statusChanged\", this.translate.get(\"report.bike.header.statusChanged\"), \"dd.MM.yyyy HH:mm\", \"CET\"),\n          new ReportExtractParamField(\"type\", this.translate.get(\"report.bike.header.type\")),\n          new ReportExtractParamField(\"lockType\", this.translate.get(\"troubleTickets.LockType\"), null, null, lockTypeSubstitutions),\n          new ReportExtractParamField(\"loadedTo\", this.translate.get(\"report.bike.header.loadedTo\"),null,null, stationSubstitutions),\n          new ReportExtractParamField(\"customerCare\", this.translate.get(\"report.bike.header.customerCare\")),\n          new ReportExtractParamField(\"customerCareSince\", this.translate.get(\"customerCareSince.label\")),\n          new ReportExtractParamField(\"timestamp\", this.translate.get(\"timestamp.label\")),\n          new ReportExtractParamField(\"lastReportTime\", this.translate.get(\"report.bike.header.lastReportTime\"))\n        ];\n\n    this.dataService.getReportExtract2(reportParams, this.reportType ,reportFileName)\n        .subscribe(\n            data => {\n              this.childProcessing = true;\n              this.archivedChild.startProcessingProcess();\n\n            },\n            error => {\n              console.log(\"Error downloading the file.\");\n            });\n\n  }\n\n  processingMessage(event: any) {\n    this.childProcessing = event;\n  }\n\n  onListSize($event: Number) {\n    this.reportsListLen = $event\n    let i=0;\n  }\n\n  private exportCSV() {\n    this.http\n      .get<PageAdapter<CmBikeDispatchModel>>(\n        '/bikes-sql/api/v1/dispatch/list?page=' +\n          1 +\n          '&limit=' +\n          (this.filters.downloadBikesLimit != null ? this.filters.downloadBikesLimit : 1000000) +\n          this.filters.toString()\n      )\n      .subscribe(\n        data => {\n          const jsonAr = data.content;\n          const headers = Object.keys(jsonAr[0]);\n          var i = headers.indexOf('coordinates');\n          if (i >= 0) {\n            headers.splice(i, 1);\n          }\n          var i = headers.indexOf('location');\n          if (i >= 0) {\n            headers.splice(i, 1);\n          }\n          headers.push('latitude');\n          headers.push('longitude');\n          headers.push('locationId');\n          headers.push('locationNumber');\n          headers.push('locationName');\n\n          var CSV = '';\n          CSV += headers.join(',') + '\\r\\n';\n          for (var i = 0; i < jsonAr.length; i++) {\n            var row = '';\n            //2nd loop will extract each column and convert it in string comma-seprated\n            for (var j = 0; j < headers.length; j++) {\n              if (headers[j] === 'longitude' || headers[j] === 'latitude') {\n                jsonAr[i][headers[j]] = jsonAr[i]['coordinates'] === null ? '' : jsonAr[i]['coordinates'][headers[j]];\n              }\n\n              if (headers[j] === 'locationId' || headers[j] === 'locationNumber' || headers[j] === 'locationName') {\n                jsonAr[i][headers[j]] = jsonAr[i]['location'] === null ? '' : jsonAr[i]['location'][headers[j]];\n              }\n\n              var val = jsonAr[i][headers[j]];\n              val = val === null ? '' : val;\n              val = val\n                .toString()\n                .replace(/,/g, ',')\n                .replace(/\"/g, '\"\"');\n              row += '\"' + val + '\",';\n            }\n            row.slice(0, row.length - 1);\n            //add a line break after each row\n            CSV += row + '\\r\\n';\n          }\n          var tmp = CSV;\n\n          let filedate = moment(new Date()).format('YYYYMMDD_HH-mm-ss');\n          const fileName = 'biks_export_' + filedate + '.csv';\n          CmUtil.writeDownFile(tmp, 'text/csv;charset=UTF-8', fileName);\n        },\n        error => {\n          this.showMessage(this.translate.get(error));\n        },\n        () => {\n          this.showMessage(this.translate.get('successLabel'));\n        }\n      );\n  }\n\n  private showMessage(message: any) {\n    this.modal\n      .alert()\n      .message(message)\n      .open();\n  }\n\n  private uploadCsvFileChooser(event) {\n    let file = event.target.files[0];\n    if (!file) return;\n\n    this.csvFileName = file.name;\n    let reader = new FileReader();\n    let thisContext = this;\n\n    reader.addEventListener(\n      'load',\n      function() {\n        thisContext.csvFile = reader.result;\n      },\n      false\n    );\n\n    reader.readAsText(file);\n  }\n\n  private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n}\n\nclass CmBikeDispatchFilters extends TableFilter {\n  bikeNumber: string;\n  location: string;\n  branding: string[];\n  customerCare: boolean;\n  lostBike: boolean;\n  showInactive: boolean;\n  noLock: boolean;\n  station: number;\n  statuses: Array<string>;\n  downloadBikesLimit: number;\n  statusChangedHoursAgo: number;\n  bikeTypes: Array<string>;\n  downloadPageNumber: number;\n\n  constructor() {\n    super('bikeDispatch');\n    this.downloadBikesLimit = 100;\n  }\n\n  public toString(): string {\n    let result = super.toString();\n    if (this.bikeNumber) {\n      result += '&bikeNumber=' + this.bikeNumber;\n    }\n    if (this.customerCare) {\n      result += '&care=' + this.customerCare;\n    }\n    if (this.location) {\n      result += '&location=' + this.location;\n    }\n    if (this.lostBike) {\n      result += '&lostBike=' + this.lostBike;\n    }\n    if (this.showInactive) {\n      result += '&showInactive=' + this.showInactive;\n    }\n    if (this.noLock) {\n      result += '&noLock=' + this.noLock;\n    }\n    if (this.station) {\n      result += '&station=' + this.station;\n    }\n    if (this.statuses && this.statuses.length > 0) {\n      result += '&statuses=' + this.statuses;\n    }\n    if (this.branding && this.branding.length > 0) {\n      result += '&bikeBranding=' + this.branding;\n    }\n    if (this.statusChangedHoursAgo) {\n      result += '&statusChangedHoursAgo=' + this.statusChangedHoursAgo;\n    }\n    if (this.bikeTypes && this.bikeTypes.length > 0) {\n      result += `&bikeTypes=${this.bikeTypes}`;\n    }\n    return result;\n  }\n\n  public clear() {\n    super.clear();\n    this.bikeNumber = null;\n    this.location = null;\n    this.branding = [];\n    this.customerCare = false;\n    this.lostBike = false;\n    this.showInactive = false;\n    this.noLock = false;\n    this.station = null;\n    this.statuses = [];\n    this.downloadBikesLimit = 100;\n    this.statusChangedHoursAgo = null;\n    this.bikeTypes = [];\n    this.save();\n  }\n}\n","import { CmUtil } from './../../../shared/cm-util';\nimport { CmBikeBlockingService } from './../../../services/cm-bike-blocking.service';\nimport { Component, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CmLocation } from '../../../services/cm-location.service';\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { overlayConfigFactory } from 'ngx-modialog';\nimport { CmModalLocationListComponent } from '../../cm-location/modal-window/cm-modal-location-list.component';\nimport { Subscription } from 'rxjs/Subscription';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport { CmLocationData } from '../../../shared/location';\nimport { CmCoordinates } from '../../../shared/coordinates';\nimport { CmHttpClient } from '../../../services/http_client';\nimport { DataService } from '../../../services/cm-data.service';\nimport { CmBikeDispatchModel } from '../cm-bike-dispatch.model';\nimport { CmTroubleTicketFilters } from '../../cm-trouble-ticket/list/cm-trouble-tiket-list.component';\nimport { CmBikeRepairFilters } from '../../cm-repair/list/cm-repair-list.component';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { Observable } from 'rxjs/Observable';\nimport { CmOrganizationService } from '../../../services/cm-organization.service';\nimport { forkJoin } from 'rxjs/observable/forkJoin';\nimport {SPERR_HAL_STATUS, SPERR_MSP_STATUS} from \"../../cm-map/cm-map.component\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\n@Component({\n  selector: 'cm-bike-dispatch-item',\n  template: require('./cm-bike-dispatch-item.component.html')\n})\nexport class CmBikeDispatchItemComponent extends TabTitle implements OnInit, OnDestroy {\n  private model: CmBikeDispatchModel = new CmBikeDispatchModel();\n  private stationList = [];\n  private statusList = [];\n  private initialState;\n\n  private mapCenter: Observable<CmCoordinates>;\n  private latitude: number;\n  private longitude: number;\n\n  private _showMap: boolean = false;\n\n  private statusChanged: boolean = false;\n  private subList: Array<Subscription> = [];\n\n  private bikePath: string = '/master-data/api/v1/bin/clientFiles/bike.png';\n\n  private allowedLocations: Array<CmLocation>;\n  private whoIsCalledLocationPopup;\n  private lastAllowedLocationSortedProperty = null;\n\n  constructor(\n    private http: CmHttpClient,\n    private router: Router,\n    private activatedRoute: ActivatedRoute,\n    private dataService: DataService,\n    private modal: Modal,\n    private translationService: CmTranslateService,\n    private translationServiceNative: TranslateService,\n    private orgaService: CmOrganizationService,\n    private bikeBlockingService: CmBikeBlockingService\n  ) {\n    super('bikeDispatch.Label', translationService);\n  }\n\n  ngOnInit(): void {\n    let stationSub = this.dataService.getStationList().subscribe(data => {\n      this.stationList = data;\n    });\n    this.subList.push(stationSub);\n\n    this.activatedRoute.params.map(p => p).subscribe(data => {\n      this.model.bikeId = data['id'];\n        this.loadData();\n    });\n\n    this.mapCenter = this.orgaService.loadCoordinatesByLoginContext();\n    this.mapCenter.subscribe(data => {\n      this.longitude = data.longitude;\n      this.latitude = data.latitude;\n    });\n\n    this.dataService.getBikeAllowedLocations(this.model.bikeId)\n        .subscribe( data => {\n          this.allowedLocations = data\n        });\n  }\n\n  ngOnDestroy() {\n    for (let sub of this.subList) {\n      sub.unsubscribe();\n    }\n  }\n\n  private loadData() {\n    this.http.get<CmBikeDispatchModel>('/bikes-sql/api/v1/bicycles/' + this.model.bikeId).subscribe(data => {\n      let model = data;\n      model.customerCare = model.customerCare || false;\n      this.model = model;\n      // Store the state separately\n      this.initialState = this.model.status;\n\n        this.http.get('/bikes-sql/api/v1/bike-statuses?changeableByDispatcher=true').subscribe(data => {\n          let list = <Array<any>>data;\n          if (!list.some(item => item['name'] === this.model.status)) {\n              list.push({\n                  name: this.model.status,\n                  backendName: list.length ? list[0].backendName : null,\n                  disabled: true\n              })\n          }\n\n          this.translationServiceNative.get(list.map(item => 'bikeStatus.' + item['name'].toLowerCase()))\n              .subscribe(localization => {\n              list.forEach(status => {\n                  status['text'] = localization['bikeStatus.' + status['name'].toLowerCase()];\n                  this.statusList.push(status);\n              });\n\n              this.statusList.sort((a, b) => a['text'].localeCompare(b['text']));\n          });\n      });\n    });\n  }\n\n  private close() {\n    this.router.navigate(['/sec/bikeDispatch']);\n  }\n\n  private openLocations() {\n    this.modal.open(CmModalLocationListComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  public selectLocation(location: CmLocation) {\n    if(this.whoIsCalledLocationPopup === \"ALLOWED_LOCATIONS\") {\n      this.allowedLocations.push(location);\n    } else {\n      this.model.location = new CmLocationData();\n      this.model.location.locationId = location.locationId;\n      this.model.location.locationName = location.fullName;\n      this.model.coordinates = location.coordinates;\n    }\n\n    this.whoIsCalledLocationPopup = null;\n  }\n\n  private showMap() {\n    this._showMap = !this._showMap;\n  }\n\n  private selectCoordinates(data) {\n    this.model.coordinates = new CmCoordinates();\n    this.model.coordinates.latitude = Math.round(data.coords.lat * 10000) / 10000;\n    this.model.coordinates.longitude = Math.round(data.coords.lng * 10000) / 10000;\n    this.model.location = null;\n  }\n\n  private getMarker() {\n    return this.http.get(this.bikePath);\n  }\n\n  private save() {\n    let model = {\n      bike: this.model.bikeId,\n      coordinates: this.model.coordinates,\n      location: this.model.location ? this.model.location.locationId : null,\n      newStatus: this.model.status,\n      customerCare: this.model.customerCare\n    };\n\n    // Block or unblock bike on DB-Rent side if necessary\n    let blockUnblockRequest = this.blockUnblockBike();\n    let saveRequest = this.http.post('/script-support/api/v2/rules/run/acceptStatus', model);\n\n    if(this.statusChanged){\n      this.statusChanged = false;\n      this.sendStatus();\n    }\n\n    let allowedIds = this.allowedLocations.map(l => l.locationId);\n    this.dataService.saveBikeAllowed(this.model.bikeId, allowedIds)\n        .subscribe(\n            d => {\n              if (blockUnblockRequest) {\n                forkJoin([saveRequest, blockUnblockRequest]).subscribe(\n                    data => {\n                      this.modal\n                          .alert()\n                          .message(this.translationService.get('message.SaveMsg'))\n                          .open();\n                      // Store the new state as initial for next time\n                      this.initialState = this.model.status;\n                    },\n                    error => {\n                      console.log(error);\n                      this.modal\n                          .alert()\n                          .message(error)\n                          .open();\n                    }\n                );\n              } else {\n                saveRequest.subscribe(\n                    data => {\n                      this.modal\n                          .alert()\n                          .message(this.translationService.get('message.SaveMsg'))\n                          .open();\n                      // Store the new state as initial for next time\n                      this.initialState = this.model.status;\n                    },\n                    error => {\n                      console.log(error);\n                      this.modal\n                          .alert()\n                          .message(error)\n                          .open();\n                    }\n                );\n              }\n            },\n            error => {\n              this.modal\n                  .alert()\n                  .message(error)\n                  .open();\n            });\n  }\n\n  private blockUnblockBike(): Observable<any> {\n    if (this.initialState !== this.model.status && this.statusList.length > 0 && this.statusList[0].backendName === 'HAL') {\n      // DBREN-482: If a user sets a bike to sperr, we should block the bike in HAL via interface\n      if (SPERR_HAL_STATUS === this.model.status) {\n        return this.bikeBlockingService.blockBike(this.model.bikeId);\n      }\n      // DBREN-482: If a user sets a bike from sperr to ready or open, we should unblock the bike in HAL via interface\n      if (SPERR_HAL_STATUS === this.initialState) {\n        if (this.model.status && ('open' === this.model.status.toLowerCase() || 'ready' === this.model.status.toLowerCase())) {\n          return this.bikeBlockingService.unblockBike(this.model.bikeId);\n        }\n      }\n    }\n    return null;\n  }\n\n  private getStation(station: string) {\n    return this.dataService.getStationFromList(station, this.stationList);\n  }\n\n  private goToTT() {\n    let ttFilters = new CmTroubleTicketFilters();\n    ttFilters.bike = this.model.bikeNumber;\n    ttFilters.save();\n    this.router.navigate(['/sec/troubleTicket']);\n  }\n\n  private repairs() {\n      let repairFilters = new CmBikeRepairFilters();\n      repairFilters.bikeNumber = this.model.bikeNumber;\n      repairFilters.save();\n      this.router.navigate(['/sec/repair']);\n  }\n\n  private activate() {\n    this.http\n      .post('/bikes-sql/api/v1/bicycles/activate?bike=' + this.model.bikeId + '&active=' + !this.model.active, {})\n      .subscribe(data => {\n        this.modal\n          .alert()\n          .message(this.translationService.get('message.SaveMsg'))\n          .open();\n        this.loadData();\n      });\n  }\n\n  private formatDate(date): string {\n    return CmUtil.formatDate(date)\n  }\n\n  private sort(sortField) {\n    if(this.lastAllowedLocationSortedProperty && this.lastAllowedLocationSortedProperty === sortField) {\n      sortField = '-' + sortField;\n      this.lastAllowedLocationSortedProperty = null;\n    } else {\n      this.lastAllowedLocationSortedProperty = sortField;\n    }\n    this.allowedLocations.sort(this.dynamicSort(sortField));\n  }\n\n  private dynamicSort(property) {\n    let sortOrder = 1;\n    if(property[0] === \"-\") {\n      sortOrder = -1;\n      property = property.substr(1);\n    }\n    return function (a,b) {\n      let result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n      return result * sortOrder;\n    }\n  }\n\n  sendStatus() {\n      if (this.model.status) {\n          this.http\n              .post('/bikes-sql/api/v1/bicycles/sendStatusChange', {bikeId: this.model.bikeId, status: this.model.status})\n              .subscribe(data => {\n                if(this.statusChanged) {\n                  this.modal\n                      .alert()\n                      .message(this.translationService.get('message.SaveMsg'))\n                      .open();\n                }\n              });\n      }\n  }\n\n\n  private removeAllowedLocation(location: CmLocation) {\n    this.allowedLocations = this.allowedLocations.filter(l => l.locationId !== location.locationId);\n  }\n\n  private addAllowedLocation() {\n    this.whoIsCalledLocationPopup = \"ALLOWED_LOCATIONS\";\n    this.modal.open(CmModalLocationListComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n}\n","import { Observable } from 'rxjs/Observable';\nimport { CmHttpClient } from './http_client';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class CmBikeBlockingService {\n  constructor(private http: CmHttpClient) {}\n\n  public blockBike(bikeId): Observable<any> {\n    return this.blockUnblockBike(bikeId, EventType.SPERRUNG);\n  }\n\n  public unblockBike(bikeId): Observable<any> {\n    return this.blockUnblockBike(bikeId, EventType.ENTSPERRUNG);\n  }\n\n  private blockUnblockBike(bikeId, eventType: EventType): Observable<any> {\n    return this.http.post(`/communication/api/v1/cm2dbrent/bikes/${bikeId}/status`, { eventType: EventType[eventType] });\n  }\n}\n\nexport enum EventType {\n    SPERRUNG, ENTSPERRUNG\n}\n","import { Component, OnInit } from '@angular/core';\nimport { Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { CmGuardService } from '../../services/guards/cm-guard.service';\nimport { CmHttpClient } from '../../services/http_client';\nimport { CmTranslateService } from '../../services/localization/cm-translate.service';\nimport { TabTitle } from '../../shared/tabTitle';\nimport { CmUtil } from './../../shared/cm-util';\nimport moment = require('moment');\nimport {PageAdapter} from \"../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport {NgxSpinnerService} from \"ngx-spinner\";\nimport { SpinnerUtils } from '../../shared/spinnerUtils';\n\n@Component({\n  selector: 'cm-news',\n  template: require('./cm-news.component.html'),\n  styles: [require('./cm-news.component.scss').toString()]\n})\nexport class CmNewsComponent extends TabTitle implements OnInit {\n  private city;\n  private user;\n  private news: CmNewsModel = new CmNewsModel();\n  private newsList: CmNewsModel[] = [];\n\n    private spType: string = SpinnerUtils.type;\n    private spText: string = SpinnerUtils.text;\n    private spColor: string = SpinnerUtils.color;\n    private spBdColor: string = SpinnerUtils.bdColor;\n    private spFullScreen: boolean = SpinnerUtils.fullScreen;\n    private spSize: string = SpinnerUtils.size;\n    private isSavePressed = false;\n\n  constructor(private http: CmHttpClient,\n              private modal: Modal,\n              private translateService: CmTranslateService,\n              private spinner: NgxSpinnerService\n  ) {\n    super('news.Label', translateService);\n  }\n\n  ngOnInit() {\n    this.city = CmGuardService.getUserOrganizationFromToken();\n    this.user = CmGuardService.getUserName();\n    this.loadNews();\n  }\n\n private loadNews() {\n      this.spinner.show();\n    this.http\n      .get<PageAdapter<CmNewsModel>>('/bikes-sql/api/v1/newsfeed?page=1&limit=100')\n      .subscribe(\n        data => {\n            this.spinner.hide();\n            this.newsList = CmUtil.simpleSort(data.content, 'id')\n            if(this.newsList.length == 0){\n                this.modal.alert().message(this.translateService.get(\"msg.NoResult\")).open();\n            }\n        },\n        error => {\n            this.spinner.hide();\n          console.log(error);\n          this.modal\n            .alert()\n            .message(this.translateService.get('error.NoResultsLabel'))\n            .open();\n        }\n      );\n  }\n\n  private clear() {\n    this.news = new CmNewsModel();\n  }\n\n  private save(isValid: boolean) {\n      this.isSavePressed = true;\n      if(isValid == false){\n          return;\n      }\n    this.isSavePressed = false;\n    this.news.author = this.user;\n    this.news.city = this.city;\n    this.news.category = \"misc\";\n    // Stupid logic of service, but until must be in the future to save it\n    this.news.until = moment().year(2342).toDate();\n    this.http.post('/bikes-sql/api/v1/newsfeed/message', this.news).subscribe(() => {\n      this.modal\n        .alert()\n        .message(this.translateService.get('message.SaveMsg'))\n        .open();\n        this.clear();\n        this.loadNews();\n    });\n  }\n\n  private delete(news: CmNewsModel) {\n    // news.until = moment().year(1954).toDate();\n    this.http.delete(`/bikes-sql/api/v1/newsfeed/${news.id}?user=${this.user}`).subscribe(() => {\n      this.modal\n        .alert()\n        .message(this.translateService.get('message.DeleteMsg'))\n        .open();\n        this.loadNews();\n    });\n  }\n\n  private update(news: CmNewsModel) {\n    this.http.put(`/bikes-sql/api/v1/newsfeed/${this.news.id}`, this.news).subscribe(() => {\n      this.modal\n        .alert()\n        .message(this.translateService.get('message.SaveMsg'))\n        .open();\n    });\n  }\n\n  private formatDate(date) {\n    return CmUtil.formatDate(date);\n  }\n    onTextChange(text){\n        return text = text.trimLeft();\n    }\n}\n\nclass CmNewsModel {\n  id: number;\n  headline: string;\n  text: string;\n  category: string;\n  author: string;\n  created: Date;\n  updated: Date;\n  until: Date;\n  city: string;\n}\n","import {CmSparePart} from \"../cm-spare-part/cm-spare-part-list.model\";\n\nexport class CmDamageBikeCategoryBasic {\n    check: number;\n    toBSC: number;\n    block: number;\n    closeComplainDirectly: boolean;\n    closeWhenBikeMoves: boolean;\n    internal: boolean;\n    withoutReportDaysLimit: number;\n    \n    estimatedRepairTime: number;\n\n    constructor(check: number, toBSC: number, block: number, estimatedRepairTime: number, closeComplainDirectly: boolean, closeWhenBikeMoves: boolean, internal: boolean, withoutReportDaysLimit: number) {\n        this.check = check;\n        this.toBSC = toBSC;\n        this.block = block;\n        this.estimatedRepairTime = estimatedRepairTime;\n        this.closeComplainDirectly = closeComplainDirectly;\n        this.closeWhenBikeMoves = closeWhenBikeMoves;\n        this.internal = internal;\n        this.withoutReportDaysLimit = withoutReportDaysLimit;\n    }\n}\n\nexport class CmDamageBikeCategoryModel extends CmDamageBikeCategoryBasic {\n    public name: string;\n    public mappingTextStr: string;\n    public mappingText: Array<string> = [];\n    public number: number;\n\n    constructor(number?: number, name?: string, mappingText?: Array<string>, check?: number, toBSC?: number, block?: number, estimatedRepairTime?: number, closeComplainDirectly?: boolean, closeWhenBikeMoves?: boolean, internal?: boolean, withoutReportDaysLimit?: number) {\n        super(check, toBSC, block, estimatedRepairTime, closeComplainDirectly, closeWhenBikeMoves, internal, withoutReportDaysLimit);\n        this.number = number;\n        this.name = name;\n        this.mappingText = mappingText;\n\n    }\n    public spareParts: Array<CmSparePart>;\n    public suggestedPartsIds: Array<any>;\n    public suggestedParts: any;\n    public checkTime: number;\n}","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { BSModalContext, Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { overlayConfigFactory } from \"ngx-modialog\";\nimport { CmSparePartListModalComponent } from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport { CmSparePart } from \"../../cm-spare-part/cm-spare-part-list.model\";\nimport { ASC_STRING, DESC_STRING } from \"../../cm-sortable-th/cm-sortable-th.component\";\nimport { TableFilter } from \"../../../shared/tableFilter\";\nimport {CmDamageBikeCategoryModel} from \"../cm-damage-cat-bike.model\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: \"cm-damage-cat-item-config\",\n  template: require(\"./cm-damage-cat-bike-config-item.component.html\"),\n  styles: ['.cm-warn{  border-color:red;}']\n})\nexport class CmDamageBikeCatConfigItemComponent extends TabTitle implements OnInit {\n  public model: CmDamageBikeCategoryModel = new CmDamageBikeCategoryModel();\n  public selected: CmSparePart;\n  public suggestedParts: Array<CmSparePart> = [];\n\n  private sortField: string;\n  private sortDirection: string;\n\n  //filters\n  private filters: Filters = new Filters();\n  private categories = [];\n  private parts = [];\n  private stationList = [];\n\n  private catExistsError = false;\n  private isSavePressed = false;\n\n  constructor(\n    private router: Router,\n    private activatedRoute: ActivatedRoute,\n    private modal: Modal,\n    private http: CmHttpClient,\n    private translationService: CmTranslateService\n  ) {\n    super(\"damageCategoryConfigBike.Label\", translationService);\n\n    activatedRoute.params.map(p => p).subscribe(data => {\n      if ((<any>data).id !== \"-1\") this.model.number = (<any>data).id;\n    });\n  }\n\n  public addSuggestedPart(p: CmSparePart) {\n    //console.log(p);\n    this.selected = p;\n\n    for (let sp of this.suggestedParts) {\n      if (sp.id == p.id) return;\n    }\n\n    p.quantity = 1;\n    this.suggestedParts.push(p);\n    //this.model.spareParts.push(p);\n  }\n\n  ngOnInit() {\n    if (this.model.number) {\n      let number = this.model.number;\n      this.http.get(`/bikes-sql/api/v1/damage-categories/${this.model.number}`).subscribe((data: CmDamageBikeCategoryModel) => {\n        this.model = data;\n        this.model.number = number;\n        this.model.mappingTextStr = \"\";\n        for (let str of this.model.mappingText) {\n          this.model.mappingTextStr += str + \";\";\n        }\n      });\n\n      this.http.get(`/bikes-sql/api/v1/damage-categories/suggested-parts/${this.model.number}`).subscribe((data:Array<CmSparePart>) => {\n        var m = data;\n\n        for (let sp of m) {\n          this.suggestedParts.push(sp);\n        }\n      });\n    }\n  }\n\n  private openParts() {\n    this.modal.open(CmSparePartListModalComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n  }\n\n  private close() {\n    this.router.navigate([\"/sec/damageBikeCatConfig\"]);\n  }\n\n  private incQuantity(sp: CmSparePart) {\n    sp.quantity++;\n  }\n\n  private decQuantity(sp: CmSparePart) {\n    if (sp.quantity > 0) {\n      sp.quantity--;\n    }\n  }\n\n  private removePart(p: CmSparePart) {\n    const index: number = this.suggestedParts.indexOf(p);\n    if (index !== -1) {\n      this.suggestedParts.splice(index, 1);\n    }\n  }\n\n  private save(isValid: boolean) {\n    this.isSavePressed = true;\n    if(isValid == false){\n      return;\n    }\n    var arr: { [key: string]: number } = {};\n\n    for (let sp of this.suggestedParts) {\n      arr[sp.id] = sp.quantity;\n    }\n\n    this.model.suggestedParts = arr;\n\n    this.model.mappingText = (!this.model.mappingTextStr || this.model.mappingTextStr.trim().length == 0)\n        ? [] : this.model.mappingTextStr.split(\";\");\n\n    this.catExistsError = false;\n    this.http.post(`/bikes-sql/api/v1/damage-categories/for_bike`, this.model).subscribe(data => {\n      this.modal\n        .alert()\n        .message(this.translationService.get(\"message.SaveMsg\"))\n        .open();\n    }, error => {\n      if (error.status == 400 && error.error && error.error.errors) {\n        error.error.errors.forEach(e => {\n          if (e.code == 'DataIntegrityViolationException') {\n            this.catExistsError = true;\n          }\n        });\n        if (!this.catExistsError)\n          throw error;\n      } else {\n        throw error;\n      }\n    });\n  }\n\n  private allowedToEditSettings(): boolean {\n    return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n  }\n\n  private sort(field) {\n    this.sortField = field;\n    if (this.sortDirection === ASC_STRING) {\n      this.sortDirection = DESC_STRING;\n      this.suggestedParts.sort((a, b) => {\n        try {\n          return b[field].localeCompare(a[field]);\n        } catch (ex) {\n          return (b[field] ? b[field] : -100) >= (a[field] ? a[field] : -100) ? 1 : -1;\n        }\n      });\n    } else {\n      this.sortDirection = ASC_STRING;\n      this.suggestedParts.sort((a, b) => {\n        try {\n          return a[field].localeCompare(b[field]);\n        } catch (ex) {\n          return (a[field] ? a[field] : -100) >= (b[field] ? b[field] : -100) ? 1 : -1;\n        }\n      });\n    }\n  }\n}\n\nclass Filters extends TableFilter {\n  id: number;\n  station: number;\n  category: string;\n  part: string;\n  freeText: string;\n  showHidden: boolean;\n\n  constructor() {\n    super(\"sparePartListFilters\");\n  }\n\n  public createUrl(): string {\n    let url: string = \"\";\n    if (this.id) {\n      url += \"&id=\" + this.id;\n    }\n    if (this.station) {\n      url += \"&station=\" + this.station;\n    }\n    if (this.category) {\n      url += \"&category=\" + this.category;\n    }\n    if (this.part) {\n      url += \"&part=\" + this.part;\n    }\n    if (this.freeText) {\n      url += \"&freeText=\" + this.freeText;\n    }\n    if (this.showHidden) {\n      url += \"&showHidden=\" + this.showHidden;\n    }\n    return url;\n  }\n\n  public clear() {\n    this.id = null;\n    this.station = null;\n    this.category = null;\n    this.part = null;\n    this.freeText = null;\n    this.showHidden = false;\n    this.save();\n  }\n}\n","export class CmDamageLocationCategoryModel {\n    name: string;\n    city: string;\n    check: number;\n    number: number;\n    estimatedRepairTime: number;\n    suggestedParts: any;\n    mappingText: Array<string>;\n    closeComplainDirectly: boolean;\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { BSModalContext, Modal } from \"ngx-modialog/plugins/bootstrap\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { CmTranslateService } from \"../../../services/localization/cm-translate.service\";\nimport { TabTitle } from \"../../../shared/tabTitle\";\nimport { overlayConfigFactory } from \"ngx-modialog\";\nimport { CmSparePartListModalComponent } from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport { CmSparePart } from \"../../cm-spare-part/cm-spare-part-list.model\";\nimport { ASC_STRING, DESC_STRING } from \"../../cm-sortable-th/cm-sortable-th.component\";\nimport { TableFilter } from \"../../../shared/tableFilter\";\nimport {CmDamageLocationCategoryModel} from \"../cm-damage-cat-location.model\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n    selector: \"cm-damage-cat-item-config\",\n    template: require(\"./cm-damage-cat-location-config-item.component.html\")\n})\nexport class CmDamageLocationCatConfigItemComponent extends TabTitle implements OnInit {\n    public model: CmDamageLocationCategoryModel = new CmDamageLocationCategoryModel();\n    public selected: CmSparePart;\n    public suggestedParts: Array<CmSparePart> = [];\n\n    private sortField: string;\n    private sortDirection: string;\n\n    //filters\n    private categories = [];\n    private parts = [];\n\n    // Mappings as comma separted string\n    private mappingStr: string = \"\";\n\n    private catExistsError = false;\n    private isSavePressed = false;\n\n    constructor(\n        private router: Router,\n        private activatedRoute: ActivatedRoute,\n        private modal: Modal,\n        private http: CmHttpClient,\n        private translationService: CmTranslateService\n    ) {\n        super(\"damageCategoryConfig.Label\", translationService);\n\n        activatedRoute.params.map(p => p).subscribe(data => {\n            if ((<any>data).id !== \"-1\") this.model.number = (<any>data).id;\n        });\n    }\n\n    public addSuggestedPart(p: CmSparePart) {\n        this.selected = p;\n\n        for (let sp of this.suggestedParts) {\n            if (sp.id == p.id) return;\n        }\n\n        p.quantity = 1;\n        this.suggestedParts.push(p);\n    }\n\n    ngOnInit() {\n        if (this.model.number) {\n            let number = this.model.number;\n            this.http.get(`/bikes-sql/api/v1/damage-categories/${this.model.number}`).subscribe((data:CmDamageLocationCategoryModel) => {\n                this.model = data;\n                this.model.number = number;\n                this.model.mappingText.forEach(m => this.mappingStr = this.mappingStr.concat(`${m};`));\n            });\n\n            this.http.get(`/bikes-sql/api/v1/damage-categories/suggested-parts/${this.model.number}`).subscribe((data:Array<CmSparePart>) => {\n                var m = data;\n\n                for (let sp of m) {\n                    this.suggestedParts.push(sp);\n                }\n            });\n        }\n    }\n\n    private openParts() {\n        this.modal.open(CmSparePartListModalComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n    }\n\n    private close() {\n        this.router.navigate([\"/sec/damageLocationCatConfig\"]);\n    }\n\n    private incQuantity(sp: CmSparePart) {\n        sp.quantity++;\n    }\n\n    private decQuantity(sp: CmSparePart) {\n        if (sp.quantity > 0) {\n            sp.quantity--;\n        }\n    }\n\n    private removePart(p: CmSparePart) {\n        const index: number = this.suggestedParts.indexOf(p);\n        if (index !== -1) {\n            this.suggestedParts.splice(index, 1);\n        }\n    }\n\n    private save(isValid: boolean) {\n        this.isSavePressed = true;\n        if(isValid == false){\n            return;\n        }\n        var arr: { [key: string]: number } = {};\n\n        for (let sp of this.suggestedParts) {\n            arr[sp.id] = sp.quantity;\n        }\n\n        this.model.suggestedParts = arr;\n\n        this.model.mappingText = this.mappingStr ? this.mappingStr.split(\";\") : this.model.mappingText;\n\n        this.catExistsError = false;\n        this.http.post(`/bikes-sql/api/v1/damage-categories/for_location`, this.model).subscribe(data => {\n            this.modal\n                .alert()\n                .message(this.translationService.get(\"message.SaveMsg\"))\n                .open();\n        }, error => {\n            if (error.status == 400 && error.error && error.error.errors) {\n                error.error.errors.forEach(e => {\n                    if (e.code == 'DataIntegrityViolationException') {\n                        this.catExistsError = true;\n                    }\n                });\n                if (!this.catExistsError)\n                    throw error;\n            } else {\n                throw error;\n            }\n        });\n    }\n\n    private allowedToEditSettings(): boolean {\n        return CmGuardService.isOrganizationAdmin() || CmGuardService.isStationManager();\n    }\n\n    private sort(field) {\n        this.sortField = field;\n        if (this.sortDirection === ASC_STRING) {\n            this.sortDirection = DESC_STRING;\n            this.suggestedParts.sort((a, b) => {\n                try {\n                    return b[field].localeCompare(a[field]);\n                } catch (ex) {\n                    return (b[field] ? b[field] : -100) >= (a[field] ? a[field] : -100) ? 1 : -1;\n                }\n            });\n        } else {\n            this.sortDirection = ASC_STRING;\n            this.suggestedParts.sort((a, b) => {\n                try {\n                    return a[field].localeCompare(b[field]);\n                } catch (ex) {\n                    return (a[field] ? a[field] : -100) >= (b[field] ? b[field] : -100) ? 1 : -1;\n                }\n            });\n        }\n    }\n}\n\n","import {Component} from '@angular/core'\n\n@Component({\n    selector: 'cm-page-not-found',\n    template: '<h1>{{\"notFound.Msg\" | translate}}</h1>'\n})\nexport class CmPageNotFoundComponent {\n\n}\n","import {Component, HostListener} from '@angular/core';\nimport {DialogRef} from \"ngx-modialog\";\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport {CmGlobalErrorHandler} from \"../../services/cm-global-handler-service\";\n\n@Component({\n    selector: 'cm-modal-message',\n    template: require('./cm-modal-message-component.html'),\n    styles: [require('./cm-modal-message-component.scss').toString()]\n})\nexport class CmModalMessageComponent  {\n\n    private showMore = false;\n    private btnNameLong = \"Extended info\";\n    private btnNameShort = \"Short info\";\n    private btnName = this.btnNameLong;\n\n    private msgName: string;\n    private shortMsg: string;\n    private extMsg: string;\n\n    constructor(\n        public dialog: DialogRef<CmModalMessageComponentContext>,\n        private modal: Modal\n    ) {\n        this.msgName = dialog.context.msgName;\n        this.shortMsg = dialog.context.shortMsg;\n        this.extMsg = dialog.context.extMsg;\n\n    }\n\n    showAdditionalInfo(){\n        this.showMore = !this.showMore;\n        if(this.btnName === this.btnNameLong) {\n            this.btnName = this.btnNameShort\n        }else{\n            this.btnName = this.btnNameLong\n        }\n    }\n\n    private close() {\n        this.dialog.close();\n        CmGlobalErrorHandler.isShownCmModalMessageComponent = false;\n    }\n\n    @HostListener('document:keydown', ['$event']) onKeydownHandler(event: KeyboardEvent) {\n        if (event.key === \"Escape\") {\n            CmGlobalErrorHandler.isShownCmModalMessageComponent = false;\n            this.dialog.close();\n        }\n    }\n\n}\n\nexport class CmModalMessageComponentContext extends BSModalContext {\n    public msgName : string;\n    public shortMsg: string;\n    public extMsg  : string;\n}\n","import {ErrorHandler, Injectable, Injector} from '@angular/core';\nimport {CmTranslateService} from \"./localization/cm-translate.service\";\nimport {BSModalContext, Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {overlayConfigFactory} from \"ngx-modialog\";\nimport {CmModalMessageComponent} from \"../components/cm-modal-message/cm-modal-message-component\";\nimport {HttpErrorResponse} from \"@angular/common/http\";\nimport {TimeoutError} from \"rxjs\";\n\n@Injectable()\nexport class CmGlobalErrorHandler implements ErrorHandler {\n\n    private modal: Modal;\n    private translate: CmTranslateService;\n    public static  isShownCmModalMessageComponent: boolean =false;\n\n    constructor(private injector: Injector) { }\n\n    handleError(error) {\n        console.log(error);\n        this.modal = this.injector.get(Modal);\n        this.translate = this.injector.get(CmTranslateService);\n\n        if (error instanceof TimeoutError) {\n            this.showAlertPopup('Timeout exceeded');\n        } else if (error instanceof HttpErrorResponse) {\n            this.showHttpErrorPopup(error);\n        } else {\n            this.showUnexpectedError(error);\n        }\n\n        // Dirty hack!!! Don't know why, but in case of http errors app freeze without this line\n        window.dispatchEvent(new Event('resize'));\n    }\n\n    private showHttpErrorPopup(error) {\n        if (error.status == 403) {\n            this.showAlertPopup('Access denied!');\n        } else if (error.status == 400 && error.error && error.error.errors) {\n            let errors = error.error.errors;\n            let message = '';\n            errors.forEach(e => message += 'Error in field ' + e.field + ': ' + (e.defaultMessage || e.code) + '<br/>');\n            this.showAlertPopup(message);\n        } else {\n            this.showUnexpectedError(error);\n        }\n    }\n\n    private showAlertPopup(message) {\n        this.modal.alert().message(message).open();\n    }\n\n    private showUnexpectedError(error) {\n    if(!CmGlobalErrorHandler.isShownCmModalMessageComponent) {\n        CmGlobalErrorHandler.isShownCmModalMessageComponent = true;\n\n        let promptMessage = this.translate.get(\"modal.msg.prompt\");\n\n        let message;\n        if (error instanceof HttpErrorResponse) {\n            if (error.message) {\n                message = error.message\n                if (error.error.message){\n                    message = message + \"  -   \" + error.error.message;\n                }\n\n            } else {\n                message = JSON.stringify(error.error);\n            }\n        } else {\n            message = error.stack || error.message;\n        }\n\n        this.modal.open(CmModalMessageComponent, overlayConfigFactory({\n            msgName: \"Error\",\n            shortMsg: promptMessage,\n            extMsg: message\n        }, BSModalContext));\n    }\n    }\n\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        continue;\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        result[rkey] = relative[rkey];\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n","/*! nouislider - 14.7.0 - 4/6/2021 */\n(function(factory) {\n    if (typeof define === \"function\" && define.amd) {\n        define([], factory);\n    } else if (typeof exports === \"object\") {\n        module.exports = factory();\n    } else {\n        window.noUiSlider = factory();\n    }\n})(function() {\n    \"use strict\";\n    var VERSION = \"14.7.0\";\n    //region Helper Methods\n    function isValidFormatter(entry) {\n        return typeof entry === \"object\" && typeof entry.to === \"function\" && typeof entry.from === \"function\";\n    }\n    function removeElement(el) {\n        el.parentElement.removeChild(el);\n    }\n    function isSet(value) {\n        return value !== null && value !== undefined;\n    }\n    // Bindable version\n    function preventDefault(e) {\n        e.preventDefault();\n    }\n    // Removes duplicates from an array.\n    function unique(array) {\n        return array.filter(function (a) {\n            return !this[a] ? (this[a] = true) : false;\n        }, {});\n    }\n    // Round a value to the closest 'to'.\n    function closest(value, to) {\n        return Math.round(value / to) * to;\n    }\n    // Current position of an element relative to the document.\n    function offset(elem, orientation) {\n        var rect = elem.getBoundingClientRect();\n        var doc = elem.ownerDocument;\n        var docElem = doc.documentElement;\n        var pageOffset = getPageOffset(doc);\n        // getBoundingClientRect contains left scroll in Chrome on Android.\n        // I haven't found a feature detection that proves this. Worst case\n        // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n        if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n            pageOffset.x = 0;\n        }\n        return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;\n    }\n    // Checks whether a value is numerical.\n    function isNumeric(a) {\n        return typeof a === \"number\" && !isNaN(a) && isFinite(a);\n    }\n    // Sets a class and removes it after [duration] ms.\n    function addClassFor(element, className, duration) {\n        if (duration > 0) {\n            addClass(element, className);\n            setTimeout(function () {\n                removeClass(element, className);\n            }, duration);\n        }\n    }\n    // Limits a value to 0 - 100\n    function limit(a) {\n        return Math.max(Math.min(a, 100), 0);\n    }\n    // Wraps a variable as an array, if it isn't one yet.\n    // Note that an input array is returned by reference!\n    function asArray(a) {\n        return Array.isArray(a) ? a : [a];\n    }\n    // Counts decimals\n    function countDecimals(numStr) {\n        numStr = String(numStr);\n        var pieces = numStr.split(\".\");\n        return pieces.length > 1 ? pieces[1].length : 0;\n    }\n    // http://youmightnotneedjquery.com/#add_class\n    function addClass(el, className) {\n        if (el.classList && !/\\s/.test(className)) {\n            el.classList.add(className);\n        }\n        else {\n            el.className += \" \" + className;\n        }\n    }\n    // http://youmightnotneedjquery.com/#remove_class\n    function removeClass(el, className) {\n        if (el.classList && !/\\s/.test(className)) {\n            el.classList.remove(className);\n        }\n        else {\n            el.className = el.className.replace(new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"), \" \");\n        }\n    }\n    // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\n    function hasClass(el, className) {\n        return el.classList ? el.classList.contains(className) : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\n    }\n    // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\n    function getPageOffset(doc) {\n        var supportPageOffset = window.pageXOffset !== undefined;\n        var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\n        var x = supportPageOffset\n            ? window.pageXOffset\n            : isCSS1Compat\n                ? doc.documentElement.scrollLeft\n                : doc.body.scrollLeft;\n        var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? doc.documentElement.scrollTop : doc.body.scrollTop;\n        return {\n            x: x,\n            y: y\n        };\n    }\n    // we provide a function to compute constants instead\n    // of accessing window.* as soon as the module needs it\n    // so that we do not compute anything if not needed\n    function getActions() {\n        // Determine the events to bind. IE11 implements pointerEvents without\n        // a prefix, which breaks compatibility with the IE10 implementation.\n        return window.navigator.pointerEnabled\n            ? {\n                start: \"pointerdown\",\n                move: \"pointermove\",\n                end: \"pointerup\"\n            }\n            : window.navigator.msPointerEnabled\n                ? {\n                    start: \"MSPointerDown\",\n                    move: \"MSPointerMove\",\n                    end: \"MSPointerUp\"\n                }\n                : {\n                    start: \"mousedown touchstart\",\n                    move: \"mousemove touchmove\",\n                    end: \"mouseup touchend\"\n                };\n    }\n    // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n    // Issue #785\n    function getSupportsPassive() {\n        var supportsPassive = false;\n        /* eslint-disable */\n        try {\n            var opts = Object.defineProperty({}, \"passive\", {\n                get: function () {\n                    supportsPassive = true;\n                }\n            });\n            window.addEventListener(\"test\", null, opts);\n        }\n        catch (e) { }\n        /* eslint-enable */\n        return supportsPassive;\n    }\n    function getSupportsTouchActionNone() {\n        return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\n    }\n    //endregion\n    //region Range Calculation\n    // Determine the size of a sub-range in relation to a full range.\n    function subRangeRatio(pa, pb) {\n        return 100 / (pb - pa);\n    }\n    // (percentage) How many percent is this value of this range?\n    function fromPercentage(range, value, startRange) {\n        return (value * 100) / (range[startRange + 1] - range[startRange]);\n    }\n    // (percentage) Where is this value on this range?\n    function toPercentage(range, value) {\n        return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);\n    }\n    // (value) How much is this percentage on this range?\n    function isPercentage(range, value) {\n        return (value * (range[1] - range[0])) / 100 + range[0];\n    }\n    function getJ(value, arr) {\n        var j = 1;\n        while (value >= arr[j]) {\n            j += 1;\n        }\n        return j;\n    }\n    // (percentage) Input a value, find where, on a scale of 0-100, it applies.\n    function toStepping(xVal, xPct, value) {\n        if (value >= xVal.slice(-1)[0]) {\n            return 100;\n        }\n        var j = getJ(value, xVal);\n        var va = xVal[j - 1];\n        var vb = xVal[j];\n        var pa = xPct[j - 1];\n        var pb = xPct[j];\n        return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n    }\n    // (value) Input a percentage, find where it is on the specified range.\n    function fromStepping(xVal, xPct, value) {\n        // There is no range group that fits 100\n        if (value >= 100) {\n            return xVal.slice(-1)[0];\n        }\n        var j = getJ(value, xPct);\n        var va = xVal[j - 1];\n        var vb = xVal[j];\n        var pa = xPct[j - 1];\n        var pb = xPct[j];\n        return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n    }\n    // (percentage) Get the step that applies at a certain value.\n    function getStep(xPct, xSteps, snap, value) {\n        if (value === 100) {\n            return value;\n        }\n        var j = getJ(value, xPct);\n        var a = xPct[j - 1];\n        var b = xPct[j];\n        // If 'snap' is set, steps are used as fixed points on the slider.\n        if (snap) {\n            // Find the closest position, a or b.\n            if (value - a > (b - a) / 2) {\n                return b;\n            }\n            return a;\n        }\n        if (!xSteps[j - 1]) {\n            return value;\n        }\n        return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n    }\n    function handleEntryPoint(index, value, that) {\n        var percentage;\n        // Wrap numerical input in an array.\n        if (typeof value === \"number\") {\n            value = [value];\n        }\n        // Reject any invalid input, by testing whether value is an array.\n        if (!Array.isArray(value)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' contains invalid value.\");\n        }\n        // Covert min/max syntax to 0 and 100.\n        if (index === \"min\") {\n            percentage = 0;\n        }\n        else if (index === \"max\") {\n            percentage = 100;\n        }\n        else {\n            percentage = parseFloat(index);\n        }\n        // Check for correct input.\n        if (!isNumeric(percentage) || !isNumeric(value[0])) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' value isn't numeric.\");\n        }\n        // Store values.\n        that.xPct.push(percentage);\n        that.xVal.push(value[0]);\n        // NaN will evaluate to false too, but to keep\n        // logging clear, set step explicitly. Make sure\n        // not to override the 'step' setting with false.\n        if (!percentage) {\n            if (!isNaN(value[1])) {\n                that.xSteps[0] = value[1];\n            }\n        }\n        else {\n            that.xSteps.push(isNaN(value[1]) ? false : value[1]);\n        }\n        that.xHighestCompleteStep.push(0);\n    }\n    function handleStepPoint(i, n, that) {\n        // Ignore 'false' stepping.\n        if (!n) {\n            return;\n        }\n        // Step over zero-length ranges (#948);\n        if (that.xVal[i] === that.xVal[i + 1]) {\n            that.xSteps[i] = that.xHighestCompleteStep[i] = that.xVal[i];\n            return;\n        }\n        // Factor to range ratio\n        that.xSteps[i] =\n            fromPercentage([that.xVal[i], that.xVal[i + 1]], n, 0) / subRangeRatio(that.xPct[i], that.xPct[i + 1]);\n        var totalSteps = (that.xVal[i + 1] - that.xVal[i]) / that.xNumSteps[i];\n        var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n        var step = that.xVal[i] + that.xNumSteps[i] * highestStep;\n        that.xHighestCompleteStep[i] = step;\n    }\n    //endregion\n    //region Spectrum\n    function Spectrum(entry, snap, singleStep) {\n        this.xPct = [];\n        this.xVal = [];\n        this.xSteps = [singleStep || false];\n        this.xNumSteps = [false];\n        this.xHighestCompleteStep = [];\n        this.snap = snap;\n        var index;\n        var ordered = []; // [0, 'min'], [1, '50%'], [2, 'max']\n        // Map the object keys to an array.\n        for (index in entry) {\n            if (entry.hasOwnProperty(index)) {\n                ordered.push([entry[index], index]);\n            }\n        }\n        // Sort all entries by value (numeric sort).\n        if (ordered.length && typeof ordered[0][0] === \"object\") {\n            ordered.sort(function (a, b) {\n                return a[0][0] - b[0][0];\n            });\n        }\n        else {\n            ordered.sort(function (a, b) {\n                return a[0] - b[0];\n            });\n        }\n        // Convert all entries to subranges.\n        for (index = 0; index < ordered.length; index++) {\n            handleEntryPoint(ordered[index][1], ordered[index][0], this);\n        }\n        // Store the actual step values.\n        // xSteps is sorted in the same order as xPct and xVal.\n        this.xNumSteps = this.xSteps.slice(0);\n        // Convert all numeric steps to the percentage of the subrange they represent.\n        for (index = 0; index < this.xNumSteps.length; index++) {\n            handleStepPoint(index, this.xNumSteps[index], this);\n        }\n    }\n    Spectrum.prototype.getDistance = function (value) {\n        var index;\n        var distances = [];\n        for (index = 0; index < this.xNumSteps.length - 1; index++) {\n            // last \"range\" can't contain step size as it is purely an endpoint.\n            var step = this.xNumSteps[index];\n            if (step && (value / step) % 1 !== 0) {\n                throw new Error(\"noUiSlider (\" +\n                    VERSION +\n                    \"): 'limit', 'margin' and 'padding' of \" +\n                    this.xPct[index] +\n                    \"% range must be divisible by step.\");\n            }\n            // Calculate percentual distance in current range of limit, margin or padding\n            distances[index] = fromPercentage(this.xVal, value, index);\n        }\n        return distances;\n    };\n    // Calculate the percentual distance over the whole scale of ranges.\n    // direction: 0 = backwards / 1 = forwards\n    Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {\n        var xPct_index = 0;\n        // Calculate range where to start calculation\n        if (value < this.xPct[this.xPct.length - 1]) {\n            while (value > this.xPct[xPct_index + 1]) {\n                xPct_index++;\n            }\n        }\n        else if (value === this.xPct[this.xPct.length - 1]) {\n            xPct_index = this.xPct.length - 2;\n        }\n        // If looking backwards and the value is exactly at a range separator then look one range further\n        if (!direction && value === this.xPct[xPct_index + 1]) {\n            xPct_index++;\n        }\n        var start_factor;\n        var rest_factor = 1;\n        var rest_rel_distance = distances[xPct_index];\n        var range_pct = 0;\n        var rel_range_distance = 0;\n        var abs_distance_counter = 0;\n        var range_counter = 0;\n        // Calculate what part of the start range the value is\n        if (direction) {\n            start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        }\n        else {\n            start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        }\n        // Do until the complete distance across ranges is calculated\n        while (rest_rel_distance > 0) {\n            // Calculate the percentage of total range\n            range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];\n            // Detect if the margin, padding or limit is larger then the current range and calculate\n            if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {\n                // If larger then take the percentual distance of the whole range\n                rel_range_distance = range_pct * start_factor;\n                // Rest factor of relative percentual distance still to be calculated\n                rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];\n                // Set start factor to 1 as for next range it does not apply.\n                start_factor = 1;\n            }\n            else {\n                // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n                rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;\n                // No rest left as the rest fits in current range\n                rest_factor = 0;\n            }\n            if (direction) {\n                abs_distance_counter = abs_distance_counter - rel_range_distance;\n                // Limit range to first range when distance becomes outside of minimum range\n                if (this.xPct.length + range_counter >= 1) {\n                    range_counter--;\n                }\n            }\n            else {\n                abs_distance_counter = abs_distance_counter + rel_range_distance;\n                // Limit range to last range when distance becomes outside of maximum range\n                if (this.xPct.length - range_counter >= 1) {\n                    range_counter++;\n                }\n            }\n            // Rest of relative percentual distance still to be calculated\n            rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;\n        }\n        return value + abs_distance_counter;\n    };\n    Spectrum.prototype.toStepping = function (value) {\n        value = toStepping(this.xVal, this.xPct, value);\n        return value;\n    };\n    Spectrum.prototype.fromStepping = function (value) {\n        return fromStepping(this.xVal, this.xPct, value);\n    };\n    Spectrum.prototype.getStep = function (value) {\n        value = getStep(this.xPct, this.xSteps, this.snap, value);\n        return value;\n    };\n    Spectrum.prototype.getDefaultStep = function (value, isDown, size) {\n        var j = getJ(value, this.xPct);\n        // When at the top or stepping down, look at the previous sub-range\n        if (value === 100 || (isDown && value === this.xPct[j - 1])) {\n            j = Math.max(j - 1, 1);\n        }\n        return (this.xVal[j] - this.xVal[j - 1]) / size;\n    };\n    Spectrum.prototype.getNearbySteps = function (value) {\n        var j = getJ(value, this.xPct);\n        return {\n            stepBefore: {\n                startValue: this.xVal[j - 2],\n                step: this.xNumSteps[j - 2],\n                highestStep: this.xHighestCompleteStep[j - 2]\n            },\n            thisStep: {\n                startValue: this.xVal[j - 1],\n                step: this.xNumSteps[j - 1],\n                highestStep: this.xHighestCompleteStep[j - 1]\n            },\n            stepAfter: {\n                startValue: this.xVal[j],\n                step: this.xNumSteps[j],\n                highestStep: this.xHighestCompleteStep[j]\n            }\n        };\n    };\n    Spectrum.prototype.countStepDecimals = function () {\n        var stepDecimals = this.xNumSteps.map(countDecimals);\n        return Math.max.apply(null, stepDecimals);\n    };\n    // Outside testing\n    Spectrum.prototype.convert = function (value) {\n        return this.getStep(this.toStepping(value));\n    };\n    //endregion\n    //region Options\n    /*\tEvery input option is tested and parsed. This'll prevent\n        endless validation in internal methods. These tests are\n        structured with an item for every option available. An\n        option can be marked as required by setting the 'r' flag.\n        The testing function is provided with three arguments:\n            - The provided value for the option;\n            - A reference to the options object;\n            - The name for the option;\n    \n        The testing function returns false when an error is detected,\n        or true when everything is OK. It can also modify the option\n        object, to make sure all values can be correctly looped elsewhere. */\n    //region Defaults\n    var defaultFormatter = {\n        to: function (value) {\n            return value !== undefined && value.toFixed(2);\n        },\n        from: Number\n    };\n    var cssClasses = {\n        target: \"target\",\n        base: \"base\",\n        origin: \"origin\",\n        handle: \"handle\",\n        handleLower: \"handle-lower\",\n        handleUpper: \"handle-upper\",\n        touchArea: \"touch-area\",\n        horizontal: \"horizontal\",\n        vertical: \"vertical\",\n        background: \"background\",\n        connect: \"connect\",\n        connects: \"connects\",\n        ltr: \"ltr\",\n        rtl: \"rtl\",\n        textDirectionLtr: \"txt-dir-ltr\",\n        textDirectionRtl: \"txt-dir-rtl\",\n        draggable: \"draggable\",\n        drag: \"state-drag\",\n        tap: \"state-tap\",\n        active: \"active\",\n        tooltip: \"tooltip\",\n        pips: \"pips\",\n        pipsHorizontal: \"pips-horizontal\",\n        pipsVertical: \"pips-vertical\",\n        marker: \"marker\",\n        markerHorizontal: \"marker-horizontal\",\n        markerVertical: \"marker-vertical\",\n        markerNormal: \"marker-normal\",\n        markerLarge: \"marker-large\",\n        markerSub: \"marker-sub\",\n        value: \"value\",\n        valueHorizontal: \"value-horizontal\",\n        valueVertical: \"value-vertical\",\n        valueNormal: \"value-normal\",\n        valueLarge: \"value-large\",\n        valueSub: \"value-sub\"\n    };\n    // Namespaces of internal event listeners\n    var INTERNAL_EVENT_NS = {\n        tooltips: \".__tooltips\",\n        aria: \".__aria\"\n    };\n    //endregion\n    function validateFormat(entry) {\n        // Any object with a to and from method is supported.\n        if (isValidFormatter(entry)) {\n            return true;\n        }\n        throw new Error(\"noUiSlider (\" + VERSION + \"): 'format' requires 'to' and 'from' methods.\");\n    }\n    function testStep(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'step' is not numeric.\");\n        }\n        // The step option can still be used to set stepping\n        // for linear sliders. Overwritten if set in 'range'.\n        parsed.singleStep = entry;\n    }\n    function testKeyboardPageMultiplier(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardPageMultiplier' is not numeric.\");\n        }\n        parsed.keyboardPageMultiplier = entry;\n    }\n    function testKeyboardDefaultStep(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardDefaultStep' is not numeric.\");\n        }\n        parsed.keyboardDefaultStep = entry;\n    }\n    function testRange(parsed, entry) {\n        // Filter incorrect input.\n        if (typeof entry !== \"object\" || Array.isArray(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' is not an object.\");\n        }\n        // Catch missing start or end.\n        if (entry.min === undefined || entry.max === undefined) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): Missing 'min' or 'max' in 'range'.\");\n        }\n        // Catch equal start or end.\n        if (entry.min === entry.max) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' 'min' and 'max' cannot be equal.\");\n        }\n        parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.singleStep);\n    }\n    function testStart(parsed, entry) {\n        entry = asArray(entry);\n        // Validate input. Values aren't tested, as the public .val method\n        // will always provide a valid location.\n        if (!Array.isArray(entry) || !entry.length) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'start' option is incorrect.\");\n        }\n        // Store the number of handles.\n        parsed.handles = entry.length;\n        // When the slider is initialized, the .val method will\n        // be called with the start options.\n        parsed.start = entry;\n    }\n    function testSnap(parsed, entry) {\n        // Enforce 100% stepping within subranges.\n        parsed.snap = entry;\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'snap' option must be a boolean.\");\n        }\n    }\n    function testAnimate(parsed, entry) {\n        // Enforce 100% stepping within subranges.\n        parsed.animate = entry;\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'animate' option must be a boolean.\");\n        }\n    }\n    function testAnimationDuration(parsed, entry) {\n        parsed.animationDuration = entry;\n        if (typeof entry !== \"number\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'animationDuration' option must be a number.\");\n        }\n    }\n    function testConnect(parsed, entry) {\n        var connect = [false];\n        var i;\n        // Map legacy options\n        if (entry === \"lower\") {\n            entry = [true, false];\n        }\n        else if (entry === \"upper\") {\n            entry = [false, true];\n        }\n        // Handle boolean options\n        if (entry === true || entry === false) {\n            for (i = 1; i < parsed.handles; i++) {\n                connect.push(entry);\n            }\n            connect.push(false);\n        }\n        // Reject invalid input\n        else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'connect' option doesn't match handle count.\");\n        }\n        else {\n            connect = entry;\n        }\n        parsed.connect = connect;\n    }\n    function testOrientation(parsed, entry) {\n        // Set orientation to an a numerical value for easy\n        // array selection.\n        switch (entry) {\n            case \"horizontal\":\n                parsed.ort = 0;\n                break;\n            case \"vertical\":\n                parsed.ort = 1;\n                break;\n            default:\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'orientation' option is invalid.\");\n        }\n    }\n    function testMargin(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option must be numeric.\");\n        }\n        // Issue #582\n        if (entry === 0) {\n            return;\n        }\n        parsed.margin = parsed.spectrum.getDistance(entry);\n    }\n    function testLimit(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option must be numeric.\");\n        }\n        parsed.limit = parsed.spectrum.getDistance(entry);\n        if (!parsed.limit || parsed.handles < 2) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option is only supported on linear sliders with 2 or more handles.\");\n        }\n    }\n    function testPadding(parsed, entry) {\n        var index;\n        if (!isNumeric(entry) && !Array.isArray(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\");\n        }\n        if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\");\n        }\n        if (entry === 0) {\n            return;\n        }\n        if (!Array.isArray(entry)) {\n            entry = [entry, entry];\n        }\n        // 'getDistance' returns false for invalid values.\n        parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n        for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {\n            // last \"range\" can't contain step size as it is purely an endpoint.\n            if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be a positive number(s).\");\n            }\n        }\n        var totalPadding = entry[0] + entry[1];\n        var firstValue = parsed.spectrum.xVal[0];\n        var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n        if (totalPadding / (lastValue - firstValue) > 1) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must not exceed 100% of the range.\");\n        }\n    }\n    function testDirection(parsed, entry) {\n        // Set direction as a numerical value for easy parsing.\n        // Invert connection for RTL sliders, so that the proper\n        // handles get the connect/background classes.\n        switch (entry) {\n            case \"ltr\":\n                parsed.dir = 0;\n                break;\n            case \"rtl\":\n                parsed.dir = 1;\n                break;\n            default:\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'direction' option was not recognized.\");\n        }\n    }\n    function testBehaviour(parsed, entry) {\n        // Make sure the input is a string.\n        if (typeof entry !== \"string\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'behaviour' must be a string containing options.\");\n        }\n        // Check if the string contains any keywords.\n        // None are required.\n        var tap = entry.indexOf(\"tap\") >= 0;\n        var drag = entry.indexOf(\"drag\") >= 0;\n        var fixed = entry.indexOf(\"fixed\") >= 0;\n        var snap = entry.indexOf(\"snap\") >= 0;\n        var hover = entry.indexOf(\"hover\") >= 0;\n        var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\n        if (fixed) {\n            if (parsed.handles !== 2) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'fixed' behaviour must be used with 2 handles\");\n            }\n            // Use margin to enforce fixed state\n            testMargin(parsed, parsed.start[1] - parsed.start[0]);\n        }\n        if (unconstrained && (parsed.margin || parsed.limit)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'unconstrained' behaviour cannot be used with margin or limit\");\n        }\n        parsed.events = {\n            tap: tap || snap,\n            drag: drag,\n            fixed: fixed,\n            snap: snap,\n            hover: hover,\n            unconstrained: unconstrained\n        };\n    }\n    function testTooltips(parsed, entry) {\n        if (entry === false) {\n            return;\n        }\n        if (entry === true) {\n            parsed.tooltips = [];\n            for (var i = 0; i < parsed.handles; i++) {\n                parsed.tooltips.push(true);\n            }\n        }\n        else {\n            parsed.tooltips = asArray(entry);\n            if (parsed.tooltips.length !== parsed.handles) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): must pass a formatter for all handles.\");\n            }\n            parsed.tooltips.forEach(function (formatter) {\n                if (typeof formatter !== \"boolean\" &&\n                    (typeof formatter !== \"object\" || typeof formatter.to !== \"function\")) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): 'tooltips' must be passed a formatter or 'false'.\");\n                }\n            });\n        }\n    }\n    function testAriaFormat(parsed, entry) {\n        parsed.ariaFormat = entry;\n        validateFormat(entry);\n    }\n    function testFormat(parsed, entry) {\n        parsed.format = entry;\n        validateFormat(entry);\n    }\n    function testKeyboardSupport(parsed, entry) {\n        parsed.keyboardSupport = entry;\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardSupport' option must be a boolean.\");\n        }\n    }\n    function testDocumentElement(parsed, entry) {\n        // This is an advanced option. Passed values are used without validation.\n        parsed.documentElement = entry;\n    }\n    function testCssPrefix(parsed, entry) {\n        if (typeof entry !== \"string\" && entry !== false) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssPrefix' must be a string or `false`.\");\n        }\n        parsed.cssPrefix = entry;\n    }\n    function testCssClasses(parsed, entry) {\n        if (typeof entry !== \"object\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssClasses' must be an object.\");\n        }\n        if (typeof parsed.cssPrefix === \"string\") {\n            parsed.cssClasses = {};\n            for (var key in entry) {\n                if (!entry.hasOwnProperty(key)) {\n                    continue;\n                }\n                parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\n            }\n        }\n        else {\n            parsed.cssClasses = entry;\n        }\n    }\n    // Test all developer settings and parse to assumption-safe values.\n    function testOptions(options) {\n        // To prove a fix for #537, freeze options here.\n        // If the object is modified, an error will be thrown.\n        // Object.freeze(options);\n        var parsed = {\n            margin: 0,\n            limit: 0,\n            padding: 0,\n            animate: true,\n            animationDuration: 300,\n            ariaFormat: defaultFormatter,\n            format: defaultFormatter\n        };\n        // Tests are executed in the order they are presented here.\n        var tests = {\n            step: { r: false, t: testStep },\n            keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n            keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n            start: { r: true, t: testStart },\n            connect: { r: true, t: testConnect },\n            direction: { r: true, t: testDirection },\n            snap: { r: false, t: testSnap },\n            animate: { r: false, t: testAnimate },\n            animationDuration: { r: false, t: testAnimationDuration },\n            range: { r: true, t: testRange },\n            orientation: { r: false, t: testOrientation },\n            margin: { r: false, t: testMargin },\n            limit: { r: false, t: testLimit },\n            padding: { r: false, t: testPadding },\n            behaviour: { r: true, t: testBehaviour },\n            ariaFormat: { r: false, t: testAriaFormat },\n            format: { r: false, t: testFormat },\n            tooltips: { r: false, t: testTooltips },\n            keyboardSupport: { r: true, t: testKeyboardSupport },\n            documentElement: { r: false, t: testDocumentElement },\n            cssPrefix: { r: true, t: testCssPrefix },\n            cssClasses: { r: true, t: testCssClasses }\n        };\n        var defaults = {\n            connect: false,\n            direction: \"ltr\",\n            behaviour: \"tap\",\n            orientation: \"horizontal\",\n            keyboardSupport: true,\n            cssPrefix: \"noUi-\",\n            cssClasses: cssClasses,\n            keyboardPageMultiplier: 5,\n            keyboardDefaultStep: 10\n        };\n        // AriaFormat defaults to regular format, if any.\n        if (options.format && !options.ariaFormat) {\n            options.ariaFormat = options.format;\n        }\n        // Run all options through a testing mechanism to ensure correct\n        // input. It should be noted that options might get modified to\n        // be handled properly. E.g. wrapping integers in arrays.\n        Object.keys(tests).forEach(function (name) {\n            // If the option isn't set, but it is required, throw an error.\n            if (!isSet(options[name]) && defaults[name] === undefined) {\n                if (tests[name].r) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n                }\n                return true;\n            }\n            tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n        });\n        // Forward pips options\n        parsed.pips = options.pips;\n        // All recent browsers accept unprefixed transform.\n        // We need -ms- for IE9 and -webkit- for older Android;\n        // Assume use of -webkit- if unprefixed and -ms- are not supported.\n        // https://caniuse.com/#feat=transforms2d\n        var d = document.createElement(\"div\");\n        var msPrefix = d.style.msTransform !== undefined;\n        var noPrefix = d.style.transform !== undefined;\n        parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n        // Pips don't move, so we can place them using left/top.\n        var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n        parsed.style = styles[parsed.dir][parsed.ort];\n        return parsed;\n    }\n    //endregion\n    function scope(target, options, originalOptions) {\n        var actions = getActions();\n        var supportsTouchActionNone = getSupportsTouchActionNone();\n        var supportsPassive = supportsTouchActionNone && getSupportsPassive();\n        // All variables local to 'scope' are prefixed with 'scope_'\n        // Slider DOM Nodes\n        var scope_Target = target;\n        var scope_Base;\n        var scope_Handles;\n        var scope_Connects;\n        var scope_Pips;\n        var scope_Tooltips;\n        // Slider state values\n        var scope_Spectrum = options.spectrum;\n        var scope_Values = [];\n        var scope_Locations = [];\n        var scope_HandleNumbers = [];\n        var scope_ActiveHandlesCount = 0;\n        var scope_Events = {};\n        // Exposed API\n        var scope_Self;\n        // Document Nodes\n        var scope_Document = target.ownerDocument;\n        var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\n        var scope_Body = scope_Document.body;\n        // Pips constants\n        var PIPS_NONE = -1;\n        var PIPS_NO_VALUE = 0;\n        var PIPS_LARGE_VALUE = 1;\n        var PIPS_SMALL_VALUE = 2;\n        // For horizontal sliders in standard ltr documents,\n        // make .noUi-origin overflow to the left so the document doesn't scroll.\n        var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100;\n        // Creates a node, adds it to target, returns the new node.\n        function addNodeTo(addTarget, className) {\n            var div = scope_Document.createElement(\"div\");\n            if (className) {\n                addClass(div, className);\n            }\n            addTarget.appendChild(div);\n            return div;\n        }\n        // Append a origin to the base\n        function addOrigin(base, handleNumber) {\n            var origin = addNodeTo(base, options.cssClasses.origin);\n            var handle = addNodeTo(origin, options.cssClasses.handle);\n            addNodeTo(handle, options.cssClasses.touchArea);\n            handle.setAttribute(\"data-handle\", handleNumber);\n            if (options.keyboardSupport) {\n                // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n                // 0 = focusable and reachable\n                handle.setAttribute(\"tabindex\", \"0\");\n                handle.addEventListener(\"keydown\", function (event) {\n                    return eventKeydown(event, handleNumber);\n                });\n            }\n            handle.setAttribute(\"role\", \"slider\");\n            handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\n            if (handleNumber === 0) {\n                addClass(handle, options.cssClasses.handleLower);\n            }\n            else if (handleNumber === options.handles - 1) {\n                addClass(handle, options.cssClasses.handleUpper);\n            }\n            return origin;\n        }\n        // Insert nodes for connect elements\n        function addConnect(base, add) {\n            if (!add) {\n                return false;\n            }\n            return addNodeTo(base, options.cssClasses.connect);\n        }\n        // Add handles to the slider base.\n        function addElements(connectOptions, base) {\n            var connectBase = addNodeTo(base, options.cssClasses.connects);\n            scope_Handles = [];\n            scope_Connects = [];\n            scope_Connects.push(addConnect(connectBase, connectOptions[0]));\n            // [::::O====O====O====]\n            // connectOptions = [0, 1, 1, 1]\n            for (var i = 0; i < options.handles; i++) {\n                // Keep a list of all added handles.\n                scope_Handles.push(addOrigin(base, i));\n                scope_HandleNumbers[i] = i;\n                scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n            }\n        }\n        // Initialize a single slider.\n        function addSlider(addTarget) {\n            // Apply classes and data to the target.\n            addClass(addTarget, options.cssClasses.target);\n            if (options.dir === 0) {\n                addClass(addTarget, options.cssClasses.ltr);\n            }\n            else {\n                addClass(addTarget, options.cssClasses.rtl);\n            }\n            if (options.ort === 0) {\n                addClass(addTarget, options.cssClasses.horizontal);\n            }\n            else {\n                addClass(addTarget, options.cssClasses.vertical);\n            }\n            var textDirection = getComputedStyle(addTarget).direction;\n            if (textDirection === \"rtl\") {\n                addClass(addTarget, options.cssClasses.textDirectionRtl);\n            }\n            else {\n                addClass(addTarget, options.cssClasses.textDirectionLtr);\n            }\n            return addNodeTo(addTarget, options.cssClasses.base);\n        }\n        function addTooltip(handle, handleNumber) {\n            if (!options.tooltips[handleNumber]) {\n                return false;\n            }\n            return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n        }\n        function isSliderDisabled() {\n            return scope_Target.hasAttribute(\"disabled\");\n        }\n        // Disable the slider dragging if any handle is disabled\n        function isHandleDisabled(handleNumber) {\n            var handleOrigin = scope_Handles[handleNumber];\n            return handleOrigin.hasAttribute(\"disabled\");\n        }\n        function removeTooltips() {\n            if (scope_Tooltips) {\n                removeEvent(\"update\" + INTERNAL_EVENT_NS.tooltips);\n                scope_Tooltips.forEach(function (tooltip) {\n                    if (tooltip) {\n                        removeElement(tooltip);\n                    }\n                });\n                scope_Tooltips = null;\n            }\n        }\n        // The tooltips option is a shorthand for using the 'update' event.\n        function tooltips() {\n            removeTooltips();\n            // Tooltips are added with options.tooltips in original order.\n            scope_Tooltips = scope_Handles.map(addTooltip);\n            bindEvent(\"update\" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {\n                if (!scope_Tooltips[handleNumber]) {\n                    return;\n                }\n                var formattedValue = values[handleNumber];\n                if (options.tooltips[handleNumber] !== true) {\n                    formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n                }\n                scope_Tooltips[handleNumber].innerHTML = formattedValue;\n            });\n        }\n        function aria() {\n            removeEvent(\"update\" + INTERNAL_EVENT_NS.aria);\n            bindEvent(\"update\" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {\n                // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n                scope_HandleNumbers.forEach(function (index) {\n                    var handle = scope_Handles[index];\n                    var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\n                    var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\n                    var now = positions[index];\n                    // Formatted value for display\n                    var text = options.ariaFormat.to(unencoded[index]);\n                    // Map to slider range values\n                    min = scope_Spectrum.fromStepping(min).toFixed(1);\n                    max = scope_Spectrum.fromStepping(max).toFixed(1);\n                    now = scope_Spectrum.fromStepping(now).toFixed(1);\n                    handle.children[0].setAttribute(\"aria-valuemin\", min);\n                    handle.children[0].setAttribute(\"aria-valuemax\", max);\n                    handle.children[0].setAttribute(\"aria-valuenow\", now);\n                    handle.children[0].setAttribute(\"aria-valuetext\", text);\n                });\n            });\n        }\n        function getGroup(mode, values, stepped) {\n            // Use the range.\n            if (mode === \"range\" || mode === \"steps\") {\n                return scope_Spectrum.xVal;\n            }\n            if (mode === \"count\") {\n                if (values < 2) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): 'values' (>= 2) required for mode 'count'.\");\n                }\n                // Divide 0 - 100 in 'count' parts.\n                var interval = values - 1;\n                var spread = 100 / interval;\n                values = [];\n                // List these parts and have them handled as 'positions'.\n                while (interval--) {\n                    values[interval] = interval * spread;\n                }\n                values.push(100);\n                mode = \"positions\";\n            }\n            if (mode === \"positions\") {\n                // Map all percentages to on-range values.\n                return values.map(function (value) {\n                    return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\n                });\n            }\n            if (mode === \"values\") {\n                // If the value must be stepped, it needs to be converted to a percentage first.\n                if (stepped) {\n                    return values.map(function (value) {\n                        // Convert to percentage, apply step, return to value.\n                        return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n                    });\n                }\n                // Otherwise, we can simply use the values.\n                return values;\n            }\n        }\n        function generateSpread(density, mode, group) {\n            function safeIncrement(value, increment) {\n                // Avoid floating point variance by dropping the smallest decimal places.\n                return (value + increment).toFixed(7) / 1;\n            }\n            var indexes = {};\n            var firstInRange = scope_Spectrum.xVal[0];\n            var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n            var ignoreFirst = false;\n            var ignoreLast = false;\n            var prevPct = 0;\n            // Create a copy of the group, sort it and filter away all duplicates.\n            group = unique(group.slice().sort(function (a, b) {\n                return a - b;\n            }));\n            // Make sure the range starts with the first element.\n            if (group[0] !== firstInRange) {\n                group.unshift(firstInRange);\n                ignoreFirst = true;\n            }\n            // Likewise for the last one.\n            if (group[group.length - 1] !== lastInRange) {\n                group.push(lastInRange);\n                ignoreLast = true;\n            }\n            group.forEach(function (current, index) {\n                // Get the current step and the lower + upper positions.\n                var step;\n                var i;\n                var q;\n                var low = current;\n                var high = group[index + 1];\n                var newPct;\n                var pctDifference;\n                var pctPos;\n                var type;\n                var steps;\n                var realSteps;\n                var stepSize;\n                var isSteps = mode === \"steps\";\n                // When using 'steps' mode, use the provided steps.\n                // Otherwise, we'll step on to the next subrange.\n                if (isSteps) {\n                    step = scope_Spectrum.xNumSteps[index];\n                }\n                // Default to a 'full' step.\n                if (!step) {\n                    step = high - low;\n                }\n                // Low can be 0, so test for false. Index 0 is already handled.\n                if (low === false) {\n                    return;\n                }\n                // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)\n                if (high === undefined) {\n                    high = low;\n                }\n                // Make sure step isn't 0, which would cause an infinite loop (#654)\n                step = Math.max(step, 0.0000001);\n                // Find all steps in the subrange.\n                for (i = low; i <= high; i = safeIncrement(i, step)) {\n                    // Get the percentage value for the current step,\n                    // calculate the size for the subrange.\n                    newPct = scope_Spectrum.toStepping(i);\n                    pctDifference = newPct - prevPct;\n                    steps = pctDifference / density;\n                    realSteps = Math.round(steps);\n                    // This ratio represents the amount of percentage-space a point indicates.\n                    // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\n                    // Round the percentage offset to an even number, then divide by two\n                    // to spread the offset on both sides of the range.\n                    stepSize = pctDifference / realSteps;\n                    // Divide all points evenly, adding the correct number to this subrange.\n                    // Run up to <= so that 100% gets a point, event if ignoreLast is set.\n                    for (q = 1; q <= realSteps; q += 1) {\n                        // The ratio between the rounded value and the actual size might be ~1% off.\n                        // Correct the percentage offset by the number of points\n                        // per subrange. density = 1 will result in 100 points on the\n                        // full range, 2 for 50, 4 for 25, etc.\n                        pctPos = prevPct + q * stepSize;\n                        indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\n                    }\n                    // Determine the point type.\n                    type = group.indexOf(i) > -1 ? PIPS_LARGE_VALUE : isSteps ? PIPS_SMALL_VALUE : PIPS_NO_VALUE;\n                    // Enforce the 'ignoreFirst' option by overwriting the type for 0.\n                    if (!index && ignoreFirst && i !== high) {\n                        type = 0;\n                    }\n                    if (!(i === high && ignoreLast)) {\n                        // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\n                        indexes[newPct.toFixed(5)] = [i, type];\n                    }\n                    // Update the percentage count.\n                    prevPct = newPct;\n                }\n            });\n            return indexes;\n        }\n        function addMarking(spread, filterFunc, formatter) {\n            var element = scope_Document.createElement(\"div\");\n            var valueSizeClasses = [];\n            valueSizeClasses[PIPS_NO_VALUE] = options.cssClasses.valueNormal;\n            valueSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.valueLarge;\n            valueSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.valueSub;\n            var markerSizeClasses = [];\n            markerSizeClasses[PIPS_NO_VALUE] = options.cssClasses.markerNormal;\n            markerSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.markerLarge;\n            markerSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.markerSub;\n            var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n            var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n            addClass(element, options.cssClasses.pips);\n            addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\n            function getClasses(type, source) {\n                var a = source === options.cssClasses.value;\n                var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\n                var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\n                return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\n            }\n            function addSpread(offset, value, type) {\n                // Apply the filter function, if it is set.\n                type = filterFunc ? filterFunc(value, type) : type;\n                if (type === PIPS_NONE) {\n                    return;\n                }\n                // Add a marker for every point\n                var node = addNodeTo(element, false);\n                node.className = getClasses(type, options.cssClasses.marker);\n                node.style[options.style] = offset + \"%\";\n                // Values are only appended for points marked '1' or '2'.\n                if (type > PIPS_NO_VALUE) {\n                    node = addNodeTo(element, false);\n                    node.className = getClasses(type, options.cssClasses.value);\n                    node.setAttribute(\"data-value\", value);\n                    node.style[options.style] = offset + \"%\";\n                    node.innerHTML = formatter.to(value);\n                }\n            }\n            // Append all points.\n            Object.keys(spread).forEach(function (offset) {\n                addSpread(offset, spread[offset][0], spread[offset][1]);\n            });\n            return element;\n        }\n        function removePips() {\n            if (scope_Pips) {\n                removeElement(scope_Pips);\n                scope_Pips = null;\n            }\n        }\n        function pips(grid) {\n            // Fix #669\n            removePips();\n            var mode = grid.mode;\n            var density = grid.density || 1;\n            var filter = grid.filter || false;\n            var values = grid.values || false;\n            var stepped = grid.stepped || false;\n            var group = getGroup(mode, values, stepped);\n            var spread = generateSpread(density, mode, group);\n            var format = grid.format || {\n                to: Math.round\n            };\n            scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\n            return scope_Pips;\n        }\n        // Shorthand for base dimensions.\n        function baseSize() {\n            var rect = scope_Base.getBoundingClientRect();\n            var alt = \"offset\" + [\"Width\", \"Height\"][options.ort];\n            return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\n        }\n        // Handler for attaching events trough a proxy.\n        function attachEvent(events, element, callback, data) {\n            // This function can be used to 'filter' events to the slider.\n            // element is a node, not a nodeList\n            var method = function (e) {\n                e = fixEvent(e, data.pageOffset, data.target || element);\n                // fixEvent returns false if this event has a different target\n                // when handling (multi-) touch events;\n                if (!e) {\n                    return false;\n                }\n                // doNotReject is passed by all end events to make sure released touches\n                // are not rejected, leaving the slider \"stuck\" to the cursor;\n                if (isSliderDisabled() && !data.doNotReject) {\n                    return false;\n                }\n                // Stop if an active 'tap' transition is taking place.\n                if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\n                    return false;\n                }\n                // Ignore right or middle clicks on start #454\n                if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\n                    return false;\n                }\n                // Ignore right or middle clicks on start #454\n                if (data.hover && e.buttons) {\n                    return false;\n                }\n                // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\n                // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\n                // touch-action: manipulation, but that allows panning, which breaks\n                // sliders after zooming/on non-responsive pages.\n                // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n                if (!supportsPassive) {\n                    e.preventDefault();\n                }\n                e.calcPoint = e.points[options.ort];\n                // Call the event handler with the event [ and additional data ].\n                callback(e, data);\n            };\n            var methods = [];\n            // Bind a closure on the target for every event type.\n            events.split(\" \").forEach(function (eventName) {\n                element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);\n                methods.push([eventName, method]);\n            });\n            return methods;\n        }\n        // Provide a clean event with standardized offset values.\n        function fixEvent(e, pageOffset, eventTarget) {\n            // Filter the event to register the type, which can be\n            // touch, mouse or pointer. Offset changes need to be\n            // made on an event specific basis.\n            var touch = e.type.indexOf(\"touch\") === 0;\n            var mouse = e.type.indexOf(\"mouse\") === 0;\n            var pointer = e.type.indexOf(\"pointer\") === 0;\n            var x;\n            var y;\n            // IE10 implemented pointer events with a prefix;\n            if (e.type.indexOf(\"MSPointer\") === 0) {\n                pointer = true;\n            }\n            // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n            // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n            // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n            if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n                return false;\n            }\n            // The only thing one handle should be concerned about is the touches that originated on top of it.\n            if (touch) {\n                // Returns true if a touch originated on the target.\n                var isTouchOnTarget = function (checkTouch) {\n                    return (checkTouch.target === eventTarget ||\n                        eventTarget.contains(checkTouch.target) ||\n                        (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget)));\n                };\n                // In the case of touchstart events, we need to make sure there is still no more than one\n                // touch on the target so we look amongst all touches.\n                if (e.type === \"touchstart\") {\n                    var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n                    // Do not support more than one touch per handle.\n                    if (targetTouches.length > 1) {\n                        return false;\n                    }\n                    x = targetTouches[0].pageX;\n                    y = targetTouches[0].pageY;\n                }\n                else {\n                    // In the other cases, find on changedTouches is enough.\n                    var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n                    // Cancel if the target touch has not moved.\n                    if (!targetTouch) {\n                        return false;\n                    }\n                    x = targetTouch.pageX;\n                    y = targetTouch.pageY;\n                }\n            }\n            pageOffset = pageOffset || getPageOffset(scope_Document);\n            if (mouse || pointer) {\n                x = e.clientX + pageOffset.x;\n                y = e.clientY + pageOffset.y;\n            }\n            e.pageOffset = pageOffset;\n            e.points = [x, y];\n            e.cursor = mouse || pointer; // Fix #435\n            return e;\n        }\n        // Translate a coordinate in the document to a percentage on the slider\n        function calcPointToPercentage(calcPoint) {\n            var location = calcPoint - offset(scope_Base, options.ort);\n            var proposal = (location * 100) / baseSize();\n            // Clamp proposal between 0% and 100%\n            // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n            // are used (e.g. contained handles feature)\n            proposal = limit(proposal);\n            return options.dir ? 100 - proposal : proposal;\n        }\n        // Find handle closest to a certain percentage on the slider\n        function getClosestHandle(clickedPosition) {\n            var smallestDifference = 100;\n            var handleNumber = false;\n            scope_Handles.forEach(function (handle, index) {\n                // Disabled handles are ignored\n                if (isHandleDisabled(index)) {\n                    return;\n                }\n                var handlePosition = scope_Locations[index];\n                var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);\n                // Initial state\n                var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;\n                // Difference with this handle is smaller than the previously checked handle\n                var isCloser = differenceWithThisHandle < smallestDifference;\n                var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;\n                if (isCloser || isCloserAfter || clickAtEdge) {\n                    handleNumber = index;\n                    smallestDifference = differenceWithThisHandle;\n                }\n            });\n            return handleNumber;\n        }\n        // Fire 'end' when a mouse or pen leaves the document.\n        function documentLeave(event, data) {\n            if (event.type === \"mouseout\" && event.target.nodeName === \"HTML\" && event.relatedTarget === null) {\n                eventEnd(event, data);\n            }\n        }\n        // Handle movement on document for handle and range drag.\n        function eventMove(event, data) {\n            // Fix #498\n            // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n            // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n            // IE9 has .buttons and .which zero on mousemove.\n            // Firefox breaks the spec MDN defines.\n            if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n                return eventEnd(event, data);\n            }\n            // Check if we are moving up or down\n            var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n            // Convert the movement into a percentage of the slider width/height\n            var proposal = (movement * 100) / data.baseSize;\n            moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n        }\n        // Unbind move events on document, call callbacks.\n        function eventEnd(event, data) {\n            // The handle is no longer active, so remove the class.\n            if (data.handle) {\n                removeClass(data.handle, options.cssClasses.active);\n                scope_ActiveHandlesCount -= 1;\n            }\n            // Unbind the move and end events, which are added on 'start'.\n            data.listeners.forEach(function (c) {\n                scope_DocumentElement.removeEventListener(c[0], c[1]);\n            });\n            if (scope_ActiveHandlesCount === 0) {\n                // Remove dragging class.\n                removeClass(scope_Target, options.cssClasses.drag);\n                setZindex();\n                // Remove cursor styles and text-selection events bound to the body.\n                if (event.cursor) {\n                    scope_Body.style.cursor = \"\";\n                    scope_Body.removeEventListener(\"selectstart\", preventDefault);\n                }\n            }\n            data.handleNumbers.forEach(function (handleNumber) {\n                fireEvent(\"change\", handleNumber);\n                fireEvent(\"set\", handleNumber);\n                fireEvent(\"end\", handleNumber);\n            });\n        }\n        // Bind move events on document.\n        function eventStart(event, data) {\n            // Ignore event if any handle is disabled\n            if (data.handleNumbers.some(isHandleDisabled)) {\n                return false;\n            }\n            var handle;\n            if (data.handleNumbers.length === 1) {\n                var handleOrigin = scope_Handles[data.handleNumbers[0]];\n                handle = handleOrigin.children[0];\n                scope_ActiveHandlesCount += 1;\n                // Mark the handle as 'active' so it can be styled.\n                addClass(handle, options.cssClasses.active);\n            }\n            // A drag should never propagate up to the 'tap' event.\n            event.stopPropagation();\n            // Record the event listeners.\n            var listeners = [];\n            // Attach the move and end events.\n            var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n                // The event target has changed so we need to propagate the original one so that we keep\n                // relying on it to extract target touches.\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                startCalcPoint: event.calcPoint,\n                baseSize: baseSize(),\n                pageOffset: event.pageOffset,\n                handleNumbers: data.handleNumbers,\n                buttonsProperty: event.buttons,\n                locations: scope_Locations.slice()\n            });\n            var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                doNotReject: true,\n                handleNumbers: data.handleNumbers\n            });\n            var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                doNotReject: true,\n                handleNumbers: data.handleNumbers\n            });\n            // We want to make sure we pushed the listeners in the listener list rather than creating\n            // a new one as it has already been passed to the event handlers.\n            listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n            // Text selection isn't an issue on touch devices,\n            // so adding cursor styles can be skipped.\n            if (event.cursor) {\n                // Prevent the 'I' cursor and extend the range-drag cursor.\n                scope_Body.style.cursor = getComputedStyle(event.target).cursor;\n                // Mark the target with a dragging state.\n                if (scope_Handles.length > 1) {\n                    addClass(scope_Target, options.cssClasses.drag);\n                }\n                // Prevent text selection when dragging the handles.\n                // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n                // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n                // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n                // The 'cursor' flag is false.\n                // See: http://caniuse.com/#search=selectstart\n                scope_Body.addEventListener(\"selectstart\", preventDefault, false);\n            }\n            data.handleNumbers.forEach(function (handleNumber) {\n                fireEvent(\"start\", handleNumber);\n            });\n        }\n        // Move closest handle to tapped location.\n        function eventTap(event) {\n            // The tap event shouldn't propagate up\n            event.stopPropagation();\n            var proposal = calcPointToPercentage(event.calcPoint);\n            var handleNumber = getClosestHandle(proposal);\n            // Tackle the case that all handles are 'disabled'.\n            if (handleNumber === false) {\n                return false;\n            }\n            // Flag the slider as it is now in a transitional state.\n            // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n            if (!options.events.snap) {\n                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n            }\n            setHandle(handleNumber, proposal, true, true);\n            setZindex();\n            fireEvent(\"slide\", handleNumber, true);\n            fireEvent(\"update\", handleNumber, true);\n            fireEvent(\"change\", handleNumber, true);\n            fireEvent(\"set\", handleNumber, true);\n            if (options.events.snap) {\n                eventStart(event, { handleNumbers: [handleNumber] });\n            }\n        }\n        // Fires a 'hover' event for a hovered mouse/pen position.\n        function eventHover(event) {\n            var proposal = calcPointToPercentage(event.calcPoint);\n            var to = scope_Spectrum.getStep(proposal);\n            var value = scope_Spectrum.fromStepping(to);\n            Object.keys(scope_Events).forEach(function (targetEvent) {\n                if (\"hover\" === targetEvent.split(\".\")[0]) {\n                    scope_Events[targetEvent].forEach(function (callback) {\n                        callback.call(scope_Self, value);\n                    });\n                }\n            });\n        }\n        // Handles keydown on focused handles\n        // Don't move the document when pressing arrow keys on focused handles\n        function eventKeydown(event, handleNumber) {\n            if (isSliderDisabled() || isHandleDisabled(handleNumber)) {\n                return false;\n            }\n            var horizontalKeys = [\"Left\", \"Right\"];\n            var verticalKeys = [\"Down\", \"Up\"];\n            var largeStepKeys = [\"PageDown\", \"PageUp\"];\n            var edgeKeys = [\"Home\", \"End\"];\n            if (options.dir && !options.ort) {\n                // On an right-to-left slider, the left and right keys act inverted\n                horizontalKeys.reverse();\n            }\n            else if (options.ort && !options.dir) {\n                // On a top-to-bottom slider, the up and down keys act inverted\n                verticalKeys.reverse();\n                largeStepKeys.reverse();\n            }\n            // Strip \"Arrow\" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n            var key = event.key.replace(\"Arrow\", \"\");\n            var isLargeDown = key === largeStepKeys[0];\n            var isLargeUp = key === largeStepKeys[1];\n            var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;\n            var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;\n            var isMin = key === edgeKeys[0];\n            var isMax = key === edgeKeys[1];\n            if (!isDown && !isUp && !isMin && !isMax) {\n                return true;\n            }\n            event.preventDefault();\n            var to;\n            if (isUp || isDown) {\n                var multiplier = options.keyboardPageMultiplier;\n                var direction = isDown ? 0 : 1;\n                var steps = getNextStepsForHandle(handleNumber);\n                var step = steps[direction];\n                // At the edge of a slider, do nothing\n                if (step === null) {\n                    return false;\n                }\n                // No step set, use the default of 10% of the sub-range\n                if (step === false) {\n                    step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);\n                }\n                if (isLargeUp || isLargeDown) {\n                    step *= multiplier;\n                }\n                // Step over zero-length ranges (#948);\n                step = Math.max(step, 0.0000001);\n                // Decrement for down steps\n                step = (isDown ? -1 : 1) * step;\n                to = scope_Values[handleNumber] + step;\n            }\n            else if (isMax) {\n                // End key\n                to = options.spectrum.xVal[options.spectrum.xVal.length - 1];\n            }\n            else {\n                // Home key\n                to = options.spectrum.xVal[0];\n            }\n            setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n            fireEvent(\"slide\", handleNumber);\n            fireEvent(\"update\", handleNumber);\n            fireEvent(\"change\", handleNumber);\n            fireEvent(\"set\", handleNumber);\n            return false;\n        }\n        // Attach events to several slider parts.\n        function bindSliderEvents(behaviour) {\n            // Attach the standard drag event to the handles.\n            if (!behaviour.fixed) {\n                scope_Handles.forEach(function (handle, index) {\n                    // These events are only bound to the visual handle\n                    // element, not the 'real' origin element.\n                    attachEvent(actions.start, handle.children[0], eventStart, {\n                        handleNumbers: [index]\n                    });\n                });\n            }\n            // Attach the tap event to the slider base.\n            if (behaviour.tap) {\n                attachEvent(actions.start, scope_Base, eventTap, {});\n            }\n            // Fire hover events\n            if (behaviour.hover) {\n                attachEvent(actions.move, scope_Base, eventHover, {\n                    hover: true\n                });\n            }\n            // Make the range draggable.\n            if (behaviour.drag) {\n                scope_Connects.forEach(function (connect, index) {\n                    if (connect === false || index === 0 || index === scope_Connects.length - 1) {\n                        return;\n                    }\n                    var handleBefore = scope_Handles[index - 1];\n                    var handleAfter = scope_Handles[index];\n                    var eventHolders = [connect];\n                    addClass(connect, options.cssClasses.draggable);\n                    // When the range is fixed, the entire range can\n                    // be dragged by the handles. The handle in the first\n                    // origin will propagate the start event upward,\n                    // but it needs to be bound manually on the other.\n                    if (behaviour.fixed) {\n                        eventHolders.push(handleBefore.children[0]);\n                        eventHolders.push(handleAfter.children[0]);\n                    }\n                    eventHolders.forEach(function (eventHolder) {\n                        attachEvent(actions.start, eventHolder, eventStart, {\n                            handles: [handleBefore, handleAfter],\n                            handleNumbers: [index - 1, index]\n                        });\n                    });\n                });\n            }\n        }\n        // Attach an event to this slider, possibly including a namespace\n        function bindEvent(namespacedEvent, callback) {\n            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\n            scope_Events[namespacedEvent].push(callback);\n            // If the event bound is 'update,' fire it immediately for all handles.\n            if (namespacedEvent.split(\".\")[0] === \"update\") {\n                scope_Handles.forEach(function (a, index) {\n                    fireEvent(\"update\", index);\n                });\n            }\n        }\n        function isInternalNamespace(namespace) {\n            return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;\n        }\n        // Undo attachment of event\n        function removeEvent(namespacedEvent) {\n            var event = namespacedEvent && namespacedEvent.split(\".\")[0];\n            var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;\n            Object.keys(scope_Events).forEach(function (bind) {\n                var tEvent = bind.split(\".\")[0];\n                var tNamespace = bind.substring(tEvent.length);\n                if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\n                    // only delete protected internal event if intentional\n                    if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {\n                        delete scope_Events[bind];\n                    }\n                }\n            });\n        }\n        // External event handling\n        function fireEvent(eventName, handleNumber, tap) {\n            Object.keys(scope_Events).forEach(function (targetEvent) {\n                var eventType = targetEvent.split(\".\")[0];\n                if (eventName === eventType) {\n                    scope_Events[targetEvent].forEach(function (callback) {\n                        callback.call(\n                        // Use the slider public API as the scope ('this')\n                        scope_Self, \n                        // Return values as array, so arg_1[arg_2] is always valid.\n                        scope_Values.map(options.format.to), \n                        // Handle index, 0 or 1\n                        handleNumber, \n                        // Un-formatted slider values\n                        scope_Values.slice(), \n                        // Event is fired by tap, true or false\n                        tap || false, \n                        // Left offset of the handle, in relation to the slider\n                        scope_Locations.slice(), \n                        // add the slider public API to an accessible parameter when this is unavailable\n                        scope_Self);\n                    });\n                }\n            });\n        }\n        // Split out the handle positioning logic so the Move event can use it, too\n        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {\n            var distance;\n            // For sliders with multiple handles, limit movement to the other handle.\n            // Apply the margin option by adding it to the handle positions.\n            if (scope_Handles.length > 1 && !options.events.unconstrained) {\n                if (lookBackward && handleNumber > 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, 0);\n                    to = Math.max(to, distance);\n                }\n                if (lookForward && handleNumber < scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, 1);\n                    to = Math.min(to, distance);\n                }\n            }\n            // The limit option has the opposite effect, limiting handles to a\n            // maximum distance from another. Limit must be > 0, as otherwise\n            // handles would be unmovable.\n            if (scope_Handles.length > 1 && options.limit) {\n                if (lookBackward && handleNumber > 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, 0);\n                    to = Math.min(to, distance);\n                }\n                if (lookForward && handleNumber < scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, 1);\n                    to = Math.max(to, distance);\n                }\n            }\n            // The padding option keeps the handles a certain distance from the\n            // edges of the slider. Padding must be > 0.\n            if (options.padding) {\n                if (handleNumber === 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], 0);\n                    to = Math.max(to, distance);\n                }\n                if (handleNumber === scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], 1);\n                    to = Math.min(to, distance);\n                }\n            }\n            to = scope_Spectrum.getStep(to);\n            // Limit percentage to the 0 - 100 range\n            to = limit(to);\n            // Return false if handle can't move\n            if (to === reference[handleNumber] && !getValue) {\n                return false;\n            }\n            return to;\n        }\n        // Uses slider orientation to create CSS rules. a = base value;\n        function inRuleOrder(v, a) {\n            var o = options.ort;\n            return (o ? a : v) + \", \" + (o ? v : a);\n        }\n        // Moves handle(s) by a percentage\n        // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n        function moveHandles(upward, proposal, locations, handleNumbers) {\n            var proposals = locations.slice();\n            var b = [!upward, upward];\n            var f = [upward, !upward];\n            // Copy handleNumbers so we don't change the dataset\n            handleNumbers = handleNumbers.slice();\n            // Check to see which handle is 'leading'.\n            // If that one can't move the second can't either.\n            if (upward) {\n                handleNumbers.reverse();\n            }\n            // Step 1: get the maximum percentage that any of the handles can move\n            if (handleNumbers.length > 1) {\n                handleNumbers.forEach(function (handleNumber, o) {\n                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);\n                    // Stop if one of the handles can't move.\n                    if (to === false) {\n                        proposal = 0;\n                    }\n                    else {\n                        proposal = to - proposals[handleNumber];\n                        proposals[handleNumber] = to;\n                    }\n                });\n            }\n            // If using one handle, check backward AND forward\n            else {\n                b = f = [true];\n            }\n            var state = false;\n            // Step 2: Try to set the handles with the found percentage\n            handleNumbers.forEach(function (handleNumber, o) {\n                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;\n            });\n            // Step 3: If a handle moved, fire events\n            if (state) {\n                handleNumbers.forEach(function (handleNumber) {\n                    fireEvent(\"update\", handleNumber);\n                    fireEvent(\"slide\", handleNumber);\n                });\n            }\n        }\n        // Takes a base value and an offset. This offset is used for the connect bar size.\n        // In the initial design for this feature, the origin element was 1% wide.\n        // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n        // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n        function transformDirection(a, b) {\n            return options.dir ? 100 - a - b : a;\n        }\n        // Updates scope_Locations and scope_Values, updates visual state\n        function updateHandlePosition(handleNumber, to) {\n            // Update locations.\n            scope_Locations[handleNumber] = to;\n            // Convert the value to the slider stepping/range.\n            scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\n            var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);\n            var translateRule = \"translate(\" + inRuleOrder(translation + \"%\", \"0\") + \")\";\n            scope_Handles[handleNumber].style[options.transformRule] = translateRule;\n            updateConnect(handleNumber);\n            updateConnect(handleNumber + 1);\n        }\n        // Handles before the slider middle are stacked later = higher,\n        // Handles after the middle later is lower\n        // [[7] [8] .......... | .......... [5] [4]\n        function setZindex() {\n            scope_HandleNumbers.forEach(function (handleNumber) {\n                var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\n                var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\n                scope_Handles[handleNumber].style.zIndex = zIndex;\n            });\n        }\n        // Test suggested values and apply margin, step.\n        // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)\n        function setHandle(handleNumber, to, lookBackward, lookForward, exactInput) {\n            if (!exactInput) {\n                to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);\n            }\n            if (to === false) {\n                return false;\n            }\n            updateHandlePosition(handleNumber, to);\n            return true;\n        }\n        // Updates style attribute for connect nodes\n        function updateConnect(index) {\n            // Skip connects set to false\n            if (!scope_Connects[index]) {\n                return;\n            }\n            var l = 0;\n            var h = 100;\n            if (index !== 0) {\n                l = scope_Locations[index - 1];\n            }\n            if (index !== scope_Connects.length - 1) {\n                h = scope_Locations[index];\n            }\n            // We use two rules:\n            // 'translate' to change the left/top offset;\n            // 'scale' to change the width of the element;\n            // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n            var connectWidth = h - l;\n            var translateRule = \"translate(\" + inRuleOrder(transformDirection(l, connectWidth) + \"%\", \"0\") + \")\";\n            var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\n            scope_Connects[index].style[options.transformRule] = translateRule + \" \" + scaleRule;\n        }\n        // Parses value passed to .set method. Returns current value if not parse-able.\n        function resolveToValue(to, handleNumber) {\n            // Setting with null indicates an 'ignore'.\n            // Inputting 'false' is invalid.\n            if (to === null || to === false || to === undefined) {\n                return scope_Locations[handleNumber];\n            }\n            // If a formatted number was passed, attempt to decode it.\n            if (typeof to === \"number\") {\n                to = String(to);\n            }\n            to = options.format.from(to);\n            to = scope_Spectrum.toStepping(to);\n            // If parsing the number failed, use the current value.\n            if (to === false || isNaN(to)) {\n                return scope_Locations[handleNumber];\n            }\n            return to;\n        }\n        // Set the slider value.\n        function valueSet(input, fireSetEvent, exactInput) {\n            var values = asArray(input);\n            var isInit = scope_Locations[0] === undefined;\n            // Event fires by default\n            fireSetEvent = fireSetEvent === undefined ? true : !!fireSetEvent;\n            // Animation is optional.\n            // Make sure the initial values were set before using animated placement.\n            if (options.animate && !isInit) {\n                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n            }\n            // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n            scope_HandleNumbers.forEach(function (handleNumber) {\n                setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);\n            });\n            var i = scope_HandleNumbers.length === 1 ? 0 : 1;\n            // Secondary passes. Now that all base values are set, apply constraints.\n            // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n            for (; i < scope_HandleNumbers.length; ++i) {\n                scope_HandleNumbers.forEach(function (handleNumber) {\n                    setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);\n                });\n            }\n            setZindex();\n            scope_HandleNumbers.forEach(function (handleNumber) {\n                fireEvent(\"update\", handleNumber);\n                // Fire the event only for handles that received a new value, as per #579\n                if (values[handleNumber] !== null && fireSetEvent) {\n                    fireEvent(\"set\", handleNumber);\n                }\n            });\n        }\n        // Reset slider to initial values\n        function valueReset(fireSetEvent) {\n            valueSet(options.start, fireSetEvent);\n        }\n        // Set value for a single handle\n        function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {\n            // Ensure numeric input\n            handleNumber = Number(handleNumber);\n            if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): invalid handle number, got: \" + handleNumber);\n            }\n            // Look both backward and forward, since we don't want this handle to \"push\" other handles (#960);\n            // The exactInput argument can be used to ignore slider stepping (#436)\n            setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);\n            fireEvent(\"update\", handleNumber);\n            if (fireSetEvent) {\n                fireEvent(\"set\", handleNumber);\n            }\n        }\n        // Get the slider value.\n        function valueGet() {\n            var values = scope_Values.map(options.format.to);\n            // If only one handle is used, return a single value.\n            if (values.length === 1) {\n                return values[0];\n            }\n            return values;\n        }\n        // Removes classes from the root and empties it.\n        function destroy() {\n            // remove protected internal listeners\n            removeEvent(INTERNAL_EVENT_NS.aria);\n            removeEvent(INTERNAL_EVENT_NS.tooltips);\n            for (var key in options.cssClasses) {\n                if (!options.cssClasses.hasOwnProperty(key)) {\n                    continue;\n                }\n                removeClass(scope_Target, options.cssClasses[key]);\n            }\n            while (scope_Target.firstChild) {\n                scope_Target.removeChild(scope_Target.firstChild);\n            }\n            delete scope_Target.noUiSlider;\n        }\n        function getNextStepsForHandle(handleNumber) {\n            var location = scope_Locations[handleNumber];\n            var nearbySteps = scope_Spectrum.getNearbySteps(location);\n            var value = scope_Values[handleNumber];\n            var increment = nearbySteps.thisStep.step;\n            var decrement = null;\n            // If snapped, directly use defined step value\n            if (options.snap) {\n                return [\n                    value - nearbySteps.stepBefore.startValue || null,\n                    nearbySteps.stepAfter.startValue - value || null\n                ];\n            }\n            // If the next value in this step moves into the next step,\n            // the increment is the start of the next step - the current value\n            if (increment !== false) {\n                if (value + increment > nearbySteps.stepAfter.startValue) {\n                    increment = nearbySteps.stepAfter.startValue - value;\n                }\n            }\n            // If the value is beyond the starting point\n            if (value > nearbySteps.thisStep.startValue) {\n                decrement = nearbySteps.thisStep.step;\n            }\n            else if (nearbySteps.stepBefore.step === false) {\n                decrement = false;\n            }\n            // If a handle is at the start of a step, it always steps back into the previous step first\n            else {\n                decrement = value - nearbySteps.stepBefore.highestStep;\n            }\n            // Now, if at the slider edges, there is no in/decrement\n            if (location === 100) {\n                increment = null;\n            }\n            else if (location === 0) {\n                decrement = null;\n            }\n            // As per #391, the comparison for the decrement step can have some rounding issues.\n            var stepDecimals = scope_Spectrum.countStepDecimals();\n            // Round per #391\n            if (increment !== null && increment !== false) {\n                increment = Number(increment.toFixed(stepDecimals));\n            }\n            if (decrement !== null && decrement !== false) {\n                decrement = Number(decrement.toFixed(stepDecimals));\n            }\n            return [decrement, increment];\n        }\n        // Get the current step size for the slider.\n        function getNextSteps() {\n            return scope_HandleNumbers.map(getNextStepsForHandle);\n        }\n        // Updateable: margin, limit, padding, step, range, animate, snap\n        function updateOptions(optionsToUpdate, fireSetEvent) {\n            // Spectrum is created using the range, snap, direction and step options.\n            // 'snap' and 'step' can be updated.\n            // If 'snap' and 'step' are not passed, they should remain unchanged.\n            var v = valueGet();\n            var updateAble = [\n                \"margin\",\n                \"limit\",\n                \"padding\",\n                \"range\",\n                \"animate\",\n                \"snap\",\n                \"step\",\n                \"format\",\n                \"pips\",\n                \"tooltips\"\n            ];\n            // Only change options that we're actually passed to update.\n            updateAble.forEach(function (name) {\n                // Check for undefined. null removes the value.\n                if (optionsToUpdate[name] !== undefined) {\n                    originalOptions[name] = optionsToUpdate[name];\n                }\n            });\n            var newOptions = testOptions(originalOptions);\n            // Load new options into the slider state\n            updateAble.forEach(function (name) {\n                if (optionsToUpdate[name] !== undefined) {\n                    options[name] = newOptions[name];\n                }\n            });\n            scope_Spectrum = newOptions.spectrum;\n            // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n            options.margin = newOptions.margin;\n            options.limit = newOptions.limit;\n            options.padding = newOptions.padding;\n            // Update pips, removes existing.\n            if (options.pips) {\n                pips(options.pips);\n            }\n            else {\n                removePips();\n            }\n            // Update tooltips, removes existing.\n            if (options.tooltips) {\n                tooltips();\n            }\n            else {\n                removeTooltips();\n            }\n            // Invalidate the current positioning so valueSet forces an update.\n            scope_Locations = [];\n            valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);\n        }\n        // Initialization steps\n        function setupSlider() {\n            // Create the base element, initialize HTML and set classes.\n            // Add handles and connect elements.\n            scope_Base = addSlider(scope_Target);\n            addElements(options.connect, scope_Base);\n            // Attach user events.\n            bindSliderEvents(options.events);\n            // Use the public value method to set the start values.\n            valueSet(options.start);\n            if (options.pips) {\n                pips(options.pips);\n            }\n            if (options.tooltips) {\n                tooltips();\n            }\n            aria();\n        }\n        setupSlider();\n        // noinspection JSUnusedGlobalSymbols\n        scope_Self = {\n            destroy: destroy,\n            steps: getNextSteps,\n            on: bindEvent,\n            off: removeEvent,\n            get: valueGet,\n            set: valueSet,\n            setHandle: valueSetHandle,\n            reset: valueReset,\n            // Exposed for unit testing, don't use this in your application.\n            __moveHandles: function (a, b, c) {\n                moveHandles(a, b, scope_Locations, c);\n            },\n            options: originalOptions,\n            updateOptions: updateOptions,\n            target: scope_Target,\n            removePips: removePips,\n            removeTooltips: removeTooltips,\n            getTooltips: function () {\n                return scope_Tooltips;\n            },\n            getOrigins: function () {\n                return scope_Handles;\n            },\n            pips: pips // Issue #594\n        };\n        return scope_Self;\n    }\n    // Run the standard initializer\n    function initialize(target, originalOptions) {\n        if (!target || !target.nodeName) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): create requires a single element, got: \" + target);\n        }\n        // Throw an error if the slider was already initialized.\n        if (target.noUiSlider) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): Slider was already initialized.\");\n        }\n        // Test the options and create the slider environment;\n        var options = testOptions(originalOptions);\n        var api = scope(target, options, originalOptions);\n        target.noUiSlider = api;\n        return api;\n    }\n    // Use an object instead of a function for future expandability;\n    return {\n        // Exposed for unit testing, don't use this in your application.\n        __spectrum: Spectrum,\n        version: VERSION,\n        // A reference to the default classes, allows global changes.\n        // Use the cssClasses option for changes to one slider.\n        cssClasses: cssClasses,\n        create: initialize\n    };\n});\n","import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport { AppModule } from './app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector, ExternalReference, Identifiers, getUrlScheme, syntaxError} from '@angular/compiler';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ElementRef, Injector, LOCALE_ID, NgModuleFactory, NgModuleRef, QueryList, Renderer, Renderer2, SecurityContext, TRANSLATIONS_FORMAT, TemplateRef, ViewContainerRef, ViewEncapsulation, ÉµCodegenComponentFactoryResolver, ÉµEMPTY_ARRAY, ÉµEMPTY_MAP, ÉµReflectionCapabilities as ReflectionCapabilities, Éµand, Éµccf, Éµcmf, Éµcrt, Éµdid, Éµeld, ÉµinlineInterpolate, Éµinterpolate, Éµmod, Éµmpd, Éµncd, Éµnov, Éµpad, Éµpid, Éµpod, Éµppd, Éµprd, Éµqud, ÉµregisterModuleFactory, Éµstringify as stringify, Éµted, Éµunv, Éµvid} from '@angular/core';\n\nexport const MODULE_SUFFIX = '';\nconst builtinExternalReferences = createBuiltinExternalReferencesMap();\n\nexport class JitReflector implements CompileReflector {\n  private reflectionCapabilities = new ReflectionCapabilities();\n\n  componentModuleUrl(type: any, cmpMetadata: Component): string {\n    const moduleId = cmpMetadata.moduleId;\n\n    if (typeof moduleId === 'string') {\n      const scheme = getUrlScheme(moduleId);\n      return scheme ? moduleId : `package:${moduleId}${MODULE_SUFFIX}`;\n    } else if (moduleId !== null && moduleId !== void 0) {\n      throw syntaxError(\n          `moduleId should be a string in \"${stringify(type)}\". See https://goo.gl/wIDDiL for more information.\\n` +\n          `If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.`);\n    }\n\n    return `./${stringify(type)}`;\n  }\n  parameters(typeOrFunc: /*Type*/ any): any[][] {\n    return this.reflectionCapabilities.parameters(typeOrFunc);\n  }\n  tryAnnotations(typeOrFunc: /*Type*/ any): any[] { return this.annotations(typeOrFunc); }\n  annotations(typeOrFunc: /*Type*/ any): any[] {\n    return this.reflectionCapabilities.annotations(typeOrFunc);\n  }\n  shallowAnnotations(typeOrFunc: /*Type*/ any): any[] {\n    throw new Error('Not supported in JIT mode');\n  }\n  propMetadata(typeOrFunc: /*Type*/ any): {[key: string]: any[]} {\n    return this.reflectionCapabilities.propMetadata(typeOrFunc);\n  }\n  hasLifecycleHook(type: any, lcProperty: string): boolean {\n    return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n  }\n  guards(type: any): {[key: string]: any} { return this.reflectionCapabilities.guards(type); }\n  resolveExternalReference(ref: ExternalReference): any {\n    return builtinExternalReferences.get(ref) || ref.runtime;\n  }\n}\n\n\nfunction createBuiltinExternalReferencesMap() {\n  const map = new Map<ExternalReference, any>();\n  map.set(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS, ANALYZE_FOR_ENTRY_COMPONENTS);\n  map.set(Identifiers.ElementRef, ElementRef);\n  map.set(Identifiers.NgModuleRef, NgModuleRef);\n  map.set(Identifiers.ViewContainerRef, ViewContainerRef);\n  map.set(Identifiers.ChangeDetectorRef, ChangeDetectorRef);\n  map.set(Identifiers.Renderer2, Renderer2);\n  map.set(Identifiers.QueryList, QueryList);\n  map.set(Identifiers.TemplateRef, TemplateRef);\n  map.set(Identifiers.CodegenComponentFactoryResolver, ÉµCodegenComponentFactoryResolver);\n  map.set(Identifiers.ComponentFactoryResolver, ComponentFactoryResolver);\n  map.set(Identifiers.ComponentFactory, ComponentFactory);\n  map.set(Identifiers.ComponentRef, ComponentRef);\n  map.set(Identifiers.NgModuleFactory, NgModuleFactory);\n  map.set(Identifiers.createModuleFactory, Éµcmf);\n  map.set(Identifiers.moduleDef, Éµmod);\n  map.set(Identifiers.moduleProviderDef, Éµmpd);\n  map.set(Identifiers.RegisterModuleFactoryFn, ÉµregisterModuleFactory);\n  map.set(Identifiers.Injector, Injector);\n  map.set(Identifiers.ViewEncapsulation, ViewEncapsulation);\n  map.set(Identifiers.ChangeDetectionStrategy, ChangeDetectionStrategy);\n  map.set(Identifiers.SecurityContext, SecurityContext);\n  map.set(Identifiers.LOCALE_ID, LOCALE_ID);\n  map.set(Identifiers.TRANSLATIONS_FORMAT, TRANSLATIONS_FORMAT);\n  map.set(Identifiers.inlineInterpolate, ÉµinlineInterpolate);\n  map.set(Identifiers.interpolate, Éµinterpolate);\n  map.set(Identifiers.EMPTY_ARRAY, ÉµEMPTY_ARRAY);\n  map.set(Identifiers.EMPTY_MAP, ÉµEMPTY_MAP);\n  map.set(Identifiers.Renderer, Renderer);\n  map.set(Identifiers.viewDef, Éµvid);\n  map.set(Identifiers.elementDef, Éµeld);\n  map.set(Identifiers.anchorDef, Éµand);\n  map.set(Identifiers.textDef, Éµted);\n  map.set(Identifiers.directiveDef, Éµdid);\n  map.set(Identifiers.providerDef, Éµprd);\n  map.set(Identifiers.queryDef, Éµqud);\n  map.set(Identifiers.pureArrayDef, Éµpad);\n  map.set(Identifiers.pureObjectDef, Éµpod);\n  map.set(Identifiers.purePipeDef, Éµppd);\n  map.set(Identifiers.pipeDef, Éµpid);\n  map.set(Identifiers.nodeValue, Éµnov);\n  map.set(Identifiers.ngContentDef, Éµncd);\n  map.set(Identifiers.unwrapValue, Éµunv);\n  map.set(Identifiers.createRendererType2, Éµcrt);\n  map.set(Identifiers.createComponentFactory, Éµccf);\n  return map;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, CompilerFactory, ComponentFactory, CompilerOptions, ModuleWithComponentFactories, Inject, InjectionToken, Optional, PACKAGE_ROOT_URL, StaticProvider, TRANSLATIONS, Type, isDevMode, ÉµConsole as Console, ViewEncapsulation, Injector, NgModuleFactory, TRANSLATIONS_FORMAT, MissingTranslationStrategy,} from '@angular/core';\n\nimport {StaticSymbolCache, JitCompiler, ProviderMeta, I18NHtmlParser, ViewCompiler, CompileMetadataResolver, UrlResolver, TemplateParser, NgModuleCompiler, JitEvaluator, JitSummaryResolver, SummaryResolver, StyleCompiler, PipeResolver, ElementSchemaRegistry, DomElementSchemaRegistry, ResourceLoader, NgModuleResolver, HtmlParser, CompileReflector, CompilerConfig, DirectiveNormalizer, DirectiveResolver, Lexer, Parser} from '@angular/compiler';\n\nimport {JitReflector} from './compiler_reflector';\n\nexport const ERROR_COLLECTOR_TOKEN = new InjectionToken('ErrorCollector');\n\n/**\n * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.\n */\nexport const DEFAULT_PACKAGE_URL_PROVIDER = {\n  provide: PACKAGE_ROOT_URL,\n  useValue: '/'\n};\n\nconst _NO_RESOURCE_LOADER: ResourceLoader = {\n  get(url: string): Promise<string>{\n      throw new Error(\n          `No ResourceLoader implementation has been provided. Can't read the url \"${url}\"`);}\n};\n\nconst baseHtmlParser = new InjectionToken('HtmlParser');\n\nexport class CompilerImpl implements Compiler {\n  private _delegate: JitCompiler;\n  public readonly injector: Injector;\n  constructor(\n      injector: Injector, private _metadataResolver: CompileMetadataResolver,\n      templateParser: TemplateParser, styleCompiler: StyleCompiler, viewCompiler: ViewCompiler,\n      ngModuleCompiler: NgModuleCompiler, summaryResolver: SummaryResolver<Type<any>>,\n      compileReflector: CompileReflector, jitEvaluator: JitEvaluator,\n      compilerConfig: CompilerConfig, console: Console) {\n    this._delegate = new JitCompiler(\n        _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler,\n        summaryResolver, compileReflector, jitEvaluator, compilerConfig, console,\n        this.getExtraNgModuleProviders.bind(this));\n    this.injector = injector;\n  }\n\n  private getExtraNgModuleProviders() {\n    return [this._metadataResolver.getProviderMetadata(\n        new ProviderMeta(Compiler, {useValue: this}))];\n  }\n\n  compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n    return this._delegate.compileModuleSync(moduleType) as NgModuleFactory<T>;\n  }\n  compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n    return this._delegate.compileModuleAsync(moduleType) as Promise<NgModuleFactory<T>>;\n  }\n  compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n    const result = this._delegate.compileModuleAndAllComponentsSync(moduleType);\n    return {\n      ngModuleFactory: result.ngModuleFactory as NgModuleFactory<T>,\n      componentFactories: result.componentFactories as ComponentFactory<any>[],\n    };\n  }\n  compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>):\n      Promise<ModuleWithComponentFactories<T>> {\n    return this._delegate.compileModuleAndAllComponentsAsync(moduleType)\n        .then((result) => ({\n                ngModuleFactory: result.ngModuleFactory as NgModuleFactory<T>,\n                componentFactories: result.componentFactories as ComponentFactory<any>[],\n              }));\n  }\n  loadAotSummaries(summaries: () => any[]) { this._delegate.loadAotSummaries(summaries); }\n  hasAotSummary(ref: Type<any>): boolean { return this._delegate.hasAotSummary(ref); }\n  getComponentFactory<T>(component: Type<T>): ComponentFactory<T> {\n    return this._delegate.getComponentFactory(component) as ComponentFactory<T>;\n  }\n  clearCache(): void { this._delegate.clearCache(); }\n  clearCacheFor(type: Type<any>) { this._delegate.clearCacheFor(type); }\n  getModuleId(moduleType: Type<any>): string|undefined {\n    const meta = this._metadataResolver.getNgModuleMetadata(moduleType);\n    return meta && meta.id || undefined;\n  }\n}\n\n/**\n * A set of providers that provide `JitCompiler` and its dependencies to use for\n * template compilation.\n */\nexport const COMPILER_PROVIDERS = <StaticProvider[]>[\n  {provide: CompileReflector, useValue: new JitReflector()},\n  {provide: ResourceLoader, useValue: _NO_RESOURCE_LOADER},\n  {provide: JitSummaryResolver, deps: []},\n  {provide: SummaryResolver, useExisting: JitSummaryResolver},\n  {provide: Console, deps: []},\n  {provide: Lexer, deps: []},\n  {provide: Parser, deps: [Lexer]},\n  {\n    provide: baseHtmlParser,\n    useClass: HtmlParser,\n    deps: [],\n  },\n  {\n    provide: I18NHtmlParser,\n    useFactory: (parser: HtmlParser, translations: string | null, format: string,\n                 config: CompilerConfig, console: Console) => {\n      translations = translations || '';\n      const missingTranslation =\n          translations ? config.missingTranslation ! : MissingTranslationStrategy.Ignore;\n      return new I18NHtmlParser(parser, translations, format, missingTranslation, console);\n    },\n    deps: [\n      baseHtmlParser,\n      [new Optional(), new Inject(TRANSLATIONS)],\n      [new Optional(), new Inject(TRANSLATIONS_FORMAT)],\n      [CompilerConfig],\n      [Console],\n    ]\n  },\n  {\n    provide: HtmlParser,\n    useExisting: I18NHtmlParser,\n  },\n  {\n    provide: TemplateParser, deps: [CompilerConfig, CompileReflector,\n    Parser, ElementSchemaRegistry,\n    I18NHtmlParser, Console]\n  },\n  { provide: JitEvaluator, useClass: JitEvaluator, deps: [] },\n  { provide: DirectiveNormalizer, deps: [ResourceLoader, UrlResolver, HtmlParser, CompilerConfig]},\n  { provide: CompileMetadataResolver, deps: [CompilerConfig, HtmlParser, NgModuleResolver,\n                      DirectiveResolver, PipeResolver,\n                      SummaryResolver,\n                      ElementSchemaRegistry,\n                      DirectiveNormalizer, Console,\n                      [Optional, StaticSymbolCache],\n                      CompileReflector,\n                      [Optional, ERROR_COLLECTOR_TOKEN]]},\n  DEFAULT_PACKAGE_URL_PROVIDER,\n  { provide: StyleCompiler, deps: [UrlResolver]},\n  { provide: ViewCompiler, deps: [CompileReflector]},\n  { provide: NgModuleCompiler, deps: [CompileReflector] },\n  { provide: CompilerConfig, useValue: new CompilerConfig()},\n  { provide: Compiler, useClass: CompilerImpl, deps: [Injector, CompileMetadataResolver,\n                                TemplateParser, StyleCompiler,\n                                ViewCompiler, NgModuleCompiler,\n                                SummaryResolver, CompileReflector, JitEvaluator, CompilerConfig,\n                                Console]},\n  { provide: DomElementSchemaRegistry, deps: []},\n  { provide: ElementSchemaRegistry, useExisting: DomElementSchemaRegistry},\n  { provide: UrlResolver, deps: [PACKAGE_ROOT_URL]},\n  { provide: DirectiveResolver, deps: [CompileReflector]},\n  { provide: PipeResolver, deps: [CompileReflector]},\n  { provide: NgModuleResolver, deps: [CompileReflector]},\n];\n\n/**\n * @publicApi\n */\nexport class JitCompilerFactory implements CompilerFactory {\n  private _defaultOptions: CompilerOptions[];\n\n  /* @internal */\n  constructor(defaultOptions: CompilerOptions[]) {\n    const compilerOptions: CompilerOptions = {\n      useJit: true,\n      defaultEncapsulation: ViewEncapsulation.Emulated,\n      missingTranslation: MissingTranslationStrategy.Warning,\n    };\n\n    this._defaultOptions = [compilerOptions, ...defaultOptions];\n  }\n  createCompiler(options: CompilerOptions[] = []): Compiler {\n    const opts = _mergeOptions(this._defaultOptions.concat(options));\n    const injector = Injector.create([\n      COMPILER_PROVIDERS, {\n        provide: CompilerConfig,\n        useFactory: () => {\n          return new CompilerConfig({\n            // let explicit values from the compiler options overwrite options\n            // from the app providers\n            useJit: opts.useJit,\n            jitDevMode: isDevMode(),\n            // let explicit values from the compiler options overwrite options\n            // from the app providers\n            defaultEncapsulation: opts.defaultEncapsulation,\n            missingTranslation: opts.missingTranslation,\n            preserveWhitespaces: opts.preserveWhitespaces,\n          });\n        },\n        deps: []\n      },\n      opts.providers !\n    ]);\n    return injector.get(Compiler);\n  }\n}\n\nfunction _mergeOptions(optionsArr: CompilerOptions[]): CompilerOptions {\n  return {\n    useJit: _lastDefined(optionsArr.map(options => options.useJit)),\n    defaultEncapsulation: _lastDefined(optionsArr.map(options => options.defaultEncapsulation)),\n    providers: _mergeArrays(optionsArr.map(options => options.providers !)),\n    missingTranslation: _lastDefined(optionsArr.map(options => options.missingTranslation)),\n    preserveWhitespaces: _lastDefined(optionsArr.map(options => options.preserveWhitespaces)),\n  };\n}\n\nfunction _lastDefined<T>(args: T[]): T|undefined {\n  for (let i = args.length - 1; i >= 0; i--) {\n    if (args[i] !== undefined) {\n      return args[i];\n    }\n  }\n  return undefined;\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n  const result: any[] = [];\n  parts.forEach((part) => part && result.push(...part));\n  return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {COMPILER_OPTIONS, CompilerFactory, PlatformRef, StaticProvider, createPlatformFactory, platformCore} from '@angular/core';\nimport {JitCompilerFactory} from './compiler_factory';\n\n/**\n * A platform that included corePlatform and the compiler.\n *\n * @publicApi\n */\nexport const platformCoreDynamic = createPlatformFactory(platformCore, 'coreDynamic', [\n  {provide: COMPILER_OPTIONS, useValue: {}, multi: true},\n  {provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]},\n]);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ResourceLoader} from '@angular/compiler';\nimport {Injectable} from '@angular/core';\n\n\n@Injectable()\nexport class ResourceLoaderImpl extends ResourceLoader {\n  get(url: string): Promise<string> {\n    let resolve: (result: any) => void;\n    let reject: (error: any) => void;\n    const promise = new Promise<string>((res, rej) => {\n      resolve = res;\n      reject = rej;\n    });\n    const xhr = new XMLHttpRequest();\n    xhr.open('GET', url, true);\n    xhr.responseType = 'text';\n\n    xhr.onload = function() {\n      // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n      // response/responseType properties were introduced in ResourceLoader Level2 spec (supported\n      // by IE10)\n      const response = xhr.response || xhr.responseText;\n\n      // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n      let status = xhr.status === 1223 ? 204 : xhr.status;\n\n      // fix status code when it is 0 (0 status is undocumented).\n      // Occurs when accessing file resources or on Android 4.1 stock browser\n      // while retrieving files from application cache.\n      if (status === 0) {\n        status = response ? 200 : 0;\n      }\n\n      if (200 <= status && status <= 300) {\n        resolve(response);\n      } else {\n        reject(`Failed to load ${url}`);\n      }\n    };\n\n    xhr.onerror = function() { reject(`Failed to load ${url}`); };\n\n    xhr.send();\n    return promise;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ÉµPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID} from '@angular/common';\nimport {ResourceLoader} from '@angular/compiler';\nimport {COMPILER_OPTIONS, PLATFORM_ID, StaticProvider} from '@angular/core';\n\nimport {ÉµINTERNAL_BROWSER_PLATFORM_PROVIDERS as INTERNAL_BROWSER_PLATFORM_PROVIDERS} from '@angular/platform-browser';\n\nimport {ResourceLoaderImpl} from './resource_loader/resource_loader_impl';\n\n/**\n * @publicApi\n */\nexport const INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: StaticProvider[] = [\n  INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n  {\n    provide: COMPILER_OPTIONS,\n    useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl, deps: []}]},\n    multi: true\n  },\n  {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ResourceLoader} from '@angular/compiler';\nimport {Éµglobal as global} from '@angular/core';\n\n/**\n * An implementation of ResourceLoader that uses a template cache to avoid doing an actual\n * ResourceLoader.\n *\n * The template cache needs to be built and loaded into window.$templateCache\n * via a separate mechanism.\n *\n * @publicApi\n */\nexport class CachedResourceLoader extends ResourceLoader {\n  private _cache: {[url: string]: string};\n\n  constructor() {\n    super();\n    this._cache = (<any>global).$templateCache;\n    if (this._cache == null) {\n      throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');\n    }\n  }\n\n  get(url: string): Promise<string> {\n    if (this._cache.hasOwnProperty(url)) {\n      return Promise.resolve(this._cache[url]);\n    } else {\n      return <Promise<any>>Promise.reject(\n          'CachedResourceLoader: Did not find cached template for ' + url);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.2.14');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ResourceLoader} from '@angular/compiler';\nimport {CompilerFactory, PlatformRef, Provider, StaticProvider, createPlatformFactory, platformCore} from '@angular/core';\n\nimport {platformCoreDynamic} from './platform_core_dynamic';\nimport {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers';\nimport {CachedResourceLoader} from './resource_loader/resource_loader_cache';\n\nexport * from './private_export';\nexport {VERSION} from './version';\nexport {JitCompilerFactory} from './compiler_factory';\n\n/**\n * @publicApi\n */\nexport const RESOURCE_CACHE_PROVIDER: Provider[] =\n    [{provide: ResourceLoader, useClass: CachedResourceLoader, deps: []}];\n\n/**\n * @publicApi\n */\nexport const platformBrowserDynamic = createPlatformFactory(\n    platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);\n","import {NgModule} from \"@angular/core\";\nimport {CmAuthService} from \"./services/cm-auth.service\";\nimport {routing} from \"./app.routes\";\nimport {CmLogin} from \"./components/cm-login/cm-login.component\";\nimport {AppComponent} from \"./app.component\";\nimport {CmNoRolesComponent} from \"./components/cm-no-roles/cm-no-role.component\";\nimport {secComponents, secServicies} from \"./components/cm-main/cm-home.module\";\nimport {CmSharedModule} from \"./shared/shared.module\";\nimport {LocationStrategy, HashLocationStrategy} from \"@angular/common\";\nimport {CmPageNotFoundComponent} from \"./components/cm-error-page/cm-page-not-found.component\";\nimport {AgmCoreModule} from \"@agm/core\";\n\n@NgModule({\n  imports: [\n    routing,\n    CmSharedModule,\n    AgmCoreModule.forRoot({\n      apiKey: 'AIzaSyBQaeSDTl7e9p13PKgE7Qyq3z99zFKn_Xg'\n    })\n  ],\n  providers: [\n    CmAuthService,\n    {provide: LocationStrategy, useClass: HashLocationStrategy},\n    ...secServicies\n  ],\n  declarations: [\n    AppComponent,\n    CmLogin,\n    CmNoRolesComponent,\n    CmPageNotFoundComponent,\n    ...secComponents\n  ],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar rxjs_1 = require(\"rxjs\");\nexports.Subject = rxjs_1.Subject;\n//# sourceMappingURL=Subject.js.map","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nmodule.exports = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return map(objectKeys(obj), function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (isArray(obj[k])) {\n        return map(obj[k], function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n  if (xs.map) return xs.map(f);\n  var res = [];\n  for (var i = 0; i < xs.length; i++) {\n    res.push(f(xs[i], i));\n  }\n  return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n  var res = [];\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n  }\n  return res;\n};\n","import {Routes, RouterModule} from \"@angular/router\";\nimport {CmHome} from \"./components/cm-main/cm-home.component\";\nimport {CmLogin} from \"./components/cm-login/cm-login.component\";\nimport {mainRoutes} from \"./components/cm-main/cm-home.routes\";\nimport {CmGuardService} from \"./services/guards/cm-guard.service\";\nimport {ModuleWithProviders} from \"@angular/core\";\nimport {CmPageNotFoundComponent} from \"./components/cm-error-page/cm-page-not-found.component\";\n\nconst routes: Routes = [\n  {\n    path: '',\n    redirectTo: 'sec',\n    pathMatch: 'full'\n  },\n  {path : 'login', component: CmLogin},\n  {path: 'sec',\n    component: CmHome,\n    children: [\n      ...mainRoutes\n    ],\n    canActivate : [\n      CmGuardService\n    ]\n  },\n  { path: '**', component: CmPageNotFoundComponent }\n];\n\nexport const routing: ModuleWithProviders = RouterModule.forRoot(routes);\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div [ngClass]=\\\"{open: toggle}\\\" id=\\\"page-wrapper\\\" ng-cloak>\\n    <!-- Sidebar -->\\n    <div id=\\\"sidebar-wrapper\\\">\\n        <ul class=\\\"sidebar\\\" id=\\\"main-menu\\\">\\n            <li class=\\\"sidebar-main\\\" id=\\\"main-open-close-menu\\\">\\n                <a (click)=\\\"toggleSidebar()\\\">\\n                    <span class=\\\"menu-icon glyphicon glyphicon-transfer\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['home']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'menu.HomeLabel' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-globe\\\" id=\\\"main-router-home-inside\\\"></span>\\n                    {{'menu.HomeLabel' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-globe\\\" id=\\\"main-router-home\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['joblist']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'outsideJob.Title' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-list-ul\\\" id=\\\"main-router-job-list-inside\\\"></span>\\n                    {{'outsideJob.Title' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-list-ul\\\" id=\\\"main-router-job-list\\\"></span>\\n                </a>\\n            </li>\\n\\n            <!--<li class=\\\"sidebar-list\\\">-->\\n            <!--<a [routerLink]=\\\"['jobsDistrict']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'jobsByDistrict.Label' | translate}}\\\">-->\\n            <!--<span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-minus-circle\\\" id=\\\"main-router-job-list-by-district-inside\\\"></span>-->\\n            <!--{{'jobsByDistrict.Label' | translate}}-->\\n            <!--<span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-minus-circle\\\" id=\\\"main-router-job-list-by-district\\\"></span>-->\\n            <!--</a>-->\\n            <!--</li>-->\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['bikeJobList']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'bikeJobList.Title' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-credit-card\\\" id=\\\"main-router-bikes-job-list-inside\\\"></span>\\n                    {{'bikeJobList.Title' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-credit-card\\\" id=\\\"main-router-bikes-job-list\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['locations']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'jobList.LocationsLabel' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-building\\\" id=\\\"main-router-locations-inside\\\"></span>\\n                    {{'jobList.LocationsLabel' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-building\\\" id=\\\"main-router-locations\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['troubleTicket']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'troubleTickets.Title' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-ticket\\\" id=\\\"main-router-trouble-inside\\\"></span>\\n                    {{'troubleTickets.Title' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-ticket\\\" id=\\\"main-router-trouble\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['autoTicket']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'autoTickets.Title' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-clock-o\\\" id=\\\"main-router-trouble-inside\\\"></span>\\n                    {{'autoTickets.Title' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-clock-o\\\" id=\\\"main-router-auto-ticket\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['sparePart']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'menu.InventoryLabel' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-cog\\\" id=\\\"main-router-spare-part-inside\\\"></span>\\n                    {{'menu.InventoryLabel' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-cog\\\" id=\\\"main-router-spare-part\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['damageBikeCatConfig']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'damageBikeCategoryConfig.Label' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-wrench\\\" id=\\\"main-router-damage-bike-cat-config-inside\\\"></span>\\n                    {{'damageBikeCategoryConfig.Label' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-wrench\\\" id=\\\"main-router-damage-bike-cat-config\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['damageLocationCatConfig']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'damageLocationCategoryConfig.Label' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-wrench\\\" id=\\\"main-router-damage-location-cat-config-inside\\\"></span>\\n                    {{'damageLocationCategoryConfig.Label' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-wrench\\\" id=\\\"main-router-damage-location-cat-config\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['bikeDispatch']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'bikeDispatch.Label' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-bicycle\\\" id=\\\"main-router-bike-dispatch-inside\\\"></span>\\n                    {{'bikeDispatch.Label' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-bicycle\\\" id=\\\"main-router-bike-dispatch\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['news']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'news.Label' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-newspaper-o\\\" id=\\\"main-router-news-inside\\\"></span>\\n                    {{'news.Label' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-newspaper-o\\\" id=\\\"main-router-news\\\"></span>\\n                </a>\\n            </li>\\n\\n            <li class=\\\"sidebar-list\\\">\\n                <a [routerLink]=\\\"['repair']\\\" data-toggle=\\\"tooltip\\\" title=\\\"{{'repairs.Label' | translate}}\\\">\\n                    <span *ngIf=\\\"toggle\\\" class=\\\"menu-icon fa fa-ambulance\\\" id=\\\"main-router-repairs-inside\\\"></span>\\n                    {{'repairs.Label' | translate}}\\n                    <span *ngIf=\\\"!toggle\\\" class=\\\"menu-icon fa fa-ambulance\\\" id=\\\"main-router-repairs\\\"></span>\\n                </a>\\n            </li>\\n\\n        </ul>\\n    </div>\\n    <!-- End Sidebar -->\\n\\n    <div id=\\\"content-wrapper\\\">\\n        <div class=\\\"page-content\\\">\\n            <!-- Header Bar -->\\n            <div class=\\\"row header\\\">\\n                <div class=\\\"col-md-12\\\">\\n                    <img class=\\\"logo\\\" src=\\\"\" + require(\"../../img/checkmobile.jpg\") + \"\\\">\\n\\n                    <cm-profile class=\\\"user pull-right\\\" id=\\\"main-profile\\\" (notifyUrl)=\\\"notifyUrl($event)\\\"></cm-profile>\\n\\n                    <cm-current-station class=\\\"pull-right\\\" [class.disable-click-events]=\\\"disableStationSelect()\\\" id=\\\"main-current-station\\\">\\n                    </cm-current-station>\\n\\n                </div>\\n            </div>\\n            <!-- End Header Bar -->\\n\\n            <!--&lt;!&ndash; Main Content &ndash;&gt;-->\\n            <router-outlet id=\\\"main-central-part\\\"></router-outlet>\\n\\n        </div>\\n        <!-- End Page Content -->\\n    </div>\\n    <!-- End Content Wrapper -->\\n</div>\\n<!-- End Page Wrapper -->\\n\";","module.exports = __webpack_public_path__ + \"61abab7919685f55d31ffc0de564a36b.jpg\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-home.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-home.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-home.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".spinner{width:40px;height:40px;background-color:#333;margin:100px auto;-webkit-animation:sk-rotateplane 1.2s infinite ease-in-out;animation:sk-rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes sk-rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes sk-rotateplane{0%{transform:perspective(120px) rotateX(0deg) rotateY(0deg);-webkit-transform:perspective(120px) rotateX(0deg) rotateY(0deg)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0deg);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0deg)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.disable-click-events{pointer-events:none}.button-abort{position:relative;left:45%;text-align:center}.logo{height:60px;padding-top:6px;padding-bottom:6px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./color_theme.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!./color_theme.css\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./color_theme.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"/*rdash color theme*/\\n#sidebar-wrapper {\\n  background: #ff4a23;\\n}\\nul.sidebar .sidebar-main a,\\n.sidebar-footer,\\nul.sidebar .sidebar-list a:hover,\\n#page-wrapper:not(.open) ul.sidebar .sidebar-title.separator {\\n  /* Sidebar header and footer color */\\n  background: #ff4a23;\\n}\\n\\nul.sidebar li a {\\n  color: rgba(27, 27, 27, 0.88);\\n}\\n\\nul.sidebar .sidebar-title {\\n  color: rgba(80, 77, 78, 0.75);\\n}\\n\\nul.sidebar .sidebar-list a {\\n  color: rgba(27, 27, 27, 0.88);\\n  border-left: 3px solid #ff4a23;\\n}\\nul.sidebar .sidebar-list a:hover {\\n  color: rgba(80, 77, 78, 0.75);\\n  border-left: 3px solid #ff4a23;\\n}\\n\\n.sidebar-footer div a {\\n  color: rgba(27, 27, 27, 0.88);\\n}\\n.sidebar-footer div a:hover {\\n  color: rgba(52, 52, 52, 0.75);\\n}\\n\\n/*в свернутом виде подсветка при наведении*/\\n#page-wrapper:not(.open) ul.sidebar .sidebar-list a:hover span {\\n  border-left: 3px solid #ff4a23;\\n  text-indent: 22px;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".spinner {\\n  width: 40px;\\n  height: 40px;\\n  background-color: #333;\\n\\n  margin: 100px auto;\\n  -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;\\n  animation: sk-rotateplane 1.2s infinite ease-in-out;\\n}\\n\\n@-webkit-keyframes sk-rotateplane {\\n  0% {\\n    -webkit-transform: perspective(120px);\\n  }\\n  50% {\\n    -webkit-transform: perspective(120px) rotateY(180deg);\\n  }\\n  100% {\\n    -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg);\\n  }\\n}\\n\\n@keyframes sk-rotateplane {\\n  0% {\\n    transform: perspective(120px) rotateX(0deg) rotateY(0deg);\\n    -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);\\n  }\\n  50% {\\n    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);\\n    -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);\\n  }\\n  100% {\\n    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);\\n    -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);\\n  }\\n}\\n\\n.disable-click-events {\\n  pointer-events: none;\\n}\\n\\n.center-align {\\n  text-align: center;\\n}\\n\\nbody {\\n  font-family: \\\"Ubuntu\\\", sans-serif;\\n}\\n\\nh3,\\nh4 {\\n  text-align: center;\\n}\\n\\n.filter-panel-buttons {\\n  padding-top: 15px;\\n  padding-bottom: 15px;\\n}\\n\\n.element-valid {\\n  border-left: 5px solid #42a948; /* green */\\n}\\n\\n.element-invalid {\\n  border-left: 5px solid #a94442; /* red */\\n}\\n\\n.row-top-margin {\\n  margin-top: 10px;\\n}\\n\\n.clickable {\\n  cursor: pointer;\\n}\\n\\n.pale {\\n  color: grey;\\n}\\n\\n.count-input {\\n  position: relative;\\n  width: 100%;\\n  max-width: 165px;\\n  margin: 1px 0;\\n}\\n.count-input input {\\n  width: 100%;\\n  height: 24px;\\n  border: 1px solid #000;\\n  border-radius: 2px;\\n  background: none;\\n  text-align: center;\\n}\\n.count-input input:focus {\\n  outline: none;\\n}\\n.count-input .incr-btn {\\n  display: block;\\n  position: absolute;\\n  width: 30px;\\n  height: 30px;\\n  font-size: 26px;\\n  font-weight: 300;\\n  text-align: center;\\n  line-height: 30px;\\n  top: 50%;\\n  right: 0;\\n  margin-top: -15px;\\n  text-decoration:none;\\n}\\n.count-input .incr-btn:first-child {\\n  right: auto;\\n  left: 0;\\n  top: 46%;\\n}\\n.count-input.count-input-sm {\\n  max-width: 125px;\\n}\\n.count-input.count-input-sm input {\\n  height: 36px;\\n}\\n.count-input.count-input-lg {\\n  max-width: 200px;\\n}\\n.count-input.count-input-lg input {\\n  height: 40px;\\n  border-radius: 3px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<div class=\\\"container\\\">\\n\\n  <form class=\\\"form-signin\\\" (submit)=\\\"login($event, username.value, password.value)\\\">\\n    <h2 class=\\\"form-signin-heading\\\">Please sign in</h2>\\n\\n    <label class=\\\"sr-only\\\" for=\\\"username\\\">Username</label>\\n    <input class=\\\"form-control\\\" id=\\\"username\\\" #username type=\\\"text\\\" placeholder=\\\"Username\\\" required autofocus>\\n\\n    <label class=\\\"sr-only\\\" for=\\\"password\\\">Password</label>\\n    <input class=\\\"form-control\\\" id=\\\"password\\\" #password type=\\\"password\\\" placeholder=\\\"Password\\\" required>\\n\\n    <div class=\\\"errorText\\\" *ngIf=\\\"errorText\\\"> {{errorText}}</div>\\n\\n    <button class=\\\"btn btn-lg btn-primary btn-block\\\" id=\\\"sign-in\\\" type=\\\"submit\\\">Sign in</button>\\n  </form>\\n\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-login.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-login.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-login.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".form-signin{max-width:330px;padding:15px;margin:0 auto}.form-signin .form-signin-heading,.form-signin .checkbox{margin-bottom:10px}.form-signin .checkbox{font-weight:normal}.form-signin .form-control{position:relative;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:10px;font-size:16px}.form-signin .form-control:focus{z-index:2}.form-signin input[type=\\\"text\\\"]{margin-bottom:10px;border-bottom-right-radius:0;border-bottom-left-radius:0}.form-signin input[type=\\\"password\\\"]{margin-bottom:10px;border-top-left-radius:0;border-top-right-radius:0}.form-signin .errorText{color:red}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import { CmAutoTicketListComponent } from \"../cm-auto-ticket-config/list/cm-auto-ticket-config-list.component\";\nimport { CmAutoTicketConfigComponent } from \"../cm-auto-ticket-config/item/cm-auto-ticket-config.component\";\nimport { Routes } from \"@angular/router\";\nimport { CmSettingsComponent } from \"../cm-profile/settings/cm-settings.component\";\nimport { CmRootPageComponent } from \"../cm-main-map/cm-map-with-filters.component\";\nimport { CmNoRolesComponent } from \"../cm-no-roles/cm-no-role.component\";\nimport { CmGuardService } from \"../../services/guards/cm-guard.service\";\nimport { CmJobListComponent } from \"../cm-job-list/list/cm-job-list.component\";\nimport { CmJobItemComponent } from \"../cm-job-list/item/cm-job-item.component\";\nimport { CmLocationListComponent } from \"../cm-location/list/cm-location-list.component\";\nimport { CmLocationItemComponent } from \"../cm-location/item/cm-location-item.component\";\nimport { CmTroubleTicketListComponent } from \"../cm-trouble-ticket/list/cm-trouble-tiket-list.component\";\nimport { CmTroubleTicketComponent } from \"../cm-trouble-ticket/item/cm-trouble-ticket.component\";\nimport { CmSparePartListComponent } from \"../cm-spare-part/list/cm-spare-part-list.component\";\nimport { CmMoveSparePartComponent } from \"../cm-spare-parts-move/cm-move-spare-part.component\";\nimport { CmAddSparePartCategoryComponent } from \"../cm-spare-parts-category/add/cm-spare-part-category.component\";\nimport { CmSparePartDetailComponent } from \"../cm-spare-part/item/cm-spare-part-detail.component\";\nimport { CmBikeJobListComponent } from \"../cm-bike-job/list/cm-bike-job-list.component\";\nimport { CmBikeJobItemComponent } from \"../cm-bike-job/item/cm-bike-job-item.component\";\nimport { CmJobListByDistrictComponent } from \"../cm-job-list-disctrict-group/cm-job-list-by-district.component\";\nimport { CmBikeDispatchComponent } from \"../cm-bike-dispatch/list/cm-bike-dispatch.component\";\nimport { CmBikeDispatchItemComponent } from \"../cm-bike-dispatch/item/cm-bike-dispatch-item.component\";\nimport { CmNewsComponent } from \"../cm-news/cm-news.component\";\nimport { CmRepairListComponent } from \"../cm-repair/list/cm-repair-list.component\";\nimport { CmRepairItemComponent } from \"../cm-repair/item/cm-repair-item.component\";\nimport {CmDamageBikeCatConfigComponent} from \"../cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component\";\nimport {CmDamageBikeCatConfigItemComponent} from \"../cm-damage-cat-bike-config/item/cm-damage-cat-bike-config-item.component\";\nimport {CmDamageLocationCatConfigComponent} from \"../cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component\";\nimport {CmDamageLocationCatConfigItemComponent} from \"../cm-damage-cat-location-config/item/cm-damage-cat-location-config-item.component\";\n\nexport const mainRoutes: Routes = [\n  {\n    path: \"\",\n    redirectTo: \"home\",\n    pathMatch: \"full\"\n  },\n  {\n    path: \"home\",\n    component: CmRootPageComponent\n  },\n  {\n    path: \"joblist\",\n    children: [\n      {\n        path: \"\",\n        component: CmJobListComponent\n      },\n      {\n        path: \":id\",\n        component: CmJobItemComponent\n      }\n    ]\n  },\n  {\n    path: \"jobsDistrict\",\n    children: [\n      {\n        path: \"\",\n        component: CmJobListByDistrictComponent\n      }\n    ]\n  },\n  {\n    path: \"bikeJobList\",\n    children: [\n      {\n        path: \"\",\n        component: CmBikeJobListComponent\n      },\n      {\n        path: \":id\",\n        component: CmBikeJobItemComponent\n      }\n    ]\n  },\n  {\n    path: \"locations\",\n    children: [\n      {\n        path: \"\",\n        component: CmLocationListComponent\n      },\n      {\n        path: \":id\",\n        component: CmLocationItemComponent\n      }\n    ]\n  },\n  {\n    path: \"troubleTicket\",\n    children: [\n      {\n        path: \"\",\n        component: CmTroubleTicketListComponent\n      },\n      {\n        path: \":id\",\n        component: CmTroubleTicketComponent\n      }\n    ]\n  },\n  {\n    path: \"autoTicket\",\n    children: [\n      {\n        path: \"\",\n        component: CmAutoTicketListComponent\n      },\n      {\n        path: \":id\",\n        component: CmAutoTicketConfigComponent\n      }\n    ]\n  },\n  {\n    path: \"sparePart\",\n    children: [\n      {\n        path: \"\",\n        component: CmSparePartListComponent\n      },\n      {\n        path: \"addGroup\",\n        component: CmAddSparePartCategoryComponent\n      },\n      {\n        path: \"movePart\",\n        component: CmMoveSparePartComponent\n      },\n      {\n        path: \":id\",\n        component: CmSparePartDetailComponent\n      }\n    ]\n  },\n  {\n    path: \"damageBikeCatConfig\",\n    children: [\n      {\n        path: \"\",\n        component: CmDamageBikeCatConfigComponent\n      },\n      {\n        path: \":id\",\n        component: CmDamageBikeCatConfigItemComponent\n      }\n    ]\n  },\n  {\n    path: \"damageLocationCatConfig\",\n    children: [\n      {\n        path: \"\",\n        component: CmDamageLocationCatConfigComponent\n      },\n      {\n        path: \":id\",\n        component: CmDamageLocationCatConfigItemComponent\n      }\n    ]\n  },\n  {\n    path: \"bikeDispatch\",\n    children: [\n      {\n        path: \"\",\n        component: CmBikeDispatchComponent\n      },\n      {\n        path: \":id\",\n        component: CmBikeDispatchItemComponent\n      }\n    ]\n  },\n  {\n    path: \"news\",\n    component: CmNewsComponent\n  },\n  {\n    path: \"no-roles\",\n    component: CmNoRolesComponent,\n    canActivate: [CmGuardService]\n  },\n  {\n    path: \"settings\",\n    component: CmSettingsComponent,\n    canActivate: [CmGuardService]\n  },\n  {\n    path: \"repair\",\n    children: [\n      {\n        path: \"\",\n        component: CmRepairListComponent\n      },\n      {\n        path: \":id\",\n        component: CmRepairItemComponent\n      }\n    ]\n  }\n];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar rxjs_1 = require(\"rxjs\");\nvar map_1 = require(\"../../operator/map\");\nrxjs_1.Observable.prototype.map = map_1.map;\n//# sourceMappingURL=map.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar operators_1 = require(\"rxjs/operators\");\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * <span class=\"informal\">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.</span>\n *\n * <img src=\"./img/map.png\" width=\"100%\">\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * @example <caption>Map every click to the clientX position of that click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks.map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param {function(value: T, index: number): R} project The function to apply\n * to each `value` emitted by the source Observable. The `index` parameter is\n * the number `i` for the i-th emission that has happened since the\n * subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to define what `this` is in the\n * `project` function.\n * @return {Observable<R>} An Observable that emits the values from the source\n * Observable transformed by the given `project` function.\n * @method map\n * @owner Observable\n */\nfunction map(project, thisArg) {\n    return operators_1.map(project, thisArg)(this);\n}\nexports.map = map;\n//# sourceMappingURL=map.js.map","export var LANGUAGES = [\n  {\n    id:'en',\n    name:'English'\n  },\n  {\n    id:'de',\n    name:'Deutsch'\n  },\n  {\n    id:'fr',\n    name:'Français'\n  },\n  {\n    id:'ru',\n    name:'Русский'\n  }\n];\n","module.exports = \"{{label | translate}}\\n<span class=\\\"fa job-list-header-sort\\\"\\n      [ngClass]=\\\"{\\n                          'fa-sort-asc' : isSortAsc(),\\n                          'fa-sort-desc' : isSortDesc(),\\n                          'fa-sort' : isNoSort()\\n                          }\\\">\\n                    </span>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-sortable-th.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-sortable-th.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-sortable-th.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".job-list-header-sort{float:right}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {CmLocationData} from \"../../shared/location\";\n\nexport class CmAutoTicketConfig {\n  bikes: Bike[];\n  location: CmLocationData;\n  id: number;\n  issue: string;\n  category: string;\n  howOften: number;\n  priority: number;\n  reporter: string;\n  type: string;\n}\n\nexport class Bike {\n  bikeId: number;\n  bikeNumber: string;\n}\n\n","var map = {\n\t\"./af\": 412,\n\t\"./af.js\": 412,\n\t\"./ar\": 413,\n\t\"./ar-dz\": 414,\n\t\"./ar-dz.js\": 414,\n\t\"./ar-kw\": 415,\n\t\"./ar-kw.js\": 415,\n\t\"./ar-ly\": 416,\n\t\"./ar-ly.js\": 416,\n\t\"./ar-ma\": 417,\n\t\"./ar-ma.js\": 417,\n\t\"./ar-sa\": 418,\n\t\"./ar-sa.js\": 418,\n\t\"./ar-tn\": 419,\n\t\"./ar-tn.js\": 419,\n\t\"./ar.js\": 413,\n\t\"./az\": 420,\n\t\"./az.js\": 420,\n\t\"./be\": 421,\n\t\"./be.js\": 421,\n\t\"./bg\": 422,\n\t\"./bg.js\": 422,\n\t\"./bm\": 423,\n\t\"./bm.js\": 423,\n\t\"./bn\": 424,\n\t\"./bn-bd\": 425,\n\t\"./bn-bd.js\": 425,\n\t\"./bn.js\": 424,\n\t\"./bo\": 426,\n\t\"./bo.js\": 426,\n\t\"./br\": 427,\n\t\"./br.js\": 427,\n\t\"./bs\": 428,\n\t\"./bs.js\": 428,\n\t\"./ca\": 429,\n\t\"./ca.js\": 429,\n\t\"./cs\": 430,\n\t\"./cs.js\": 430,\n\t\"./cv\": 431,\n\t\"./cv.js\": 431,\n\t\"./cy\": 432,\n\t\"./cy.js\": 432,\n\t\"./da\": 433,\n\t\"./da.js\": 433,\n\t\"./de\": 309,\n\t\"./de-at\": 434,\n\t\"./de-at.js\": 434,\n\t\"./de-ch\": 435,\n\t\"./de-ch.js\": 435,\n\t\"./de.js\": 309,\n\t\"./dv\": 436,\n\t\"./dv.js\": 436,\n\t\"./el\": 437,\n\t\"./el.js\": 437,\n\t\"./en-au\": 438,\n\t\"./en-au.js\": 438,\n\t\"./en-ca\": 439,\n\t\"./en-ca.js\": 439,\n\t\"./en-gb\": 440,\n\t\"./en-gb.js\": 440,\n\t\"./en-ie\": 441,\n\t\"./en-ie.js\": 441,\n\t\"./en-il\": 442,\n\t\"./en-il.js\": 442,\n\t\"./en-in\": 443,\n\t\"./en-in.js\": 443,\n\t\"./en-nz\": 444,\n\t\"./en-nz.js\": 444,\n\t\"./en-sg\": 445,\n\t\"./en-sg.js\": 445,\n\t\"./eo\": 446,\n\t\"./eo.js\": 446,\n\t\"./es\": 447,\n\t\"./es-do\": 448,\n\t\"./es-do.js\": 448,\n\t\"./es-mx\": 449,\n\t\"./es-mx.js\": 449,\n\t\"./es-us\": 450,\n\t\"./es-us.js\": 450,\n\t\"./es.js\": 447,\n\t\"./et\": 451,\n\t\"./et.js\": 451,\n\t\"./eu\": 452,\n\t\"./eu.js\": 452,\n\t\"./fa\": 453,\n\t\"./fa.js\": 453,\n\t\"./fi\": 454,\n\t\"./fi.js\": 454,\n\t\"./fil\": 455,\n\t\"./fil.js\": 455,\n\t\"./fo\": 456,\n\t\"./fo.js\": 456,\n\t\"./fr\": 310,\n\t\"./fr-ca\": 457,\n\t\"./fr-ca.js\": 457,\n\t\"./fr-ch\": 458,\n\t\"./fr-ch.js\": 458,\n\t\"./fr.js\": 310,\n\t\"./fy\": 459,\n\t\"./fy.js\": 459,\n\t\"./ga\": 460,\n\t\"./ga.js\": 460,\n\t\"./gd\": 461,\n\t\"./gd.js\": 461,\n\t\"./gl\": 462,\n\t\"./gl.js\": 462,\n\t\"./gom-deva\": 463,\n\t\"./gom-deva.js\": 463,\n\t\"./gom-latn\": 464,\n\t\"./gom-latn.js\": 464,\n\t\"./gu\": 465,\n\t\"./gu.js\": 465,\n\t\"./he\": 466,\n\t\"./he.js\": 466,\n\t\"./hi\": 467,\n\t\"./hi.js\": 467,\n\t\"./hr\": 468,\n\t\"./hr.js\": 468,\n\t\"./hu\": 469,\n\t\"./hu.js\": 469,\n\t\"./hy-am\": 470,\n\t\"./hy-am.js\": 470,\n\t\"./id\": 471,\n\t\"./id.js\": 471,\n\t\"./is\": 472,\n\t\"./is.js\": 472,\n\t\"./it\": 473,\n\t\"./it-ch\": 474,\n\t\"./it-ch.js\": 474,\n\t\"./it.js\": 473,\n\t\"./ja\": 475,\n\t\"./ja.js\": 475,\n\t\"./jv\": 476,\n\t\"./jv.js\": 476,\n\t\"./ka\": 477,\n\t\"./ka.js\": 477,\n\t\"./kk\": 478,\n\t\"./kk.js\": 478,\n\t\"./km\": 479,\n\t\"./km.js\": 479,\n\t\"./kn\": 480,\n\t\"./kn.js\": 480,\n\t\"./ko\": 481,\n\t\"./ko.js\": 481,\n\t\"./ku\": 482,\n\t\"./ku.js\": 482,\n\t\"./ky\": 483,\n\t\"./ky.js\": 483,\n\t\"./lb\": 484,\n\t\"./lb.js\": 484,\n\t\"./lo\": 485,\n\t\"./lo.js\": 485,\n\t\"./lt\": 486,\n\t\"./lt.js\": 486,\n\t\"./lv\": 487,\n\t\"./lv.js\": 487,\n\t\"./me\": 488,\n\t\"./me.js\": 488,\n\t\"./mi\": 489,\n\t\"./mi.js\": 489,\n\t\"./mk\": 490,\n\t\"./mk.js\": 490,\n\t\"./ml\": 491,\n\t\"./ml.js\": 491,\n\t\"./mn\": 492,\n\t\"./mn.js\": 492,\n\t\"./mr\": 493,\n\t\"./mr.js\": 493,\n\t\"./ms\": 494,\n\t\"./ms-my\": 495,\n\t\"./ms-my.js\": 495,\n\t\"./ms.js\": 494,\n\t\"./mt\": 496,\n\t\"./mt.js\": 496,\n\t\"./my\": 497,\n\t\"./my.js\": 497,\n\t\"./nb\": 498,\n\t\"./nb.js\": 498,\n\t\"./ne\": 499,\n\t\"./ne.js\": 499,\n\t\"./nl\": 500,\n\t\"./nl-be\": 501,\n\t\"./nl-be.js\": 501,\n\t\"./nl.js\": 500,\n\t\"./nn\": 502,\n\t\"./nn.js\": 502,\n\t\"./oc-lnc\": 503,\n\t\"./oc-lnc.js\": 503,\n\t\"./pa-in\": 504,\n\t\"./pa-in.js\": 504,\n\t\"./pl\": 505,\n\t\"./pl.js\": 505,\n\t\"./pt\": 506,\n\t\"./pt-br\": 507,\n\t\"./pt-br.js\": 507,\n\t\"./pt.js\": 506,\n\t\"./ro\": 508,\n\t\"./ro.js\": 508,\n\t\"./ru\": 311,\n\t\"./ru.js\": 311,\n\t\"./sd\": 509,\n\t\"./sd.js\": 509,\n\t\"./se\": 510,\n\t\"./se.js\": 510,\n\t\"./si\": 511,\n\t\"./si.js\": 511,\n\t\"./sk\": 512,\n\t\"./sk.js\": 512,\n\t\"./sl\": 513,\n\t\"./sl.js\": 513,\n\t\"./sq\": 514,\n\t\"./sq.js\": 514,\n\t\"./sr\": 515,\n\t\"./sr-cyrl\": 516,\n\t\"./sr-cyrl.js\": 516,\n\t\"./sr.js\": 515,\n\t\"./ss\": 517,\n\t\"./ss.js\": 517,\n\t\"./sv\": 518,\n\t\"./sv.js\": 518,\n\t\"./sw\": 519,\n\t\"./sw.js\": 519,\n\t\"./ta\": 520,\n\t\"./ta.js\": 520,\n\t\"./te\": 521,\n\t\"./te.js\": 521,\n\t\"./tet\": 522,\n\t\"./tet.js\": 522,\n\t\"./tg\": 523,\n\t\"./tg.js\": 523,\n\t\"./th\": 524,\n\t\"./th.js\": 524,\n\t\"./tk\": 525,\n\t\"./tk.js\": 525,\n\t\"./tl-ph\": 526,\n\t\"./tl-ph.js\": 526,\n\t\"./tlh\": 527,\n\t\"./tlh.js\": 527,\n\t\"./tr\": 528,\n\t\"./tr.js\": 528,\n\t\"./tzl\": 529,\n\t\"./tzl.js\": 529,\n\t\"./tzm\": 530,\n\t\"./tzm-latn\": 531,\n\t\"./tzm-latn.js\": 531,\n\t\"./tzm.js\": 530,\n\t\"./ug-cn\": 532,\n\t\"./ug-cn.js\": 532,\n\t\"./uk\": 533,\n\t\"./uk.js\": 533,\n\t\"./ur\": 534,\n\t\"./ur.js\": 534,\n\t\"./uz\": 535,\n\t\"./uz-latn\": 536,\n\t\"./uz-latn.js\": 536,\n\t\"./uz.js\": 535,\n\t\"./vi\": 537,\n\t\"./vi.js\": 537,\n\t\"./x-pseudo\": 538,\n\t\"./x-pseudo.js\": 538,\n\t\"./yo\": 539,\n\t\"./yo.js\": 539,\n\t\"./zh-cn\": 540,\n\t\"./zh-cn.js\": 540,\n\t\"./zh-hk\": 541,\n\t\"./zh-hk.js\": 541,\n\t\"./zh-mo\": 542,\n\t\"./zh-mo.js\": 542,\n\t\"./zh-tw\": 543,\n\t\"./zh-tw.js\": 543\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1023;","module.exports = \"<div class=\\\"modal-content\\\">\\n    <cm-bikes (selectBike)=\\\"selectBike($event)\\\"></cm-bikes>\\n    <button class=\\\"modal-location-list-close\\\" id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-bike-list.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-bike-list.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-bike-list.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".modal-location-list-close{margin-bottom:15px;margin-left:10px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<div class=\\\"modal-content\\\">\\n    <cm-locations [parent]=\\\"parent\\\" (selectLocation)=\\\"selectLocation($event)\\\"></cm-locations>\\n    <button class=\\\"modal-location-list-close\\\" id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-location-list.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-location-list.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-location-list.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".modal-location-list-close{margin-bottom:15px;margin-left:10px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export class CmJobItem {\n  id: number;\n  bike: number;\n  qty: number;\n  assignedTo: string;\n  checked: boolean;\n  taskType: JobInLocationType;\n  type: string;\n\n  constructor(\n    id: number,\n    taskType: JobInLocationType,\n    inNumber: number,\n    assignedTo: string,\n    checked?: boolean\n  ) {\n    this.id = id;\n    this.taskType = taskType;\n    this.type = this.getType(this.taskType);\n    if (taskType === JobInLocationType.move) {\n      this.qty = inNumber;\n    } else {\n      this.bike = inNumber;\n    }\n    this.assignedTo = assignedTo;\n    this.checked = checked || true;\n  }\n\n  private getType(taskType: JobInLocationType): string {\n    switch (taskType) {\n      case JobInLocationType.move:\n        return \"bikes\";\n      default:\n        return \"bike\";\n    }\n  }\n}\n\nexport enum JobInLocationType {\n  move,\n  moveToWs,\n  check\n}\n","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-header\\\">\\n        <h4>\\n            {{config.id > 0 ? ('config.Title' | translate) + ' ' + config.id : ('troubleconfigs.AddLabel' | translate)}}\\n        </h4>\\n    </div>\\n    <div class=\\\"modal-body tt-window-body\\\" id=\\\"tt-auto-ticket-config-details\\\">\\n        <div class=\\\"col-md-12\\\">\\n\\n            <div class=\\\"col-md-8\\\">\\n                <table class=\\\"table\\\" id=\\\"input-trouble-config-top\\\">\\n                    <tr *ngIf=\\\"isBikeAutoTroubleTicket()\\\">\\n                        <td>\\n                            {{'bike.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <table class=\\\"table table-striped\\\" id=\\\"tt-bikes-table\\\">\\n                                <tbody>\\n                                <tr *ngFor=\\\"let bike of config.bikes\\\">\\n                                    <td>\\n                                        {{bike?.bikeNumber}}\\n                                    </td>\\n                                    <td>\\n                                        <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"removeDamage\\\" class=\\\"btn btn-danger remove show_tip\\\"\\n                                                (click)=\\\"removeBike(bike)\\\">\\n                                            <i class=\\\"fa fa-trash-o\\\"></i>\\n                                        </button>\\n                                    </td>\\n                                </tr>\\n                                </tbody>\\n                            </table>\\n\\n                            <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"open-bikes\\\" (click)=\\\"openBikes()\\\">\\n                                {{'button.SearchLabel' | translate}}\\n                            </button>\\n                        </td>\\n                    </tr>\\n                    <tr *ngIf=\\\"isLocationAutoTroubleTicket()\\\">\\n                        <td>\\n                            {{'location.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-location-name\\\" disabled [ngModel]=\\\"config.location?.locationName\\\">\\n                            <button *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"trouble-ticket-search-button\\\" id=\\\"open-locations\\\" (click)=\\\"openLocations()\\\">\\n                                {{'button.SearchLabel' | translate}}\\n                            </button>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.DamageTextLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <textarea [readonly]=\\\"!allowedToEditSettings()\\\" class=\\\"form-control\\\" id=\\\"config-issue\\\" [(ngModel)]=\\\"config.issue\\\"></textarea>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'category.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <cm-tt-category-filter [readonly]=\\\"!allowedToEditSettings()\\\" [category]=\\\"config.category\\\" [showLabel]=\\\"false\\\" [type]=\\\"config.type\\\" (changeCategory)=\\\"config.category = $event\\\"></cm-tt-category-filter>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'autoTicket.howOftenLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input [readonly]=\\\"!allowedToEditSettings()\\\" class=\\\"form-control\\\" id=\\\"config-who-caused\\\" type=\\\"number\\\" [(ngModel)]=\\\"config.howOften\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'priority.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <select [disabled]=\\\"!allowedToEditSettings()\\\" class=\\\"form-control\\\" id=\\\"config-priority\\\" [(ngModel)]=\\\"config.priority\\\">\\n                                <option *ngFor=\\\"let prio of priorityList\\\">{{prio}}</option>\\n                            </select>\\n\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleconfigs.ReporterLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input [readonly]=\\\"!allowedToEditSettings()\\\" class=\\\"form-control\\\" id=\\\"config-reporter\\\" type=\\\"text\\\" maxlength=\\\"255\\\" [(ngModel)]=\\\"config.reporter\\\">\\n                        </td>\\n                    </tr>\\n                </table>\\n\\n            </div>\\n\\n\\n        </div>\\n    </div>\\n    <div class=\\\"modal-footer\\\">\\n        <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"save\\\" (click)=\\\"save()\\\">{{'button.SaveLabel' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-auto-ticket-config.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-auto-ticket-config.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-auto-ticket-config.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#input-trouble-ticket-top td:first-child,#input-trouble-ticket-bottom td:first-child{width:30%;text-align:left;font-weight:bold}#input-trouble-ticket-top td:last-child,#input-trouble-ticket-bottom td:last-child{width:70%}#readonly-trouble-ticket td:first-child{text-align:left;font-weight:bold}.trouble-ticket-status{background-color:#ffe662}.trouble-ticket-search-button{margin-top:10px}#tt-bikes-table td:first-child{width:70%;vertical-align:middle}#tt-auto-ticket-config-details{height:auto;overflow:auto}.modal-wide{width:130%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'autoTicketsConfig.Title' | translate}}</h3>\\n\\n    <div id=\\\"auto-tickets-config-filters\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <div>\\n                <label for=\\\"mission-type-id\\\">{{'mission.typeLabel' | translate}}</label>\\n                <select class=\\\"form-control\\\" id=\\\"mission-type-id\\\" [ngModel]=\\\"filters.type\\\" (ngModelChange)=\\\"changeType($event)\\\">\\n                    <option *ngFor=\\\"let mission of missionTypes\\\" [value]=\\\"mission.key\\\">{{mission.label | translate}}</option>\\n                </select>\\n            </div>\\n\\n            <div *ngIf=\\\"!isLocationAutoTroubleTicket()\\\" class=\\\"row-top-margin\\\">\\n                <label for=\\\"filter-id\\\">{{'bikeId.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-id\\\" type=\\\"number\\\" [(ngModel)]=\\\"filters.bikeId\\\">\\n            </div>\\n\\n            <div *ngIf=\\\"!isLocationAutoTroubleTicket()\\\" class=\\\"row-top-margin\\\">\\n                <label for=\\\"filter-bike\\\">{{'bike.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-bike\\\" type=\\\"text\\\" [(ngModel)]=\\\"filters.bikeNumber\\\">\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div>\\n                <cm-tt-category-filter [category]=\\\"filters.category\\\" [type]=\\\"filters.type\\\" (changeCategory)=\\\"filters.category = $event\\\">\\n                </cm-tt-category-filter>\\n            </div>\\n\\n            <div *ngIf=\\\"!isBikeAutoTroubleTicket()\\\" class=\\\"row-top-margin\\\">\\n                <cm-location-filter [location]=\\\"filters.locationId\\\"\\n                                    (changeLocation)=\\\"filters.locationId = $event\\\"></cm-location-filter>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear\\\" (click)=\\\"clearFilters()\\\">{{'filters.ClearBtn' | translate}}</button>\\n            <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"add-new-config-bike\\\" (click)=\\\"addConfigForBike()\\\">{{'autoTicketBikeConfig.AddBtn' | translate}}</button>\\n            <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"add-new-config-location\\\" (click)=\\\"addConfigForLocation()\\\">{{'autoTicketLocationConfig.AddBtn' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table table-striped clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('id')\\\">\\n                    <cm-sortable [label]=\\\"'autoTicketConfig.IdLabel'\\\" [sort]=\\\"'id' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('bike')\\\">\\n                    <cm-sortable [label]=\\\"'bike.Label'\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('category')\\\">\\n                    <cm-sortable [label]=\\\"'category.Label'\\\" [sort]=\\\"'category' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('issue')\\\">\\n                    <cm-sortable [label]=\\\"'autoTicketConfig.DamageTextLabel'\\\" [sort]=\\\"'issue' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('location')\\\">\\n                    <cm-sortable [label]=\\\"'location.Label'\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('howOften')\\\">\\n                    <cm-sortable [label]=\\\"'autoTicketConfig.HowOftenLabel'\\\" [sort]=\\\"'howOften' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('priority')\\\">\\n                    <cm-sortable [label]=\\\"'autoTicketConfig.PriorityLabel'\\\" [sort]=\\\"'priority' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('reporter')\\\">\\n                    <cm-sortable [label]=\\\"'autoTicketConfig.ReporterLabel'\\\" [sort]=\\\"'reporter' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let config of configs\\\">\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    {{config.id}}\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    <div *ngFor=\\\"let bike of config.bikes\\\">\\n                        {{bike.bikeNumber}}\\n                        <br />\\n                    </div>\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    {{config.category}}\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    {{substrText(config.issue)}}\\n                </td>\\n                <td>\\n                    {{config.location?.locationName}}\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    {{config.howOften}}\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\">\\n                    {{config.priority}}\\n                </td>\\n                <td (click)=\\\"openConfig(config)\\\" style=\\\"word-break: break-word\\\">\\n                    {{config.reporter}}\\n                </td>\\n                <td *ngIf=\\\"allowedToEditSettings()\\\">\\n                    <button id=\\\"delete-config\\\" class=\\\"btn btn-danger remove show_tip\\\" (click)=\\\"deleteConfig(config)\\\">\\n                        <i class=\\\"fa fa-trash-o\\\"></i>\\n                    </button>\\n                </td>\\n            </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"setPage($event)\\\"></pager>\\n</div>\\n\";","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-4\\\">\\n\\n    <h4 class=\\\"center-align\\\">{{'menu.SettingsLabel' | translate}}</h4>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"language-select\\\">{{ 'settings.Language' | translate}}</label>\\n        <select class=\\\"form-control\\\" id=\\\"language-select\\\" [ngModel]=\\\"selectedLang\\\"\\n                (change)=\\\"selectLang($event.target.value)\\\">\\n            <option *ngFor=\\\"let lang of langList\\\" [value]=\\\"lang.id\\\">{{lang.name}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"timeout\\\">{{ 'settings.Timeout' | translate}}</label>\\n        <input class=\\\"form-control\\\" id=\\\"timeout\\\" type=\\\"number\\\" [(ngModel)]=\\\"timeoutValue\\\">\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"hal-url\\\">{{'settings.HalUrlLabel' | translate}}</label>\\n        <input class=\\\"form-control\\\" id=\\\"hal-url\\\" type=\\\"text\\\" [(ngModel)]=\\\"halUrl\\\">\\n    </div>\\n\\n    <button class=\\\"btn btn-primary\\\" id=\\\"settings-ok\\\" type=\\\"button\\\" (click)=\\\"save()\\\">\\n        {{'button.SaveLabel' | translate}}\\n    </button>\\n</div>\\n\";","import {Marker} from \"../../shared/marker\";\nimport {CmLocationData} from \"../../shared/location\";\n\nexport class OutsideJob extends Marker {\n    location: CmLocationData;\n    priority: number;\n    dateFinished: string;\n    mustBeFixedAt: string;\n    quantities: any;\n    toWs: number;\n    check: number;\n    charge: number;\n    assignedTo: Array<string> = [];\n}\n","module.exports = \"<agm-map [style.height.px]=\\\"mapHeight\\\" [latitude]=\\\"latitude\\\" [longitude]=\\\"longitude\\\" [zoom]=\\\"zoom\\\" (boundsChange)=\\\"boundsChange($event)\\\">\\n    <agm-data-layer *ngFor=\\\"let area of areas\\\" [geoJson]=\\\"area.polygon\\\" [style]=\\\"styleFunc\\\"></agm-data-layer>\\n    <agm-marker *ngFor=\\\"let marker of markers\\\" [latitude]=\\\"marker.coordinates.latitude\\\" [longitude]=\\\"marker.coordinates.longitude\\\"\\n                [iconUrl]='getDot(marker)' [opacity]=\\\"getOpacity(marker)\\\" [zIndex]=\\\"getZIndex(marker)\\\"  (markerClick)=\\\"click(marker)\\\">\\n        <agm-info-window [disableAutoPan]=\\\"true\\\" [isOpen]=\\\"false\\\">\\n            <cm-job-item-map *ngIf=\\\"marker === openedMarker && isJobType(marker)\\\" [branding]= branding [locationId]=\\\"marker.location.locationId\\\" [locationName]=\\\"marker.location.locationName\\\"\\n                [showClose]=\\\"false\\\"></cm-job-item-map>\\n\\n            <cm-job-item-map *ngIf=\\\"marker === openedMarker && isBikeType(marker)\\\" [bikeNumber]=\\\"marker.bikeNumber\\\" [bikeId]=\\\"marker.bikeId\\\"\\n                [bikeStatus]=\\\"marker.status\\\" [pedelec]=\\\"marker.pedelec\\\" [battery]=\\\"marker.battery\\\" [showClose]=\\\"false\\\">\\n            </cm-job-item-map>\\n\\n            <div *ngIf=\\\"marker === openedMarker && isBikeClusterType(marker)\\\">\\n                Total bikes:\\n                <b>{{marker.cnt}}</b>\\n            </div>\\n\\n            <!--<div *ngIf=\\\"\\\"><b>Bike number</b>: {{marker.bikeNumber}} <br> <b>Status</b>: {{marker.status}}</div>-->\\n\\n            <!--<div *ngIf=\\\"isBikeType(marker)\\\">-->\\n            <!--<table class=\\\"table\\\">-->\\n            <!--<tbody>-->\\n            <!--<tr *ngFor=\\\"let bike of marker.bikes\\\">-->\\n            <!--<td>-->\\n            <!--{{bike.bikeNumber}}-->\\n            <!--</td>-->\\n            <!--<td>-->\\n            <!--{{bike.status}}-->\\n            <!--</td>-->\\n            <!--</tr>-->\\n            <!--</tbody>-->\\n            <!--</table>-->\\n            <!--&lt;!&ndash;<b>Bike number</b>: {{marker.bikeNumber}} <br> <b>Status</b>: {{marker.status}}&ndash;&gt;-->\\n            <!--</div>-->\\n\\n            <div *ngIf=\\\"isEmployeeType(marker)\\\">\\n                <b>{{marker.employee}}</b>\\n                <br>\\n                <b>{{'lastOnline.Label' | translate}}</b> : {{formatTimestamp(marker.timestamp)}}\\n            </div>\\n        </agm-info-window>\\n    </agm-marker>\\n</agm-map>\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".ag-map-container{height:80vh;width:100%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Marker} from \"./marker\";\n\nexport class BikeCluster extends Marker {\n    cnt: number;\n}\n","import {Marker} from \"./marker\";\n\nexport class EmployeeMap extends Marker {\n    id: number;\n    city: string;\n    employee: string;\n    timestamp: string;\n}","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<!--\\nI need this sizes to make sure station select works\\nif u need to change sizes make sure that station select works after success message after finishing any process\\n-->\\n<div class=\\\"main-panel\\\">\\n    <h3>{{'dispatching.Title' | translate}}</h3>\\n\\n    <div class=\\\"col-md-14 map-filters\\\" #filtersContainer>\\n        <div class=\\\"col-md-1\\\">\\n            <input type=\\\"radio\\\" name=\\\"showStations\\\" (click)=\\\"loadLocations(true)\\\" [checked]=\\\"filterModel.showStation\\\">\\n            {{'dispatching.ShowLocationLabel' |translate}} <br>\\n            <input type=\\\"radio\\\" name=\\\"showStations\\\" (click)=\\\"loadLocations(false)\\\" [checked]=\\\"!filterModel.showStation\\\">\\n            {{'dispatching.NoLocationLabel' | translate}}\\n        </div>\\n        \\n        <div class=\\\"col-md-2\\\">\\n\\n            <cm-bike-branding-filter [(selectedBrands)]=\\\"filterModel.bikeFilters.branding\\\"\\n                                   [mapMode]=\\\"true\\\"\\n                                   (selectedBrandsChange)= \\\"updateBikeAndLocations()\\\"\\n                                   (search)=\\\"loadBikes()\\\"\\n                                   ></cm-bike-branding-filter>\\n\\n        </div>\\n\\n        <div class=\\\"col-md-2\\\">\\n            <div *ngFor=\\\"let goal of bikeFilterGoals()\\\">\\n                <input type=\\\"radio\\\" name=\\\"showBikes\\\"  [value] = \\\"goal\\\" [(ngModel)]=\\\"filterModel.bikeFilters.filterGoal\\\" (ngModelChange)=\\\"loadBikes()\\\">\\n                {{bikeFilterGoalLabel(goal) |translate}} <br>\\n            </div>\\n            <div>\\n                <input class=\\\"bike-search-input\\\" type=\\\"text\\\" [placeholder]=\\\"getEnterBikeNumberText()\\\" [(ngModel)]=\\\"filterModel.singleBike\\\">\\n                <button class=\\\"bike-search-btn\\\" (click)=\\\"searchSignleBike()\\\">\\n                    <span class=\\\"fa fa-search\\\"></span>\\n                </button>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-2\\\">\\n            <input type=\\\"radio\\\" name=\\\"showEmployees\\\" (click)=\\\"loadEmployees(true)\\\" [checked]=\\\"filterModel.showServiceAgents\\\">\\n            {{'dispatching.ShowEmployeesLabel' |translate}} <br>\\n            <input type=\\\"radio\\\" name=\\\"showEmployees\\\" (click)=\\\"loadEmployees(false)\\\" [checked]=\\\"!filterModel.showServiceAgents\\\">\\n            {{'dispatching.NoEmployeesLabel' | translate}} <br>\\n\\n<!--            <div class=\\\"col-md-6\\\">-->\\n            <cm-users-filter [selectedEmployee]=\\\"employeeList\\\"\\n                             (changeEmployee)=\\\"updateMarkers($event)\\\">\\n            </cm-users-filter>\\n<!--            </div>-->\\n        </div>\\n\\n        <div class=\\\"col-md-2\\\">\\n            <cm-bike-type-filter  [(selectedTypes)]=\\\"filterModel.bikeFilters.types\\\"\\n                                 [mapMode]=\\\"true\\\"\\n                                 (selectedTypesChange)=\\\"loadBikes()\\\"></cm-bike-type-filter>\\n\\n            <div class=\\\"charge-filters\\\">\\n                <b>{{'dispatching.chargeLevel' | translate}}</b>\\n                <nouislider\\n                        [config]=\\\"chargeSliderConfig\\\"\\n                        (change)=\\\"changeChargeLevel($event)\\\"></nouislider>\\n\\n                <div class=\\\"form-check\\\">\\n                    <label for=\\\"filter-charging\\\">{{'dispatching.charging' | translate}}</label>\\n                    <input id=\\\"filter-charging\\\" type=\\\"checkbox\\\" [(ngModel)]=\\\"filterModel.bikeFilters.charging\\\"\\n                           (ngModelChange)=\\\"loadBikes()\\\">\\n                </div>\\n\\n                <div class=\\\"form-check\\\">\\n                    <label for=\\\"filter-not-charging\\\">{{'dispatching.notCharging' | translate}}</label>\\n                    <input id=\\\"filter-not-charging\\\" type=\\\"checkbox\\\" [(ngModel)]=\\\"filterModel.bikeFilters.notCharging\\\"\\n                           (ngModelChange)=\\\"loadBikes()\\\">\\n                </div>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-3\\\">\\n            <b>{{'bikesTotal.Label' | translate}}: {{bikesTotal}}</b>\\n            <cm-bike-status-filter [(selectedStatuses)] = \\\"filterModel.bikeFilters.statuses\\\"\\n                                   [(statusChangedHoursAgo)] = \\\"filterModel.bikeFilters.statusChangedHoursAgo\\\"\\n                                   [mapMode]=\\\"true\\\"\\n                                   (selectedStatusesChange) = \\\"loadBikes()\\\"\\n                                   (search)=\\\"loadBikes()\\\"\\n                                   (statusesLoaded)=\\\"showTotalBikes($event)\\\"></cm-bike-status-filter>\\n        </div>\\n    </div>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <cm-map [markers]=\\\"markerList\\\" [branding] = \\\"filterModel.bikeFilters.branding\\\" [mapHeight]=\\\"mapHeight\\\" (changeBound)=\\\"changeBound($event)\\\"></cm-map>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map-with-filters.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map-with-filters.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-map-with-filters.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".main-panel{height:90vh;width:100%}.map-filters{padding-bottom:10px}.no-padding{padding:0}.bike-search-input{width:150px}.bike-search-btn{margin-left:3px;height:100%}.bikes-total-label{padding-right:10px}.charge-filters input[type=checkbox]{float:left;margin-right:7px}.charge-filters .form-check label{font-weight:normal}.charge-filters nouislider .noUi-horizontal{height:13px}.charge-filters nouislider .noUi-horizontal .noUi-handle{height:23px;top:-7px}.charge-filters nouislider .noUi-horizontal .noUi-tooltip{bottom:0;padding:0;border:none}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content\\\">\\n    <div class=\\\"modal-header\\\">\\n        <button class=\\\"close\\\" type=\\\"button\\\" (click)=\\\"close()\\\">&times;</button>\\n        <h4 class=\\\"modal-title\\\">{{'assignJob.Title' | translate}}</h4>\\n    </div>\\n    <div class=\\\"modal-body employee-body\\\">\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"filter-text\\\">{{'filter.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"filter-text\\\" type=\\\"text\\\" [(ngModel)]=\\\"filter\\\" (ngModelChange)=\\\"filterUsers()\\\">\\n        </div>\\n        <table class=\\\"table\\\">\\n            <thead>\\n                <tr>\\n                    <th class=\\\"center-align\\\">\\n                        {{'assignJob.EmployeeLabel' | translate}}\\n                    </th>\\n                </tr>\\n            </thead>\\n            <tbody>\\n                <tr *ngFor=\\\"let employee of employeeList\\\" (click)=\\\"selectEmployee(employee)\\\" [ngClass]=\\\"{'active': employee===assignee}\\\">\\n                    <td>\\n                        {{getName(employee)}}\\n                    </td>\\n                </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n    <div class=\\\"modal-footer\\\">\\n        <button class=\\\"btn btn-success\\\" id=\\\"assign-jobs\\\" type=\\\"button\\\" (click)=\\\"assign()\\\">\\n            {{'assignJob.AssignBtn' | translate}}\\n        </button>\\n        <button class=\\\"btn btn-default\\\" id=\\\"close-assign\\\" type=\\\"button\\\" (click)=\\\"close()\\\">\\n            {{'button.Close' | translate}}\\n        </button>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-assign.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-assign.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-assign.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".employee-body{height:500px;overflow:auto}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<label for=\\\"location-filter\\\">{{'jobList.LocationsLabel' | translate}}</label>\\n<select class=\\\"form-control\\\" id=\\\"location-filter\\\" [(ngModel)]=\\\"location\\\" (ngModelChange)=\\\"_changeLocation()\\\">\\n    <option value=\\\"null\\\" disabled selected></option>\\n    <option *ngFor=\\\"let item of locationList\\\" [value]=\\\"item.locationId\\\">{{item.fullName}}</option>\\n</select>\";","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-header\\\">\\n        <h3>{{'bike.Label'|translate}} {{model.bike?.bikeNumber}}</h3>\\n    </div>\\n    <div class=\\\"modal-body\\\">\\n        <div class=\\\"col-md-12\\\">\\n\\n            <table class=\\\"col-md-12 table\\\">\\n                <tbody>\\n                <tr *ngIf=\\\"model.status\\\">\\n                    <td>{{'troubleTickets.StatusLabel' | translate}}</td>\\n                    <td>{{model.status}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'bikesJobList.JobTypeLabel' | translate}}</td>\\n                    <td>{{getTaskName(model.task)}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobDetail.assignedTo' | translate}}</td>\\n                    <td>{{model.user}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'location.Label' | translate}}</td>\\n                    <td>{{model.location?.locationName}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'location.CoordinatesLabel' | translate}}</td>\\n                    <td>{{model.coordinates?.latitude}}, {{model.coordinates?.longitude}}</td>\\n                </tr>\\n                <tr *ngIf=\\\"model.quantity\\\">\\n                    <td>{{'sparePart.QuantityLabel' | translate}}</td>\\n                    <td>{{model.quantity}}</td>\\n                </tr>\\n                <tr *ngIf=\\\"model.fullCheck\\\">\\n                    <td>{{'jobRepair.FullCheckLabel' | translate}}</td>\\n                    <td>{{model.fullCheck ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr *ngIf=\\\"model.checkedLock\\\">\\n                    <td>{{'jobRepair.CheckedLockLabel' | translate}}</td>\\n                    <td>{{model.checkedLock ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr *ngIf=\\\"model.repairTime\\\">\\n                    <td>{{'jobRepair.RepairTimeLabel' | translate}}</td>\\n                    <td>{{model.repairTime}}</td>\\n                </tr>\\n                <tr *ngIf=\\\"model.comment\\\">\\n                    <td>{{'comment.Label' | translate}}</td>\\n                    <td>{{model.comment}}</td>\\n                </tr>\\n                </tbody>\\n            </table>\\n\\n            <div *ngIf=\\\"model.issues && model.issues.length > 0\\\">\\n                <h4>{{'jobCheck.CommentLabel' | translate}}</h4>\\n                <ul>\\n                    <li *ngFor=\\\"let issue of model.issues\\\">\\n                        {{issue}}\\n                    </li>\\n                </ul>\\n            </div>\\n\\n            <div *ngIf=\\\"model.categories && model.categories.length > 0\\\">\\n                <h4>{{'categories.Label' | translate}}</h4>\\n                <ul>\\n                    <li *ngFor=\\\"let category of model.categories\\\">\\n                        {{category}}\\n                    </li>\\n                </ul>\\n            </div>\\n\\n            <div *ngIf=\\\"model.spareParts && model.spareParts.length > 0\\\">\\n                <h4>{{'sparePart.Title' | translate}}</h4>\\n                <ul>\\n                    <li *ngFor=\\\"let category of model.spareParts\\\">\\n                        {{category}}\\n                    </li>\\n                </ul>\\n            </div>\\n\\n            <div class=\\\"modal-footer\\\">\\n                <button (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n            </div>\\n        </div>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-item.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-item.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-item.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"cm-bike-job-item .modal-header{border-bottom:none}cm-bike-job-item .modal-body{height:auto;overflow:auto}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export class CmProgressbarConfModel {\n    value: number = 20;\n    min: number = 20;\n    max: number = 100;\n    step: number = 20;\n    type = 'info';\n    delay: number = 500;\n}\n","module.exports = \"<div>\\n    <progressbar *ngIf=\\\"processing\\\" [max]=\\\"pbConf.max\\\" [value]=\\\"pbConf.value\\\" [type]=\\\"pbConf.type\\\">\\n        <span class=\\\"processing-span\\\">{{'excelReporting.processing' | translate}}</span>\\n    </progressbar>\\n    <button *ngIf=\\\"processing && !hideCancelButton\\\" class=\\\"cancel-button btn btn-info\\\" (click)=\\\"cancelReport()\\\">\\n        {{'excelReporting.cancelProcessing' | translate}}\\n    </button>\\n\\n    <div class=\\\"table-responsive\\\">\\n        <table id=\\\"archived-reports\\\" class=\\\"table table-striped\\\">\\n            <thead>\\n            <tr>\\n                <th>{{'extractReporting.detailField' | translate}}</th>\\n                <th>{{'extractReporting.dateRequestedField' | translate}}</th>\\n                <th>{{'extractReporting.actions' | translate}}</th>\\n            </tr>\\n            </thead>\\n            <tbody *ngIf=\\\"archivedReports\\\">\\n            <tr *ngFor=\\\"let report of archivedReports\\\">\\n                <td>{{report.shortDetails}}</td>\\n                <td>{{timestampToDateStr(report.timestampCreated)}}</td>\\n                <td>\\n                    <button class=\\\"delete glyphicon glyphicon-trash\\\"\\n                            [disabled]=\\\"!report.ready\\\"\\n                            (click)=\\\"removeArchivedReport(report); $event.stopPropagation()\\\"></button>\\n                    <button class=\\\"yellow glyphicon glyphicon-download\\\"\\n                            [disabled]=\\\"!report.ready\\\"\\n                            (click)=\\\"loadArchivedReport(report); $event.stopPropagation()\\\"\\n                            data-toggle=\\\"tooltip\\\" title=\\\"{{'damageMatrix.actionsDownloadBtn' | translate}}\\\">\\n                    </button>\\n                </td>\\n            </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./cm-report.component.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!./cm-report.component.css\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!./cm-report.component.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".processing-span {\\n    color:white;\\n    white-space:nowrap;\\n}\\n\\n.cancel-button {\\n    display: inline-block;\\n    width: 20%;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'bikeJobList.Title' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-bike\\\">{{'bike.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-bike\\\" type=\\\"text\\\" [ngModel]=\\\"filters.bikeNumber\\\" (ngModelChange)=\\\"filters.bikeNumber = $event; page = 1\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-bike-type-filter [(selectedTypes)]=\\\"filters.bikeTypes\\\"></cm-bike-type-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-type\\\">{{'bikesJobList.JobTypeLabel' | translate}}</label>\\n                <select class=\\\"form-control\\\" id=\\\"filter-type\\\" [ngModel]=\\\"filters.type\\\" (ngModelChange)=\\\"filters.type = $event; page = 1\\\">\\n                    <option *ngFor=\\\"let item of typeList\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n                </select>\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"priority-filter\\\">{{'priority.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"priority-filter\\\" type=\\\"number\\\" [ngModel]=\\\"filters.priority\\\" (ngModelChange)=\\\"filters.priority = $event; page = 1\\\" min=\\\"0\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-location-filter [location]=\\\"filters.location\\\" (changeLocation)=\\\"filters.location = $event; page = 1\\\"></cm-location-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-6 filter-has-location\\\">\\n                <label for=\\\"filter-has-location\\\">{{'bikesJobList.HasNoLocationLabel' | translate}}</label>\\n                <input id=\\\"filter-has-location\\\" type=\\\"checkbox\\\" [ngModel]=\\\"filters.haveNoLocation\\\" (ngModelChange)=\\\"filters.haveNoLocation = $event; page = 1\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-6 filter-bike-disabled\\\">\\n                <label for=\\\"filter-bike-disabled\\\">{{'bikesJobList.DisabledBikes' | translate}}</label>\\n                <input id=\\\"filter-bike-disabled\\\" type=\\\"checkbox\\\" [ngModel]=\\\"filters.disabledBikes\\\" (ngModelChange)=\\\"filters.disabledBikes = $event; page = 1\\\">\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div class=\\\"col-md-12\\\">\\n                <cm-users-filter [selectedEmployee]=\\\"filters.users\\\" (changeEmployee)=\\\"filters.users = $event; page = 1\\\"></cm-users-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-status-filter [selectedStatuses]=\\\"filters.status\\\" (changeStatus)=\\\"filters.status = $event; page = 1\\\"></cm-status-filter>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div>\\n                <div>\\n                    <cm-bike-branding-filter [selectedBrands]=\\\"filters.branding\\\"\\n                                             (selectedBrandsChange)=\\\"filters.branding = $event\\\"></cm-bike-branding-filter>\\n                </div>\\n                <div>\\n                    <label>{{'troubleTickets.CreationDateLabel' | translate}} {{'filterFrom.Label' | translate}}</label>\\n                    <datetimepicker [dateTimeValue]=\\\"filters.dateCreatedFrom\\\"\\n                                    (datePickerselect)=\\\"filters.dateCreatedFrom = $event; page = 1\\\">\\n                    </datetimepicker>\\n                </div>\\n                <div>\\n                    <label>{{'troubleTickets.CreationDateLabel' | translate}} {{'filterTo.Label' | translate}}</label>\\n                    <datetimepicker [dateTimeValue]=\\\"filters.dateCreatedTo\\\"\\n                                    (datePickerselect)=\\\"filters.dateCreatedTo = $event; page = 1\\\"></datetimepicker>\\n                </div>\\n                <div>\\n                    <label>{{'finishDate.Label' | translate}} {{'filterFrom.Label' | translate}}</label>\\n                    <datetimepicker [dateTimeValue]=\\\"filters.dateFinishedFrom\\\"\\n                                    (datePickerselect)=\\\"filters.dateFinishedFrom = $event; page = 1\\\"></datetimepicker>\\n                </div>\\n                <div>\\n                    <label>{{'finishDate.Label' | translate}} {{'filterTo.Label' | translate}}</label>\\n                    <datetimepicker [dateTimeValue]=\\\"filters.dateFinishedTo\\\"\\n                                    (datePickerselect)=\\\"filters.dateFinishedTo = $event; page = 1\\\"></datetimepicker>\\n                </div>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"loadData()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filter\\\" (click)=\\\"filters.clear(); page = 1\\\">{{'filters.ClearBtn' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('bike.bikeNumber')\\\">\\n                    <cm-sortable [label]=\\\"'bike.Label'\\\" [sort]=\\\"'bike.bikeNumber' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th *ngFor=\\\"let type of getBikeTypes()\\\" (click)=\\\"sort('quantities.' + type)\\\">\\n                    <cm-sortable [label]=\\\"'quantities.' + type\\\" [sort]=\\\"'quantities.' + type === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('task')\\\">\\n                    <cm-sortable [label]=\\\"'bikesJobList.JobTypeLabel'\\\" [sort]=\\\"'task' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('status')\\\">\\n                    <cm-sortable [label]=\\\"'troubleTickets.StatusLabel'\\\" [sort]=\\\"'status' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('priority')\\\">\\n                    <cm-sortable [label]=\\\"'priority.Label'\\\" [sort]=\\\"'priority' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('timeToFix')\\\">\\n                    <cm-sortable [label]=\\\"'location.fixTime'\\\" [sort]=\\\"'timeToFix' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('location.locationName')\\\">\\n                    <cm-sortable [label]=\\\"'location.Label'\\\" [sort]=\\\"'location.locationName' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th>{{'location.CoordinatesLabel' | translate}}</th>\\n                <th (click)=\\\"sort('user')\\\">\\n                    <cm-sortable [label]=\\\"'jobItem.AssignedToLabel'\\\" [sort]=\\\"'users' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('dateCreated')\\\">\\n                    <cm-sortable [label]=\\\"'troubleTickets.CreationDateLabel'\\\" [sort]=\\\"'dateCreated' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('dateAssigned')\\\">\\n                    <cm-sortable [label]=\\\"'assignmentDate.Label'\\\" [sort]=\\\"'dateAssigned' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('dateFinished')\\\">\\n                    <cm-sortable [label]=\\\"'finishDate.Label'\\\" [sort]=\\\"'dateFinished' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let row of jobItemList\\\">\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{row.bike?.bikeNumber}}\\n                </td>\\n                <td *ngFor=\\\"let type of getBikeTypes()\\\" (click)=\\\"showDetails(row)\\\">\\n                    {{getQuantity(row, type)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{getTaskName(row.task)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{getStatusName(row.status)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\" [ngClass]=\\\"{'priority-red' : row.priority === 1,\\n                                                       'priority-yellow' : row.priority === 2}\\\">\\n                    {{row.priority}}\\n                </td>\\n                <td>\\n                    <cm-hour-minute-countdown [start]=\\\"row.dateFinished || currentTimeStr\\\" [finish]=\\\"row.mustBeFixedAt\\\" [static]=\\\"!!row.dateFinished\\\"></cm-hour-minute-countdown>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{row.location?.locationName}}\\n                </td>\\n                <td>\\n                    <cm-show-on-map [type]=\\\"getLocationType()\\\" [entityId]=\\\"row.location?.locationId\\\" [bikeId]=\\\"row.bike?.bikeId\\\"></cm-show-on-map>\\n                </td>\\n                <td class=\\\"assign-td\\\" (click)=\\\"assign(row)\\\">\\n                    {{row.user}}\\n                    <span class=\\\"fa fa-pencil assign-icon\\\"></span>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{formatDate(row.dateCreated)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{formatDate(row.dateAssigned)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{formatDate(row.dateFinished)}}\\n                </td>\\n            </tr>\\n            <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n        </tbody>\\n    </table>\\n\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"setPage($event)\\\"></pager>\\n\\n    <button *ngIf='!childProcessing' id=\\\"extract\\\" (click)=\\\"dataExtract()\\\">{{'jobList.ExtractChangeOfJobAssignment' | translate}}</button>\\n    <button *ngIf='!childProcessing' id=\\\"extractToMove\\\" (click)=\\\"dataExtractMovingReport()\\\">{{'jobList.ExtractChangeOfJobMovements' | translate}}</button>\\n    <button *ngIf='!childProcessing' id=\\\"extractJobs\\\" (click)=\\\"jobsDataExtractReport()\\\">{{'report.jobList.ExtractJobsFullData' | translate}}</button>\\n    <cm-report #archivedrep [reportType]=\\\"reportType\\\" (processingAction)=\\\"processingMessage($event)\\\" (onListSize)=\\\"onListSize($event)\\\"></cm-report>\\n\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-list.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-list.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-job-list.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".filter-has-location{padding-top:10px}.filter-bike-disabled{padding-top:10px}.assign-td:hover{border-style:solid;border-top:solid}.assign-icon{padding-left:3px}.priority-red{background-color:red}.priority-yellow{background-color:yellow}.filter-status{width:15px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n  var i = buf && offset || 0;\n\n  if (typeof(options) == 'string') {\n    buf = options === 'binary' ? new Array(16) : null;\n    options = null;\n  }\n  options = options || {};\n\n  var rnds = options.random || (options.rng || rng)();\n\n  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n  rnds[6] = (rnds[6] & 0x0f) | 0x40;\n  rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n  // Copy bytes to buffer, if provided\n  if (buf) {\n    for (var ii = 0; ii < 16; ++ii) {\n      buf[i + ii] = rnds[ii];\n    }\n  }\n\n  return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n  return ([\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]]\n  ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","module.exports = \"<div>\\n    <ul class=\\\"pagination\\\" [ngClass]=\\\"{cursCm:true}\\\">\\n        <li [ngClass]=\\\"{disabled:_pager.currentPage === 1}\\\">\\n            <a (click)=\\\"setPage(1)\\\">{{'paging.FirstLabel' | translate}}</a>\\n        </li>\\n        <li [ngClass]=\\\"{disabled:_pager.currentPage === 1}\\\">\\n            <a (click)=\\\"setPage(_pager.currentPage - 1)\\\">{{'paging.PreviousLabel' | translate}}</a>\\n        </li>\\n        <li *ngFor=\\\"let page of _pager.pages\\\" [ngClass]=\\\"{active:_pager.currentPage === page}\\\">\\n            <a (click)=\\\"setPage(page)\\\">{{page}}</a>\\n        </li>\\n        <li [ngClass]=\\\"{disabled:_pager.currentPage === _pager.totalPages}\\\">\\n            <a (click)=\\\"setPage(_pager.currentPage + 1)\\\">{{'paging.NextLabel' | translate}}</a>\\n        </li>\\n        <li [ngClass]=\\\"{disabled:_pager.currentPage === _pager.totalPages}\\\">\\n            <a (click)=\\\"setPage(_pager.totalPages)\\\">{{'paging.LastLabel' | translate}}</a>\\n        </li>\\n    </ul>\\n</div>\";","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'troubleTickets.Title' | translate}}</h3>\\n\\n    <div id=\\\"trouble-tickets-filters\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <div>\\n                <label for=\\\"mission-type-id\\\">{{'mission.typeLabel' | translate}}</label>\\n                <select class=\\\"form-control\\\" id=\\\"mission-type-id\\\" [(ngModel)]=\\\"filters.type\\\">\\n                    <option *ngFor=\\\"let mission of missionTypes\\\" [value]=\\\"mission.key\\\">{{mission.label}}</option>\\n                </select>\\n            </div>\\n            <div>\\n                <label for=\\\"filter-id\\\">{{'troubleTickets.IdLabel' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-id\\\" type=\\\"number\\\" [(ngModel)]=\\\"filters.id\\\">\\n            </div>\\n\\n            <div class=\\\"row-top-margin\\\">\\n                <label for=\\\"filter-bike\\\">{{'bike.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-bike\\\" type=\\\"text\\\" [(ngModel)]=\\\"filters.bike\\\">\\n            </div>\\n\\n            <div>\\n                <cm-bike-type-filter [(selectedTypes)]=\\\"filters.bikeTypes\\\"></cm-bike-type-filter>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div>\\n                <cm-tt-category-filter [category]=\\\"filters.category\\\" [type]=\\\"filters.type\\\" (changeCategory)=\\\"filters.category = $event\\\">\\n                </cm-tt-category-filter>\\n            </div>\\n\\n            <div class=\\\"row-top-margin\\\">\\n                <cm-location-filter [location]=\\\"filters.location\\\"\\n                                    (changeLocation)=\\\"filters.location = $event\\\"></cm-location-filter>\\n            </div>\\n\\n            <div>\\n                <cm-bike-branding-filter [selectedBrands]=\\\"filters.branding\\\"\\n                (selectedBrandsChange)=\\\"filters.branding = $event\\\"></cm-bike-branding-filter>\\n            </div>\\n\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <cm-status-filter [selectedStatuses]=\\\"filters.statuses\\\" [dataSource]=\\\"'troubleTicketsStatus'\\\"\\n                              (changeStatus)=\\\"filters.statuses = $event\\\"></cm-status-filter>\\n\\n            <div>\\n                <label>{{'troubleTickets.CreationDateLabel' | translate}} {{'filterFrom.Label' | translate}}</label>\\n                <datetimepicker [dateTimeValue]=\\\"filters.dateFrom\\\" (datePickerselect)=\\\"filters.dateFrom = $event\\\">\\n                </datetimepicker>\\n            </div>\\n\\n            <div>\\n                <label>{{'troubleTickets.CreationDateLabel' | translate}} {{'filterTo.Label' | translate}}</label>\\n                <datetimepicker [dateTimeValue]=\\\"filters.dateTo\\\" (datePickerselect)=\\\"filters.dateTo = $event\\\"></datetimepicker>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear\\\" (click)=\\\"clearFilters()\\\">{{'filters.ClearBtn' | translate}}</button>\\n            <button id=\\\"add-new-bike-ticket\\\" (click)=\\\"addNewBikeTicket()\\\">{{'troubleTickets.AddBikeTicketLabel' | translate}}</button>\\n            <button id=\\\"add-new-location-ticket\\\" (click)=\\\"addNewLocationTicket()\\\">{{'troubleTickets.AddLocationTicketLabel' | translate}}</button>\\n            <!--button-- id=\\\"file-export\\\" (click)=\\\"exportTickets()\\\">{{'exportBtn.Label' | translate}}</button-->\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table table-striped clickable\\\">\\n        <thead>\\n        <tr>\\n            <th (click)=\\\"sort('id')\\\">\\n                <cm-sortable [label]=\\\"'troubleTickets.IdLabel'\\\"\\n                             [sort]=\\\"'id' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n\\n            <th (click)=\\\"sort('bike.bikeNumber')\\\">\\n                <cm-sortable [label]=\\\"'bike.Label'\\\"\\n                             [sort]=\\\"'bike.bikeNumber' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n\\n            <th (click)=\\\"sort('category')\\\">\\n                <cm-sortable [label]=\\\"'category.Label'\\\"\\n                             [sort]=\\\"'category' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n\\n            <th (click)=\\\"sort('issue')\\\">\\n                <cm-sortable [label]=\\\"'troubleTickets.DamageTextLabel'\\\"\\n                             [sort]=\\\"'issue' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n\\n            <th (click)=\\\"sort('location.locationName')\\\">\\n                <cm-sortable [label]=\\\"'location.Label'\\\"\\n                             [sort]=\\\"'location.locationName' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n\\n            <th (click)=\\\"sort('status')\\\">\\n                <cm-sortable [label]=\\\"'troubleTickets.StatusLabel'\\\"\\n                             [sort]=\\\"'status' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n            <th (click)=\\\"sort('priority')\\\">\\n                <cm-sortable [label]=\\\"'priority.Label'\\\"\\n                             [sort]=\\\"'priority' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n            <th (click)=\\\"sort('time')\\\">\\n                <cm-sortable [label]=\\\"'troubleTickets.CreationDateLabel'\\\"\\n                             [sort]=\\\"'time' === filters.sortField\\\"\\n                             [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n            </th>\\n            <th>\\n                <label>{{'troubleTickets.ConnectingTrip' | translate}}</label>\\n            </th>\\n        </tr>\\n        </thead>\\n\\n        <tbody>\\n        <tr *ngFor=\\\"let ticket of tickets\\\" (click)=\\\"openTicket(ticket)\\\">\\n            <td>\\n                {{ticket.id}}\\n            </td>\\n            <td>\\n                {{ticket.bike?.bikeNumber}}\\n            </td>\\n            <td>\\n                {{ticket.category}}\\n            </td>\\n            <td>\\n                {{substrText(ticket.issue)}}\\n            </td>\\n            <td>\\n                {{ticket.location?.locationName}}\\n            </td>\\n            <td>\\n                {{ticket.status}}\\n            </td>\\n            <td>\\n                {{ticket.priority}}\\n            </td>\\n            <td>\\n                {{formatTimestamp(ticket.time)}}\\n            </td>\\n            <td>\\n                {{userFormatTrip(ticket.firstTripInMinutes)}}\\n            </td>\\n        </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager #pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"setPage($event)\\\"></pager>\\n\\n    <button *ngIf='!childProcessing' id=\\\"submit-filter-form\\\" type=\\\"button\\\" class=\\\"btn btn-default\\\" (click)=\\\"exportTickets()\\\">{{'movements.XlsButtonLabel' | translate}}</button>\\n    <cm-report #archivedrep [reportType]=\\\"reportType\\\" (processingAction)=\\\"processingMessage($event)\\\" (onListSize)=\\\"onListSize($event)\\\"></cm-report>\\n    <br/>\\n    <br/>\\n    <br/>\\n\\n</div>\";","import {Serializable} from \"../../../shared/serializable\";\n\nexport class CmTripModel extends Serializable{\n    started: string;\n    finished: string;\n    fromLocation: ShortLocation;\n\n    fromCoordinates: Coordinates;\n    toLocation: ShortLocation;\n    toCoordinates: Coordinates;\n    duration: string;\n    minutes: number;\n    toFound: boolean;\n    fromFound: boolean;\n\n}\n\nclass ShortLocation {\n    locationId: number;\n    locationNumber: number;\n    locationName: string;\n}\n\nclass Coordinates {\n    latitude: string;\n    longitude: string;\n}\n\n","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-header\\\">\\n        <h4>\\n            {{ticketId > 0 ? ('troubleTicket.Title' | translate) + ' ' + ticketId : ('troubleTickets.AddLabel' |\\n            translate)}}\\n        </h4>\\n    </div>\\n    <div class=\\\"modal-body tt-window-body\\\">\\n        <div class=\\\"col-md-12\\\">\\n            <div class=\\\"col-md-7\\\">\\n                <div class=\\\"col-md-3\\\" style=\\\"float: left; padding-left: 0\\\" ><label>{{'troubleTickets.NoticeDateLabel' | translate}}</label></div>\\n                <div class=\\\"col-md-9\\\" style=\\\"padding-right: 0\\\"><datetimepicker [dateTimeValue]=\\\"ticket.time\\\" (datePickerselect)=\\\"setNoticeDate($event)\\\"></datetimepicker></div>\\n                <table class=\\\"table\\\" id=\\\"input-trouble-ticket-top\\\">\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.ReporterLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-reporter\\\" type=\\\"text\\\" maxlength=\\\"255\\\"[(ngModel)]=\\\"ticket.reporter\\\" (ngModelChange)=\\\"modelChanged = true\\\">\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.WhoCausedLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-who-caused\\\" type=\\\"text\\\" [(ngModel)]=\\\"ticket.whoCaused\\\" (ngModelChange)=\\\"modelChanged = true\\\">\\n                        </td>\\n                    </tr>\\n                    <tr *ngIf=\\\"isBikeTicketType()\\\">\\n                        <td>\\n                            {{'troubleTickets.BookingNumberLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-booking\\\" type=\\\"number\\\" [(ngModel)]=\\\"ticket.booking\\\" (ngModelChange)=\\\"modelChanged = true\\\">\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.CustomerIdLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-customer\\\" type=\\\"number\\\" [(ngModel)]=\\\"ticket.customer\\\" (ngModelChange)=\\\"modelChanged = true\\\">\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'priority.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <select class=\\\"form-control\\\" id=\\\"ticket-priority\\\" [(ngModel)]=\\\"ticket.priority\\\" (ngModelChange)=\\\"modelChanged = true\\\">\\n                                <option *ngFor=\\\"let el of priorityList\\\">{{el}}</option>\\n                            </select>\\n\\n                        </td>\\n                    </tr>\\n                </table>\\n            </div> <!-- div-col-8 end-->\\n            <div id=\\\"readonly-trouble-ticket\\\" class=\\\"col-md-5\\\"> <!--left -->\\n                <table class=\\\"table\\\">\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.StatusLabel' | translate}}\\n                        </td>\\n                        <td class=\\\"trouble-ticket-status\\\">\\n                            {{ticket.status}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.CreationDateLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            {{formatTimestamp(ticket.time)}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.CreatedHowLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            {{ticket.createdHow}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.CreatedByLabel' |translate}}\\n                        </td>\\n                        <td>\\n                            {{ticket.createdBy}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.ConnectingTrip' |translate}}\\n                        </td>\\n                        <td>\\n                            {{userFormatTrip(trip.minutes)}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.StartStation' |translate}}\\n                        </td>\\n                        <td>\\n                            {{getTripStart()}}\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.StopStation' |translate}}\\n                        </td>\\n                        <td>\\n                            {{getTripStop()}}\\n                        </td>\\n                    </tr>\\n                </table>\\n            </div><!--left end-->\\n            <div class=\\\"col-md-12\\\">\\n                <table class=\\\"table\\\" id=\\\"input-trouble-ticket-bottom\\\">\\n                    <tr *ngIf=\\\"isBikeTicketType()\\\">\\n                        <td>\\n                            {{'bike.Label' | translate}}*\\n                        </td>\\n                        <td>\\n                            <table class=\\\"table table-striped\\\" id=\\\"tt-bikes-table\\\">\\n                                <tbody>\\n                                <tr  [hidden]=\\\"ticket.bikes.length > 0 \\\"><td>\\n                                    <input class=\\\"form-control\\\" id=\\\"ticket-location-name2\\\" disabled value = \\\"&nbsp;\\\"\\n                                           [ngClass]=\\\"{'cm-block-border': ticket.bikes.length <= 0  &&  !isSavePressed , 'cm-block-border-warn' : ticket.bikes.length <= 0 &&  isSavePressed}\\\">\\n                                </td></tr>\\n                                    <tr *ngFor=\\\"let bike of ticket.bikes\\\">\\n                                        <td>\\n                                            {{bike.bikeNumber}}\\n                                        </td>\\n                                        <td>\\n                                            <button id=\\\"removeDamage\\\" class=\\\"btn btn-danger remove show_tip\\\" [disabled]=\\\"ticketId > 0\\\" (click)=\\\"removeBike(bike)\\\">\\n                                                <i class=\\\"fa fa-trash-o\\\"></i>\\n                                            </button>\\n                                        </td>\\n                                    </tr>\\n                                <div class=\\\"alert alert-danger\\\" [hidden]=\\\"ticket.bikes.length > 0 || !isSavePressed\\\">\\n                                    {{'validation.field.mandatory' | translate}}\\n                                </div>\\n                                </tbody>\\n                            </table>\\n                            <button id=\\\"open-bikes\\\" [disabled]=\\\"ticketId > 0\\\" (click)=\\\"openBikes()\\\">\\n                                {{'button.SearchLabel' | translate}}\\n                            </button>\\n                        </td>\\n                    </tr>\\n                    <tr *ngIf=\\\"isLocationTicketType()\\\">\\n                        <td>\\n                            {{'location.Label' | translate}}*\\n                        </td>\\n                        <td>\\n                            <input class=\\\"form-control\\\" id=\\\"ticket-location-name\\\" disabled [ngModel]=\\\"ticket.location?.locationName\\\"  [ngClass]=\\\"{'cm-block-border-warn': !ticket.location  && isSavePressed}\\\">\\n                            <div class=\\\"alert alert-danger\\\" [hidden]=\\\"ticket.location  || !isSavePressed\\\">\\n                                {{'validation.field.mandatory' | translate}}\\n                            </div>\\n                            <button class=\\\"trouble-ticket-search-button-modal\\\" id=\\\"open-locations\\\" [disabled]=\\\"ticketId > 0\\\" (click)=\\\"openLocations()\\\">\\n                                {{'button.SearchLabel' | translate}}\\n                            </button>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'location.CoordinatesLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <span *ngIf=\\\"ticket.coordinates\\\">{{ticket.coordinates.latitude}},\\n                                {{ticket.coordinates.longitude}}</span>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'category.Label' | translate}}\\n                        </td>\\n                        <td>\\n                            <cm-tt-category-filter [category]=\\\"ticket.category\\\" [type]=\\\"getMissionType()\\\" [showLabel]=\\\"false\\\" [additionalBikeCategory]=\\\"getAdditionalBikeCategory()\\\"\\n                                (changeCategory)=\\\"categoryChanged($event)\\\"></cm-tt-category-filter>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>\\n                            {{'troubleTickets.DamageTextLabel' | translate}}\\n                        </td>\\n                        <td>\\n                            <textarea rows=\\\"3\\\" class=\\\"form-control\\\" id=\\\"ticket-issue\\\" [(ngModel)]=\\\"ticket.issue\\\" (ngModelChange)=\\\"modelChanged = true\\\"></textarea>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'troubleTicket.EmailToCustomerLabel' | translate}}</td>\\n                        <td><input type=\\\"checkbox\\\" [(ngModel)]=\\\"emailToCustomer\\\" (ngModelChange)=\\\"modelChanged = true\\\"></td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'troubleTicket.EmailToDispatcherLabel' | translate}}</td>\\n                        <td><input type=\\\"checkbox\\\" [(ngModel)]=\\\"emailToDispatcher\\\" (ngModelChange)=\\\"modelChanged = true\\\"></td>\\n                    </tr>\\n\\n                </table>\\n                <div>\\n                    <cm-pictures [(pictures)]=\\\"ticket.pictureNames\\\" [readonly]=\\\"false\\\" [insideModalWindow]=\\\"true\\\"></cm-pictures>\\n                </div>\\n            </div> <!-- div 12 - end -->\\n        </div> <!-- div 12 - end -->\\n    </div> <!-- model-body end -->\\n    <div class=\\\"modal-footer\\\">\\n        <button id=\\\"save\\\" (click)=\\\"saveAndClose(validate())\\\">{{'button.SaveLabel' | translate}}</button>\\n        <button *ngIf=\\\"isBikeTicketType()\\\" id=\\\"link-to-hal\\\" (click)=\\\"linkToHal()\\\" [disabled]=\\\"!validate()\\\">{{'linkToHal.Label'\\n            | translate}}</button>\\n        <button id=\\\"turn-into-job\\\" (click)=\\\"turnIntoJob()\\\" [disabled]=\\\"!validate()\\\">{{'turnIntoJob.Label' | translate}}</button>\\n        <button id=\\\"close-ticket\\\" (click)=\\\"closeTicket()\\\" [disabled]=\\\"!validate()\\\">{{'closeTicket.Label' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-trouble-ticket.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-trouble-ticket.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-trouble-ticket.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#input-trouble-ticket-top td:first-child,#input-trouble-ticket-bottom td:first-child{width:30%;text-align:left;font-weight:bold}#input-trouble-ticket-top td:last-child,#input-trouble-ticket-bottom td:last-child{width:70%}#readonly-trouble-ticket td:first-child{text-align:left;font-weight:bold}.trouble-ticket-status{background-color:#ffe662}.trouble-ticket-search-button-modal{margin-top:0px}#tt-bikes-table td:first-child{width:70%;vertical-align:middle}.tt-window-body{height:700px;overflow:auto}.modal-wide{width:130%}.cm-warn{border-color:red}.cm-block-border{border:solid 1px black}.cm-block-border-warn{border:solid 1px red}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-body\\\" id=\\\"job-list-details-body\\\">\\n        <div class=\\\"col-md-12\\\">\\n            <h3 *ngIf=\\\"locationName\\\">{{locationName}}</h3>\\n            <h4 *ngIf=\\\"bikeNumber\\\">{{'bike.Label' | translate}} {{bikeNumber}} {{bikeStatus}}</h4>\\n            <table class=\\\"table table-striped\\\">\\n                <thead>\\n                <tr>\\n                    <th>{{'jobItem.JobLabel' | translate}}</th>\\n                    <th>{{'jobItem.AssignedToLabel' | translate}}</th>\\n                    <th *ngFor=\\\"let type of getBikeTypes()\\\">\\n                        {{'quantities.' + type | translate}}\\n                    </th>\\n                    <th>{{'location.fixTime' | translate}}</th>\\n                    <th class=\\\"center-align\\\">\\n                        <input type=\\\"checkbox\\\" [(ngModel)]=\\\"checkAll\\\" (ngModelChange)=\\\"selectAll()\\\">\\n                    </th>\\n                </tr>\\n                </thead>\\n\\n                <tbody>\\n                <tr *ngFor=\\\"let item of jobItemList\\\">\\n                    <td>\\n                        {{getText(item)}}\\n                    </td>\\n                    <td>\\n                        {{item.user}}\\n                    </td>\\n                    <td *ngFor=\\\"let type of getBikeTypes()\\\">\\n                        {{getQuantity(item, type)}}\\n                    </td>\\n                    <td>\\n                        <cm-hour-minute-countdown [start]=\\\"item.dateFinished || currentTimeStr\\\" [finish]=\\\"item.mustBeFixedAt\\\" [static]=\\\"!!item.dateFinished\\\"></cm-hour-minute-countdown>\\n                    </td>\\n                    <td class=\\\"center-align\\\">\\n                        <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.checked\\\">\\n                    </td>\\n                </tr>\\n                </tbody>\\n            </table>\\n        </div>\\n\\n        <div class=\\\"modal-footer\\\">\\n            <div>\\n                <button id=\\\"assign\\\" (click)=\\\"assign()\\\">{{'jobItem.AssignBtn' | translate}}</button>\\n                <button id=\\\"unassign\\\" (click)=\\\"unassign()\\\">{{'unassign.Label' | translate}}</button>\\n                <button *ngIf=\\\"isBikeValid()\\\" id=\\\"create-btt\\\"\\n                        (click)=\\\"addNewBikeTicket()\\\">{{'createTT.Label' | translate}}</button>\\n                <button *ngIf=\\\"isLocationValid()\\\" id=\\\"create-ltt\\\"\\n                        (click)=\\\"addNewLocationTicket()\\\">{{'createTT.Label' | translate}}</button>\\n                <button id=\\\"close\\\" *ngIf=\\\"showClose\\\" (click)=\\\"closeJobItem()\\\">{{'button.Close' | translate}}</button>\\n            </div>\\n        </div>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-item.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-item.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-item.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#job-list-details-body{height:auto;overflow:auto}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<div class=\\\"col-md-12\\\">\\n    <h3>{{'outsideJob.Title' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <cm-district-filter [district]=\\\"filtersSorters.district\\\" (changeDistrict)=\\\"changeDistrict($event)\\\"></cm-district-filter>\\n        </div>\\n        <div class=\\\"col-md-4\\\">\\n            <cm-location-filter [location]=\\\"filtersSorters.locations\\\" (changeLocation)=\\\"filtersSorters.locations = $event\\\"></cm-location-filter>\\n        </div>\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"priority-filter\\\">{{'priority.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"priority-filter\\\" type=\\\"number\\\" min=\\\"0\\\" [(ngModel)]=\\\"filtersSorters.priority\\\">\\n        </div>\\n        <div class=\\\"col-md-6\\\">\\n            <cm-users-filter [selectedEmployee]=\\\"filtersSorters.users\\\" (changeEmployee)=\\\"filtersSorters.users = $event\\\"></cm-users-filter>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\">\\n            <cm-bike-branding-filter [selectedBrands]=\\\"filtersSorters.branding\\\"\\n                                     (selectedBrandsChange)=\\\"filtersSorters.branding = $event\\\" ></cm-bike-branding-filter>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filter\\\" (click)=\\\"clearFilters()\\\">{{'filters.ClearBtn' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"col-md-12 table table-striped clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('location.district')\\\">\\n                    <cm-sortable [label]=\\\"'locations.DistrictLabel'\\\" [sort]=\\\"'location.district' === filtersSorters.sortField\\\"\\n                        [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('location.locationName')\\\">\\n                    <cm-sortable [label]=\\\"'jobList.LocationsLabel'\\\" [sort]=\\\"'location.locationName' === filtersSorters.sortField\\\"\\n                        [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('priority')\\\">\\n                    <cm-sortable [label]=\\\"'priority.Label'\\\" [sort]=\\\"'priority' === filtersSorters.sortField\\\" [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th *ngFor=\\\"let type of getBikeTypes()\\\" (click)=\\\"sort('quantities.' + type)\\\">\\n                    <cm-sortable [label]=\\\"'quantities.' + type\\\" [sort]=\\\"'quantities.' + type === filtersSorters.sortField\\\" [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('toWs')\\\">\\n                    <cm-sortable [label]=\\\"'outsideJob.ToWsLabel'\\\" [sort]=\\\"'toWs' === filtersSorters.sortField\\\" [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('check')\\\">\\n                    <cm-sortable [label]=\\\"'outsideJob.CheckLabel'\\\" [sort]=\\\"'check' === filtersSorters.sortField\\\"\\n                        [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('charge')\\\">\\n                    <cm-sortable [label]=\\\"'bikesJobListType.list.TO_CHARGE'\\\" [sort]=\\\"'charge' === filtersSorters.sortField\\\"\\n                                 [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('timeToFix')\\\">\\n                    <cm-sortable [label]=\\\"'location.fixTime'\\\" [sort]=\\\"'timeToFix' === filtersSorters.sortField\\\" [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('assign')\\\">\\n                    <cm-sortable [label]=\\\"'assignJob.AssignBtn'\\\" [sort]=\\\"'assign' === filtersSorters.sortField\\\" [state]=\\\"filtersSorters.sortDirection\\\"></cm-sortable>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let row of jobList\\\" (click)=\\\"openLocation(row)\\\">\\n                <td>\\n                    {{row.location?.district}}\\n                </td>\\n                <td>\\n                    {{row.location?.locationName}}\\n                </td>\\n                <td>\\n                    {{row.priority}}\\n                </td>\\n                <td *ngFor=\\\"let type of getBikeTypes()\\\">\\n                    {{getQuantity(row, type)}}\\n                </td>\\n                <td>\\n                    {{row.toWs}}\\n                </td>\\n                <td>\\n                    {{row.check}}\\n                </td>\\n                <td>\\n                    {{row.charge}}\\n                </td>\\n                <td>\\n                    <cm-hour-minute-countdown [start]=\\\"row.dateFinished || currentTimeStr\\\" [finish]=\\\"row.mustBeFixedAt\\\" [static]=\\\"!!row.dateFinished\\\"></cm-hour-minute-countdown>\\n                </td>\\n                <td>\\n                    <span *ngFor=\\\"let item of row.assignedTo\\\">{{item}}<br></span>\\n                </td>\\n            </tr>\\n        </tbody>\\n        <tfoot>\\n            <tr>\\n                <td>{{'table.sum' | translate}}</td>\\n                <td>{{tableSummary?.location}}</td>\\n                <td></td>\\n                <td *ngFor=\\\"let type of getBikeTypes()\\\">\\n                    {{getQuantity(tableSummary, type)}}\\n                </td>\\n                <td>{{tableSummary?.toWs}}</td>\\n                <td>{{tableSummary?.check}}</td>\\n                <td>{{tableSummary?.charge}}</td>\\n            </tr>\\n        </tfoot>\\n    </table>\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"setPage($event)\\\"></pager>\\n    <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".table tfoot{font-weight:bold}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<div class=\\\"col-md-12\\\">\\n\\n    <h3>{{'jobList.LocationsLabel' | translate}}</h3>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"filter-text\\\">{{'filter.Label' | translate}}</label>\\n        <input class=\\\"form-control\\\" id=\\\"filter-text\\\" type=\\\"text\\\" [(ngModel)]=\\\"filter.like\\\">\\n    </div>\\n    <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n        <button (click)=\\\"loadData()\\\">{{'filter.Label' | translate}}</button>\\n    </div>\\n\\n    <table class=\\\"table table-striped clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('locationNumber')\\\">\\n                    <cm-sortable [label]=\\\"'locations.AniLabel'\\\" [sort]=\\\"'locationNumber' === filter.sortField\\\" [state]=\\\"filter.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('locationName')\\\">\\n                    <cm-sortable [label]=\\\"'locations.NameLabel'\\\" [sort]=\\\"'locationName' === filter.sortField\\\" [state]=\\\"filter.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('district')\\\">\\n                    <cm-sortable [label]=\\\"'locations.DistrictLabel'\\\" [sort]=\\\"'district' === filter.sortField\\\" [state]=\\\"filter.sortDirection\\\"></cm-sortable>\\n                </th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let location of locationList\\\" (click)=\\\"openLocation(location)\\\">\\n                <td>\\n                    <span  *ngIf=\\\"locationsService.isLocationActive(location)\\\">{{location.locationNumber}}</span>\\n                    <span class=\\\"pale\\\" *ngIf=\\\"!locationsService.isLocationActive(location)\\\">{{location.locationNumber}}</span>\\n                </td>\\n                <td>\\n                    <span  *ngIf=\\\"locationsService.isLocationActive(location)\\\">{{location.locationName ? location.locationName : location.fullName}}</span>\\n                    <span class=\\\"pale\\\" *ngIf=\\\"!locationsService.isLocationActive(location)\\\">{{location.locationName ? location.locationName : location.fullName}}</span>\\n                </td>\\n                <td>\\n                    <span  *ngIf=\\\"locationsService.isLocationActive(location)\\\">{{location.district}}</span>\\n                    <span class=\\\"pale\\\" *ngIf=\\\"!locationsService.isLocationActive(location)\\\">{{location.district}}</span>\\n                </td>\\n            </tr>\\n            <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" [pageNo] = \\\"page\\\"  (page)=\\\"setPage($event)\\\"></pager>\\n</div>\\n\";","module.exports = \"<span defaultOverlayTarget xmlns=\\\"http://www.w3.org/1999/html\\\"></span>\\n\\n<div class=\\\"col-md-12\\\">\\n\\n    <div *ngIf=\\\"location\\\">\\n        <h3>{{location.locationNumber}} - {{location.fullName}}</h3>\\n\\n        <h4>{{'locations.BasicDataTitle' | translate}}</h4>\\n\\n        <table class=\\\"col-md-12 table\\\">\\n            <tbody>\\n            <tr>\\n                <td>{{'locations.AniLabel' | translate}}</td>\\n                <td>{{location.locationNumber}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'locations.DistrictLabel' | translate}}</td>\\n                <td>{{location.district}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'locations.NameLabel' | translate}}</td>\\n                <td>{{location.fullName}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'location.PostalCodeLabel' | translate}}</td>\\n                <td>{{location.postalCode}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'location.CoordinatesLabel' | translate}}</td>\\n                <td>{{location.coordinates?.latitude}}, {{location.coordinates?.longitude}}</td>\\n            </tr>\\n\\n            <tr *ngIf=\\\"allowedToEditSettings()\\\">\\n                <td>{{'location.statusActiveLabel' | translate}}</td>\\n                <td>\\n                    <label class=\\\"switch\\\">\\n                        <input type=\\\"checkbox\\\" [defaultChecked]=\\\"locationService.isLocationActive(location)\\\" (change)=\\\"changeLocationStatus($event)\\\">\\n                        <span class=\\\"slider round\\\"></span>\\n                    </label>\\n                </td>\\n            </tr>\\n\\n            </tbody>\\n        </table>\\n\\n        <div class=\\\"col-md-6\\\"><h2><b>{{'bikeType.Fahrrad'   | translate}}</b></h2></div>\\n        <div class=\\\"col-md-6\\\"><h4>{{'locations.CapacityTitle' | translate}}</h4></div>\\n\\n        <div *ngIf=\\\"intervalDefault\\\">\\n            <div *ngIf=\\\"intervalCurrent\\\">\\n                <table class=\\\"col-md-12 table\\\">\\n                    <tbody>\\n                    <tr>\\n                        <td></td>\\n                        <td>{{'location.DefaultValueLabel' | translate}}</td>\\n                        <td>\\n                            <div *ngIf=\\\"allowedToEditSettings()\\\">\\n\\n                                <span class='loc-component-set-interval'>{{'location.SetIntervalLabel' | translate}}</span>\\n\\n                                <cm-hour-minute\\n                                        [duration]=\\\"intervalCurrent.startTime\\\"\\n                                        (outDuration)=\\\"intervalCurrent.startTime = $event\\\" [durationTimeUnits]=\\\"'m'\\\"\\n                                        [readonly]=\\\"!allowedToEditSettings()\\\"\\n                                >\\n                                </cm-hour-minute>\\n                                --\\n                                <cm-hour-minute\\n                                        [duration]=\\\"intervalCurrent.finishTime\\\"\\n                                        (outDuration)=\\\"intervalCurrent.finishTime = $event\\\" [durationTimeUnits]=\\\"'m'\\\"\\n                                        [readonly]=\\\"!allowedToEditSettings()\\\"\\n                                >\\n                                </cm-hour-minute>\\n                            </div>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MinLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='location-min' [value]='intervalDefault.min'\\n                                             (setVal)='intervalDefault.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"intervalDefault.minFixTime\\\"\\n                                    (outDuration)=\\\"intervalDefault.minFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='interval-min' [value]='intervalCurrent.min'\\n                                             (setVal)='intervalCurrent.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"intervalCurrent.minFixTime\\\"\\n                                    (outDuration)=\\\"intervalCurrent.minFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMin.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='location-threshold-min' [value]='intervalDefault.thresholdMin'\\n                                             (setVal)='intervalDefault.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='interval-threshold-min' [value]='intervalCurrent.thresholdMin'\\n                                             (setVal)='intervalCurrent.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.ReorderedValueLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='location-optimum' [value]='intervalDefault.optimum'\\n                                             (setVal)='intervalDefault.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='interval-optimum' [value]='intervalCurrent.optimum'\\n                                             (setVal)='intervalCurrent.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMax.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='location-threshold-max' [value]='intervalDefault.thresholdMax'\\n                                             (setVal)='intervalDefault.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='interval-threshold-max' [value]='intervalCurrent.thresholdMax'\\n                                             (setVal)='intervalCurrent.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MaxLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='location-max' [value]='intervalDefault.max'\\n                                             (setVal)='intervalDefault.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"intervalDefault.maxFixTime\\\"\\n                                    (outDuration)=\\\"intervalDefault.maxFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='interval-max' [value]='intervalCurrent.max'\\n                                             (setVal)='intervalCurrent.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"intervalCurrent.maxFixTime\\\"\\n                                    (outDuration)=\\\"intervalCurrent.maxFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                </table>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\"><h2><b>{{'bikeType.PEDELEC'   | translate}}</b></h2></div>\\n        <div class=\\\"col-md-6\\\"><h4>{{'locations.CapacityTitle' | translate}}</h4></div>\\n\\n        <div *ngIf=\\\"pedelecIntervalDefault\\\">\\n            <div *ngIf=\\\"pedelecIntervalCurrent\\\">\\n                <table class=\\\"col-md-12 table\\\">\\n                    <tbody>\\n                    <tr>\\n                        <td></td>\\n                        <td>{{'location.DefaultValueLabel' | translate}}</td>\\n                        <td>\\n                            <span class='loc-component-set-interval'>{{'location.SetIntervalLabel' | translate}}</span>\\n\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalCurrent.startTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalCurrent.startTime = $event\\\" [durationTimeUnits]=\\\"'m'\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                            --\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalCurrent.finishTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalCurrent.finishTime = $event\\\"\\n                                    [durationTimeUnits]=\\\"'m'\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MinLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='pedelic-default-min' [value]='pedelecIntervalDefault.min'\\n                                             (setVal)='pedelecIntervalDefault.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalDefault.minFixTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalDefault.minFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-interval-min' [value]='pedelecIntervalCurrent.min'\\n                                             (setVal)='pedelecIntervalCurrent.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalCurrent.minFixTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalCurrent.minFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMin.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-location-threshold-min'\\n                                             [value]='pedelecIntervalDefault.thresholdMin'\\n                                             (setVal)='pedelecIntervalDefault.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-interval-threshold-min'\\n                                             [value]='pedelecIntervalCurrent.thresholdMin'\\n                                             (setVal)='pedelecIntervalCurrent.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.ReorderedValueLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-location-optimum' [value]='pedelecIntervalDefault.optimum'\\n                                             (setVal)='pedelecIntervalDefault.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-interval-optimum' [value]='pedelecIntervalCurrent.optimum'\\n                                             (setVal)='pedelecIntervalCurrent.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMax.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-location-threshold-max'\\n                                             [value]='pedelecIntervalDefault.thresholdMax'\\n                                             (setVal)='pedelecIntervalDefault.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-interval-threshold-max'\\n                                             [value]='pedelecIntervalCurrent.thresholdMax'\\n                                             (setVal)='pedelecIntervalCurrent.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MaxLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-location-max' [value]='pedelecIntervalDefault.max'\\n                                             (setVal)='pedelecIntervalDefault.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalDefault.maxFixTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalDefault.maxFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='pedelec-interval-max' [value]='pedelecIntervalCurrent.max'\\n                                             (setVal)='pedelecIntervalCurrent.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"pedelecIntervalCurrent.maxFixTime\\\"\\n                                    (outDuration)=\\\"pedelecIntervalCurrent.maxFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                </table>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\"><h2><b>{{'bikeType.CARGOPEDELEC'   | translate}}</b></h2></div>\\n        <div class=\\\"col-md-6\\\"><h4>{{'locations.CapacityTitle' | translate}}</h4></div>\\n\\n        <div *ngIf=\\\"cargoIntervalDefault\\\">\\n            <div *ngIf=\\\"cargoIntervalCurrent\\\">\\n                <table class=\\\"col-md-12 table\\\">\\n                    <tbody>\\n                    <tr>\\n                        <td></td>\\n                        <td>{{'location.DefaultValueLabel' | translate}}</td>\\n                        <td>\\n                            <span class='loc-component-set-interval'>{{'location.SetIntervalLabel' | translate}}</span>\\n\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalCurrent.startTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalCurrent.startTime = $event\\\" [durationTimeUnits]=\\\"'m'\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                            --\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalCurrent.finishTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalCurrent.finishTime = $event\\\" [durationTimeUnits]=\\\"'m'\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MinLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='cargo-default-min' [value]='cargoIntervalDefault.min'\\n                                             (setVal)='cargoIntervalDefault.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalDefault.minFixTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalDefault.minFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='cargo-interval-min' [value]='cargoIntervalCurrent.min'\\n                                             (setVal)='cargoIntervalCurrent.min = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalCurrent.minFixTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalCurrent.minFixTime = $event\\\" [readonly]=\\\"!allowedToEditSettings()\\\" >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMin.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='cargo-location-threshold-min'\\n                                             [value]='cargoIntervalDefault.thresholdMin'\\n                                             (setVal)='cargoIntervalDefault.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='cargo-interval-threshold-min'\\n                                             [value]='cargoIntervalCurrent.thresholdMin'\\n                                             (setVal)='cargoIntervalCurrent.thresholdMin = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.ReorderedValueLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='cargo-location-optimum' [value]='cargoIntervalDefault.optimum'\\n                                             (setVal)='cargoIntervalDefault.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='cargo-interval-optimum' [value]='cargoIntervalCurrent.optimum'\\n                                             (setVal)='cargoIntervalCurrent.optimum = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'thresholdMax.Label' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='cargo-location-threshold-max'\\n                                             [value]='cargoIntervalDefault.thresholdMax'\\n                                             (setVal)='cargoIntervalDefault.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='cargo-interval-threshold-max'\\n                                             [value]='cargoIntervalCurrent.thresholdMax'\\n                                             (setVal)='cargoIntervalCurrent.thresholdMax = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                        </td>\\n                    </tr>\\n                    <tr>\\n                        <td>{{'locations.MaxLabel' | translate}}</td>\\n                        <td>\\n                            <cm-valid-number id='cargo-location-max' [value]='cargoIntervalDefault.max'\\n                                             (setVal)='cargoIntervalDefault.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalDefault.maxFixTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalDefault.maxFixTime = $event\\\"\\n                                    [readonly]=\\\"!allowedToEditSettings()\\\" >\\n                            </cm-hour-minute>\\n                        </td>\\n                        <td>\\n                            <cm-valid-number id='cargo-interval-max' [value]='cargoIntervalCurrent.max'\\n                                             (setVal)='cargoIntervalCurrent.max = $event'\\n                                             [max]='maxValue' [validatableList]='validList' [minShow]=0\\n                                             [readonly]=\\\"!allowedToEditSettings()\\\"\\n                            >\\n                            </cm-valid-number>\\n                            <span class='loc-component-set-interval'>{{'location.fixTime' | translate}}</span>\\n                            <cm-hour-minute\\n                                    [duration]=\\\"cargoIntervalCurrent.maxFixTime\\\"\\n                                    (outDuration)=\\\"cargoIntervalCurrent.maxFixTime = $event\\\" [readonly]=\\\"!allowedToEditSettings()\\\" >\\n                            </cm-hour-minute>\\n                        </td>\\n                    </tr>\\n                </table>\\n            </div>\\n        </div>\\n\\n    </div>\\n\\n    <button *ngIf=\\\"allowedToEditSettings()\\\" id='save' (click)='save()'>{{'button.SaveLabel' | translate}}</button>\\n    <button id='close' (click)='close()'>{{'button.Close' | translate}}</button>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-location-item.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-location-item.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-location-item.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".loc-component-set-interval{margin-right:10px}.loc-component-interval-input{width:40px}.switch{position:relative;display:inline-block;width:60px;height:24px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\\\"\\\";height:18px;width:18px;left:4px;bottom:4px;background-color:white;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2196F3}input:focus+.slider{box-shadow:0 0 1px #2196F3}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(33px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'menu.InventoryLabel' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-station\\\">{{'menu.ChooseStationLabel' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-station\\\" [(ngModel)]=\\\"filters.station\\\">\\n                <option *ngFor=\\\"let station of stationList\\\" [value]=\\\"station.name\\\">{{station.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-id\\\">{{'articleNumber.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"filter-id\\\" [(ngModel)]=\\\"filters.articleNumber\\\">\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-category\\\">{{'category.Label' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-category\\\" [(ngModel)]=\\\"filters.category\\\" (ngModelChange)=\\\"loadInventoryPart()\\\">\\n                <option *ngFor=\\\"let category of categories\\\" [value]=\\\"category.name\\\">{{category.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-part\\\">{{'sparePart.PartLabel' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-part\\\" [(ngModel)]=\\\"filters.part\\\">\\n                <option *ngFor=\\\"let part of parts\\\" [value]=\\\"part.name\\\">{{part.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-free-text\\\">{{'text.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"filter-free-text\\\" [(ngModel)]=\\\"filters.freeText\\\">\\n        </div>\\n\\n        <div class=\\\"col-md-2\\\">\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\" [(ngModel)]=\\\"filters.showHidden\\\" (click)=\\\"reloadCategories(false)\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox100\\\">{{'filters.showHidden' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-2\\\">\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkboxCities\\\" [(ngModel)]=\\\"filters.showAllCities\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkboxCities\\\">{{'filters.showAllCities' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\">\\n            <label>{{'finishDate.Label' | translate}} {{'filterFrom.Label' | translate}}</label>\\n            <datetimepicker [dateTimeValue]=\\\"filters.dateMovingStarted\\\"\\n                            (datePickerselect)=\\\"filters.dateMovingStarted = $event\\\"></datetimepicker>\\n        </div>\\n        <div class=\\\"col-md-6\\\">\\n            <label>{{'finishDate.Label' | translate}} {{'filterTo.Label' | translate}}</label>\\n            <datetimepicker [dateTimeValue]=\\\"filters.dateMovingFinished\\\"\\n                            (datePickerselect)=\\\"filters.dateMovingFinished = $event\\\"></datetimepicker>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filters\\\" (click)=\\\"clearFilters()\\\">{{'filters.ClearBtn' | translate}}</button>\\n            <button id=\\\"add-group\\\" *ngIf=\\\"canAddSparePart()\\\" (click)=\\\"addGroup()\\\">{{'inventory.AddGroupBtn' | translate}}</button>\\n            <button id=\\\"add-part\\\" *ngIf=\\\"canAddSparePart()\\\" (click)=\\\"addPart()\\\">{{'inventory.AddMaterialBtn' | translate}}</button>\\n            <button id=\\\"create-movement\\\" *ngIf=\\\"canAddStockMovement()\\\" (click)=\\\"createMovement()\\\">\\n                {{'inventory.CreateMovementLabel' | translate}}\\n            </button>\\n            <button id=\\\"export-part\\\" (click)=\\\"exportData()\\\">{{'exportBtn.Label' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <div *ngIf=\\\"allowedToEditSettings()\\\"  class=\\\"col-md-12\\\">\\n        <!--div class=\\\"pull-left\\\">\\n            <div>{{'inventarSettings.exportFileLabel' | translate}}</div>\\n            <button (click)=\\\"loadReportCsv()\\\"\\n                    class=\\\"btn btn-default glyphicon glyphicon-download\\\">\\n                {{'button.DownloadLabel' | translate}}\\n            </button>\\n        </div-->\\n        <div class=\\\"pull-right\\\">\\n            <div>{{'inventarSettings.importFileLabel' | translate}}</div>\\n            <input id=\\\"choose-file\\\" type=\\\"file\\\" (change)=\\\"uploadFileChoose($event)\\\" class=\\\"inputfile-csv\\\" accept=\\\".csv\\\"/>\\n            <label class=\\\"btn btn-default\\\" for=\\\"choose-file\\\">{{csvFileName}}</label>\\n            <button (click)=\\\"uploadCSVasJSON()\\\"\\n                    class=\\\"btn btn-default glyphicon glyphicon-upload\\\"\\n                    [disabled]=\\\"!csvFile || !csvFileName\\\">\\n                {{'button.UploadLabel' | translate}}\\n            </button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table table-striped clickable\\\" id=\\\"spare-part-table\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('articleNumber')\\\">\\n                    <cm-sortable [label]=\\\"'articleNumber.Label'\\\" [sort]=\\\"'articleNumber' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('category')\\\">\\n                    <cm-sortable [label]=\\\"'category.Label'\\\" [sort]=\\\"'category' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('part')\\\">\\n                    <cm-sortable [label]=\\\"'sparePart.PartLabel'\\\" [sort]=\\\"'part' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('quantity')\\\">\\n                    <cm-sortable [label]=\\\"'sparePart.QuantityLabel'\\\" [sort]=\\\"'quantity' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let sparePart of spareParts\\\" (click)=\\\"openSparePart(sparePart)\\\">\\n                <td>\\n                    {{sparePart.articleNumber}}\\n                </td>\\n                <td>\\n                    {{sparePart.category}}\\n                </td>\\n                <td>\\n                    {{sparePart.part}}\\n                </td>\\n                <td>\\n                    {{sparePart.quantity}}\\n                </td>\\n            </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" [pageNo]=\\\"page\\\"  (page)=\\\"setPage($event)\\\" (pager)=\\\"onPager($event)\\\"></pager>\\n\\n    <button *ngIf='!childProcessing' id=\\\"advanced-export\\\" (click)=\\\"loadReportCsv()\\\">{{'exportAdvancedBtn.Label' | translate}}</button>\\n    <cm-report #archivedrep [reportType]=\\\"reportType\\\" (processingAction)=\\\"processingMessage($event)\\\" (onListSize)=\\\"onListSize($event)\\\"></cm-report>\\n</div>\\n\";","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"part-category\\\">{{'category.Label' | translate}} *</label>\\n        <select class=\\\"form-control\\\" id=\\\"part-category\\\" [(ngModel)]=\\\"model.category\\\"\\n                (ngModelChange)=\\\"loadInventoryPart()\\\" required name = \\\"category\\\" #category = ngModel [ngClass]=\\\"{'cm-warn':category.invalid && isSavePressed}\\\">\\n            <option *ngFor=\\\"let item of categories\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"part-part\\\">{{'sparePart.PartLabel' | translate}} *</label>\\n        <select class=\\\"form-control\\\" id=\\\"part-part\\\" [(ngModel)]=\\\"model.part\\\" required name = \\\"part\\\" #part = ngModel [ngClass]=\\\"{'cm-warn':part.invalid && isSavePressed}\\\">\\n            <option *ngFor=\\\"let item of parts\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"movement-from\\\">{{'inventory.FromLabel' | translate}} *</label>\\n        <select class=\\\"form-control\\\" id=\\\"movement-from\\\" [(ngModel)]=\\\"model.from\\\" required name = \\\"from\\\" #from = ngModel [ngClass]=\\\"{'cm-warn':from.invalid && isSavePressed}\\\"> ------\\n            <option *ngFor=\\\"let item of stationFromList\\\" [value]=\\\"item.name\\\">{{item.text | translate}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"movement-to\\\">{{'inventory.ToLabel' | translate}} *</label>\\n        <select class=\\\"form-control\\\" id=\\\"movement-to\\\" [(ngModel)]=\\\"model.to\\\" required name = \\\"to\\\" #to = ngModel [ngClass]=\\\"{'cm-warn':to.invalid && isSavePressed}\\\"> -------\\n            <option *ngFor=\\\"let item of stationToList\\\" [value]=\\\"item.name\\\">{{item.text | translate}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"movement-quantity\\\">{{'sparePart.QuantityLabel' | translate}} *</label>\\n        <input class=\\\"form-control\\\" id=\\\"movement-quantity\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.quantity\\\" required name = \\\"quantity\\\" #quantity = ngModel [ngClass]=\\\"{'cm-warn':quantity.invalid && isSavePressed}\\\">\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"movement-quantity-type\\\">{{'inventory.QuantityTypeLabel' | translate}}</label>\\n        <select class=\\\"form-control\\\" id=\\\"movement-quantity-type\\\" [(ngModel)]=\\\"model.quantityType\\\">\\n            <option *ngFor=\\\"let item of quantityTypeList\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n        </select>\\n    </div>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"movement-comment\\\">{{'comment.Label' | translate}}</label>\\n        <textarea class=\\\"form-control\\\" id=\\\"movement-comment\\\" [(ngModel)]=\\\"model.comment\\\"></textarea>\\n    </div>\\n\\n    <div>\\n        <button id=\\\"save\\\" (click)=\\\"save(category.valid && part.valid && quantity.valid && from.valid && to.valid )\\\">{{'button.SaveLabel' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\";","module.exports = \"<span *ngIf=\\\"!modalDialog\\\" defaultOverlayTarget></span>\\n\\n<div class=\\\"modal-body\\\">\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"cat-name\\\">{{'category.Label' |translate}} *</label>\\n        <input color=\\\"lime\\\" class=\\\"form-control\\\" id=\\\"cat-name\\\" type=\\\"text\\\" [(ngModel)]=\\\"category.code\\\" required pattern=\\\"^(\\\\S+).*\\\" name = \\\"code\\\" #code = ngModel\\n               (ngModelChange)=\\\"onNameChange()\\\" maxlength=\\\"255\\\" [ngClass]=\\\"{'cm-warn':code.invalid && isSavePressed}\\\">\\n        <div [hidden]=\\\"code.valid || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n            {{'damageCategoryConfig.EmptyFieldLabel' | translate}}\\n        </div>\\n    </div>\\n\\n    <div>\\n        <button id=\\\"save\\\" (click)=\\\"save(code.valid)\\\" >{{'button.SaveLabel' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\";","export class CmSparePart {\n    id: number;\n    category: string;\n    categoryId: number;\n    categoryCode: string;\n    quantity: number;\n    part: string;\n    barcode: string;\n    supplier: string;\n    description: string;\n    pictures: string[];\n    articleNumber: string;\n    supplierArticleNumber: string;\n    code: string;\n    number: number;\n    hidden: boolean;\n}","module.exports = \"<h4>{{'renameCategory.Label' | translate}}</h4>\\n<cm-add-spare-part-category class=\\\"spare-part-category-input-container\\\"\\n                            [modalDialog]=\\\"dialog\\\"></cm-add-spare-part-category>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-cat-window.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-cat-window.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-cat-window.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".spare-part-category-input-container{margin-top:10px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'sparePart.PartDetailsLabel' | translate}} {{id ? id : 'new.Label' | translate}}</h3>\\n\\n    <div>\\n        <div class=\\\"spare-part-category\\\">\\n            <div class=\\\"form-group spare-part-category-input-container\\\">\\n                <label for=\\\"category\\\">{{'category.Label' | translate}}*</label>\\n                <select class=\\\"form-control\\\" id=\\\"category\\\" [(ngModel)]=\\\"partData.categoryId\\\" required name = \\\"category\\\" #category = ngModel [ngClass]=\\\"{'cm-warn':category.invalid && isSavePressed}\\\">\\n                    <option *ngFor=\\\"let item of categories\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n                </select>\\n            </div>\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100-2\\\"  (click)=\\\"reloadCategories($event)\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox100-2\\\">{{'filters.showHidden' | translate}}</label>\\n            </div>\\n            <button class=\\\"spare-part-category-button\\\" (click)=\\\"renameCategory()\\\">{{'renameCategory.Label' | translate}}</button>\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"part-part\\\">{{'name.Label' | translate}}*</label>\\n            <input class=\\\"form-control\\\" id=\\\"part-part\\\" [(ngModel)]=\\\"partData.code\\\" required  name = \\\"code\\\" #code = ngModel\\n                   maxlength=\\\"255\\\" (ngModelChange)=\\\"partData.code=onTextChange(partData.code)\\\" [ngClass]=\\\"{'cm-warn':code.invalid && isSavePressed}\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"part-barcode\\\">{{'barcode.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"part-barcode\\\" type=\\\"text\\\" [(ngModel)]=\\\"partData.barcode\\\" maxlength=\\\"255\\\" (ngModelChange)=\\\"partData.barcode=onTextChange(partData.barcode)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"part-supplier\\\">{{'supplier.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"part-supplier\\\" type=\\\"text\\\" [(ngModel)]=\\\"partData.supplier\\\" maxlength=\\\"255\\\" (ngModelChange)=\\\"partData.supplier=onTextChange(partData.supplier)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"part-description\\\">{{'description.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"part-description\\\" type=\\\"text\\\" [(ngModel)]=\\\"partData.description\\\" maxlength=\\\"255\\\" (ngModelChange)=\\\"partData.description=onTextChange(partData.description)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"article-number\\\">{{'articleNumber.Label' | translate}}*</label>\\n            <input class=\\\"form-control\\\" id=\\\"article-number\\\" type=\\\"text\\\" [(ngModel)]=\\\"partData.articleNumber\\\" maxlength=\\\"255\\\"\\n                   (ngModelChange)=\\\"partData.articleNumber=onTextChange(partData.articleNumber)\\\" pattern=\\\"^(\\\\S+).*\\\" name = \\\"articleNumber\\\"\\n                   [ngClass]=\\\"{'cm-warn':articleNumber.invalid && isSavePressed}\\\" #articleNumber = ngModel required>\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"supplier-art-number\\\">{{'supplierArticleNumber.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"supplier-art-number\\\" type=\\\"text\\\"\\n                   [(ngModel)]=\\\"partData.supplierArticleNumber\\\" maxlength=\\\"255\\\" (ngModelChange)=\\\"partData.supplierArticleNumber=onTextChange(partData.supplierArticleNumber)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\" [(ngModel)]=\\\"partData.hidden\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox100\\\">{{'filters.hidden' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <cm-pictures [(pictures)]=\\\"partData.pictures\\\" [readonly]=\\\"false\\\"></cm-pictures>\\n        </div>\\n    </div>\\n\\n    <div *ngIf=\\\"id\\\">\\n        <h4>{{'lastMovements.Title' | translate}}</h4>\\n        <label  id=\\\"filter-limit\\\" type=\\\"number\\\" >movements Limit {{movementLimit}}</label>\\n\\n        <table class=\\\"table table-striped\\\">\\n            <thead>\\n            <tr>\\n                <th>\\n                    {{'data.Label' | translate}}\\n                </th>\\n                <th>\\n                    {{'sparePart.QuantityLabel' | translate}}\\n                </th>\\n                <th>\\n                    {{'inventory.FromLabel' | translate}}\\n                </th>\\n                <th>\\n                    {{'inventory.ToLabel' | translate}}\\n                </th>\\n                <th>\\n                    {{'user.Label' | translate}}\\n                </th>\\n            </tr>\\n            </thead>\\n\\n            <tbody>\\n            <tr *ngFor=\\\"let movement of movementList\\\">\\n                <td>\\n                    {{formatDate(movement.when)}}\\n                </td>\\n                <td>\\n                    {{movement.quantity}}\\n                </td>\\n                <td>\\n                    {{getStationName(movement.from)}}\\n                </td>\\n                <td>\\n                    {{getStationName(movement.to)}}\\n                </td>\\n                <td>\\n                    {{movement.who}}\\n                </td>\\n            </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n\\n    <div>\\n        <button id=\\\"save\\\" (click)=\\\"save(category.valid && code.valid && articleNumber.valid)\\\" >{{'button.SaveLabel' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-detail.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-detail.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-detail.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".spare-part-category{position:relative}.spare-part-category-button{position:absolute;right:0;top:28px}.spare-part-category-input-container{margin-right:190px}.cm-warn{border-color:red}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<div class=\\\"col-md-12\\\">\\n    <h3>{{'jobsByDistrict.Label' | translate}}</h3>\\n\\n    <div [ngClass]= \\\"{'col-md-9': !showUserJob, 'col-md-6': showUserJob}\\\">\\n        <table class=\\\"table table-striped\\\">\\n            <thead>\\n            <tr>\\n                <th>{{'locations.DistrictLabel' | translate}}</th>\\n                <th>{{'outsideJob.MvLabel' | translate}}</th>\\n                <th>{{'outsideJob.ToWsLabel' | translate}}</th>\\n                <th>{{'outsideJob.CheckLabel' | translate}}</th>\\n            </tr>\\n            </thead>\\n\\n            <tbody>\\n            <tr *ngFor=\\\"let row of districtList\\\" draggable=\\\"true\\\" (dragstart)=\\\"drag(row)\\\" (click)=\\\"openDistrict(row)\\\">\\n                <td *ngIf=\\\"row.location === null\\\">\\n                    <span [ngClass]=\\\"{\\n                    'fa': true,\\n                    'fa-plus-circle': row !== openedDistrict,\\n                    'fa-minus-circle': row === openedDistrict\\n                    }\\\"></span>\\n                    {{row.district}}\\n                </td>\\n                <td *ngIf=\\\"row.location !== null\\\">\\n                    <span style=\\\"margin-left: 10px;\\\"></span>{{row.name}}\\n                </td>\\n                <td>\\n                    {{row.mv}}\\n                </td>\\n                <td>\\n                    {{row.toWs}}\\n                </td>\\n                <td>\\n                    {{row.check}}\\n                </td>\\n            </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n\\n    <div [ngClass]=\\\"{'col-md-3' : !showUserJob, 'col-md-6': showUserJob}\\\" style=\\\"margin-top:10px;\\\">\\n        <h4>{{'user.Label' | translate}}</h4>\\n        <div *ngFor='let user of userList'\\n             (drop)=\\\"drop($event, user.login)\\\" (dragover)=\\\"allowDrop($event)\\\">\\n            <cm-user [login]=\\\"user.login\\\" (showUserJobs)=\\\"setShowUserJob($event)\\\"></cm-user>\\n        </div>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list-by-district.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list-by-district.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-job-list-by-district.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".first-priority{background-color:red}.second-priority{background-color:orange}.third-priority{background-color:yellow}.fourth-priority{background-color:limegreen}.fifth-priority{background-color:dodgerblue}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'bikeDispatch.Label' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-6\\\">\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-bike\\\">{{'bike.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-bike\\\" type=\\\"text\\\" [(ngModel)]=\\\"filters.bikeNumber\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-bike-type-filter [(selectedTypes)]=\\\"filters.bikeTypes\\\"></cm-bike-type-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-12 filter-show-inactive\\\">\\n                <label for=\\\"filter-active\\\">{{'showInactive.Label' | translate}}</label>\\n                <input id=\\\"filter-active\\\" type=\\\"checkbox\\\" [(ngModel)]=\\\"filters.showInactive\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-location-filter [location]=\\\"filters.location\\\" (changeLocation)=\\\"filters.location = $event\\\"></cm-location-filter>\\n            </div>\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-station\\\">{{'menu.ChooseStationLabel' | translate}}</label>\\n                <select class=\\\"form-control\\\" id=\\\"filter-station\\\" [(ngModel)]=\\\"filters.station\\\">\\n                    <option *ngFor=\\\"let item of stationList\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n                </select>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\">\\n            <div class=\\\"col-md-12 filter-has-location\\\">\\n                <label for=\\\"filter-customer-care\\\">{{'tasksForDispatcher.Label' | translate}}</label>\\n                <input id=\\\"filter-customer-care\\\" type=\\\"checkbox\\\" [(ngModel)]=\\\"filters.customerCare\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12 filter-has-location\\\">\\n                <label for=\\\"filter-no-lock\\\">{{'noLock.Label' | translate}}</label>\\n                <input id=\\\"filter-no-lock\\\" type=\\\"checkbox\\\" [(ngModel)]=\\\"filters.noLock\\\">\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-bike-branding-filter [selectedBrands]=\\\"filters.branding\\\"\\n                                         (selectedBrandsChange)=\\\"filters.branding = $event\\\"></cm-bike-branding-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-bike-status-filter [(selectedStatuses)]=\\\"filters.statuses\\\" [(statusChangedHoursAgo)] = \\\"filters.statusChangedHoursAgo\\\"></cm-bike-status-filter>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filter\\\" (click)=\\\"filters.clear()\\\">{{'filters.ClearBtn' | translate}}</button>\\n        </div>\\n    </div>\\n    <div class=\\\"col-md-12\\\">\\n        <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"col-md-12\\\">\\n            <div class=\\\"pull-left\\\">\\n                <div class=\\\"col-md-12\\\">\\n                    <div class=\\\"col-md-6\\\">\\n                        <label for=\\\"filter-limit-bikes\\\">{{'limitBikes.Label' | translate}}</label>\\n                        <input class=\\\"form-control\\\" id=\\\"filter-limit-bikes\\\" type=\\\"number\\\" [(ngModel)]=\\\"filters.downloadBikesLimit\\\">\\n                    </div>\\n                    <div class=\\\"col-md-6\\\">\\n                        <div>{{'categorySettings.downloadFileLabel' | translate}}</div>\\n\\n                        <button (click)=\\\"exportCSV()\\\" class=\\\"btn btn-default glyphicon glyphicon-download\\\">\\n                            {{'button.DownloadLabel' | translate}}\\n                        </button>\\n                    </div>\\n                </div>\\n\\n            </div>\\n            <div class=\\\"pull-right\\\">\\n                <div>{{'categorySettings.importFileLabel' | translate}}</div>\\n                <input id=\\\"choose-file\\\" type=\\\"file\\\" (change)=\\\"uploadCsvFileChooser($event)\\\" class=\\\"inputfile-csv\\\"\\n                    accept=\\\".csv\\\" />\\n                <label class=\\\"btn btn-default\\\" for=\\\"choose-file\\\">{{csvFileName}}</label>\\n\\n                <button (click)=\\\"importCSV()\\\" class=\\\"btn btn-default glyphicon glyphicon-upload\\\" [disabled]=\\\"!csvFile || !csvFileName\\\">\\n                    {{'button.UploadLabel' | translate}}\\n                </button>\\n            </div>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('bikeId')\\\">\\n                    <cm-sortable [label]=\\\"'bikeId.Label'\\\" [sort]=\\\"'bikeId' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('bikeNumber')\\\">\\n                    <cm-sortable [label]=\\\"'bike.Label'\\\" [sort]=\\\"'bikeNumber' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('status')\\\">\\n                    <cm-sortable [label]=\\\"'troubleTickets.StatusLabel'\\\" [sort]=\\\"'status' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('type')\\\">\\n                    <cm-sortable [label]=\\\"'troubleTickets.TypeLabel'\\\" [sort]=\\\"'type' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('location.locationName')\\\">\\n                    <cm-sortable [label]=\\\"'location.Label'\\\" [sort]=\\\"'location.locationName' === filters.sortField\\\"\\n                        [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th>{{'location.CoordinatesLabel' | translate}}</th>\\n\\n                <th (click)=\\\"sort('loadedTo')\\\">\\n                    <cm-sortable [label]=\\\"'station.Label'\\\" [sort]=\\\"'loadedTo' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('customerCareSince')\\\">\\n                    <cm-sortable [label]=\\\"'tasksForDispatcher.Label'\\\" [sort]=\\\"'customerCareSince' === filters.sortField\\\"\\n                        [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('missingSince')\\\">\\n                    <cm-sortable [label]=\\\"'lostBike.Label'\\\" [sort]=\\\"'missingSince' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('inActiveSince')\\\">\\n                    <cm-sortable [label]=\\\"'active.Label'\\\" [sort]=\\\"'inActiveSince' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('noLockSince')\\\">\\n                    <cm-sortable [label]=\\\"'lock.Label'\\\" [sort]=\\\"'noLockSince' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let row of jobItemList\\\">\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{row.bikeId}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{row.bikeNumber}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{getStatus(row.status)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{'bikeType.' + row.type | translate}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{row.location?.locationName}}\\n                </td>\\n                <td>\\n                    <cm-show-on-map [type]=\\\"getBikeType()\\\" [entityId]=\\\"row.bikeId\\\">\\n                    </cm-show-on-map>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    {{getStation(row.loadedTo)}}\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    <div [class]=\\\"'circle '+ getRowColor(row.customerCare) \\\"></div>\\n                    <div class=\\\"centralize\\\">{{formatDate(row.customerCareSince)}}</div>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    <div [class]=\\\"'circle '+ isBikeMissing(row) \\\"></div>\\n                    <div class=\\\"centralize\\\">{{formatDate(row.missingSince)}}</div>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    <div [class]=\\\"'circle '+ isActive(row) \\\"></div>\\n                    <div class=\\\"centralize\\\">{{formatDate(row.inActiveSince)}}</div>\\n                </td>\\n                <td (click)=\\\"showDetails(row)\\\">\\n                    <div [class]=\\\"'circle '+ hasLock(row.lock) \\\"></div>\\n                    <div class=\\\"centralize\\\">{{formatDate(row.noLockSince)}}</div>\\n                </td>\\n            </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <button *ngIf='!childProcessing' id=\\\"file-export\\\" (click)=\\\"exportRepairs()\\\">{{'exportBtn.Label' | translate}}</button>\\n    <cm-report #archivedrep [reportType]=\\\"reportType\\\" (processingAction)=\\\"processingMessage($event)\\\" (onListSize)=\\\"onListSize($event)\\\"></cm-report>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" [pageNo] = \\\"page\\\" (page)=\\\"loadData($event)\\\"></pager>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-dispatch.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-dispatch.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-dispatch.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".circle{width:20px;height:20px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;margin:auto}.circle.red{background:red !important}.circle.yellow{background:yellow !important}.circle.green{background:green !important}.edit-customer-care{padding-left:25px}.filter-show-inactive{padding-top:10px;padding-bottom:10px}.inputfile-csv{width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.centralize{text-align:center}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export class CmLocationData {\n    locationId: number;\n    locationName: string;\n    district: string;\n}","import {Serializable} from \"../../shared/serializable\";\nimport {CmCoordinates} from \"../../shared/coordinates\";\nimport {CmLocationData} from \"../../shared/location\";\n\nexport class CmBikeDispatchModel extends Serializable {\n    bikeId: number;\n    bikeNumber: string;\n    location: CmLocationData;\n    status: string;\n    lockType: string;\n    type: string;\n    coordinates: CmCoordinates;\n    customerCare: boolean;\n    lostBike: boolean;\n    lock: string;\n    lockVersion: string;\n    lockVoltage: number;\n    frame: string;\n    bikeType: string;\n    branding: string;\n    //loadedTo is instead of station - see DBREN-241\n    loadedTo: string;\n    active : boolean;\n}","import {CmBikeListItem} from \"../cm-bike-short-list/cm-bike-list.model\";\n\nexport class CmRepairModel {\n    id: number;\n    user: string;\n    branding: string;\n    dateFinished: string;\n    bike: CmBikeListItem;\n    task: number;\n\n    checkedLock: boolean;\n    fullCheck: boolean;\n    loadToTruck: boolean;\n    moveToWs: boolean;\n    needAttention: boolean;\n\n    repairTime: number;\n\n    additionalRepair: string;\n    comment: string;\n\n    spareParts: CmRepairSparePart[] = [];\n}\n\nexport class CmRepairSparePart {\n    category : string;\n    part: string;\n    type: string;\n    quantity: number;\n}","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-header\\\">\\n        <h3>{{'jobCheck.RepairLabel'|translate}} {{model.id}}</h3>\\n    </div>\\n    <div class=\\\"modal-body\\\" id=\\\"repair-details-body\\\">\\n        <div class=\\\"col-md-12\\\">\\n            <table class=\\\"col-md-12 table\\\">\\n                <tbody>\\n                <tr>\\n                    <td>{{'bike.Label' | translate}}</td>\\n                    <td>{{model.bike?.bikeNumber}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'user.Label' | translate}}</td>\\n                    <td>{{model.user}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'data.Label' | translate}}</td>\\n                    <td>{{formatDate(model.dateFinished)}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobItem.JobLabel' | translate}}</td>\\n                    <td>{{model.task}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobRepair.RepairTimeLabel' | translate}}</td>\\n                    <td>{{model.repairTime}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobRepair.FullCheckLabel' | translate}}</td>\\n                    <td>{{model.fullCheck ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobRepair.CheckedLockLabel' | translate}}</td>\\n                    <td>{{model.checkedLock ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'jobRepair.NeedAttentionLabel' | translate}}</td>\\n                    <td>{{model.needAttention ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'additionalRepair.NeedToWsLabel' | translate}}</td>\\n                    <td>{{model.moveToWs ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'additionalRepair.LoadToTruck' | translate}}</td>\\n                    <td>{{model.loadToTruck ? '&#x2713;' : '&#x2717;'}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'additionalRepair.Title' | translate}}</td>\\n                    <td>{{model.additionalRepair}}</td>\\n                </tr>\\n                <tr>\\n                    <td>{{'comment.Label' | translate}}</td>\\n                    <td>\\n                        <textarea class=\\\"col-md-12\\\" disabled>{{model.comment}}</textarea>\\n                    </td>\\n                </tr>\\n                </tbody>\\n            </table>\\n\\n            <div *ngIf=\\\"model.spareParts\\\">\\n                <h3>{{'spareParts.Label' | translate}}</h3>\\n                <table class=\\\"table\\\">\\n                    <thead>\\n                    <tr>\\n                        <th>Part</th>\\n                        <th>Category</th>\\n                        <th>Quantity</th>\\n                        <th>Unit</th>\\n                    </tr>\\n                    </thead>\\n                    <tbody>\\n                    <tr *ngFor=\\\"let part of model.spareParts\\\">\\n                        <td>{{part.part}}</td>\\n                        <td>{{part.category}}</td>\\n                        <td>{{part.quantity}}</td>\\n                        <td>{{part.type}}</td>\\n                    </tr>\\n                    </tbody>\\n                </table>\\n            </div>\\n            <div class=\\\"modal-footer\\\">\\n                <button (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n            </div>\\n        </div>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-repair-item.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-repair-item.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-repair-item.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#repair-details-body{height:auto;overflow:auto}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'repairs.Label' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-6\\\">\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"mission-type-id\\\">{{'mission.typeLabel' | translate}}</label>\\n                <select class=\\\"form-control\\\" id=\\\"mission-type-id\\\" [(ngModel)]=\\\"filters.type\\\">\\n                    <option *ngFor=\\\"let mission of missionTypes\\\" [value]=\\\"mission.key\\\">{{mission.label}}</option>\\n                </select>\\n            </div>\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-bike\\\">{{'bike.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-bike\\\" type=\\\"text\\\" [(ngModel)]=\\\"filters.bikeNumber\\\">\\n            </div>\\n            <div class=\\\"col-md-12\\\">\\n                <label for=\\\"filter-job\\\">{{'jobItem.JobLabel' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"filter-job\\\" type=\\\"number\\\" [(ngModel)]=\\\"filters.job\\\">\\n            </div>\\n            <div class=\\\"col-md-12\\\">\\n                <label>{{'finishDate.Label' | translate}} {{'filterFrom.Label' | translate}}</label>\\n                <datetimepicker [dateTimeValue]=\\\"filters.dateFinishedFrom\\\"\\n                                (datePickerselect)=\\\"filters.dateFinishedFrom = $event\\\"></datetimepicker>\\n            </div>\\n            <div class=\\\"col-md-12\\\">\\n                <label>{{'finishDate.Label' | translate}} {{'filterTo.Label' | translate}}</label>\\n                <datetimepicker [dateTimeValue]=\\\"filters.dateFinishedTo\\\"\\n                                (datePickerselect)=\\\"filters.dateFinishedTo = $event\\\"></datetimepicker>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-6\\\">\\n            <div class=\\\"col-md-12\\\">\\n                <cm-users-filter [selectedEmployee]=\\\"filters.users\\\" (changeEmployee)=\\\"filters.users = $event\\\"></cm-users-filter>\\n            </div>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <cm-bike-branding-filter [selectedBrands]=\\\"filters.branding\\\"\\n                                         (selectedBrandsChange)=\\\"filters.branding = $event\\\"></cm-bike-branding-filter>\\n            </div>\\n\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filter\\\" (click)=\\\"filters.clear()\\\">{{'filters.ClearBtn' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table clickable\\\">\\n        <thead>\\n            <tr>\\n                <th (click)=\\\"sort('user')\\\">\\n                    <cm-sortable [label]=\\\"'user.Label'\\\" [sort]=\\\"'user' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('dateFinished')\\\">\\n                    <cm-sortable [label]=\\\"'data.Label'\\\" [sort]=\\\"'dateFinished' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('bike.bikeNumber')\\\">\\n                    <cm-sortable [label]=\\\"'bike.Label'\\\" [sort]=\\\"'bike.bikeNumber' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('location.locationName')\\\">\\n                    <cm-sortable [label]=\\\"'location.Label'\\\" [sort]=\\\"'location.locationName' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n\\n                <th (click)=\\\"sort('task.id')\\\">\\n                    <cm-sortable [label]=\\\"'jobItem.JobLabel'\\\" [sort]=\\\"'task.id' === filters.sortField\\\" [state]=\\\"filters.sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th>Comment</th>\\n                <th>Spare Parts</th>\\n            </tr>\\n        </thead>\\n\\n        <tbody>\\n            <tr *ngFor=\\\"let row of itemList\\\" (click)=\\\"showDetails(row)\\\">\\n                <td>\\n                    {{row.user}}\\n                </td>\\n                <td>\\n                    {{formatDate(row.dateFinished)}}\\n                </td>\\n                <td>\\n                    {{row.bike?.bikeNumber}}\\n                </td>\\n                <td>\\n                    {{row.location?.locationName}}\\n                </td>\\n                <td>\\n                    {{row.task}}\\n                </td>\\n                <td>{{row.comment}}</td>\\n                <td>\\n                    <div *ngFor=\\\"let sparePart of row.spareParts\\\">{{sparePart.part}} ({{sparePart.quantity}})\\n                        <br />\\n                    </div>\\n                </td>\\n            </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"loadData($event)\\\"></pager>\\n\\n    <button *ngIf='!childProcessing' id=\\\"file-export\\\" (click)=\\\"exportRepairs()\\\">{{'exportBtn.Label' | translate}}</button>\\n    <cm-report #archivedrep [reportType]=\\\"reportType\\\" (processingAction)=\\\"processingMessage($event)\\\" (onListSize)=\\\"onListSize($event)\\\"></cm-report>\\n\\n</div>\";","\"use strict\";\nfunction __export(m) {\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"rxjs-compat/observable/forkJoin\"));\n//# sourceMappingURL=forkJoin.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar rxjs_1 = require(\"rxjs\");\nexports.forkJoin = rxjs_1.forkJoin;\n//# sourceMappingURL=forkJoin.js.map","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<h3>{{'bike.Label'|translate}} {{model.bikeNumber}}</h3>\\n\\n<div class=\\\"col-md-12\\\">\\n\\n    <table class=\\\"col-md-12 table\\\" style=\\\"table-layout: fixed\\\">\\n        <tbody>\\n            <tr>\\n                <td>{{'bikeId.Label' | translate}}</td>\\n                <td>{{model.bikeId}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr>\\n                <td>{{'active.Label' | translate}}</td>\\n                <td>{{model.active ? '&#x2713;' : '&#x2717;'}}</td>\\n                <td>\\n                    <div *ngIf=\\\"!model.active\\\">{{'inActiveSince.Label' | translate}}</div>\\n                </td>\\n                <td>\\n                    <div *ngIf=\\\"!model.active\\\">{{formatDate(model.inActiveSince)}}</div>\\n                </td>\\n            </tr>\\n            <tr>\\n                <td>{{'bikeType.Label' | translate}}</td>\\n                <td>{{'bikeType.' + model.type | translate}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr *ngIf=\\\"model.status\\\">\\n                <td>{{'troubleTickets.StatusLabel' | translate}}</td>\\n                <td>\\n                    <select class=\\\"form-control\\\" [(ngModel)]=\\\"model.status\\\" (change)=\\\"statusChanged=true\\\">\\n                        <option *ngFor=\\\"let status of statusList\\\" [value]=\\\"status.name\\\" [disabled]=\\\"status.disabled\\\">{{status.text}}</option>\\n                    </select>\\n                    <ng-container *ngIf=\\\"statusList.length > 0 && statusList[0].backendName === 'MSP'\\\">\\n                        <button class=\\\"trouble-ticket-search-button\\\" id=\\\"send-status\\\" (click)=\\\"sendStatus()\\\">\\n                            {{'sendStatus.Label' | translate}}\\n                        </button>\\n                    </ng-container>\\n                </td>\\n            </tr>\\n            <tr *ngIf=\\\"model.lockType\\\">\\n                <td>{{'troubleTickets.LockType' | translate}}</td>\\n                <td>{{'bikeLockType.' + model.lockType | translate}}</td>\\n            </tr>\\n            <tr *ngIf=\\\"model.lockVoltage && model.lockVoltage!='null'\\\">\\n                <td>{{'lockVoltage.Label' | translate}}</td>\\n                <td>{{model.lockVoltage}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'tasksForDispatcher.Label' | translate}}</td>\\n                <td><input type=\\\"checkbox\\\" [(ngModel)]=\\\"model.customerCare\\\"></td>\\n                <td>\\n                    <div *ngIf=\\\"model.customerCare\\\">{{'customerCareSince.Label' | translate}}</div>\\n                </td>\\n                <td>\\n                    <div *ngIf=\\\"model.customerCare\\\">{{formatDate(model.customerCareSince)}}</div>\\n                </td>\\n            </tr>\\n            <tr>\\n                <td>{{'lock.Label' | translate}}</td>\\n                <td style=\\\"word-wrap: break-word\\\">{{model.lock}}</td>\\n                <td>\\n                    <div *ngIf=\\\"!model.lock\\\">{{'noLockSince.Label' | translate}}</div>\\n                </td>\\n                <td>\\n                    <div *ngIf=\\\"!model.lock\\\">{{formatDate(model.noLockSince)}}</div>\\n                </td>\\n            </tr>\\n            <tr>\\n                <td>{{'lockVersion.Label' | translate}}</td>\\n                <td>{{model.lockVersion}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr *ngIf=\\\"model.lockVoltage && model.lockVoltage!='null'\\\">\\n                <td>{{'lockVoltage.Label' | translate}}</td>\\n                <td>{{model.lockVoltage}}</td>\\n            </tr>\\n            <tr>\\n                <td>{{'frame.Label' | translate}}</td>\\n                <td>{{model.frame}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr>\\n                <td>{{'branding.Label' | translate}}</td>\\n                <td>{{model.branding}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr>\\n                <td>{{'station.Label' | translate}}</td>\\n                <td>{{getStation(model.loadedTo)}}</td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr>\\n                <td>{{'location.Label' | translate}}</td>\\n                <td>\\n                    <input class=\\\"form-control\\\" id=\\\"ticket-location-name\\\" disabled [ngModel]=\\\"model.location?.locationName\\\">\\n\\n                    <button class=\\\"trouble-ticket-search-button\\\" id=\\\"open-locations\\\" (click)=\\\"openLocations()\\\">\\n                        {{'setNewLocation.Label' | translate}}\\n                    </button>\\n                </td>\\n                <td></td>\\n                <td></td>\\n            </tr>\\n            <tr>\\n                <td>{{'location.CoordinatesLabel' | translate}}</td>\\n                <td colspan=\\\"3\\\">\\n                    {{model.coordinates?.latitude}}, {{model.coordinates?.longitude}}\\n                    <div>\\n                        <button class=\\\"trouble-ticket-search-button\\\" id=\\\"open-map\\\" (click)=\\\"showMap()\\\">\\n                            {{'selectCoordinates.Label' | translate}}\\n                        </button>\\n                    </div>\\n                    <div *ngIf=\\\"_showMap\\\" style=\\\"padding-top: 10px;\\\">\\n                        <agm-map [style.height.px]=\\\"500\\\" [latitude]=\\\"latitude\\\" [longitude]=\\\"longitude\\\" [zoom]=\\\"12\\\" (mapClick)=\\\"selectCoordinates($event)\\\">\\n                            <agm-marker *ngIf=\\\"model.coordinates && model.coordinates.latitude && model.coordinates.longitude\\\"\\n                                [latitude]=\\\"model.coordinates.latitude\\\" [longitude]=\\\"model.coordinates.longitude\\\" >\\n                                <!--[iconUrl]='getMarker()'-->\\n                            </agm-marker>\\n                        </agm-map>\\n                    </div>\\n                </td>\\n            </tr>\\n        </tbody>\\n    </table>\\n\\n    <h4>{{'bike.allowedLocations'|translate}}</h4>\\n\\n    <div  class=\\\"col-md-12\\\">\\n        <div class=\\\"pull-right\\\">\\n            <label>{{'bike.addAllowedLocation' | translate}}</label>\\n            <button class=\\\"btn btn-success\\\" (click)=\\\"addAllowedLocation(location)\\\">\\n                <i class=\\\"fa fa-plus\\\"></i>\\n            </button>\\n        </div>\\n    </div>\\n\\n    <table class=\\\"table table-striped clickable\\\">\\n        <thead>\\n        <tr>\\n            <th (click)=\\\"sort('locationNumber')\\\">\\n                <cm-sortable [label]=\\\"'locations.AniLabel'\\\"></cm-sortable>\\n            </th>\\n            <th (click)=\\\"sort('locationName')\\\">\\n                <cm-sortable [label]=\\\"'locations.NameLabel'\\\"></cm-sortable>\\n            </th>\\n            <th (click)=\\\"sort('district')\\\">\\n                <cm-sortable [label]=\\\"'locations.DistrictLabel'\\\"></cm-sortable>\\n            </th>\\n        </tr>\\n        </thead>\\n\\n        <tbody>\\n        <tr *ngFor=\\\"let location of allowedLocations\\\">\\n            <td>\\n                {{location.locationNumber}}\\n            </td>\\n            <td>\\n                {{location.locationName ? location.locationName : location.fullName}}\\n            </td>\\n            <td>\\n                {{location.district}}\\n            </td>\\n            <td>\\n                <button id=\\\"removeDamageCategory\\\" class=\\\"btn btn-danger remove show_tip\\\" (click)=\\\"removeAllowedLocation(location)\\\">\\n                    <i class=\\\"fa fa-trash-o\\\"></i>\\n                </button>\\n            </td>\\n        </tr>\\n        </tbody>\\n    </table>\\n\\n    <div>\\n        <button (click)=\\\"save()\\\">{{'button.SaveLabel' | translate}}</button>\\n        <button (click)=\\\"activate()\\\">{{'bikeActivate.Label' | translate}}</button>\\n        <button (click)=\\\"goToTT()\\\">{{'troubleTickets.Title' | translate}}</button>\\n        <button (click)=\\\"repairs()\\\">{{'button.RepairsLabel' | translate}}</button>\\n        <button (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n\\n</div>\\n\";","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'news.Label' | translate}}</h3>\\n    <form #newsFeedForm=\\\"ngForm\\\">\\n        <div class=\\\"col-md-12 form-group\\\">\\n            <label for=\\\"headline\\\">{{'headline.Label' | translate}} *</label>\\n            <input class=\\\"col-md-6 form-control\\\" id=\\\"headline\\\" type=\\\"text\\\" [(ngModel)]=\\\"news.headline\\\" name=\\\"headline\\\" #headline=\\\"ngModel\\\"\\n                required maxlength=\\\"255\\\" (ngModelChange)=\\\"news.headline=onTextChange(news.headline)\\\" pattern=\\\"^(\\\\S+).*\\\" [ngClass]=\\\"{'cm-warn': headline.invalid && isSavePressed}\\\">\\n            <div [hidden]=\\\"headline.valid || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryConfig.EmptyFieldLabel' | translate}}\\n            </div>\\n\\n        </div>\\n\\n        <div class=\\\"col-md-12\\\">\\n            <label for=\\\"text\\\">{{'text.Label' | translate}} *</label>\\n            <textarea class=\\\"form-control\\\" id=\\\"text\\\" rows=\\\"4\\\" [(ngModel)]=\\\"news.text\\\" name=\\\"text\\\" #text=\\\"ngModel\\\" required [ngClass]=\\\"{'cm-warn': text.invalid && isSavePressed}\\\"></textarea>\\n            <div [hidden]=\\\"text.valid || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryConfig.EmptyFieldLabel' | translate}}\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12\\\" id=\\\"news-buttons\\\">\\n            <button (click)=\\\"save(newsFeedForm.form.valid)\\\">{{'button.SaveLabel' | translate}}</button>\\n            <button (click)=\\\"clear()\\\">{{'clear.Label' | translate}}</button>\\n        </div>\\n    </form>\\n</div>\\n\\n<div class=\\\"col-md-12\\\" id=\\\"news-list\\\">\\n    <table class=\\\"col-md-12 table table-striped\\\">\\n        <thead>\\n            <th>{{'headline.Label' | translate}}</th>\\n            <th>{{'text.Label' | translate}}</th>\\n            <!-- <th>{{'category.Label' | translate}}</th> -->\\n            <th>{{'created.Label' | translate}}</th>\\n            <th>{{'author.Label' | translate}}</th>\\n        </thead>\\n        <tbody>\\n            <tr *ngFor=\\\"let news of newsList\\\">\\n                <td>{{news.headline}}</td>\\n                <td>{{news.text}}</td>\\n                <!-- <td>{{news.category}}</td> -->\\n                <td>{{formatDate(news.created)}}</td>\\n                <td>{{news.author}}</td>\\n                <td>\\n                    <button id=\\\"delete-news\\\" class=\\\"btn btn-danger remove show_tip\\\" (click)=\\\"delete(news)\\\">\\n                        <i class=\\\"fa fa-trash-o\\\"></i>\\n                    </button>\\n                </td>\\n            </tr>\\n        </tbody>\\n        <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n    </table>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-news.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-news.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-news.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#news-buttons{margin-top:10px}#news-list{margin-top:30px}button:disabled,button[disabled]{opacity:0.65}.cm-warn{border-color:red}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'damageCategoryConfigBike.Label' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <h4>{{'globalSettings.Label' | translate}}</h4>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-check\\\">{{'globalCheck.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-check\\\"  type=\\\"number\\\" [(ngModel)]=\\\"globalSettings.check\\\" min=\\\"0\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-tobsc\\\">{{'globalToBSC.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-tobsc\\\" type=\\\"number\\\" [(ngModel)]=\\\"globalSettings.toBSC\\\" min=\\\"0\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-block\\\">{{'globalBlock.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-block\\\" type=\\\"number\\\" [(ngModel)]=\\\"globalSettings.block\\\" min=\\\"0\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-check-time\\\">{{'globalCheckTime.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-check-time\\\" type=\\\"number\\\" [(ngModel)]=\\\"globalSettings.checkTime\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" min=\\\"0\\\" oninput=\\\"!this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-check-time\\\">{{'globalWithoutReportDaysLimit.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-without-report-days-limit\\\" type=\\\"number\\\" [(ngModel)]=\\\"globalSettings.withoutReportDaysLimit\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"form-group\\\">\\n            <div class=\\\"form-check\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\" [(ngModel)]=\\\"globalSettings.closeComplainDirectly\\\" [readonly]=\\\"!this.allowedToEditSettings()\\\" name=\\\"global-close-complain-directly\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox100\\\">{{'globalCloseComplainDirectly.Label' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"form-group\\\">\\n            <div class=\\\"form-check\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox101\\\" [(ngModel)]=\\\"globalSettings.closeWhenBikeMoves\\\" name=\\\"global-close-when-bike-moves\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox101\\\">{{'globalCloseWhenBikeMoves.Label' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div *ngIf=\\\"this.allowedToEditSettings()\\\">\\n            <button id=\\\"save-global\\\" (click)=\\\"saveGlobal()\\\">{{'button.SaveLabel' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <h4>{{'categoriesSettings.Label' | translate}}</h4>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\">\\n            <button id=\\\"add\\\" (click)=\\\"openCategory(-1)\\\">{{'button.AddLabel' | translate}}</button>\\n\\n            <div class=\\\"col-md-12\\\">\\n                <div class=\\\"pull-left\\\">\\n                    <div>{{'categorySettings.exportFileLabel' | translate}}</div>\\n                    <button (click)=\\\"loadDataForCsv()\\\"\\n                            class=\\\"btn btn-default glyphicon glyphicon-download\\\">\\n                        {{'button.DownloadLabel' | translate}}\\n                    </button>\\n                </div>\\n                <div class=\\\"pull-right\\\">\\n                    <div>{{'categorySettings.importFileLabel' | translate}}</div>\\n                    <input id=\\\"choose-file\\\" type=\\\"file\\\" (change)=\\\"loadCsvFile($event)\\\" class=\\\"inputfile-csv\\\" accept=\\\".csv\\\"/>\\n                    <label class=\\\"btn btn-default\\\" for=\\\"choose-file\\\">{{csvFileName}}</label>\\n\\n                    <button (click)=\\\"importCSV()\\\"\\n                            class=\\\"btn btn-default glyphicon glyphicon-upload\\\"\\n                            [disabled]=\\\"!csvFile || !csvFileName\\\">\\n                        {{'button.UploadLabel' | translate}}\\n                    </button>\\n                </div>\\n\\n\\n            </div>\\n        </div>\\n        <table class=\\\"table table-striped clickable\\\">\\n            <thead>\\n                <tr>\\n                    <th (click)=\\\"sort('name')\\\">\\n                        <cm-sortable [label]=\\\"'category.Label'\\\" [sort]=\\\"'name' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                    </th>\\n                    <th (click)=\\\"sort('check')\\\">\\n                        <cm-sortable [label]=\\\"'outsideJob.CheckLabel'\\\" [sort]=\\\"'check' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                    </th>\\n                    <th (click)=\\\"sort('toBSC')\\\">\\n                        <cm-sortable [label]=\\\"'toBSC.Label'\\\" [sort]=\\\"'toBSC' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                    </th>\\n                    <th (click)=\\\"sort('block')\\\">\\n                        <cm-sortable [label]=\\\"'blockBike.Label'\\\" [sort]=\\\"'block' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                    </th>\\n                    <th (click)=\\\"sort('block')\\\">\\n                        <cm-sortable [label]=\\\"'estimatedRepairTime.Label'\\\" [sort]=\\\"'estimatedRepairTime' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                    </th>\\n                    <th></th>\\n                </tr>\\n            </thead>\\n\\n            <tbody>\\n                <tr *ngFor=\\\"let category of categoryConfigList\\\">\\n                    <td (click)=\\\"openCategory(category.number)\\\">\\n                        {{category.name}}\\n                    </td>\\n                    <td (click)=\\\"openCategory(category.number)\\\">\\n                        {{category.check}}\\n                    </td>\\n                    <td (click)=\\\"openCategory(category.number)\\\">\\n                        {{category.toBSC}}\\n                    </td>\\n                    <td (click)=\\\"openCategory(category.number)\\\">\\n                        {{category.block}}\\n                    </td>\\n                    <td (click)=\\\"openCategory(category.number)\\\">{{category.estimatedRepairTime}}</td>\\n                    <td>\\n                        <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"removeDamageCategory\\\" class=\\\"btn btn-danger remove show_tip\\\" (click)=\\\"removeCategory(category)\\\">\\n                            <i class=\\\"fa fa-trash-o\\\"></i>\\n                        </button>\\n                    </td>\\n                </tr>\\n            </tbody>\\n            <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n        </table>\\n    </div>\\n\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-bike-config-list.component.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-bike-config-list.component.css\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-bike-config-list.component.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".inputfile-csv {\\n    width: 0.1px;\\n    height: 0.1px;\\n    opacity: 0;\\n    overflow: hidden;\\n    position: absolute;\\n    z-index: -1;\\n}\\n.filter-padding{\\n    padding-top: 30px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"\\n<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n\\n    <div class=\\\"col-md-12\\\">\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-station\\\">{{'menu.ChooseStationLabel' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-station\\\" [(ngModel)]=\\\"filters.station\\\">\\n                <option *ngFor=\\\"let item of stationList\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-id\\\">{{'articleNumber.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"filter-id\\\" type=\\\"number\\\" [(ngModel)]=\\\"filters.articleNumber\\\">\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-category\\\">{{'category.Label' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-category\\\" [(ngModel)]=\\\"filters.category\\\"\\n                    (ngModelChange)=\\\"loadInventoryPart()\\\">\\n                <option *ngFor=\\\"let item of categories\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-part\\\">{{'sparePart.PartLabel' | translate}}</label>\\n            <select class=\\\"form-control\\\" id=\\\"filter-part\\\" [(ngModel)]=\\\"filters.part\\\">\\n                <option *ngFor=\\\"let item of parts\\\" [value]=\\\"item.name\\\">{{item.text}}</option>\\n            </select>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <label for=\\\"filter-free-text\\\">{{'text.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"filter-free-text\\\" [(ngModel)]=\\\"filters.freeText\\\">\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\" [(ngModel)]=\\\"filters.showHidden\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox100\\\">{{'filters.showHidden' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-4\\\">\\n            <div class=\\\"form-check\\\" style=\\\"margin-top: 30px\\\">\\n                <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox200\\\" [(ngModel)]=\\\"filters.showAllCities\\\">\\n                <label class=\\\"form-check-label\\\" for=\\\"checkbox200\\\">{{'filters.showAllCities' | translate}}</label>\\n            </div>\\n        </div>\\n\\n        <div class=\\\"col-md-12 filter-panel-buttons\\\">\\n            <button id=\\\"filter\\\" (click)=\\\"filter()\\\">{{'filter.Label' | translate}}</button>\\n            <button id=\\\"clear-filters\\\" (click)=\\\"clearFilters()\\\">{{'filters.ClearBtn' | translate}}</button>\\n        </div>\\n    </div>\\n\\n\\n    <table class=\\\"table table-striped clickable\\\" id=\\\"spare-part-table\\\">\\n        <tbody>\\n        <tr *ngFor=\\\"let item of items\\\" (click)=\\\"openItem(item)\\\">\\n            <td>\\n                {{item.articleNumber}}\\n            </td>\\n            <td>\\n                {{item.category}}\\n            </td>\\n            <td>\\n                {{item.part}}\\n            </td>\\n            <td>\\n                {{item.quantity}}\\n            </td>\\n        </tr>\\n        </tbody>\\n    </table>\\n\\n    <cm-table-total [total]=\\\"total\\\"></cm-table-total>\\n    <pager [pageLimit]=\\\"pageLimit\\\" [total]=\\\"total\\\" (page)=\\\"setPage($event)\\\"></pager>\\n\\n    <div>\\n\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">Close</button>\\n    </div>\\n\\n</div>\\n\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-list-modal.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-list-modal.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-spare-part-list-modal.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".modal-location-list-close{margin-bottom:15px;margin-left:10px}#input-trouble-ticket-top td:first-child,#input-trouble-ticket-bottom td:first-child{width:30%;text-align:left;font-weight:bold}#input-trouble-ticket-top td:last-child,#input-trouble-ticket-bottom td:last-child{width:70%}#readonly-trouble-ticket td:first-child{text-align:left;font-weight:bold}.trouble-ticket-status{background-color:#ffe662}.trouble-ticket-search-button{margin-top:10px}#tt-bikes-table td:first-child{width:70%;vertical-align:middle}.tt-window-body{height:700px;overflow:auto}.modal-wide{width:130%;padding:40px 20px 20px 20px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n\\n\\n<!-- Put all input fields in a form to use angulars validation by exposing the form with 'ngForm'-->\\n<form #damageCategoryForm=\\\"ngForm\\\">\\n    <div class=\\\"col-md-12\\\">\\n        <h3>{{'damageCategoryConfigBike.Label' | translate}}</h3>\\n\\n        <div class=\\\"col-md-12\\\">\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"name\\\">{{'locations.NameLabel' | translate}} *</label>\\n                <input class=\\\"form-control\\\" id=\\\"name\\\" type=\\\"string\\\" [(ngModel)]=\\\"model.name\\\" [attr.disabled]=\\\"model.internal\\\" name=\\\"name\\\" [readonly]=\\\"!allowedToEditSettings()\\\" #name=\\\"ngModel\\\" required size=\\\"255\\\"  [maxLength]=\\\"255\\\"\\n                       [ngClass]=\\\"{'cm-warn':(name.invalid || catExistsError) && isSavePressed}\\\">\\n            </div>\\n            <div [hidden]=\\\"name.valid || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryBikesConfig.EmptyNameLabel' | translate}}\\n            </div>\\n            <div [hidden]=\\\"!catExistsError || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryConfig.categoryAlreadyExist' | translate}}\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"mapping-text\\\">{{'Mapping text' | translate}}</label>\\n                <textarea class=\\\"form-control\\\" id=\\\"mapping-text\\\" [(ngModel)]=\\\"model.mappingTextStr\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"mapping-text\\\"></textarea>\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-check\\\">{{'globalCheck.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-check\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.check\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"global-check\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-tobsc\\\">{{'globalToBSC.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-tobsc\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.toBSC\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"global-tobsc\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-block\\\">{{'globalBlock.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-block\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.block\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"global-block\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-estimated-repair-time\\\">{{'globalEstimatedRepairTime.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-estimated-repair-time\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.estimatedRepairTime\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"global-estimated-repair-time\\\" min=\\\"0\\\"\\n                       oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"form-group\\\">\\n                <div class=\\\"form-check\\\">\\n                    <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\" [(ngModel)]=\\\"model.closeComplainDirectly\\\" name=\\\"global-close-complain-directly\\\">\\n                    <label class=\\\"form-check-label\\\" for=\\\"checkbox100\\\">{{'globalCloseComplainDirectly.Label' | translate}}</label>\\n                </div>\\n            </div>\\n\\n            <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"form-group\\\">\\n                <div class=\\\"form-check\\\">\\n                    <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox101\\\" [(ngModel)]=\\\"model.closeWhenBikeMoves\\\" name=\\\"global-close-when-bike-moves\\\">\\n                    <label class=\\\"form-check-label\\\" for=\\\"checkbox101\\\">{{'globalCloseWhenBikeMoves.Label' | translate}}</label>\\n                </div>\\n            </div>\\n\\n        </div>\\n    <div *ngIf=\\\"allowedToEditSettings()\\\">\\n        <button id=\\\"save\\\" (click)=\\\"save(damageCategoryForm.form.valid)\\\">{{'button.SaveLabel' | translate}}</button>\\n        <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n\\n    </div>\\n</form>\\n\";","module.exports = \"<span defaultOverlayTarget></span>\\n\\n<div class=\\\"col-md-12\\\">\\n    <h3>{{'damageCategoryConfig.Label' | translate}}</h3>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <h4>{{'globalSettings.Label' | translate}}</h4>\\n\\n        <div class=\\\"form-group\\\">\\n            <label for=\\\"global-check\\\">{{'globalCheckLocation.Label' | translate}}</label>\\n            <input class=\\\"form-control\\\" id=\\\"global-check\\\" type=\\\"number\\\" [readonly]=\\\"!allowedToEditSettings()\\\" [(ngModel)]=\\\"globalSettings.check\\\" min=\\\"0\\\"  oninput=\\\"this.value = Math.abs(this.value)\\\">\\n        </div>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\">\\n            <button id=\\\"save-global\\\" (click)=\\\"saveGlobal()\\\">{{'button.SaveLabel' | translate}}</button>\\n        </div>\\n    </div>\\n\\n    <div class=\\\"col-md-12\\\">\\n        <h4>{{'categoriesSettings.Label' | translate}}</h4>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\">\\n            <button id=\\\"add\\\" (click)=\\\"openCategory(-1)\\\">{{'button.AddLabel' | translate}}</button>\\n\\n\\n            <div class=\\\"col-md-12\\\">\\n                <div class=\\\"pull-left\\\">\\n                    <div>{{'damageCategoryConfig.exportFileLabel' | translate}}</div>\\n                    <button (click)=\\\"loadDataForCsv()\\\"\\n                            class=\\\"btn btn-default glyphicon glyphicon-download\\\">\\n                        {{'button.DownloadLabel' | translate}}\\n                    </button>\\n                </div>\\n                <div class=\\\"pull-right\\\">\\n                    <div>{{'damageCategoryConfig.importFileLabel' | translate}}</div>\\n                    <input id=\\\"choose-file\\\" type=\\\"file\\\" (change)=\\\"loadCsvFile($event)\\\" class=\\\"inputfile-csv\\\" accept=\\\".csv\\\"/>\\n                    <label class=\\\"btn btn-default\\\" for=\\\"choose-file\\\">{{csvFileName}}</label>\\n\\n                    <button (click)=\\\"importCSV()\\\"\\n                            class=\\\"btn btn-default glyphicon glyphicon-upload\\\"\\n                            [disabled]=\\\"!csvFile || !csvFileName\\\">\\n                        {{'button.UploadLabel' | translate}}\\n                    </button>\\n                </div>\\n            </div>\\n\\n\\n        </div>\\n        <table class=\\\"table table-striped clickable\\\">\\n            <thead>\\n            <tr>\\n                <th (click)=\\\"sort('name')\\\">\\n                    <cm-sortable [label]=\\\"'category.Label'\\\" [sort]=\\\"'name' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('check')\\\">\\n                    <cm-sortable [label]=\\\"'outsideJob.CheckLabel'\\\" [sort]=\\\"'check' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th (click)=\\\"sort('block')\\\">\\n                    <cm-sortable [label]=\\\"'estimatedRepairTime.Label'\\\" [sort]=\\\"'estimatedRepairTime' === sortField\\\" [state]=\\\"sortDirection\\\"></cm-sortable>\\n                </th>\\n                <th></th>\\n            </tr>\\n            </thead>\\n\\n            <tbody>\\n            <tr *ngFor=\\\"let category of categoryConfigList\\\">\\n                <td (click)=\\\"openCategory(category.number)\\\">\\n                    {{category.name}}\\n                </td>\\n                <td (click)=\\\"openCategory(category.number)\\\">\\n                    {{category.check}}\\n                </td>\\n                <td (click)=\\\"openCategory(category.number)\\\">\\n                    {{category.estimatedRepairTime}}\\n                </td>\\n                <td *ngIf=\\\"allowedToEditSettings()\\\">\\n                    <button id=\\\"removeDamageCategory\\\" class=\\\"btn btn-danger remove show_tip\\\" (click)=\\\"removeCategory(category)\\\">\\n                        <i class=\\\"fa fa-trash-o\\\"></i>\\n                    </button>\\n                </td>\\n            </tr>\\n            </tbody>\\n            <ngx-spinner [bdColor] = \\\"spBdColor\\\" [size] = \\\"spSize\\\" [color] = \\\"spColor\\\" [type] = \\\"spType\\\" [fullScreen] = 'spFullScreen' >{{spText}}</ngx-spinner>\\n        </table>\\n    </div>\\n\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-location-config-list.component.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-location-config-list.component.css\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!./cm-damage-cat-location-config-list.component.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".inputfile-csv {\\n    width: 0.1px;\\n    height: 0.1px;\\n    opacity: 0;\\n    overflow: hidden;\\n    position: absolute;\\n    z-index: -1;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<span defaultOverlayTarget></span>\\n\\n\\n<!-- Put all input fields in a form to use angulars validation by exposing the form with 'ngForm'-->\\n<form #damageCategoryForm=\\\"ngForm\\\">\\n    <div class=\\\"col-md-12\\\">\\n        <h3>{{'damageCategoryConfig.Label' | translate}}</h3>\\n\\n        <div class=\\\"col-md-12\\\">\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"name\\\">{{'locations.NameLabel' | translate}} *</label>\\n                <input class=\\\"form-control\\\" id=\\\"name\\\" type=\\\"string\\\" [(ngModel)]=\\\"model.name\\\" [readonly]=\\\"!allowedToEditSettings()\\\"\\n                       name=\\\"name\\\" #name=\\\"ngModel\\\" required size=\\\"255\\\" [maxLength]=\\\"255\\\"\\n                       [ngClass]=\\\"{'cm-warn':(name.invalid || catExistsError) && isSavePressed}\\\">\\n            </div>\\n            <div [hidden]=\\\"name.valid || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryConfig.EmptyNameLabel' | translate}}\\n            </div>\\n            <div [hidden]=\\\"!catExistsError || !isSavePressed\\\" class=\\\"alert alert-danger\\\">\\n                {{'damageCategoryConfig.categoryAlreadyExist' | translate}}\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"mapping-text\\\">{{'Mapping text' | translate}}</label>\\n                <textarea class=\\\"form-control\\\" id=\\\"mapping-text\\\" [(ngModel)]=\\\"mappingStr\\\" [readonly]=\\\"!allowedToEditSettings()\\\"\\n                          name=\\\"mapping-text\\\"></textarea>\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-check\\\">{{'globalCheckLocation.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-check\\\" type=\\\"number\\\" [(ngModel)]=\\\"model.check\\\"\\n                       [readonly]=\\\"!allowedToEditSettings()\\\" name=\\\"global-check\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"global-estimated-repair-time\\\">{{'globalEstimatedRepairTime.Label' | translate}}</label>\\n                <input class=\\\"form-control\\\" id=\\\"global-estimated-repair-time\\\" type=\\\"number\\\"\\n                       [(ngModel)]=\\\"model.estimatedRepairTime\\\" [readonly]=\\\"!allowedToEditSettings()\\\"\\n                       name=\\\"global-estimated-repair-time\\\" min=\\\"0\\\" oninput=\\\"this.value = Math.abs(this.value)\\\">\\n            </div>\\n\\n            <div *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"form-group\\\">\\n                <div class=\\\"form-check\\\">\\n                    <input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" id=\\\"checkbox100\\\"\\n                           [(ngModel)]=\\\"model.closeComplainDirectly\\\" name=\\\"global-close-complain-directly\\\">\\n                    <label class=\\\"form-check-label\\\"\\n                           for=\\\"checkbox100\\\">{{'globalCloseComplainDirectly.Label' | translate}}</label>\\n                </div>\\n            </div>\\n\\n            <div class=\\\"form-group\\\">\\n                <label for=\\\"spare-part-table\\\">{{'damageCategoryConfig.SuggestedRepairPartsLabel' | translate}}</label>\\n\\n                <button *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"pull-right btn btn-success\\\" id=\\\"open-bikes\\\" (click)=\\\"openParts()\\\">\\n                    <i class=\\\"fa fa-search-plus\\\"></i>\\n                </button>\\n\\n                <table class=\\\"table table-striped clickable\\\" id=\\\"spare-part-table\\\">\\n                    <thead>\\n                    <tr>\\n\\n                        <th (click)=\\\"sort('articleNumber')\\\">\\n                            <cm-sortable [label]=\\\"'articleNumber.Label'\\\"\\n                                         [sort]=\\\"'articleNumber' === sortField\\\"\\n                                         [state]=\\\"sortDirection\\\"></cm-sortable>\\n                        </th>\\n                        <th (click)=\\\"sort('category')\\\">\\n                            <cm-sortable [label]=\\\"'category.Label'\\\"\\n                                         [sort]=\\\"'dateAssigned' === sortField\\\"\\n                                         [state]=\\\"sortDirection\\\"></cm-sortable>\\n                        </th>\\n                        <th (click)=\\\"sort('part')\\\">\\n                            <cm-sortable [label]=\\\"'sparePart.PartLabel'\\\"\\n                                         [sort]=\\\"'dateAssigned' === sortField\\\"\\n                                         [state]=\\\"sortDirection\\\"></cm-sortable>\\n                        </th>\\n                        <th (click)=\\\"sort('quantity')\\\">\\n                            <cm-sortable [label]=\\\"'sparePart.QuantityLabel'\\\"\\n                                         [sort]=\\\"'dateAssigned' === sortField\\\"\\n                                         [state]=\\\"sortDirection\\\"></cm-sortable>\\n                        </th>\\n                        <th></th>\\n\\n                    </tr>\\n                    </thead>\\n\\n                    <tbody>\\n                    <tr *ngFor=\\\"let item of suggestedParts; let index = index; trackBy:trackByIndex;\\\">\\n                        <td>\\n                            {{item.articleNumber}}\\n                        </td>\\n                        <td>\\n                            {{ item.category ? item.category : item.code}}\\n                        </td>\\n                        <td>\\n                            {{item.part ? item.part : item.code }}\\n                        </td>\\n                        <td>\\n                            <div class=\\\"count-input space-bottom\\\">\\n                                <a *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"incr-btn\\\" data-action=\\\"decrease\\\" (click)=\\\"decQuantity(item)\\\">–</a>\\n                                <input class=\\\"quantity\\\" type=\\\"text\\\" [readonly]=\\\"!allowedToEditSettings()\\\" name=a{{index}}\\n                                       [(ngModel)]=\\\"suggestedParts[index].quantity\\\"/>\\n                                <a *ngIf=\\\"allowedToEditSettings()\\\" class=\\\"incr-btn\\\" data-action=\\\"increase\\\" (click)=\\\"incQuantity(item)\\\">+</a>\\n                            </div>\\n                        </td>\\n\\n                        <td>\\n\\n                            <button *ngIf=\\\"allowedToEditSettings()\\\" id=\\\"removeDamage\\\" class=\\\"btn btn-danger remove show_tip\\\"\\n                                    (click)=\\\"removePart(item)\\\">\\n                                <i class=\\\"fa fa-trash-o\\\"></i>\\n                            </button>\\n                        </td>\\n                    </tr>\\n                    </tbody>\\n                </table>\\n            </div>\\n\\n        </div>\\n\\n        <div *ngIf=\\\"allowedToEditSettings()\\\">\\n            <button id=\\\"save\\\" (click)=\\\"save(damageCategoryForm.form.valid)\\\">{{'button.SaveLabel' | translate}}</button>\\n            <button id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n        </div>\\n\\n    </div>\\n</form>\\n\";","import { CmAutoTicketConfigComponent } from \"../cm-auto-ticket-config/item/cm-auto-ticket-config.component\";\nimport { CmAutoTicketListComponent } from \"../cm-auto-ticket-config/list/cm-auto-ticket-config-list.component\";\nimport { CmHome } from \"./cm-home.component\";\nimport { CmProfileComponent } from \"../cm-profile/cm-profile.component\";\nimport { CmCurrentStationComponent } from \"../cm-profile/cm-current-station/cm-current-station.component\";\nimport { CmSettingsComponent } from \"../cm-profile/settings/cm-settings.component\";\nimport { CmRootPageComponent } from \"../cm-main-map/cm-map-with-filters.component\";\nimport { DatepickerModule, TimepickerModule } from \"ngx-bootstrap\";\nimport { CmMapComponent } from \"../cm-map/cm-map.component\";\nimport { CmJobListComponent } from \"../cm-job-list/list/cm-job-list.component\";\nimport { CmJobItemComponent } from \"../cm-job-list/item/cm-job-item.component\";\nimport { CmJobItemMapComponent } from \"../cm-job-list/item/cm-job-item-map.component\";\nimport { CmLocationItemComponent } from \"../cm-location/item/cm-location-item.component\";\nimport { CmTroubleTicketListComponent } from \"../cm-trouble-ticket/list/cm-trouble-tiket-list.component\";\nimport { CmTroubleTicketComponent } from \"../cm-trouble-ticket/item/cm-trouble-ticket.component\";\nimport { CmSparePartListComponent } from \"../cm-spare-part/list/cm-spare-part-list.component\";\nimport { CmMoveSparePartComponent } from \"../cm-spare-parts-move/cm-move-spare-part.component\";\nimport { CmSparePartDetailComponent } from \"../cm-spare-part/item/cm-spare-part-detail.component\";\nimport { CmPicturesComponent } from \"../cm-pictures/cm-pictures.component\";\nimport { CmBikeJobListComponent } from \"../cm-bike-job/list/cm-bike-job-list.component\";\nimport { CmBikeJobItemComponent } from \"../cm-bike-job/item/cm-bike-job-item.component\";\nimport { CmJobListByDistrictComponent } from \"../cm-job-list-disctrict-group/cm-job-list-by-district.component\";\nimport { CmUserComponent } from \"../cm-user/cm-user.component\";\nimport { CmNewsComponent } from \"../cm-news/cm-news.component\";\nimport { CmBikeDispatchComponent } from \"../cm-bike-dispatch/list/cm-bike-dispatch.component\";\nimport { CmBikeDispatchItemComponent } from \"../cm-bike-dispatch/item/cm-bike-dispatch-item.component\";\nimport { CmRepairListComponent } from \"../cm-repair/list/cm-repair-list.component\";\nimport { CmRepairItemComponent } from \"../cm-repair/item/cm-repair-item.component\";\nimport {CmDamageBikeCatConfigComponent} from \"../cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component\";\nimport {CmDamageLocationCatConfigComponent} from \"../cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component\";\nimport {CmDamageBikeCatConfigItemComponent} from \"../cm-damage-cat-bike-config/item/cm-damage-cat-bike-config-item.component\";\nimport {CmDamageLocationCatConfigItemComponent} from \"../cm-damage-cat-location-config/item/cm-damage-cat-location-config-item.component\";\n\nexport const secServicies = [DatepickerModule, TimepickerModule];\n\nexport const secComponents = [\n  CmHome,\n  CmRootPageComponent,\n  CmProfileComponent,\n  CmCurrentStationComponent,\n  CmSettingsComponent,\n  CmMapComponent,\n  CmJobListComponent,\n  CmJobItemComponent,\n  CmJobItemMapComponent,\n  CmLocationItemComponent,\n  CmTroubleTicketListComponent,\n  CmTroubleTicketComponent,\n  CmSparePartListComponent,\n  CmMoveSparePartComponent,\n  CmSparePartDetailComponent,\n  CmPicturesComponent,\n  CmBikeJobListComponent,\n  CmBikeJobItemComponent,\n  CmUserComponent,\n  CmJobListByDistrictComponent,\n  CmDamageBikeCatConfigComponent,\n  CmDamageLocationCatConfigComponent,\n  CmDamageBikeCatConfigItemComponent,\n  CmDamageLocationCatConfigItemComponent,\n  CmBikeDispatchComponent,\n  CmBikeDispatchItemComponent,\n  CmNewsComponent,\n  CmRepairListComponent,\n  CmRepairItemComponent,\n  CmAutoTicketListComponent,\n  CmAutoTicketConfigComponent\n];\n","import { CmTranslateService } from './../../services/localization/cm-translate.service';\nimport { CmHttpClient } from './../../services/http_client';\nimport { Component, EventEmitter, Output } from '@angular/core';\nimport { CmAuthService } from '../../services/cm-auth.service';\nimport { CmGuardService } from '../../services/guards/cm-guard.service';\nimport { Modal } from 'ngx-modialog/plugins/bootstrap';\n\n@Component({\n  selector: 'cm-profile',\n  template: require('./cm-profile.component.html'),\n  styles: [require('./cm-profile.component.scss').toString()]\n})\nexport class CmProfileComponent {\n  isDropdown: boolean;\n  @Output()\n  notifyUrl: EventEmitter<any> = new EventEmitter();\n\n  private readonly htmlTemplateUrl = '/master-data/api/v1/bin/clientFiles/privacy-statement-de.html';\n\n  private userName: string = 'iCheck';\n\n  constructor(\n    private authService: CmAuthService,\n    private modal: Modal,\n    private http: CmHttpClient,\n    private translate: CmTranslateService\n  ) {\n    this.isDropdown = false;\n    this.userName = CmGuardService.getUserName();\n  }\n\n  displayPrivacyStatement() {\n    // The content is stored in a html template remotely\n    this.http.get(this.htmlTemplateUrl,{responseType: \"text\"}).subscribe(\n        (template:any) =>\n        this.modal\n          .alert()\n          .title(this.translate.get('menu.PrivacyStatementLabel'))\n          .body(template)\n          .open(),\n      error =>\n        this.modal\n          .alert()\n          .title('Error')\n          .body(`${JSON.stringify(error)}`)\n          .open()\n    );\n\n    this.isDropdown = false;\n  }\n\n  clickSettings() {\n    this.notifyUrl.emit(['CmSettingsComponent']);\n    this.isDropdown = false;\n  }\n\n  clickProfile() {\n    this.isDropdown = !this.isDropdown;\n  }\n\n  logout() {\n    this.authService.logout();\n  }\n}\n","module.exports = \"<div class=\\\"item dropdown\\\" [ngClass]=\\\"{open:isDropdown, 'avatar-dropdown': true}\\\" id=\\\"profile-menu\\\">\\n\\n  <a class=\\\"dropdown-toggle\\\" data-toggle=\\\"dropdown\\\" href=\\\"javascript:void(0)\\\" (click)=\\\"clickProfile()\\\">\\n    <img src=\\\"\" + require(\"../../img/avatar.jpg\") + \"\\\">\\n  </a>\\n\\n  <ul class=\\\"dropdown-menu dropdown-menu-right\\\">\\n    <li class=\\\"dropdown-header\\\">\\n      {{userName}}\\n    </li>\\n    <li class=\\\"divider\\\"></li>\\n\\n    <li class=\\\"link\\\" (click)=\\\"displayPrivacyStatement()\\\"><a>{{'menu.PrivacyStatementLabel' | translate}}</a></li>\\n    <li class=\\\"divider\\\"></li>\\n\\n    <li class=\\\"link\\\" id=\\\"profile-settings\\\" (click)=\\\"clickSettings()\\\">\\n      <a [routerLink]=\\\"['/sec/settings']\\\">\\n        {{'menu.SettingsLabel' | translate}}\\n      </a>\\n    </li>\\n    <li class=\\\"divider\\\"></li>\\n\\n    <li class=\\\"link\\\" id=\\\"logout\\\" (click)=\\\"logout()\\\">\\n      <a href=\\\"javascript:void(0)\\\">\\n        {{'menu.LogoutLabel' | translate}}\\n      </a>\\n    </li>\\n\\n  </ul>\\n</div>\\n\";","module.exports = __webpack_public_path__ + \"dd15fcbd3062afbc4fe4f7f166e497b3.jpg\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-profile.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-profile.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-profile.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".avatar-dropdown{margin-top:0 !important}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, OnInit} from \"@angular/core\";\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {CmStationService} from \"../../../services/cm-station.service\";\nimport {CmGuardService} from \"../../../services/guards/cm-guard.service\";\n\n@Component({\n  selector: 'cm-current-station',\n  template: require('./cm-current-station.component.html'),\n  styles: [require('./cm-current-station.component.scss').toString()],\n  providers: [CmHttpClient]\n})\nexport class CmCurrentStationComponent implements OnInit {\n  currentStation: string;\n\n  stationList: string[];\n  private isDropdown = false;\n\n\n  constructor(private stationService: CmStationService) {\n\n  }\n\n  ngOnInit() {\n    this.stationList = CmGuardService.getStationList();\n    this.currentStation = this.stationList[0];\n  }\n\n  selectStation(station) {\n    CmGuardService.getStationList();\n    this.currentStation = station;\n    this.stationService.setStation(station);\n    this.toogleDropdown();\n  }\n\n  toogleDropdown() {\n    this.isDropdown = !this.isDropdown;\n  }\n}\n","module.exports = \"<div class=\\\"item dropdown\\\" id=\\\"current-station-menu\\\" [ngClass]=\\\"{open:isDropdown}\\\">\\n  <a class=\\\"dropdown-toggle btn btn-default\\\" data-toggle=\\\"dropdown\\\" href=\\\"javascript:void(0)\\\" (click)=\\\"toogleDropdown()\\\">\\n    {{currentStation}} <span class=\\\"caret\\\"></span>\\n  </a>\\n\\n  <ul class=\\\"dropdown-menu dropdown-menu-right\\\" id=\\\"current-station-menu-ul\\\">\\n    <li class=\\\"link\\\" *ngFor=\\\"let station of stationList\\\" (click)=\\\"selectStation(station)\\\">\\n      <a href=\\\"javascript:void(0)\\\">{{station}}</a>\\n    </li>\\n  </ul>\\n</div>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-current-station.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-current-station.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-current-station.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"div.item.dropdown{margin-top:10%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import { CmLocationsService } from './../../../services/cm-location.service';\nimport { Component, EventEmitter, Input, OnChanges, Output, ViewContainerRef, OnInit, OnDestroy } from '@angular/core';\nimport { overlayConfigFactory } from 'ngx-modialog';\nimport { BSModalContext, Modal } from 'ngx-modialog/plugins/bootstrap';\nimport { CmAssignComponent } from '../../cm-assign/cm-assign.component';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CmTranslateService } from '../../../services/localization/cm-translate.service';\nimport { CmHttpClient } from '../../../services/http_client';\nimport {BikeJobListItem, CmJobType} from '../../cm-bike-job/cm-bike-job-list.model';\nimport { CmTroubleTicketComponent } from '../../cm-trouble-ticket/item/cm-trouble-ticket.component';\nimport { TabTitle } from '../../../shared/tabTitle';\nimport { BIKE_TYPE, LOCATION_TYPE } from '../../../shared/const/missionType';\nimport { CmLocation } from '../../../services/cm-location.service';\nimport {PageAdapter} from \"../../cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport * as moment from \"moment\";\nimport {Battery, BikeType} from \"../../../shared/bike\";\n\n@Component({\n    selector: 'cm-job-item-map',\n    template: require('./cm-job-item-map.component.html')\n})\nexport class CmJobItemMapComponent extends TabTitle implements OnChanges, OnInit, OnDestroy {\n    @Input()\n    locationName: string;\n    @Input()\n    locationId: number;\n    @Input()\n    bikeNumber: string;\n    @Input()\n    bikeId: number;\n    @Input()\n    bikeStatus: string;\n    @Input()\n    pedelec: boolean;\n    @Input()\n    battery: Battery;\n    @Input()\n    branding: Array<string>;\n    @Input()\n    showClose: boolean = true;\n    @Output()\n    closeJob: EventEmitter<any> = new EventEmitter();\n\n    private jobItemList: Array<CmJobListItem> = [];\n    private routeFrom: string;\n\n    private checkAll: boolean = true;\n\n    private inProgressOpenStatuses: string = 'InProgress,Open';\n\n    private currentTimeStr = moment().format();\n\n    constructor(\n        private modal: Modal,\n        private vcRef: ViewContainerRef,\n        private activatedRoute: ActivatedRoute,\n        private router: Router,\n        private http: CmHttpClient,\n        public translate: CmTranslateService,\n        private locationService: CmLocationsService\n    ) {\n        super('outsideJob.Title', translate);\n        // todo: 'defaultViewContainer' does not exist on type 'Overlay'\n        // modal.overlay.defaultViewContainer = vcRef;\n\n        activatedRoute.params.map(p => p).subscribe(data => {\n            this.routeFrom = (<any>data).from;\n            this.locationId = (<any>data).id;\n            this.reloadData();\n        });\n\n        setInterval(() => {\n            this.currentTimeStr = moment().format();\n        }, 1000);\n    }\n\n    ngOnInit() {\n        this.reloadData();\n    }\n    ngOnChanges() {\n        this.reloadData();\n    }\n\n    ngOnDestroy() {\n        try {\n            // todo - 'defaultViewContainer' does not exist on type 'Overlay'\n            //this.modal.overlay.defaultViewContainer.clear();\n        } catch (error) {\n            console.error(error);\n        }\n    }\n\n    public reloadData() {\n        let url = '/bikes-sql/api/v1/tasks/bikesJobList';\n        if (this.locationId) url += `?location=${this.locationId}`;\n        else if (this.bikeNumber) url += `?bikeNumber=${this.bikeNumber}`;\n\n        if(this.branding && this.branding.length> 0){\n            url += `&bikeBranding=` + this.branding.join(',');\n        }\n\n        if (this.locationId || this.bikeNumber) {\n            this.http.get<PageAdapter<CmJobListItem>>(`${url}&status=${this.inProgressOpenStatuses}`).subscribe(data => {\n                let tempList = data.content;\n                tempList.forEach(el => (el.checked = true));\n                this.jobItemList = tempList;\n            });\n        }\n\n        /*\n         * DBREN-484: Display Station name in Details of Joblist\n         * NOTE:\n         * 1. All @Inputs are never filled because this component is only called by routes. This is a bug or it was changed.\n         * 2. All routes so far call this component only with the locationId. So we can load the complete station data by its id.\n         */\n        this.loadLocation();\n    }\n\n    //DBREN-484: Display Station name in Details of Joblist\n    private loadLocation() {\n        if (this.locationId)\n            this.http.get<CmLocation>(`/bikes-sql/api/v1/locations/${this.locationId}`).subscribe(data => {\n                let location = data;\n                if (location) this.locationName = this.locationService.getFullName(location);\n            });\n    }\n\n    private closeJobItem() {\n        if (this.routeFrom) this.router.navigate([`/sec/${this.routeFrom}`]);\n        this.closeJob.next(true);\n    }\n\n    private assign() {\n        this.modal.open(CmAssignComponent, overlayConfigFactory({ parent: this }, BSModalContext));\n    }\n\n    private unassign() {\n        let idArray = [];\n        this.jobItemList.filter(el => el.checked === true).forEach(el => idArray.push(el.id));\n        this.http.post('/bikes-sql/api/v1/tasks/unbooking', idArray).subscribe(data => this.reloadData());\n    }\n\n    private getText(jobItem: CmJobListItem): string {\n        switch (jobItem.task) {\n            case CmJobType[CmJobType.TO_MOVE]:\n                return `${this.translate.get('bikesJobListType.list.TO_MOVE')}`;\n            case CmJobType[CmJobType.TO_CHECK]:\n                return `${this.translate.get('outsideJob.CheckLabel')} ${jobItem.bike.bikeNumber}`;\n            case CmJobType[CmJobType.TO_CHARGE]:\n                return `${this.translate.get('bikesJobListType.list.TO_CHARGE')} ${jobItem.bike.bikeNumber}`;\n            case CmJobType[CmJobType.TO_WORKSHOP]:\n                return `${jobItem.bike.bikeNumber} ${this.translate.get('outsideJob.ToWsLabel')}`;\n            case CmJobType[CmJobType.FOR_LOCATION]:\n                return `${this.translate.get('bikesJobListType.list.FOR_LOCATION')} ${this.locationName} (${this.locationId})`;\n            case CmJobType[CmJobType.LOCATION]:\n                return `${this.translate.get('bikesJobListType.list.LOCATION')}`;\n        }\n    }\n\n    private getBikeTypes() {\n        return Object.keys(BikeType)\n    }\n\n    private getQuantity(item: BikeJobListItem, bikeType: string) {\n        return item == null || item.quantities == null ? null : item.quantities[bikeType];\n    }\n\n    private selectAll() {\n        this.jobItemList.forEach(item => (item.checked = this.checkAll));\n    }\n\n    private isBikeValid(): boolean {\n        return this.bikeId && this.bikeId > 0;\n    }\n\n    private isLocationValid(): boolean {\n        return this.locationId && this.locationId > 0;\n    }\n\n    private addNewBikeTicket() {\n        let bike = { bikeId: this.bikeId, bikeNumber: this.bikeNumber };\n        this.modal.open(\n            CmTroubleTicketComponent,\n            overlayConfigFactory({ ticketId: -1, bike: bike, missionType: BIKE_TYPE, parent: this }, BSModalContext)\n        );\n    }\n\n    private addNewLocationTicket() {\n        let location = { locationId: this.locationId, fullName: this.locationName };\n        this.modal.open(\n            CmTroubleTicketComponent,\n            overlayConfigFactory({ ticketId: -1, location: location, missionType: LOCATION_TYPE, parent: this }, BSModalContext)\n        );\n    }\n}\n\nclass CmJobListItem extends BikeJobListItem {\n    checked: boolean;\n}\n","module.exports = \"<div class=\\\"col-md-12\\\">\\n    <h3 *ngIf=\\\"locationName\\\">{{locationName}}</h3>\\n    <h4 *ngIf=\\\"bikeNumber\\\">{{'bike.Label' | translate}} {{bikeNumber}} {{bikeStatus}}</h4>\\n    <h6 *ngIf=\\\"battery && pedelec\\\" class=\\\"center-align\\\">\\n        {{battery.chargeInPercent != null ? battery.chargeInPercent + '%' : ''}} ({{battery.charging  ? ('dispatching.charging' | translate) : ('dispatching.notCharging' | translate)}})\\n    </h6>\\n    <table class=\\\"table table-striped\\\">\\n        <thead>\\n        <tr>\\n            <th>{{'jobItem.JobLabel' | translate}}</th>\\n            <th>{{'jobItem.AssignedToLabel' | translate}}</th>\\n            <ng-container *ngIf=\\\"!bikeId\\\">\\n                <th *ngFor=\\\"let type of getBikeTypes()\\\">\\n                    {{'quantities.' + type | translate}}\\n                </th>\\n            </ng-container>\\n            <th>{{'location.fixTime' | translate}}</th>\\n            <th class=\\\"center-align\\\">\\n                <input type=\\\"checkbox\\\" [(ngModel)]=\\\"checkAll\\\" (ngModelChange)=\\\"selectAll()\\\">\\n            </th>\\n        </tr>\\n        </thead>\\n\\n        <tbody>\\n        <tr *ngFor=\\\"let item of jobItemList\\\">\\n            <td>\\n                {{getText(item)}}\\n            </td>\\n            <td>\\n                {{item.user}}\\n            </td>\\n            <ng-container *ngIf=\\\"!bikeId\\\">\\n                <td *ngFor=\\\"let type of getBikeTypes()\\\">\\n                    {{getQuantity(item, type)}}\\n                </td>\\n            </ng-container>\\n            <td>\\n                <cm-hour-minute-countdown [start]=\\\"item.dateFinished || currentTimeStr\\\" [finish]=\\\"item.mustBeFixedAt\\\" [static]=\\\"!!item.dateFinished\\\"></cm-hour-minute-countdown>\\n            </td>\\n            <td class=\\\"center-align\\\">\\n                <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.checked\\\">\\n            </td>\\n        </tr>\\n        </tbody>\\n    </table>\\n\\n    <div>\\n        <button id=\\\"assign\\\" (click)=\\\"assign()\\\">{{'jobItem.AssignBtn' | translate}}</button>\\n        <button id=\\\"unassign\\\" (click)=\\\"unassign()\\\">{{'unassign.Label' | translate}}</button>\\n        <button *ngIf=\\\"isBikeValid()\\\" id=\\\"create-btt\\\" (click)=\\\"addNewBikeTicket()\\\">{{'createTT.Label' | translate}}</button>\\n        <button *ngIf=\\\"isLocationValid()\\\" id=\\\"create-ltt\\\" (click)=\\\"addNewLocationTicket()\\\">{{'createTT.Label' | translate}}</button>\\n        <button id=\\\"close\\\" *ngIf=\\\"showClose\\\" (click)=\\\"closeJobItem()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\\n\";","import {Component, Input} from \"@angular/core\";\nimport {Modal} from \"ngx-modialog/plugins/bootstrap\";\nimport {TranslateService} from \"@ngx-translate/core\";\nimport {CmAmazonPicturesService} from \"../../services/cm-amazon-picture.service\";\n\n/**\n * Created by anikinma on 20.06.16.\n */\n@Component({\n  selector: 'cm-pictures',\n  template: require('./cm-pictures.component.html'),\n  styles: [require('./cm-pictures.component.scss').toString()]\n})\n\nexport class CmPicturesComponent {\n\n  @Input() pictures: Array<any> = [];\n  @Input() readonly: boolean = false;\n  @Input() insideModalWindow: boolean = false;\n\n  constructor(private modal: Modal,\n              private translate: TranslateService,\n              private amazonPictures: CmAmazonPicturesService\n  ) {\n  }\n\n  loadPictures(event) {\n\n    if (!this.pictures) {\n      this.pictures = [];\n    }\n    let files = event.target.files;\n\n    if (event.target.files && (event.target.files.length + this.pictures.length) > 6) {\n      let message: string;\n      try {\n        message = (<any>this.translate.get('overviewPhoto.MaxPictureMsg')).value;\n      } catch (e) {\n        console.log('Error: translation problems');\n      }\n\n      if(!message) message = 'Only 6 pictures can be uploaded!';\n\n      this.modal.alert()\n        .message(message)\n        .open();\n      return;\n    }\n\n    for (let file of files) {\n      let reader = new FileReader();\n      let dHolder = this.pictures;\n      let t = this;\n      reader.addEventListener(\"load\", function () {\n        dHolder[dHolder.length++] = reader.result;\n      }, false);\n      reader.readAsDataURL(file);\n    }\n    this.clearInputFile(event.target);\n  }\n\n  clearInputFile(f) {\n    if (f.value) {\n      try {\n        f.value = ''; //for IE11, latest Chrome/Firefox/Opera...\n      } catch (err) {\n      }\n      if (f.value) { //for IE5 ~ IE10\n        var form = document.createElement('form'),\n          parentNode = f.parentNode, ref = f.nextSibling;\n        form.appendChild(f);\n        form.reset();\n        parentNode.insertBefore(f, ref);\n      }\n    }\n  }\n\n  removePicture(picture) {\n    var index = this.pictures.indexOf(picture, 0);\n    if (index > -1) {\n      this.pictures.splice(index, 1);\n    }\n  }\n\n  viewPicture(picture) {\n    this.modal.alert()\n      .message('<img class=\"img-responsive\" src=\"' + this.getPicture(picture) + '\"/>')\n      .open();\n  }\n\n  private getPicture(data) {\n    return this.amazonPictures.getPicture(data);\n  }\n\n}\n","module.exports = \"<span *ngIf=\\\"!insideModalWindow\\\" defaultOverlayTarget></span>\\n\\n<div class=\\\"form-group col-md-12\\\">\\n  <div *ngIf=\\\"!readonly\\\">{{'overviewPhoto.AddPictureLabel' | translate}}</div>\\n\\n  <input *ngIf=\\\"!readonly\\\" id=\\\"add-image\\\" type=\\\"file\\\" multiple (change)=\\\"loadPictures($event)\\\"/>\\n\\n  <div class=\\\"row gal-img\\\" id=\\\"picture-container\\\">\\n    <div class=\\\"col-md-4 parent-image-div\\\" *ngFor=\\\"let picture of pictures; let i=index\\\" [id]=\\\"'pict-'+i\\\">\\n      <img class=\\\"img-responsive\\\" [src]=\\\"getPicture(picture)\\\">\\n\\n      <button *ngIf=\\\"!readonly\\\" class=\\\"btn btn-danger remove pict-close-btn\\\" [id]=\\\"'remove-picture-'+i\\\"\\n              (click)=\\\"removePicture(picture)\\\">\\n        <i class=\\\"fa fa-trash-o\\\"></i>\\n      </button>\\n\\n      <button class=\\\"btn pict-view-btn\\\" (click)=\\\"viewPicture(picture)\\\">\\n        <i class=\\\"fa fa-search-plus\\\"></i>\\n      </button>\\n\\n    </div>\\n  </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-pictures.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-pictures.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-pictures.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".gal-img{padding-top:10px}.parent-image-div{position:relative;display:inline-block}.pict-close-btn{position:absolute;top:0}.pict-view-btn{position:absolute;top:0;right:1.1em}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {Modal} from \"ngx-modialog/plugins/bootstrap\";\n\n@Component({\n    selector: 'cm-user',\n    template: require('./cm-user.component.html')\n})\nexport class CmUserComponent {\n\n    @Input() login: string;\n    @Output() showUserJobs: EventEmitter<boolean> = new EventEmitter<boolean>();\n    private user: CmUserModel;\n\n    private _showUserJobs: boolean = false;\n\n    private jobs: Array<CmUserJob> = [];\n\n    private dragAndDropEl: any;\n\n    constructor(private modal: Modal) {\n\n    }\n\n    ngOnChanges() {\n        this.user = new CmUserModel(this.login);\n    }\n\n    private showJobs(user) {\n        this._showUserJobs = !this._showUserJobs;\n        this.showUserJobs.next(this._showUserJobs);\n    }\n\n    private recalculate() {\n        this.modal.alert()\n            .message('Jobs were recalculated!')\n            .open();\n    }\n\n    private sendToDriver() {\n        this.modal.alert()\n            .message('New data was transmitted to the driver!')\n            .open();\n    }\n\n    removeRow(row) {\n        let index = this.jobs.indexOf(row, 0);\n        if (index > -1) {\n            this.jobs.splice(index, 1);\n        }\n    }\n\n    allowDrop(ev) {\n        ev.preventDefault();\n    }\n\n    drag(ev) {\n        this.dragAndDropEl = ev;\n    }\n\n    drop(ev, dropTo) {\n        ev.preventDefault();\n\n        if (this.dragAndDropEl instanceof CmUserJob) {\n            this.dragAndDropEl.priority = dropTo.priority - 1 === 0 ? 1 : dropTo.priority - 1;\n            this.dragAndDropEl = null;\n\n            this.jobs.sort((a, b) => {\n                return a.priority - b.priority\n            });\n        }\n    }\n\n}\n\nclass CmUserModel {\n    login: string;\n    transporter: string;\n    stations: number;\n    districts: number;\n    bikes: number;\n\n    constructor(login: string, transporter?: string, stations?: number, districts?: number, bikes?: number) {\n        this.login = login;\n        this.transporter = transporter ? transporter : this.generateTransporter();\n        this.districts = districts ? districts : Math.floor(3 * Math.random()) + 1;\n        this.stations = stations ? stations : Math.floor(10 * Math.random()) + 5;\n        this.bikes = bikes ? bikes : Math.floor(20 * Math.random()) + 15;\n    }\n\n    generateTransporter(): string {\n        let id = Math.floor(4 * Math.random()) + 1;\n        return id % 2 === 0 ? 'Lorry ' + this.generateLicensePlate() : 'Truck ' + this.generateLicensePlate();\n    }\n\n    private letters: Array<string> = ['A', 'B', 'C', 'D', 'M', 'L', 'Y', 'Z', 'K']\n\n    private generateLicensePlate() {\n        let numbers = '' + Math.floor(10 * Math.random()) + Math.floor(10 * Math.random()) +\n            Math.floor(10 * Math.random()) + Math.floor(10 * Math.random());\n        return numbers + '-' + this.letters[Math.floor(9 * Math.random())] + this.letters[Math.floor(9 * Math.random())];\n    }\n}\n\nclass CmUserJob {\n    from: string;\n    to: string;\n    bikes: number;\n    priority: number;\n    status: string;\n\n    constructor(from: string, to: string, bikes: number, priority: number, status: string) {\n        this.from = from;\n        this.to = to;\n        this.bikes = bikes;\n        this.priority = priority;\n        this.status = status;\n    }\n}\n\n\n","module.exports = \"<div style=\\\"min-height:100px; border: solid; margin-top: 10px;\\\" >\\n    <div style=\\\"margin-top: 5px; margin-left: 5px; margin-right: 5px;\\\" (click)=\\\"showJobs()\\\">\\n        <span class=\\\"fa fa-user-circle\\\" style=\\\"\\\"></span>\\n        {{user.login}}\\n\\n        <!--<span style=\\\"float:right;\\\">{{user.districts}}/{{user.stations}}/{{user.bikes}}</span>-->\\n    </div>\\n\\n    <!--<div style=\\\"margin-left: 5px; margin-top: 10px;\\\" (click)=\\\"showJobs()\\\">-->\\n        <!--<span class=\\\"fa fa-truck\\\" style=\\\"margin-right: 3px;\\\"></span>-->\\n        <!--{{user.transporter}}-->\\n    <!--</div>-->\\n\\n    <!--<div *ngIf=\\\"_showUserJobs\\\" style=\\\"margin-bottom: 5px; margin-right: 5px; margin-left: 5px;\\\">-->\\n        <!--<h5 style=\\\"text-align: center;\\\"><b>Job list</b></h5>-->\\n        <!--<table class=\\\"table table-striped\\\">-->\\n            <!--<thead>-->\\n            <!--<tr>-->\\n                <!--<th>From</th>-->\\n                <!--<th>To</th>-->\\n                <!--<th>Bikes</th>-->\\n                <!--<th>Status</th>-->\\n                <!--<th></th>-->\\n            <!--</tr>-->\\n            <!--</thead>-->\\n\\n            <!--<tbody>-->\\n            <!--<tr *ngFor=\\\"let row of jobs\\\" draggable=\\\"true\\\" (dragstart)=\\\"drag(row)\\\" (drop)=\\\"drop($event, row)\\\" (dragover)=\\\"allowDrop($event)\\\">-->\\n                <!--<td>-->\\n                    <!--{{row.from}}-->\\n                <!--</td>-->\\n                <!--<td>-->\\n                    <!--{{row.to}}-->\\n                <!--</td>-->\\n                <!--<td>-->\\n                    <!--{{row.bikes}}-->\\n                <!--</td>-->\\n                <!--<td>-->\\n                    <!--{{row.status}}-->\\n                <!--</td>-->\\n                <!--<td >-->\\n                    <!--<button id=\\\"remove-row\\\" class=\\\"btn btn-danger remove show_tip\\\" *ngIf=\\\"row.status !== 'In work'\\\"-->\\n                            <!--(click)=\\\"removeRow(row)\\\">-->\\n                        <!--<i class=\\\"fa fa-trash-o\\\"></i>-->\\n                    <!--</button>-->\\n            <!--</tr>-->\\n            <!--</tbody>-->\\n        <!--</table>-->\\n\\n        <!--<button id=\\\"save\\\" (click)=\\\"recalculate()\\\">Recalculate</button>-->\\n        <!--<button id=\\\"close\\\" (click)=\\\"sendToDriver()\\\">Send to driver</button>-->\\n    <!--</div>-->\\n</div>\";","import { CmEmailServiceService } from './../services/cm-email-service.service';\nimport {NgModule, ErrorHandler, CUSTOM_ELEMENTS_SCHEMA} from \"@angular/core\";\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { DataService } from \"../services/cm-data.service\";\nimport { CmGuardService } from \"../services/guards/cm-guard.service\";\nimport { CmHttpClient } from \"../services/http_client\";\nimport { CmAmazonPicturesService } from \"../services/cm-amazon-picture.service\";\nimport { CmLocalizationService } from \"../services/localization/cm-localization.service\";\nimport {\n  TranslateLoader,\n  TranslateModule,\n  TranslatePipe,\n  TranslateService\n} from \"@ngx-translate/core\";\nimport { RouterModule } from \"@angular/router\";\nimport { HttpClientModule} from \"@angular/common/http\";\nimport { FormsModule } from \"@angular/forms\";\nimport { BrowserModule } from \"@angular/platform-browser\";\nimport { ModalModule } from \"ngx-modialog\";\nimport { BootstrapModalModule, Modal , bootstrap3Mode} from \"ngx-modialog/plugins/bootstrap\";\n// import {  bootstrap3Mode } from \"ngx-modialog/plugins/bootstrap/lib/modal\";\n// import { Ng2BootstrapModule } from \"ng2-bootstrap\";\nimport { NouisliderComponent } from \"ng2-nouislider\";\nimport {BsDatepickerModule} from 'ngx-bootstrap/datepicker';\nimport {ProgressbarModule} from 'ngx-bootstrap/progressbar';\nimport {TimepickerModule} from 'ngx-bootstrap/timepicker';\nimport { DateTimePickerComponent } from \"../components/datetimepicker/datetimepicker.component\";\nimport { CmStationService } from \"../services/cm-station.service\";\nimport { CommonModule } from \"@angular/common\";\nimport { CmAssignComponent } from \"../components/cm-assign/cm-assign.component\";\nimport { PagerService } from \"../services/cm-pager.service\";\nimport { CmLocationsService } from \"../services/cm-location.service\";\nimport { CmTranslateService } from \"../services/localization/cm-translate.service\";\nimport { CmModalLocationListComponent } from \"../components/cm-location/modal-window/cm-modal-location-list.component\";\nimport { CmLocationListComponent } from \"../components/cm-location/list/cm-location-list.component\";\nimport { PagerComponent } from \"../components/pager/pager.component\";\nimport { CmBikeListComponent } from \"../components/cm-bike-short-list/cm-bike-list.component\";\nimport { CmModalBikeListComponent } from \"../components/cm-bike-short-list/modal-window/cm-modal-bike-list.component\";\nimport { CmSortableThComponent } from \"../components/cm-sortable-th/cm-sortable-th.component\";\nimport { CmLocationFilterComponent } from \"../components/cm-filters/cm-location-filter/cm-location-filter.component\";\nimport { CmBikeBrandingFilterComponent} from \"../components/cm-filters/cm-bike-branding-filter/cm-bike-branding-filter.component\";\nimport { CmDistrictFilterComponent } from \"../components/cm-filters/cm-district-filter/cm-district-filter.component\";\nimport { CmUsersFilterComponent } from \"../components/cm-filters/cm-users-filter/cm-users-filter.component\";\nimport { CmStatusFilterComponent } from \"../components/cm-filters/cm-job-status-filter/cm-job-status-filter.component\";\nimport { CmValidatableNumberfieldComponent } from \"../components/cm-validatable/numberfield/cm-validatable-numberfield.component\";\nimport { CmTableTotalComponent } from \"../components/cm-table-total/cm-table-total.component\";\nimport { CmTtCategoryFilterComponent } from \"../components/cm-filters/cm-tt-category-filter/cm-tt-category-filter.component\";\nimport { CmShowOnMapComponent } from \"../components/cm-show-on-map/cm-show-on-map.component\";\nimport { CmModalSparePartCatWindow } from \"../components/cm-spare-parts-category/rename/cm-spare-part-cat-window.component\";\nimport { CmAddSparePartCategoryComponent } from \"../components/cm-spare-parts-category/add/cm-spare-part-category.component\";\nimport { CmOrganizationService } from \"../services/cm-organization.service\";\nimport {CmSparePartListModalComponent} from \"../components/cm-spare-part/list-modal/cm-spare-part-list-modal.component\";\nimport { CmUserWorkloadService } from \"../services/cm-user-workload.service\";\nimport { CmBikeBlockingService } from '../services/cm-bike-blocking.service';\nimport {CmAliveService} from \"../services/cm-alive-service\";\nimport {CmHourMinuteComponent} from \"../components/cm-validatable/hour-minute/cm-hour-minute.component\";\nimport {CmHourMinuteCountdownComponent} from \"../components/cm-validatable/hour-minute-countdown/cm-hour-minute-countdown.component\";\nimport {CmModalMessageComponent} from \"../components/cm-modal-message/cm-modal-message-component\";\nimport {CmGlobalErrorHandler} from \"../services/cm-global-handler-service\";\nimport {CmComponentTrackerService} from \"../services/cm-component-tracker-service\";\nimport {CmBikeStatusFilterComponent} from \"../components/cm-filters/cm-bike-status-filter/cm-bike-status-filter.component\";\nimport {NgxSpinnerModule} from \"ngx-spinner\";\nimport {CmBikeTypeFilterComponent} from \"../components/cm-filters/cm-bike-type-filter/cm-bike-type-filter.component\";\nimport {CmReportComponent} from \"../components/cm-report/cm-report.component\";\n\nbootstrap3Mode();\n@NgModule({\n  imports: [\n    RouterModule.forRoot([]),\n    BrowserModule,\n    FormsModule,\n    CommonModule,\n    HttpClientModule,\n    TranslateModule.forRoot(\n        {\n          loader: {\n            provide: TranslateLoader,\n            useFactory: (http: CmHttpClient) => new CmLocalizationService(http),\n            deps: [CmHttpClient]\n          }\n        }\n    ),\n    ModalModule.forRoot(),\n    BootstrapModalModule,\n    BsDatepickerModule.forRoot(),\n    TimepickerModule.forRoot(),\n    BrowserAnimationsModule,\n    NgxSpinnerModule,\n    ProgressbarModule.forRoot(),\n    // Ng2BootstrapModule\n  ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA],\n  providers: [\n    DataService,\n    CmGuardService,\n    CmHttpClient,\n    CmAmazonPicturesService,\n    CmLocalizationService,\n    TranslateService,\n    CmStationService,\n    PagerService,\n    CmLocationsService,\n    CmTranslateService,\n    CmOrganizationService,\n    CmUserWorkloadService,\n    CmBikeBlockingService,\n    CmEmailServiceService,\n    CmAliveService,\n    CmComponentTrackerService,\n    {\n      provide: ErrorHandler,\n      useClass: CmGlobalErrorHandler\n    }\n\n  ],\n  declarations: [\n    NouisliderComponent,\n    DateTimePickerComponent,\n    CmAssignComponent,\n    CmLocationListComponent,\n    CmModalLocationListComponent,\n    CmBikeListComponent,\n    CmModalBikeListComponent,\n    CmSparePartListModalComponent,\n    PagerComponent,\n    CmSortableThComponent,\n    CmLocationFilterComponent,\n    CmBikeBrandingFilterComponent,\n    CmDistrictFilterComponent,\n    CmUsersFilterComponent,\n    CmStatusFilterComponent,\n    CmValidatableNumberfieldComponent,\n    CmHourMinuteComponent,\n    CmHourMinuteCountdownComponent,\n    CmTableTotalComponent,\n    CmTtCategoryFilterComponent,\n    CmShowOnMapComponent,\n    CmAddSparePartCategoryComponent,\n    CmModalSparePartCatWindow,\n    CmModalMessageComponent,\n    CmBikeStatusFilterComponent,\n    CmBikeTypeFilterComponent,\n    CmReportComponent\n  ],\n  entryComponents: [\n    CmAssignComponent,\n    CmModalLocationListComponent,\n    CmSparePartListModalComponent,\n    CmModalBikeListComponent,\n    CmModalSparePartCatWindow,\n    CmModalMessageComponent\n  ],\n    exports: [\n        TranslatePipe,\n        TranslateModule,\n        BsDatepickerModule,\n        // BrowserAnimationsModule,\n        TimepickerModule,\n        RouterModule,\n        BrowserModule,\n        FormsModule,\n        // HttpClientModule,\n        // ModalModule,\n        // BootstrapModalModule,\n        // Ng2BootstrapModule,\n        NouisliderComponent,\n        DateTimePickerComponent,\n        PagerComponent,\n        CmSortableThComponent,\n        CmLocationFilterComponent,\n        CmDistrictFilterComponent,\n        CmUsersFilterComponent,\n        CmStatusFilterComponent,\n        CmValidatableNumberfieldComponent,\n        CmHourMinuteComponent,\n        CmHourMinuteCountdownComponent,\n        CmTableTotalComponent,\n        CmTtCategoryFilterComponent,\n        CmShowOnMapComponent,\n        CmModalSparePartCatWindow,\n        CmBikeStatusFilterComponent,\n        CmBikeTypeFilterComponent,\n        NgxSpinnerModule,\n        CmReportComponent,\n        CmBikeBrandingFilterComponent\n    ]\n})\nexport class CmSharedModule {}","import { Injectable } from \"@angular/core\";\nimport { TranslateLoader } from \"@ngx-translate/core\";\nimport { CmHttpClient } from \"../http_client\";\nimport { Subject, Observable } from \"rxjs\";\nimport { DEFAULT_LANGUAGE } from \"../../app.component\";\n\n@Injectable()\nexport class CmLocalizationService implements TranslateLoader {\n  private selectedLang: string;\n  private data: any;\n\n  private dataSubject = new Subject<any>();\n  public data$ = this.dataSubject.asObservable();\n\n  constructor(private http: CmHttpClient) {\n    this.selectedLang = localStorage.getItem(\"customerLang\") || DEFAULT_LANGUAGE;\n    localStorage.setItem(\"customerLang\", this.selectedLang);\n  }\n\n  getTranslation(lang: string): Observable<any> {\n    return this.http.getWithoutAuth(\"/master-data/api/v1/localization/\" + lang).map(res => {\n      let result = res;\n      this.dataSubject.next(result);\n      return result;\n    });\n  }\n}\n","import * as noUiSlider from 'nouislider';\nimport {\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Input,\n  OnInit,\n  OnChanges,\n  Output,\n  Renderer2,\n  NgZone,\n  OnDestroy\n} from '@angular/core';\nimport {\n  ControlValueAccessor,\n  FormControl,\n  NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nexport interface NouiFormatter {\n  to(value: number): string;\n  from(value: string): number;\n}\nexport class DefaultFormatter implements NouiFormatter {\n/**\n * @param {?} value\n * @return {?}\n */\nto(value: number): string {\n    // formatting with http://stackoverflow.com/a/26463364/478584\n    return String(parseFloat(parseFloat(String(value)).toFixed(2)));\n  };\n/**\n * @param {?} value\n * @return {?}\n */\nfrom(value: string): number {\n    return parseFloat(value);\n  }\n}\nexport class NouisliderComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {\npublic slider: any;\npublic handles: any[];\npublic disabled: boolean;\npublic behaviour: string;\npublic connect: boolean[];\npublic limit: number;\npublic min: number;\npublic max: number;\npublic snap: boolean;\npublic animate: boolean | boolean[];\npublic range: any;\npublic step: number;\npublic format: NouiFormatter;\npublic pageSteps: number;\npublic config: any = {};\npublic ngModel: number | number[];\npublic keyboard: boolean;\npublic onKeydown: any;\npublic formControl: FormControl;\npublic tooltips: Array<any>;\npublic change: EventEmitter<any> = new EventEmitter(true);\npublic update: EventEmitter<any> = new EventEmitter(true);\npublic slide: EventEmitter<any> = new EventEmitter(true);\npublic set: EventEmitter<any> = new EventEmitter(true);\npublic start: EventEmitter<any> = new EventEmitter(true);\npublic end: EventEmitter<any> = new EventEmitter(true);\nprivate value: any;\nprivate onChange: any = Function.prototype;\nprivate cleanups: VoidFunction[] = [];\n/**\n * @param {?} ngZone\n * @param {?} el\n * @param {?} renderer\n */\nconstructor(private ngZone: NgZone,\nprivate el: ElementRef,\nprivate renderer : Renderer2) { }\n/**\n * @return {?}\n */\nngOnInit(): void {\n    let /** @type {?} */ inputsConfig = JSON.parse(\n      JSON.stringify({\n        behaviour: this.behaviour,\n        connect: this.connect,\n        limit: this.limit,\n        start: this.formControl !== undefined ? this.formControl.value : this.ngModel,\n        step: this.step,\n        pageSteps: this.pageSteps,\n        keyboard: this.keyboard,\n        onKeydown: this.onKeydown,\n        range: this.range || this.config.range || { min: this.min, max: this.max },\n        tooltips: this.tooltips,\n        snap: this.snap,\n        animate: this.animate,\n      }),\n    );\n    inputsConfig.tooltips = this.tooltips || this.config.tooltips;\n    inputsConfig.format = this.format || this.config.format || new DefaultFormatter();\n\n    this.ngZone.runOutsideAngular(() => {\n      this.slider = noUiSlider.create(\n        this.el.nativeElement.querySelector('div'),\n        Object.assign(this.config, inputsConfig)\n      );\n    });\n\n    this.handles = [].slice.call(this.el.nativeElement.querySelectorAll('.noUi-handle'));\n\n    if (this.config.keyboard) {\n      if (this.config.pageSteps === undefined) {\n        this.config.pageSteps = 10;\n      }\n\n      for (const /** @type {?} */ handle of this.handles) {\n        handle.setAttribute('tabindex', 0);\n\n        const /** @type {?} */ onKeydown = this.config.onKeydown || this.defaultKeyHandler;\n\n        this.ngZone.runOutsideAngular(() => {\n          this.cleanups.push(\n            this.renderer.listen(handle, 'keydown', onKeydown),\n            this.renderer.listen(handle, 'click', () => {\n              handle.focus();\n            }),\n          );\n        });\n      }\n    }\n\n    this.slider.on('set', (values: string[], handle: number, unencoded: number[]) => {\n      this.eventHandler(this.set, values, handle, unencoded);\n    });\n\n    this.slider.on('update', (values: string[], handle: number, unencoded: number[]) => {\n      if (this.update.observers.length > 0) {\n        this.ngZone.run(() => {\n          this.update.emit(this.toValues(values));\n        });\n      }\n    });\n\n    this.slider.on('change', (values: string[], handle: number, unencoded: number[]) => {\n      if (this.change.observers.length > 0) {\n        this.ngZone.run(() => {\n          this.change.emit(this.toValues(values));\n        });\n      }\n    });\n\n    this.slider.on('slide', (values: string[], handle: number, unencoded: number[]) => {\n      this.eventHandler(this.slide, values, handle, unencoded);\n    });\n\n    this.slider.on('start', (values: string[], handle: number, unencoded: number[]) => {\n      if (this.start.observers.length > 0) {\n        this.ngZone.run(() => {\n          this.start.emit(this.toValues(values));\n        });\n      }\n    });\n\n    this.slider.on('end', (values: string[], handle: number, unencoded: number[]) => {\n      if (this.end.observers.length > 0) {\n        this.ngZone.run(() => {\n          this.end.emit(this.toValues(values));\n        });\n      }\n    });\n  }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: any) {\n    if (this.slider && (changes.min || changes.max || changes.step || changes.range)) {\n      this.ngZone.runOutsideAngular(() => {\n        setTimeout(() => {\n          this.slider.updateOptions({\n            range: Object.assign({}, {\n              min: this.min,\n              max: this.max\n            }, this.range || {}),\n            step: this.step\n          });\n        });\n      });\n    }\n  }\n/**\n * @return {?}\n */\nngOnDestroy(): void {\n    this.slider.destroy();\n\n    while (this.cleanups.length) {\n      this.cleanups.pop()();\n    }\n  }\n/**\n * @param {?} values\n * @return {?}\n */\ntoValues(values: string[]): any | any[] {\n    let /** @type {?} */ v = values.map(this.config.format.from);\n    return (v.length == 1 ? v[0] : v);\n  }\n/**\n * @param {?} value\n * @return {?}\n */\nwriteValue(value: any): void {\n    if (this.slider) {\n      this.ngZone.runOutsideAngular(() => {\n        setTimeout(() => {\n          this.slider.set(value);\n        });\n      });\n    }\n  }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnChange(fn: (value: any) => void) {\n    this.onChange = fn;\n  }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnTouched(fn: () => {}): void {}\n/**\n * @param {?} isDisabled\n * @return {?}\n */\nsetDisabledState(isDisabled: boolean): void {\n    isDisabled\n      ? this.renderer.setAttribute(this.el.nativeElement.childNodes[0], 'disabled', 'true')\n      : this.renderer.removeAttribute(this.el.nativeElement.childNodes[0], 'disabled');\n  }\nprivate eventHandler = (emitter: EventEmitter<any>, values: string[], handle: number, unencoded: number[]) => {\n    let /** @type {?} */ v = this.toValues(values);\n    let /** @type {?} */ emitEvents = false;\n    if(this.value === undefined) {\n      this.value = v;\n      return;\n    }\n    if(Array.isArray(v) && this.value[handle] != v[handle]) {\n      emitEvents = true;\n    }\n    if(!Array.isArray(v) && this.value != v) {\n      emitEvents = true;\n    }\n    if(emitEvents) {\n      this.ngZone.run(() => {\n        if (emitter.observers.length > 0) {\n          emitter.emit(v);\n        }\n        this.onChange(v);\n      });\n    }\n    if(Array.isArray(v)) {\n      this.value[handle] = v[handle];\n    } else {\n      this.value = v;\n    }\n  }\nprivate defaultKeyHandler = (e: KeyboardEvent) => {\n    let /** @type {?} */ stepSize: any[] = this.slider.steps();\n    let /** @type {?} */ index = parseInt(( /** @type {?} */((<HTMLElement>e.target))).getAttribute('data-handle'));\n    let /** @type {?} */ sign = 1;\n    let /** @type {?} */ multiplier: number = 1;\n    let /** @type {?} */ step = 0;\n    let /** @type {?} */ delta = 0;\n\n    switch ( e.which ) {\n      case 34:  // PageDown\n        multiplier = this.config.pageSteps;\n      case 40:  // ArrowDown\n      case 37:  // ArrowLeft\n        sign = -1;\n        step = stepSize[index][0];\n        e.preventDefault();\n        break;\n\n      case 33:  // PageUp\n        multiplier = this.config.pageSteps;\n      case 38:  // ArrowUp\n      case 39:  // ArrowRight\n        step = stepSize[index][1];\n        e.preventDefault();\n        break;\n\n      default:\n        break;\n    }\n\n    delta = sign * multiplier * step;\n    let /** @type {?} */ newValue: number | number[];\n\n    if(Array.isArray(this.value)) {\n      newValue = [].concat(this.value);\n      newValue[index] = newValue[index] + delta;\n    } else {\n      newValue = this.value + delta;\n    }\n\n    this.slider.set(newValue);\n  }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n  selector: 'nouislider',\n  host: {\n    '[class.ng2-nouislider]': 'true'\n  },\n  template: '<div [attr.disabled]=\"disabled ? true : undefined\"></div>',\n  styles: [`\n    :host {\n      display: block;\n      margin-top: 1rem;\n      margin-bottom: 1rem;\n    }\n  `],\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => NouisliderComponent),\n      multi: true\n    }\n  ]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: NgZone, },\n{type: ElementRef, },\n{type: Renderer2, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'disabled': [{ type: Input },],\n'behaviour': [{ type: Input },],\n'connect': [{ type: Input },],\n'limit': [{ type: Input },],\n'min': [{ type: Input },],\n'max': [{ type: Input },],\n'snap': [{ type: Input },],\n'animate': [{ type: Input },],\n'range': [{ type: Input },],\n'step': [{ type: Input },],\n'format': [{ type: Input },],\n'pageSteps': [{ type: Input },],\n'config': [{ type: Input },],\n'ngModel': [{ type: Input },],\n'keyboard': [{ type: Input },],\n'onKeydown': [{ type: Input },],\n'formControl': [{ type: Input },],\n'tooltips': [{ type: Input },],\n'change': [{ type: Output },],\n'update': [{ type: Output },],\n'slide': [{ type: Output },],\n'set': [{ type: Output },],\n'start': [{ type: Output },],\n'end': [{ type: Output },],\n};\n}\n\nfunction NouisliderComponent_tsickle_Closure_declarations() {\n/** @type {?} */\nNouisliderComponent.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNouisliderComponent.ctorParameters;\n/** @type {?} */\nNouisliderComponent.propDecorators;\n/** @type {?} */\nNouisliderComponent.prototype.slider;\n/** @type {?} */\nNouisliderComponent.prototype.handles;\n/** @type {?} */\nNouisliderComponent.prototype.disabled;\n/** @type {?} */\nNouisliderComponent.prototype.behaviour;\n/** @type {?} */\nNouisliderComponent.prototype.connect;\n/** @type {?} */\nNouisliderComponent.prototype.limit;\n/** @type {?} */\nNouisliderComponent.prototype.min;\n/** @type {?} */\nNouisliderComponent.prototype.max;\n/** @type {?} */\nNouisliderComponent.prototype.snap;\n/** @type {?} */\nNouisliderComponent.prototype.animate;\n/** @type {?} */\nNouisliderComponent.prototype.range;\n/** @type {?} */\nNouisliderComponent.prototype.step;\n/** @type {?} */\nNouisliderComponent.prototype.format;\n/** @type {?} */\nNouisliderComponent.prototype.pageSteps;\n/** @type {?} */\nNouisliderComponent.prototype.config;\n/** @type {?} */\nNouisliderComponent.prototype.ngModel;\n/** @type {?} */\nNouisliderComponent.prototype.keyboard;\n/** @type {?} */\nNouisliderComponent.prototype.onKeydown;\n/** @type {?} */\nNouisliderComponent.prototype.formControl;\n/** @type {?} */\nNouisliderComponent.prototype.tooltips;\n/** @type {?} */\nNouisliderComponent.prototype.change;\n/** @type {?} */\nNouisliderComponent.prototype.update;\n/** @type {?} */\nNouisliderComponent.prototype.slide;\n/** @type {?} */\nNouisliderComponent.prototype.set;\n/** @type {?} */\nNouisliderComponent.prototype.start;\n/** @type {?} */\nNouisliderComponent.prototype.end;\n/** @type {?} */\nNouisliderComponent.prototype.value;\n/** @type {?} */\nNouisliderComponent.prototype.onChange;\n/** @type {?} */\nNouisliderComponent.prototype.cleanups;\n/** @type {?} */\nNouisliderComponent.prototype.eventHandler;\n/** @type {?} */\nNouisliderComponent.prototype.defaultKeyHandler;\n/** @type {?} */\nNouisliderComponent.prototype.ngZone;\n/** @type {?} */\nNouisliderComponent.prototype.el;\n/** @type {?} */\nNouisliderComponent.prototype.renderer;\n}\n\n\ninterface DecoratorInvocation {\n  type: Function;\n  args?: any[];\n}\n","import {NgModule} from '@angular/core';\nimport {NouisliderComponent} from './ng2-nouislider.component';\nexport class NouisliderModule { static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n    exports: [NouisliderComponent],\n    declarations: [NouisliderComponent],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction NouisliderModule_tsickle_Closure_declarations() {\n/** @type {?} */\nNouisliderModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNouisliderModule.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n  type: Function;\n  args?: any[];\n}\n","import {\n    Component,\n    Output,\n    EventEmitter,\n    OnChanges,\n    OnInit,\n    Input,\n    ChangeDetectorRef,\n    HostListener\n} from \"@angular/core\";\nimport {BsDatepickerConfig, BsLocaleService} from 'ngx-bootstrap/datepicker';\nimport * as moment from \"moment\";\nimport 'moment/locale/de';\nimport 'moment/locale/fr';\nimport 'moment/locale/ru';\nimport {DEFAULT_LANGUAGE} from \"../../app.component\";\nimport { setTheme } from 'ngx-bootstrap/utils';\n\nimport {frLocale, listLocales, ruLocale} from 'ngx-bootstrap/chronos';\nimport { defineLocale } from 'ngx-bootstrap/chronos';\n\nimport { deLocale } from 'ngx-bootstrap/locale';\n\n\n@Component({\n    selector: 'datetimepicker',\n    template: require('./datetimepicker.component.html'),\n    styles: [require('./datetimepicker.component.scss').toString(), require('ngx-bootstrap/datepicker/bs-datepicker.scss').toString()]\n})\nexport class DateTimePickerComponent implements OnChanges , OnInit{\n    @Input() dateTimeValue: string;\n    @Input() showTimePart: boolean = true;\n    @Input() allowFuture: boolean = false;\n    @Output() datePickerselect = new EventEmitter();\n\n    dateTime: Date;\n    defaultMaxDate: Date = new Date();\n    selectedLang: string;\n    locales = listLocales();\n\n    bsConfig: Partial<BsDatepickerConfig>;\n    colorTheme = 'theme-red';\n    dateInputFormat= 'DD.MM.YYYY HH:mm';\n    public opened: boolean = false;\n    validTime: boolean = true;\n\n    constructor(private localeService: BsLocaleService) {\n        setTheme('bs3'); // or 'bs4'\n        defineLocale('de', deLocale);\n        defineLocale('fr', frLocale);\n        defineLocale('ru', ruLocale);\n    }\n\n        ngOnInit(): void {\n        this.selectedLang = localStorage.getItem(\"customerLang\") || DEFAULT_LANGUAGE;\n        moment.locale(this.selectedLang);\n        this.localeService.use(this.selectedLang);\n            if (this.showTimePart) {\n                this.dateInputFormat= 'DD.MM.YYYY HH:mm';\n            } else {\n                this.dateInputFormat= 'DD.MM.YYYY';\n            }\n        this.bsConfig = Object.assign({}, { containerClass: this.colorTheme , dateInputFormat: this.dateInputFormat});\n\n            if (this.dateTimeValue && moment(this.dateTimeValue).isValid()) {\n                 this.dateTime = moment(this.dateTimeValue).toDate();\n\n        }\n    }\n\n    ngAfterViewInit() {\n        this.selDate(this.dateTime);\n    }\n\n    ngOnChanges() {\n        if (this.dateTimeValue && moment(this.dateTimeValue).isValid()) {\n            this.dateTime = moment(this.dateTimeValue).toDate();\n        } else {\n            this.dateTime = null;\n            // this.select.emit(null);\n        }\n    }\n\n    private getValue() {\n        if (this.dateTime) {\n                return moment(this.dateTime).format(this.dateInputFormat);\n        } else {\n            return '';\n        }\n    }\n\n    private selDate(event) {\n        if(event) {\n                this.dateTime=event;\n                this.datePickerselect.emit(moment(this.dateTime).format());\n        }\n    }\n\n    private oKBtn(){\n        if(this.validTime)\n        {\n            this.opened = !this.opened;\n        }\n    }\n\n    private clearBtn(){\n        this.dateTime=null;\n        this.datePickerselect.emit(null);\n        this.validTime = true;\n        this.oKBtn();\n    }\n\n    private onClick(){\n        if( !this.opened ) {\n            let event = new Event(\"closeDatePickers\");\n            document.dispatchEvent(event);\n        }\n        this.opened=!this.opened;\n    }\n\n    private  isValidTime(event: boolean){\n        this.validTime = event;\n    }\n\n    @HostListener('document:closeDatePickers',[`$event`])\n    private closeAllDatePickers(event: Event){\n        this.opened = false;\n    }\n}\n","module.exports = \"<div>\\n  <div class=\\\"input-group datetimepicker-input\\\" (click)=\\\"onClick()\\\">\\n    <input class=\\\"form-control\\\" type=\\\"text\\\"  [value]=\\\"getValue()\\\" disabled>\\n    <span class=\\\"input-group-addon\\\" id=\\\"datetime-calendar\\\">\\n      <span class=\\\"glyphicon glyphicon-calendar\\\"></span>\\n    </span>\\n  </div>\\n\\n  <div *ngIf=\\\"opened\\\" class=\\\"datetimepicker well\\\" id=\\\"picker\\\">\\n    <div class=\\\"col-md-12\\\">\\n    <timepicker *ngIf=\\\"showTimePart\\\" class=\\\"timepicker\\\"  [minuteStep]=\\\"1\\\" [(ngModel)]=\\\"dateTime\\\"\\n                (ngModelChange)=\\\"selDate($event)\\\" [showMeridian]=\\\"false\\\" (isValid)=\\\"isValidTime($event)\\\" [arrowkeys]=\\\"true\\\" [mousewheel]=\\\"true\\\"></timepicker>\\n    <br>\\n    <button class=\\\"btn btn-default\\\" id=\\\"ok-datetimepicker\\\" (click)=\\\"oKBtn()\\\">Ok</button>\\n    <button class=\\\"btn btn-danger\\\" id=\\\"cliar-datetimepicker\\\" (click)=\\\"clearBtn()\\\">Cancel</button>\\n    </div>\\n    <br>\\n      <bs-datepicker-inline *ngIf=\\\"!allowFuture\\\" [bsValue]=\\\"dateTime\\\"  [bsConfig]=\\\"bsConfig\\\"   (bsValueChange)=\\\"selDate($event)\\\"  [maxDate]=\\\"defaultMaxDate\\\"  ></bs-datepicker-inline>\\n      <bs-datepicker-inline *ngIf=\\\"allowFuture\\\"  [bsValue]=\\\"dateTime\\\"  [bsConfig]=\\\"bsConfig\\\"   (bsValueChange)=\\\"selDate($event)\\\" ></bs-datepicker-inline>\\n\\n  </div>\\n</div>\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./datetimepicker.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./datetimepicker.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./datetimepicker.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".datetimepicker-input{position:relative;z-index:1}.datetimepicker{position:absolute;text-align:center;z-index:2}.timepicker{display:inline-block}.datepicker{display:inline-block}.form-control:disabled{cursor:default}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","\nvar content = require(\"!!../../css-loader/dist/cjs.js!../../sass-loader/dist/cjs.js!./bs-datepicker.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../css-loader/dist/cjs.js!../../sass-loader/dist/cjs.js!./bs-datepicker.scss\", function() {\n\t\tvar newContent = require(\"!!../../css-loader/dist/cjs.js!../../sass-loader/dist/cjs.js!./bs-datepicker.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".bs-datepicker{display:flex;align-items:stretch;flex-flow:row wrap;background:#fff;box-shadow:0 0 10px 0 #aaa;position:relative;z-index:1}.bs-datepicker:after{clear:both;content:'';display:block}.bs-datepicker bs-day-picker{float:left}.bs-datepicker button:hover,.bs-datepicker button:focus,.bs-datepicker button:active,.bs-datepicker input:hover,.bs-datepicker input:focus,.bs-datepicker input:active,.bs-datepicker-btns button:hover,.bs-datepicker-btns button:focus,.bs-datepicker-btns button:active,.bs-datepicker-predefined-btns button:active,.bs-datepicker-predefined-btns button:focus{outline:none}.bs-datepicker-head{min-width:270px;height:50px;padding:10px;border-radius:3px 3px 0 0;text-align:justify}.bs-datepicker-head:after{content:\\\"\\\";display:inline-block;vertical-align:top;width:100%}.bs-datepicker-head button{display:inline-block;vertical-align:top;padding:0;height:30px;line-height:30px;border:0;background:transparent;text-align:center;cursor:pointer;color:#fff;transition:0.3s}.bs-datepicker-head button[disabled],.bs-datepicker-head button[disabled]:hover,.bs-datepicker-head button[disabled]:active{background:rgba(221,221,221,0.3);color:#f5f5f5;cursor:not-allowed}.bs-datepicker-head button.next,.bs-datepicker-head button.previous{border-radius:50%;width:30px;height:30px}.bs-datepicker-head button.next span,.bs-datepicker-head button.previous span{font-size:28px;line-height:1;display:inline-block;position:relative;height:100%;width:100%;border-radius:50%}.bs-datepicker-head button.current{border-radius:15px;max-width:155px;padding:0 13px}.bs-datepicker-head button:hover{background-color:rgba(0,0,0,0.1)}.bs-datepicker-head button:active{background-color:rgba(0,0,0,0.2)}.bs-datepicker-body{padding:10px;border-radius:0 0 3px 3px;min-height:232px;min-width:278px;border:1px solid #e9edf0}.bs-datepicker-body .days.weeks{position:relative;z-index:1}.bs-datepicker-body table{width:100%;border-collapse:separate;border-spacing:0}.bs-datepicker-body table th{font-size:13px;color:#9aaec1;font-weight:400;text-align:center}.bs-datepicker-body table td{color:#54708b;text-align:center;position:relative;padding:0}.bs-datepicker-body table td span{display:block;margin:0 auto;font-size:13px;border-radius:50%;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.bs-datepicker-body table td:not(.disabled):not(.week) span:not(.disabled):not(.is-other-month){cursor:pointer}.bs-datepicker-body table td.is-highlighted:not(.disabled):not(.selected) span,.bs-datepicker-body table td span.is-highlighted:not(.disabled):not(.selected){background-color:#e9edf0;transition:0s}.bs-datepicker-body table td.is-active-other-month:not(.disabled):not(.selected) span,.bs-datepicker-body table td span.is-active-other-month:not(.disabled):not(.selected){background-color:#e9edf0;transition:0s;cursor:pointer}.bs-datepicker-body table td span.disabled,.bs-datepicker-body table td.disabled span{color:#9aaec1}.bs-datepicker-body table td span.selected,.bs-datepicker-body table td.selected span{color:#fff}.bs-datepicker-body table td span.is-other-month,.bs-datepicker-body table td.is-other-month span{color:rgba(0,0,0,0.25)}.bs-datepicker-body table td.active{position:relative}.bs-datepicker-body table td.active.select-start:before{left:35%}.bs-datepicker-body table td.active.select-end:before{left:-85%}.bs-datepicker-body table td span.active.select-start:after,.bs-datepicker-body table td span.active.select-end:after,.bs-datepicker-body table td.active.select-start span:after,.bs-datepicker-body table td.active.select-end span:after{content:\\\"\\\";display:block;position:absolute;z-index:-1;width:100%;height:100%;transition:0.3s;top:0;border-radius:50%}.bs-datepicker-body table td:before,.bs-datepicker-body table td span:before{content:\\\"\\\";display:block;position:absolute;z-index:-1;top:6px;bottom:6px;left:-2px;right:-2px;box-sizing:content-box;background:transparent}.bs-datepicker-body table td.active.select-start+td.active:before{left:-20%}.bs-datepicker-body table td:last-child.active:before{border-radius:0 3px 3px 0;width:125%;left:-25%}.bs-datepicker-body table td span[class*=\\\"select-\\\"],.bs-datepicker-body table td[class*=\\\"select-\\\"] span{border-radius:50%;color:#fff}.bs-datepicker-body table.days td.active:not(.select-start):before,.bs-datepicker-body table.days td.in-range:not(.select-start):before,.bs-datepicker-body table.days span.active:not(.select-start):before,.bs-datepicker-body table.days span.in-range:not(.select-start):before{background:#e9edf0}.bs-datepicker-body table.days span{width:32px;height:32px;line-height:32px}.bs-datepicker-body table.days span.select-start{z-index:2}.bs-datepicker-body table.days span.is-highlighted.in-range:before,.bs-datepicker-body table.days span.in-range.select-end:before{background:none;right:0;left:0}.bs-datepicker-body table.days td.select-start+td.select-end:before,.bs-datepicker-body table.days td.select-start+td.is-highlighted:before,.bs-datepicker-body table.days td.active+td.is-highlighted:before,.bs-datepicker-body table.days td.active+td.select-end:before,.bs-datepicker-body table.days td.in-range+td.is-highlighted:before,.bs-datepicker-body table.days td.in-range+td.select-end:before{background:#e9edf0;width:100%}.bs-datepicker-body table.weeks tr td:nth-child(2).active:before{border-radius:3px 0 0 3px;left:0;width:100%}.bs-datepicker-body table:not(.weeks) tr td:first-child:before{border-radius:3px 0 0 3px}.bs-datepicker-body table.years td span{width:46px;height:46px;line-height:45px;margin:0 auto}.bs-datepicker-body table.years tr:not(:last-child) td span{margin-bottom:8px}.bs-datepicker-body table.months td{height:52px}.bs-datepicker-body table.months td span{padding:6px;border-radius:15px}.bs-datepicker .current-timedate{color:#54708b;font-size:15px;text-align:center;height:30px;line-height:30px;border-radius:20px;border:1px solid #e9edf0;margin-bottom:10px;cursor:pointer;text-transform:uppercase;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.bs-datepicker .current-timedate span:not(:empty):before{content:\\\"\\\";width:15px;height:16px;display:inline-block;margin-right:4px;vertical-align:text-bottom;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAADJViUEAAABMklEQVQoU9VTwW3CQBCcOUgBtEBKSAukAnBKME+wFCAlYIhk8sQlxFABtJAScAsuAPBEewYcxCP8ouxrPDsza61uiVN1o6RNHD4htSCmq49RfO71BvMJqBBkITRf1kmUW49nQRC9h1I5AZlBClaL8aP1fKgOOxCx8aSLs+Q19eZuNO8QmPqJRtDFguy7OAcDbJPs+/BKVPDIPrvD2ZJgWAmVe7O0rI0Vqs1seyWUXpuJoppYCa5L+U++NpNPkr5OE2oMdARsb3gykJT5ydZcL8Z9Ww60nxg2LhjON9li9OwXZzo+xLbp3nC2s9CL2RrueGyVrgwNm8HpsCzZ9EEW6kqXlo1GQe03FzP/7W8Hl0dBtu7Bf7zt6mIwvX1RvzDCm7+q3mAW0Dl/GPdUCeXrZLT9BrDrGkm4qlPvAAAAAElFTkSuQmCC)}.bs-datepicker-multiple{border-radius:4px 0 0 4px}.bs-datepicker-multiple+.bs-datepicker-multiple{margin-left:10px}.bs-datepicker-multiple .bs-datepicker{box-shadow:none;position:relative}.bs-datepicker-multiple .bs-datepicker:not(:last-child){padding-right:10px}.bs-datepicker-multiple .bs-datepicker+.bs-datepicker:after{content:\\\"\\\";display:block;width:14px;height:10px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAKCAYAAABrGwT5AAAA1ElEQVQoU42RsQrCUAxF77VuDu7O4oMWW//BURBBpZvgKk4uIrjoqKOTf+DopIO4uYggtFTfw3+pkQqCW1/G5J7kJiFy4m5MxUlxAzgIPHX+lzMPzupRYlYgxiR7vqsOP8YKzsTx0yxFMCUZ+q7aZzlr+OvgoWcAFyAHgat2jLWu48252DdqAihDJGSSJNUUxYmQjs3+hPQBlAh2rG2LCOPnaw3IiGDX99TRCs7ASJsNhUOA7d/LcuHvRG22FIZvsNXw1MX6VZExCilOQKEfeLXr/10+aC9Ho7arh7oAAAAASUVORK5CYII=);position:absolute;top:25px;left:-8px}.bs-datepicker-multiple .bs-datepicker .left{float:left}.bs-datepicker-multiple .bs-datepicker .right{float:right}.bs-datepicker-container{padding:15px}.bs-datepicker .bs-media-container{display:flex}@media (max-width: 768px){.bs-datepicker .bs-media-container{flex-direction:column}}.bs-datepicker-custom-range{padding:15px;background:#eee}.bs-datepicker-predefined-btns button{width:100%;display:block;height:30px;background-color:#9aaec1;border-radius:4px;color:#fff;border:0;margin-bottom:10px;padding:0 18px;text-align:left;transition:0.3s}.bs-datepicker-predefined-btns button:active,.bs-datepicker-predefined-btns button:hover{background-color:#54708b}.bs-datepicker-buttons{display:flex;flex-flow:row wrap;justify-content:flex-end;padding-top:10px;border-top:1px solid #e9edf0}.bs-datepicker-buttons .btn-default{margin-left:10px}.bs-timepicker-container{padding:10px 0}.bs-timepicker-label{color:#54708b;margin-bottom:10px}.bs-timepicker-controls{display:inline-block;vertical-align:top;margin-right:10px}.bs-timepicker-controls button{width:20px;height:20px;border-radius:50%;border:0;background-color:#e9edf0;color:#54708b;font-size:16px;font-weight:700;vertical-align:middle;line-height:0;padding:0;transition:0.3s}.bs-timepicker-controls button:hover{background-color:#d5dadd}.bs-timepicker-controls input{width:35px;height:25px;border-radius:13px;text-align:center;border:1px solid #e9edf0}.bs-timepicker .switch-time-format{text-transform:uppercase;min-width:54px;height:25px;border-radius:20px;border:1px solid #e9edf0;background:#fff;color:#54708b;font-size:13px}.bs-timepicker .switch-time-format img{vertical-align:initial;margin-left:4px}bs-datepicker-container,bs-daterangepicker-container{z-index:1080}@media (max-width: 768px){.bs-datepicker-multiple{display:flex}.bs-datepicker-multiple+.bs-datepicker-multiple{margin-top:10px;margin-left:0}}.theme-default .bs-datepicker-head{background-color:#777}.theme-default .bs-datepicker-body table td span.selected,.theme-default .bs-datepicker-body table td.selected span,.theme-default .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-default .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#777}.theme-default .bs-datepicker-body table td.week span{color:#777}.theme-default .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#777;color:#fff;opacity:0.5;transition:0s}.theme-green .bs-datepicker-head{background-color:#5cb85c}.theme-green .bs-datepicker-body table td span.selected,.theme-green .bs-datepicker-body table td.selected span,.theme-green .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-green .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#5cb85c}.theme-green .bs-datepicker-body table td.week span{color:#5cb85c}.theme-green .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#5cb85c;color:#fff;opacity:0.5;transition:0s}.theme-blue .bs-datepicker-head{background-color:#5bc0de}.theme-blue .bs-datepicker-body table td span.selected,.theme-blue .bs-datepicker-body table td.selected span,.theme-blue .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-blue .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#5bc0de}.theme-blue .bs-datepicker-body table td.week span{color:#5bc0de}.theme-blue .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#5bc0de;color:#fff;opacity:0.5;transition:0s}.theme-dark-blue .bs-datepicker-head{background-color:#337ab7}.theme-dark-blue .bs-datepicker-body table td span.selected,.theme-dark-blue .bs-datepicker-body table td.selected span,.theme-dark-blue .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-dark-blue .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#337ab7}.theme-dark-blue .bs-datepicker-body table td.week span{color:#337ab7}.theme-dark-blue .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#337ab7;color:#fff;opacity:0.5;transition:0s}.theme-red .bs-datepicker-head{background-color:#d9534f}.theme-red .bs-datepicker-body table td span.selected,.theme-red .bs-datepicker-body table td.selected span,.theme-red .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-red .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#d9534f}.theme-red .bs-datepicker-body table td.week span{color:#d9534f}.theme-red .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#d9534f;color:#fff;opacity:0.5;transition:0s}.theme-orange .bs-datepicker-head{background-color:#f0ad4e}.theme-orange .bs-datepicker-body table td span.selected,.theme-orange .bs-datepicker-body table td.selected span,.theme-orange .bs-datepicker-body table td span[class*=\\\"select-\\\"]:after,.theme-orange .bs-datepicker-body table td[class*=\\\"select-\\\"] span:after{background-color:#f0ad4e}.theme-orange .bs-datepicker-body table td.week span{color:#f0ad4e}.theme-orange .bs-datepicker-body table td.active-week span:hover{cursor:pointer;background-color:#f0ad4e;color:#fff;opacity:0.5;transition:0s}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, EventEmitter, OnInit, Output} from '@angular/core';\nimport {CmHttpClient} from \"../../services/http_client\";\nimport {CmBikeListItem} from \"./cm-bike-list.model\";\n\n@Component({\n    selector: 'cm-bikes',\n    template: require('./cm-bike-list.component.html')\n})\nexport class CmBikeListComponent implements OnInit {\n\n    @Output() selectBike: EventEmitter<CmBikeListItem> = new EventEmitter<CmBikeListItem>();\n\n    private rows: Array<CmBikeListItem> = [];\n\n    private filterValue: string;\n    private limit: number = 15;\n\n    constructor(private http: CmHttpClient) {\n    }\n\n    ngOnInit() {\n        this.http.get<Array<CmBikeListItem>>('/bikes-sql/api/v1/bicycles-short?page=1&limit=' + this.limit +\n            (this.filterValue ? '&number=' + this.filterValue : '')).subscribe(\n            (data:Array<CmBikeListItem>) => this.rows = data\n        )\n    }\n\n    filterList() {\n        if (this.filterValue.length > 1) {\n            this.ngOnInit();\n        }\n    }\n\n}","module.exports = \"<div class=\\\"col-md-12\\\">\\n\\n    <h3>{{'jobList.jobType.Bikes' | translate}}</h3>\\n\\n    <div class=\\\"form-group\\\">\\n        <label for=\\\"filter-text\\\">{{'filter.Label' | translate}}</label>\\n        <input class=\\\"form-control\\\" id=\\\"filter-text\\\" type=\\\"text\\\" [(ngModel)]=\\\"filterValue\\\"\\n               (ngModelChange)=\\\"filterList()\\\">\\n    </div>\\n\\n    <div *ngIf=\\\"rows.length >= 15\\\" class=\\\"alert alert-warning\\\">\\n        {{'limitWarningFirstPart.Msg' | translate}} {{limit}} {{'limitWarningSecondPart.Msg' | translate}}\\n    </div>\\n\\n    <table class=\\\"table table-striped\\\">\\n        <thead>\\n        <tr>\\n            <th>{{'bikeId.Label' | translate}}</th>\\n        </tr>\\n        </thead>\\n\\n        <tbody>\\n        <tr *ngFor=\\\"let row of rows\\\" (click)=\\\"selectBike.next(row)\\\">\\n            <td>\\n                {{row.bikeNumber}}\\n            </td>\\n        </tr>\\n        </tbody>\\n    </table>\\n</div>\";","import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\n@Component({\n    selector: 'cm-bike-branding-filter',\n    template: require('./cm-bike-branding-filter.component.html'),\n    styles: [require('./cm-bike-branding-filter.component.scss').toString()]\n})\nexport class CmBikeBrandingFilterComponent implements OnInit {\n    @Input() selectedBrands: Array<string> = [];\n    @Input() mapMode: boolean;\n\n    @Output() selectedBrandsChange = new EventEmitter<Array<string>>();\n    @Output() brandsLoaded = new EventEmitter<any>();\n\n    private brandsList: Array<BrandListItem> = [];\n    private dataSourceInit = false;\n\n    constructor(private translationService: TranslateService,\n                private http: CmHttpClient) {\n    }\n\n    ngOnChanges() {\n        this.brandsList.forEach(el => el.selected = false);\n        if (this.selectedBrands) {\n            this.selectedBrands.forEach(el => {\n                this.brandsList.forEach(el1 => {\n                    if (el1.name === el) {\n                        el1.selected = true;\n                    }\n                })\n            });\n        }\n    }\n\n    ngOnInit() {\n        this.http.get<Array<string>>('/bikes-sql/api/v1/bicycles/branding')\n            .subscribe(data => {\n            this.brandsLoaded.next(data);\n            if (data) {\n                    data.forEach(brand => {\n                        this.brandsList.push(new BrandListItem(brand))\n                        }\n                    );\n                    this.dataSourceInit = true;\n\n                    if (this.selectedBrands) {\n                        this.selectedBrands = this.selectedBrands.filter(selected => this.brandsList.some(brand => brand.name === selected));\n                    }\n                    this.ngOnChanges();\n                }\n        });\n\n    }\n\n    private _changeStatus() {\n        let outList = [];\n        this.brandsList.forEach(el => {\n            if (el.selected) {\n                outList.push(el.name);\n            }\n        });\n        this.selectedBrandsChange.next(outList);\n    }\n}\n\n\nclass BrandListItem {\n    name: string;\n    selected: boolean;\n\n    constructor(name: string) {\n        this.name = name;\n    }\n}","module.exports = \"<div *ngIf=\\\"dataSourceInit\\\" [ngClass]=\\\"(mapMode)?'map-mode':'normal-mode'\\\">\\n    <div>\\n        <b>{{'bikeBranding.brandingLabel' | translate}}</b>\\n    </div>\\n    <div  class=\\\"user-filter-main\\\">\\n        <div class=\\\"user-filter-table\\\">\\n            <table class=\\\"table\\\">\\n                <tbody>\\n                <tr *ngFor=\\\"let item of brandsList\\\">\\n                    <td class=\\\"user-filter-table-check\\\">\\n                        <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.selected\\\" (ngModelChange)=\\\"_changeStatus()\\\">\\n                    </td>\\n                    <td>\\n                        {{item.name}}\\n                    </td>\\n                </tr>\\n                </tbody>\\n            </table>\\n        </div>\\n    </div>\\n\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-branding-filter.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-branding-filter.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-branding-filter.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"cm-bike-branding-filter button{margin-left:3px}cm-bike-branding-filter .branding-changed{clear:left}cm-bike-branding-filter .map-mode .user-filter-table{overflow:auto;height:auto;margin-top:-10px}cm-bike-branding-filter .map-mode .branding-label{display:inline}cm-bike-branding-filter .map-mode .user-filter-table-check{width:20px}cm-bike-branding-filter .map-mode .user-filter-table .table{margin-bottom:0}cm-bike-branding-filter .map-mode .table>tbody>tr>td{background-color:transparent;border:none;white-space:nowrap;padding:2px 0}cm-bike-branding-filter .map-mode .branding-changed label:not(.postfix){display:none}cm-bike-branding-filter .map-mode .branding-changed .postfix{margin:0 5px}cm-bike-branding-filter .normal-mode .branding-changed button{display:none}cm-bike-branding-filter .normal-mode .branding-changed #filter-branding-changed{margin:0px 10px;width:100px;display:inline-block}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmLocationsService} from \"../../../services/cm-location.service\";\nimport {CmHttpClient} from \"../../../services/http_client\";\n\n@Component({\n    selector: 'cm-district-filter',\n    template: require('./cm-district-filter.component.html')\n})\nexport class CmDistrictFilterComponent implements OnInit {\n\n    @Input() district: string = null;\n    @Output() changeDistrict: EventEmitter<string> = new EventEmitter<string>();\n\n    private districtList: Array<string> = [];\n\n    constructor(private cmHttp: CmHttpClient) {\n    }\n\n    ngOnInit() {\n        this.cmHttp.get<Array<string>>('/bikes-sql/api/v1/locations/districts').subscribe(\n            (data:Array<string>) => this.districtList = data\n        );\n    }\n\n    private _changeDistrict() {\n        this.changeDistrict.next(this.district);\n    }\n\n}","module.exports = \"<label for=\\\"location-filter\\\">{{'locations.DistrictLabel' | translate}}</label>\\n<select class=\\\"form-control\\\" id=\\\"location-filter\\\" [(ngModel)]=\\\"district\\\" (ngModelChange)=\\\"_changeDistrict()\\\">\\n    <option *ngFor=\\\"let item of districtList\\\" [value]=\\\"item\\\">{{item}}</option>\\n</select>\";","import { CmUtil, SORT_DIRECTION } from './../../../shared/cm-util';\nimport { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport { Employee } from \"../../cm-assign/cm-assign.component\";\nimport {HttpHeaders} from \"@angular/common/http\";\n\n@Component({\n    selector: 'cm-users-filter',\n    template: require('./cm-users-filter.component.html'),\n    styles: [require('./cm-users-filter.component.scss').toString()]\n})\nexport class CmUsersFilterComponent implements OnInit, OnChanges {\n\n    @Input() selectedEmployee: Array<string> = [];\n    @Output() changeEmployee: EventEmitter<Array<string>> = new EventEmitter<Array<string>>();\n\n    private employeeList: Array<EmployeeListItem> = [];\n\n    constructor(private cmHttp: CmHttpClient) {\n    }\n\n    ngOnChanges() {\n        this.employeeList.forEach(el => el.selected = false);\n        if (this.selectedEmployee) {\n            this.selectedEmployee.forEach(el => {\n                this.employeeList.forEach(el1 => {\n                    if (el1.employee.login === el) {\n                        el1.selected = true;\n                    }\n                })\n            });\n        }\n    }\n\n    ngOnInit() {\n        let headers = new HttpHeaders().set('Authorization', 'Basic ZW1wbG95ZWUtd2ViLXBvcnRhbDo=');\n        let requestOptions = {\n            headers: headers,\n            observe: \"body\"\n        };\n\n        this.cmHttp.get<Employee[]>('/user-information/api/v1/users',requestOptions).subscribe(\n            ( data:Employee[] ) => {\n                const employees: Employee[] = CmUtil.simpleSort(data, \"login\", SORT_DIRECTION.ASC);\n                employees.forEach(employee => this.employeeList.push(new EmployeeListItem(employee)));\n                this.ngOnChanges();\n            }\n        );\n    }\n\n    private getName(item: EmployeeListItem): string {\n        let employee = item.employee;\n        return employee.login;\n    }\n\n    private _changeEmployee() {\n        let outList = [];\n        this.employeeList.forEach(el => {\n            if (el.selected) {\n                outList.push(el.employee.login);\n            }\n        });\n        this.changeEmployee.next(outList);\n    }\n}\n\nclass EmployeeListItem {\n    employee: Employee;\n    selected: boolean;\n\n    constructor(employee: Employee) {\n        this.employee = employee;\n        this.selected = false;\n    }\n}\n","module.exports = \"<div class=\\\"user-filter-main\\\">\\n    <div>\\n        <b>{{'assignJob.EmployeeLabel' | translate}}</b>\\n    </div>\\n    <div class=\\\"user-filter-table\\\">\\n        <table class=\\\"table\\\">\\n            <tbody>\\n            <tr *ngFor=\\\"let item of employeeList\\\">\\n                <td class=\\\"user-filter-table-check\\\">\\n                    <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.selected\\\" (ngModelChange)=\\\"_changeEmployee()\\\">\\n                </td>\\n                <td>\\n                    {{getName(item)}}\\n                </td>\\n            </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-users-filter.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-users-filter.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-users-filter.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".user-filter-main{margin-top:10px;cursor:default}.user-filter-table{height:120px;overflow:auto;overflow-x:hidden;margin-top:5px;margin-bottom:5px}.user-filter-table-check{width:30px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {DataService} from \"../../../services/cm-data.service\";\n\n@Component({\n    selector: 'cm-status-filter',\n    template: require('./cm-job-status-filter.component.html')\n})\nexport class CmStatusFilterComponent implements OnInit {\n    @Input() selectedStatuses: Array<string> = [];\n    @Input() dataSource: string = 'jobStatus';\n    @Output() changeStatus: EventEmitter<Array<string>> = new EventEmitter<Array<string>>();\n\n    private statusList: Array<StatusListItem> = [];\n\n    constructor(private dataService: DataService) {\n    }\n\n    ngOnChanges() {\n        this.statusList.forEach(el => el.selected = false);\n        if (this.selectedStatuses) {\n            this.selectedStatuses.forEach(el => {\n                this.statusList.forEach(el1 => {\n                    if (el1.status.name === el) {\n                        el1.selected = true;\n                    }\n                })\n            });\n        }\n    }\n\n    ngOnInit() {\n        this.dataService.returnLocalizedMap('/'  + this.dataSource).subscribe(\n            data => {\n                data[this.dataSource].forEach(el => this.statusList.push(new StatusListItem(el)));\n                this.ngOnChanges();\n            }\n        );\n    }\n\n    private _changeStatus() {\n        let outList = [];\n        this.statusList.forEach(el => {\n            if (el.selected) {\n                outList.push(el.status.name);\n            }\n        });\n        this.changeStatus.next(outList);\n    }\n}\n\nclass StatusListItem {\n    status: StatusItem;\n    selected: boolean;\n\n    constructor(status: StatusItem) {\n        this.status = status;\n        this.selected = false;\n    }\n}\n\nclass StatusItem {\n    name: string;\n    text: string;\n}","module.exports = \"<div class=\\\"user-filter-main\\\">\\n    <div>\\n        <b>{{'troubleTickets.StatusLabel' | translate}}</b>\\n    </div>\\n    <div class=\\\"user-filter-table\\\">\\n        <table class=\\\"table\\\">\\n            <tbody>\\n            <tr *ngFor=\\\"let item of statusList\\\">\\n                <td class=\\\"user-filter-table-check\\\">\\n                    <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.selected\\\" (ngModelChange)=\\\"_changeStatus()\\\">\\n                </td>\\n                <td>\\n                    {{item.status.text}}\\n                </td>\\n            </tr>\\n            </tbody>\\n        </table>\\n    </div>\\n</div>\";","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmValidatable} from \"../cm-validatable\";\nimport {CmTranslateService} from \"../../../services/localization/cm-translate.service\";\n\n@Component({\n    selector: 'cm-valid-number',\n    template: require('./cm-validatable-numberfield.component.html')\n})\nexport class CmValidatableNumberfieldComponent implements CmValidatable {\n\n    @Input() validatableList: Array<CmValidatable>;\n    @Input() value: number;\n    @Input() max: number;\n    @Input() minShow: number;\n\n    @Input() readonly: boolean;\n\n\n    @Output() setVal: EventEmitter<number> = new EventEmitter<number>();\n\n    private valid: boolean = true;\n    private errorText: Array<string> = [];\n\n    constructor(private translate: CmTranslateService) {\n    }\n\n    ngOnChanges() {\n        if (this.validatableList) {\n            this.validatableList.push(this);\n        }\n    }\n\n    public validate(): boolean {\n        this.valid = true;\n        this.errorText = [];\n        if ((this.max || this.max === 0) && this.max < this.value) {\n            this.valid = false;\n            this.errorText.push(this.translate.get('message.ValidationMaxValuedMsg') + ' ' + this.max);\n        }\n        return this.valid;\n    }\n\n    private setValue() {\n        this.setVal.next(this.value);\n    }\n}\n","module.exports = \"<input [class.element-invalid]=\\\"!valid\\\"\\n       [class.element-valid]=\\\"valid\\\"\\n       type=\\\"number\\\"\\n       min=\\\"{{minShow}}\\\"\\n       [(ngModel)]=\\\"value\\\"\\n       (ngModelChange)=\\\"setValue()\\\"\\n       onkeypress='return event.charCode >= 48 && event.charCode <= 57'\\n       [readonly]=\\\"readonly\\\"\\n>\\n\\n<div *ngIf=\\\"!valid && errorText.length > 0\\\" class=\\\"alert alert-danger\\\">\\n    <span *ngFor=\\\"let error of errorText\\\">{{error}}<br></span>\\n</div>\\n\";","import {Component, Input, OnInit} from '@angular/core';\n\n@Component({\n    selector: 'cm-table-total',\n    template: require('./cm-table-total.component.html'),\n    styles: [require('./cm-table-total.component.scss').toString()]\n})\nexport class CmTableTotalComponent implements OnInit {\n\n    @Input() total : number = 0;\n\n    constructor() { }\n\n    ngOnInit() { }\n\n}","module.exports = \"<div class=\\\"total-rows\\\"><b>{{'totalRows.Label' | translate}}: {{total}}</b></div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-table-total.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-table-total.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-table-total.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".total-rows{width:100%;padding-left:8px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from \"@angular/core\";\nimport { CmHttpClient } from \"../../../services/http_client\";\nimport {DAMAGE_CAT_BIKE_GLOBAL_KEY} from \"../../cm-damage-cat-bike-config/list/cm-damage-cat-bike-config-list.component\";\nimport {BIKE_AND_LOCATION_TYPES, BIKE_TYPE, LOCATION_TYPE} from \"../../../shared/const/missionType\";\nimport {DAMAGE_CAT_LOCATION_GLOBAL_KEY} from \"../../cm-damage-cat-location-config/list/cm-damage-cat-location-config-list.component\";\nimport {CmDamageLocationCategoryModel} from \"../../cm-damage-cat-location-config/cm-damage-cat-location.model\";\nimport {CmDamageBikeCategoryModel} from \"../../cm-damage-cat-bike-config/cm-damage-cat-bike.model\";\n\n@Component({\n  selector: \"cm-tt-category-filter\",\n  template: require(\"./cm-tt-category-filter.component.html\")\n})\nexport class CmTtCategoryFilterComponent implements OnInit, OnChanges {\n  @Input() category: string = null;\n  @Input() showLabel: boolean = true;\n  @Input() type: string;\n  @Input() additionalBikeCategory: string;\n  @Input() readonly : boolean;\n  @Output() changeCategory: EventEmitter<string> = new EventEmitter<string>();\n\n  private list: Array<string> = [];\n  private currentType:string;\n\n  private bikeTypeList: Array<string>;\n  private locationTypeList: Array<string>;\n  private bothTypeList: Array<string>;\n\n  constructor(private http: CmHttpClient) {}\n\n  ngOnInit() {\n    this.loadValues();\n  }\n\n  private loadValues():void {\n    this.http.get<Array<CmDamageLocationCategoryModel>>('/bikes-sql/api/v1/damage-categories/for_location').subscribe(data => {\n      let list = [];\n      let elements = data;\n      for (let key in elements) {\n        if (key !== DAMAGE_CAT_BIKE_GLOBAL_KEY && key !== DAMAGE_CAT_LOCATION_GLOBAL_KEY) list.push(key);\n      }\n\n      list.sort((a: string, b: string) => a.localeCompare(b));\n      this.locationTypeList = list;\n      this.createBothList();\n    });\n\n    this.http.get<Array<CmDamageBikeCategoryModel>>('/bikes-sql/api/v1/damage-categories/for_bike').subscribe(data => {\n      let list = [];\n      let elements = data;\n      for (let key in elements) {\n        if (key !== DAMAGE_CAT_BIKE_GLOBAL_KEY && key !== DAMAGE_CAT_LOCATION_GLOBAL_KEY) list.push(key);\n      }\n\n      list.sort((a: string, b: string) => a.localeCompare(b));\n      this.bikeTypeList = list;\n      this.createBothList();\n    });\n\n    this.changeType();\n  }\n\n  ngOnChanges() {\n    this.changeType();\n  }\n\n  private _changeCategory() {\n    this.changeCategory.next(this.category);\n  }\n\n  private createBothList() {\n    if(this.additionalBikeCategory && this.bikeTypeList) this.bikeTypeList.push(this.additionalBikeCategory);\n    if(!this.locationTypeList || !this.bikeTypeList) return;\n    let list = this.locationTypeList.concat(this.bikeTypeList);\n    list.sort((a:string, b:string) => a.localeCompare(b));\n    this.bothTypeList = list;\n    this.changeType();\n  }\n\n  private changeType() {\n    if(!this.type) this.type = BIKE_AND_LOCATION_TYPES;\n    if(this.type == this.currentType) return;\n    if(!this.locationTypeList || !this.bikeTypeList || !this.bothTypeList) return;\n\n    switch(this.type) {\n      case LOCATION_TYPE: this.list = this.locationTypeList; break;\n      case BIKE_TYPE: this.list = this.bikeTypeList; break;\n      default: this.list = this.bothTypeList;\n    }\n\n    this.currentType = this.type;\n  }\n}\n","module.exports = \"<label *ngIf=\\\"showLabel\\\" for=\\\"category-filter\\\">{{'category.Label' | translate}}</label>\\n<select class=\\\"form-control\\\" id=\\\"category-filter\\\" [(ngModel)]=\\\"category\\\" (ngModelChange)=\\\"_changeCategory()\\\" [disabled]=\\\"readonly\\\">\\n<!--    <option></option>-->\\n    <option *ngFor=\\\"let item of list\\\" [value]=\\\"item\\\">{{item}}</option>\\n</select>\\n\";","import { Component, Input } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { MarkerType } from '../../shared/marker';\n\n@Component({\n  selector: 'cm-show-on-map',\n  template: require('./cm-show-on-map.component.html')\n})\nexport class CmShowOnMapComponent {\n  @Input()\n  type: MarkerType;\n  @Input()\n  entityId: number;\n  @Input()\n  bikeId: number;\n\n  constructor(private router: Router) {}\n\n  private openMap() {\n    this.router.navigate(['/sec/home'], this.createParams());\n  }\n\n  private createParams() {\n    return {\n      queryParams: {\n        type: this.type,\n        entity: this.entityId,\n        bikeId: this.bikeId\n      }\n    };\n  }\n}\n","module.exports = \"<a *ngIf=\\\"((type >= 0) && entityId) || bikeId\\\" (click)=\\\"openMap()\\\">{{'showOnMap.Label' | translate}}</a>\\n\";","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\n\n@Component({\n    selector: 'cm-hour-minute',\n    template: require('./cm-hour-minute.component.html'),\n    styles: [require('./cm-hour-minute.component.scss').toString()]\n})\nexport class CmHourMinuteComponent implements OnInit {\n    @Input() hours: number;\n    @Input() minutes: number;\n\n    // Alternative way to use this component\n    @Input() duration: number; // If durationTimeUnits not specified then in seconds Otherwise in durationTimeUnits\n    @Input() durationTimeUnits: string; // 's' - for seconds, 'm' - for minutes\n\n    @Input() readonly: boolean;\n\n    private hoursHumanReadable: string;\n    @Output() outHours: EventEmitter<number> = new EventEmitter<number>();\n\n    @Output() outMinutes: EventEmitter<number> = new EventEmitter<number>();\n\n    @Output() outDuration: EventEmitter<number> = new EventEmitter<number>();\n    private minutesHumanReadable: string;\n\n    ngOnInit(): void {\n        if(!this.hours) this.hours = 0;\n        if(!this.minutes) this.minutes = 0;\n\n        if (this.duration) {\n            if (!this.durationTimeUnits || this.durationTimeUnits === 's') {\n                this.hours = Math.floor(this.duration / (60 * 60));\n                this.minutes = Math.floor((this.duration - this.hours * 60 * 60) / 60)\n            } else if (this.durationTimeUnits === 'm') {\n                this.hours = Math.floor(this.duration / 60);\n                this.minutes = Math.floor(this.duration - this.hours * 60);\n            }\n        }\n\n        this.calculateHumanReadableValues();\n    }\n\n    private setHours() {\n        this.outHours.next(this.hours);\n        this.setDuration();\n    }\n\n    private setMinutes() {\n        this.outMinutes.next(this.minutes);\n        this.setDuration();\n    }\n\n    private setDuration() {\n        if (!this.durationTimeUnits || this.durationTimeUnits === 's') {\n            this.outDuration.next((this.hours * 60 + this.minutes) * 60);\n        } else if (this.durationTimeUnits === 'm') {\n            this.outDuration.next(this.hours * 60 + this.minutes);\n        }\n    }\n\n    calculateHumanReadableValues() {\n        this.hoursHumanReadable = this.hours < 10 ? \"0\" + this.hours : \"\"+ this.hours;\n        this.minutesHumanReadable = this.minutes < 10 ? \"0\" + this.minutes : \"\" + this.minutes;\n\n        this.changeHoursModel(this.hoursHumanReadable);\n        this.changeMinutesModel(this.minutesHumanReadable);\n    }\n\n    changeHoursModel(event: any){\n    }\n\n    changeMinutesModel(event: any) {\n    }\n\n    changeHours(event: any) {\n        let h = event.target.value;\n        if(isNaN(h)) {\n            this.hours = 0;\n        } else {\n            if(h < 0) {\n                this.hours = 0;\n            } else if(h > 23) {\n                this.hours = 23;\n            } else {\n                this.hours = Number(h);\n            }\n        }\n\n        this.calculateHumanReadableValues();\n        this.setHours();\n    }\n\n    changeMinutes(event: any) {\n        let m = event.target.value;\n        if(isNaN(m)) {\n            this.minutes = 0;\n        } else {\n            if(m < 0) {\n                this.minutes = 0;\n            } else if(m > 50) {\n                this.minutes = 50;\n            } else {\n                this.minutes = Math.round(Number(m)/10) * 10;\n            }\n        }\n\n        this.calculateHumanReadableValues();\n        this.setMinutes();\n    }\n\n    plusHour(){\n        if(this.hours < 23) {\n            this.hours++;\n            this.calculateHumanReadableValues();\n            this.setHours();\n        }\n    }\n\n    minusHour(){\n        if(this.hours > 0) {\n            this.hours--;\n            this.calculateHumanReadableValues();\n            this.setHours();\n        }\n    }\n\n    plusMinute(){\n        if(this.minutes < 50) {\n            this.minutes +=10;\n            this.calculateHumanReadableValues();\n            this.setMinutes();\n        }\n    }\n\n    minusMinute() {\n        if(this.minutes > 0) {\n            this.minutes -= 10;\n            this.calculateHumanReadableValues();\n            this.setMinutes();\n        }\n    }\n\n}\n","module.exports = \"<button *ngIf=\\\"!readonly\\\" type=\\\"button\\\" class=\\\"btn-xs\\\" (click)=\\\"minusHour()\\\">-</button>\\n<input class='time-component-interval-input' type='text'\\n       (ngModelChange)=\\\"changeHoursModel($event)\\\"\\n       (change)=\\\"changeHours($event)\\\"\\n       [ngModel]='hoursHumanReadable'\\n       [readonly]=\\\"readonly\\\"\\n>\\n<button *ngIf=\\\"!readonly\\\" type=\\\"button\\\" class=\\\"btn-xs\\\" (click)=\\\"plusHour()\\\">+</button>\\n\\n:\\n<button *ngIf=\\\"!readonly\\\" type=\\\"button\\\" class=\\\"btn-xs\\\" (click)=\\\"minusMinute()\\\">-</button>\\n<input class='time-component-interval-input' type='text'\\n       [ngModel]='minutesHumanReadable'\\n       (change)=\\\"changeMinutes($event)\\\"\\n       (ngModelChange)=\\\"changeMinutesModel($event)\\\"\\n       [readonly]=\\\"readonly\\\"\\n\\n>\\n<button *ngIf=\\\"!readonly\\\" type=\\\"button\\\" class=\\\"btn-xs\\\" (click)=\\\"plusMinute()\\\">+</button>\\n\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".time-component-interval-input{width:30px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {AfterViewChecked, AfterViewInit, ChangeDetectorRef, Component, Input, OnInit} from \"@angular/core\";\nimport {Observable} from 'rxjs';\nimport * as moment from \"moment\";\nimport {interval} from \"rxjs/observable/interval\";\n\n@Component({\n    selector: 'cm-hour-minute-countdown',\n    template: require('./cm-hour-minute-countdown.component.html'),\n    styles: [require('./cm-hour-minute-countdown.component.scss').toString()]\n})\nexport class CmHourMinuteCountdownComponent implements OnInit {\n\n    @Input() start: string;\n    @Input() finish: string;\n    @Input() static: boolean;\n\n    counterString$: Observable<String>;\n    counter: String;\n    activeIcon: ActiveIcon;\n    ActiveIcon = ActiveIcon;\n\n    constructor(private cdRef:ChangeDetectorRef) {}\n\n    ngOnInit(): void {\n        if (!this.start || !this.finish)\n            return;\n\n        let diffInMs = moment(this.finish).diff(moment(this.start));\n\n        if (!this.static) {\n            this.activeIcon = diffInMs > 0 ? ActiveIcon.RUNNING : ActiveIcon.MISSED;\n            this.counter = this.formatDiff(diffInMs);\n            setInterval(() => {\n                this.activeIcon = diffInMs > 0 ? ActiveIcon.RUNNING : ActiveIcon.MISSED;\n                this.counter = this.formatDiff(diffInMs);\n                diffInMs -= 1000;\n            }, 1000);\n        } else {\n            this.activeIcon = diffInMs > 0 ? ActiveIcon.DONE : ActiveIcon.MISSED;\n            this.counter = this.formatDiff(diffInMs);\n        }\n        this.cdRef.detectChanges();\n    }\n\n    private formatDiff(diffInMs: number): string {\n        let diffInMsUnsigned = Math.abs(diffInMs);\n        let hours = Math.floor(diffInMsUnsigned / (60 * 60 * 1000));\n        let minutes = Math.floor((diffInMsUnsigned - hours * 60 * 60 * 1000) / (1000 * 60));\n        let seconds = Math.floor((diffInMsUnsigned - hours * 60 * 60 * 1000 - minutes * 60 * 1000) / 1000);\n        let sign = diffInMs < 0 ? '-' : '';\n\n        let formatTimePart = (timePart) => {\n            let timePartStr = Math.abs(timePart).toString();\n            return timePartStr.length == 1 ? '0' + timePartStr : timePartStr;\n        };\n        return `${sign}${formatTimePart(hours)}:${formatTimePart(minutes)}:${formatTimePart(seconds)}`;\n    }\n\n\n}\n\nexport enum ActiveIcon {\n    RUNNING,\n    DONE,\n    MISSED\n}","module.exports = \"<span>{{counter}}</span>\\n<i *ngIf=\\\"activeIcon == ActiveIcon.RUNNING\\\" class=\\\"fa fa-exclamation-triangle\\\"></i>\\n<i *ngIf=\\\"activeIcon == ActiveIcon.DONE\\\" class=\\\"fa fa-check-circle\\\"></i>\\n<i *ngIf=\\\"activeIcon == ActiveIcon.MISSED\\\" class=\\\"fa fa-times\\\"></i>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute-countdown.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute-countdown.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-hour-minute-countdown.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".fa-check-circle{color:#42a948}.fa-exclamation-triangle{color:#ffe662}.fa-times{color:#ff4a23}cm-hour-minute-countdown{white-space:nowrap}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = \"<!-- Modal content-->\\n<div class=\\\"modal-content modal-wide\\\">\\n    <div class=\\\"modal-header\\\">\\n        <h4>\\n            {{msgName}}\\n        </h4>\\n    </div>\\n    <div class=\\\"modal-body msg-window-body\\\">\\n        <div class=\\\"col-md-12\\\">\\n           {{'modal.msg.prompt' | translate}}\\n                {{shortMsg}}\\n                <br><br><br>\\n        </div> <!-- div 12 - end -->\\n        <br>\\n        <span *ngIf=\\\"showMore\\\">{{extMsg}}</span>\\n    </div> <!-- model-body end -->\\n    <div class=\\\"modal-footer\\\">\\n        <button id=\\\"alert-msg\\\" (click)=\\\"showAdditionalInfo()\\\">{{btnName}}</button>\\n        <button class=\\\"modal-msg-close\\\" id=\\\"close\\\" (click)=\\\"close()\\\">{{'button.Close' | translate}}</button>\\n    </div>\\n</div>\\n\";","\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-message-component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-message-component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./cm-modal-message-component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"#input-trouble-ticket-top td:first-child,#input-trouble-ticket-bottom td:first-child{width:30%;text-align:left;font-weight:bold}#input-trouble-ticket-top td:last-child,#input-trouble-ticket-bottom td:last-child{width:70%}#readonly-trouble-ticket td:first-child{text-align:left;font-weight:bold}.trouble-ticket-status{background-color:#ffe662}.trouble-ticket-search-button{margin-top:10px}.msg-window-body{overflow:auto}.modal-wide{width:130%}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\n@Component({\n    selector: 'cm-bike-status-filter',\n    template: require('./cm-bike-status-filter.component.html'),\n    styles: [require('./cm-bike-status-filter.component.scss').toString()]\n})\nexport class CmBikeStatusFilterComponent implements OnInit {\n    @Input() selectedStatuses: Array<string> = [];\n    @Input() statusChangedHoursAgo: number;\n    @Input() mapMode: boolean;\n\n    @Output() statusChangedHoursAgoChange = new EventEmitter<number>();\n    @Output() selectedStatusesChange = new EventEmitter<Array<string>>();\n    @Output() statusesLoaded = new EventEmitter<any>();\n    @Output() search = new EventEmitter<any>();\n\n    private statusList: Array<StatusListItem> = [];\n    private dataSourceInit = false;\n\n    private MAP_STATUSES = ['sperr', 'LOCKED', 'READY', 'ready', 'OPEN', 'open'];\n\n    constructor(private translationService: TranslateService,\n                private http: CmHttpClient,\n                private ref: ChangeDetectorRef) {\n    }\n\n    ngOnChanges() {\n        this.statusList.forEach(el => el.selected = false);\n        if (this.selectedStatuses) {\n            this.selectedStatuses.forEach(el => {\n                this.statusList.forEach(el1 => {\n                    if (el1.name === el) {\n                        el1.selected = true;\n                    }\n                })\n            });\n        }\n    }\n\n    ngOnInit() {\n        this.http.get('/bikes-sql/api/v1/dispatch/countByStatus' + (this.mapMode ? '?loaded=false' : '')).subscribe(data => {\n            this.statusesLoaded.next(data);\n            let content = data['content'];\n            if (content && content.length) {\n                this.translationService.get(content.map(item => CmBikeStatusFilterComponent.localizationKey(item['status']))).subscribe(localization => {\n                   content.forEach(statusData => {\n                       let status = statusData['status'];\n                       if (status && (!this.mapMode || this.MAP_STATUSES.includes(status))) {\n                           let text = localization[CmBikeStatusFilterComponent.localizationKey(status)] + ' (' + statusData['count'] + ')';\n                           this.statusList.push(new StatusListItem(status, text));\n                       }\n                   });\n                   this.dataSourceInit = true;\n\n                   if (this.selectedStatuses) {\n                       this.selectedStatuses = this.selectedStatuses.filter(selected => this.statusList.some(status => status.name === selected));\n                   }\n                   this.ngOnChanges();\n                });\n            }\n        });\n    }\n\n    private static localizationKey(status: string): string {\n        return 'bikeStatus.' + status.toLowerCase();\n    }\n\n    private _changeStatus() {\n        let outList = [];\n        this.statusList.forEach(el => {\n            if (el.selected) {\n                outList.push(el.name);\n            }\n        });\n        this.selectedStatusesChange.next(outList);\n    }\n\n    private statusChangedHoursAgoChanged(value) {\n        this.ref.detectChanges();\n        let tmpValue = value != 0 ? Math.abs(parseInt(value)) : null;\n        if (tmpValue > 10000) {\n            tmpValue = 10000;\n        }\n        this.statusChangedHoursAgo = tmpValue;\n        this.statusChangedHoursAgoChange.next(tmpValue);\n    }\n\n}\n\nclass StatusListItem {\n    name: string;\n    text: string;\n    selected: boolean;\n\n    constructor(name: string, text: string) {\n        this.name = name;\n        this.text = text;\n    }\n}","module.exports = \"<div *ngIf=\\\"dataSourceInit\\\" [ngClass]=\\\"(mapMode)?'map-mode':'normal-mode'\\\">\\n    <div  class=\\\"user-filter-main\\\">\\n        <div class=\\\"status-label\\\">\\n            <b>{{'troubleTickets.StatusLabel' | translate}}</b>\\n        </div>\\n        <div class=\\\"user-filter-table\\\">\\n            <table class=\\\"table\\\">\\n               <tbody>\\n                   <tr *ngFor=\\\"let item of statusList\\\">\\n                       <td class=\\\"user-filter-table-check\\\">\\n                           <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.selected\\\" (ngModelChange)=\\\"_changeStatus()\\\">\\n                       </td>\\n                       <td>\\n                           {{item.text}}\\n                       </td>\\n                   </tr>\\n               </tbody>\\n            </table>\\n        </div>\\n    </div>\\n   <div class=\\\"status-changed\\\">\\n       <label for=\\\"filter-status-changed\\\">\\n           {{'bikeStusFilter.statusChanged' | translate}}\\n       </label>\\n       <input id=\\\"filter-status-changed\\\"\\n              type=\\\"number\\\"\\n              [ngClass]=\\\"{'form-control': !mapMode}\\\"\\n              [placeholder]=\\\"mapMode ? ('bikeStusFilter.statusChanged' | translate) : ''\\\"\\n              [(ngModel)] = \\\"statusChangedHoursAgo\\\"\\n              (ngModelChange)=\\\"statusChangedHoursAgoChanged($event)\\\">\\n       <label for=\\\"filter-status-changed\\\" class=\\\"postfix\\\">\\n           {{'bikeStusFilter.statusChangedPostfix' | translate}}\\n       </label>\\n       <button (click)=\\\"search.next($event)\\\">\\n           <span class=\\\"fa fa-search\\\"></span>\\n       </button>\\n   </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-status-filter.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-status-filter.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-status-filter.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"cm-bike-status-filter button{margin-left:3px}cm-bike-status-filter .status-changed{clear:left}cm-bike-status-filter .map-mode .user-filter-table{overflow:auto;height:auto;margin-top:-10px}cm-bike-status-filter .map-mode .status-label{display:none}cm-bike-status-filter .map-mode .user-filter-table-check{width:20px}cm-bike-status-filter .map-mode .user-filter-table .table{margin-bottom:0}cm-bike-status-filter .map-mode .table>tbody>tr>td{background-color:transparent;border:none;white-space:nowrap;padding:2px 0}cm-bike-status-filter .map-mode .status-changed label:not(.postfix){display:none}cm-bike-status-filter .map-mode .status-changed .postfix{margin:0 5px}cm-bike-status-filter .normal-mode .status-changed button{display:none}cm-bike-status-filter .normal-mode .status-changed #filter-status-changed{margin:0px 10px;width:100px;display:inline-block}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CmHttpClient} from \"../../../services/http_client\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\n@Component({\n    selector: 'cm-bike-type-filter',\n    template: require('./cm-bike-type-filter.component.html'),\n    styles: [require('./cm-bike-type-filter.component.scss').toString()]\n})\nexport class CmBikeTypeFilterComponent implements OnInit {\n    @Input() selectedTypes: Array<string> = [];\n    @Input() mapMode: boolean;\n\n    @Output() selectedTypesChange = new EventEmitter<Array<string>>();\n    @Output() typesLoaded = new EventEmitter<any>();\n    @Output() search = new EventEmitter<any>();\n\n    private typeList: Array<TypeListItem> = [];\n    private dataSourceInit = false;\n\n    constructor(private translationService: TranslateService,\n                private http: CmHttpClient,\n                private ref: ChangeDetectorRef) {\n    }\n\n    ngOnChanges() {\n        this.typeList.forEach(el => el.selected = false);\n        if (this.selectedTypes) {\n            this.selectedTypes.forEach(el => {\n                this.typeList.forEach(el1 => {\n                    if (el1.name === el) {\n                        el1.selected = true;\n                    }\n                })\n            });\n        }\n    }\n\n    ngOnInit() {\n        this.http.get('/bikes-sql/api/v1/bicycles/types').subscribe(data  => {\n            this.typesLoaded.next(data);\n            let types = data as any;\n            if (types && types.length) {\n                this.translationService.get(types.map(item => CmBikeTypeFilterComponent.localizationKey(item))).subscribe(localization => {\n                    types.forEach(type => {\n                       let text = localization[CmBikeTypeFilterComponent.localizationKey(type)];\n                       this.typeList.push(new TypeListItem(type, text));\n                   });\n                   this.dataSourceInit = true;\n\n                   if (this.selectedTypes) {\n                       this.selectedTypes = this.selectedTypes.filter(selected => this.typeList.some(type => type.name === selected));\n                   }\n                   this.ngOnChanges();\n                });\n            }\n        });\n    }\n\n    private static localizationKey(type: string): string {\n        return 'bikeType.' + type;\n    }\n\n    private _changeType() {\n        let outList = [];\n        this.typeList.forEach(el => {\n            if (el.selected) {\n                outList.push(el.name);\n            }\n        });\n        this.selectedTypesChange.next(outList);\n    }\n\n}\n\nclass TypeListItem {\n    name: string;\n    text: string;\n    selected: boolean;\n\n    constructor(name: string, text: string) {\n        this.name = name;\n        this.text = text;\n    }\n}","module.exports = \"<div *ngIf=\\\"dataSourceInit\\\" [ngClass]=\\\"(mapMode)?'map-mode':'normal-mode'\\\">\\n    <div  class=\\\"user-filter-main\\\">\\n        <div class=\\\"type-label\\\">\\n            <b>{{'bikeType.Label' | translate}}</b>\\n        </div>\\n        <div class=\\\"user-filter-table\\\">\\n            <table class=\\\"table\\\">\\n               <tbody>\\n                   <tr *ngFor=\\\"let item of typeList\\\">\\n                       <td class=\\\"user-filter-table-check\\\">\\n                           <input type=\\\"checkbox\\\" [(ngModel)]=\\\"item.selected\\\" (ngModelChange)=\\\"_changeType()\\\">\\n                       </td>\\n                       <td>\\n                           {{item.text}}\\n                       </td>\\n                   </tr>\\n               </tbody>\\n            </table>\\n        </div>\\n    </div>\\n</div>\";","\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-type-filter.component.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-type-filter.component.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./cm-bike-type-filter.component.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"cm-bike-type-filter .user-filter-table{overflow:auto;height:auto}cm-bike-type-filter .map-mode .user-filter-main{margin-top:0px}cm-bike-type-filter .map-mode .user-filter-table-check{width:20px}cm-bike-type-filter .map-mode .user-filter-table .table{margin-bottom:0}cm-bike-type-filter .map-mode .table>tbody>tr>td{background-color:transparent;border:none;white-space:nowrap;padding:2px 0}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","import {\n  animate,\n  style,\n  AnimationMetadata\n} from '@angular/animations';\n\nexport const COLLAPSE_ANIMATION_TIMING = '400ms cubic-bezier(0.4,0.0,0.2,1)';\n\nexport const expandAnimation: AnimationMetadata[] = [\n  style({ height: 0, visibility: 'hidden' }),\n  animate(\n    COLLAPSE_ANIMATION_TIMING,\n    style({ height: '*', visibility: 'visible' })\n  )\n];\n\nexport const collapseAnimation: AnimationMetadata[] = [\n  style({ height: '*', visibility: 'visible' }),\n  animate(\n    COLLAPSE_ANIMATION_TIMING,\n    style({ height: 0, visibility: 'hidden' })\n  )\n];\n","import {\n  AnimationBuilder,\n  AnimationFactory,\n  AnimationPlayer\n} from '@angular/animations';\n\n// todo: add animations when https://github.com/angular/angular/issues/9947 solved\nimport {\n  AfterViewChecked,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  HostBinding,\n  Input,\n  Output,\n  Renderer2\n} from '@angular/core';\n\nimport {\n  collapseAnimation,\n  expandAnimation\n} from './collapse-animations';\n\n@Directive({\n  selector: '[collapse]',\n  exportAs: 'bs-collapse',\n  host: {\n    '[class.collapse]': 'true'\n  }\n})\nexport class CollapseDirective implements AfterViewChecked {\n  /** This event fires as soon as content collapses */\n  @Output() collapsed: EventEmitter<CollapseDirective> = new EventEmitter();\n  /** This event fires when collapsing is started */\n  @Output() collapses: EventEmitter<CollapseDirective> = new EventEmitter();\n  /** This event fires as soon as content becomes visible */\n  @Output() expanded: EventEmitter<CollapseDirective> = new EventEmitter();\n  /** This event fires when expansion is started */\n  @Output() expands: EventEmitter<CollapseDirective> = new EventEmitter();\n\n  // shown\n  @HostBinding('class.in')\n  @HostBinding('class.show')\n  @HostBinding('attr.aria-expanded')\n  isExpanded = true;\n  // hidden\n  @HostBinding('attr.aria-hidden') isCollapsed = false;\n  // stale state\n  @HostBinding('class.collapse') isCollapse = true;\n  // animation state\n  @HostBinding('class.collapsing') isCollapsing = false;\n\n  @Input()\n  set display(value: string) {\n    if (!this.isAnimated) {\n      this._renderer.setStyle(this._el.nativeElement, 'display', value);\n\n      return;\n    }\n\n    this._display = value;\n\n    if (value === 'none') {\n      this.hide();\n\n      return;\n    }\n\n    this.show();\n  }\n  /** turn on/off animation */\n  @Input() isAnimated = false;\n  /** A flag indicating visibility of content (shown or hidden) */\n  @Input()\n  set collapse(value: boolean) {\n    this.isExpanded = value;\n    this.toggle();\n  }\n\n  get collapse(): boolean {\n    return this.isExpanded;\n  }\n\n  private _display = 'block';\n  private _factoryCollapseAnimation: AnimationFactory;\n  private _factoryExpandAnimation: AnimationFactory;\n  private _player: AnimationPlayer;\n  private _stylesLoaded = false;\n\n  private _COLLAPSE_ACTION_NAME = 'collapse';\n  private _EXPAND_ACTION_NAME = 'expand';\n\n  constructor(\n    private _el: ElementRef,\n    private _renderer: Renderer2,\n    _builder: AnimationBuilder\n  ) {\n    this._factoryCollapseAnimation = _builder.build(collapseAnimation);\n    this._factoryExpandAnimation = _builder.build(expandAnimation);\n  }\n\n  ngAfterViewChecked() {\n    this._stylesLoaded = true;\n  }\n\n  /** allows to manually toggle content visibility */\n  toggle(): void {\n    if (this.isExpanded) {\n      this.hide();\n    } else {\n      this.show();\n    }\n  }\n\n  /** allows to manually hide content */\n  hide(): void {\n    this.isCollapsing = true;\n    this.isExpanded = false;\n    this.isCollapsed = true;\n    this.isCollapsing = false;\n\n    this.collapses.emit(this);\n\n    this.animationRun(this.isAnimated, this._COLLAPSE_ACTION_NAME)(() => {\n      this.collapsed.emit(this);\n      this._renderer.setStyle(this._el.nativeElement, 'display', 'none');\n    });\n  }\n  /** allows to manually show collapsed content */\n  show(): void {\n    this._renderer.setStyle(this._el.nativeElement, 'display', this._display);\n\n    this.isCollapsing = true;\n    this.isExpanded = true;\n    this.isCollapsed = false;\n    this.isCollapsing = false;\n\n    this.expands.emit(this);\n\n    this.animationRun(this.isAnimated, this._EXPAND_ACTION_NAME)(() => {\n      this.expanded.emit(this);\n    });\n  }\n\n  animationRun(isAnimated: boolean, action: string) {\n    if (!isAnimated || !this._stylesLoaded) {\n      return (callback: () => void) => callback();\n    }\n\n    this._renderer.setStyle(this._el.nativeElement, 'overflow', 'hidden');\n    this._renderer.addClass(this._el.nativeElement, 'collapse');\n\n    const factoryAnimation = (action === this._EXPAND_ACTION_NAME)\n      ? this._factoryExpandAnimation\n      : this._factoryCollapseAnimation;\n\n    if (this._player) {\n      this._player.destroy();\n    }\n\n    this._player = factoryAnimation.create(this._el.nativeElement);\n    this._player.play();\n\n    return (callback: () => void) => this._player.onDone(callback);\n  }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CollapseDirective } from './collapse.directive';\n\n@NgModule({\n  declarations: [CollapseDirective],\n  exports: [CollapseDirective]\n})\nexport class CollapseModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: CollapseModule, providers: [] };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Configuration service, provides default values for the AccordionComponent.\n */\n@Injectable()\nexport class AccordionConfig {\n  /** Whether the other panels should be closed when a panel is opened */\n  closeOthers: Boolean = false;\n  /** turn on/off animation */\n  isAnimated: Boolean = false;\n}\n","import { Component, Input } from '@angular/core';\nimport { AccordionPanelComponent } from './accordion-group.component';\nimport { AccordionConfig } from './accordion.config';\n\n/** Displays collapsible content panels for presenting information in a limited amount of space. */\n@Component({\n  selector: 'accordion',\n  template: `<ng-content></ng-content>`,\n  host: {\n    '[attr.aria-multiselectable]': 'closeOthers',\n    role: 'tablist',\n    class: 'panel-group',\n    style: 'display: block'\n  }\n})\nexport class AccordionComponent {\n  /** turn on/off animation */\n  @Input() isAnimated = false;\n  /** if `true` expanding one item will close all others */\n  @Input() closeOthers: boolean;\n\n  protected groups: AccordionPanelComponent[] = [];\n\n  constructor(config: AccordionConfig) {\n    Object.assign(this, config);\n  }\n\n  closeOtherPanels(openGroup: AccordionPanelComponent): void {\n    if (!this.closeOthers) {\n      return;\n    }\n\n    this.groups.forEach((group: AccordionPanelComponent) => {\n      if (group !== openGroup) {\n        group.isOpen = false;\n      }\n    });\n  }\n\n  addGroup(group: AccordionPanelComponent): void {\n    group.isAnimated = this.isAnimated;\n    this.groups.push(group);\n  }\n\n  removeGroup(group: AccordionPanelComponent): void {\n    const index = this.groups.indexOf(group);\n    if (index !== -1) {\n      this.groups.splice(index, 1);\n    }\n  }\n}\n","import {\n  Component, HostBinding, Inject, Input, OnDestroy, OnInit, Output, EventEmitter\n} from '@angular/core';\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { AccordionComponent } from './accordion.component';\n\n/**\n * ### Accordion heading\n * Instead of using `heading` attribute on the `accordion-group`, you can use\n * an `accordion-heading` attribute on `any` element inside of a group that\n * will be used as group's header template.\n */\n@Component({\n  selector: 'accordion-group, accordion-panel',\n  templateUrl: './accordion-group.component.html',\n  host: {\n    class: 'panel',\n    style: 'display: block'\n  }\n})\nexport class AccordionPanelComponent implements OnInit, OnDestroy {\n  /** turn on/off animation */\n  isAnimated = false;\n  /** Clickable text in accordion's group header, check `accordion heading` below for using html in header */\n  @Input() heading: string;\n  /** Provides an ability to use Bootstrap's contextual panel classes\n   * (`panel-primary`, `panel-success`, `panel-info`, etc...).\n   * List of all available classes [available here]\n   * (https://getbootstrap.com/docs/3.3/components/#panels-alternatives)\n   */\n  @Input() panelClass: string;\n  /** if <code>true</code> â disables accordion group */\n  @Input() isDisabled: boolean;\n  /** Emits when the opened state changes */\n  @Output() isOpenChange: EventEmitter<boolean> = new EventEmitter();\n\n  // Questionable, maybe .panel-open should be on child div.panel element?\n  /** Is accordion group open or closed. This property supports two-way binding */\n  @HostBinding('class.panel-open')\n  @Input()\n  get isOpen(): boolean {\n    return this._isOpen;\n  }\n\n  set isOpen(value: boolean) {\n    if (value !== this.isOpen) {\n      if (value) {\n        this.accordion.closeOtherPanels(this);\n      }\n      this._isOpen = value;\n      Promise.resolve(null).then(() => {\n        this.isOpenChange.emit(value);\n      })\n        .catch((error: Error) => {\n          /* tslint:disable: no-console */\n          console.log(error);\n        });\n    }\n  }\n\n  get isBs3(): boolean {\n    return isBs3();\n  }\n\n  protected _isOpen = false;\n  protected accordion: AccordionComponent;\n\n  constructor(@Inject(AccordionComponent) accordion: AccordionComponent) {\n    this.accordion = accordion;\n  }\n\n  ngOnInit(): void {\n    this.panelClass = this.panelClass || 'panel-default';\n    this.accordion.addGroup(this);\n  }\n\n  ngOnDestroy(): void {\n    this.accordion.removeGroup(this);\n  }\n\n  toggleOpen(): void {\n    if (!this.isDisabled) {\n      this.isOpen = !this.isOpen;\n    }\n  }\n}\n","/* tslint:disable: max-classes-per-file */\nimport { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionConfig } from './accordion.config';\nimport { AccordionPanelComponent } from './accordion-group.component';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\n\n@NgModule({\n  imports: [CommonModule, CollapseModule],\n  declarations: [AccordionComponent, AccordionPanelComponent],\n  exports: [AccordionComponent, AccordionPanelComponent]\n})\nexport class AccordionModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: AccordionModule, providers: [AccordionConfig] };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AlertConfig {\n  /** default alert type */\n  type = 'warning';\n\n  /** is alerts are dismissible by default */\n  dismissible = false;\n\n  /** default time before alert will dismiss */\n  dismissOnTimeout?: number = undefined;\n}\n","import {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output\n} from '@angular/core';\nimport { AlertConfig } from './alert.config';\nimport { OnChange } from 'ngx-bootstrap/utils';\n\n@Component({\n  selector: 'alert,bs-alert',\n  templateUrl: './alert.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AlertComponent implements OnInit {\n  /** Alert type.\n   * Provides one of four bootstrap supported contextual classes:\n   * `success`, `info`, `warning` and `danger`\n   */\n  @Input() type = 'warning';\n  /** If set, displays an inline \"Close\" button */\n  @OnChange()   @Input()   dismissible = false;\n  /** Number in milliseconds, after which alert will be closed */\n  @Input() dismissOnTimeout: number | string;\n\n  /** Is alert visible */\n  @Input() isOpen = true;\n\n  /** This event fires immediately after close instance method is called,\n   * $event is an instance of Alert component.\n   */\n  @Output() onClose = new EventEmitter<AlertComponent>();\n  /** This event fires when alert closed, $event is an instance of Alert component */\n  @Output() onClosed = new EventEmitter<AlertComponent>();\n\n\n  classes = '';\n  dismissibleChange = new EventEmitter<boolean>();\n\n  constructor(_config: AlertConfig, private changeDetection: ChangeDetectorRef) {\n    Object.assign(this, _config);\n    this.dismissibleChange.subscribe((dismissible: boolean) => {\n      this.classes = this.dismissible ? 'alert-dismissible' : '';\n      this.changeDetection.markForCheck();\n    });\n  }\n\n  ngOnInit(): void {\n    if (this.dismissOnTimeout) {\n      // if dismissOnTimeout used as attr without binding, it will be a string\n      setTimeout(\n        () => this.close(),\n        parseInt(this.dismissOnTimeout as string, 10)\n      );\n    }\n  }\n\n  // todo: animation ` If the .fade and .in classes are present on the element,\n  // the alert will fade out before it is removed`\n  /**\n   * Closes an alert by removing it from the DOM.\n   */\n  close(): void {\n    if (!this.isOpen) {\n      return;\n    }\n\n    this.onClose.emit(this);\n    this.isOpen = false;\n    this.changeDetection.markForCheck();\n    this.onClosed.emit(this);\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { AlertComponent } from './alert.component';\nimport { AlertConfig } from './alert.config';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [AlertComponent],\n  exports: [AlertComponent],\n  entryComponents: [AlertComponent]\n})\nexport class AlertModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: AlertModule, providers: [AlertConfig] };\n  }\n}\n","// tslint:disable:no-use-before-declare\nimport {\n  Directive,\n  forwardRef,\n  HostBinding,\n  HostListener,\n  Input,\n  OnInit,\n  Provider\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// TODO: config: activeClass - Class to apply to the checked buttons\nexport const CHECKBOX_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => ButtonCheckboxDirective),\n  multi: true\n};\n\n/**\n * Add checkbox functionality to any element\n */\n@Directive({\n  selector: '[btnCheckbox]',\n  providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR]\n})\nexport class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {\n  /** Truthy value, will be set to ngModel */\n  @Input() btnCheckboxTrue = true;\n  /** Falsy value, will be set to ngModel */\n  @Input() btnCheckboxFalse = false;\n\n  @HostBinding('class.active')\n  @HostBinding('attr.aria-pressed')\n  state = false;\n\n  protected value: boolean | string;\n  protected isDisabled: boolean;\n\n  protected onChange = Function.prototype;\n  protected onTouched = Function.prototype;\n\n  // view -> model\n  @HostListener('click')\n  onClick(): void {\n    if (this.isDisabled) {\n      return;\n    }\n\n    this.toggle(!this.state);\n    this.onChange(this.value);\n  }\n\n  ngOnInit(): void {\n    this.toggle(this.trueValue === this.value);\n  }\n\n  protected get trueValue(): boolean {\n    return typeof this.btnCheckboxTrue !== 'undefined'\n      ? this.btnCheckboxTrue\n      : true;\n  }\n\n  protected get falseValue(): boolean {\n    return typeof this.btnCheckboxFalse !== 'undefined'\n      ? this.btnCheckboxFalse\n      : false;\n  }\n\n  toggle(state: boolean): void {\n    this.state = state;\n    this.value = this.state ? this.trueValue : this.falseValue;\n  }\n\n  // ControlValueAccessor\n  // model -> view\n  writeValue(value: boolean | string | null): void {\n    this.state = this.trueValue === value;\n    this.value = value ? this.trueValue : this.falseValue;\n  }\n\n  setDisabledState(isDisabled: boolean): void {\n    this.isDisabled = isDisabled;\n  }\n\n  registerOnChange(fn: () => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n}\n","import { ChangeDetectorRef, Directive, forwardRef, Provider } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport const RADIO_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => ButtonRadioGroupDirective),\n  multi: true\n};\n\n/**\n * A group of radio buttons.\n * A value of a selected button is bound to a variable specified via ngModel.\n */\n@Directive({\n  selector: '[btnRadioGroup]',\n  providers: [RADIO_CONTROL_VALUE_ACCESSOR]\n})\nexport class ButtonRadioGroupDirective implements ControlValueAccessor {\n  onChange = Function.prototype;\n  onTouched = Function.prototype;\n\n  get value() {\n    return this._value;\n  }\n  set value(value: string | null) {\n    this._value = value;\n  }\n\n  private _value: string | null;\n\n  constructor(private cdr: ChangeDetectorRef) {}\n\n  writeValue(value: string | null): void {\n    this._value = value;\n    this.cdr.markForCheck();\n  }\n\n  registerOnChange(fn: () => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  forwardRef,\n  HostBinding,\n  HostListener,\n  Input,\n  OnInit,\n  Optional,\n  Provider,\n  Renderer2\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ButtonRadioGroupDirective } from './button-radio-group.directive';\n\nexport const RADIO_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => ButtonRadioDirective),\n  multi: true\n};\n\n/**\n * Create radio buttons or groups of buttons.\n * A value of a selected button is bound to a variable specified via ngModel.\n */\n@Directive({\n  selector: '[btnRadio]',\n  providers: [RADIO_CONTROL_VALUE_ACCESSOR]\n})\nexport class ButtonRadioDirective implements ControlValueAccessor, OnInit {\n  onChange = Function.prototype;\n  onTouched = Function.prototype;\n\n  /** Radio button value, will be set to `ngModel` */\n  @Input() btnRadio: string;\n  /** If `true` â radio button can be unchecked */\n  @Input() uncheckable: boolean;\n  /** Current value of radio component or group */\n  @Input() get value() {\n    return this.group ? this.group.value : this._value;\n  }\n\n  set value(value: null | string) {\n    if (this.group) {\n      this.group.value = value;\n\n      return;\n    }\n    this._value = value;\n  }\n  /** If `true` â radio button is disabled */\n  @Input() get disabled(): boolean {\n    return this._disabled;\n  }\n\n  set disabled(disabled: boolean) {\n    this._disabled = disabled;\n    this.setDisabledState(disabled);\n  }\n\n  @HostBinding('class.active')\n  @HostBinding('attr.aria-pressed')\n  get isActive(): boolean {\n    return this.btnRadio === this.value;\n  }\n\n  private _value:  null | string;\n  private _disabled: boolean;\n\n  constructor(\n    private el: ElementRef,\n    private cdr: ChangeDetectorRef,\n    @Optional() private group: ButtonRadioGroupDirective,\n    private renderer: Renderer2\n  ) {}\n\n  @HostListener('click')\n  onClick(): void {\n    if (this.el.nativeElement.attributes.disabled || !this.uncheckable && this.btnRadio === this.value) {\n      return;\n    }\n\n    this.value = this.uncheckable && this.btnRadio === this.value ? undefined : this.btnRadio;\n    this._onChange(this.value);\n  }\n\n  ngOnInit(): void {\n    this.uncheckable = typeof this.uncheckable !== 'undefined';\n  }\n\n  onBlur(): void {\n    this.onTouched();\n  }\n\n  _onChange(value: string): void {\n    if (this.group) {\n      this.group.onTouched();\n      this.group.onChange(value);\n\n      return;\n    }\n    this.onTouched();\n    this.onChange(value);\n  }\n\n  // ControlValueAccessor\n  // model -> view\n  writeValue(value: string): void {\n    this.value = value;\n    this.cdr.markForCheck();\n  }\n\n  registerOnChange(fn: () => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  setDisabledState(disabled: boolean): void {\n    if (disabled) {\n      this.renderer.setAttribute(this.el.nativeElement, 'disabled', 'disabled');\n\n      return;\n    }\n    this.renderer.removeAttribute(this.el.nativeElement, 'disabled');\n  }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { ButtonCheckboxDirective } from './button-checkbox.directive';\nimport { ButtonRadioDirective } from './button-radio.directive';\nimport { ButtonRadioGroupDirective } from './button-radio-group.directive';\n\n@NgModule({\n  declarations: [ButtonCheckboxDirective, ButtonRadioDirective, ButtonRadioGroupDirective],\n  exports: [ButtonCheckboxDirective, ButtonRadioDirective, ButtonRadioGroupDirective]\n})\nexport class ButtonsModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: ButtonsModule, providers: [] };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class CarouselConfig {\n  /** Default interval of auto changing of slides */\n  interval = 5000;\n\n  /** Is loop of auto changing of slides can be paused */\n  noPause = false;\n\n  /** Is slides can wrap from the last to the first slide */\n  noWrap = false;\n\n  /** Show carousel-indicators */\n  showIndicators = true;\n\n  /* If value more then 1 â carousel works in multilist mode */\n  itemsPerSlide = 1;\n\n  /* If `true` â carousel shifts by one element. By default carousel shifts by number\n    of visible elements (itemsPerSlide field) */\n  singleSlideOffset = false;\n}\n","// tslint:disable:max-file-line-count\n/***\n * pause (not yet supported) (?string='hover') - event group name which pauses\n * the cycling of the carousel, if hover pauses on mouseenter and resumes on\n * mouseleave keyboard (not yet supported) (?boolean=true) - if false\n * carousel will not react to keyboard events\n * note: swiping not yet supported\n */\n/****\n * Problems:\n * 1) if we set an active slide via model changes, .active class remains on a\n * current slide.\n * 2) if we have only one slide, we shouldn't show prev/next nav buttons\n * 3) if first or last slide is active and noWrap is true, there should be\n * \"disabled\" class on the nav buttons.\n * 4) default interval should be equal 5000\n */\n\nimport {\n  Component, EventEmitter, Input, NgZone, OnDestroy, Output, AfterViewInit\n} from '@angular/core';\n\nimport { isBs3, LinkedList } from 'ngx-bootstrap/utils';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\nimport { findLastIndex, chunkByNumber } from './utils';\nimport { SlideWithIndex, IndexedSlideList } from './models';\n\nexport enum Direction {\n  UNKNOWN,\n  NEXT,\n  PREV\n}\n\n/**\n * Base element to create carousel\n */\n@Component({\n  selector: 'carousel',\n  templateUrl: './carousel.component.html'\n})\nexport class CarouselComponent implements AfterViewInit, OnDestroy {\n  /* If `true` â carousel will not cycle continuously and will have hard stops (prevent looping) */\n  @Input() noWrap: boolean;\n  /*  If `true` â will disable pausing on carousel mouse hover */\n  @Input() noPause: boolean;\n  /*  If `true` â carousel-indicators are visible  */\n  @Input() showIndicators: boolean;\n  /* If value more then 1 â carousel works in multilist mode */\n  @Input() itemsPerSlide = 1;\n  /* If `true` â carousel shifts by one element. By default carousel shifts by number\n     of visible elements (itemsPerSlide field) */\n  @Input() singleSlideOffset = false;\n\n  /** Will be emitted when active slide has been changed. Part of two-way-bindable [(activeSlide)] property */\n  @Output()\n  activeSlideChange: EventEmitter<number> = new EventEmitter<number>(false);\n\n  /** Will be emitted when active slides has been changed in multilist mode */\n  @Output()\n  slideRangeChange: EventEmitter<number[]> = new EventEmitter<number[]>();\n\n  /** Index of currently displayed slide(started for 0) */\n  @Input()\n  set activeSlide(index: number) {\n    if (this.multilist) {\n      return;\n    }\n    if (this._slides.length && index !== this._currentActiveSlide) {\n      this._select(index);\n    }\n  }\n\n  get activeSlide(): number {\n    return this._currentActiveSlide;\n  }\n\n  /* Index to start display slides from it */\n  @Input()\n  startFromIndex = 0;\n\n  /**\n   * Delay of item cycling in milliseconds. If false, carousel won't cycle\n   * automatically.\n   */\n  @Input()\n  get interval(): number {\n    return this._interval;\n  }\n\n  set interval(value: number) {\n    this._interval = value;\n    this.restartTimer();\n  }\n\n  get slides(): SlideComponent[] {\n    return this._slides.toArray();\n  }\n\n  // tslint:disable-next-line:no-any\n  protected currentInterval: any;\n  protected _currentActiveSlide: number;\n  protected _interval: number;\n  protected _slides: LinkedList<SlideComponent> = new LinkedList<SlideComponent>();\n  protected _chunkedSlides: SlideWithIndex[][];\n  protected _slidesWithIndexes: SlideWithIndex[];\n  protected _currentVisibleSlidesIndex = 0;\n  protected isPlaying: boolean;\n  protected destroyed = false;\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  constructor(config: CarouselConfig, private ngZone: NgZone) {\n    Object.assign(this, config);\n  }\n\n  ngAfterViewInit(): void {\n    setTimeout(() => {\n      if (this.multilist) {\n        this._chunkedSlides = chunkByNumber(\n          this.mapSlidesAndIndexes(),\n          this.itemsPerSlide\n        );\n        this.selectInitialSlides();\n      }\n    }, 0);\n  }\n\n  ngOnDestroy(): void {\n    this.destroyed = true;\n  }\n\n  /**\n   * Adds new slide. If this slide is first in collection - set it as active\n   * and starts auto changing\n   * @param slide\n   */\n  addSlide(slide: SlideComponent): void {\n    this._slides.add(slide);\n\n    if (this.multilist && this._slides.length <= this.itemsPerSlide) {\n      slide.active = true;\n    }\n\n    if (!this.multilist && this._slides.length === 1) {\n      this._currentActiveSlide = undefined;\n      this.activeSlide = 0;\n      this.play();\n    }\n  }\n\n  /**\n   * Removes specified slide. If this slide is active - will roll to another\n   * slide\n   * @param slide\n   */\n  removeSlide(slide: SlideComponent): void {\n    const remIndex = this._slides.indexOf(slide);\n\n    if (this._currentActiveSlide === remIndex) {\n      // removing of active slide\n      let nextSlideIndex: number = void 0;\n      if (this._slides.length > 1) {\n        // if this slide last - will roll to first slide, if noWrap flag is\n        // FALSE or to previous, if noWrap is TRUE in case, if this slide in\n        // middle of collection, index of next slide is same to removed\n        nextSlideIndex = !this.isLast(remIndex)\n          ? remIndex\n          : this.noWrap ? remIndex - 1 : 0;\n      }\n      this._slides.remove(remIndex);\n\n      // prevents exception with changing some value after checking\n      setTimeout(() => {\n        this._select(nextSlideIndex);\n      }, 0);\n    } else {\n      this._slides.remove(remIndex);\n      const currentSlideIndex = this.getCurrentSlideIndex();\n      setTimeout(() => {\n        // after removing, need to actualize index of current active slide\n        this._currentActiveSlide = currentSlideIndex;\n        this.activeSlideChange.emit(this._currentActiveSlide);\n      }, 0);\n    }\n  }\n\n  /**\n   * Rolling to next slide\n   * @param force: {boolean} if true - will ignore noWrap flag\n   */\n  nextSlide(force = false): void {\n    this.move(Direction.NEXT, force);\n  }\n\n  /**\n   * Rolling to previous slide\n   * @param force: {boolean} if true - will ignore noWrap flag\n   */\n  previousSlide(force = false): void {\n    this.move(Direction.PREV, force);\n  }\n\n  getFirstVisibleIndex(): number {\n    return this.slides.findIndex(this.getActive);\n  }\n\n  getLastVisibleIndex(): number {\n    return findLastIndex(this.slides, this.getActive);\n  }\n\n  getActive = (slide: SlideComponent) => slide.active;\n\n  move(direction: Direction, force = false): void {\n    const firstVisibleIndex = this.getFirstVisibleIndex();\n    const lastVisibleIndex = this.getLastVisibleIndex();\n\n    if (this.noWrap) {\n      if (\n        direction === Direction.NEXT &&\n        this.isLast(lastVisibleIndex) ||\n        direction === Direction.PREV &&\n        firstVisibleIndex === 0\n      ) {\n        return;\n      }\n    }\n\n    if (!this.multilist) {\n      this.activeSlide = this.findNextSlideIndex(direction, force);\n    } else {\n      this.moveMultilist(direction);\n    }\n  }\n\n  /**\n   * Rolling to specified slide\n   * @param index: {number} index of slide, which must be shown\n   */\n  selectSlide(index: number): void {\n    if (!this.multilist) {\n      this.activeSlide = index;\n    } else {\n      this.selectSlideRange(index);\n    }\n  }\n\n  /**\n   * Starts a auto changing of slides\n   */\n  play(): void {\n    if (!this.isPlaying) {\n      this.isPlaying = true;\n      this.restartTimer();\n    }\n  }\n\n  /**\n   * Stops a auto changing of slides\n   */\n  pause(): void {\n    if (!this.noPause) {\n      this.isPlaying = false;\n      this.resetTimer();\n    }\n  }\n\n  /**\n   * Finds and returns index of currently displayed slide\n   */\n  getCurrentSlideIndex(): number {\n    return this._slides.findIndex(this.getActive);\n  }\n\n  /**\n   * Defines, whether the specified index is last in collection\n   * @param index\n   */\n  isLast(index: number): boolean {\n    return index + 1 >= this._slides.length;\n  }\n\n  /**\n   * Defines, whether the specified index is first in collection\n   * @param index\n   */\n  isFirst(index: number): boolean {\n    return index === 0;\n  }\n\n  private selectInitialSlides(): void {\n    const startIndex = this.startFromIndex <= this._slides.length\n      ? this.startFromIndex\n      : 0;\n\n    this.hideSlides();\n\n    if (this.singleSlideOffset) {\n      this._slidesWithIndexes = this.mapSlidesAndIndexes();\n\n      if (this._slides.length - startIndex < this.itemsPerSlide) {\n        const slidesToAppend = this._slidesWithIndexes.slice(0, startIndex);\n\n        this._slidesWithIndexes  = [\n          ...this._slidesWithIndexes,\n          ...slidesToAppend\n        ]\n        .slice(slidesToAppend.length)\n        .slice(0, this.itemsPerSlide);\n      } else {\n        this._slidesWithIndexes = this._slidesWithIndexes.slice(\n          startIndex,\n          startIndex + this.itemsPerSlide\n        );\n      }\n\n      this._slidesWithIndexes.forEach((slide: SlideWithIndex) => slide.item.active = true);\n      this.makeSlidesConsistent(this._slidesWithIndexes);\n    } else {\n      this.selectRangeByNestedIndex(startIndex);\n    }\n\n    this.slideRangeChange.emit(this.getVisibleIndexes());\n  }\n\n  /**\n   * Defines next slide index, depending of direction\n   * @param direction: Direction(UNKNOWN|PREV|NEXT)\n   * @param force: {boolean} if TRUE - will ignore noWrap flag, else will\n   *   return undefined if next slide require wrapping\n   */\n  private findNextSlideIndex(direction: Direction, force: boolean): number {\n    let nextSlideIndex = 0;\n\n    if (\n      !force &&\n      (this.isLast(this.activeSlide) &&\n        direction !== Direction.PREV &&\n        this.noWrap)\n    ) {\n      return undefined;\n    }\n\n    switch (direction) {\n      case Direction.NEXT:\n        // if this is last slide, not force, looping is disabled\n        // and need to going forward - select current slide, as a next\n        nextSlideIndex = !this.isLast(this._currentActiveSlide)\n          ? this._currentActiveSlide + 1\n          : !force && this.noWrap ? this._currentActiveSlide : 0;\n        break;\n      case Direction.PREV:\n        // if this is first slide, not force, looping is disabled\n        // and need to going backward - select current slide, as a next\n        nextSlideIndex =\n          this._currentActiveSlide > 0\n            ? this._currentActiveSlide - 1\n            : !force && this.noWrap\n            ? this._currentActiveSlide\n            : this._slides.length - 1;\n        break;\n      default:\n        throw new Error('Unknown direction');\n    }\n\n    return nextSlideIndex;\n  }\n\n  private mapSlidesAndIndexes(): SlideWithIndex[] {\n    return this.slides\n      .slice()\n      .map((slide: SlideComponent, index: number) => {\n        return {\n          index,\n          item: slide\n        };\n      });\n  }\n\n\n  private selectSlideRange(index: number): void {\n    if (this.isIndexInRange(index)) {\n      return;\n    }\n\n    this.hideSlides();\n\n    if (!this.singleSlideOffset) {\n      this.selectRangeByNestedIndex(index);\n    } else {\n      const startIndex = this.isIndexOnTheEdges(index)\n        ? index\n        : index - this.itemsPerSlide + 1;\n\n      const endIndex = this.isIndexOnTheEdges(index)\n        ? index + this.itemsPerSlide\n        : index + 1;\n\n      this._slidesWithIndexes = this.mapSlidesAndIndexes().slice(startIndex, endIndex);\n      this.makeSlidesConsistent(this._slidesWithIndexes);\n\n      this._slidesWithIndexes.forEach((slide: SlideWithIndex) => slide.item.active = true);\n    }\n\n    this.slideRangeChange.emit(this.getVisibleIndexes());\n  }\n\n  private selectRangeByNestedIndex(index: number): void {\n    const selectedRange = this._chunkedSlides\n      .map((slidesList, i: number) => {\n        return {\n          index: i,\n          list: slidesList\n        };\n      })\n      .find(\n        (slidesList: IndexedSlideList) => {\n          return slidesList.list.find(slide => slide.index === index) !== undefined;\n        }\n      );\n\n    this._currentVisibleSlidesIndex = selectedRange.index;\n\n    this._chunkedSlides[selectedRange.index].forEach((slide: SlideWithIndex) => {\n      slide.item.active = true;\n    });\n  }\n\n  private isIndexOnTheEdges(index: number): boolean {\n    return (\n      index + 1 - this.itemsPerSlide <= 0 ||\n      index + this.itemsPerSlide <= this._slides.length\n    );\n  }\n\n  private isIndexInRange(index: number): boolean {\n    if (this.singleSlideOffset) {\n      const visibleIndexes = this._slidesWithIndexes.map((slide: SlideWithIndex) => slide.index);\n\n      return visibleIndexes.indexOf(index) >= 0;\n    }\n\n    return (\n      index <= this.getLastVisibleIndex() &&\n      index >= this.getFirstVisibleIndex()\n    );\n  }\n\n  private hideSlides(): void {\n    this.slides.forEach((slide: SlideComponent) => slide.active = false);\n  }\n\n  private isVisibleSlideListLast(): boolean {\n    return this._currentVisibleSlidesIndex === this._chunkedSlides.length - 1;\n  }\n\n  private isVisibleSlideListFirst(): boolean {\n    return this._currentVisibleSlidesIndex === 0;\n  }\n\n  private moveSliderByOneItem(direction: Direction): void {\n    let firstVisibleIndex: number;\n    let lastVisibleIndex: number;\n    let indexToHide: number;\n    let indexToShow: number;\n\n    if (this.noWrap) {\n      firstVisibleIndex = this.getFirstVisibleIndex();\n      lastVisibleIndex = this.getLastVisibleIndex();\n\n      indexToHide = direction === Direction.NEXT\n        ? firstVisibleIndex\n        : lastVisibleIndex;\n\n      indexToShow = direction !== Direction.NEXT\n        ? firstVisibleIndex - 1\n        : !this.isLast(lastVisibleIndex)\n        ? lastVisibleIndex + 1 : 0;\n\n      this._slides.get(indexToHide).active = false;\n      this._slides.get(indexToShow).active = true;\n\n      const slidesToReorder = this.mapSlidesAndIndexes().filter(\n        (slide: SlideWithIndex) => slide.item.active\n      );\n\n      this.makeSlidesConsistent(slidesToReorder);\n\n      this.slideRangeChange.emit(this.getVisibleIndexes());\n    } else {\n      let displayedIndex: number;\n\n      firstVisibleIndex = this._slidesWithIndexes[0].index;\n      lastVisibleIndex = this._slidesWithIndexes[this._slidesWithIndexes.length - 1].index;\n\n      if (direction === Direction.NEXT) {\n        this._slidesWithIndexes.shift();\n\n        displayedIndex = this.isLast(lastVisibleIndex)\n          ? 0\n          : lastVisibleIndex + 1;\n\n        this._slidesWithIndexes.push({\n          index: displayedIndex,\n          item: this._slides.get(displayedIndex)\n        });\n      } else {\n        this._slidesWithIndexes.pop();\n        displayedIndex = this.isFirst(firstVisibleIndex)\n          ? this._slides.length - 1\n          : firstVisibleIndex - 1;\n\n        this._slidesWithIndexes = [{\n          index: displayedIndex,\n          item: this._slides.get(displayedIndex)\n        }, ...this._slidesWithIndexes];\n      }\n\n      this.hideSlides();\n\n      this._slidesWithIndexes.forEach(slide => slide.item.active = true);\n\n      this.makeSlidesConsistent(this._slidesWithIndexes);\n\n      this.slideRangeChange.emit(\n        this._slidesWithIndexes.map((slide: SlideWithIndex) => slide.index)\n      );\n    }\n  }\n\n  private makeSlidesConsistent = (slides: SlideWithIndex[]): void => {\n    slides.forEach((slide: SlideWithIndex, index: number) => slide.item.order = index);\n  }\n\n  private moveMultilist(direction: Direction): void {\n    if (this.singleSlideOffset) {\n      this.moveSliderByOneItem(direction);\n    } else {\n      this.hideSlides();\n\n      if (this.noWrap) {\n        this._currentVisibleSlidesIndex = direction === Direction.NEXT\n          ? this._currentVisibleSlidesIndex + 1\n          : this._currentVisibleSlidesIndex - 1;\n      } else {\n        if (direction === Direction.NEXT) {\n          this._currentVisibleSlidesIndex = this.isVisibleSlideListLast()\n            ? 0\n            : this._currentVisibleSlidesIndex + 1;\n        } else {\n          this._currentVisibleSlidesIndex = this.isVisibleSlideListFirst()\n            ? this._chunkedSlides.length - 1\n            : this._currentVisibleSlidesIndex - 1;\n        }\n      }\n\n      this._chunkedSlides[this._currentVisibleSlidesIndex].forEach(\n        (slide: SlideWithIndex) => slide.item.active = true\n      );\n\n      this.slideRangeChange.emit(this.getVisibleIndexes());\n    }\n  }\n\n  private getVisibleIndexes(): number[] {\n    if (!this.singleSlideOffset) {\n      return this._chunkedSlides[this._currentVisibleSlidesIndex]\n        .map((slide: SlideWithIndex) => slide.index);\n    } else {\n      return this._slidesWithIndexes.map((slide: SlideWithIndex) => slide.index);\n    }\n  }\n\n  /**\n   * Sets a slide, which specified through index, as active\n   * @param index\n   */\n  private _select(index: number): void {\n    if (isNaN(index)) {\n      this.pause();\n\n      return;\n    }\n\n    if (!this.multilist) {\n      const currentSlide = this._slides.get(this._currentActiveSlide);\n      if (currentSlide) {\n        currentSlide.active = false;\n      }\n    }\n\n    const nextSlide = this._slides.get(index);\n    if (nextSlide) {\n      this._currentActiveSlide = index;\n      nextSlide.active = true;\n      this.activeSlide = index;\n      this.activeSlideChange.emit(index);\n    }\n  }\n\n  /**\n   * Starts loop of auto changing of slides\n   */\n  private restartTimer() {\n    this.resetTimer();\n    const interval = +this.interval;\n    if (!isNaN(interval) && interval > 0) {\n      this.currentInterval = this.ngZone.runOutsideAngular(() => {\n        return setInterval(() => {\n          const nInterval = +this.interval;\n          this.ngZone.run(() => {\n            if (\n              this.isPlaying &&\n              !isNaN(this.interval) &&\n              nInterval > 0 &&\n              this.slides.length\n            ) {\n              this.nextSlide();\n            } else {\n              this.pause();\n            }\n          });\n        }, interval);\n      });\n    }\n  }\n\n  get multilist(): boolean {\n    return this.itemsPerSlide > 1;\n  }\n\n  /**\n   * Stops loop of auto changing of slides\n   */\n  private resetTimer(): void {\n    if (this.currentInterval) {\n      clearInterval(this.currentInterval);\n      this.currentInterval = void 0;\n    }\n  }\n}\n","/**\n * Returns the index of the last element in the array where predicate is true, and -1\n * otherwise.\n * @param array The source array to search in\n * @param predicate find calls predicate once for each element of the array, in descending\n * order, until it finds one where predicate returns true. If such an element is found,\n * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.\n */\nexport function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean): number {\n  let l = array.length;\n\n  while (l--) {\n    if (predicate(array[l], l, array)) {\n      return l;\n    }\n  }\n\n  return -1;\n}\n\nexport function chunkByNumber<T>(array: T[], size: number): T[][] {\n  const out = [];\n  const n = Math.ceil((array.length) / size);\n  let i = 0;\n\n  while (i < n) {\n    const chunk = array.splice(\n      0,\n      (i === n - 1) && size < array.length ? array.length : size\n    );\n\n    out.push(chunk);\n    i++;\n  }\n\n  return out;\n}\n","import {\n  Component,\n  HostBinding,\n  OnDestroy,\n  Input,\n  OnInit\n} from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\n\n@Component({\n  selector: 'slide',\n  template: `\n    <div [class.active]=\"active\" class=\"item\">\n      <ng-content></ng-content>\n    </div>\n  `,\n  host: {\n    '[attr.aria-hidden]': '!active'\n  }\n})\nexport class SlideComponent implements OnInit, OnDestroy {\n  /** Is current slide active */\n  @HostBinding('class.active')\n  @Input()\n  active: boolean;\n\n  @HostBinding('style.width') itemWidth = '100%';\n  @HostBinding('style.order') order = 0;\n\n  /** Wraps element by appropriate CSS classes */\n  @HostBinding('class.item')\n  @HostBinding('class.carousel-item')\n  addClass = true;\n\n  /** Link to Parent(container-collection) component */\n  protected carousel: CarouselComponent;\n\n  constructor(carousel: CarouselComponent) {\n    this.carousel = carousel;\n  }\n\n  /** Fires changes in container collection after adding a new slide instance */\n  ngOnInit(): void {\n    this.carousel.addSlide(this);\n    this.itemWidth = `${100 / this.carousel.itemsPerSlide}%`;\n  }\n\n  /** Fires changes in container collection after removing of this slide instance */\n  ngOnDestroy(): void {\n    this.carousel.removeSlide(this);\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [SlideComponent, CarouselComponent],\n  exports: [SlideComponent, CarouselComponent],\n  providers: [CarouselConfig]\n})\nexport class CarouselModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: CarouselModule, providers: [] };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class BsModalRef {\n  /**\n   * Reference to a component inside the modal. Null if modal's been created with TemplateRef\n   */\n  // tslint:disable-next-line:no-any\n  content?: any | null;\n\n  /**\n   * Hides the modal\n   */\n  hide: () => void = Function;\n  /**\n   * Sets new class to modal window\n   */\n  setClass: (newClass: string) => void = Function;\n}\n","export class ModalBackdropOptions {\n  animate = true;\n\n  constructor(options: ModalBackdropOptions) {\n    Object.assign(this, options);\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { ClassName, DismissReasons, Selector, TransitionDurations } from './models';\n\n@Injectable()\nexport class ModalOptions {\n  /**\n   *  Includes a modal-backdrop element. Alternatively,\n   *  specify static for a backdrop which doesn't close the modal on click.\n   */\n  backdrop?: boolean | 'static';\n  /**\n   * Closes the modal when escape key is pressed.\n   */\n  keyboard?: boolean;\n\n  focus?: boolean;\n  /**\n   * Shows the modal when initialized.\n   */\n  show?: boolean;\n  /**\n   * Ignore the backdrop click\n   */\n  ignoreBackdropClick?: boolean;\n  /**\n   * Css class for opened modal\n   */\n  class?: string;\n  /**\n   * Toggle animation\n   */\n  animated?: boolean;\n  /**\n   * Modal data\n   */\n  initialState?: Object;\n}\n\n\nexport const modalConfigDefaults: ModalOptions = {\n  backdrop: true,\n  keyboard: true,\n  focus: true,\n  show: false,\n  ignoreBackdropClick: false,\n  class: '',\n  animated: true,\n  initialState: {}\n};\n\nexport const CLASS_NAME: ClassName = {\n  SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n  BACKDROP: 'modal-backdrop',\n  OPEN: 'modal-open',\n  FADE: 'fade',\n  IN: 'in', // bs3\n  SHOW: 'show' // bs4\n};\n\nexport const SELECTOR: Selector = {\n  DIALOG: '.modal-dialog',\n  DATA_TOGGLE: '[data-toggle=\"modal\"]',\n  DATA_DISMISS: '[data-dismiss=\"modal\"]',\n  FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n};\n\nexport const TRANSITION_DURATIONS: TransitionDurations = {\n  MODAL: 300,\n  BACKDROP: 150\n};\n\nexport const DISMISS_REASONS: DismissReasons = {\n  BACKRDOP: 'backdrop-click',\n  ESC: 'esc'\n};\n","import {\n  Component,\n  ElementRef,\n  HostListener,\n  OnDestroy,\n  OnInit,\n  Renderer2\n} from '@angular/core';\nimport {\n  CLASS_NAME,\n  DISMISS_REASONS,\n  ModalOptions,\n  TRANSITION_DURATIONS\n} from './modal-options.class';\nimport { BsModalService } from './bs-modal.service';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n@Component({\n  selector: 'modal-container',\n  template: `\n    <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\" role=\"document\">\n      <div class=\"modal-content\">\n        <ng-content></ng-content>\n      </div>\n    </div>\n  `,\n  host: {\n    class: 'modal',\n    role: 'dialog',\n    tabindex: '-1',\n    '[attr.aria-modal]': 'true'\n  }\n})\nexport class ModalContainerComponent implements OnInit, OnDestroy {\n  config: ModalOptions;\n  isShown = false;\n  level: number;\n  isAnimated: boolean;\n  bsModalService: BsModalService;\n  private isModalHiding = false;\n\n  constructor(options: ModalOptions,\n              protected _element: ElementRef,\n              private _renderer: Renderer2) {\n    this.config = Object.assign({}, options);\n  }\n\n  ngOnInit(): void {\n    if (this.isAnimated) {\n      this._renderer.addClass(\n        this._element.nativeElement,\n        CLASS_NAME.FADE\n      );\n    }\n    this._renderer.setStyle(\n      this._element.nativeElement,\n      'display',\n      'block'\n    );\n    setTimeout(() => {\n      this.isShown = true;\n      this._renderer.addClass(\n        this._element.nativeElement,\n        isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW\n      );\n    }, this.isAnimated ? TRANSITION_DURATIONS.BACKDROP : 0);\n    if (document && document.body) {\n      if (this.bsModalService.getModalsCount() === 1) {\n        this.bsModalService.checkScrollbar();\n        this.bsModalService.setScrollbar();\n      }\n      this._renderer.addClass(document.body, CLASS_NAME.OPEN);\n    }\n    if (this._element.nativeElement) {\n      this._element.nativeElement.focus();\n    }\n  }\n\n  @HostListener('click', ['$event'])\n  onClick(event: MouseEvent): void {\n    if (\n      this.config.ignoreBackdropClick ||\n      this.config.backdrop === 'static' ||\n      event.target !== this._element.nativeElement\n    ) {\n      return;\n    }\n    this.bsModalService.setDismissReason(DISMISS_REASONS.BACKRDOP);\n    this.hide();\n  }\n\n  @HostListener('window:keydown.esc', ['$event'])\n  onEsc(event: KeyboardEvent): void {\n    if (!this.isShown) {\n      return;\n    }\n\n    // tslint:disable-next-line:deprecation\n    if (event.keyCode === 27 || event.key === 'Escape') {\n      event.preventDefault();\n    }\n\n    if (\n      this.config.keyboard &&\n      this.level === this.bsModalService.getModalsCount()\n    ) {\n      this.bsModalService.setDismissReason(DISMISS_REASONS.ESC);\n      this.hide();\n    }\n  }\n\n  ngOnDestroy(): void {\n    if (this.isShown) {\n      this.hide();\n    }\n  }\n\n  hide(): void {\n    if (this.isModalHiding || !this.isShown) {\n      return;\n    }\n    this.isModalHiding = true;\n    this._renderer.removeClass(\n      this._element.nativeElement,\n      isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW\n    );\n    setTimeout(() => {\n      this.isShown = false;\n      if (\n        document &&\n        document.body &&\n        this.bsModalService.getModalsCount() === 1\n      ) {\n        this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\n      }\n      this.bsModalService.hide(this.level);\n      this.isModalHiding = false;\n    }, this.isAnimated ? TRANSITION_DURATIONS.MODAL : 0);\n  }\n}\n","import { Component, ElementRef, OnInit, Renderer2 } from '@angular/core';\n\nimport { CLASS_NAME } from './modal-options.class';\nimport { isBs3, Utils } from 'ngx-bootstrap/utils';\n\n\n/** This component will be added as background layout for modals if enabled */\n@Component({\n  selector: 'bs-modal-backdrop',\n  template: ' ',\n  host: { class: CLASS_NAME.BACKDROP }\n})\nexport class ModalBackdropComponent implements OnInit {\n  get isAnimated(): boolean {\n    return this._isAnimated;\n  }\n\n  set isAnimated(value: boolean) {\n    this._isAnimated = value;\n    // this.renderer.setElementClass(this.element.nativeElement, `${ClassName.FADE}`, value);\n  }\n\n  get isShown(): boolean {\n    return this._isShown;\n  }\n\n  set isShown(value: boolean) {\n    this._isShown = value;\n    if (value) {\n      this.renderer.addClass(\n        this.element.nativeElement,\n        `${CLASS_NAME.IN}`\n      );\n    } else {\n      this.renderer.removeClass(\n        this.element.nativeElement,\n        `${CLASS_NAME.IN}`\n      );\n    }\n    if (!isBs3()) {\n      if (value) {\n        this.renderer.addClass(\n          this.element.nativeElement,\n          `${CLASS_NAME.SHOW}`\n        );\n      } else {\n        this.renderer.removeClass(\n          this.element.nativeElement,\n          `${CLASS_NAME.SHOW}`\n        );\n      }\n    }\n  }\n\n  element: ElementRef;\n  renderer: Renderer2;\n\n  protected _isAnimated: boolean;\n  protected _isShown = false;\n\n  constructor(element: ElementRef, renderer: Renderer2) {\n    this.element = element;\n    this.renderer = renderer;\n  }\n\n  ngOnInit(): void {\n    if (this.isAnimated) {\n      this.renderer.addClass(\n        this.element.nativeElement,\n        `${CLASS_NAME.FADE}`\n      );\n      Utils.reflow(this.element.nativeElement);\n    }\n    this.isShown = true;\n  }\n}\n","/* tslint:disable:max-file-line-count */\n// todo: should we support enforce focus in?\n// todo: in original bs there are was a way to prevent modal from showing\n// todo: original modal had resize events\n\nimport {\n  ComponentRef, Directive, ElementRef, EventEmitter, HostListener, Input,\n  OnDestroy, OnInit, Output, Renderer2, ViewContainerRef\n} from '@angular/core';\n\nimport { document, window, isBs3, Utils } from 'ngx-bootstrap/utils';\nimport { ModalBackdropComponent } from './modal-backdrop.component';\nimport {\n  CLASS_NAME, DISMISS_REASONS, modalConfigDefaults, ModalOptions\n} from './modal-options.class';\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\n\nconst TRANSITION_DURATION = 300;\nconst BACKDROP_TRANSITION_DURATION = 150;\n\n/** Mark any code with directive to show it's content in modal */\n@Directive({\n  selector: '[bsModal]',\n  exportAs: 'bs-modal'\n})\nexport class ModalDirective implements OnDestroy, OnInit {\n  /** allows to set modal configuration via element property */\n  @Input()\n  set config(conf: ModalOptions) {\n    this._config = this.getConfig(conf);\n  }\n\n  get config(): ModalOptions {\n    return this._config;\n  }\n\n  /** This event fires immediately when the `show` instance method is called. */\n  @Output()\n  onShow: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\n  /** This event is fired when the modal has been made visible to the user\n   * (will wait for CSS transitions to complete)\n   */\n  @Output()\n  onShown: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\n  /** This event is fired immediately when\n   * the hide instance method has been called.\n   */\n  @Output()\n  onHide: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\n  /** This event is fired when the modal has finished being\n   * hidden from the user (will wait for CSS transitions to complete).\n   */\n  @Output()\n  onHidden: EventEmitter<ModalDirective> = new EventEmitter<ModalDirective>();\n\n  /** This field contains last dismiss reason.\n   * Possible values: `backdrop-click`, `esc` and `null`\n   * (if modal was closed by direct call of `.hide()`).\n   */\n  dismissReason: string;\n\n  get isShown(): boolean {\n    return this._isShown;\n  }\n\n  protected _config: ModalOptions;\n  protected _isShown = false;\n\n  protected isBodyOverflowing = false;\n  protected originalBodyPadding = 0;\n  protected scrollbarWidth = 0;\n\n  protected timerHideModal = 0;\n  protected timerRmBackDrop = 0;\n\n  // reference to backdrop component\n  protected backdrop: ComponentRef<ModalBackdropComponent>;\n  private _backdrop: ComponentLoader<ModalBackdropComponent>;\n\n  private isNested = false;\n\n  constructor(private _element: ElementRef,\n              _viewContainerRef: ViewContainerRef,\n              private _renderer: Renderer2,\n              clf: ComponentLoaderFactory) {\n    this._backdrop = clf.createLoader<ModalBackdropComponent>(\n      _element,\n      _viewContainerRef,\n      _renderer\n    );\n  }\n\n  @HostListener('click', ['$event'])\n  onClick(event: MouseEvent): void {\n    if (\n      this.config.ignoreBackdropClick ||\n      this.config.backdrop === 'static' ||\n      event.target !== this._element.nativeElement\n    ) {\n      return;\n    }\n    this.dismissReason = DISMISS_REASONS.BACKRDOP;\n    this.hide(event);\n  }\n\n  // todo: consider preventing default and stopping propagation\n  @HostListener('keydown.esc', ['$event'])\n  onEsc(event: KeyboardEvent): void {\n    if (!this._isShown) {\n      return;\n    }\n    // tslint:disable-next-line:deprecation\n    if (event.keyCode === 27 || event.key === 'Escape') {\n      event.preventDefault();\n    }\n\n    if (this.config.keyboard) {\n      this.dismissReason = DISMISS_REASONS.ESC;\n      this.hide();\n    }\n  }\n\n  ngOnDestroy() {\n    this.config = void 0;\n    if (this._isShown) {\n      this._isShown = false;\n      this.hideModal();\n      this._backdrop.dispose();\n    }\n  }\n\n  ngOnInit(): void {\n    this._config = this._config || this.getConfig();\n    setTimeout(() => {\n      if (this._config.show) {\n        this.show();\n      }\n    }, 0);\n  }\n\n  /* Public methods */\n\n  /** Allows to manually toggle modal visibility */\n  toggle(): void {\n    return this._isShown ? this.hide() : this.show();\n  }\n\n  /** Allows to manually open modal */\n  show(): void {\n    this.dismissReason = null;\n    this.onShow.emit(this);\n    if (this._isShown) {\n      return;\n    }\n    clearTimeout(this.timerHideModal);\n    clearTimeout(this.timerRmBackDrop);\n\n    this._isShown = true;\n\n    this.checkScrollbar();\n    this.setScrollbar();\n\n    if (document && document.body) {\n      if (document.body.classList.contains(CLASS_NAME.OPEN)) {\n        this.isNested = true;\n      } else {\n        this._renderer.addClass(document.body, CLASS_NAME.OPEN);\n      }\n    }\n\n    this.showBackdrop(() => {\n      this.showElement();\n    });\n  }\n\n  /** Allows to manually close modal */\n  hide(event?: Event): void {\n    if (event) {\n      event.preventDefault();\n    }\n\n    this.onHide.emit(this);\n\n    // todo: add an option to prevent hiding\n    if (!this._isShown) {\n      return;\n    }\n\n    window.clearTimeout(this.timerHideModal);\n    window.clearTimeout(this.timerRmBackDrop);\n\n    this._isShown = false;\n    this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.IN);\n    if (!isBs3()) {\n      this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.SHOW);\n    }\n    // this._addClassIn = false;\n\n    if (this._config.animated) {\n      this.timerHideModal = window.setTimeout(\n        () => this.hideModal(),\n        TRANSITION_DURATION\n      );\n    } else {\n      this.hideModal();\n    }\n  }\n\n  /** Private methods @internal */\n  protected getConfig(config?: ModalOptions): ModalOptions {\n    return Object.assign({}, modalConfigDefaults, config);\n  }\n\n  /**\n   *  Show dialog\n   *  @internal\n   */\n  protected showElement(): void {\n    // todo: replace this with component loader usage\n    if (\n      !this._element.nativeElement.parentNode ||\n      this._element.nativeElement.parentNode.nodeType !== Node.ELEMENT_NODE\n    ) {\n      // don't move modals dom position\n      if (document && document.body) {\n        document.body.appendChild(this._element.nativeElement);\n      }\n    }\n\n    this._renderer.setAttribute(\n      this._element.nativeElement,\n      'aria-hidden',\n      'false'\n    );\n    this._renderer.setAttribute(\n      this._element.nativeElement,\n      'aria-modal',\n      'true'\n    );\n    this._renderer.setStyle(\n      this._element.nativeElement,\n      'display',\n      'block'\n    );\n    this._renderer.setProperty(\n      this._element.nativeElement,\n      'scrollTop',\n      0\n    );\n\n    if (this._config.animated) {\n      Utils.reflow(this._element.nativeElement);\n    }\n\n    // this._addClassIn = true;\n    this._renderer.addClass(this._element.nativeElement, CLASS_NAME.IN);\n    if (!isBs3()) {\n      this._renderer.addClass(this._element.nativeElement, CLASS_NAME.SHOW);\n    }\n\n    const transitionComplete = () => {\n      if (this._config.focus) {\n        this._element.nativeElement.focus();\n      }\n      this.onShown.emit(this);\n    };\n\n    if (this._config.animated) {\n      setTimeout(transitionComplete, TRANSITION_DURATION);\n    } else {\n      transitionComplete();\n    }\n  }\n\n  /** @internal */\n  protected hideModal(): void {\n    this._renderer.setAttribute(\n      this._element.nativeElement,\n      'aria-hidden',\n      'true'\n    );\n    this._renderer.setStyle(\n      this._element.nativeElement,\n      'display',\n      'none'\n    );\n    this.showBackdrop(() => {\n      if (!this.isNested) {\n        if (document && document.body) {\n          this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\n        }\n        this.resetScrollbar();\n      }\n      this.resetAdjustments();\n      this.focusOtherModal();\n      this.onHidden.emit(this);\n    });\n  }\n\n  // todo: original show was calling a callback when done, but we can use\n  // promise\n  /** @internal */\n  protected showBackdrop(callback?: Function): void {\n    if (\n      this._isShown &&\n      this.config.backdrop &&\n      (!this.backdrop || !this.backdrop.instance.isShown)\n    ) {\n      this.removeBackdrop();\n      this._backdrop\n        .attach(ModalBackdropComponent)\n        .to('body')\n        .show({isAnimated: this._config.animated});\n      this.backdrop = this._backdrop._componentRef;\n\n      if (!callback) {\n        return;\n      }\n\n      if (!this._config.animated) {\n        callback();\n\n        return;\n      }\n\n      setTimeout(callback, BACKDROP_TRANSITION_DURATION);\n    } else if (!this._isShown && this.backdrop) {\n      this.backdrop.instance.isShown = false;\n\n      const callbackRemove = () => {\n        this.removeBackdrop();\n        if (callback) {\n          callback();\n        }\n      };\n\n      if (this.backdrop.instance.isAnimated) {\n        this.timerRmBackDrop = window.setTimeout(\n          callbackRemove,\n          BACKDROP_TRANSITION_DURATION\n        );\n      } else {\n        callbackRemove();\n      }\n    } else if (callback) {\n      callback();\n    }\n  }\n\n  /** @internal */\n  protected removeBackdrop(): void {\n    this._backdrop.hide();\n  }\n\n  /** Events tricks */\n\n  // no need for it\n  // protected setEscapeEvent():void {\n  //   if (this._isShown && this._config.keyboard) {\n  //     $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n  //       if (event.which === 27) {\n  //         this.hide()\n  //       }\n  //     })\n  //\n  //   } else if (!this._isShown) {\n  //     $(this._element).off(Event.KEYDOWN_DISMISS)\n  //   }\n  // }\n\n  // protected setResizeEvent():void {\n  // console.log(this.renderer.listenGlobal('', Event.RESIZE));\n  // if (this._isShown) {\n  //   $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n  // } else {\n  //   $(window).off(Event.RESIZE)\n  // }\n  // }\n\n  protected focusOtherModal() {\n    if (this._element.nativeElement.parentElement == null) {\n      return;\n    }\n    const otherOpenedModals = this._element.nativeElement.parentElement.querySelectorAll('.in[bsModal]');\n    if (!otherOpenedModals.length) {\n      return;\n    }\n    otherOpenedModals[otherOpenedModals.length - 1].focus();\n  }\n\n  /** @internal */\n  protected resetAdjustments(): void {\n    this._renderer.setStyle(\n      this._element.nativeElement,\n      'paddingLeft',\n      ''\n    );\n    this._renderer.setStyle(\n      this._element.nativeElement,\n      'paddingRight',\n      ''\n    );\n  }\n\n  /** Scroll bar tricks */\n  /** @internal */\n  protected checkScrollbar(): void {\n    this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;\n    this.scrollbarWidth = this.getScrollbarWidth();\n  }\n\n  protected setScrollbar(): void {\n    if (!document) {\n      return;\n    }\n\n    this.originalBodyPadding = parseInt(\n      window\n        .getComputedStyle(document.body)\n        .getPropertyValue('padding-right') || 0,\n      10\n    );\n\n    if (this.isBodyOverflowing) {\n      document.body.style.paddingRight = `${this.originalBodyPadding +\n      this.scrollbarWidth}px`;\n    }\n  }\n\n  protected resetScrollbar(): void {\n    document.body.style.paddingRight = `${this.originalBodyPadding}px`;\n  }\n\n  // thx d.walsh\n  protected getScrollbarWidth(): number {\n    const scrollDiv = this._renderer.createElement('div');\n    this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\n    this._renderer.appendChild(document.body, scrollDiv);\n    const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n    this._renderer.removeChild(document.body, scrollDiv);\n\n    return scrollbarWidth;\n  }\n}\n","import {\n  ComponentRef,\n  Injectable,\n  TemplateRef,\n  EventEmitter,\n  Renderer2,\n  RendererFactory2\n} from '@angular/core';\n\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { ModalBackdropComponent } from './modal-backdrop.component';\nimport { ModalContainerComponent } from './modal-container.component';\nimport {\n  CLASS_NAME,\n  modalConfigDefaults,\n  ModalOptions,\n  TRANSITION_DURATIONS\n} from './modal-options.class';\nimport { BsModalRef } from './bs-modal-ref.service';\n\n@Injectable()\nexport class BsModalService {\n  // constructor props\n  config: ModalOptions = modalConfigDefaults;\n\n  // tslint:disable-next-line:no-any\n  onShow: EventEmitter<any> = new EventEmitter();\n  // tslint:disable-next-line:no-any\n  onShown: EventEmitter<any> = new EventEmitter();\n  // tslint:disable-next-line:no-any\n  onHide: EventEmitter<any> = new EventEmitter();\n  // tslint:disable-next-line:no-any\n  onHidden: EventEmitter<any> = new EventEmitter();\n\n  protected isBodyOverflowing = false;\n  protected originalBodyPadding = 0;\n\n  protected scrollbarWidth = 0;\n\n  protected backdropRef: ComponentRef<ModalBackdropComponent>;\n  private _backdropLoader: ComponentLoader<ModalBackdropComponent>;\n  private modalsCount = 0;\n  private lastDismissReason = '';\n\n  private loaders: ComponentLoader<ModalContainerComponent>[] = [];\n\n  private _renderer: Renderer2;\n\n  constructor(rendererFactory: RendererFactory2, private clf: ComponentLoaderFactory) {\n    this._backdropLoader = this.clf.createLoader<ModalBackdropComponent>(\n      null,\n      null,\n      null\n    );\n    this._renderer = rendererFactory.createRenderer(null, null);\n  }\n\n  /** Shows a modal */\n  // tslint:disable-next-line:no-any\n  show(content: string | TemplateRef<any> | any, config?: ModalOptions): BsModalRef {\n    this.modalsCount++;\n    this._createLoaders();\n    this.config = Object.assign({}, modalConfigDefaults, config);\n    this._showBackdrop();\n    this.lastDismissReason = null;\n\n    return this._showModal(content);\n  }\n\n  hide(level: number) {\n    if (this.modalsCount === 1) {\n      this._hideBackdrop();\n      this.resetScrollbar();\n    }\n    this.modalsCount = this.modalsCount >= 1 ? this.modalsCount - 1 : 0;\n    setTimeout(() => {\n      this._hideModal(level);\n      this.removeLoaders(level);\n    }, this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0);\n  }\n\n  _showBackdrop(): void {\n    const isBackdropEnabled =\n      this.config.backdrop || this.config.backdrop === 'static';\n    const isBackdropInDOM =\n      !this.backdropRef || !this.backdropRef.instance.isShown;\n\n    if (this.modalsCount === 1) {\n      this.removeBackdrop();\n\n      if (isBackdropEnabled && isBackdropInDOM) {\n        this._backdropLoader\n          .attach(ModalBackdropComponent)\n          .to('body')\n          .show({ isAnimated: this.config.animated });\n        this.backdropRef = this._backdropLoader._componentRef;\n      }\n    }\n  }\n\n  _hideBackdrop(): void {\n    if (!this.backdropRef) {\n      return;\n    }\n    this.backdropRef.instance.isShown = false;\n    const duration = this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0;\n    setTimeout(() => this.removeBackdrop(), duration);\n  }\n  // tslint:disable-next-line:no-any\n  _showModal(content: any): BsModalRef {\n    const modalLoader = this.loaders[this.loaders.length - 1];\n    const bsModalRef = new BsModalRef();\n    const modalContainerRef = modalLoader\n      .provide({ provide: ModalOptions, useValue: this.config })\n      .provide({ provide: BsModalRef, useValue: bsModalRef })\n      .attach(ModalContainerComponent)\n      .to('body')\n      .show({content, isAnimated: this.config.animated, initialState: this.config.initialState, bsModalService: this});\n    modalContainerRef.instance.level = this.getModalsCount();\n    bsModalRef.hide = () => {\n      modalContainerRef.instance.hide();\n    };\n    bsModalRef.content = modalLoader.getInnerComponent() || null;\n    bsModalRef.setClass = (newClass: string) => {\n      modalContainerRef.instance.config.class = newClass;\n    };\n\n    return bsModalRef;\n  }\n\n  _hideModal(level: number): void {\n    const modalLoader = this.loaders[level - 1];\n    if (modalLoader) {\n      modalLoader.hide();\n    }\n  }\n\n  getModalsCount(): number {\n    return this.modalsCount;\n  }\n\n  setDismissReason(reason: string) {\n    this.lastDismissReason = reason;\n  }\n\n  removeBackdrop(): void {\n    this._backdropLoader.hide();\n    this.backdropRef = null;\n  }\n\n  /** AFTER PR MERGE MODAL.COMPONENT WILL BE USING THIS CODE */\n  /** Scroll bar tricks */\n  /** @internal */\n  checkScrollbar(): void {\n    this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;\n    this.scrollbarWidth = this.getScrollbarWidth();\n  }\n\n  setScrollbar(): void {\n    if (!document) {\n      return;\n    }\n\n    this.originalBodyPadding = parseInt(\n      window\n        .getComputedStyle(document.body)\n        .getPropertyValue('padding-right') || '0',\n      10\n    );\n\n    if (this.isBodyOverflowing) {\n      document.body.style.paddingRight = `${this.originalBodyPadding +\n        this.scrollbarWidth}px`;\n    }\n  }\n\n  private resetScrollbar(): void {\n    document.body.style.paddingRight = `${this.originalBodyPadding}px`;\n  }\n\n  // thx d.walsh\n  private getScrollbarWidth(): number {\n    const scrollDiv = this._renderer.createElement('div');\n    this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\n    this._renderer.appendChild(document.body, scrollDiv);\n    const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n    this._renderer.removeChild(document.body, scrollDiv);\n\n    return scrollbarWidth;\n  }\n\n  private _createLoaders(): void {\n    const loader = this.clf.createLoader<ModalContainerComponent>(\n      null,\n      null,\n      null\n    );\n    this.copyEvent(loader.onBeforeShow, this.onShow);\n    this.copyEvent(loader.onShown, this.onShown);\n    this.copyEvent(loader.onBeforeHide, this.onHide);\n    this.copyEvent(loader.onHidden, this.onHidden);\n    this.loaders.push(loader);\n  }\n\n  private removeLoaders(level: number): void {\n    this.loaders.splice(level - 1, 1);\n    this.loaders.forEach(\n      (loader: ComponentLoader<ModalContainerComponent>, i: number) => {\n        loader.instance.level = i + 1;\n      }\n    );\n  }\n\n  // tslint:disable-next-line:no-any\n  private copyEvent(from: EventEmitter<any>, to: EventEmitter<any>) {\n    from.subscribe(() => {\n      to.emit(this.lastDismissReason);\n    });\n  }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { ModalBackdropComponent } from './modal-backdrop.component';\nimport { ModalDirective } from './modal.directive';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { ModalContainerComponent } from './modal-container.component';\nimport { BsModalService } from './bs-modal.service';\n\n@NgModule({\n  declarations: [\n    ModalBackdropComponent,\n    ModalDirective,\n    ModalContainerComponent\n  ],\n  exports: [ModalBackdropComponent, ModalDirective],\n  entryComponents: [ModalBackdropComponent, ModalContainerComponent]\n})\nexport class ModalModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: ModalModule,\n      providers: [BsModalService, ComponentLoaderFactory, PositioningService]\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/** Default dropdown configuration */\n@Injectable()\nexport class BsDropdownConfig {\n  /** default dropdown auto closing behavior */\n  autoClose = true;\n  /** default dropdown auto closing behavior */\n  insideClick = false;\n}\n","import { EventEmitter, Injectable } from '@angular/core';\nimport { BsComponentRef } from 'ngx-bootstrap/component-loader';\n\n@Injectable()\nexport class BsDropdownState {\n  direction: 'down' | 'up' = 'down';\n  autoClose: boolean;\n  insideClick: boolean;\n  isOpenChange = new EventEmitter<boolean>();\n  isDisabledChange = new EventEmitter<boolean>();\n  toggleClick = new EventEmitter<boolean>();\n\n  /**\n   * Content to be displayed as popover.\n   */\n  // tslint:disable:no-any\n  dropdownMenu: Promise<BsComponentRef<any>>;\n  resolveDropdownMenu: (componentRef: BsComponentRef<any>) => void;\n\n  constructor() {\n    this.dropdownMenu = new Promise(resolve => {\n      this.resolveDropdownMenu = resolve;\n    });\n  }\n}\n","import {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  OnDestroy,\n  Renderer2\n} from '@angular/core';\nimport { BsDropdownState } from './bs-dropdown.state';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n@Component({\n  selector: 'bs-dropdown-container',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    style: 'display:block;position: absolute;'\n  },\n  template: `\n    <div [class.dropup]=\"direction === 'up'\"\n         [class.dropdown]=\"direction === 'down'\"\n         [class.show]=\"isOpen\"\n         [class.open]=\"isOpen\"><ng-content></ng-content></div>\n  `\n})\nexport class BsDropdownContainerComponent implements OnDestroy {\n  isOpen = false;\n\n  get direction(): 'down' | 'up' {\n    return this._state.direction;\n  }\n\n// tslint:disable-next-line:no-any\n  private _subscription: any;\n\n  constructor(\n    private _state: BsDropdownState,\n    private cd: ChangeDetectorRef,\n    private _renderer: Renderer2,\n    private _element: ElementRef\n  ) {\n    this._subscription = _state.isOpenChange.subscribe((value: boolean) => {\n      this.isOpen = value;\n      const dropdown = this._element.nativeElement.querySelector('.dropdown-menu');\n      if (dropdown && !isBs3()) {\n        this._renderer.addClass(dropdown, 'show');\n        if (dropdown.classList.contains('dropdown-menu-right')) {\n          this._renderer.setStyle(dropdown, 'left', 'auto');\n          this._renderer.setStyle(dropdown, 'right', '0');\n        }\n        if (this.direction === 'up') {\n          this._renderer.setStyle(dropdown, 'top', 'auto');\n          this._renderer.setStyle(\n            dropdown,\n            'transform',\n            'translateY(-101%)'\n          );\n        }\n      }\n      this.cd.markForCheck();\n      this.cd.detectChanges();\n    });\n  }\n\n  /** @internal */\n  _contains(el: Element): boolean {\n    return this._element.nativeElement.contains(el);\n  }\n\n  ngOnDestroy(): void {\n    this._subscription.unsubscribe();\n  }\n}\n","// tslint:disable:max-file-line-count\nimport {\n  Directive,\n  ElementRef,\n  EmbeddedViewRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Renderer2,\n  ViewContainerRef\n} from '@angular/core';\nimport { filter } from 'rxjs/operators';\nimport { Subscription } from 'rxjs';\nimport { ComponentLoader, ComponentLoaderFactory, BsComponentRef } from 'ngx-bootstrap/component-loader';\n\nimport { BsDropdownConfig } from './bs-dropdown.config';\nimport { BsDropdownContainerComponent } from './bs-dropdown-container.component';\nimport { BsDropdownState } from './bs-dropdown.state';\nimport { BsDropdownMenuDirective } from './index';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n@Directive({\n  selector: '[bsDropdown],[dropdown]',\n  exportAs: 'bs-dropdown',\n  providers: [BsDropdownState],\n  host: {\n    '[class.dropup]': 'dropup',\n    '[class.open]': 'isOpen',\n    '[class.show]': 'isOpen && isBs4'\n  }\n})\nexport class BsDropdownDirective implements OnInit, OnDestroy {\n  /**\n   * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  @Input() placement: string;\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  @Input() triggers: string;\n  /**\n   * A selector specifying the element the popover should be appended to.\n   */\n  @Input() container: string;\n\n  /**\n   * This attribute indicates that the dropdown should be opened upwards\n   */\n  @Input() dropup: boolean;\n\n  /**\n   * Indicates that dropdown will be closed on item or document click,\n   * and after pressing ESC\n   */\n  @Input()\n  set autoClose(value: boolean) {\n    this._state.autoClose = value;\n  }\n\n  get autoClose(): boolean {\n    return this._state.autoClose;\n  }\n\n  /**\n   * This attribute indicates that the dropdown shouldn't close on inside click when autoClose is set to true\n   */\n  @Input()\n  set insideClick(value: boolean) {\n    this._state.insideClick = value;\n  }\n\n  get insideClick(): boolean {\n    return this._state.insideClick;\n  }\n\n  /**\n   * Disables dropdown toggle and hides dropdown menu if opened\n   */\n  @Input()\n  set isDisabled(value: boolean) {\n    this._isDisabled = value;\n    this._state.isDisabledChange.emit(value);\n    if (value) {\n      this.hide();\n    }\n  }\n\n  get isDisabled(): boolean {\n    return this._isDisabled;\n  }\n\n  /**\n   * Returns whether or not the popover is currently being shown\n   */\n  @Input()\n  get isOpen(): boolean {\n    if (this._showInline) {\n      return this._isInlineOpen;\n    }\n\n    return this._dropdown.isShown;\n  }\n\n  set isOpen(value: boolean) {\n    if (value) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Emits an event when isOpen change\n   */\n  @Output() isOpenChange: EventEmitter<boolean>;\n\n  /**\n   * Emits an event when the popover is shown\n   */\n  @Output() onShown: EventEmitter<boolean>;\n\n  /**\n   * Emits an event when the popover is hidden\n   */\n  @Output() onHidden: EventEmitter<boolean>;\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  private _dropdown: ComponentLoader<BsDropdownContainerComponent>;\n\n  private get _showInline(): boolean {\n    return !this.container;\n  }\n\n  // todo: move to component loader\n  private _isInlineOpen = false;\n\n  private _inlinedMenu: EmbeddedViewRef<BsDropdownMenuDirective>;\n  private _isDisabled: boolean;\n  private _subscriptions: Subscription[] = [];\n  private _isInited = false;\n\n  constructor(private _elementRef: ElementRef,\n              private _renderer: Renderer2,\n              private _viewContainerRef: ViewContainerRef,\n              private _cis: ComponentLoaderFactory,\n              private _config: BsDropdownConfig,\n              private _state: BsDropdownState) {\n    // set initial dropdown state from config\n    this._state.autoClose = this._config.autoClose;\n    this._state.insideClick = this._config.insideClick;\n\n    // create dropdown component loader\n    this._dropdown = this._cis\n      .createLoader<BsDropdownContainerComponent>(\n        this._elementRef,\n        this._viewContainerRef,\n        this._renderer\n      )\n      .provide({provide: BsDropdownState, useValue: this._state});\n\n    this.onShown = this._dropdown.onShown;\n    this.onHidden = this._dropdown.onHidden;\n    this.isOpenChange = this._state.isOpenChange;\n\n  }\n\n  ngOnInit(): void {\n    // fix: seems there are an issue with `routerLinkActive`\n    // which result in duplicated call ngOnInit without call to ngOnDestroy\n    // read more: https://github.com/valor-software/ngx-bootstrap/issues/1885\n    if (this._isInited) {\n      return;\n    }\n    this._isInited = true;\n\n    // attach DOM listeners\n    this._dropdown.listen({\n      // because of dropdown inline mode\n      outsideClick: false,\n      triggers: this.triggers,\n      show: () => this.show()\n    });\n\n    // toggle visibility on toggle element click\n    this._subscriptions.push(\n      this._state.toggleClick.subscribe((value: boolean) => this.toggle(value))\n    );\n\n    // hide dropdown if set disabled while opened\n    this._subscriptions.push(\n      this._state.isDisabledChange\n        .pipe(\n          filter((value: boolean) => value)\n        )\n        .subscribe((value: boolean) => this.hide())\n    );\n  }\n\n  /**\n   * Opens an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover.\n   */\n  show(): void {\n    if (this.isOpen || this.isDisabled) {\n      return;\n    }\n\n    if (this._showInline) {\n      if (!this._inlinedMenu) {\n        this._state.dropdownMenu.then(\n          (dropdownMenu: BsComponentRef<BsDropdownMenuDirective>) => {\n            this._dropdown.attachInline(\n              dropdownMenu.viewContainer,\n              dropdownMenu.templateRef\n            );\n            this._inlinedMenu = this._dropdown._inlineViewRef;\n            this.addBs4Polyfills();\n          }\n        )\n        // swallow errors\n          .catch();\n      }\n      this.addBs4Polyfills();\n      this._isInlineOpen = true;\n      this.onShown.emit(true);\n      this._state.isOpenChange.emit(true);\n\n      return;\n    }\n    this._state.dropdownMenu.then(dropdownMenu => {\n      // check direction in which dropdown should be opened\n      const _dropup =\n        this.dropup ||\n        (typeof this.dropup !== 'undefined' && this.dropup);\n      this._state.direction = _dropup ? 'up' : 'down';\n      const _placement =\n        this.placement || (_dropup ? 'top start' : 'bottom start');\n\n      // show dropdown\n      this._dropdown\n        .attach(BsDropdownContainerComponent)\n        .to(this.container)\n        .position({attachment: _placement})\n        .show({\n          content: dropdownMenu.templateRef,\n          placement: _placement\n        });\n\n      this._state.isOpenChange.emit(true);\n    })\n    // swallow error\n      .catch();\n  }\n\n  /**\n   * Closes an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover.\n   */\n  hide(): void {\n    if (!this.isOpen) {\n      return;\n    }\n\n    if (this._showInline) {\n      this.removeShowClass();\n      this.removeDropupStyles();\n      this._isInlineOpen = false;\n      this.onHidden.emit(true);\n    } else {\n      this._dropdown.hide();\n    }\n\n    this._state.isOpenChange.emit(false);\n  }\n\n  /**\n   * Toggles an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover. With parameter <code>true</code> allows toggling, with parameter <code>false</code>\n   * only hides opened dropdown. Parameter usage will be removed in ngx-bootstrap v3\n   */\n  toggle(value?: boolean): void {\n    if (this.isOpen || !value) {\n      return this.hide();\n    }\n\n    return this.show();\n  }\n\n  /** @internal */\n  _contains(event: any): boolean {\n    return this._elementRef.nativeElement.contains(event.target) ||\n      (this._dropdown.instance && this._dropdown.instance._contains(event.target));\n  }\n\n  ngOnDestroy(): void {\n    // clean up subscriptions and destroy dropdown\n    for (const sub of this._subscriptions) {\n      sub.unsubscribe();\n    }\n    this._dropdown.dispose();\n  }\n\n  private addBs4Polyfills(): void {\n    if (!isBs3()) {\n      this.addShowClass();\n      this.checkRightAlignment();\n      this.addDropupStyles();\n    }\n  }\n\n  private addShowClass(): void {\n    if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\n      this._renderer.addClass(this._inlinedMenu.rootNodes[0], 'show');\n    }\n  }\n\n  private removeShowClass(): void {\n    if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\n      this._renderer.removeClass(this._inlinedMenu.rootNodes[0], 'show');\n    }\n  }\n\n  private checkRightAlignment(): void {\n    if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\n      const isRightAligned = this._inlinedMenu.rootNodes[0].classList.contains(\n        'dropdown-menu-right'\n      );\n      this._renderer.setStyle(\n        this._inlinedMenu.rootNodes[0],\n        'left',\n        isRightAligned ? 'auto' : '0'\n      );\n      this._renderer.setStyle(\n        this._inlinedMenu.rootNodes[0],\n        'right',\n        isRightAligned ? '0' : 'auto'\n      );\n    }\n  }\n\n  private addDropupStyles(): void {\n    if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\n      // a little hack to not break support of bootstrap 4 beta\n      this._renderer.setStyle(\n        this._inlinedMenu.rootNodes[0],\n        'top',\n        this.dropup ? 'auto' : '100%'\n      );\n      this._renderer.setStyle(\n        this._inlinedMenu.rootNodes[0],\n        'transform',\n        this.dropup ? 'translateY(-101%)' : 'translateY(0)'\n      );\n      this._renderer.setStyle(\n        this._inlinedMenu.rootNodes[0],\n        'bottom',\n        'auto'\n      );\n    }\n  }\n\n  private removeDropupStyles(): void {\n    if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) {\n      this._renderer.removeStyle(this._inlinedMenu.rootNodes[0], 'top');\n      this._renderer.removeStyle(this._inlinedMenu.rootNodes[0], 'transform');\n      this._renderer.removeStyle(this._inlinedMenu.rootNodes[0], 'bottom');\n    }\n  }\n}\n","import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { BsDropdownState } from './bs-dropdown.state';\n\n@Directive({\n  selector: '[bsDropdownMenu],[dropdownMenu]',\n  exportAs: 'bs-dropdown-menu'\n})\nexport class BsDropdownMenuDirective {\n  // tslint:disable:no-any\n  constructor(\n    _state: BsDropdownState,\n    _viewContainer: ViewContainerRef,\n    _templateRef: TemplateRef<any>\n  ) {\n    _state.resolveDropdownMenu({\n      templateRef: _templateRef,\n      viewContainer: _viewContainer\n    });\n  }\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  OnDestroy,\n  Renderer2\n} from '@angular/core';\n\nimport { Subscription } from 'rxjs';\nimport { BsDropdownState } from './bs-dropdown.state';\nimport { BsDropdownDirective } from './bs-dropdown.directive';\n\n@Directive({\n  selector: '[bsDropdownToggle],[dropdownToggle]',\n  exportAs: 'bs-dropdown-toggle',\n  host: {\n    '[attr.aria-haspopup]': 'true'\n  }\n})\nexport class BsDropdownToggleDirective implements OnDestroy {\n  @HostBinding('attr.disabled') isDisabled: boolean = null;\n  @HostBinding('attr.aria-expanded') isOpen: boolean;\n\n  private _subscriptions: Subscription[] = [];\n  private _documentClickListener: Function;\n  private _escKeyUpListener: Function;\n\n  constructor(\n    private _changeDetectorRef: ChangeDetectorRef,\n    private _dropdown: BsDropdownDirective,\n    private _element: ElementRef,\n    private _renderer: Renderer2,\n    private _state: BsDropdownState\n  ) {\n    // sync is open value with state\n    this._subscriptions.push(\n      this._state.isOpenChange.subscribe(\n        (value: boolean) => {\n          this.isOpen = value;\n\n          if (value) {\n            this._documentClickListener = this._renderer.listen('document', 'click', (event: any) => {\n              if (this._state.autoClose && event.button !== 2 &&\n                !this._element.nativeElement.contains(event.target) &&\n                !(this._state.insideClick && this._dropdown._contains(event))\n              ) {\n                this._state.toggleClick.emit(false);\n                this._changeDetectorRef.detectChanges();\n              }\n            });\n\n            this._escKeyUpListener = this._renderer.listen(this._element.nativeElement, 'keyup.esc', () => {\n              if (this._state.autoClose) {\n                this._state.toggleClick.emit(false);\n                this._changeDetectorRef.detectChanges();\n              }\n            });\n          } else {\n            this._documentClickListener();\n            this._escKeyUpListener();\n          }\n        }\n      )\n    );\n\n    // populate disabled state\n    this._subscriptions.push(\n      this._state.isDisabledChange.subscribe(\n        (value: boolean) => (this.isDisabled = value || null)\n      )\n    );\n  }\n\n  @HostListener('click', [])\n  onClick(): void {\n    if (this.isDisabled) {\n      return;\n    }\n    this._state.toggleClick.emit(true);\n  }\n\n  ngOnDestroy(): void {\n    if (this._documentClickListener) {\n      this._documentClickListener();\n    }\n\n    if (this._escKeyUpListener) {\n      this._escKeyUpListener();\n    }\n\n    for (const sub of this._subscriptions) {\n      sub.unsubscribe();\n    }\n  }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\n\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { BsDropdownContainerComponent } from './bs-dropdown-container.component';\nimport { BsDropdownMenuDirective } from './bs-dropdown-menu.directive';\nimport { BsDropdownToggleDirective } from './bs-dropdown-toggle.directive';\nimport { BsDropdownConfig } from './bs-dropdown.config';\n\nimport { BsDropdownDirective } from './bs-dropdown.directive';\nimport { BsDropdownState } from './bs-dropdown.state';\n\n@NgModule({\n  declarations: [\n    BsDropdownMenuDirective,\n    BsDropdownToggleDirective,\n    BsDropdownContainerComponent,\n    BsDropdownDirective\n  ],\n  exports: [\n    BsDropdownMenuDirective,\n    BsDropdownToggleDirective,\n    BsDropdownDirective\n  ],\n  entryComponents: [BsDropdownContainerComponent]\n})\nexport class BsDropdownModule {\n  // tslint:disable-next-line:no-any\n  static forRoot(config?: any): ModuleWithProviders {\n    return {\n      ngModule: BsDropdownModule,\n      providers: [\n        ComponentLoaderFactory,\n        PositioningService,\n        BsDropdownState,\n        {\n          provide: BsDropdownConfig,\n          useValue: config ? config : { autoClose: true, insideClick: false }\n        }\n      ]\n    };\n  }\n}\n","// todo: split\nimport { Injectable } from '@angular/core';\n\nimport { ConfigModel, PagerModel } from './models';\n\n/** Provides default values for Pagination and pager components */\n@Injectable()\nexport class PaginationConfig {\n  main: ConfigModel = {\n    maxSize: void 0,\n    itemsPerPage: 10,\n    boundaryLinks: false,\n    directionLinks: true,\n    firstText: 'First',\n    previousText: 'Previous',\n    nextText: 'Next',\n    lastText: 'Last',\n    pageBtnClass: '',\n    rotate: true\n  };\n  pager: PagerModel = {\n    itemsPerPage: 15,\n    previousText: 'Â« Previous',\n    nextText: 'Next Â»',\n    pageBtnClass: '',\n    align: true\n  };\n}\n","import {\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Input,\n  OnInit,\n  Output,\n  Provider\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { PageChangedEvent } from './pagination.component';\nimport { PaginationConfig } from './pagination.config';\n\nimport { ConfigModel, PagesModel } from './models';\n\nexport const PAGER_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => PagerComponent),\n  multi: true\n};\n\n@Component({\n  selector: 'pager',\n  templateUrl: './pager.component.html',\n  providers: [PAGER_CONTROL_VALUE_ACCESSOR]\n})\nexport class PagerComponent implements ControlValueAccessor, OnInit {\n  config: ConfigModel;\n  /** if `true` aligns each link to the sides of pager */\n  @Input() align: boolean;\n  /** limit number for page links in pager */\n  @Input() maxSize: number;\n  /** if false first and last buttons will be hidden */\n  @Input() boundaryLinks: boolean;\n  /** if false previous and next buttons will be hidden */\n  @Input() directionLinks: boolean;\n  // labels\n  /** first button text */\n  @Input() firstText: string;\n  /** previous button text */\n  @Input() previousText: string;\n  /** next button text */\n  @Input() nextText: string;\n  /** last button text */\n  @Input() lastText: string;\n  /** if true current page will in the middle of pages list */\n  @Input() rotate: boolean;\n  // css\n  /** add class to <code><li\\></code> */\n  @Input() pageBtnClass: string;\n\n  /** if true pagination component will be disabled */\n  @Input() disabled: boolean;\n\n  /** fired when total pages count changes, $event:number equals to total pages count */\n  @Output() numPages: EventEmitter<number> = new EventEmitter<number>();\n  /** fired when page was changed, $event:{page, itemsPerPage} equals to\n   * object with current page index and number of items per page\n   */\n  @Output()\n  pageChanged: EventEmitter<PageChangedEvent> = new EventEmitter<PageChangedEvent>();\n\n  /** maximum number of items per page. If value less than 1 will display all items on one page */\n  @Input()\n  get itemsPerPage(): number {\n    return this._itemsPerPage;\n  }\n\n  set itemsPerPage(v: number) {\n    this._itemsPerPage = v;\n    this.totalPages = this.calculateTotalPages();\n  }\n\n  /** total number of items in all pages */\n  @Input()\n  get totalItems(): number {\n    return this._totalItems;\n  }\n\n  set totalItems(v: number) {\n    this._totalItems = v;\n    this.totalPages = this.calculateTotalPages();\n  }\n\n  get totalPages(): number {\n    return this._totalPages;\n  }\n\n  set totalPages(v: number) {\n    this._totalPages = v;\n    this.numPages.emit(v);\n    if (this.inited) {\n      this.selectPage(this.page);\n    }\n  }\n\n  set page(value: number) {\n    const _previous = this._page;\n    this._page = value > this.totalPages ? this.totalPages : value || 1;\n    this.changeDetection.markForCheck();\n\n    if (_previous === this._page || typeof _previous === 'undefined') {\n      return;\n    }\n\n    this.pageChanged.emit({\n      page: this._page,\n      itemsPerPage: this.itemsPerPage\n    });\n  }\n\n  get page(): number {\n    return this._page;\n  }\n\n  onChange = Function.prototype;\n  onTouched = Function.prototype;\n\n  classMap: string;\n  pages: PagesModel[];\n\n  protected _itemsPerPage: number;\n  protected _totalItems: number;\n  protected _totalPages: number;\n  protected inited = false;\n  protected _page = 1;\n\n  constructor(private elementRef: ElementRef,\n              paginationConfig: PaginationConfig,\n              private changeDetection: ChangeDetectorRef) {\n    this.elementRef = elementRef;\n    if (!this.config) {\n      this.configureOptions(\n        Object.assign({}, paginationConfig.main, paginationConfig.pager)\n      );\n    }\n  }\n\n  configureOptions(config: ConfigModel): void {\n    this.config = Object.assign({}, config);\n  }\n\n  ngOnInit(): void {\n    if (typeof window !== 'undefined') {\n      this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';\n    }\n    // watch for maxSize\n    this.maxSize =\n      typeof this.maxSize !== 'undefined' ? this.maxSize : this.config.maxSize;\n    this.rotate =\n      typeof this.rotate !== 'undefined' ? this.rotate : this.config.rotate;\n    this.boundaryLinks =\n      typeof this.boundaryLinks !== 'undefined'\n        ? this.boundaryLinks\n        : this.config.boundaryLinks;\n    this.directionLinks =\n      typeof this.directionLinks !== 'undefined'\n        ? this.directionLinks\n        : this.config.directionLinks;\n    this.pageBtnClass =\n      typeof this.pageBtnClass !== 'undefined'\n        ? this.pageBtnClass\n        : this.config.pageBtnClass;\n\n    // base class\n    this.itemsPerPage =\n      typeof this.itemsPerPage !== 'undefined'\n        ? this.itemsPerPage\n        : this.config.itemsPerPage;\n    this.totalPages = this.calculateTotalPages();\n    // this class\n    this.pages = this.getPages(this.page, this.totalPages);\n    this.inited = true;\n  }\n\n  writeValue(value: number): void {\n    this.page = value;\n    this.pages = this.getPages(this.page, this.totalPages);\n  }\n\n  getText(key: string): string {\n    // tslint:disable-next-line:no-any\n    return (this as any)[`${key}Text`] || (this as any).config[`${key}Text`];\n  }\n\n  noPrevious(): boolean {\n    return this.page === 1;\n  }\n\n  noNext(): boolean {\n    return this.page === this.totalPages;\n  }\n\n  registerOnChange(fn: () => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  selectPage(page: number, event?: Event): void {\n    if (event) {\n      event.preventDefault();\n    }\n\n    if (!this.disabled) {\n      if (event && event.target) {\n        // tslint:disable-next-line:no-any\n        const target: any = event.target;\n        target.blur();\n      }\n      this.writeValue(page);\n      this.onChange(this.page);\n    }\n  }\n\n  // Create page object used in template\n  protected makePage(num: number,\n                     text: string,\n                     active: boolean): { number: number; text: string; active: boolean } {\n    return {text, number: num, active};\n  }\n\n  protected getPages(currentPage: number, totalPages: number): PagesModel[] {\n    const pages: PagesModel[] = [];\n\n    // Default page limits\n    let startPage = 1;\n    let endPage = totalPages;\n    const isMaxSized =\n      typeof this.maxSize !== 'undefined' && this.maxSize < totalPages;\n\n    // recompute if maxSize\n    if (isMaxSized) {\n      if (this.rotate) {\n        // Current page is displayed in the middle of the visible ones\n        startPage = Math.max(currentPage - Math.floor(this.maxSize / 2), 1);\n        endPage = startPage + this.maxSize - 1;\n\n        // Adjust if limit is exceeded\n        if (endPage > totalPages) {\n          endPage = totalPages;\n          startPage = endPage - this.maxSize + 1;\n        }\n      } else {\n        // Visible pages are paginated with maxSize\n        startPage =\n          (Math.ceil(currentPage / this.maxSize) - 1) * this.maxSize + 1;\n\n        // Adjust last page if limit is exceeded\n        endPage = Math.min(startPage + this.maxSize - 1, totalPages);\n      }\n    }\n\n    // Add page number links\n    for (let num = startPage; num <= endPage; num++) {\n      const page = this.makePage(num, num.toString(), num === currentPage);\n      pages.push(page);\n    }\n\n    // Add links to move between page sets\n    if (isMaxSized && !this.rotate) {\n      if (startPage > 1) {\n        const previousPageSet = this.makePage(startPage - 1, '...', false);\n        pages.unshift(previousPageSet);\n      }\n\n      if (endPage < totalPages) {\n        const nextPageSet = this.makePage(endPage + 1, '...', false);\n        pages.push(nextPageSet);\n      }\n    }\n\n    return pages;\n  }\n\n  // base class\n  protected calculateTotalPages(): number {\n    const totalPages =\n      this.itemsPerPage < 1\n        ? 1\n        : Math.ceil(this.totalItems / this.itemsPerPage);\n\n    return Math.max(totalPages || 0, 1);\n  }\n}\n","import {\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Input,\n  OnInit,\n  Output,\n  Provider\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { PaginationConfig } from './pagination.config';\n\nimport { ConfigModel, PagesModel } from './models';\n\nexport interface PageChangedEvent {\n  itemsPerPage: number;\n  page: number;\n}\n\nexport const PAGINATION_CONTROL_VALUE_ACCESSOR: Provider = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => PaginationComponent),\n  multi: true\n};\n\n@Component({\n  selector: 'pagination',\n  templateUrl: './pagination.component.html',\n  providers: [PAGINATION_CONTROL_VALUE_ACCESSOR]\n})\nexport class PaginationComponent implements ControlValueAccessor, OnInit {\n  config: ConfigModel;\n  /** if `true` aligns each link to the sides of pager */\n  @Input() align: boolean;\n  /** limit number for page links in pager */\n  @Input() maxSize: number;\n  /** if false first and last buttons will be hidden */\n  @Input() boundaryLinks: boolean;\n  /** if false previous and next buttons will be hidden */\n  @Input() directionLinks: boolean;\n  // labels\n  /** first button text */\n  @Input() firstText: string;\n  /** previous button text */\n  @Input() previousText: string;\n  /** next button text */\n  @Input() nextText: string;\n  /** last button text */\n  @Input() lastText: string;\n  /** if true current page will in the middle of pages list */\n  @Input() rotate: boolean;\n  // css\n  /** add class to <code><li\\></code> */\n  @Input() pageBtnClass: string;\n\n  /** if true pagination component will be disabled */\n  @Input() disabled: boolean;\n\n  /** fired when total pages count changes, $event:number equals to total pages count */\n  @Output() numPages: EventEmitter<number> = new EventEmitter<number>();\n  /** fired when page was changed, $event:{page, itemsPerPage} equals to object\n   * with current page index and number of items per page\n   */\n  @Output()\n  pageChanged = new EventEmitter<PageChangedEvent>();\n\n  /** maximum number of items per page. If value less than 1 will display all items on one page */\n  @Input()\n  get itemsPerPage(): number {\n    return this._itemsPerPage;\n  }\n\n  set itemsPerPage(v: number) {\n    this._itemsPerPage = v;\n    this.totalPages = this.calculateTotalPages();\n  }\n\n  /** total number of items in all pages */\n  @Input()\n  get totalItems(): number {\n    return this._totalItems;\n  }\n\n  set totalItems(v: number) {\n    this._totalItems = v;\n    this.totalPages = this.calculateTotalPages();\n  }\n\n  get totalPages(): number {\n    return this._totalPages;\n  }\n\n  set totalPages(v: number) {\n    this._totalPages = v;\n    this.numPages.emit(v);\n    if (this.inited) {\n      this.selectPage(this.page);\n    }\n  }\n\n  set page(value: number) {\n    const _previous = this._page;\n    this._page = value > this.totalPages ? this.totalPages : value || 1;\n    this.changeDetection.markForCheck();\n\n    if (_previous === this._page || typeof _previous === 'undefined') {\n      return;\n    }\n\n    this.pageChanged.emit({\n      page: this._page,\n      itemsPerPage: this.itemsPerPage\n    });\n  }\n\n  get page(): number {\n    return this._page;\n  }\n\n  onChange = Function.prototype;\n  onTouched = Function.prototype;\n\n  classMap: string;\n  pages: PagesModel[];\n\n  protected _itemsPerPage: number;\n  protected _totalItems: number;\n  protected _totalPages: number;\n  protected inited = false;\n  protected _page = 1;\n\n  constructor(\n    private elementRef: ElementRef,\n    paginationConfig: PaginationConfig,\n    private changeDetection: ChangeDetectorRef\n  ) {\n    this.elementRef = elementRef;\n    if (!this.config) {\n      this.configureOptions(paginationConfig.main);\n    }\n  }\n\n  configureOptions(config: ConfigModel): void {\n    this.config = Object.assign({}, config);\n  }\n\n  ngOnInit(): void {\n    if (typeof window !== 'undefined') {\n      this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';\n    }\n    // watch for maxSize\n    this.maxSize =\n      typeof this.maxSize !== 'undefined' ? this.maxSize : this.config.maxSize;\n    this.rotate =\n      typeof this.rotate !== 'undefined' ? this.rotate : this.config.rotate;\n    this.boundaryLinks =\n      typeof this.boundaryLinks !== 'undefined'\n        ? this.boundaryLinks\n        : this.config.boundaryLinks;\n    this.directionLinks =\n      typeof this.directionLinks !== 'undefined'\n        ? this.directionLinks\n        : this.config.directionLinks;\n    this.pageBtnClass =\n      typeof this.pageBtnClass !== 'undefined'\n        ? this.pageBtnClass\n        : this.config.pageBtnClass;\n\n    // base class\n    this.itemsPerPage =\n      typeof this.itemsPerPage !== 'undefined'\n        ? this.itemsPerPage\n        : this.config.itemsPerPage;\n    this.totalPages = this.calculateTotalPages();\n    // this class\n    this.pages = this.getPages(this.page, this.totalPages);\n    this.inited = true;\n  }\n\n  writeValue(value: number): void {\n    this.page = value;\n    this.pages = this.getPages(this.page, this.totalPages);\n  }\n\n  getText(key: string): string {\n    // tslint:disable-next-line:no-any\n    return (this as any)[`${key}Text`] || (this as any).config[`${key}Text`];\n  }\n\n  noPrevious(): boolean {\n    return this.page === 1;\n  }\n\n  noNext(): boolean {\n    return this.page === this.totalPages;\n  }\n\n  registerOnChange(fn: () => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  selectPage(page: number, event?: Event): void {\n    if (event) {\n      event.preventDefault();\n    }\n\n    if (!this.disabled) {\n      if (event && event.target) {\n        // tslint:disable-next-line:no-any\n        const target: any = event.target;\n        target.blur();\n      }\n      this.writeValue(page);\n      this.onChange(this.page);\n    }\n  }\n\n  // Create page object used in template\n  protected makePage(\n    num: number,\n    text: string,\n    active: boolean\n  ): { number: number; text: string; active: boolean } {\n    return { text, number: num, active };\n  }\n\n  protected getPages(currentPage: number, totalPages: number): PagesModel[] {\n    const pages: PagesModel[] = [];\n\n    // Default page limits\n    let startPage = 1;\n    let endPage = totalPages;\n    const isMaxSized =\n      typeof this.maxSize !== 'undefined' && this.maxSize < totalPages;\n\n    // recompute if maxSize\n    if (isMaxSized) {\n      if (this.rotate) {\n        // Current page is displayed in the middle of the visible ones\n        startPage = Math.max(currentPage - Math.floor(this.maxSize / 2), 1);\n        endPage = startPage + this.maxSize - 1;\n\n        // Adjust if limit is exceeded\n        if (endPage > totalPages) {\n          endPage = totalPages;\n          startPage = endPage - this.maxSize + 1;\n        }\n      } else {\n        // Visible pages are paginated with maxSize\n        startPage =\n          (Math.ceil(currentPage / this.maxSize) - 1) * this.maxSize + 1;\n\n        // Adjust last page if limit is exceeded\n        endPage = Math.min(startPage + this.maxSize - 1, totalPages);\n      }\n    }\n\n    // Add page number links\n    for (let num = startPage; num <= endPage; num++) {\n      const page = this.makePage(num, num.toString(), num === currentPage);\n      pages.push(page);\n    }\n\n    // Add links to move between page sets\n    if (isMaxSized && !this.rotate) {\n      if (startPage > 1) {\n        const previousPageSet = this.makePage(startPage - 1, '...', false);\n        pages.unshift(previousPageSet);\n      }\n\n      if (endPage < totalPages) {\n        const nextPageSet = this.makePage(endPage + 1, '...', false);\n        pages.push(nextPageSet);\n      }\n    }\n\n    return pages;\n  }\n\n  // base class\n  protected calculateTotalPages(): number {\n    const totalPages =\n      this.itemsPerPage < 1\n        ? 1\n        : Math.ceil(this.totalItems / this.itemsPerPage);\n\n    return Math.max(totalPages || 0, 1);\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { PaginationConfig } from './pagination.config';\n\nimport { PagerComponent } from './pager.component';\nimport { PaginationComponent } from './pagination.component';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [PagerComponent, PaginationComponent],\n  exports: [PagerComponent, PaginationComponent]\n})\nexport class PaginationModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: PaginationModule, providers: [PaginationConfig] };\n  }\n}\n","import {\n  Component,\n  EventEmitter,\n  HostListener,\n  Input,\n  OnInit,\n  Output,\n  forwardRef, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { AccessorContent, RatingResults } from './models';\n\nexport const RATING_CONTROL_VALUE_ACCESSOR: AccessorContent = {\n  provide: NG_VALUE_ACCESSOR,\n  /* tslint:disable-next-line: no-use-before-declare */\n  useExisting: forwardRef(() => RatingComponent),\n  multi: true\n};\n\n@Component({\n  selector: 'rating',\n  templateUrl: './rating.component.html',\n  providers: [RATING_CONTROL_VALUE_ACCESSOR],\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RatingComponent implements ControlValueAccessor, OnInit {\n  /** number of icons */\n  @Input() max = 5;\n  /** if true will not react on any user events */\n  @Input() readonly: boolean;\n  /** array of icons titles, default: ([\"one\", \"two\", \"three\", \"four\", \"five\"]) */\n  @Input() titles: string[];\n  /** custom template for icons */\n  // tslint:disable-next-line:no-any\n  @Input() customTemplate: TemplateRef<any>;\n  /** fired when icon selected, $event:number equals to selected rating */\n  @Output() onHover: EventEmitter<number> = new EventEmitter();\n  /** fired when icon selected, $event:number equals to previous rating value */\n  @Output() onLeave: EventEmitter<number> = new EventEmitter();\n\n  // tslint:disable-next-line:no-any\n  onChange: any = Function.prototype;\n  // tslint:disable-next-line:no-any\n  onTouched: any = Function.prototype;\n\n  range: RatingResults[];\n  value: number;\n  protected preValue: number;\n\n  constructor(private changeDetection: ChangeDetectorRef) {}\n\n  @HostListener('keydown', ['$event'])\n  onKeydown(event: KeyboardEvent): void {\n    /* tslint:disable-next-line: deprecation */\n    if ([37, 38, 39, 40].indexOf(event.which) === -1) {\n      return;\n    }\n\n    event.preventDefault();\n    event.stopPropagation();\n    /* tslint:disable-next-line: deprecation */\n    const sign = event.which === 38 || event.which === 39 ? 1 : -1;\n    this.rate(this.value + sign);\n  }\n\n  ngOnInit(): void {\n    this.max = typeof this.max !== 'undefined' ? this.max : 5;\n    this.titles =\n      typeof this.titles !== 'undefined' && this.titles.length > 0\n        ? this.titles\n        : [];\n    this.range = this.buildTemplateObjects(this.max);\n  }\n\n  // model -> view\n  writeValue(value: number): void {\n    if (value % 1 !== value) {\n      this.value = Math.round(value);\n      this.preValue = value;\n      this.changeDetection.markForCheck();\n\n      return;\n    }\n\n    this.preValue = value;\n    this.value = value;\n    this.changeDetection.markForCheck();\n  }\n\n  enter(value: number): void {\n    if (!this.readonly) {\n      this.value = value;\n      this.changeDetection.markForCheck();\n      this.onHover.emit(value);\n    }\n  }\n\n  reset(): void {\n    this.value = this.preValue;\n    this.changeDetection.markForCheck();\n    this.onLeave.emit(this.value);\n  }\n\n  registerOnChange(fn: (_: number) => {}): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  rate(value: number): void {\n    if (!this.readonly && value >= 0 && value <= this.range.length) {\n      this.writeValue(value);\n      this.onChange(value);\n    }\n  }\n\n  protected buildTemplateObjects(max: number): RatingResults[] {\n    const result: RatingResults[] = [];\n    for (let i = 0; i < max; i++) {\n      result.push({\n          index: i,\n          title: this.titles[i] || i + 1\n        });\n    }\n\n    return result;\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { RatingComponent } from './rating.component';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [RatingComponent],\n  exports: [RatingComponent]\n})\nexport class RatingModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: RatingModule,\n      providers: []\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { DraggableItem } from './draggable-item';\n\n@Injectable()\nexport class DraggableItemService {\n  private draggableItem: DraggableItem;\n\n  private onCapture: Subject<DraggableItem> = new Subject<DraggableItem>();\n\n  dragStart(item: DraggableItem): void {\n    this.draggableItem = item;\n  }\n\n  getItem(): DraggableItem {\n    return this.draggableItem;\n  }\n\n  captureItem(overZoneIndex: number, newIndex: number): DraggableItem {\n    if (this.draggableItem.overZoneIndex !== overZoneIndex) {\n      this.draggableItem.lastZoneIndex = this.draggableItem.overZoneIndex;\n      this.draggableItem.overZoneIndex = overZoneIndex;\n      this.onCapture.next(this.draggableItem);\n      this.draggableItem = Object.assign({}, this.draggableItem, {\n        overZoneIndex,\n        i: newIndex\n      });\n    }\n\n    return this.draggableItem;\n  }\n\n  onCaptureItem(): Subject<DraggableItem> {\n    return this.onCapture;\n  }\n}\n","import {\n  Component,\n  Input,\n  Output,\n  EventEmitter,\n  forwardRef,\n  TemplateRef\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { DraggableItem } from './draggable-item';\nimport { DraggableItemService } from './draggable-item.service';\n\n/* tslint:disable */\n@Component({\n  selector: 'bs-sortable',\n  exportAs: 'bs-sortable',\n  template: `\n<div\n    [ngClass]=\"wrapperClass\"\n    [ngStyle]=\"wrapperStyle\"\n    [ngStyle]=\"wrapperStyle\"\n    (dragover)=\"cancelEvent($event)\"\n    (dragenter)=\"cancelEvent($event)\"\n    (drop)=\"resetActiveItem($event)\"\n    (mouseleave)=\"resetActiveItem($event)\">\n  <div\n        *ngIf=\"showPlaceholder\"\n        [ngClass]=\"placeholderClass\"\n        [ngStyle]=\"placeholderStyle\"\n        (dragover)=\"onItemDragover($event, 0)\"\n        (dragenter)=\"cancelEvent($event)\"\n    >{{placeholderItem}}</div>\n    <div\n        *ngFor=\"let item of items; let i=index;\"\n        [ngClass]=\"[ itemClass, i === activeItem ? itemActiveClass : '' ]\"\n        [ngStyle]=\"getItemStyle(i === activeItem)\"\n        draggable=\"true\"\n        (dragstart)=\"onItemDragstart($event, item, i)\"\n        (dragend)=\"resetActiveItem($event)\"\n        (dragover)=\"onItemDragover($event, i)\"\n        (dragenter)=\"cancelEvent($event)\"\n        aria-dropeffect=\"move\"\n        [attr.aria-grabbed]=\"i === activeItem\"\n    ><ng-template [ngTemplateOutlet]=\"itemTemplate || defItemTemplate\"\n  [ngTemplateOutletContext]=\"{item:item, index: i}\"></ng-template></div>\n</div>\n\n<ng-template #defItemTemplate let-item=\"item\">{{item.value}}</ng-template>  \n`,\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => SortableComponent),\n      multi: true\n    }\n  ]\n})\n/* tslint:enable */\nexport class SortableComponent implements ControlValueAccessor {\n  private static globalZoneIndex = 0;\n  /** field name if input array consists of objects */\n  @Input() fieldName: string;\n\n  /** class name for items wrapper */\n  @Input() wrapperClass = '';\n\n  /** style object for items wrapper */\n  @Input() wrapperStyle: { [key: string]: string } = {};\n\n  /** class name for item */\n  @Input() itemClass = '';\n\n  /** style object for item */\n  @Input() itemStyle: { [key: string]: string } = {};\n\n  /** class name for active item */\n  @Input() itemActiveClass = '';\n\n  /** style object for active item */\n  @Input() itemActiveStyle: { [key: string]: string } = {};\n\n  /** class name for placeholder */\n  @Input() placeholderClass = '';\n\n  /** style object for placeholder */\n  @Input() placeholderStyle: { [key: string]: string } = {};\n\n  /** placeholder item which will be shown if collection is empty */\n  @Input() placeholderItem = '';\n\n  /** used to specify a custom item template. Template variables: item and index; */\n  /* tslint:disable-next-line: no-any */\n  @Input() itemTemplate: TemplateRef<any>;\n\n  /** fired on array change (reordering, insert, remove), same as <code>ngModelChange</code>.\n   *  Returns new items collection as a payload.\n   */\n  /* tslint:disable-next-line: no-any */\n  @Output() onChange: EventEmitter<any[]> = new EventEmitter<any[]>();\n\n  showPlaceholder = false;\n  activeItem = -1;\n\n  get items(): SortableItem[] {\n    return this._items;\n  }\n\n  set items(value: SortableItem[]) {\n    this._items = value;\n    const out = this.items.map((x: SortableItem) => x.initData);\n    this.onChanged(out);\n    this.onChange.emit(out);\n  }\n\n  /* tslint:disable-next-line: no-any */\n  onTouched: any = Function.prototype;\n  /* tslint:disable-next-line: no-any */\n  onChanged: any = Function.prototype;\n\n  private transfer: DraggableItemService;\n  private currentZoneIndex: number;\n  private _items: SortableItem[];\n\n  constructor(transfer: DraggableItemService) {\n    this.transfer = transfer;\n    this.currentZoneIndex = SortableComponent.globalZoneIndex++;\n    this.transfer\n      .onCaptureItem()\n      .subscribe((item: DraggableItem) => this.onDrop(item));\n  }\n\n  onItemDragstart(\n    event: DragEvent,\n    item: SortableItem,\n    i: number\n  ): void {\n    this.initDragstartEvent(event);\n    this.onTouched();\n    this.transfer.dragStart({\n      event,\n      item,\n      i,\n      initialIndex: i,\n      lastZoneIndex: this.currentZoneIndex,\n      overZoneIndex: this.currentZoneIndex\n    });\n  }\n\n  onItemDragover(event: DragEvent, i: number): void {\n    if (!this.transfer.getItem()) {\n      return;\n    }\n    event.preventDefault();\n    const dragItem = this.transfer.captureItem(\n      this.currentZoneIndex,\n      this.items.length\n    );\n\n    /* tslint:disable-next-line: no-any */\n    let newArray: any[] = [];\n\n    if (!this.items.length) {\n      newArray = [dragItem.item];\n    } else if (dragItem.i > i) {\n      newArray = [\n        ...this.items.slice(0, i),\n        dragItem.item,\n        ...this.items.slice(i, dragItem.i),\n        ...this.items.slice(dragItem.i + 1)\n      ];\n    } else {\n      // this.draggedItem.i < i\n      newArray = [\n        ...this.items.slice(0, dragItem.i),\n        ...this.items.slice(dragItem.i + 1, i + 1),\n        dragItem.item,\n        ...this.items.slice(i + 1)\n      ];\n    }\n    this.items = newArray;\n    dragItem.i = i;\n    this.activeItem = i;\n    this.updatePlaceholderState();\n  }\n\n  cancelEvent(event: DragEvent): void {\n    if (!this.transfer.getItem() || !event) {\n      return;\n    }\n    event.preventDefault();\n  }\n\n  onDrop(item: DraggableItem): void {\n    if (\n      item &&\n      item.overZoneIndex !== this.currentZoneIndex &&\n      item.lastZoneIndex === this.currentZoneIndex\n    ) {\n      this.items = this.items.filter(\n        (x: SortableItem, i: number) => i !== item.i\n      );\n      this.updatePlaceholderState();\n    }\n    this.resetActiveItem(undefined);\n  }\n\n  resetActiveItem(event: DragEvent): void {\n    this.cancelEvent(event);\n    this.activeItem = -1;\n  }\n\n  registerOnChange(callback: () => void): void {\n    this.onChanged = callback;\n  }\n\n  registerOnTouched(callback: () => void): void {\n    this.onTouched = callback;\n  }\n\n  /* tslint:disable-next-line: no-any */\n  writeValue(value: any[]): void {\n    if (value) {\n      /* tslint:disable-next-line: no-any */\n      this.items = value.map((x: any, i: number) => ({\n        id: i,\n        initData: x,\n        value: this.fieldName ? x[this.fieldName] : x\n      }));\n    } else {\n      this.items = [];\n    }\n    this.updatePlaceholderState();\n  }\n\n  updatePlaceholderState(): void {\n    this.showPlaceholder = !this._items.length;\n  }\n\n  getItemStyle(isActive: boolean): {} {\n    return isActive\n      ? Object.assign({}, this.itemStyle, this.itemActiveStyle)\n      : this.itemStyle;\n  }\n\n  // tslint:disable-next-line\n  private initDragstartEvent(event: DragEvent): void {\n    // it is necessary for mozilla\n    // data type should be 'Text' instead of 'text/plain' to keep compatibility\n    // with IE\n    event.dataTransfer.setData('Text', 'placeholder');\n  }\n}\n\nexport declare interface SortableItem {\n  id: number;\n  value: string;\n  /* tslint:disable-next-line: no-any */\n  initData: any;\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { SortableComponent } from './sortable.component';\nimport { DraggableItemService } from './draggable-item.service';\n\n@NgModule({\n  declarations: [SortableComponent],\n  imports: [CommonModule],\n  exports: [SortableComponent]\n})\nexport class SortableModule {\n  static forRoot(): ModuleWithProviders {\n    return { ngModule: SortableModule, providers: [DraggableItemService] };\n  }\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n  selector: '[ngTransclude]'\n})\nexport class NgTranscludeDirective {\n  viewRef: ViewContainerRef;\n\n  protected _viewRef: ViewContainerRef;\n  /* tslint:disable-next-line:no-any */\n  protected _ngTransclude: TemplateRef<any>;\n\n  @Input()\n  /* tslint:disable-next-line:no-any */\n  set ngTransclude(templateRef: TemplateRef<any>) {\n    this._ngTransclude = templateRef;\n    if (templateRef) {\n      this.viewRef.createEmbeddedView(templateRef);\n    }\n  }\n\n  /* tslint:disable-next-line:no-any */\n  get ngTransclude(): TemplateRef<any> {\n    return this._ngTransclude;\n  }\n\n  constructor(viewRef: ViewContainerRef) {\n    this.viewRef = viewRef;\n  }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class TabsetConfig {\n  /** provides default navigation context class: 'tabs' or 'pills' */\n  type = 'tabs';\n}\n","import { Component, HostBinding, Input, OnDestroy, Renderer2 } from '@angular/core';\n\nimport { TabDirective } from './tab.directive';\nimport { TabsetConfig } from './tabset.config';\n// todo: add active event to tab\n// todo: fix? mixing static and dynamic tabs position tabs in order of creation\n@Component({\n  selector: 'tabset',\n  templateUrl: './tabset.component.html'\n})\nexport class TabsetComponent implements OnDestroy {\n  /** if true tabs will be placed vertically */\n  @Input()\n  get vertical(): boolean {\n    return this._vertical;\n  }\n  set vertical(value: boolean) {\n    this._vertical = value;\n    this.setClassMap();\n  }\n\n  /** if true tabs fill the container and have a consistent width */\n  @Input()\n  get justified(): boolean {\n    return this._justified;\n  }\n  set justified(value: boolean) {\n    this._justified = value;\n    this.setClassMap();\n  }\n\n  /** navigation context class: 'tabs' or 'pills' */\n  @Input()\n  get type(): string {\n    return this._type;\n  }\n  set type(value: string) {\n    this._type = value;\n    this.setClassMap();\n  }\n\n  @HostBinding('class.tab-container') clazz = true;\n\n  tabs: TabDirective[] = [];\n  classMap: { [key: string]: boolean } = {};\n\n  protected isDestroyed: boolean;\n  protected _vertical: boolean;\n  protected _justified: boolean;\n  protected _type: string;\n\n  constructor(config: TabsetConfig, private renderer: Renderer2) {\n    Object.assign(this, config);\n  }\n\n  ngOnDestroy(): void {\n    this.isDestroyed = true;\n  }\n\n  addTab(tab: TabDirective): void {\n    this.tabs.push(tab);\n    tab.active = this.tabs.length === 1 && typeof tab.active === 'undefined';\n  }\n\n  removeTab(\n    tab: TabDirective,\n    options = { reselect: true, emit: true }\n  ): void {\n    const index = this.tabs.indexOf(tab);\n    if (index === -1 || this.isDestroyed) {\n      return;\n    }\n    // Select a new tab if the tab to be removed is selected and not destroyed\n    if (options.reselect && tab.active && this.hasAvailableTabs(index)) {\n      const newActiveIndex = this.getClosestTabIndex(index);\n      this.tabs[newActiveIndex].active = true;\n    }\n    if (options.emit) {\n      tab.removed.emit(tab);\n    }\n    this.tabs.splice(index, 1);\n    if (tab.elementRef.nativeElement.parentNode) {\n      this.renderer.removeChild(\n        tab.elementRef.nativeElement.parentNode,\n        tab.elementRef.nativeElement\n      );\n    }\n  }\n\n  protected getClosestTabIndex(index: number): number {\n    const tabsLength = this.tabs.length;\n    if (!tabsLength) {\n      return -1;\n    }\n\n    for (let step = 1; step <= tabsLength; step += 1) {\n      const prevIndex = index - step;\n      const nextIndex = index + step;\n      if (this.tabs[prevIndex] && !this.tabs[prevIndex].disabled) {\n        return prevIndex;\n      }\n      if (this.tabs[nextIndex] && !this.tabs[nextIndex].disabled) {\n        return nextIndex;\n      }\n    }\n\n    return -1;\n  }\n\n  protected hasAvailableTabs(index: number): boolean {\n    const tabsLength = this.tabs.length;\n    if (!tabsLength) {\n      return false;\n    }\n\n    for (let i = 0; i < tabsLength; i += 1) {\n      if (!this.tabs[i].disabled && i !== index) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  protected setClassMap(): void {\n    this.classMap = {\n      'nav-stacked': this.vertical,\n      'flex-column': this.vertical,\n      'nav-justified': this.justified,\n      [`nav-${this.type}`]: true\n    };\n  }\n}\n","import {\n  Directive,\n  EventEmitter,\n  HostBinding,\n  Input,\n  Output,\n  TemplateRef,\n  OnInit,\n  OnDestroy,\n  ElementRef,\n  Renderer2\n} from '@angular/core';\nimport { TabsetComponent } from './tabset.component';\n\n@Directive({ selector: 'tab, [tab]' })\nexport class TabDirective implements OnInit, OnDestroy {\n  /** tab header text */\n  @Input() heading: string;\n  /** tab id. The same id with suffix '-link' will be added to the corresponding &lt;li&gt; element  */\n  @HostBinding('attr.id')\n  @Input() id: string;\n  /** if true tab can not be activated */\n  @Input() disabled: boolean;\n  /** if true tab can be removable, additional button will appear */\n  @Input() removable: boolean;\n  /** if set, will be added to the tab's class attribute. Multiple classes are supported. */\n  @Input()\n  get customClass(): string {\n    return this._customClass;\n  }\n\n  set customClass(customClass: string) {\n    if (this.customClass) {\n      this.customClass.split(' ').forEach((cssClass: string) => {\n        this.renderer.removeClass(this.elementRef.nativeElement, cssClass);\n      });\n    }\n\n    this._customClass = customClass ? customClass.trim() : null;\n\n    if (this.customClass) {\n      this.customClass.split(' ').forEach((cssClass: string) => {\n        this.renderer.addClass(this.elementRef.nativeElement, cssClass);\n      });\n    }\n  }\n\n  /** tab active state toggle */\n  @HostBinding('class.active')\n  @Input()\n  get active(): boolean {\n    return this._active;\n  }\n\n  set active(active: boolean) {\n    if (this._active === active) {\n      return;\n    }\n    if ((this.disabled && active) || !active) {\n      if (this._active && !active) {\n        this.deselect.emit(this);\n        this._active = active;\n      }\n\n      return;\n    }\n\n    this._active = active;\n    this.selectTab.emit(this);\n    this.tabset.tabs.forEach((tab: TabDirective) => {\n      if (tab !== this) {\n        tab.active = false;\n      }\n    });\n  }\n\n  /** fired when tab became active, $event:Tab equals to selected instance of Tab component */\n  @Output() selectTab: EventEmitter<TabDirective> = new EventEmitter();\n  /** fired when tab became inactive, $event:Tab equals to deselected instance of Tab component */\n  @Output() deselect: EventEmitter<TabDirective> = new EventEmitter();\n  /** fired before tab will be removed, $event:Tab equals to instance of removed tab */\n  @Output() removed: EventEmitter<TabDirective> = new EventEmitter();\n\n  @HostBinding('class.tab-pane') addClass = true;\n\n  /* tslint:disable-next-line:no-any */\n  headingRef: TemplateRef<any>;\n  tabset: TabsetComponent;\n  protected _active: boolean;\n  protected _customClass: string;\n\n  constructor(\n    tabset: TabsetComponent,\n    public elementRef: ElementRef,\n    public renderer: Renderer2\n  ) {\n    this.tabset = tabset;\n    this.tabset.addTab(this);\n  }\n\n  ngOnInit(): void {\n    this.removable = this.removable;\n  }\n\n  ngOnDestroy(): void {\n    this.tabset.removeTab(this, { reselect: false, emit: false });\n  }\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\nimport { TabDirective } from './tab.directive';\n\n/** Should be used to mark <ng-template> element as a template for tab heading */\n@Directive({ selector: '[tabHeading]' })\nexport class TabHeadingDirective {\n  /* tslint:disable-next-line:no-any */\n  templateRef: TemplateRef<any>;\n\n  /* tslint:disable-next-line:no-any */\n  constructor(templateRef: TemplateRef<any>, tab: TabDirective) {\n    tab.headingRef = templateRef;\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { NgTranscludeDirective } from './ng-transclude.directive';\nimport { TabHeadingDirective } from './tab-heading.directive';\nimport { TabDirective } from './tab.directive';\nimport { TabsetComponent } from './tabset.component';\nimport { TabsetConfig } from './tabset.config';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [\n    NgTranscludeDirective,\n    TabDirective,\n    TabsetComponent,\n    TabHeadingDirective\n  ],\n  exports: [\n    TabDirective,\n    TabsetComponent,\n    TabHeadingDirective,\n    NgTranscludeDirective\n  ]\n})\nexport class TabsModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: TabsModule,\n      providers: [TabsetConfig]\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/** Default values provider for tooltip */\n@Injectable()\nexport class TooltipConfig {\n  /** sets disable adaptive position */\n  adaptivePosition = true;\n  /** tooltip placement, supported positions: 'top', 'bottom', 'left', 'right' */\n  placement = 'top';\n  /** array of event names which triggers tooltip opening */\n  triggers = 'hover focus';\n  /** a selector specifying the element the tooltip should be appended to. */\n  container: string;\n  /** delay before showing the tooltip */\n  delay = 0;\n}\n","import {\n  AfterViewInit,\n  Component,\n  ChangeDetectionStrategy\n} from '@angular/core';\nimport { TooltipConfig } from './tooltip.config';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n@Component({\n  selector: 'bs-tooltip-container',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  // tslint:disable-next-line\n  host: {\n    '[class]':\n      '\"tooltip in tooltip-\" + placement + \" \" + \"bs-tooltip-\" + placement + \" \" + placement + \" \" + containerClass',\n    '[class.show]': '!isBs3',\n    '[class.bs3]': 'isBs3',\n    '[attr.id]': 'this.id',\n    role: 'tooltip'\n  },\n  styles: [\n    `\n    :host.tooltip {\n      display: block;\n      pointer-events: none;\n    }\n    :host.bs3.tooltip.top>.arrow {\n      margin-left: -2px;\n    }\n    :host.bs3.tooltip.bottom {\n      margin-top: 0px;\n    }\n    :host.bs3.bs-tooltip-left, :host.bs3.bs-tooltip-right{\n      margin: 0px;\n    }\n    :host.bs3.bs-tooltip-right .arrow, :host.bs3.bs-tooltip-left .arrow {\n      margin: .3rem 0;\n    }\n  `\n  ],\n  template: `\n    <div class=\"tooltip-arrow arrow\"></div>\n    <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n    `\n})\nexport class TooltipContainerComponent implements AfterViewInit {\n  classMap: { [key: string]: boolean };\n  placement: string;\n  containerClass: string;\n  animation: boolean;\n  id: string;\n\n  get isBs3(): boolean {\n    return isBs3();\n  }\n\n  constructor(config: TooltipConfig) {\n    Object.assign(this, config);\n  }\n\n  ngAfterViewInit(): void {\n    this.classMap = { in: false, fade: false };\n    this.classMap[this.placement] = true;\n    this.classMap[`tooltip-${this.placement}`] = true;\n\n    this.classMap.in = true;\n    if (this.animation) {\n      this.classMap.fade = true;\n    }\n\n    if (this.containerClass) {\n      this.classMap[this.containerClass] = true;\n    }\n  }\n}\n","/* tslint:disable: max-file-line-count deprecation */\nimport {\n  Directive,\n  ElementRef,\n  EventEmitter,\n  HostBinding,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Renderer2,\n  TemplateRef,\n  ViewContainerRef\n} from '@angular/core';\n\nimport { TooltipContainerComponent } from './tooltip-container.component';\nimport { TooltipConfig } from './tooltip.config';\n\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { OnChange, warnOnce, parseTriggers } from 'ngx-bootstrap/utils';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\nimport { timer } from 'rxjs';\n\nlet id = 0;\n\n@Directive({\n  selector: '[tooltip], [tooltipHtml]',\n  exportAs: 'bs-tooltip'\n})\nexport class TooltipDirective implements OnInit, OnDestroy {\n  tooltipId = id++;\n  /** sets disable adaptive position */\n  @Input() adaptivePosition: boolean;\n  /**\n   * Content to be displayed as tooltip.\n   */\n  @OnChange()\n  @Input()\n  /* tslint:disable-next-line:no-any */\n  tooltip: string | TemplateRef<any>;\n  /** Fired when tooltip content changes */\n  @Output()\n  /* tslint:disable-next-line:no-any */\n  tooltipChange: EventEmitter<string | TemplateRef<any>> = new EventEmitter();\n\n  /**\n   * Placement of a tooltip. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  @Input() placement: string;\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  @Input() triggers: string;\n  /**\n   * A selector specifying the element the tooltip should be appended to.\n   */\n  @Input() container: string;\n  /**\n   * Css class for tooltip container\n   */\n  @Input() containerClass = '';\n  /**\n   * Returns whether or not the tooltip is currently being shown\n   */\n  @Input()\n  get isOpen(): boolean {\n    return this._tooltip.isShown;\n  }\n\n  set isOpen(value: boolean) {\n    if (value) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Allows to disable tooltip\n   */\n  @Input() isDisabled: boolean;\n\n  /**\n   * Delay before showing the tooltip\n   */\n  @Input() delay: number;\n\n  /**\n   * Emits an event when the tooltip is shown\n   */\n  /* tslint:disable-next-line:no-any */\n  @Output() onShown: EventEmitter<any>;\n  /**\n   * Emits an event when the tooltip is hidden\n   */\n  /* tslint:disable-next-line:no-any */\n  @Output() onHidden: EventEmitter<any>;\n\n  /** @deprecated - please use `tooltip` instead */\n  @Input('tooltipHtml')\n  /* tslint:disable-next-line:no-any */\n  set htmlContent(value: string | TemplateRef<any>) {\n    warnOnce('tooltipHtml was deprecated, please use `tooltip` instead');\n    this.tooltip = value;\n  }\n\n  /** @deprecated - please use `placement` instead */\n  @Input('tooltipPlacement')\n  set _placement(value: string) {\n    warnOnce('tooltipPlacement was deprecated, please use `placement` instead');\n    this.placement = value;\n  }\n\n  /** @deprecated - please use `isOpen` instead */\n  @Input('tooltipIsOpen')\n  set _isOpen(value: boolean) {\n    warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\n    this.isOpen = value;\n  }\n\n  get _isOpen(): boolean {\n    warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\n\n    return this.isOpen;\n  }\n\n  /** @deprecated - please use `isDisabled` instead */\n  @Input('tooltipEnable')\n  set _enable(value: boolean) {\n    warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\n    this.isDisabled = !value;\n  }\n\n  get _enable(): boolean {\n    warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\n\n    return this.isDisabled;\n  }\n\n  /** @deprecated - please use `container=\"body\"` instead */\n  @Input('tooltipAppendToBody')\n  set _appendToBody(value: boolean) {\n    warnOnce(\n      'tooltipAppendToBody was deprecated, please use `container=\"body\"` instead'\n    );\n    this.container = value ? 'body' : this.container;\n  }\n\n  get _appendToBody(): boolean {\n    warnOnce(\n      'tooltipAppendToBody was deprecated, please use `container=\"body\"` instead'\n    );\n\n    return this.container === 'body';\n  }\n\n  /** @deprecated - removed, will be added to configuration */\n  @Input() tooltipAnimation = true;\n\n  /** @deprecated - will replaced with customClass */\n  @Input('tooltipClass')\n  set _popupClass(value: string) {\n    warnOnce('tooltipClass deprecated');\n  }\n\n  /** @deprecated - removed */\n  @Input('tooltipContext')\n  /* tslint:disable-next-line:no-any */\n  set _tooltipContext(value: any) {\n    warnOnce('tooltipContext deprecated');\n  }\n\n  /** @deprecated */\n  @Input('tooltipPopupDelay')\n  set _tooltipPopupDelay(value: number) {\n    warnOnce('tooltipPopupDelay is deprecated, use `delay` instead');\n    this.delay = value;\n  }\n\n  /** @deprecated */\n  @Input() tooltipFadeDuration = 150;\n\n  /** @deprecated -  please use `triggers` instead */\n  @Input('tooltipTrigger')\n  get _tooltipTrigger(): string | string[] {\n    warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\n\n    return this.triggers;\n  }\n\n  set _tooltipTrigger(value: string | string[]) {\n    warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\n    this.triggers = (value || '').toString();\n  }\n\n  @HostBinding('attr.aria-describedby') ariaDescribedby = `tooltip-${this.tooltipId}`;\n\n  /** @deprecated */\n  @Output()\n  tooltipStateChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\n  /* tslint:disable-next-line:no-any */\n  protected _delayTimeoutId: number | any;\n  protected _tooltipCancelShowFn: Function;\n\n  private _tooltip: ComponentLoader<TooltipContainerComponent>;\n  constructor(\n    _viewContainerRef: ViewContainerRef,\n    cis: ComponentLoaderFactory,\n    config: TooltipConfig,\n    private _elementRef: ElementRef,\n    private _renderer: Renderer2,\n    private _positionService: PositioningService\n  ) {\n\n    this._tooltip = cis\n      .createLoader<TooltipContainerComponent>(\n        this._elementRef,\n        _viewContainerRef,\n        this._renderer\n      )\n      .provide({provide: TooltipConfig, useValue: config});\n\n    Object.assign(this, config);\n    this.onShown = this._tooltip.onShown;\n    this.onHidden = this._tooltip.onHidden;\n  }\n\n  ngOnInit(): void {\n    this._tooltip.listen({\n      triggers: this.triggers,\n      show: () => this.show()\n    });\n    /* tslint:disable-next-line:no-any */\n    this.tooltipChange.subscribe((value: any) => {\n      if (!value) {\n        this._tooltip.hide();\n      }\n    });\n  }\n\n  /**\n   * Toggles an elementâs tooltip. This is considered a âmanualâ triggering of\n   * the tooltip.\n   */\n  toggle(): void {\n    if (this.isOpen) {\n      return this.hide();\n    }\n\n    this.show();\n  }\n\n  /**\n   * Opens an elementâs tooltip. This is considered a âmanualâ triggering of\n   * the tooltip.\n   */\n  show(): void {\n    this._positionService.setOptions({\n      modifiers: {\n        flip: {\n          enabled: this.adaptivePosition\n        },\n        preventOverflow: {\n          enabled: this.adaptivePosition\n        }\n      }\n    });\n\n    if (\n      this.isOpen ||\n      this.isDisabled ||\n      this._delayTimeoutId ||\n      !this.tooltip\n    ) {\n      return;\n    }\n\n    const showTooltip = () => {\n      if (this._delayTimeoutId) {\n        this._delayTimeoutId = undefined;\n      }\n\n      this._tooltip\n        .attach(TooltipContainerComponent)\n        .to(this.container)\n        .position({attachment: this.placement})\n        .show({\n          content: this.tooltip,\n          placement: this.placement,\n          containerClass: this.containerClass,\n          id: this.ariaDescribedby\n        });\n    };\n    const cancelDelayedTooltipShowing = () => {\n      if (this._tooltipCancelShowFn) {\n        this._tooltipCancelShowFn();\n      }\n    };\n\n    if (this.delay) {\n      const _timer = timer(this.delay).subscribe(() => {\n        showTooltip();\n        cancelDelayedTooltipShowing();\n      });\n\n      if (this.triggers) {\n        const triggers = parseTriggers(this.triggers);\n        this._tooltipCancelShowFn = this._renderer.listen(this._elementRef.nativeElement, triggers[0].close, () => {\n          _timer.unsubscribe();\n          cancelDelayedTooltipShowing();\n        });\n      }\n    } else {\n      showTooltip();\n    }\n  }\n\n  /**\n   * Closes an elementâs tooltip. This is considered a âmanualâ triggering of\n   * the tooltip.\n   */\n  hide(): void {\n    if (this._delayTimeoutId) {\n      clearTimeout(this._delayTimeoutId);\n      this._delayTimeoutId = undefined;\n    }\n\n    if (!this._tooltip.isShown) {\n      return;\n    }\n\n    this._tooltip.instance.classMap.in = false;\n    setTimeout(() => {\n      this._tooltip.hide();\n    }, this.tooltipFadeDuration);\n  }\n\n  ngOnDestroy(): void {\n    this._tooltip.dispose();\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { TooltipContainerComponent } from './tooltip-container.component';\nimport { TooltipDirective } from './tooltip.directive';\nimport { TooltipConfig } from './tooltip.config';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [TooltipDirective, TooltipContainerComponent],\n  exports: [TooltipDirective],\n  entryComponents: [TooltipContainerComponent]\n})\nexport class TooltipModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: TooltipModule,\n      providers: [TooltipConfig, ComponentLoaderFactory, PositioningService]\n    };\n  }\n}\n","/* tslint:disable */\nexport const latinMap: { [key: string]: string } = {\n    'Ã': 'A',\n    'Ä': 'A',\n    'áº®': 'A',\n    'áº¶': 'A',\n    'áº°': 'A',\n    'áº²': 'A',\n    'áº´': 'A',\n    'Ç': 'A',\n    'Ã': 'A',\n    'áº¤': 'A',\n    'áº¬': 'A',\n    'áº¦': 'A',\n    'áº¨': 'A',\n    'áºª': 'A',\n    'Ã': 'A',\n    'Ç': 'A',\n    'È¦': 'A',\n    'Ç ': 'A',\n    'áº ': 'A',\n    'È': 'A',\n    'Ã': 'A',\n    'áº¢': 'A',\n    'È': 'A',\n    'Ä': 'A',\n    'Ä': 'A',\n    'Ã': 'A',\n    'Çº': 'A',\n    'á¸': 'A',\n    'Èº': 'A',\n    'Ã': 'A',\n    'ê²': 'AA',\n    'Ã': 'AE',\n    'Ç¼': 'AE',\n    'Ç¢': 'AE',\n    'ê´': 'AO',\n    'ê¶': 'AU',\n    'ê¸': 'AV',\n    'êº': 'AV',\n    'ê¼': 'AY',\n    'á¸': 'B',\n    'á¸': 'B',\n    'Æ': 'B',\n    'á¸': 'B',\n    'É': 'B',\n    'Æ': 'B',\n    'Ä': 'C',\n    'Ä': 'C',\n    'Ã': 'C',\n    'á¸': 'C',\n    'Ä': 'C',\n    'Ä': 'C',\n    'Æ': 'C',\n    'È»': 'C',\n    'Ä': 'D',\n    'á¸': 'D',\n    'á¸': 'D',\n    'á¸': 'D',\n    'á¸': 'D',\n    'Æ': 'D',\n    'á¸': 'D',\n    'Ç²': 'D',\n    'Ç': 'D',\n    'Ä': 'D',\n    'Æ': 'D',\n    'Ç±': 'DZ',\n    'Ç': 'DZ',\n    'Ã': 'E',\n    'Ä': 'E',\n    'Ä': 'E',\n    'È¨': 'E',\n    'á¸': 'E',\n    'Ã': 'E',\n    'áº¾': 'E',\n    'á»': 'E',\n    'á»': 'E',\n    'á»': 'E',\n    'á»': 'E',\n    'á¸': 'E',\n    'Ã': 'E',\n    'Ä': 'E',\n    'áº¸': 'E',\n    'È': 'E',\n    'Ã': 'E',\n    'áºº': 'E',\n    'È': 'E',\n    'Ä': 'E',\n    'á¸': 'E',\n    'á¸': 'E',\n    'Ä': 'E',\n    'É': 'E',\n    'áº¼': 'E',\n    'á¸': 'E',\n    'êª': 'ET',\n    'á¸': 'F',\n    'Æ': 'F',\n    'Ç´': 'G',\n    'Ä': 'G',\n    'Ç¦': 'G',\n    'Ä¢': 'G',\n    'Ä': 'G',\n    'Ä ': 'G',\n    'Æ': 'G',\n    'á¸ ': 'G',\n    'Ç¤': 'G',\n    'á¸ª': 'H',\n    'È': 'H',\n    'á¸¨': 'H',\n    'Ä¤': 'H',\n    'â±§': 'H',\n    'á¸¦': 'H',\n    'á¸¢': 'H',\n    'á¸¤': 'H',\n    'Ä¦': 'H',\n    'Ã': 'I',\n    'Ä¬': 'I',\n    'Ç': 'I',\n    'Ã': 'I',\n    'Ã': 'I',\n    'á¸®': 'I',\n    'Ä°': 'I',\n    'á»': 'I',\n    'È': 'I',\n    'Ã': 'I',\n    'á»': 'I',\n    'È': 'I',\n    'Äª': 'I',\n    'Ä®': 'I',\n    'Æ': 'I',\n    'Ä¨': 'I',\n    'á¸¬': 'I',\n    'ê¹': 'D',\n    'ê»': 'F',\n    'ê½': 'G',\n    'ê': 'R',\n    'ê': 'S',\n    'ê': 'T',\n    'ê¬': 'IS',\n    'Ä´': 'J',\n    'É': 'J',\n    'á¸°': 'K',\n    'Ç¨': 'K',\n    'Ä¶': 'K',\n    'â±©': 'K',\n    'ê': 'K',\n    'á¸²': 'K',\n    'Æ': 'K',\n    'á¸´': 'K',\n    'ê': 'K',\n    'ê': 'K',\n    'Ä¹': 'L',\n    'È½': 'L',\n    'Ä½': 'L',\n    'Ä»': 'L',\n    'á¸¼': 'L',\n    'á¸¶': 'L',\n    'á¸¸': 'L',\n    'â± ': 'L',\n    'ê': 'L',\n    'á¸º': 'L',\n    'Ä¿': 'L',\n    'â±¢': 'L',\n    'Ç': 'L',\n    'Å': 'L',\n    'Ç': 'LJ',\n    'á¸¾': 'M',\n    'á¹': 'M',\n    'á¹': 'M',\n    'â±®': 'M',\n    'Å': 'N',\n    'Å': 'N',\n    'Å': 'N',\n    'á¹': 'N',\n    'á¹': 'N',\n    'á¹': 'N',\n    'Ç¸': 'N',\n    'Æ': 'N',\n    'á¹': 'N',\n    'È ': 'N',\n    'Ç': 'N',\n    'Ã': 'N',\n    'Ç': 'NJ',\n    'Ã': 'O',\n    'Å': 'O',\n    'Ç': 'O',\n    'Ã': 'O',\n    'á»': 'O',\n    'á»': 'O',\n    'á»': 'O',\n    'á»': 'O',\n    'á»': 'O',\n    'Ã': 'O',\n    'Èª': 'O',\n    'È®': 'O',\n    'È°': 'O',\n    'á»': 'O',\n    'Å': 'O',\n    'È': 'O',\n    'Ã': 'O',\n    'á»': 'O',\n    'Æ ': 'O',\n    'á»': 'O',\n    'á»¢': 'O',\n    'á»': 'O',\n    'á»': 'O',\n    'á» ': 'O',\n    'È': 'O',\n    'ê': 'O',\n    'ê': 'O',\n    'Å': 'O',\n    'á¹': 'O',\n    'á¹': 'O',\n    'Æ': 'O',\n    'Çª': 'O',\n    'Ç¬': 'O',\n    'Ã': 'O',\n    'Ç¾': 'O',\n    'Ã': 'O',\n    'á¹': 'O',\n    'á¹': 'O',\n    'È¬': 'O',\n    'Æ¢': 'OI',\n    'ê': 'OO',\n    'Æ': 'E',\n    'Æ': 'O',\n    'È¢': 'OU',\n    'á¹': 'P',\n    'á¹': 'P',\n    'ê': 'P',\n    'Æ¤': 'P',\n    'ê': 'P',\n    'â±£': 'P',\n    'ê': 'P',\n    'ê': 'Q',\n    'ê': 'Q',\n    'Å': 'R',\n    'Å': 'R',\n    'Å': 'R',\n    'á¹': 'R',\n    'á¹': 'R',\n    'á¹': 'R',\n    'È': 'R',\n    'È': 'R',\n    'á¹': 'R',\n    'É': 'R',\n    'â±¤': 'R',\n    'ê¾': 'C',\n    'Æ': 'E',\n    'Å': 'S',\n    'á¹¤': 'S',\n    'Å ': 'S',\n    'á¹¦': 'S',\n    'Å': 'S',\n    'Å': 'S',\n    'È': 'S',\n    'á¹ ': 'S',\n    'á¹¢': 'S',\n    'á¹¨': 'S',\n    'Å¤': 'T',\n    'Å¢': 'T',\n    'á¹°': 'T',\n    'È': 'T',\n    'È¾': 'T',\n    'á¹ª': 'T',\n    'á¹¬': 'T',\n    'Æ¬': 'T',\n    'á¹®': 'T',\n    'Æ®': 'T',\n    'Å¦': 'T',\n    'â±¯': 'A',\n    'ê': 'L',\n    'Æ': 'M',\n    'É': 'V',\n    'ê¨': 'TZ',\n    'Ã': 'U',\n    'Å¬': 'U',\n    'Ç': 'U',\n    'Ã': 'U',\n    'á¹¶': 'U',\n    'Ã': 'U',\n    'Ç': 'U',\n    'Ç': 'U',\n    'Ç': 'U',\n    'Ç': 'U',\n    'á¹²': 'U',\n    'á»¤': 'U',\n    'Å°': 'U',\n    'È': 'U',\n    'Ã': 'U',\n    'á»¦': 'U',\n    'Æ¯': 'U',\n    'á»¨': 'U',\n    'á»°': 'U',\n    'á»ª': 'U',\n    'á»¬': 'U',\n    'á»®': 'U',\n    'È': 'U',\n    'Åª': 'U',\n    'á¹º': 'U',\n    'Å²': 'U',\n    'Å®': 'U',\n    'Å¨': 'U',\n    'á¹¸': 'U',\n    'á¹´': 'U',\n    'ê': 'V',\n    'á¹¾': 'V',\n    'Æ²': 'V',\n    'á¹¼': 'V',\n    'ê ': 'VY',\n    'áº': 'W',\n    'Å´': 'W',\n    'áº': 'W',\n    'áº': 'W',\n    'áº': 'W',\n    'áº': 'W',\n    'â±²': 'W',\n    'áº': 'X',\n    'áº': 'X',\n    'Ã': 'Y',\n    'Å¶': 'Y',\n    'Å¸': 'Y',\n    'áº': 'Y',\n    'á»´': 'Y',\n    'á»²': 'Y',\n    'Æ³': 'Y',\n    'á»¶': 'Y',\n    'á»¾': 'Y',\n    'È²': 'Y',\n    'É': 'Y',\n    'á»¸': 'Y',\n    'Å¹': 'Z',\n    'Å½': 'Z',\n    'áº': 'Z',\n    'â±«': 'Z',\n    'Å»': 'Z',\n    'áº': 'Z',\n    'È¤': 'Z',\n    'áº': 'Z',\n    'Æµ': 'Z',\n    'Ä²': 'IJ',\n    'Å': 'OE',\n    'á´': 'A',\n    'á´': 'AE',\n    'Ê': 'B',\n    'á´': 'B',\n    'á´': 'C',\n    'á´': 'D',\n    'á´': 'E',\n    'ê°': 'F',\n    'É¢': 'G',\n    'Ê': 'G',\n    'Ê': 'H',\n    'Éª': 'I',\n    'Ê': 'R',\n    'á´': 'J',\n    'á´': 'K',\n    'Ê': 'L',\n    'á´': 'L',\n    'á´': 'M',\n    'É´': 'N',\n    'á´': 'O',\n    'É¶': 'OE',\n    'á´': 'O',\n    'á´': 'OU',\n    'á´': 'P',\n    'Ê': 'R',\n    'á´': 'N',\n    'á´': 'R',\n    'ê±': 'S',\n    'á´': 'T',\n    'â±»': 'E',\n    'á´': 'R',\n    'á´': 'U',\n    'á´ ': 'V',\n    'á´¡': 'W',\n    'Ê': 'Y',\n    'á´¢': 'Z',\n    'Ã¡': 'a',\n    'Ä': 'a',\n    'áº¯': 'a',\n    'áº·': 'a',\n    'áº±': 'a',\n    'áº³': 'a',\n    'áºµ': 'a',\n    'Ç': 'a',\n    'Ã¢': 'a',\n    'áº¥': 'a',\n    'áº­': 'a',\n    'áº§': 'a',\n    'áº©': 'a',\n    'áº«': 'a',\n    'Ã¤': 'a',\n    'Ç': 'a',\n    'È§': 'a',\n    'Ç¡': 'a',\n    'áº¡': 'a',\n    'È': 'a',\n    'Ã ': 'a',\n    'áº£': 'a',\n    'È': 'a',\n    'Ä': 'a',\n    'Ä': 'a',\n    'á¶': 'a',\n    'áº': 'a',\n    'Ã¥': 'a',\n    'Ç»': 'a',\n    'á¸': 'a',\n    'â±¥': 'a',\n    'Ã£': 'a',\n    'ê³': 'aa',\n    'Ã¦': 'ae',\n    'Ç½': 'ae',\n    'Ç£': 'ae',\n    'êµ': 'ao',\n    'ê·': 'au',\n    'ê¹': 'av',\n    'ê»': 'av',\n    'ê½': 'ay',\n    'á¸': 'b',\n    'á¸': 'b',\n    'É': 'b',\n    'á¸': 'b',\n    'áµ¬': 'b',\n    'á¶': 'b',\n    'Æ': 'b',\n    'Æ': 'b',\n    'Éµ': 'o',\n    'Ä': 'c',\n    'Ä': 'c',\n    'Ã§': 'c',\n    'á¸': 'c',\n    'Ä': 'c',\n    'É': 'c',\n    'Ä': 'c',\n    'Æ': 'c',\n    'È¼': 'c',\n    'Ä': 'd',\n    'á¸': 'd',\n    'á¸': 'd',\n    'È¡': 'd',\n    'á¸': 'd',\n    'á¸': 'd',\n    'É': 'd',\n    'á¶': 'd',\n    'á¸': 'd',\n    'áµ­': 'd',\n    'á¶': 'd',\n    'Ä': 'd',\n    'É': 'd',\n    'Æ': 'd',\n    'Ä±': 'i',\n    'È·': 'j',\n    'É': 'j',\n    'Ê': 'j',\n    'Ç³': 'dz',\n    'Ç': 'dz',\n    'Ã©': 'e',\n    'Ä': 'e',\n    'Ä': 'e',\n    'È©': 'e',\n    'á¸': 'e',\n    'Ãª': 'e',\n    'áº¿': 'e',\n    'á»': 'e',\n    'á»': 'e',\n    'á»': 'e',\n    'á»': 'e',\n    'á¸': 'e',\n    'Ã«': 'e',\n    'Ä': 'e',\n    'áº¹': 'e',\n    'È': 'e',\n    'Ã¨': 'e',\n    'áº»': 'e',\n    'È': 'e',\n    'Ä': 'e',\n    'á¸': 'e',\n    'á¸': 'e',\n    'â±¸': 'e',\n    'Ä': 'e',\n    'á¶': 'e',\n    'É': 'e',\n    'áº½': 'e',\n    'á¸': 'e',\n    'ê«': 'et',\n    'á¸': 'f',\n    'Æ': 'f',\n    'áµ®': 'f',\n    'á¶': 'f',\n    'Çµ': 'g',\n    'Ä': 'g',\n    'Ç§': 'g',\n    'Ä£': 'g',\n    'Ä': 'g',\n    'Ä¡': 'g',\n    'É ': 'g',\n    'á¸¡': 'g',\n    'á¶': 'g',\n    'Ç¥': 'g',\n    'á¸«': 'h',\n    'È': 'h',\n    'á¸©': 'h',\n    'Ä¥': 'h',\n    'â±¨': 'h',\n    'á¸§': 'h',\n    'á¸£': 'h',\n    'á¸¥': 'h',\n    'É¦': 'h',\n    'áº': 'h',\n    'Ä§': 'h',\n    'Æ': 'hv',\n    'Ã­': 'i',\n    'Ä­': 'i',\n    'Ç': 'i',\n    'Ã®': 'i',\n    'Ã¯': 'i',\n    'á¸¯': 'i',\n    'á»': 'i',\n    'È': 'i',\n    'Ã¬': 'i',\n    'á»': 'i',\n    'È': 'i',\n    'Ä«': 'i',\n    'Ä¯': 'i',\n    'á¶': 'i',\n    'É¨': 'i',\n    'Ä©': 'i',\n    'á¸­': 'i',\n    'êº': 'd',\n    'ê¼': 'f',\n    'áµ¹': 'g',\n    'ê': 'r',\n    'ê': 's',\n    'ê': 't',\n    'ê­': 'is',\n    'Ç°': 'j',\n    'Äµ': 'j',\n    'Ê': 'j',\n    'É': 'j',\n    'á¸±': 'k',\n    'Ç©': 'k',\n    'Ä·': 'k',\n    'â±ª': 'k',\n    'ê': 'k',\n    'á¸³': 'k',\n    'Æ': 'k',\n    'á¸µ': 'k',\n    'á¶': 'k',\n    'ê': 'k',\n    'ê': 'k',\n    'Äº': 'l',\n    'Æ': 'l',\n    'É¬': 'l',\n    'Ä¾': 'l',\n    'Ä¼': 'l',\n    'á¸½': 'l',\n    'È´': 'l',\n    'á¸·': 'l',\n    'á¸¹': 'l',\n    'â±¡': 'l',\n    'ê': 'l',\n    'á¸»': 'l',\n    'Å': 'l',\n    'É«': 'l',\n    'á¶': 'l',\n    'É­': 'l',\n    'Å': 'l',\n    'Ç': 'lj',\n    'Å¿': 's',\n    'áº': 's',\n    'áº': 's',\n    'áº': 's',\n    'á¸¿': 'm',\n    'á¹': 'm',\n    'á¹': 'm',\n    'É±': 'm',\n    'áµ¯': 'm',\n    'á¶': 'm',\n    'Å': 'n',\n    'Å': 'n',\n    'Å': 'n',\n    'á¹': 'n',\n    'Èµ': 'n',\n    'á¹': 'n',\n    'á¹': 'n',\n    'Ç¹': 'n',\n    'É²': 'n',\n    'á¹': 'n',\n    'Æ': 'n',\n    'áµ°': 'n',\n    'á¶': 'n',\n    'É³': 'n',\n    'Ã±': 'n',\n    'Ç': 'nj',\n    'Ã³': 'o',\n    'Å': 'o',\n    'Ç': 'o',\n    'Ã´': 'o',\n    'á»': 'o',\n    'á»': 'o',\n    'á»': 'o',\n    'á»': 'o',\n    'á»': 'o',\n    'Ã¶': 'o',\n    'È«': 'o',\n    'È¯': 'o',\n    'È±': 'o',\n    'á»': 'o',\n    'Å': 'o',\n    'È': 'o',\n    'Ã²': 'o',\n    'á»': 'o',\n    'Æ¡': 'o',\n    'á»': 'o',\n    'á»£': 'o',\n    'á»': 'o',\n    'á»': 'o',\n    'á»¡': 'o',\n    'È': 'o',\n    'ê': 'o',\n    'ê': 'o',\n    'â±º': 'o',\n    'Å': 'o',\n    'á¹': 'o',\n    'á¹': 'o',\n    'Ç«': 'o',\n    'Ç­': 'o',\n    'Ã¸': 'o',\n    'Ç¿': 'o',\n    'Ãµ': 'o',\n    'á¹': 'o',\n    'á¹': 'o',\n    'È­': 'o',\n    'Æ£': 'oi',\n    'ê': 'oo',\n    'É': 'e',\n    'á¶': 'e',\n    'É': 'o',\n    'á¶': 'o',\n    'È£': 'ou',\n    'á¹': 'p',\n    'á¹': 'p',\n    'ê': 'p',\n    'Æ¥': 'p',\n    'áµ±': 'p',\n    'á¶': 'p',\n    'ê': 'p',\n    'áµ½': 'p',\n    'ê': 'p',\n    'ê': 'q',\n    'Ê ': 'q',\n    'É': 'q',\n    'ê': 'q',\n    'Å': 'r',\n    'Å': 'r',\n    'Å': 'r',\n    'á¹': 'r',\n    'á¹': 'r',\n    'á¹': 'r',\n    'È': 'r',\n    'É¾': 'r',\n    'áµ³': 'r',\n    'È': 'r',\n    'á¹': 'r',\n    'É¼': 'r',\n    'áµ²': 'r',\n    'á¶': 'r',\n    'É': 'r',\n    'É½': 'r',\n    'â': 'c',\n    'ê¿': 'c',\n    'É': 'e',\n    'É¿': 'r',\n    'Å': 's',\n    'á¹¥': 's',\n    'Å¡': 's',\n    'á¹§': 's',\n    'Å': 's',\n    'Å': 's',\n    'È': 's',\n    'á¹¡': 's',\n    'á¹£': 's',\n    'á¹©': 's',\n    'Ê': 's',\n    'áµ´': 's',\n    'á¶': 's',\n    'È¿': 's',\n    'É¡': 'g',\n    'á´': 'o',\n    'á´': 'o',\n    'á´': 'u',\n    'Å¥': 't',\n    'Å£': 't',\n    'á¹±': 't',\n    'È': 't',\n    'È¶': 't',\n    'áº': 't',\n    'â±¦': 't',\n    'á¹«': 't',\n    'á¹­': 't',\n    'Æ­': 't',\n    'á¹¯': 't',\n    'áµµ': 't',\n    'Æ«': 't',\n    'Ê': 't',\n    'Å§': 't',\n    'áµº': 'th',\n    'É': 'a',\n    'á´': 'ae',\n    'Ç': 'e',\n    'áµ·': 'g',\n    'É¥': 'h',\n    'Ê®': 'h',\n    'Ê¯': 'h',\n    'á´': 'i',\n    'Ê': 'k',\n    'ê': 'l',\n    'É¯': 'm',\n    'É°': 'm',\n    'á´': 'oe',\n    'É¹': 'r',\n    'É»': 'r',\n    'Éº': 'r',\n    'â±¹': 'r',\n    'Ê': 't',\n    'Ê': 'v',\n    'Ê': 'w',\n    'Ê': 'y',\n    'ê©': 'tz',\n    'Ãº': 'u',\n    'Å­': 'u',\n    'Ç': 'u',\n    'Ã»': 'u',\n    'á¹·': 'u',\n    'Ã¼': 'u',\n    'Ç': 'u',\n    'Ç': 'u',\n    'Ç': 'u',\n    'Ç': 'u',\n    'á¹³': 'u',\n    'á»¥': 'u',\n    'Å±': 'u',\n    'È': 'u',\n    'Ã¹': 'u',\n    'á»§': 'u',\n    'Æ°': 'u',\n    'á»©': 'u',\n    'á»±': 'u',\n    'á»«': 'u',\n    'á»­': 'u',\n    'á»¯': 'u',\n    'È': 'u',\n    'Å«': 'u',\n    'á¹»': 'u',\n    'Å³': 'u',\n    'á¶': 'u',\n    'Å¯': 'u',\n    'Å©': 'u',\n    'á¹¹': 'u',\n    'á¹µ': 'u',\n    'áµ«': 'ue',\n    'ê¸': 'um',\n    'â±´': 'v',\n    'ê': 'v',\n    'á¹¿': 'v',\n    'Ê': 'v',\n    'á¶': 'v',\n    'â±±': 'v',\n    'á¹½': 'v',\n    'ê¡': 'vy',\n    'áº': 'w',\n    'Åµ': 'w',\n    'áº': 'w',\n    'áº': 'w',\n    'áº': 'w',\n    'áº': 'w',\n    'â±³': 'w',\n    'áº': 'w',\n    'áº': 'x',\n    'áº': 'x',\n    'á¶': 'x',\n    'Ã½': 'y',\n    'Å·': 'y',\n    'Ã¿': 'y',\n    'áº': 'y',\n    'á»µ': 'y',\n    'á»³': 'y',\n    'Æ´': 'y',\n    'á»·': 'y',\n    'á»¿': 'y',\n    'È³': 'y',\n    'áº': 'y',\n    'É': 'y',\n    'á»¹': 'y',\n    'Åº': 'z',\n    'Å¾': 'z',\n    'áº': 'z',\n    'Ê': 'z',\n    'â±¬': 'z',\n    'Å¼': 'z',\n    'áº': 'z',\n    'È¥': 'z',\n    'áº': 'z',\n    'áµ¶': 'z',\n    'á¶': 'z',\n    'Ê': 'z',\n    'Æ¶': 'z',\n    'É': 'z',\n    'ï¬': 'ff',\n    'ï¬': 'ffi',\n    'ï¬': 'ffl',\n    'ï¬': 'fi',\n    'ï¬': 'fl',\n    'Ä³': 'ij',\n    'Å': 'oe',\n    'ï¬': 'st',\n    'â': 'a',\n    'â': 'e',\n    'áµ¢': 'i',\n    'â±¼': 'j',\n    'â': 'o',\n    'áµ£': 'r',\n    'áµ¤': 'u',\n    'áµ¥': 'v',\n    'â': 'x'\n};\n","import { TypeaheadDirective } from './typeahead.directive';\n\nexport class TypeaheadOptions {\n  placement: string;\n  animation: boolean;\n  typeaheadRef: TypeaheadDirective;\n\n  constructor(options: TypeaheadOptions) {\n    Object.assign(this, options);\n  }\n}\n","export class TypeaheadMatch {\n  readonly value: string;\n\n// tslint:disable-next-line:no-any\n  readonly item: any;\n  protected header: boolean;\n\n// tslint:disable-next-line:no-any\n  constructor(item: any, value: string = item, header = false) {\n    this.item = item;\n    this.value = value;\n    this.header = header;\n  }\n\n  isHeader(): boolean {\n    return this.header;\n  }\n\n  toString(): string {\n    return this.value;\n  }\n}\n","import { latinMap } from './latin-map';\n\nexport function latinize(str: string): string {\n  if (!str) {\n    return '';\n  }\n\n  return str.replace(/[^A-Za-z0-9\\[\\] ]/g, function (a: string): string {\n    return latinMap[a] || a;\n  });\n}\n\nexport function escapeRegexp(queryToEscape: string): string {\n  // Regex: capture the whole query string and replace it with the string\n  // that will be used to match the results, for example if the capture is\n  // 'a' the result will be \\a\n  return queryToEscape.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n}\n\n/* tslint:disable */\nexport function tokenize(str: string,\n                         wordRegexDelimiters = ' ',\n                         phraseRegexDelimiters = ''): Array<string> {\n  /* tslint:enable */\n  const regexStr = `(?:[${phraseRegexDelimiters}])([^${phraseRegexDelimiters}]+)` +\n    `(?:[${phraseRegexDelimiters}])|([^${wordRegexDelimiters}]+)`;\n  const preTokenized: string[] = str.split(new RegExp(regexStr, 'g'));\n  const result: string[] = [];\n  const preTokenizedLength: number = preTokenized.length;\n  let token: string;\n  const replacePhraseDelimiters = new RegExp(`[${phraseRegexDelimiters}]+`, 'g');\n\n  for (let i = 0; i < preTokenizedLength; i += 1) {\n    token = preTokenized[i];\n    if (token && token.length && token !== wordRegexDelimiters) {\n      result.push(token.replace(replacePhraseDelimiters, ''));\n    }\n  }\n\n  return result;\n}\n\n// tslint:disable-next-line:no-any\nexport function getValueFromObject(object: any, option: string): string {\n  if (!option || typeof object !== 'object') {\n    return object.toString();\n  }\n\n  if (option.endsWith('()')) {\n    const functionName = option.slice(0, option.length - 2);\n\n    return object[functionName]().toString();\n  }\n\n  const properties: string = option\n    .replace(/\\[(\\w+)\\]/g, '.$1')\n    .replace(/^\\./, '');\n  const propertiesArray: string[] = properties.split('.');\n\n  for (const property of propertiesArray) {\n    if (property in object) {\n      // tslint:disable-next-line\n      object = object[property];\n    }\n  }\n  if (!object) {return ''; }\n\n  return object.toString();\n}\n","import {\n  Component,\n  ElementRef,\n  HostListener,\n  QueryList,\n  TemplateRef,\n  ViewChild,\n  ViewChildren,\n  Renderer2\n} from '@angular/core';\n\nimport { isBs3, Utils } from 'ngx-bootstrap/utils';\nimport { latinize } from './typeahead-utils';\nimport { TypeaheadMatch } from './typeahead-match.class';\nimport { TypeaheadDirective } from './typeahead.directive';\n\n@Component({\n  selector: 'typeahead-container',\n  // tslint:disable-next-line\n  templateUrl: './typeahead-container.component.html',\n  host: {\n    class: 'dropdown open',\n    '[class.dropdown-menu]': 'isBs4',\n    '[style.overflow-y]' : `isBs4 && needScrollbar ? 'scroll': 'visible'`,\n    '[style.height]': `isBs4 && needScrollbar ? guiHeight: 'auto'`,\n    '[style.visibility]': `typeaheadScrollable ? 'hidden' : 'visible'`,\n    '[class.dropup]': 'dropup',\n    style: 'position: absolute;display: block;'\n  },\n  styles: [\n    `\n    :host.dropdown {\n      z-index: 1000;\n    }\n  `\n  ]\n})\nexport class TypeaheadContainerComponent {\n  parent: TypeaheadDirective;\n  query: string[] | string;\n  element: ElementRef;\n  isFocused = false;\n  top: string;\n  left: string;\n  display: string;\n  placement: string;\n  dropup: boolean;\n  guiHeight: string;\n  needScrollbar: boolean;\n\n  get isBs4(): boolean {\n    return !isBs3();\n  }\n\n  protected _active: TypeaheadMatch;\n  protected _matches: TypeaheadMatch[] = [];\n\n  @ViewChild('ulElement')\n  private ulElement: ElementRef;\n\n  @ViewChildren('liElements')\n  private liElements: QueryList<ElementRef>;\n\n  constructor(\n    element: ElementRef,\n    private renderer: Renderer2\n  ) {\n    this.element = element;\n  }\n\n  get active(): TypeaheadMatch {\n    return this._active;\n  }\n\n  get matches(): TypeaheadMatch[] {\n    return this._matches;\n  }\n\n  set matches(value: TypeaheadMatch[]) {\n    this._matches = value;\n    this.needScrollbar = this.typeaheadScrollable && this.typeaheadOptionsInScrollableView < this.matches.length;\n    if (this.typeaheadScrollable) {\n      setTimeout(() => {\n        this.setScrollableMode();\n      });\n    }\n\n    if (this.typeaheadIsFirstItemActive && this._matches.length > 0) {\n      this._active = this._matches[0];\n\n      if (this._active.isHeader()) {\n        this.nextActiveMatch();\n      }\n    }\n\n    if (this._active && !this.typeaheadIsFirstItemActive) {\n      const concurrency = this._matches.find(match => match.value === this._active.value);\n\n      if (concurrency) {\n        this.selectActive(concurrency);\n\n        return;\n      }\n\n      this._active = null;\n    }\n  }\n\n  // tslint:disable-next-line:no-any\n  get optionsListTemplate(): TemplateRef<any> {\n    return this.parent ? this.parent.optionsListTemplate : undefined;\n  }\n\n  get typeaheadScrollable(): boolean {\n    return this.parent ? this.parent.typeaheadScrollable : false;\n  }\n\n  get typeaheadOptionsInScrollableView(): number {\n    return this.parent ? this.parent.typeaheadOptionsInScrollableView : 5;\n  }\n\n  get typeaheadIsFirstItemActive(): boolean {\n    return this.parent ? this.parent.typeaheadIsFirstItemActive : true;\n  }\n// tslint:disable-next-line:no-any\n  get itemTemplate(): TemplateRef<any> {\n    return this.parent ? this.parent.typeaheadItemTemplate : undefined;\n  }\n\n  selectActiveMatch(isActiveItemChanged?: boolean): void {\n    if (this._active && this.parent.typeaheadSelectFirstItem) {\n      this.selectMatch(this._active);\n    }\n\n    if (!this.parent.typeaheadSelectFirstItem && isActiveItemChanged) {\n      this.selectMatch(this._active);\n    }\n  }\n\n  prevActiveMatch(): void {\n    const index = this.matches.indexOf(this._active);\n    this._active = this.matches[\n      index - 1 < 0 ? this.matches.length - 1 : index - 1\n      ];\n    if (this._active.isHeader()) {\n      this.prevActiveMatch();\n    }\n    if (this.typeaheadScrollable) {\n      this.scrollPrevious(index);\n    }\n  }\n\n  nextActiveMatch(): void {\n    const index = this.matches.indexOf(this._active);\n    this._active = this.matches[\n      index + 1 > this.matches.length - 1 ? 0 : index + 1\n      ];\n    if (this._active.isHeader()) {\n      this.nextActiveMatch();\n    }\n    if (this.typeaheadScrollable) {\n      this.scrollNext(index);\n    }\n  }\n\n  selectActive(value: TypeaheadMatch): void {\n    this.isFocused = true;\n    this._active = value;\n  }\n\n  highlight(match: TypeaheadMatch, query: string[] | string): string {\n    let itemStr: string = match.value;\n    let itemStrHelper: string = (this.parent && this.parent.typeaheadLatinize\n      ? latinize(itemStr)\n      : itemStr).toLowerCase();\n    let startIdx: number;\n    let tokenLen: number;\n    // Replaces the capture string with the same string inside of a \"strong\" tag\n    if (typeof query === 'object') {\n      const queryLen: number = query.length;\n      for (let i = 0; i < queryLen; i += 1) {\n        // query[i] is already latinized and lower case\n        startIdx = itemStrHelper.indexOf(query[i]);\n        tokenLen = query[i].length;\n        if (startIdx >= 0 && tokenLen > 0) {\n          itemStr =\n            `${itemStr.substring(0, startIdx)}<strong>${itemStr.substring(startIdx, startIdx + tokenLen)}</strong>` +\n            `${itemStr.substring(startIdx + tokenLen)}`;\n          itemStrHelper =\n            `${itemStrHelper.substring(0, startIdx)}        ${' '.repeat(tokenLen)}         ` +\n            `${itemStrHelper.substring(startIdx + tokenLen)}`;\n        }\n      }\n    } else if (query) {\n      // query is already latinized and lower case\n      startIdx = itemStrHelper.indexOf(query);\n      tokenLen = query.length;\n      if (startIdx >= 0 && tokenLen > 0) {\n        itemStr =\n          `${itemStr.substring(0, startIdx)}<strong>${itemStr.substring(startIdx, startIdx + tokenLen)}</strong>` +\n          `${itemStr.substring(startIdx + tokenLen)}`;\n      }\n    }\n\n    return itemStr;\n  }\n\n  @HostListener('mouseleave')\n  @HostListener('blur')\n  focusLost(): void {\n    this.isFocused = false;\n  }\n\n  isActive(value: TypeaheadMatch): boolean {\n    return this._active === value;\n  }\n\n  selectMatch(value: TypeaheadMatch, e: Event = void 0): boolean {\n    if (e) {\n      e.stopPropagation();\n      e.preventDefault();\n    }\n    this.parent.changeModel(value);\n    setTimeout(() => this.parent.typeaheadOnSelect.emit(value), 0);\n\n    return false;\n  }\n\n  setScrollableMode(): void {\n    if (!this.ulElement) {\n      this.ulElement = this.element;\n    }\n    if (this.liElements.first) {\n      const ulStyles = Utils.getStyles(this.ulElement.nativeElement);\n      const liStyles = Utils.getStyles(this.liElements.first.nativeElement);\n      const ulPaddingBottom = parseFloat((ulStyles['padding-bottom'] ? ulStyles['padding-bottom'] : '')\n        .replace('px', ''));\n      const ulPaddingTop = parseFloat((ulStyles['padding-top'] ? ulStyles['padding-top'] : '0')\n        .replace('px', ''));\n      const optionHeight = parseFloat((liStyles.height ? liStyles.height : '0')\n        .replace('px', ''));\n      const height = this.typeaheadOptionsInScrollableView * optionHeight;\n      this.guiHeight = `${height + ulPaddingTop + ulPaddingBottom}px`;\n    }\n    this.renderer.setStyle(this.element.nativeElement, 'visibility', 'visible');\n  }\n\n  scrollPrevious(index: number): void {\n    if (index === 0) {\n      this.scrollToBottom();\n\n      return;\n    }\n    if (this.liElements) {\n      const liElement = this.liElements.toArray()[index - 1];\n      if (liElement && !this.isScrolledIntoView(liElement.nativeElement)) {\n        this.ulElement.nativeElement.scrollTop = liElement.nativeElement.offsetTop;\n      }\n    }\n  }\n\n  scrollNext(index: number): void {\n    if (index + 1 > this.matches.length - 1) {\n      this.scrollToTop();\n\n      return;\n    }\n    if (this.liElements) {\n      const liElement = this.liElements.toArray()[index + 1];\n      if (liElement && !this.isScrolledIntoView(liElement.nativeElement)) {\n        this.ulElement.nativeElement.scrollTop =\n          liElement.nativeElement.offsetTop -\n          Number(this.ulElement.nativeElement.offsetHeight) +\n          Number(liElement.nativeElement.offsetHeight);\n      }\n    }\n  }\n\n\n  private isScrolledIntoView = function (elem: HTMLElement) {\n    const containerViewTop: number = this.ulElement.nativeElement.scrollTop;\n    const containerViewBottom = containerViewTop + Number(this.ulElement.nativeElement.offsetHeight);\n    const elemTop = elem.offsetTop;\n    const elemBottom = elemTop + elem.offsetHeight;\n\n    return ((elemBottom <= containerViewBottom) && (elemTop >= containerViewTop));\n  };\n\n  private scrollToBottom(): void {\n    this.ulElement.nativeElement.scrollTop = this.ulElement.nativeElement.scrollHeight;\n  }\n\n  private scrollToTop(): void {\n    this.ulElement.nativeElement.scrollTop = 0;\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/** Default values provider for typeahead */\n@Injectable()\nexport class TypeaheadConfig {\n  /** sets use adaptive position */\n  adaptivePosition = false;\n  /** used to hide results on blur */\n  hideResultsOnBlur = true;\n  /** used to choose the first item in typeahead container */\n  selectFirstItem = true;\n  /** used to active/inactive the first item in typeahead container */\n  isFirstItemActive = true;\n  /** used to choose set minimal no of characters that needs to\n   * be entered before typeahead kicks-in\n   */\n  minLength = 1;\n}\n","/* tslint:disable:max-file-line-count */\nimport {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  HostListener,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Renderer2,\n  TemplateRef,\n  ViewContainerRef\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nimport { from, Subscription, isObservable } from 'rxjs';\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { TypeaheadContainerComponent } from './typeahead-container.component';\nimport { TypeaheadMatch } from './typeahead-match.class';\nimport { TypeaheadConfig } from './typeahead.config';\nimport { getValueFromObject, latinize, tokenize } from './typeahead-utils';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { debounceTime, filter, mergeMap, switchMap, toArray } from 'rxjs/operators';\n\n@Directive({selector: '[typeahead]', exportAs: 'bs-typeahead'})\nexport class TypeaheadDirective implements OnInit, OnDestroy {\n  /** options source, can be Array of strings, objects or\n   * an Observable for external matching process\n   */\n    // tslint:disable-next-line:no-any\n  @Input() typeahead: any;\n  /** minimal no of characters that needs to be entered before\n   * typeahead kicks-in. When set to 0, typeahead shows on focus with full\n   * list of options (limited as normal by typeaheadOptionsLimit)\n   */\n  @Input() typeaheadMinLength: number = void 0;\n  /** sets use adaptive position */\n  @Input() adaptivePosition: boolean;\n  /** minimal wait time after last character typed before typeahead kicks-in */\n  @Input() typeaheadWaitMs: number;\n  /** maximum length of options items list. The default value is 20 */\n  @Input() typeaheadOptionsLimit: number;\n  /** when options source is an array of objects, the name of field\n   * that contains the options value, we use array item as option in case\n   * of this field is missing. Supports nested properties and methods.\n   */\n  @Input() typeaheadOptionField: string;\n  /** when options source is an array of objects, the name of field that\n   * contains the group value, matches are grouped by this field when set.\n   */\n  @Input() typeaheadGroupField: string;\n  /** should be used only in case of typeahead attribute is array.\n   * If true - loading of options will be async, otherwise - sync.\n   * true make sense if options array is large.\n   */\n  @Input() typeaheadAsync: boolean = void 0;\n  /** match latin symbols.\n   * If true the word sÃºper would match super and vice versa.\n   */\n  @Input() typeaheadLatinize = true;\n  /** Can be use to search words by inserting a single white space between each characters\n   *  for example 'C a l i f o r n i a' will match 'California'.\n   */\n  @Input() typeaheadSingleWords = true;\n  /** should be used only in case typeaheadSingleWords attribute is true.\n   * Sets the word delimiter to break words. Defaults to space.\n   */\n  @Input() typeaheadWordDelimiters = ' ';\n  /** should be used only in case typeaheadSingleWords attribute is true.\n   * Sets the word delimiter to match exact phrase.\n   * Defaults to simple and double quotes.\n   */\n  @Input() typeaheadPhraseDelimiters = '\\'\"';\n  /** used to specify a custom item template.\n   * Template variables exposed are called item and index;\n   */\n    // tslint:disable-next-line:no-any\n  @Input() typeaheadItemTemplate: TemplateRef<any>;\n  /** used to specify a custom options list template.\n   * Template variables: matches, itemTemplate, query\n   */\n    // tslint:disable-next-line:no-any\n  @Input() optionsListTemplate: TemplateRef<any>;\n  /** specifies if typeahead is scrollable  */\n  @Input() typeaheadScrollable = false;\n  /** specifies number of options to show in scroll view  */\n  @Input() typeaheadOptionsInScrollableView = 5;\n  /** used to hide result on blur */\n  @Input() typeaheadHideResultsOnBlur: boolean;\n  /** fired when an options list was opened and the user clicked Tab\n   * If a value equal true, it will be chosen first or active item in the list\n   * If value equal false, it will be chosen an active item in the list or nothing\n   */\n  @Input() typeaheadSelectFirstItem = true;\n  /** makes active first item in a list */\n  @Input() typeaheadIsFirstItemActive = true;\n  /** fired when 'busy' state of this component was changed,\n   * fired on async mode only, returns boolean\n   */\n  @Output() typeaheadLoading = new EventEmitter<boolean>();\n  /** fired on every key event and returns true\n   * in case of matches are not detected\n   */\n  @Output() typeaheadNoResults = new EventEmitter<boolean>();\n  /** fired when option was selected, return object with data of this option */\n  @Output() typeaheadOnSelect = new EventEmitter<TypeaheadMatch>();\n  /** fired when blur event occurs. returns the active item */\n  // tslint:disable-next-line:no-any\n  @Output() typeaheadOnBlur = new EventEmitter<any>();\n\n  /**\n   * A selector specifying the element the typeahead should be appended to.\n   */\n  @Input() container: string;\n\n  /** This attribute indicates that the dropdown should be opened upwards */\n  @Input() dropup = false;\n\n  // not yet implemented\n  /** if false restrict model values to the ones selected from the popup only will be provided */\n  // @Input() protected typeaheadEditable:boolean;\n  /** if false the first match automatically will not be focused as you type */\n  // @Input() protected typeaheadFocusFirst:boolean;\n  /** format the ng-model result after selection */\n  // @Input() protected typeaheadInputFormatter:any;\n  /** if true automatically select an item when there is one option that exactly matches the user input */\n  // @Input() protected typeaheadSelectOnExact:boolean;\n  /**  if true select the currently highlighted match on blur */\n  // @Input() protected typeaheadSelectOnBlur:boolean;\n  /**  if false don't focus the input element the typeahead directive is associated with on selection */\n    // @Input() protected typeaheadFocusOnSelect:boolean;\n\n  _container: TypeaheadContainerComponent;\n  isActiveItemChanged = false;\n  isTypeaheadOptionsListActive = false;\n\n  // tslint:disable-next-line:no-any\n  protected keyUpEventEmitter: EventEmitter<any> = new EventEmitter();\n  protected _matches: TypeaheadMatch[];\n  protected placement = 'bottom-left';\n  // protected popup:ComponentRef<TypeaheadContainerComponent>;\n\n  private _typeahead: ComponentLoader<TypeaheadContainerComponent>;\n  private _subscriptions: Subscription[] = [];\n  private _outsideClickListener: Function;\n\n  constructor(\n    cis: ComponentLoaderFactory,\n    config: TypeaheadConfig,\n    private changeDetection: ChangeDetectorRef,\n    private element: ElementRef,\n    private ngControl: NgControl,\n    private positionService: PositioningService,\n    private renderer: Renderer2,\n    viewContainerRef: ViewContainerRef\n  ) {\n\n    this._typeahead = cis.createLoader<TypeaheadContainerComponent>(\n      element,\n      viewContainerRef,\n      renderer\n    )\n      .provide({ provide: TypeaheadConfig, useValue: config });\n\n    Object.assign(this,\n      {\n        typeaheadHideResultsOnBlur: config.hideResultsOnBlur,\n        typeaheadSelectFirstItem: config.selectFirstItem,\n        typeaheadIsFirstItemActive: config.isFirstItemActive,\n        typeaheadMinLength: config.minLength,\n        adaptivePosition: config.adaptivePosition\n      }\n    );\n  }\n\n  ngOnInit(): void {\n    this.typeaheadOptionsLimit = this.typeaheadOptionsLimit || 20;\n\n    this.typeaheadMinLength =\n      this.typeaheadMinLength === void 0 ? 1 : this.typeaheadMinLength;\n\n    this.typeaheadWaitMs = this.typeaheadWaitMs || 0;\n\n    // async should be false in case of array\n    if (\n      this.typeaheadAsync === undefined &&\n      !(isObservable(this.typeahead))\n    ) {\n      this.typeaheadAsync = false;\n    }\n\n    if (isObservable(this.typeahead)) {\n      this.typeaheadAsync = true;\n    }\n\n    if (this.typeaheadAsync) {\n      this.asyncActions();\n    } else {\n      this.syncActions();\n    }\n  }\n\n  @HostListener('input', ['$event'])\n  // tslint:disable-next-line:no-any\n  onInput(e: any): void {\n    // For `<input>`s, use the `value` property. For others that don't have a\n    // `value` (such as `<span contenteditable=\"true\">`), use either\n    // `textContent` or `innerText` (depending on which one is supported, i.e.\n    // Firefox or IE).\n    const value =\n      e.target.value !== undefined\n        ? e.target.value\n        : e.target.textContent !== undefined\n        ? e.target.textContent\n        : e.target.innerText;\n    if (value != null && value.trim().length >= this.typeaheadMinLength) {\n      this.typeaheadLoading.emit(true);\n      this.keyUpEventEmitter.emit(e.target.value);\n    } else {\n      this.typeaheadLoading.emit(false);\n      this.typeaheadNoResults.emit(false);\n      this.hide();\n    }\n  }\n\n  @HostListener('keyup', ['$event'])\n  onChange(event: KeyboardEvent): void {\n    if (this._container) {\n      // esc\n      /* tslint:disable-next-line: deprecation */\n      if (event.keyCode === 27 || event.key === 'Escape') {\n        this.hide();\n\n        return;\n      }\n\n      // up\n      /* tslint:disable-next-line: deprecation */\n      if (event.keyCode === 38 || event.key === 'ArrowUp') {\n        this.isActiveItemChanged = true;\n        this._container.prevActiveMatch();\n\n        return;\n      }\n\n      // down\n      /* tslint:disable-next-line: deprecation */\n      if (event.keyCode === 40 || event.key === 'ArrowDown') {\n        this.isActiveItemChanged = true;\n        this._container.nextActiveMatch();\n\n        return;\n      }\n\n      // enter\n      /* tslint:disable-next-line: deprecation */\n      if (event.keyCode === 13 || event.key === 'Enter') {\n        this._container.selectActiveMatch();\n\n        return;\n      }\n    }\n  }\n\n  @HostListener('click')\n  @HostListener('focus')\n  onFocus(): void {\n    if (this.typeaheadMinLength === 0) {\n      this.typeaheadLoading.emit(true);\n      this.keyUpEventEmitter.emit(this.element.nativeElement.value || '');\n    }\n  }\n\n  @HostListener('blur')\n  onBlur(): void {\n    if (this._container && !this._container.isFocused) {\n      this.typeaheadOnBlur.emit(this._container.active);\n    }\n  }\n\n  @HostListener('keydown', ['$event'])\n  onKeydown(event: KeyboardEvent): void {\n    // no container - no problems\n    if (!this._container) {\n      return;\n    }\n\n    /* tslint:disable-next-line: deprecation */\n    if (event.keyCode === 9 || event.key === 'Tab' || event.keyCode === 13 || event.key === 'Enter') {\n      event.preventDefault();\n      if (this.typeaheadSelectFirstItem) {\n        this._container.selectActiveMatch();\n\n        return;\n      }\n\n      if (!this.typeaheadSelectFirstItem) {\n        this._container.selectActiveMatch(this.isActiveItemChanged);\n        this.isActiveItemChanged = false;\n        this.hide();\n      }\n    }\n  }\n\n  changeModel(match: TypeaheadMatch): void {\n    const valueStr: string = match.value;\n    this.ngControl.viewToModelUpdate(valueStr);\n    (this.ngControl.control).setValue(valueStr);\n    this.changeDetection.markForCheck();\n    this.hide();\n  }\n\n  get matches(): TypeaheadMatch[] {\n    return this._matches;\n  }\n\n  show(): void {\n    this.positionService.setOptions({\n      modifiers: {\n        flip: {\n          enabled: this.adaptivePosition\n        }\n      },\n      allowedPositions: ['top', 'bottom']\n    });\n\n    this._typeahead\n      .attach(TypeaheadContainerComponent)\n      // todo: add append to body, after updating positioning service\n      .to(this.container)\n      .position({attachment: `${this.dropup ? 'top' : 'bottom'} start`})\n      .show({\n        typeaheadRef: this,\n        placement: this.placement,\n        animation: false,\n        dropup: this.dropup\n      });\n\n    this._outsideClickListener = this.renderer.listen('document', 'click', (e: MouseEvent) => {\n      if (this.typeaheadMinLength === 0 && this.element.nativeElement.contains(e.target)) {\n        return undefined;\n      }\n      if (!this.typeaheadHideResultsOnBlur || this.element.nativeElement.contains(e.target)) {\n        return undefined;\n      }\n      this.onOutsideClick();\n    });\n\n    this._container = this._typeahead.instance;\n    this._container.parent = this;\n    // This improves the speed as it won't have to be done for each list item\n    const normalizedQuery = (this.typeaheadLatinize\n      ? latinize(this.ngControl.control.value)\n      : this.ngControl.control.value)\n      .toString()\n      .toLowerCase();\n    this._container.query = this.typeaheadSingleWords\n      ? tokenize(\n        normalizedQuery,\n        this.typeaheadWordDelimiters,\n        this.typeaheadPhraseDelimiters\n      )\n      : normalizedQuery;\n    this._container.matches = this._matches;\n    this.element.nativeElement.focus();\n  }\n\n  hide(): void {\n    if (this._typeahead.isShown) {\n      this._typeahead.hide();\n      this._outsideClickListener();\n      this._container = null;\n    }\n  }\n\n  onOutsideClick(): void {\n    if (this._container && !this._container.isFocused) {\n      this.hide();\n    }\n  }\n\n  ngOnDestroy() {\n    // clean up subscriptions\n    for (const sub of this._subscriptions) {\n      sub.unsubscribe();\n    }\n    this._typeahead.dispose();\n  }\n\n  protected asyncActions(): void {\n    this._subscriptions.push(\n      this.keyUpEventEmitter\n        .pipe(\n          debounceTime(this.typeaheadWaitMs),\n          switchMap(() => this.typeahead)\n        )\n        .subscribe((matches: TypeaheadMatch[]) => {\n          this.finalizeAsyncCall(matches);\n        })\n    );\n  }\n\n  protected syncActions(): void {\n    this._subscriptions.push(\n      this.keyUpEventEmitter\n        .pipe(\n          debounceTime(this.typeaheadWaitMs),\n          mergeMap((value: string) => {\n            const normalizedQuery = this.normalizeQuery(value);\n\n            return from(this.typeahead)\n              .pipe(\n                filter((option: TypeaheadMatch) => {\n\n                  return (\n                    option &&\n                    this.testMatch(this.normalizeOption(option), normalizedQuery)\n                  );\n                }),\n                toArray()\n              );\n          })\n        )\n        .subscribe((matches: TypeaheadMatch[]) => {\n          this.finalizeAsyncCall(matches);\n        })\n    );\n  }\n\n  // tslint:disable-next-line:no-any\n  protected normalizeOption(option: any): any {\n    const optionValue: string = getValueFromObject(\n      option,\n      this.typeaheadOptionField\n    );\n    const normalizedOption = this.typeaheadLatinize\n      ? latinize(optionValue)\n      : optionValue;\n\n    return normalizedOption.toLowerCase();\n  }\n\n  protected normalizeQuery(value: string): string | string[] {\n    // If singleWords, break model here to not be doing extra work on each\n    // iteration\n    let normalizedQuery: string | string[] = (this.typeaheadLatinize\n      ? latinize(value)\n      : value)\n      .toString()\n      .toLowerCase();\n    normalizedQuery = this.typeaheadSingleWords\n      ? tokenize(\n        normalizedQuery,\n        this.typeaheadWordDelimiters,\n        this.typeaheadPhraseDelimiters\n      )\n      : normalizedQuery;\n\n    return normalizedQuery;\n  }\n\n  protected testMatch(match: string, test: string[] | string): boolean {\n    let spaceLength: number;\n\n    if (typeof test === 'object') {\n      spaceLength = test.length;\n      for (let i = 0; i < spaceLength; i += 1) {\n        if (test[i].length > 0 && match.indexOf(test[i]) < 0) {\n          return false;\n        }\n      }\n\n      return true;\n    }\n\n    return match.indexOf(test) >= 0;\n  }\n\n  protected finalizeAsyncCall(matches: TypeaheadMatch[]): void {\n    this.prepareMatches(matches || []);\n\n    this.typeaheadLoading.emit(false);\n    this.typeaheadNoResults.emit(!this.hasMatches());\n\n    if (!this.hasMatches()) {\n      this.hide();\n\n      return;\n    }\n\n    if (this._container) {\n      // fix: remove usage of ngControl internals\n      const _controlValue = (this.typeaheadLatinize\n        ? latinize(this.ngControl.control.value)\n        : this.ngControl.control.value) || '';\n      // This improves the speed as it won't have to be done for each list item\n      const normalizedQuery = _controlValue.toString().toLowerCase();\n      this._container.query = this.typeaheadSingleWords\n        ? tokenize(\n          normalizedQuery,\n          this.typeaheadWordDelimiters,\n          this.typeaheadPhraseDelimiters\n        )\n        : normalizedQuery;\n      this._container.matches = this._matches;\n    } else {\n      this.show();\n    }\n  }\n\n  protected prepareMatches(options: TypeaheadMatch[]): void {\n    const limited: TypeaheadMatch[] = options.slice(0, this.typeaheadOptionsLimit);\n\n    if (this.typeaheadGroupField) {\n      let matches: TypeaheadMatch[] = [];\n\n      // extract all group names\n      const groups = limited\n        .map((option: TypeaheadMatch) =>\n          getValueFromObject(option, this.typeaheadGroupField)\n        )\n        .filter((v: string, i: number, a: string[]) => a.indexOf(v) === i);\n\n      groups.forEach((group: string) => {\n        // add group header to array of matches\n        matches.push(new TypeaheadMatch(group, group, true));\n\n        // add each item of group to array of matches\n        matches = matches.concat(\n          limited\n            .filter(\n              // tslint:disable-next-line:no-any\n              (option: any) =>\n                getValueFromObject(option, this.typeaheadGroupField) === group\n            )\n            .map(\n              // tslint:disable-next-line:no-any\n              (option: any) =>\n                new TypeaheadMatch(\n                  option,\n                  getValueFromObject(option, this.typeaheadOptionField)\n                )\n            )\n        );\n      });\n\n      this._matches = matches;\n    } else {\n      this._matches = limited.map(\n        // tslint:disable-next-line:no-any\n        (option: any) =>\n          new TypeaheadMatch(\n            option,\n            getValueFromObject(option, this.typeaheadOptionField)\n          )\n      );\n    }\n  }\n\n  protected hasMatches(): boolean {\n    return this._matches.length > 0;\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { TypeaheadContainerComponent } from './typeahead-container.component';\nimport { TypeaheadDirective } from './typeahead.directive';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { TypeaheadConfig } from './typeahead.config';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [TypeaheadContainerComponent, TypeaheadDirective],\n  exports: [TypeaheadContainerComponent, TypeaheadDirective],\n  entryComponents: [TypeaheadContainerComponent]\n})\nexport class TypeaheadModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: TypeaheadModule,\n      providers: [ComponentLoaderFactory, PositioningService, TypeaheadConfig]\n    };\n  }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Configuration service for the Popover directive.\n * You can inject this service, typically in your root component, and customize\n * the values of its properties in order to provide default values for all the\n * popovers used in the application.\n */\n@Injectable()\nexport class PopoverConfig {\n  /** sets disable adaptive position */\n  adaptivePosition = true;\n  /**\n   * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\", \"auto\"\n   */\n  placement = 'top';\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  triggers = 'click';\n\n  outsideClick = false;\n  /**\n   * A selector specifying the element the popover should be appended to.\n   */\n  container: string;\n}\n","import { ChangeDetectionStrategy, Input, Component } from '@angular/core';\nimport { PopoverConfig } from './popover.config';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n@Component({\n  selector: 'popover-container',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  // tslint:disable-next-line\n  host: {\n    '[class]':\n      '\"popover in popover-\" + placement + \" \" + \"bs-popover-\" + placement + \" \" + placement + \" \" + containerClass',\n    '[class.show]': '!isBs3',\n    '[class.bs3]': 'isBs3',\n    role: 'tooltip',\n    style: 'display:block;'\n  },\n  styles: [\n    `\n    :host.bs3.popover-top {\n      margin-bottom: 10px;\n    }\n    :host.bs3.popover.top>.arrow {\n      margin-left: -2px;\n    }\n    :host.bs3.popover.top {\n      margin-bottom: 10px;\n    }\n    :host.popover.bottom>.arrow {\n      margin-left: -4px;\n    }\n    :host.bs3.bs-popover-left {\n      margin-right: .5rem;\n    }\n    :host.bs3.bs-popover-right .arrow, :host.bs3.bs-popover-left .arrow{\n      margin: .3rem 0;\n    }\n    `\n  ],\n  templateUrl: './popover-container.component.html'\n})\nexport class PopoverContainerComponent {\n  @Input() placement: string;\n  @Input() title: string;\n  containerClass: string;\n\n  get isBs3(): boolean {\n    return isBs3();\n  }\n\n  constructor(config: PopoverConfig) {\n    Object.assign(this, config);\n  }\n}\n","import {\n  Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output,\n  Renderer2, TemplateRef, ViewContainerRef\n} from '@angular/core';\nimport { PopoverConfig } from './popover.config';\nimport { ComponentLoader, ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PopoverContainerComponent } from './popover-container.component';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\n/**\n * A lightweight, extensible directive for fancy popover creation.\n */\n@Directive({selector: '[popover]', exportAs: 'bs-popover'})\nexport class PopoverDirective implements OnInit, OnDestroy {\n  /** sets disable adaptive position */\n  @Input() adaptivePosition: boolean;\n  /**\n   * Content to be displayed as popover.\n   */\n  /* tslint:disable-next-line: no-any */\n  @Input() popover: string | TemplateRef<any>;\n  /**\n   * Context to be used if popover is a template.\n   */\n  /* tslint:disable-next-line: no-any */\n  @Input() popoverContext: any;\n  /**\n   * Title of a popover.\n   */\n  @Input() popoverTitle: string;\n  /**\n   * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n   */\n  @Input() placement: 'top' | 'bottom' | 'left' | 'right' | 'auto';\n  /**\n   * Close popover on outside click\n   */\n  @Input() outsideClick = false;\n  /**\n   * Specifies events that should trigger. Supports a space separated list of\n   * event names.\n   */\n  @Input() triggers: string;\n  /**\n   * A selector specifying the element the popover should be appended to.\n   */\n  @Input() container: string;\n\n  /**\n   * Css class for popover container\n   */\n  @Input() containerClass = '';\n\n  /**\n   * Returns whether or not the popover is currently being shown\n   */\n  @Input()\n  get isOpen(): boolean {\n    return this._popover.isShown;\n  }\n\n  set isOpen(value: boolean) {\n    if (value) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Emits an event when the popover is shown\n   */\n  /* tslint:disable-next-line: no-any */\n  @Output() onShown: EventEmitter<any>;\n  /**\n   * Emits an event when the popover is hidden\n   */\n  /* tslint:disable-next-line: no-any */\n  @Output() onHidden: EventEmitter<any>;\n\n  private _popover: ComponentLoader<PopoverContainerComponent>;\n  private _isInited = false;\n\n  constructor(\n    _config: PopoverConfig,\n    _elementRef: ElementRef,\n    _renderer: Renderer2,\n    _viewContainerRef: ViewContainerRef,\n    cis: ComponentLoaderFactory,\n    private _positionService: PositioningService\n  ) {\n    this._popover = cis\n      .createLoader<PopoverContainerComponent>(\n        _elementRef,\n        _viewContainerRef,\n        _renderer\n      )\n      .provide({provide: PopoverConfig, useValue: _config});\n\n    Object.assign(this, _config);\n\n    this.onShown = this._popover.onShown;\n    this.onHidden = this._popover.onHidden;\n\n    // fix: no focus on button on Mac OS #1795\n    if (typeof window !== 'undefined') {\n      _elementRef.nativeElement.addEventListener('click', function () {\n        try {\n          _elementRef.nativeElement.focus();\n        } catch (err) {\n          return;\n        }\n      });\n    }\n  }\n\n  /**\n   * Opens an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover.\n   */\n  show(): void {\n    if (this._popover.isShown || !this.popover) {\n      return;\n    }\n\n    this._positionService.setOptions({\n      modifiers: {\n        flip: {\n          enabled: this.adaptivePosition\n        },\n        preventOverflow: {\n          enabled: this.adaptivePosition\n        }\n      }\n    });\n\n    this._popover\n      .attach(PopoverContainerComponent)\n      .to(this.container)\n      .position({attachment: this.placement})\n      .show({\n        content: this.popover,\n        context: this.popoverContext,\n        placement: this.placement,\n        title: this.popoverTitle,\n        containerClass: this.containerClass\n      });\n\n    if (!this.adaptivePosition) {\n      this._positionService.calcPosition();\n      this._positionService.deletePositionElement(this._popover._componentRef.location);\n    }\n\n    this.isOpen = true;\n  }\n\n  /**\n   * Closes an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover.\n   */\n  hide(): void {\n    if (this.isOpen) {\n      this._popover.hide();\n      this.isOpen = false;\n    }\n  }\n\n  /**\n   * Toggles an elementâs popover. This is considered a âmanualâ triggering of\n   * the popover.\n   */\n  toggle(): void {\n    if (this.isOpen) {\n      return this.hide();\n    }\n\n    this.show();\n  }\n\n  ngOnInit(): void {\n    // fix: seems there are an issue with `routerLinkActive`\n    // which result in duplicated call ngOnInit without call to ngOnDestroy\n    // read more: https://github.com/valor-software/ngx-bootstrap/issues/1885\n    if (this._isInited) {\n      return;\n    }\n    this._isInited = true;\n\n    this._popover.listen({\n      triggers: this.triggers,\n      outsideClick: this.outsideClick,\n      show: () => this.show()\n    });\n  }\n\n  ngOnDestroy(): void {\n    this._popover.dispose();\n  }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { PopoverConfig } from './popover.config';\nimport { PopoverDirective } from './popover.directive';\nimport { PopoverContainerComponent } from './popover-container.component';\n\n@NgModule({\n  imports: [CommonModule],\n  declarations: [PopoverDirective, PopoverContainerComponent],\n  exports: [PopoverDirective],\n  entryComponents: [PopoverContainerComponent]\n})\nexport class PopoverModule {\n  static forRoot(): ModuleWithProviders {\n    return {\n      ngModule: PopoverModule,\n      providers: [PopoverConfig, ComponentLoaderFactory, PositioningService]\n    };\n  }\n}\n","import { InjectionToken } from '@angular/core';\nexport var JWT_OPTIONS = new InjectionToken('JWT_OPTIONS');\n","// tslint:disable:no-bitwise\nimport { Injectable, Inject } from '@angular/core';\nimport { JWT_OPTIONS } from './jwtoptions.token';\nvar JwtHelperService = /** @class */ (function () {\n    function JwtHelperService(config) {\n        if (config === void 0) { config = null; }\n        this.tokenGetter = config && config.tokenGetter || function () { };\n    }\n    JwtHelperService.prototype.urlBase64Decode = function (str) {\n        var output = str.replace(/-/g, '+').replace(/_/g, '/');\n        switch (output.length % 4) {\n            case 0: {\n                break;\n            }\n            case 2: {\n                output += '==';\n                break;\n            }\n            case 3: {\n                output += '=';\n                break;\n            }\n            default: {\n                throw 'Illegal base64url string!';\n            }\n        }\n        return this.b64DecodeUnicode(output);\n    };\n    // credits for decoder goes to https://github.com/atk\n    // credits for decoder goes to https://github.com/atk\n    JwtHelperService.prototype.b64decode = \n    // credits for decoder goes to https://github.com/atk\n    function (str) {\n        var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n        var output = '';\n        str = String(str).replace(/=+$/, '');\n        if (str.length % 4 === 1) {\n            throw new Error(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n        }\n        for (\n        // initialize result and counters\n        var bc = 0, bs = void 0, buffer = void 0, idx = 0; \n        // get next character\n        (buffer = str.charAt(idx++)); \n        // character found in table? initialize bit storage and add its ascii value;\n        ~buffer &&\n            ((bs = bc % 4 ? bs * 64 + buffer : buffer),\n                // and if not first of each 4 characters,\n                // convert the first 8 bits to one ascii character\n                bc++ % 4)\n            ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n            : 0) {\n            // try to find character in table (0-63, not found => -1)\n            buffer = chars.indexOf(buffer);\n        }\n        return output;\n    };\n    JwtHelperService.prototype.b64DecodeUnicode = function (str) {\n        return decodeURIComponent(Array.prototype.map\n            .call(this.b64decode(str), function (c) {\n            return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n        })\n            .join(''));\n    };\n    JwtHelperService.prototype.decodeToken = function (token) {\n        if (token === void 0) { token = this.tokenGetter(); }\n        if (!token || token === '') {\n            return null;\n        }\n        var parts = token.split('.');\n        if (parts.length !== 3) {\n            throw new Error('The inspected token doesn\\'t appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.');\n        }\n        var decoded = this.urlBase64Decode(parts[1]);\n        if (!decoded) {\n            throw new Error('Cannot decode the token.');\n        }\n        return JSON.parse(decoded);\n    };\n    JwtHelperService.prototype.getTokenExpirationDate = function (token) {\n        if (token === void 0) { token = this.tokenGetter(); }\n        var decoded;\n        decoded = this.decodeToken(token);\n        if (!decoded || !decoded.hasOwnProperty('exp')) {\n            return null;\n        }\n        var date = new Date(0);\n        date.setUTCSeconds(decoded.exp);\n        return date;\n    };\n    JwtHelperService.prototype.isTokenExpired = function (token, offsetSeconds) {\n        if (token === void 0) { token = this.tokenGetter(); }\n        if (!token || token === '') {\n            return true;\n        }\n        var date = this.getTokenExpirationDate(token);\n        offsetSeconds = offsetSeconds || 0;\n        if (date === null) {\n            return false;\n        }\n        return !(date.valueOf() > new Date().valueOf() + offsetSeconds * 1000);\n    };\n    JwtHelperService.decorators = [\n        { type: Injectable },\n    ];\n    /** @nocollapse */\n    JwtHelperService.ctorParameters = function () { return [\n        { type: undefined, decorators: [{ type: Inject, args: [JWT_OPTIONS,] },] },\n    ]; };\n    return JwtHelperService;\n}());\nexport { JwtHelperService };\n","import { Injectable, Inject } from '@angular/core';\nimport { JwtHelperService } from './jwthelper.service';\nimport { JWT_OPTIONS } from './jwtoptions.token';\nimport { from } from \"rxjs\";\nimport { mergeMap } from 'rxjs/operators';\nimport { parse } from 'url';\nvar JwtInterceptor = /** @class */ (function () {\n    function JwtInterceptor(config, jwtHelper) {\n        this.jwtHelper = jwtHelper;\n        this.tokenGetter = config.tokenGetter;\n        this.headerName = config.headerName || 'Authorization';\n        this.authScheme =\n            config.authScheme || config.authScheme === ''\n                ? config.authScheme\n                : 'Bearer ';\n        this.whitelistedDomains = config.whitelistedDomains || [];\n        this.blacklistedRoutes = config.blacklistedRoutes || [];\n        this.throwNoTokenError = config.throwNoTokenError || false;\n        this.skipWhenExpired = config.skipWhenExpired;\n    }\n    JwtInterceptor.prototype.isWhitelistedDomain = function (request) {\n        var requestUrl = parse(request.url, false, true);\n        return (requestUrl.host === null ||\n            this.whitelistedDomains.findIndex(function (domain) {\n                return typeof domain === 'string'\n                    ? domain === requestUrl.host\n                    : domain instanceof RegExp\n                        ? domain.test(requestUrl.host)\n                        : false;\n            }) > -1);\n    };\n    JwtInterceptor.prototype.isBlacklistedRoute = function (request) {\n        var url = request.url;\n        return (this.blacklistedRoutes.findIndex(function (route) {\n            return typeof route === 'string'\n                ? route === url\n                : route instanceof RegExp\n                    ? route.test(url)\n                    : false;\n        }) > -1);\n    };\n    JwtInterceptor.prototype.handleInterception = function (token, request, next) {\n        var tokenIsExpired = false;\n        if (!token && this.throwNoTokenError) {\n            throw new Error('Could not get token from tokenGetter function.');\n        }\n        if (this.skipWhenExpired) {\n            tokenIsExpired = token ? this.jwtHelper.isTokenExpired(token) : true;\n        }\n        if (token && tokenIsExpired && this.skipWhenExpired) {\n            request = request.clone();\n        }\n        else if (token) {\n            request = request.clone({\n                setHeaders: (_a = {},\n                    _a[this.headerName] = \"\" + this.authScheme + token,\n                    _a)\n            });\n        }\n        return next.handle(request);\n        var _a;\n    };\n    JwtInterceptor.prototype.intercept = function (request, next) {\n        var _this = this;\n        if (!this.isWhitelistedDomain(request) ||\n            this.isBlacklistedRoute(request)) {\n            return next.handle(request);\n        }\n        var token = this.tokenGetter();\n        if (token instanceof Promise) {\n            return from(token).pipe(mergeMap(function (asyncToken) {\n                return _this.handleInterception(asyncToken, request, next);\n            }));\n        }\n        else {\n            return this.handleInterception(token, request, next);\n        }\n    };\n    JwtInterceptor.decorators = [\n        { type: Injectable },\n    ];\n    /** @nocollapse */\n    JwtInterceptor.ctorParameters = function () { return [\n        { type: undefined, decorators: [{ type: Inject, args: [JWT_OPTIONS,] },] },\n        { type: JwtHelperService, },\n    ]; };\n    return JwtInterceptor;\n}());\nexport { JwtInterceptor };\n","import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { JwtInterceptor } from './src/jwt.interceptor';\nimport { JwtHelperService } from './src/jwthelper.service';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { JWT_OPTIONS } from './src/jwtoptions.token';\nexport * from './src/jwt.interceptor';\nexport * from './src/jwthelper.service';\nexport * from './src/jwtoptions.token';\nvar JwtModule = /** @class */ (function () {\n    function JwtModule(parentModule) {\n        if (parentModule) {\n            throw new Error('JwtModule is already loaded. It should only be imported in your application\\'s main module.');\n        }\n    }\n    JwtModule.forRoot = function (options) {\n        return {\n            ngModule: JwtModule,\n            providers: [\n                {\n                    provide: HTTP_INTERCEPTORS,\n                    useClass: JwtInterceptor,\n                    multi: true\n                },\n                options.jwtOptionsProvider ||\n                    {\n                        provide: JWT_OPTIONS,\n                        useValue: options.config\n                    },\n                JwtHelperService\n            ]\n        };\n    };\n    JwtModule.decorators = [\n        { type: NgModule },\n    ];\n    /** @nocollapse */\n    JwtModule.ctorParameters = function () { return [\n        { type: JwtModule, decorators: [{ type: Optional }, { type: SkipSelf },] },\n    ]; };\n    return JwtModule;\n}());\nexport { JwtModule };\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimationEvent, AnimationPlayer, NoopAnimationPlayer, ÉµAnimationGroupPlayer, ÉµPRE_STYLE as PRE_STYLE, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {AnimationDriver} from '../../src/render/animation_driver';\n\n// We don't include ambient node types here since @angular/animations/browser\n// is meant to target the browser so technically it should not depend on node\n// types. `process` is just declared locally here as a result.\ndeclare const process: any;\n\nexport function isBrowser() {\n  return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\n\nexport function isNode() {\n  return (typeof process !== 'undefined');\n}\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n  switch (players.length) {\n    case 0:\n      return new NoopAnimationPlayer();\n    case 1:\n      return players[0];\n    default:\n      return new ÉµAnimationGroupPlayer(players);\n  }\n}\n\nexport function normalizeKeyframes(\n    driver: AnimationDriver, normalizer: AnimationStyleNormalizer, element: any,\n    keyframes: ÉµStyleData[], preStyles: ÉµStyleData = {},\n    postStyles: ÉµStyleData = {}): ÉµStyleData[] {\n  const errors: string[] = [];\n  const normalizedKeyframes: ÉµStyleData[] = [];\n  let previousOffset = -1;\n  let previousKeyframe: ÉµStyleData|null = null;\n  keyframes.forEach(kf => {\n    const offset = kf['offset'] as number;\n    const isSameOffset = offset == previousOffset;\n    const normalizedKeyframe: ÉµStyleData = (isSameOffset && previousKeyframe) || {};\n    Object.keys(kf).forEach(prop => {\n      let normalizedProp = prop;\n      let normalizedValue = kf[prop];\n      if (prop !== 'offset') {\n        normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n        switch (normalizedValue) {\n          case PRE_STYLE:\n            normalizedValue = preStyles[prop];\n            break;\n\n          case AUTO_STYLE:\n            normalizedValue = postStyles[prop];\n            break;\n\n          default:\n            normalizedValue =\n                normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n            break;\n        }\n      }\n      normalizedKeyframe[normalizedProp] = normalizedValue;\n    });\n    if (!isSameOffset) {\n      normalizedKeyframes.push(normalizedKeyframe);\n    }\n    previousKeyframe = normalizedKeyframe;\n    previousOffset = offset;\n  });\n  if (errors.length) {\n    const LINE_START = '\\n - ';\n    throw new Error(\n        `Unable to animate due to the following errors:${LINE_START}${errors.join(LINE_START)}`);\n  }\n\n  return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n    player: AnimationPlayer, eventName: string, event: AnimationEvent | undefined,\n    callback: (event: any) => any) {\n  switch (eventName) {\n    case 'start':\n      player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n      break;\n    case 'done':\n      player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n      break;\n    case 'destroy':\n      player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n      break;\n  }\n}\n\nexport function copyAnimationEvent(\n    e: AnimationEvent, phaseName: string, player: AnimationPlayer): AnimationEvent {\n  const totalTime = player.totalTime;\n  const disabled = (player as any).disabled ? true : false;\n  const event = makeAnimationEvent(\n      e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName,\n      totalTime == undefined ? e.totalTime : totalTime, disabled);\n  const data = (e as any)['_data'];\n  if (data != null) {\n    (event as any)['_data'] = data;\n  }\n  return event;\n}\n\nexport function makeAnimationEvent(\n    element: any, triggerName: string, fromState: string, toState: string, phaseName: string = '',\n    totalTime: number = 0, disabled?: boolean): AnimationEvent {\n  return {element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled};\n}\n\nexport function getOrSetAsInMap(\n    map: Map<any, any>| {[key: string]: any}, key: any, defaultValue: any) {\n  let value: any;\n  if (map instanceof Map) {\n    value = map.get(key);\n    if (!value) {\n      map.set(key, value = defaultValue);\n    }\n  } else {\n    value = map[key];\n    if (!value) {\n      value = map[key] = defaultValue;\n    }\n  }\n  return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n  const separatorPos = command.indexOf(':');\n  const id = command.substring(1, separatorPos);\n  const action = command.substr(separatorPos + 1);\n  return [id, action];\n}\n\nlet _contains: (elm1: any, elm2: any) => boolean = (elm1: any, elm2: any) => false;\nlet _matches: (element: any, selector: string) => boolean = (element: any, selector: string) =>\n    false;\nlet _query: (element: any, selector: string, multi: boolean) => any[] =\n    (element: any, selector: string, multi: boolean) => {\n      return [];\n    };\n\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nconst _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n  // this is well supported in all browsers\n  _contains = (elm1: any, elm2: any) => { return elm1.contains(elm2) as boolean; };\n\n  _matches = (() => {\n    if (_isNode || Element.prototype.matches) {\n      return (element: any, selector: string) => element.matches(selector);\n    } else {\n      const proto = Element.prototype as any;\n      const fn = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||\n          proto.oMatchesSelector || proto.webkitMatchesSelector;\n      if (fn) {\n        return (element: any, selector: string) => fn.apply(element, [selector]);\n      } else {\n        return _matches;\n      }\n    }\n  })();\n\n  _query = (element: any, selector: string, multi: boolean): any[] => {\n    let results: any[] = [];\n    if (multi) {\n      results.push(...element.querySelectorAll(selector));\n    } else {\n      const elm = element.querySelector(selector);\n      if (elm) {\n        results.push(elm);\n      }\n    }\n    return results;\n  };\n}\n\nfunction containsVendorPrefix(prop: string): boolean {\n  // Webkit is the only real popular vendor prefix nowadays\n  // cc: http://shouldiprefix.com/\n  return prop.substring(1, 6) == 'ebkit';  // webkit or Webkit\n}\n\nlet _CACHED_BODY: {style: any}|null = null;\nlet _IS_WEBKIT = false;\nexport function validateStyleProperty(prop: string): boolean {\n  if (!_CACHED_BODY) {\n    _CACHED_BODY = getBodyNode() || {};\n    _IS_WEBKIT = _CACHED_BODY !.style ? ('WebkitAppearance' in _CACHED_BODY !.style) : false;\n  }\n\n  let result = true;\n  if (_CACHED_BODY !.style && !containsVendorPrefix(prop)) {\n    result = prop in _CACHED_BODY !.style;\n    if (!result && _IS_WEBKIT) {\n      const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);\n      result = camelProp in _CACHED_BODY !.style;\n    }\n  }\n\n  return result;\n}\n\nexport function getBodyNode(): any|null {\n  if (typeof document != 'undefined') {\n    return document.body;\n  }\n  return null;\n}\n\nexport const matchesElement = _matches;\nexport const containsElement = _contains;\nexport const invokeQuery = _query;\n\nexport function hypenatePropsObject(object: {[key: string]: any}): {[key: string]: any} {\n  const newObj: {[key: string]: any} = {};\n  Object.keys(object).forEach(prop => {\n    const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n    newObj[newProp] = object[prop];\n  });\n  return newObj;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, NoopAnimationPlayer} from '@angular/animations';\nimport {Injectable} from '@angular/core';\n\nimport {containsElement, invokeQuery, matchesElement, validateStyleProperty} from './shared';\n\n/**\n * @publicApi\n */\n@Injectable()\nexport class NoopAnimationDriver implements AnimationDriver {\n  validateStyleProperty(prop: string): boolean { return validateStyleProperty(prop); }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return defaultValue || '';\n  }\n\n  animate(\n      element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,\n      easing: string, previousPlayers: any[] = [],\n      scrubberAccessRequested?: boolean): AnimationPlayer {\n    return new NoopAnimationPlayer(duration, delay);\n  }\n}\n\n/**\n * @publicApi\n */\nexport abstract class AnimationDriver {\n  static NOOP: AnimationDriver = new NoopAnimationDriver();\n\n  abstract validateStyleProperty(prop: string): boolean;\n\n  abstract matchesElement(element: any, selector: string): boolean;\n\n  abstract containsElement(elm1: any, elm2: any): boolean;\n\n  abstract query(element: any, selector: string, multi: boolean): any[];\n\n  abstract computeStyle(element: any, prop: string, defaultValue?: string): string;\n\n  abstract animate(\n      element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,\n      easing?: string|null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimateTimings, AnimationMetadata, AnimationMetadataType, AnimationOptions, sequence, ÉµStyleData} from '@angular/animations';\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\nimport {isNode} from './render/shared';\n\nexport const ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const ENTER_SELECTOR = '.ng-enter';\nexport const LEAVE_SELECTOR = '.ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string | number) {\n  if (typeof value == 'number') return value;\n\n  const matches = (value as string).match(/^(-?[\\.\\d]+)(m?s)/);\n  if (!matches || matches.length < 2) return 0;\n\n  return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n  switch (unit) {\n    case 's':\n      return value * ONE_SECOND;\n    default:  // ms or something else\n      return value;\n  }\n}\n\nexport function resolveTiming(\n    timings: string | number | AnimateTimings, errors: any[], allowNegativeValues?: boolean) {\n  return timings.hasOwnProperty('duration') ?\n      <AnimateTimings>timings :\n      parseTimeExpression(<string|number>timings, errors, allowNegativeValues);\n}\n\nfunction parseTimeExpression(\n    exp: string | number, errors: string[], allowNegativeValues?: boolean): AnimateTimings {\n  const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n  let duration: number;\n  let delay: number = 0;\n  let easing: string = '';\n  if (typeof exp === 'string') {\n    const matches = exp.match(regex);\n    if (matches === null) {\n      errors.push(`The provided timing value \"${exp}\" is invalid.`);\n      return {duration: 0, delay: 0, easing: ''};\n    }\n\n    duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n    const delayMatch = matches[3];\n    if (delayMatch != null) {\n      delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n    }\n\n    const easingVal = matches[5];\n    if (easingVal) {\n      easing = easingVal;\n    }\n  } else {\n    duration = <number>exp;\n  }\n\n  if (!allowNegativeValues) {\n    let containsErrors = false;\n    let startIndex = errors.length;\n    if (duration < 0) {\n      errors.push(`Duration values below 0 are not allowed for this animation step.`);\n      containsErrors = true;\n    }\n    if (delay < 0) {\n      errors.push(`Delay values below 0 are not allowed for this animation step.`);\n      containsErrors = true;\n    }\n    if (containsErrors) {\n      errors.splice(startIndex, 0, `The provided timing value \"${exp}\" is invalid.`);\n    }\n  }\n\n  return {duration, delay, easing};\n}\n\nexport function copyObj(\n    obj: {[key: string]: any}, destination: {[key: string]: any} = {}): {[key: string]: any} {\n  Object.keys(obj).forEach(prop => { destination[prop] = obj[prop]; });\n  return destination;\n}\n\nexport function normalizeStyles(styles: ÉµStyleData | ÉµStyleData[]): ÉµStyleData {\n  const normalizedStyles: ÉµStyleData = {};\n  if (Array.isArray(styles)) {\n    styles.forEach(data => copyStyles(data, false, normalizedStyles));\n  } else {\n    copyStyles(styles, false, normalizedStyles);\n  }\n  return normalizedStyles;\n}\n\nexport function copyStyles(\n    styles: ÉµStyleData, readPrototype: boolean, destination: ÉµStyleData = {}): ÉµStyleData {\n  if (readPrototype) {\n    // we make use of a for-in loop so that the\n    // prototypically inherited properties are\n    // revealed from the backFill map\n    for (let prop in styles) {\n      destination[prop] = styles[prop];\n    }\n  } else {\n    copyObj(styles, destination);\n  }\n  return destination;\n}\n\nfunction getStyleAttributeString(element: any, key: string, value: string) {\n  // Return the key-value pair string to be added to the style attribute for the\n  // given CSS style key.\n  if (value) {\n    return key + ':' + value + ';';\n  } else {\n    return '';\n  }\n}\n\nfunction writeStyleAttribute(element: any) {\n  // Read the style property of the element and manually reflect it to the\n  // style attribute. This is needed because Domino on platform-server doesn't\n  // understand the full set of allowed CSS properties and doesn't reflect some\n  // of them automatically.\n  let styleAttrValue = '';\n  for (let i = 0; i < element.style.length; i++) {\n    const key = element.style.item(i);\n    styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n  }\n  for (const key in element.style) {\n    // Skip internal Domino properties that don't need to be reflected.\n    if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n      continue;\n    }\n    const dashKey = camelCaseToDashCase(key);\n    styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n  }\n  element.setAttribute('style', styleAttrValue);\n}\n\nexport function setStyles(element: any, styles: ÉµStyleData, formerStyles?: {[key: string]: any}) {\n  if (element['style']) {\n    Object.keys(styles).forEach(prop => {\n      const camelProp = dashCaseToCamelCase(prop);\n      if (formerStyles && !formerStyles.hasOwnProperty(prop)) {\n        formerStyles[prop] = element.style[camelProp];\n      }\n      element.style[camelProp] = styles[prop];\n    });\n    // On the server set the 'style' attribute since it's not automatically reflected.\n    if (isNode()) {\n      writeStyleAttribute(element);\n    }\n  }\n}\n\nexport function eraseStyles(element: any, styles: ÉµStyleData) {\n  if (element['style']) {\n    Object.keys(styles).forEach(prop => {\n      const camelProp = dashCaseToCamelCase(prop);\n      element.style[camelProp] = '';\n    });\n    // On the server set the 'style' attribute since it's not automatically reflected.\n    if (isNode()) {\n      writeStyleAttribute(element);\n    }\n  }\n}\n\nexport function normalizeAnimationEntry(steps: AnimationMetadata | AnimationMetadata[]):\n    AnimationMetadata {\n  if (Array.isArray(steps)) {\n    if (steps.length == 1) return steps[0];\n    return sequence(steps);\n  }\n  return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n    value: string | number, options: AnimationOptions, errors: any[]) {\n  const params = options.params || {};\n  const matches = extractStyleParams(value);\n  if (matches.length) {\n    matches.forEach(varName => {\n      if (!params.hasOwnProperty(varName)) {\n        errors.push(\n            `Unable to resolve the local animation param ${varName} in the given list of values`);\n      }\n    });\n  }\n}\n\nconst PARAM_REGEX =\n    new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nexport function extractStyleParams(value: string | number): string[] {\n  let params: string[] = [];\n  if (typeof value === 'string') {\n    const val = value.toString();\n\n    let match: any;\n    while (match = PARAM_REGEX.exec(val)) {\n      params.push(match[1] as string);\n    }\n    PARAM_REGEX.lastIndex = 0;\n  }\n  return params;\n}\n\nexport function interpolateParams(\n    value: string | number, params: {[name: string]: any}, errors: any[]): string|number {\n  const original = value.toString();\n  const str = original.replace(PARAM_REGEX, (_, varName) => {\n    let localVal = params[varName];\n    // this means that the value was never overridden by the data passed in by the user\n    if (!params.hasOwnProperty(varName)) {\n      errors.push(`Please provide a value for the animation param ${varName}`);\n      localVal = '';\n    }\n    return localVal.toString();\n  });\n\n  // we do this to assert that numeric values stay as they are\n  return str == original ? value : str;\n}\n\nexport function iteratorToArray(iterator: any): any[] {\n  const arr: any[] = [];\n  let item = iterator.next();\n  while (!item.done) {\n    arr.push(item.value);\n    item = iterator.next();\n  }\n  return arr;\n}\n\nexport function mergeAnimationOptions(\n    source: AnimationOptions, destination: AnimationOptions): AnimationOptions {\n  if (source.params) {\n    const p0 = source.params;\n    if (!destination.params) {\n      destination.params = {};\n    }\n    const p1 = destination.params;\n    Object.keys(p0).forEach(param => {\n      if (!p1.hasOwnProperty(param)) {\n        p1[param] = p0[param];\n      }\n    });\n  }\n  return destination;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n  return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nfunction camelCaseToDashCase(input: string): string {\n  return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n  return duration === 0 || delay === 0;\n}\n\nexport function balancePreviousStylesIntoKeyframes(\n    element: any, keyframes: {[key: string]: any}[], previousStyles: {[key: string]: any}) {\n  const previousStyleProps = Object.keys(previousStyles);\n  if (previousStyleProps.length && keyframes.length) {\n    let startingKeyframe = keyframes[0];\n    let missingStyleProps: string[] = [];\n    previousStyleProps.forEach(prop => {\n      if (!startingKeyframe.hasOwnProperty(prop)) {\n        missingStyleProps.push(prop);\n      }\n      startingKeyframe[prop] = previousStyles[prop];\n    });\n\n    if (missingStyleProps.length) {\n      // tslint:disable-next-line\n      for (var i = 1; i < keyframes.length; i++) {\n        let kf = keyframes[i];\n        missingStyleProps.forEach(function(prop) { kf[prop] = computeStyle(element, prop); });\n      }\n    }\n  }\n  return keyframes;\n}\n\nexport function visitDslNode(\n    visitor: AnimationDslVisitor, node: AnimationMetadata, context: any): any;\nexport function visitDslNode(\n    visitor: AnimationAstVisitor, node: AnimationAst<AnimationMetadataType>, context: any): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n  switch (node.type) {\n    case AnimationMetadataType.Trigger:\n      return visitor.visitTrigger(node, context);\n    case AnimationMetadataType.State:\n      return visitor.visitState(node, context);\n    case AnimationMetadataType.Transition:\n      return visitor.visitTransition(node, context);\n    case AnimationMetadataType.Sequence:\n      return visitor.visitSequence(node, context);\n    case AnimationMetadataType.Group:\n      return visitor.visitGroup(node, context);\n    case AnimationMetadataType.Animate:\n      return visitor.visitAnimate(node, context);\n    case AnimationMetadataType.Keyframes:\n      return visitor.visitKeyframes(node, context);\n    case AnimationMetadataType.Style:\n      return visitor.visitStyle(node, context);\n    case AnimationMetadataType.Reference:\n      return visitor.visitReference(node, context);\n    case AnimationMetadataType.AnimateChild:\n      return visitor.visitAnimateChild(node, context);\n    case AnimationMetadataType.AnimateRef:\n      return visitor.visitAnimateRef(node, context);\n    case AnimationMetadataType.Query:\n      return visitor.visitQuery(node, context);\n    case AnimationMetadataType.Stagger:\n      return visitor.visitStagger(node, context);\n    default:\n      throw new Error(`Unable to resolve animation metadata node #${node.type}`);\n  }\n}\n\nexport function computeStyle(element: any, prop: string): string {\n  return (<any>window.getComputedStyle(element))[prop];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport const ANY_STATE = '*';\nexport declare type TransitionMatcherFn =\n    (fromState: any, toState: any, element: any, params: {[key: string]: any}) => boolean;\n\nexport function parseTransitionExpr(\n    transitionValue: string | TransitionMatcherFn, errors: string[]): TransitionMatcherFn[] {\n  const expressions: TransitionMatcherFn[] = [];\n  if (typeof transitionValue == 'string') {\n    (<string>transitionValue)\n        .split(/\\s*,\\s*/)\n        .forEach(str => parseInnerTransitionStr(str, expressions, errors));\n  } else {\n    expressions.push(<TransitionMatcherFn>transitionValue);\n  }\n  return expressions;\n}\n\nfunction parseInnerTransitionStr(\n    eventStr: string, expressions: TransitionMatcherFn[], errors: string[]) {\n  if (eventStr[0] == ':') {\n    const result = parseAnimationAlias(eventStr, errors);\n    if (typeof result == 'function') {\n      expressions.push(result);\n      return;\n    }\n    eventStr = result as string;\n  }\n\n  const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n  if (match == null || match.length < 4) {\n    errors.push(`The provided transition expression \"${eventStr}\" is not supported`);\n    return expressions;\n  }\n\n  const fromState = match[1];\n  const separator = match[2];\n  const toState = match[3];\n  expressions.push(makeLambdaFromStates(fromState, toState));\n\n  const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n  if (separator[0] == '<' && !isFullAnyStateExpr) {\n    expressions.push(makeLambdaFromStates(toState, fromState));\n  }\n}\n\nfunction parseAnimationAlias(alias: string, errors: string[]): string|TransitionMatcherFn {\n  switch (alias) {\n    case ':enter':\n      return 'void => *';\n    case ':leave':\n      return '* => void';\n    case ':increment':\n      return (fromState: any, toState: any): boolean => parseFloat(toState) > parseFloat(fromState);\n    case ':decrement':\n      return (fromState: any, toState: any): boolean => parseFloat(toState) < parseFloat(fromState);\n    default:\n      errors.push(`The transition alias value \"${alias}\" is not supported`);\n      return '* => *';\n  }\n}\n\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set<string>(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set<string>(['false', '0']);\n\nfunction makeLambdaFromStates(lhs: string, rhs: string): TransitionMatcherFn {\n  const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n  const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n\n  return (fromState: any, toState: any): boolean => {\n    let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n    let rhsMatch = rhs == ANY_STATE || rhs == toState;\n\n    if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n      lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n    }\n    if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n      rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n    }\n\n    return lhsMatch && rhsMatch;\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, style, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetAsInMap} from '../render/shared';\nimport {ENTER_SELECTOR, LEAVE_SELECTOR, NG_ANIMATING_SELECTOR, NG_TRIGGER_SELECTOR, SUBSTITUTION_EXPR_START, copyObj, extractStyleParams, iteratorToArray, normalizeAnimationEntry, resolveTiming, validateStyleParams, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationDslVisitor} from './animation_dsl_visitor';\nimport {parseTransitionExpr} from './animation_transition_expr';\n\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n *   - No offsets are used at all\n *   - Each style() entry contains an offset value\n *   - Each offset is between 0 and 1\n *   - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nexport function buildAnimationAst(\n    driver: AnimationDriver, metadata: AnimationMetadata | AnimationMetadata[],\n    errors: any[]): Ast<AnimationMetadataType> {\n  return new AnimationAstBuilderVisitor(driver).build(metadata, errors);\n}\n\nconst ROOT_SELECTOR = '';\n\nexport class AnimationAstBuilderVisitor implements AnimationDslVisitor {\n  constructor(private _driver: AnimationDriver) {}\n\n  build(metadata: AnimationMetadata|AnimationMetadata[], errors: any[]):\n      Ast<AnimationMetadataType> {\n    const context = new AnimationAstBuilderContext(errors);\n    this._resetContextStyleTimingState(context);\n    return <Ast<AnimationMetadataType>>visitDslNode(\n        this, normalizeAnimationEntry(metadata), context);\n  }\n\n  private _resetContextStyleTimingState(context: AnimationAstBuilderContext) {\n    context.currentQuerySelector = ROOT_SELECTOR;\n    context.collectedStyles = {};\n    context.collectedStyles[ROOT_SELECTOR] = {};\n    context.currentTime = 0;\n  }\n\n  visitTrigger(metadata: AnimationTriggerMetadata, context: AnimationAstBuilderContext):\n      TriggerAst {\n    let queryCount = context.queryCount = 0;\n    let depCount = context.depCount = 0;\n    const states: StateAst[] = [];\n    const transitions: TransitionAst[] = [];\n    if (metadata.name.charAt(0) == '@') {\n      context.errors.push(\n          'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n    }\n\n    metadata.definitions.forEach(def => {\n      this._resetContextStyleTimingState(context);\n      if (def.type == AnimationMetadataType.State) {\n        const stateDef = def as AnimationStateMetadata;\n        const name = stateDef.name;\n        name.toString().split(/\\s*,\\s*/).forEach(n => {\n          stateDef.name = n;\n          states.push(this.visitState(stateDef, context));\n        });\n        stateDef.name = name;\n      } else if (def.type == AnimationMetadataType.Transition) {\n        const transition = this.visitTransition(def as AnimationTransitionMetadata, context);\n        queryCount += transition.queryCount;\n        depCount += transition.depCount;\n        transitions.push(transition);\n      } else {\n        context.errors.push(\n            'only state() and transition() definitions can sit inside of a trigger()');\n      }\n    });\n\n    return {\n      type: AnimationMetadataType.Trigger,\n      name: metadata.name, states, transitions, queryCount, depCount,\n      options: null\n    };\n  }\n\n  visitState(metadata: AnimationStateMetadata, context: AnimationAstBuilderContext): StateAst {\n    const styleAst = this.visitStyle(metadata.styles, context);\n    const astParams = (metadata.options && metadata.options.params) || null;\n    if (styleAst.containsDynamicStyles) {\n      const missingSubs = new Set<string>();\n      const params = astParams || {};\n      styleAst.styles.forEach(value => {\n        if (isObject(value)) {\n          const stylesObj = value as any;\n          Object.keys(stylesObj).forEach(prop => {\n            extractStyleParams(stylesObj[prop]).forEach(sub => {\n              if (!params.hasOwnProperty(sub)) {\n                missingSubs.add(sub);\n              }\n            });\n          });\n        }\n      });\n      if (missingSubs.size) {\n        const missingSubsArr = iteratorToArray(missingSubs.values());\n        context.errors.push(\n            `state(\"${metadata.name}\", ...) must define default values for all the following style substitutions: ${missingSubsArr.join(', ')}`);\n      }\n    }\n\n    return {\n      type: AnimationMetadataType.State,\n      name: metadata.name,\n      style: styleAst,\n      options: astParams ? {params: astParams} : null\n    };\n  }\n\n  visitTransition(metadata: AnimationTransitionMetadata, context: AnimationAstBuilderContext):\n      TransitionAst {\n    context.queryCount = 0;\n    context.depCount = 0;\n    const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n    const matchers = parseTransitionExpr(metadata.expr, context.errors);\n\n    return {\n      type: AnimationMetadataType.Transition,\n      matchers,\n      animation,\n      queryCount: context.queryCount,\n      depCount: context.depCount,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitSequence(metadata: AnimationSequenceMetadata, context: AnimationAstBuilderContext):\n      SequenceAst {\n    return {\n      type: AnimationMetadataType.Sequence,\n      steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitGroup(metadata: AnimationGroupMetadata, context: AnimationAstBuilderContext): GroupAst {\n    const currentTime = context.currentTime;\n    let furthestTime = 0;\n    const steps = metadata.steps.map(step => {\n      context.currentTime = currentTime;\n      const innerAst = visitDslNode(this, step, context);\n      furthestTime = Math.max(furthestTime, context.currentTime);\n      return innerAst;\n    });\n\n    context.currentTime = furthestTime;\n    return {\n      type: AnimationMetadataType.Group,\n      steps,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimate(metadata: AnimationAnimateMetadata, context: AnimationAstBuilderContext):\n      AnimateAst {\n    const timingAst = constructTimingAst(metadata.timings, context.errors);\n    context.currentAnimateTimings = timingAst;\n\n    let styleAst: StyleAst|KeyframesAst;\n    let styleMetadata: AnimationMetadata = metadata.styles ? metadata.styles : style({});\n    if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n      styleAst = this.visitKeyframes(styleMetadata as AnimationKeyframesSequenceMetadata, context);\n    } else {\n      let styleMetadata = metadata.styles as AnimationStyleMetadata;\n      let isEmpty = false;\n      if (!styleMetadata) {\n        isEmpty = true;\n        const newStyleData: {[prop: string]: string | number} = {};\n        if (timingAst.easing) {\n          newStyleData['easing'] = timingAst.easing;\n        }\n        styleMetadata = style(newStyleData);\n      }\n      context.currentTime += timingAst.duration + timingAst.delay;\n      const _styleAst = this.visitStyle(styleMetadata, context);\n      _styleAst.isEmptyStep = isEmpty;\n      styleAst = _styleAst;\n    }\n\n    context.currentAnimateTimings = null;\n    return {\n      type: AnimationMetadataType.Animate,\n      timings: timingAst,\n      style: styleAst,\n      options: null\n    };\n  }\n\n  visitStyle(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext): StyleAst {\n    const ast = this._makeStyleAst(metadata, context);\n    this._validateStyleAst(ast, context);\n    return ast;\n  }\n\n  private _makeStyleAst(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext):\n      StyleAst {\n    const styles: (ÉµStyleData | string)[] = [];\n    if (Array.isArray(metadata.styles)) {\n      (metadata.styles as(ÉµStyleData | string)[]).forEach(styleTuple => {\n        if (typeof styleTuple == 'string') {\n          if (styleTuple == AUTO_STYLE) {\n            styles.push(styleTuple as string);\n          } else {\n            context.errors.push(`The provided style string value ${styleTuple} is not allowed.`);\n          }\n        } else {\n          styles.push(styleTuple as ÉµStyleData);\n        }\n      });\n    } else {\n      styles.push(metadata.styles);\n    }\n\n    let containsDynamicStyles = false;\n    let collectedEasing: string|null = null;\n    styles.forEach(styleData => {\n      if (isObject(styleData)) {\n        const styleMap = styleData as ÉµStyleData;\n        const easing = styleMap['easing'];\n        if (easing) {\n          collectedEasing = easing as string;\n          delete styleMap['easing'];\n        }\n        if (!containsDynamicStyles) {\n          for (let prop in styleMap) {\n            const value = styleMap[prop];\n            if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n              containsDynamicStyles = true;\n              break;\n            }\n          }\n        }\n      }\n    });\n\n    return {\n      type: AnimationMetadataType.Style,\n      styles,\n      easing: collectedEasing,\n      offset: metadata.offset, containsDynamicStyles,\n      options: null\n    };\n  }\n\n  private _validateStyleAst(ast: StyleAst, context: AnimationAstBuilderContext): void {\n    const timings = context.currentAnimateTimings;\n    let endTime = context.currentTime;\n    let startTime = context.currentTime;\n    if (timings && startTime > 0) {\n      startTime -= timings.duration + timings.delay;\n    }\n\n    ast.styles.forEach(tuple => {\n      if (typeof tuple == 'string') return;\n\n      Object.keys(tuple).forEach(prop => {\n        if (!this._driver.validateStyleProperty(prop)) {\n          context.errors.push(\n              `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n          return;\n        }\n\n        const collectedStyles = context.collectedStyles[context.currentQuerySelector !];\n        const collectedEntry = collectedStyles[prop];\n        let updateCollectedStyle = true;\n        if (collectedEntry) {\n          if (startTime != endTime && startTime >= collectedEntry.startTime &&\n              endTime <= collectedEntry.endTime) {\n            context.errors.push(\n                `The CSS property \"${prop}\" that exists between the times of \"${collectedEntry.startTime}ms\" and \"${collectedEntry.endTime}ms\" is also being animated in a parallel animation between the times of \"${startTime}ms\" and \"${endTime}ms\"`);\n            updateCollectedStyle = false;\n          }\n\n          // we always choose the smaller start time value since we\n          // want to have a record of the entire animation window where\n          // the style property is being animated in between\n          startTime = collectedEntry.startTime;\n        }\n\n        if (updateCollectedStyle) {\n          collectedStyles[prop] = {startTime, endTime};\n        }\n\n        if (context.options) {\n          validateStyleParams(tuple[prop], context.options, context.errors);\n        }\n      });\n    });\n  }\n\n  visitKeyframes(metadata: AnimationKeyframesSequenceMetadata, context: AnimationAstBuilderContext):\n      KeyframesAst {\n    const ast: KeyframesAst = {type: AnimationMetadataType.Keyframes, styles: [], options: null};\n    if (!context.currentAnimateTimings) {\n      context.errors.push(`keyframes() must be placed inside of a call to animate()`);\n      return ast;\n    }\n\n    const MAX_KEYFRAME_OFFSET = 1;\n\n    let totalKeyframesWithOffsets = 0;\n    const offsets: number[] = [];\n    let offsetsOutOfOrder = false;\n    let keyframesOutOfRange = false;\n    let previousOffset: number = 0;\n\n    const keyframes: StyleAst[] = metadata.steps.map(styles => {\n      const style = this._makeStyleAst(styles, context);\n      let offsetVal: number|null =\n          style.offset != null ? style.offset : consumeOffset(style.styles);\n      let offset: number = 0;\n      if (offsetVal != null) {\n        totalKeyframesWithOffsets++;\n        offset = style.offset = offsetVal;\n      }\n      keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n      offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n      previousOffset = offset;\n      offsets.push(offset);\n      return style;\n    });\n\n    if (keyframesOutOfRange) {\n      context.errors.push(`Please ensure that all keyframe offsets are between 0 and 1`);\n    }\n\n    if (offsetsOutOfOrder) {\n      context.errors.push(`Please ensure that all keyframe offsets are in order`);\n    }\n\n    const length = metadata.steps.length;\n    let generatedOffset = 0;\n    if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n      context.errors.push(`Not all style() steps within the declared keyframes() contain offsets`);\n    } else if (totalKeyframesWithOffsets == 0) {\n      generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n    }\n\n    const limit = length - 1;\n    const currentTime = context.currentTime;\n    const currentAnimateTimings = context.currentAnimateTimings !;\n    const animateDuration = currentAnimateTimings.duration;\n    keyframes.forEach((kf, i) => {\n      const offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n      const durationUpToThisFrame = offset * animateDuration;\n      context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n      currentAnimateTimings.duration = durationUpToThisFrame;\n      this._validateStyleAst(kf, context);\n      kf.offset = offset;\n\n      ast.styles.push(kf);\n    });\n\n    return ast;\n  }\n\n  visitReference(metadata: AnimationReferenceMetadata, context: AnimationAstBuilderContext):\n      ReferenceAst {\n    return {\n      type: AnimationMetadataType.Reference,\n      animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimateChild(metadata: AnimationAnimateChildMetadata, context: AnimationAstBuilderContext):\n      AnimateChildAst {\n    context.depCount++;\n    return {\n      type: AnimationMetadataType.AnimateChild,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimateRef(metadata: AnimationAnimateRefMetadata, context: AnimationAstBuilderContext):\n      AnimateRefAst {\n    return {\n      type: AnimationMetadataType.AnimateRef,\n      animation: this.visitReference(metadata.animation, context),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitQuery(metadata: AnimationQueryMetadata, context: AnimationAstBuilderContext): QueryAst {\n    const parentSelector = context.currentQuerySelector !;\n    const options = (metadata.options || {}) as AnimationQueryOptions;\n\n    context.queryCount++;\n    context.currentQuery = metadata;\n    const [selector, includeSelf] = normalizeSelector(metadata.selector);\n    context.currentQuerySelector =\n        parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n    getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n\n    const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n    context.currentQuery = null;\n    context.currentQuerySelector = parentSelector;\n\n    return {\n      type: AnimationMetadataType.Query,\n      selector,\n      limit: options.limit || 0,\n      optional: !!options.optional, includeSelf, animation,\n      originalSelector: metadata.selector,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitStagger(metadata: AnimationStaggerMetadata, context: AnimationAstBuilderContext):\n      StaggerAst {\n    if (!context.currentQuery) {\n      context.errors.push(`stagger() can only be used inside of query()`);\n    }\n    const timings = metadata.timings === 'full' ?\n        {duration: 0, delay: 0, easing: 'full'} :\n        resolveTiming(metadata.timings, context.errors, true);\n\n    return {\n      type: AnimationMetadataType.Stagger,\n      animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings,\n      options: null\n    };\n  }\n}\n\nfunction normalizeSelector(selector: string): [string, boolean] {\n  const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n  if (hasAmpersand) {\n    selector = selector.replace(SELF_TOKEN_REGEX, '');\n  }\n\n  // the :enter and :leave selectors are filled in at runtime during timeline building\n  selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n                 .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.substr(1))\n                 .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n\n  return [selector, hasAmpersand];\n}\n\n\nfunction normalizeParams(obj: {[key: string]: any} | any): {[key: string]: any}|null {\n  return obj ? copyObj(obj) : null;\n}\n\nexport type StyleTimeTuple = {\n  startTime: number; endTime: number;\n};\n\nexport class AnimationAstBuilderContext {\n  public queryCount: number = 0;\n  public depCount: number = 0;\n  public currentTransition: AnimationTransitionMetadata|null = null;\n  public currentQuery: AnimationQueryMetadata|null = null;\n  public currentQuerySelector: string|null = null;\n  public currentAnimateTimings: TimingAst|null = null;\n  public currentTime: number = 0;\n  public collectedStyles: {[selectorName: string]: {[propName: string]: StyleTimeTuple}} = {};\n  public options: AnimationOptions|null = null;\n  constructor(public errors: any[]) {}\n}\n\nfunction consumeOffset(styles: ÉµStyleData | string | (ÉµStyleData | string)[]): number|null {\n  if (typeof styles == 'string') return null;\n\n  let offset: number|null = null;\n\n  if (Array.isArray(styles)) {\n    styles.forEach(styleTuple => {\n      if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {\n        const obj = styleTuple as ÉµStyleData;\n        offset = parseFloat(obj['offset'] as string);\n        delete obj['offset'];\n      }\n    });\n  } else if (isObject(styles) && styles.hasOwnProperty('offset')) {\n    const obj = styles as ÉµStyleData;\n    offset = parseFloat(obj['offset'] as string);\n    delete obj['offset'];\n  }\n  return offset;\n}\n\nfunction isObject(value: any): boolean {\n  return !Array.isArray(value) && typeof value == 'object';\n}\n\nfunction constructTimingAst(value: string | number | AnimateTimings, errors: any[]) {\n  let timings: AnimateTimings|null = null;\n  if (value.hasOwnProperty('duration')) {\n    timings = value as AnimateTimings;\n  } else if (typeof value == 'number') {\n    const duration = resolveTiming(value as number, errors).duration;\n    return makeTimingAst(duration as number, 0, '');\n  }\n\n  const strValue = value as string;\n  const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n  if (isDynamic) {\n    const ast = makeTimingAst(0, 0, '') as any;\n    ast.dynamic = true;\n    ast.strValue = strValue;\n    return ast as DynamicTimingAst;\n  }\n\n  timings = timings || resolveTiming(strValue, errors);\n  return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\n\nfunction normalizeAnimationOptions(options: AnimationOptions | null): AnimationOptions {\n  if (options) {\n    options = copyObj(options);\n    if (options['params']) {\n      options['params'] = normalizeParams(options['params']) !;\n    }\n  } else {\n    options = {};\n  }\n  return options;\n}\n\nfunction makeTimingAst(duration: number, delay: number, easing: string | null): TimingAst {\n  return {duration, delay, easing};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ÉµStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\n\nexport interface AnimationTimelineInstruction extends AnimationEngineInstruction {\n  element: any;\n  keyframes: ÉµStyleData[];\n  preStyleProps: string[];\n  postStyleProps: string[];\n  duration: number;\n  delay: number;\n  totalTime: number;\n  easing: string|null;\n  stretchStartingKeyframe?: boolean;\n  subTimeline: boolean;\n}\n\nexport function createTimelineInstruction(\n    element: any, keyframes: ÉµStyleData[], preStyleProps: string[], postStyleProps: string[],\n    duration: number, delay: number, easing: string | null = null,\n    subTimeline: boolean = false): AnimationTimelineInstruction {\n  return {\n    type: AnimationTransitionInstructionType.TimelineAnimation,\n    element,\n    keyframes,\n    preStyleProps,\n    postStyleProps,\n    duration,\n    delay,\n    totalTime: duration + delay, easing, subTimeline\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport class ElementInstructionMap {\n  private _map = new Map<any, AnimationTimelineInstruction[]>();\n\n  consume(element: any): AnimationTimelineInstruction[] {\n    let instructions = this._map.get(element);\n    if (instructions) {\n      this._map.delete(element);\n    } else {\n      instructions = [];\n    }\n    return instructions;\n  }\n\n  append(element: any, instructions: AnimationTimelineInstruction[]) {\n    let existingInstructions = this._map.get(element);\n    if (!existingInstructions) {\n      this._map.set(element, existingInstructions = []);\n    }\n    existingInstructions.push(...instructions);\n  }\n\n  has(element: any): boolean { return this._map.has(element); }\n\n  clear() { this._map.clear(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimateChildOptions, AnimateTimings, AnimationMetadataType, AnimationOptions, AnimationQueryOptions, ÉµPRE_STYLE as PRE_STYLE, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {copyObj, copyStyles, interpolateParams, iteratorToArray, resolveTiming, resolveTimingValue, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, AstVisitor, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationTimelineInstruction, createTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n *   style({ opacity: 0 }),\n *   animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of prototypical inheritance, AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two wihtin a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergesort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n *   style({ width: 0 }),\n *   animate(1000, style({ width: 100 })),\n *   animate(1000, style({ width: 200 })),\n *   animate(1000, style({ width: 300 }))\n *   animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill object. Given that each of the keyframe\n * styles are objects that prototypically inhert from the backFill object, this means that if a\n * value is added into the backFill then it will automatically propagate any missing values to all\n * keyframes. Therefore the missing `height` value will be properly filled into the already\n * processed keyframes.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * (For prototypically-inherited contents to be detected a `for(i in obj)` loop must be used.)\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nexport function buildAnimationTimelines(\n    driver: AnimationDriver, rootElement: any, ast: Ast<AnimationMetadataType>,\n    enterClassName: string, leaveClassName: string, startingStyles: ÉµStyleData = {},\n    finalStyles: ÉµStyleData = {}, options: AnimationOptions,\n    subInstructions?: ElementInstructionMap, errors: any[] = []): AnimationTimelineInstruction[] {\n  return new AnimationTimelineBuilderVisitor().buildKeyframes(\n      driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles,\n      options, subInstructions, errors);\n}\n\nexport class AnimationTimelineBuilderVisitor implements AstVisitor {\n  buildKeyframes(\n      driver: AnimationDriver, rootElement: any, ast: Ast<AnimationMetadataType>,\n      enterClassName: string, leaveClassName: string, startingStyles: ÉµStyleData,\n      finalStyles: ÉµStyleData, options: AnimationOptions, subInstructions?: ElementInstructionMap,\n      errors: any[] = []): AnimationTimelineInstruction[] {\n    subInstructions = subInstructions || new ElementInstructionMap();\n    const context = new AnimationTimelineContext(\n        driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n    context.options = options;\n    context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n\n    visitDslNode(this, ast, context);\n\n    // this checks to see if an actual animation happened\n    const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n    if (timelines.length && Object.keys(finalStyles).length) {\n      const tl = timelines[timelines.length - 1];\n      if (!tl.allowOnlyTimelineStyles()) {\n        tl.setStyles([finalStyles], null, context.errors, options);\n      }\n    }\n\n    return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) :\n                              [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n  }\n\n  visitTrigger(ast: TriggerAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitState(ast: StateAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitTransition(ast: TransitionAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitAnimateChild(ast: AnimateChildAst, context: AnimationTimelineContext): any {\n    const elementInstructions = context.subInstructions.consume(context.element);\n    if (elementInstructions) {\n      const innerContext = context.createSubContext(ast.options);\n      const startTime = context.currentTimeline.currentTime;\n      const endTime = this._visitSubInstructions(\n          elementInstructions, innerContext, innerContext.options as AnimateChildOptions);\n      if (startTime != endTime) {\n        // we do this on the upper context because we created a sub context for\n        // the sub child animations\n        context.transformIntoNewTimeline(endTime);\n      }\n    }\n    context.previousNode = ast;\n  }\n\n  visitAnimateRef(ast: AnimateRefAst, context: AnimationTimelineContext): any {\n    const innerContext = context.createSubContext(ast.options);\n    innerContext.transformIntoNewTimeline();\n    this.visitReference(ast.animation, innerContext);\n    context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n    context.previousNode = ast;\n  }\n\n  private _visitSubInstructions(\n      instructions: AnimationTimelineInstruction[], context: AnimationTimelineContext,\n      options: AnimateChildOptions): number {\n    const startTime = context.currentTimeline.currentTime;\n    let furthestTime = startTime;\n\n    // this is a special-case for when a user wants to skip a sub\n    // animation from being fired entirely.\n    const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n    const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n    if (duration !== 0) {\n      instructions.forEach(instruction => {\n        const instructionTimings =\n            context.appendInstructionToTimeline(instruction, duration, delay);\n        furthestTime =\n            Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n      });\n    }\n\n    return furthestTime;\n  }\n\n  visitReference(ast: ReferenceAst, context: AnimationTimelineContext) {\n    context.updateOptions(ast.options, true);\n    visitDslNode(this, ast.animation, context);\n    context.previousNode = ast;\n  }\n\n  visitSequence(ast: SequenceAst, context: AnimationTimelineContext) {\n    const subContextCount = context.subContextCount;\n    let ctx = context;\n    const options = ast.options;\n\n    if (options && (options.params || options.delay)) {\n      ctx = context.createSubContext(options);\n      ctx.transformIntoNewTimeline();\n\n      if (options.delay != null) {\n        if (ctx.previousNode.type == AnimationMetadataType.Style) {\n          ctx.currentTimeline.snapshotCurrentStyles();\n          ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n        }\n\n        const delay = resolveTimingValue(options.delay);\n        ctx.delayNextStep(delay);\n      }\n    }\n\n    if (ast.steps.length) {\n      ast.steps.forEach(s => visitDslNode(this, s, ctx));\n\n      // this is here just incase the inner steps only contain or end with a style() call\n      ctx.currentTimeline.applyStylesToKeyframe();\n\n      // this means that some animation function within the sequence\n      // ended up creating a sub timeline (which means the current\n      // timeline cannot overlap with the contents of the sequence)\n      if (ctx.subContextCount > subContextCount) {\n        ctx.transformIntoNewTimeline();\n      }\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitGroup(ast: GroupAst, context: AnimationTimelineContext) {\n    const innerTimelines: TimelineBuilder[] = [];\n    let furthestTime = context.currentTimeline.currentTime;\n    const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n\n    ast.steps.forEach(s => {\n      const innerContext = context.createSubContext(ast.options);\n      if (delay) {\n        innerContext.delayNextStep(delay);\n      }\n\n      visitDslNode(this, s, innerContext);\n      furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n      innerTimelines.push(innerContext.currentTimeline);\n    });\n\n    // this operation is run after the AST loop because otherwise\n    // if the parent timeline's collected styles were updated then\n    // it would pass in invalid data into the new-to-be forked items\n    innerTimelines.forEach(\n        timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n    context.transformIntoNewTimeline(furthestTime);\n    context.previousNode = ast;\n  }\n\n  private _visitTiming(ast: TimingAst, context: AnimationTimelineContext): AnimateTimings {\n    if ((ast as DynamicTimingAst).dynamic) {\n      const strValue = (ast as DynamicTimingAst).strValue;\n      const timingValue =\n          context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n      return resolveTiming(timingValue, context.errors);\n    } else {\n      return {duration: ast.duration, delay: ast.delay, easing: ast.easing};\n    }\n  }\n\n  visitAnimate(ast: AnimateAst, context: AnimationTimelineContext) {\n    const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n    const timeline = context.currentTimeline;\n    if (timings.delay) {\n      context.incrementTime(timings.delay);\n      timeline.snapshotCurrentStyles();\n    }\n\n    const style = ast.style;\n    if (style.type == AnimationMetadataType.Keyframes) {\n      this.visitKeyframes(style, context);\n    } else {\n      context.incrementTime(timings.duration);\n      this.visitStyle(style as StyleAst, context);\n      timeline.applyStylesToKeyframe();\n    }\n\n    context.currentAnimateTimings = null;\n    context.previousNode = ast;\n  }\n\n  visitStyle(ast: StyleAst, context: AnimationTimelineContext) {\n    const timeline = context.currentTimeline;\n    const timings = context.currentAnimateTimings !;\n\n    // this is a special case for when a style() call\n    // directly follows  an animate() call (but not inside of an animate() call)\n    if (!timings && timeline.getCurrentStyleProperties().length) {\n      timeline.forwardFrame();\n    }\n\n    const easing = (timings && timings.easing) || ast.easing;\n    if (ast.isEmptyStep) {\n      timeline.applyEmptyStep(easing);\n    } else {\n      timeline.setStyles(ast.styles, easing, context.errors, context.options);\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitKeyframes(ast: KeyframesAst, context: AnimationTimelineContext) {\n    const currentAnimateTimings = context.currentAnimateTimings !;\n    const startTime = (context.currentTimeline !).duration;\n    const duration = currentAnimateTimings.duration;\n    const innerContext = context.createSubContext();\n    const innerTimeline = innerContext.currentTimeline;\n    innerTimeline.easing = currentAnimateTimings.easing;\n\n    ast.styles.forEach(step => {\n      const offset: number = step.offset || 0;\n      innerTimeline.forwardTime(offset * duration);\n      innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n      innerTimeline.applyStylesToKeyframe();\n    });\n\n    // this will ensure that the parent timeline gets all the styles from\n    // the child even if the new timeline below is not used\n    context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n\n    // we do this because the window between this timeline and the sub timeline\n    // should ensure that the styles within are exactly the same as they were before\n    context.transformIntoNewTimeline(startTime + duration);\n    context.previousNode = ast;\n  }\n\n  visitQuery(ast: QueryAst, context: AnimationTimelineContext) {\n    // in the event that the first step before this is a style step we need\n    // to ensure the styles are applied before the children are animated\n    const startTime = context.currentTimeline.currentTime;\n    const options = (ast.options || {}) as AnimationQueryOptions;\n    const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n\n    if (delay && (context.previousNode.type === AnimationMetadataType.Style ||\n                  (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {\n      context.currentTimeline.snapshotCurrentStyles();\n      context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n    }\n\n    let furthestTime = startTime;\n    const elms = context.invokeQuery(\n        ast.selector, ast.originalSelector, ast.limit, ast.includeSelf,\n        options.optional ? true : false, context.errors);\n\n    context.currentQueryTotal = elms.length;\n    let sameElementTimeline: TimelineBuilder|null = null;\n    elms.forEach((element, i) => {\n\n      context.currentQueryIndex = i;\n      const innerContext = context.createSubContext(ast.options, element);\n      if (delay) {\n        innerContext.delayNextStep(delay);\n      }\n\n      if (element === context.element) {\n        sameElementTimeline = innerContext.currentTimeline;\n      }\n\n      visitDslNode(this, ast.animation, innerContext);\n\n      // this is here just incase the inner steps only contain or end\n      // with a style() call (which is here to signal that this is a preparatory\n      // call to style an element before it is animated again)\n      innerContext.currentTimeline.applyStylesToKeyframe();\n\n      const endTime = innerContext.currentTimeline.currentTime;\n      furthestTime = Math.max(furthestTime, endTime);\n    });\n\n    context.currentQueryIndex = 0;\n    context.currentQueryTotal = 0;\n    context.transformIntoNewTimeline(furthestTime);\n\n    if (sameElementTimeline) {\n      context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n      context.currentTimeline.snapshotCurrentStyles();\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitStagger(ast: StaggerAst, context: AnimationTimelineContext) {\n    const parentContext = context.parentContext !;\n    const tl = context.currentTimeline;\n    const timings = ast.timings;\n    const duration = Math.abs(timings.duration);\n    const maxTime = duration * (context.currentQueryTotal - 1);\n    let delay = duration * context.currentQueryIndex;\n\n    let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n    switch (staggerTransformer) {\n      case 'reverse':\n        delay = maxTime - delay;\n        break;\n      case 'full':\n        delay = parentContext.currentStaggerTime;\n        break;\n    }\n\n    const timeline = context.currentTimeline;\n    if (delay) {\n      timeline.delayNextStep(delay);\n    }\n\n    const startingTime = timeline.currentTime;\n    visitDslNode(this, ast.animation, context);\n    context.previousNode = ast;\n\n    // time = duration + delay\n    // the reason why this computation is so complex is because\n    // the inner timeline may either have a delay value or a stretched\n    // keyframe depending on if a subtimeline is not used or is used.\n    parentContext.currentStaggerTime =\n        (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n  }\n}\n\nexport declare type StyleAtTime = {\n  time: number; value: string | number;\n};\n\nconst DEFAULT_NOOP_PREVIOUS_NODE = <Ast<AnimationMetadataType>>{};\nexport class AnimationTimelineContext {\n  public parentContext: AnimationTimelineContext|null = null;\n  public currentTimeline: TimelineBuilder;\n  public currentAnimateTimings: AnimateTimings|null = null;\n  public previousNode: Ast<AnimationMetadataType> = DEFAULT_NOOP_PREVIOUS_NODE;\n  public subContextCount = 0;\n  public options: AnimationOptions = {};\n  public currentQueryIndex: number = 0;\n  public currentQueryTotal: number = 0;\n  public currentStaggerTime: number = 0;\n\n  constructor(\n      private _driver: AnimationDriver, public element: any,\n      public subInstructions: ElementInstructionMap, private _enterClassName: string,\n      private _leaveClassName: string, public errors: any[], public timelines: TimelineBuilder[],\n      initialTimeline?: TimelineBuilder) {\n    this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n    timelines.push(this.currentTimeline);\n  }\n\n  get params() { return this.options.params; }\n\n  updateOptions(options: AnimationOptions|null, skipIfExists?: boolean) {\n    if (!options) return;\n\n    const newOptions = options as any;\n    let optionsToUpdate = this.options;\n\n    // NOTE: this will get patched up when other animation methods support duration overrides\n    if (newOptions.duration != null) {\n      (optionsToUpdate as any).duration = resolveTimingValue(newOptions.duration);\n    }\n\n    if (newOptions.delay != null) {\n      optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n    }\n\n    const newParams = newOptions.params;\n    if (newParams) {\n      let paramsToUpdate: {[name: string]: any} = optionsToUpdate.params !;\n      if (!paramsToUpdate) {\n        paramsToUpdate = this.options.params = {};\n      }\n\n      Object.keys(newParams).forEach(name => {\n        if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n          paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n        }\n      });\n    }\n  }\n\n  private _copyOptions() {\n    const options: AnimationOptions = {};\n    if (this.options) {\n      const oldParams = this.options.params;\n      if (oldParams) {\n        const params: {[name: string]: any} = options['params'] = {};\n        Object.keys(oldParams).forEach(name => { params[name] = oldParams[name]; });\n      }\n    }\n    return options;\n  }\n\n  createSubContext(options: AnimationOptions|null = null, element?: any, newTime?: number):\n      AnimationTimelineContext {\n    const target = element || this.element;\n    const context = new AnimationTimelineContext(\n        this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName,\n        this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n    context.previousNode = this.previousNode;\n    context.currentAnimateTimings = this.currentAnimateTimings;\n\n    context.options = this._copyOptions();\n    context.updateOptions(options);\n\n    context.currentQueryIndex = this.currentQueryIndex;\n    context.currentQueryTotal = this.currentQueryTotal;\n    context.parentContext = this;\n    this.subContextCount++;\n    return context;\n  }\n\n  transformIntoNewTimeline(newTime?: number) {\n    this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n    this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n    this.timelines.push(this.currentTimeline);\n    return this.currentTimeline;\n  }\n\n  appendInstructionToTimeline(\n      instruction: AnimationTimelineInstruction, duration: number|null,\n      delay: number|null): AnimateTimings {\n    const updatedTimings: AnimateTimings = {\n      duration: duration != null ? duration : instruction.duration,\n      delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n      easing: ''\n    };\n    const builder = new SubTimelineBuilder(\n        this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps,\n        instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n    this.timelines.push(builder);\n    return updatedTimings;\n  }\n\n  incrementTime(time: number) {\n    this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n  }\n\n  delayNextStep(delay: number) {\n    // negative delays are not yet supported\n    if (delay > 0) {\n      this.currentTimeline.delayNextStep(delay);\n    }\n  }\n\n  invokeQuery(\n      selector: string, originalSelector: string, limit: number, includeSelf: boolean,\n      optional: boolean, errors: any[]): any[] {\n    let results: any[] = [];\n    if (includeSelf) {\n      results.push(this.element);\n    }\n    if (selector.length > 0) {  // if :self is only used then the selector is empty\n      selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n      selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n      const multi = limit != 1;\n      let elements = this._driver.query(this.element, selector, multi);\n      if (limit !== 0) {\n        elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n                               elements.slice(0, limit);\n      }\n      results.push(...elements);\n    }\n\n    if (!optional && results.length == 0) {\n      errors.push(\n          `\\`query(\"${originalSelector}\")\\` returned zero elements. (Use \\`query(\"${originalSelector}\", { optional: true })\\` if you wish to allow this.)`);\n    }\n    return results;\n  }\n}\n\n\nexport class TimelineBuilder {\n  public duration: number = 0;\n  // TODO(issue/24571): remove '!'.\n  public easing !: string | null;\n  private _previousKeyframe: ÉµStyleData = {};\n  private _currentKeyframe: ÉµStyleData = {};\n  private _keyframes = new Map<number, ÉµStyleData>();\n  private _styleSummary: {[prop: string]: StyleAtTime} = {};\n  private _localTimelineStyles: ÉµStyleData;\n  private _globalTimelineStyles: ÉµStyleData;\n  private _pendingStyles: ÉµStyleData = {};\n  private _backFill: ÉµStyleData = {};\n  private _currentEmptyStepKeyframe: ÉµStyleData|null = null;\n\n  constructor(\n      private _driver: AnimationDriver, public element: any, public startTime: number,\n      private _elementTimelineStylesLookup?: Map<any, ÉµStyleData>) {\n    if (!this._elementTimelineStylesLookup) {\n      this._elementTimelineStylesLookup = new Map<any, ÉµStyleData>();\n    }\n\n    this._localTimelineStyles = Object.create(this._backFill, {});\n    this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element) !;\n    if (!this._globalTimelineStyles) {\n      this._globalTimelineStyles = this._localTimelineStyles;\n      this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n    }\n    this._loadKeyframe();\n  }\n\n  containsAnimation(): boolean {\n    switch (this._keyframes.size) {\n      case 0:\n        return false;\n      case 1:\n        return this.getCurrentStyleProperties().length > 0;\n      default:\n        return true;\n    }\n  }\n\n  getCurrentStyleProperties(): string[] { return Object.keys(this._currentKeyframe); }\n\n  get currentTime() { return this.startTime + this.duration; }\n\n  delayNextStep(delay: number) {\n    // in the event that a style() step is placed right before a stagger()\n    // and that style() step is the very first style() value in the animation\n    // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n    // properly applies the style() values to work with the stagger...\n    const hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n\n    if (this.duration || hasPreStyleStep) {\n      this.forwardTime(this.currentTime + delay);\n      if (hasPreStyleStep) {\n        this.snapshotCurrentStyles();\n      }\n    } else {\n      this.startTime += delay;\n    }\n  }\n\n  fork(element: any, currentTime?: number): TimelineBuilder {\n    this.applyStylesToKeyframe();\n    return new TimelineBuilder(\n        this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n  }\n\n  private _loadKeyframe() {\n    if (this._currentKeyframe) {\n      this._previousKeyframe = this._currentKeyframe;\n    }\n    this._currentKeyframe = this._keyframes.get(this.duration) !;\n    if (!this._currentKeyframe) {\n      this._currentKeyframe = Object.create(this._backFill, {});\n      this._keyframes.set(this.duration, this._currentKeyframe);\n    }\n  }\n\n  forwardFrame() {\n    this.duration += ONE_FRAME_IN_MILLISECONDS;\n    this._loadKeyframe();\n  }\n\n  forwardTime(time: number) {\n    this.applyStylesToKeyframe();\n    this.duration = time;\n    this._loadKeyframe();\n  }\n\n  private _updateStyle(prop: string, value: string|number) {\n    this._localTimelineStyles[prop] = value;\n    this._globalTimelineStyles[prop] = value;\n    this._styleSummary[prop] = {time: this.currentTime, value};\n  }\n\n  allowOnlyTimelineStyles() { return this._currentEmptyStepKeyframe !== this._currentKeyframe; }\n\n  applyEmptyStep(easing: string|null) {\n    if (easing) {\n      this._previousKeyframe['easing'] = easing;\n    }\n\n    // special case for animate(duration):\n    // all missing styles are filled with a `*` value then\n    // if any destination styles are filled in later on the same\n    // keyframe then they will override the overridden styles\n    // We use `_globalTimelineStyles` here because there may be\n    // styles in previous keyframes that are not present in this timeline\n    Object.keys(this._globalTimelineStyles).forEach(prop => {\n      this._backFill[prop] = this._globalTimelineStyles[prop] || AUTO_STYLE;\n      this._currentKeyframe[prop] = AUTO_STYLE;\n    });\n    this._currentEmptyStepKeyframe = this._currentKeyframe;\n  }\n\n  setStyles(\n      input: (ÉµStyleData|string)[], easing: string|null, errors: any[],\n      options?: AnimationOptions) {\n    if (easing) {\n      this._previousKeyframe['easing'] = easing;\n    }\n\n    const params = (options && options.params) || {};\n    const styles = flattenStyles(input, this._globalTimelineStyles);\n    Object.keys(styles).forEach(prop => {\n      const val = interpolateParams(styles[prop], params, errors);\n      this._pendingStyles[prop] = val;\n      if (!this._localTimelineStyles.hasOwnProperty(prop)) {\n        this._backFill[prop] = this._globalTimelineStyles.hasOwnProperty(prop) ?\n            this._globalTimelineStyles[prop] :\n            AUTO_STYLE;\n      }\n      this._updateStyle(prop, val);\n    });\n  }\n\n  applyStylesToKeyframe() {\n    const styles = this._pendingStyles;\n    const props = Object.keys(styles);\n    if (props.length == 0) return;\n\n    this._pendingStyles = {};\n\n    props.forEach(prop => {\n      const val = styles[prop];\n      this._currentKeyframe[prop] = val;\n    });\n\n    Object.keys(this._localTimelineStyles).forEach(prop => {\n      if (!this._currentKeyframe.hasOwnProperty(prop)) {\n        this._currentKeyframe[prop] = this._localTimelineStyles[prop];\n      }\n    });\n  }\n\n  snapshotCurrentStyles() {\n    Object.keys(this._localTimelineStyles).forEach(prop => {\n      const val = this._localTimelineStyles[prop];\n      this._pendingStyles[prop] = val;\n      this._updateStyle(prop, val);\n    });\n  }\n\n  getFinalKeyframe() { return this._keyframes.get(this.duration); }\n\n  get properties() {\n    const properties: string[] = [];\n    for (let prop in this._currentKeyframe) {\n      properties.push(prop);\n    }\n    return properties;\n  }\n\n  mergeTimelineCollectedStyles(timeline: TimelineBuilder) {\n    Object.keys(timeline._styleSummary).forEach(prop => {\n      const details0 = this._styleSummary[prop];\n      const details1 = timeline._styleSummary[prop];\n      if (!details0 || details1.time > details0.time) {\n        this._updateStyle(prop, details1.value);\n      }\n    });\n  }\n\n  buildKeyframes(): AnimationTimelineInstruction {\n    this.applyStylesToKeyframe();\n    const preStyleProps = new Set<string>();\n    const postStyleProps = new Set<string>();\n    const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n\n    let finalKeyframes: ÉµStyleData[] = [];\n    this._keyframes.forEach((keyframe, time) => {\n      const finalKeyframe = copyStyles(keyframe, true);\n      Object.keys(finalKeyframe).forEach(prop => {\n        const value = finalKeyframe[prop];\n        if (value == PRE_STYLE) {\n          preStyleProps.add(prop);\n        } else if (value == AUTO_STYLE) {\n          postStyleProps.add(prop);\n        }\n      });\n      if (!isEmpty) {\n        finalKeyframe['offset'] = time / this.duration;\n      }\n      finalKeyframes.push(finalKeyframe);\n    });\n\n    const preProps: string[] = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n    const postProps: string[] = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n\n    // special case for a 0-second animation (which is designed just to place styles onscreen)\n    if (isEmpty) {\n      const kf0 = finalKeyframes[0];\n      const kf1 = copyObj(kf0);\n      kf0['offset'] = 0;\n      kf1['offset'] = 1;\n      finalKeyframes = [kf0, kf1];\n    }\n\n    return createTimelineInstruction(\n        this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime,\n        this.easing, false);\n  }\n}\n\nclass SubTimelineBuilder extends TimelineBuilder {\n  public timings: AnimateTimings;\n\n  constructor(\n      driver: AnimationDriver, public element: any, public keyframes: ÉµStyleData[],\n      public preStyleProps: string[], public postStyleProps: string[], timings: AnimateTimings,\n      private _stretchStartingKeyframe: boolean = false) {\n    super(driver, element, timings.delay);\n    this.timings = {duration: timings.duration, delay: timings.delay, easing: timings.easing};\n  }\n\n  containsAnimation(): boolean { return this.keyframes.length > 1; }\n\n  buildKeyframes(): AnimationTimelineInstruction {\n    let keyframes = this.keyframes;\n    let {delay, duration, easing} = this.timings;\n    if (this._stretchStartingKeyframe && delay) {\n      const newKeyframes: ÉµStyleData[] = [];\n      const totalTime = duration + delay;\n      const startingGap = delay / totalTime;\n\n      // the original starting keyframe now starts once the delay is done\n      const newFirstKeyframe = copyStyles(keyframes[0], false);\n      newFirstKeyframe['offset'] = 0;\n      newKeyframes.push(newFirstKeyframe);\n\n      const oldFirstKeyframe = copyStyles(keyframes[0], false);\n      oldFirstKeyframe['offset'] = roundOffset(startingGap);\n      newKeyframes.push(oldFirstKeyframe);\n\n      /*\n        When the keyframe is stretched then it means that the delay before the animation\n        starts is gone. Instead the first keyframe is placed at the start of the animation\n        and it is then copied to where it starts when the original delay is over. This basically\n        means nothing animates during that delay, but the styles are still renderered. For this\n        to work the original offset values that exist in the original keyframes must be \"warped\"\n        so that they can take the new keyframe + delay into account.\n\n        delay=1000, duration=1000, keyframes = 0 .5 1\n\n        turns into\n\n        delay=0, duration=2000, keyframes = 0 .33 .66 1\n       */\n\n      // offsets between 1 ... n -1 are all warped by the keyframe stretch\n      const limit = keyframes.length - 1;\n      for (let i = 1; i <= limit; i++) {\n        let kf = copyStyles(keyframes[i], false);\n        const oldOffset = kf['offset'] as number;\n        const timeAtKeyframe = delay + oldOffset * duration;\n        kf['offset'] = roundOffset(timeAtKeyframe / totalTime);\n        newKeyframes.push(kf);\n      }\n\n      // the new starting keyframe should be added at the start\n      duration = totalTime;\n      delay = 0;\n      easing = '';\n\n      keyframes = newKeyframes;\n    }\n\n    return createTimelineInstruction(\n        this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing,\n        true);\n  }\n}\n\nfunction roundOffset(offset: number, decimalPoints = 3): number {\n  const mult = Math.pow(10, decimalPoints - 1);\n  return Math.round(offset * mult) / mult;\n}\n\nfunction flattenStyles(input: (ÉµStyleData | string)[], allStyles: ÉµStyleData) {\n  const styles: ÉµStyleData = {};\n  let allProperties: string[];\n  input.forEach(token => {\n    if (token === '*') {\n      allProperties = allProperties || Object.keys(allStyles);\n      allProperties.forEach(prop => { styles[prop] = AUTO_STYLE; });\n    } else {\n      copyStyles(token as ÉµStyleData, false, styles);\n    }\n  });\n  return styles;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationMetadataType, AnimationOptions, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME, normalizeStyles} from '../util';\n\nimport {Ast} from './animation_ast';\nimport {buildAnimationAst} from './animation_ast_builder';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nexport class Animation {\n  private _animationAst: Ast<AnimationMetadataType>;\n  constructor(private _driver: AnimationDriver, input: AnimationMetadata|AnimationMetadata[]) {\n    const errors: any[] = [];\n    const ast = buildAnimationAst(_driver, input, errors);\n    if (errors.length) {\n      const errorMessage = `animation validation failed:\\n${errors.join(\"\\n\")}`;\n      throw new Error(errorMessage);\n    }\n    this._animationAst = ast;\n  }\n\n  buildTimelines(\n      element: any, startingStyles: ÉµStyleData|ÉµStyleData[],\n      destinationStyles: ÉµStyleData|ÉµStyleData[], options: AnimationOptions,\n      subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[] {\n    const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n                                                  <ÉµStyleData>startingStyles;\n    const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n                                                    <ÉµStyleData>destinationStyles;\n    const errors: any = [];\n    subInstructions = subInstructions || new ElementInstructionMap();\n    const result = buildAnimationTimelines(\n        this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest,\n        options, subInstructions, errors);\n    if (errors.length) {\n      const errorMessage = `animation building failed:\\n${errors.join(\"\\n\")}`;\n      throw new Error(errorMessage);\n    }\n    return result;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {dashCaseToCamelCase} from '../../util';\n\nimport {AnimationStyleNormalizer} from './animation_style_normalizer';\n\nexport class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n  normalizePropertyName(propertyName: string, errors: string[]): string {\n    return dashCaseToCamelCase(propertyName);\n  }\n\n  normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string {\n    let unit: string = '';\n    const strVal = value.toString().trim();\n\n    if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {\n      if (typeof value === 'number') {\n        unit = 'px';\n      } else {\n        const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n        if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n          errors.push(`Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n        }\n      }\n    }\n    return strVal + unit;\n  }\n}\n\nconst DIMENSIONAL_PROP_MAP =\n    (() => makeBooleanMap(\n         'width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective'\n             .split(',')))();\n\nfunction makeBooleanMap(keys: string[]): {[key: string]: boolean} {\n  const map: {[key: string]: boolean} = {};\n  keys.forEach(key => map[key] = true);\n  return map;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @publicApi\n */\nexport abstract class AnimationStyleNormalizer {\n  abstract normalizePropertyName(propertyName: string, errors: string[]): string;\n  abstract normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string;\n}\n\n/**\n * @publicApi\n */\nexport class NoopAnimationStyleNormalizer {\n  normalizePropertyName(propertyName: string, errors: string[]): string { return propertyName; }\n\n  normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string {\n    return <any>value;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ÉµStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport interface AnimationTransitionInstruction extends AnimationEngineInstruction {\n  element: any;\n  triggerName: string;\n  isRemovalTransition: boolean;\n  fromState: string;\n  fromStyles: ÉµStyleData;\n  toState: string;\n  toStyles: ÉµStyleData;\n  timelines: AnimationTimelineInstruction[];\n  queriedElements: any[];\n  preStyleProps: Map<any, {[prop: string]: boolean}>;\n  postStyleProps: Map<any, {[prop: string]: boolean}>;\n  totalTime: number;\n  errors?: any[];\n}\n\nexport function createTransitionInstruction(\n    element: any, triggerName: string, fromState: string, toState: string,\n    isRemovalTransition: boolean, fromStyles: ÉµStyleData, toStyles: ÉµStyleData,\n    timelines: AnimationTimelineInstruction[], queriedElements: any[],\n    preStyleProps: Map<any, {[prop: string]: boolean}>,\n    postStyleProps: Map<any, {[prop: string]: boolean}>, totalTime: number,\n    errors?: any[]): AnimationTransitionInstruction {\n  return {\n    type: AnimationTransitionInstructionType.TransitionAnimation,\n    element,\n    triggerName,\n    isRemovalTransition,\n    fromState,\n    fromStyles,\n    toState,\n    toStyles,\n    timelines,\n    queriedElements,\n    preStyleProps,\n    postStyleProps,\n    totalTime,\n    errors\n  };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationOptions, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetAsInMap} from '../render/shared';\nimport {copyObj, interpolateParams, iteratorToArray, mergeAnimationOptions} from '../util';\n\nimport {StyleAst, TransitionAst} from './animation_ast';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {TransitionMatcherFn} from './animation_transition_expr';\nimport {AnimationTransitionInstruction, createTransitionInstruction} from './animation_transition_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst EMPTY_OBJECT = {};\n\nexport class AnimationTransitionFactory {\n  constructor(\n      private _triggerName: string, public ast: TransitionAst,\n      private _stateStyles: {[stateName: string]: AnimationStateStyles}) {}\n\n  match(currentState: any, nextState: any, element: any, params: {[key: string]: any}): boolean {\n    return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n  }\n\n  buildStyles(stateName: string, params: {[key: string]: any}, errors: any[]) {\n    const backupStateStyler = this._stateStyles['*'];\n    const stateStyler = this._stateStyles[stateName];\n    const backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};\n    return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;\n  }\n\n  build(\n      driver: AnimationDriver, element: any, currentState: any, nextState: any,\n      enterClassName: string, leaveClassName: string, currentOptions?: AnimationOptions,\n      nextOptions?: AnimationOptions, subInstructions?: ElementInstructionMap,\n      skipAstBuild?: boolean): AnimationTransitionInstruction {\n    const errors: any[] = [];\n\n    const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n    const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n    const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n    const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n    const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n\n    const queriedElements = new Set<any>();\n    const preStyleMap = new Map<any, {[prop: string]: boolean}>();\n    const postStyleMap = new Map<any, {[prop: string]: boolean}>();\n    const isRemoval = nextState === 'void';\n\n    const animationOptions = {params: {...transitionAnimationParams, ...nextAnimationParams}};\n\n    const timelines = skipAstBuild ? [] : buildAnimationTimelines(\n                                              driver, element, this.ast.animation, enterClassName,\n                                              leaveClassName, currentStateStyles, nextStateStyles,\n                                              animationOptions, subInstructions, errors);\n\n    let totalTime = 0;\n    timelines.forEach(tl => { totalTime = Math.max(tl.duration + tl.delay, totalTime); });\n\n    if (errors.length) {\n      return createTransitionInstruction(\n          element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n          nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n    }\n\n    timelines.forEach(tl => {\n      const elm = tl.element;\n      const preProps = getOrSetAsInMap(preStyleMap, elm, {});\n      tl.preStyleProps.forEach(prop => preProps[prop] = true);\n\n      const postProps = getOrSetAsInMap(postStyleMap, elm, {});\n      tl.postStyleProps.forEach(prop => postProps[prop] = true);\n\n      if (elm !== element) {\n        queriedElements.add(elm);\n      }\n    });\n\n    const queriedElementsList = iteratorToArray(queriedElements.values());\n    return createTransitionInstruction(\n        element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n        nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n  }\n}\n\nfunction oneOrMoreTransitionsMatch(\n    matchFns: TransitionMatcherFn[], currentState: any, nextState: any, element: any,\n    params: {[key: string]: any}): boolean {\n  return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\n\nexport class AnimationStateStyles {\n  constructor(private styles: StyleAst, private defaultParams: {[key: string]: any}) {}\n\n  buildStyles(params: {[key: string]: any}, errors: string[]): ÉµStyleData {\n    const finalStyles: ÉµStyleData = {};\n    const combinedParams = copyObj(this.defaultParams);\n    Object.keys(params).forEach(key => {\n      const value = params[key];\n      if (value != null) {\n        combinedParams[key] = value;\n      }\n    });\n    this.styles.styles.forEach(value => {\n      if (typeof value !== 'string') {\n        const styleObj = value as any;\n        Object.keys(styleObj).forEach(prop => {\n          let val = styleObj[prop];\n          if (val.length > 1) {\n            val = interpolateParams(val, combinedParams, errors);\n          }\n          finalStyles[prop] = val;\n        });\n      }\n    });\n    return finalStyles;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadataType, ÉµStyleData} from '@angular/animations';\n\nimport {copyStyles, interpolateParams} from '../util';\n\nimport {SequenceAst, StyleAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationStateStyles, AnimationTransitionFactory} from './animation_transition_factory';\n\n\n\n/**\n * @publicApi\n */\nexport function buildTrigger(name: string, ast: TriggerAst): AnimationTrigger {\n  return new AnimationTrigger(name, ast);\n}\n\n/**\n* @publicApi\n*/\nexport class AnimationTrigger {\n  public transitionFactories: AnimationTransitionFactory[] = [];\n  public fallbackTransition: AnimationTransitionFactory;\n  public states: {[stateName: string]: AnimationStateStyles} = {};\n\n  constructor(public name: string, public ast: TriggerAst) {\n    ast.states.forEach(ast => {\n      const defaultParams = (ast.options && ast.options.params) || {};\n      this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);\n    });\n\n    balanceProperties(this.states, 'true', '1');\n    balanceProperties(this.states, 'false', '0');\n\n    ast.transitions.forEach(ast => {\n      this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n    });\n\n    this.fallbackTransition = createFallbackTransition(name, this.states);\n  }\n\n  get containsQueries() { return this.ast.queryCount > 0; }\n\n  matchTransition(currentState: any, nextState: any, element: any, params: {[key: string]: any}):\n      AnimationTransitionFactory|null {\n    const entry =\n        this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n    return entry || null;\n  }\n\n  matchStyles(currentState: any, params: {[key: string]: any}, errors: any[]): ÉµStyleData {\n    return this.fallbackTransition.buildStyles(currentState, params, errors);\n  }\n}\n\nfunction createFallbackTransition(\n    triggerName: string,\n    states: {[stateName: string]: AnimationStateStyles}): AnimationTransitionFactory {\n  const matchers = [(fromState: any, toState: any) => true];\n  const animation: SequenceAst = {type: AnimationMetadataType.Sequence, steps: [], options: null};\n  const transition: TransitionAst = {\n    type: AnimationMetadataType.Transition,\n    animation,\n    matchers,\n    options: null,\n    queryCount: 0,\n    depCount: 0\n  };\n  return new AnimationTransitionFactory(triggerName, transition, states);\n}\n\nfunction balanceProperties(obj: {[key: string]: any}, key1: string, key2: string) {\n  if (obj.hasOwnProperty(key1)) {\n    if (!obj.hasOwnProperty(key2)) {\n      obj[key2] = obj[key1];\n    }\n  } else if (obj.hasOwnProperty(key2)) {\n    obj[key1] = obj[key2];\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationPlayer, ÉµStyleData} from '@angular/animations';\n\nimport {Ast} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {buildAnimationTimelines} from '../dsl/animation_timeline_builder';\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\n\nexport class TimelineAnimationEngine {\n  private _animations: {[id: string]: Ast<AnimationMetadataType>} = {};\n  private _playersById: {[id: string]: AnimationPlayer} = {};\n  public players: AnimationPlayer[] = [];\n\n  constructor(\n      public bodyNode: any, private _driver: AnimationDriver,\n      private _normalizer: AnimationStyleNormalizer) {}\n\n  register(id: string, metadata: AnimationMetadata|AnimationMetadata[]) {\n    const errors: any[] = [];\n    const ast = buildAnimationAst(this._driver, metadata, errors);\n    if (errors.length) {\n      throw new Error(\n          `Unable to build the animation due to the following errors: ${errors.join(\"\\n\")}`);\n    } else {\n      this._animations[id] = ast;\n    }\n  }\n\n  private _buildPlayer(\n      i: AnimationTimelineInstruction, preStyles: ÉµStyleData,\n      postStyles?: ÉµStyleData): AnimationPlayer {\n    const element = i.element;\n    const keyframes = normalizeKeyframes(\n        this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n    return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n  }\n\n  create(id: string, element: any, options: AnimationOptions = {}): AnimationPlayer {\n    const errors: any[] = [];\n    const ast = this._animations[id];\n    let instructions: AnimationTimelineInstruction[];\n\n    const autoStylesMap = new Map<any, ÉµStyleData>();\n\n    if (ast) {\n      instructions = buildAnimationTimelines(\n          this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options,\n          EMPTY_INSTRUCTION_MAP, errors);\n      instructions.forEach(inst => {\n        const styles = getOrSetAsInMap(autoStylesMap, inst.element, {});\n        inst.postStyleProps.forEach(prop => styles[prop] = null);\n      });\n    } else {\n      errors.push('The requested animation doesn\\'t exist or has already been destroyed');\n      instructions = [];\n    }\n\n    if (errors.length) {\n      throw new Error(\n          `Unable to create the animation due to the following errors: ${errors.join(\"\\n\")}`);\n    }\n\n    autoStylesMap.forEach((styles, element) => {\n      Object.keys(styles).forEach(\n          prop => { styles[prop] = this._driver.computeStyle(element, prop, AUTO_STYLE); });\n    });\n\n    const players = instructions.map(i => {\n      const styles = autoStylesMap.get(i.element);\n      return this._buildPlayer(i, {}, styles);\n    });\n    const player = optimizeGroupPlayer(players);\n    this._playersById[id] = player;\n    player.onDestroy(() => this.destroy(id));\n\n    this.players.push(player);\n    return player;\n  }\n\n  destroy(id: string) {\n    const player = this._getPlayer(id);\n    player.destroy();\n    delete this._playersById[id];\n    const index = this.players.indexOf(player);\n    if (index >= 0) {\n      this.players.splice(index, 1);\n    }\n  }\n\n  private _getPlayer(id: string): AnimationPlayer {\n    const player = this._playersById[id];\n    if (!player) {\n      throw new Error(`Unable to find the timeline player referenced by ${id}`);\n    }\n    return player;\n  }\n\n  listen(id: string, element: string, eventName: string, callback: (event: any) => any):\n      () => void {\n    // triggerName, fromState, toState are all ignored for timeline animations\n    const baseEvent = makeAnimationEvent(element, '', '', '');\n    listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n    return () => {};\n  }\n\n  command(id: string, element: any, command: string, args: any[]): void {\n    if (command == 'register') {\n      this.register(id, args[0] as AnimationMetadata | AnimationMetadata[]);\n      return;\n    }\n\n    if (command == 'create') {\n      const options = (args[0] || {}) as AnimationOptions;\n      this.create(id, element, options);\n      return;\n    }\n\n    const player = this._getPlayer(id);\n    switch (command) {\n      case 'play':\n        player.play();\n        break;\n      case 'pause':\n        player.pause();\n        break;\n      case 'reset':\n        player.reset();\n        break;\n      case 'restart':\n        player.restart();\n        break;\n      case 'finish':\n        player.finish();\n        break;\n      case 'init':\n        player.init();\n        break;\n      case 'setPosition':\n        player.setPosition(parseFloat(args[0] as string));\n        break;\n      case 'destroy':\n        this.destroy(id);\n        break;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimationOptions, AnimationPlayer, NoopAnimationPlayer, ÉµAnimationGroupPlayer as AnimationGroupPlayer, ÉµPRE_STYLE as PRE_STYLE, ÉµStyleData} from '@angular/animations';\n\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {AnimationTransitionFactory} from '../dsl/animation_transition_factory';\nimport {AnimationTransitionInstruction} from '../dsl/animation_transition_instruction';\nimport {AnimationTrigger} from '../dsl/animation_trigger';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, copyObj, eraseStyles, iteratorToArray, setStyles} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\n\nconst EMPTY_PLAYER_ARRAY: TransitionAnimationPlayer[] = [];\nconst NULL_REMOVAL_STATE: ElementAnimationState = {\n  namespaceId: '',\n  setForRemoval: false,\n  setForMove: false,\n  hasAnimation: false,\n  removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE: ElementAnimationState = {\n  namespaceId: '',\n  setForMove: false,\n  setForRemoval: false,\n  hasAnimation: false,\n  removedBeforeQueried: true\n};\n\ninterface TriggerListener {\n  name: string;\n  phase: string;\n  callback: (event: any) => any;\n}\n\nexport interface QueueInstruction {\n  element: any;\n  triggerName: string;\n  fromState: StateValue;\n  toState: StateValue;\n  transition: AnimationTransitionFactory;\n  player: TransitionAnimationPlayer;\n  isFallbackTransition: boolean;\n}\n\nexport const REMOVAL_FLAG = '__ng_removed';\n\nexport interface ElementAnimationState {\n  setForRemoval: boolean;\n  setForMove: boolean;\n  hasAnimation: boolean;\n  namespaceId: string;\n  removedBeforeQueried: boolean;\n}\n\nexport class StateValue {\n  public value: string;\n  public options: AnimationOptions;\n\n  get params(): {[key: string]: any} { return this.options.params as{[key: string]: any}; }\n\n  constructor(input: any, public namespaceId: string = '') {\n    const isObj = input && input.hasOwnProperty('value');\n    const value = isObj ? input['value'] : input;\n    this.value = normalizeTriggerValue(value);\n    if (isObj) {\n      const options = copyObj(input as any);\n      delete options['value'];\n      this.options = options as AnimationOptions;\n    } else {\n      this.options = {};\n    }\n    if (!this.options.params) {\n      this.options.params = {};\n    }\n  }\n\n  absorbOptions(options: AnimationOptions) {\n    const newParams = options.params;\n    if (newParams) {\n      const oldParams = this.options.params !;\n      Object.keys(newParams).forEach(prop => {\n        if (oldParams[prop] == null) {\n          oldParams[prop] = newParams[prop];\n        }\n      });\n    }\n  }\n}\n\nexport const VOID_VALUE = 'void';\nexport const DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\n\nexport class AnimationTransitionNamespace {\n  public players: TransitionAnimationPlayer[] = [];\n\n  private _triggers: {[triggerName: string]: AnimationTrigger} = {};\n  private _queue: QueueInstruction[] = [];\n\n  private _elementListeners = new Map<any, TriggerListener[]>();\n\n  private _hostClassName: string;\n\n  constructor(\n      public id: string, public hostElement: any, private _engine: TransitionAnimationEngine) {\n    this._hostClassName = 'ng-tns-' + id;\n    addClass(hostElement, this._hostClassName);\n  }\n\n  listen(element: any, name: string, phase: string, callback: (event: any) => boolean): () => any {\n    if (!this._triggers.hasOwnProperty(name)) {\n      throw new Error(`Unable to listen on the animation trigger event \"${\n          phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n    }\n\n    if (phase == null || phase.length == 0) {\n      throw new Error(`Unable to listen on the animation trigger \"${\n          name}\" because the provided event is undefined!`);\n    }\n\n    if (!isTriggerEventValid(phase)) {\n      throw new Error(`The provided animation trigger event \"${phase}\" for the animation trigger \"${\n          name}\" is not supported!`);\n    }\n\n    const listeners = getOrSetAsInMap(this._elementListeners, element, []);\n    const data = {name, phase, callback};\n    listeners.push(data);\n\n    const triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {});\n    if (!triggersWithStates.hasOwnProperty(name)) {\n      addClass(element, NG_TRIGGER_CLASSNAME);\n      addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n      triggersWithStates[name] = DEFAULT_STATE_VALUE;\n    }\n\n    return () => {\n      // the event listener is removed AFTER the flush has occurred such\n      // that leave animations callbacks can fire (otherwise if the node\n      // is removed in between then the listeners would be deregistered)\n      this._engine.afterFlush(() => {\n        const index = listeners.indexOf(data);\n        if (index >= 0) {\n          listeners.splice(index, 1);\n        }\n\n        if (!this._triggers[name]) {\n          delete triggersWithStates[name];\n        }\n      });\n    };\n  }\n\n  register(name: string, ast: AnimationTrigger): boolean {\n    if (this._triggers[name]) {\n      // throw\n      return false;\n    } else {\n      this._triggers[name] = ast;\n      return true;\n    }\n  }\n\n  private _getTrigger(name: string) {\n    const trigger = this._triggers[name];\n    if (!trigger) {\n      throw new Error(`The provided animation trigger \"${name}\" has not been registered!`);\n    }\n    return trigger;\n  }\n\n  trigger(element: any, triggerName: string, value: any, defaultToFallback: boolean = true):\n      TransitionAnimationPlayer|undefined {\n    const trigger = this._getTrigger(triggerName);\n    const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n    let triggersWithStates = this._engine.statesByElement.get(element);\n    if (!triggersWithStates) {\n      addClass(element, NG_TRIGGER_CLASSNAME);\n      addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n      this._engine.statesByElement.set(element, triggersWithStates = {});\n    }\n\n    let fromState = triggersWithStates[triggerName];\n    const toState = new StateValue(value, this.id);\n\n    const isObj = value && value.hasOwnProperty('value');\n    if (!isObj && fromState) {\n      toState.absorbOptions(fromState.options);\n    }\n\n    triggersWithStates[triggerName] = toState;\n\n    if (!fromState) {\n      fromState = DEFAULT_STATE_VALUE;\n    }\n\n    const isRemoval = toState.value === VOID_VALUE;\n\n    // normally this isn't reached by here, however, if an object expression\n    // is passed in then it may be a new object each time. Comparing the value\n    // is important since that will stay the same despite there being a new object.\n    // The removal arc here is special cased because the same element is triggered\n    // twice in the event that it contains animations on the outer/inner portions\n    // of the host container\n    if (!isRemoval && fromState.value === toState.value) {\n      // this means that despite the value not changing, some inner params\n      // have changed which means that the animation final styles need to be applied\n      if (!objEquals(fromState.params, toState.params)) {\n        const errors: any[] = [];\n        const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n        const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n        if (errors.length) {\n          this._engine.reportError(errors);\n        } else {\n          this._engine.afterFlush(() => {\n            eraseStyles(element, fromStyles);\n            setStyles(element, toStyles);\n          });\n        }\n      }\n      return;\n    }\n\n    const playersOnElement: TransitionAnimationPlayer[] =\n        getOrSetAsInMap(this._engine.playersByElement, element, []);\n    playersOnElement.forEach(player => {\n      // only remove the player if it is queued on the EXACT same trigger/namespace\n      // we only also deal with queued players here because if the animation has\n      // started then we want to keep the player alive until the flush happens\n      // (which is where the previousPlayers are passed into the new palyer)\n      if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n        player.destroy();\n      }\n    });\n\n    let transition =\n        trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n    let isFallbackTransition = false;\n    if (!transition) {\n      if (!defaultToFallback) return;\n      transition = trigger.fallbackTransition;\n      isFallbackTransition = true;\n    }\n\n    this._engine.totalQueuedPlayers++;\n    this._queue.push(\n        {element, triggerName, transition, fromState, toState, player, isFallbackTransition});\n\n    if (!isFallbackTransition) {\n      addClass(element, QUEUED_CLASSNAME);\n      player.onStart(() => { removeClass(element, QUEUED_CLASSNAME); });\n    }\n\n    player.onDone(() => {\n      let index = this.players.indexOf(player);\n      if (index >= 0) {\n        this.players.splice(index, 1);\n      }\n\n      const players = this._engine.playersByElement.get(element);\n      if (players) {\n        let index = players.indexOf(player);\n        if (index >= 0) {\n          players.splice(index, 1);\n        }\n      }\n    });\n\n    this.players.push(player);\n    playersOnElement.push(player);\n\n    return player;\n  }\n\n  deregister(name: string) {\n    delete this._triggers[name];\n\n    this._engine.statesByElement.forEach((stateMap, element) => { delete stateMap[name]; });\n\n    this._elementListeners.forEach((listeners, element) => {\n      this._elementListeners.set(\n          element, listeners.filter(entry => { return entry.name != name; }));\n    });\n  }\n\n  clearElementCache(element: any) {\n    this._engine.statesByElement.delete(element);\n    this._elementListeners.delete(element);\n    const elementPlayers = this._engine.playersByElement.get(element);\n    if (elementPlayers) {\n      elementPlayers.forEach(player => player.destroy());\n      this._engine.playersByElement.delete(element);\n    }\n  }\n\n  private _signalRemovalForInnerTriggers(rootElement: any, context: any, animate: boolean = false) {\n    // emulate a leave animation for all inner nodes within this node.\n    // If there are no animations found for any of the nodes then clear the cache\n    // for the element.\n    this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach(elm => {\n      // this means that an inner remove() operation has already kicked off\n      // the animation on this element...\n      if (elm[REMOVAL_FLAG]) return;\n\n      const namespaces = this._engine.fetchNamespacesByElement(elm);\n      if (namespaces.size) {\n        namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n      } else {\n        this.clearElementCache(elm);\n      }\n    });\n  }\n\n  triggerLeaveAnimation(\n      element: any, context: any, destroyAfterComplete?: boolean,\n      defaultToFallback?: boolean): boolean {\n    const triggerStates = this._engine.statesByElement.get(element);\n    if (triggerStates) {\n      const players: TransitionAnimationPlayer[] = [];\n      Object.keys(triggerStates).forEach(triggerName => {\n        // this check is here in the event that an element is removed\n        // twice (both on the host level and the component level)\n        if (this._triggers[triggerName]) {\n          const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n          if (player) {\n            players.push(player);\n          }\n        }\n      });\n\n      if (players.length) {\n        this._engine.markElementAsRemoved(this.id, element, true, context);\n        if (destroyAfterComplete) {\n          optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n        }\n        return true;\n      }\n    }\n    return false;\n  }\n\n  prepareLeaveAnimationListeners(element: any) {\n    const listeners = this._elementListeners.get(element);\n    if (listeners) {\n      const visitedTriggers = new Set<string>();\n      listeners.forEach(listener => {\n        const triggerName = listener.name;\n        if (visitedTriggers.has(triggerName)) return;\n        visitedTriggers.add(triggerName);\n\n        const trigger = this._triggers[triggerName];\n        const transition = trigger.fallbackTransition;\n        const elementStates = this._engine.statesByElement.get(element) !;\n        const fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;\n        const toState = new StateValue(VOID_VALUE);\n        const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n        this._engine.totalQueuedPlayers++;\n        this._queue.push({\n          element,\n          triggerName,\n          transition,\n          fromState,\n          toState,\n          player,\n          isFallbackTransition: true\n        });\n      });\n    }\n  }\n\n  removeNode(element: any, context: any): void {\n    const engine = this._engine;\n\n    if (element.childElementCount) {\n      this._signalRemovalForInnerTriggers(element, context, true);\n    }\n\n    // this means that a * => VOID animation was detected and kicked off\n    if (this.triggerLeaveAnimation(element, context, true)) return;\n\n    // find the player that is animating and make sure that the\n    // removal is delayed until that player has completed\n    let containsPotentialParentTransition = false;\n    if (engine.totalAnimations) {\n      const currentPlayers =\n          engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n\n      // when this `if statement` does not continue forward it means that\n      // a previous animation query has selected the current element and\n      // is animating it. In this situation want to continue forwards and\n      // allow the element to be queued up for animation later.\n      if (currentPlayers && currentPlayers.length) {\n        containsPotentialParentTransition = true;\n      } else {\n        let parent = element;\n        while (parent = parent.parentNode) {\n          const triggers = engine.statesByElement.get(parent);\n          if (triggers) {\n            containsPotentialParentTransition = true;\n            break;\n          }\n        }\n      }\n    }\n\n    // at this stage we know that the element will either get removed\n    // during flush or will be picked up by a parent query. Either way\n    // we need to fire the listeners for this element when it DOES get\n    // removed (once the query parent animation is done or after flush)\n    this.prepareLeaveAnimationListeners(element);\n\n    // whether or not a parent has an animation we need to delay the deferral of the leave\n    // operation until we have more information (which we do after flush() has been called)\n    if (containsPotentialParentTransition) {\n      engine.markElementAsRemoved(this.id, element, false, context);\n    } else {\n      // we do this after the flush has occurred such\n      // that the callbacks can be fired\n      engine.afterFlush(() => this.clearElementCache(element));\n      engine.destroyInnerAnimations(element);\n      engine._onRemovalComplete(element, context);\n    }\n  }\n\n  insertNode(element: any, parent: any): void { addClass(element, this._hostClassName); }\n\n  drainQueuedTransitions(microtaskId: number): QueueInstruction[] {\n    const instructions: QueueInstruction[] = [];\n    this._queue.forEach(entry => {\n      const player = entry.player;\n      if (player.destroyed) return;\n\n      const element = entry.element;\n      const listeners = this._elementListeners.get(element);\n      if (listeners) {\n        listeners.forEach((listener: TriggerListener) => {\n          if (listener.name == entry.triggerName) {\n            const baseEvent = makeAnimationEvent(\n                element, entry.triggerName, entry.fromState.value, entry.toState.value);\n            (baseEvent as any)['_data'] = microtaskId;\n            listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n          }\n        });\n      }\n\n      if (player.markedForDestroy) {\n        this._engine.afterFlush(() => {\n          // now we can destroy the element properly since the event listeners have\n          // been bound to the player\n          player.destroy();\n        });\n      } else {\n        instructions.push(entry);\n      }\n    });\n\n    this._queue = [];\n\n    return instructions.sort((a, b) => {\n      // if depCount == 0 them move to front\n      // otherwise if a contains b then move back\n      const d0 = a.transition.ast.depCount;\n      const d1 = b.transition.ast.depCount;\n      if (d0 == 0 || d1 == 0) {\n        return d0 - d1;\n      }\n      return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n    });\n  }\n\n  destroy(context: any) {\n    this.players.forEach(p => p.destroy());\n    this._signalRemovalForInnerTriggers(this.hostElement, context);\n  }\n\n  elementContainsData(element: any): boolean {\n    let containsData = false;\n    if (this._elementListeners.has(element)) containsData = true;\n    containsData =\n        (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n    return containsData;\n  }\n}\n\nexport interface QueuedTransition {\n  element: any;\n  instruction: AnimationTransitionInstruction;\n  player: TransitionAnimationPlayer;\n}\n\nexport class TransitionAnimationEngine {\n  public players: TransitionAnimationPlayer[] = [];\n  public newHostElements = new Map<any, AnimationTransitionNamespace>();\n  public playersByElement = new Map<any, TransitionAnimationPlayer[]>();\n  public playersByQueriedElement = new Map<any, TransitionAnimationPlayer[]>();\n  public statesByElement = new Map<any, {[triggerName: string]: StateValue}>();\n  public disabledNodes = new Set<any>();\n\n  public totalAnimations = 0;\n  public totalQueuedPlayers = 0;\n\n  private _namespaceLookup: {[id: string]: AnimationTransitionNamespace} = {};\n  private _namespaceList: AnimationTransitionNamespace[] = [];\n  private _flushFns: (() => any)[] = [];\n  private _whenQuietFns: (() => any)[] = [];\n\n  public namespacesByHostElement = new Map<any, AnimationTransitionNamespace>();\n  public collectedEnterElements: any[] = [];\n  public collectedLeaveElements: any[] = [];\n\n  // this method is designed to be overridden by the code that uses this engine\n  public onRemovalComplete = (element: any, context: any) => {};\n\n  /** @internal */\n  _onRemovalComplete(element: any, context: any) { this.onRemovalComplete(element, context); }\n\n  constructor(\n      public bodyNode: any, public driver: AnimationDriver,\n      private _normalizer: AnimationStyleNormalizer) {}\n\n  get queuedPlayers(): TransitionAnimationPlayer[] {\n    const players: TransitionAnimationPlayer[] = [];\n    this._namespaceList.forEach(ns => {\n      ns.players.forEach(player => {\n        if (player.queued) {\n          players.push(player);\n        }\n      });\n    });\n    return players;\n  }\n\n  createNamespace(namespaceId: string, hostElement: any) {\n    const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n    if (hostElement.parentNode) {\n      this._balanceNamespaceList(ns, hostElement);\n    } else {\n      // defer this later until flush during when the host element has\n      // been inserted so that we know exactly where to place it in\n      // the namespace list\n      this.newHostElements.set(hostElement, ns);\n\n      // given that this host element is apart of the animation code, it\n      // may or may not be inserted by a parent node that is an of an\n      // animation renderer type. If this happens then we can still have\n      // access to this item when we query for :enter nodes. If the parent\n      // is a renderer then the set data-structure will normalize the entry\n      this.collectEnterElement(hostElement);\n    }\n    return this._namespaceLookup[namespaceId] = ns;\n  }\n\n  private _balanceNamespaceList(ns: AnimationTransitionNamespace, hostElement: any) {\n    const limit = this._namespaceList.length - 1;\n    if (limit >= 0) {\n      let found = false;\n      for (let i = limit; i >= 0; i--) {\n        const nextNamespace = this._namespaceList[i];\n        if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {\n          this._namespaceList.splice(i + 1, 0, ns);\n          found = true;\n          break;\n        }\n      }\n      if (!found) {\n        this._namespaceList.splice(0, 0, ns);\n      }\n    } else {\n      this._namespaceList.push(ns);\n    }\n\n    this.namespacesByHostElement.set(hostElement, ns);\n    return ns;\n  }\n\n  register(namespaceId: string, hostElement: any) {\n    let ns = this._namespaceLookup[namespaceId];\n    if (!ns) {\n      ns = this.createNamespace(namespaceId, hostElement);\n    }\n    return ns;\n  }\n\n  registerTrigger(namespaceId: string, name: string, trigger: AnimationTrigger) {\n    let ns = this._namespaceLookup[namespaceId];\n    if (ns && ns.register(name, trigger)) {\n      this.totalAnimations++;\n    }\n  }\n\n  destroy(namespaceId: string, context: any) {\n    if (!namespaceId) return;\n\n    const ns = this._fetchNamespace(namespaceId);\n\n    this.afterFlush(() => {\n      this.namespacesByHostElement.delete(ns.hostElement);\n      delete this._namespaceLookup[namespaceId];\n      const index = this._namespaceList.indexOf(ns);\n      if (index >= 0) {\n        this._namespaceList.splice(index, 1);\n      }\n    });\n\n    this.afterFlushAnimationsDone(() => ns.destroy(context));\n  }\n\n  private _fetchNamespace(id: string) { return this._namespaceLookup[id]; }\n\n  fetchNamespacesByElement(element: any): Set<AnimationTransitionNamespace> {\n    // normally there should only be one namespace per element, however\n    // if @triggers are placed on both the component element and then\n    // its host element (within the component code) then there will be\n    // two namespaces returned. We use a set here to simply the dedupe\n    // of namespaces incase there are multiple triggers both the elm and host\n    const namespaces = new Set<AnimationTransitionNamespace>();\n    const elementStates = this.statesByElement.get(element);\n    if (elementStates) {\n      const keys = Object.keys(elementStates);\n      for (let i = 0; i < keys.length; i++) {\n        const nsId = elementStates[keys[i]].namespaceId;\n        if (nsId) {\n          const ns = this._fetchNamespace(nsId);\n          if (ns) {\n            namespaces.add(ns);\n          }\n        }\n      }\n    }\n    return namespaces;\n  }\n\n  trigger(namespaceId: string, element: any, name: string, value: any): boolean {\n    if (isElementNode(element)) {\n      const ns = this._fetchNamespace(namespaceId);\n      if (ns) {\n        ns.trigger(element, name, value);\n        return true;\n      }\n    }\n    return false;\n  }\n\n  insertNode(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n    if (!isElementNode(element)) return;\n\n    // special case for when an element is removed and reinserted (move operation)\n    // when this occurs we do not want to use the element for deletion later\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) {\n      details.setForRemoval = false;\n      details.setForMove = true;\n      const index = this.collectedLeaveElements.indexOf(element);\n      if (index >= 0) {\n        this.collectedLeaveElements.splice(index, 1);\n      }\n    }\n\n    // in the event that the namespaceId is blank then the caller\n    // code does not contain any animation code in it, but it is\n    // just being called so that the node is marked as being inserted\n    if (namespaceId) {\n      const ns = this._fetchNamespace(namespaceId);\n      // This if-statement is a workaround for router issue #21947.\n      // The router sometimes hits a race condition where while a route\n      // is being instantiated a new navigation arrives, triggering leave\n      // animation of DOM that has not been fully initialized, until this\n      // is resolved, we need to handle the scenario when DOM is not in a\n      // consistent state during the animation.\n      if (ns) {\n        ns.insertNode(element, parent);\n      }\n    }\n\n    // only *directives and host elements are inserted before\n    if (insertBefore) {\n      this.collectEnterElement(element);\n    }\n  }\n\n  collectEnterElement(element: any) { this.collectedEnterElements.push(element); }\n\n  markElementAsDisabled(element: any, value: boolean) {\n    if (value) {\n      if (!this.disabledNodes.has(element)) {\n        this.disabledNodes.add(element);\n        addClass(element, DISABLED_CLASSNAME);\n      }\n    } else if (this.disabledNodes.has(element)) {\n      this.disabledNodes.delete(element);\n      removeClass(element, DISABLED_CLASSNAME);\n    }\n  }\n\n  removeNode(namespaceId: string, element: any, isHostElement: boolean, context: any): void {\n    if (isElementNode(element)) {\n      const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n      if (ns) {\n        ns.removeNode(element, context);\n      } else {\n        this.markElementAsRemoved(namespaceId, element, false, context);\n      }\n\n      if (isHostElement) {\n        const hostNS = this.namespacesByHostElement.get(element);\n        if (hostNS && hostNS.id !== namespaceId) {\n          hostNS.removeNode(element, context);\n        }\n      }\n    } else {\n      this._onRemovalComplete(element, context);\n    }\n  }\n\n  markElementAsRemoved(namespaceId: string, element: any, hasAnimation?: boolean, context?: any) {\n    this.collectedLeaveElements.push(element);\n    element[REMOVAL_FLAG] = {\n      namespaceId,\n      setForRemoval: context, hasAnimation,\n      removedBeforeQueried: false\n    };\n  }\n\n  listen(\n      namespaceId: string, element: any, name: string, phase: string,\n      callback: (event: any) => boolean): () => any {\n    if (isElementNode(element)) {\n      return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n    }\n    return () => {};\n  }\n\n  private _buildInstruction(\n      entry: QueueInstruction, subTimelines: ElementInstructionMap, enterClassName: string,\n      leaveClassName: string, skipBuildAst?: boolean) {\n    return entry.transition.build(\n        this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName,\n        leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n  }\n\n  destroyInnerAnimations(containerElement: any) {\n    let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n    elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n\n    if (this.playersByQueriedElement.size == 0) return;\n\n    elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n    elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n  }\n\n  destroyActiveAnimationsForElement(element: any) {\n    const players = this.playersByElement.get(element);\n    if (players) {\n      players.forEach(player => {\n        // special case for when an element is set for destruction, but hasn't started.\n        // in this situation we want to delay the destruction until the flush occurs\n        // so that any event listeners attached to the player are triggered.\n        if (player.queued) {\n          player.markedForDestroy = true;\n        } else {\n          player.destroy();\n        }\n      });\n    }\n  }\n\n  finishActiveQueriedAnimationOnElement(element: any) {\n    const players = this.playersByQueriedElement.get(element);\n    if (players) {\n      players.forEach(player => player.finish());\n    }\n  }\n\n  whenRenderingDone(): Promise<any> {\n    return new Promise(resolve => {\n      if (this.players.length) {\n        return optimizeGroupPlayer(this.players).onDone(() => resolve());\n      } else {\n        resolve();\n      }\n    });\n  }\n\n  processLeaveNode(element: any) {\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) {\n      // this will prevent it from removing it twice\n      element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n      if (details.namespaceId) {\n        this.destroyInnerAnimations(element);\n        const ns = this._fetchNamespace(details.namespaceId);\n        if (ns) {\n          ns.clearElementCache(element);\n        }\n      }\n      this._onRemovalComplete(element, details.setForRemoval);\n    }\n\n    if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {\n      this.markElementAsDisabled(element, false);\n    }\n\n    this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n      this.markElementAsDisabled(node, false);\n    });\n  }\n\n  flush(microtaskId: number = -1) {\n    let players: AnimationPlayer[] = [];\n    if (this.newHostElements.size) {\n      this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n      this.newHostElements.clear();\n    }\n\n    if (this.totalAnimations && this.collectedEnterElements.length) {\n      for (let i = 0; i < this.collectedEnterElements.length; i++) {\n        const elm = this.collectedEnterElements[i];\n        addClass(elm, STAR_CLASSNAME);\n      }\n    }\n\n    if (this._namespaceList.length &&\n        (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n      const cleanupFns: Function[] = [];\n      try {\n        players = this._flushAnimations(cleanupFns, microtaskId);\n      } finally {\n        for (let i = 0; i < cleanupFns.length; i++) {\n          cleanupFns[i]();\n        }\n      }\n    } else {\n      for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n        const element = this.collectedLeaveElements[i];\n        this.processLeaveNode(element);\n      }\n    }\n\n    this.totalQueuedPlayers = 0;\n    this.collectedEnterElements.length = 0;\n    this.collectedLeaveElements.length = 0;\n    this._flushFns.forEach(fn => fn());\n    this._flushFns = [];\n\n    if (this._whenQuietFns.length) {\n      // we move these over to a variable so that\n      // if any new callbacks are registered in another\n      // flush they do not populate the existing set\n      const quietFns = this._whenQuietFns;\n      this._whenQuietFns = [];\n\n      if (players.length) {\n        optimizeGroupPlayer(players).onDone(() => { quietFns.forEach(fn => fn()); });\n      } else {\n        quietFns.forEach(fn => fn());\n      }\n    }\n  }\n\n  reportError(errors: string[]) {\n    throw new Error(\n        `Unable to process animations due to the following failed trigger transitions\\n ${\n            errors.join('\\n')}`);\n  }\n\n  private _flushAnimations(cleanupFns: Function[], microtaskId: number):\n      TransitionAnimationPlayer[] {\n    const subTimelines = new ElementInstructionMap();\n    const skippedPlayers: TransitionAnimationPlayer[] = [];\n    const skippedPlayersMap = new Map<any, AnimationPlayer[]>();\n    const queuedInstructions: QueuedTransition[] = [];\n    const queriedElements = new Map<any, TransitionAnimationPlayer[]>();\n    const allPreStyleElements = new Map<any, Set<string>>();\n    const allPostStyleElements = new Map<any, Set<string>>();\n\n    const disabledElementsSet = new Set<any>();\n    this.disabledNodes.forEach(node => {\n      disabledElementsSet.add(node);\n      const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n      for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n        disabledElementsSet.add(nodesThatAreDisabled[i]);\n      }\n    });\n\n    const bodyNode = this.bodyNode;\n    const allTriggerElements = Array.from(this.statesByElement.keys());\n    const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n\n    // this must occur before the instructions are built below such that\n    // the :enter queries match the elements (since the timeline queries\n    // are fired during instruction building).\n    const enterNodeMapIds = new Map<any, string>();\n    let i = 0;\n    enterNodeMap.forEach((nodes, root) => {\n      const className = ENTER_CLASSNAME + i++;\n      enterNodeMapIds.set(root, className);\n      nodes.forEach(node => addClass(node, className));\n    });\n\n    const allLeaveNodes: any[] = [];\n    const mergedLeaveNodes = new Set<any>();\n    const leaveNodesWithoutAnimations = new Set<any>();\n    for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n      const element = this.collectedLeaveElements[i];\n      const details = element[REMOVAL_FLAG] as ElementAnimationState;\n      if (details && details.setForRemoval) {\n        allLeaveNodes.push(element);\n        mergedLeaveNodes.add(element);\n        if (details.hasAnimation) {\n          this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n        } else {\n          leaveNodesWithoutAnimations.add(element);\n        }\n      }\n    }\n\n    const leaveNodeMapIds = new Map<any, string>();\n    const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n    leaveNodeMap.forEach((nodes, root) => {\n      const className = LEAVE_CLASSNAME + i++;\n      leaveNodeMapIds.set(root, className);\n      nodes.forEach(node => addClass(node, className));\n    });\n\n    cleanupFns.push(() => {\n      enterNodeMap.forEach((nodes, root) => {\n        const className = enterNodeMapIds.get(root) !;\n        nodes.forEach(node => removeClass(node, className));\n      });\n\n      leaveNodeMap.forEach((nodes, root) => {\n        const className = leaveNodeMapIds.get(root) !;\n        nodes.forEach(node => removeClass(node, className));\n      });\n\n      allLeaveNodes.forEach(element => { this.processLeaveNode(element); });\n    });\n\n    const allPlayers: TransitionAnimationPlayer[] = [];\n    const erroneousTransitions: AnimationTransitionInstruction[] = [];\n    for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n      const ns = this._namespaceList[i];\n      ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n        const player = entry.player;\n        const element = entry.element;\n        allPlayers.push(player);\n\n        if (this.collectedEnterElements.length) {\n          const details = element[REMOVAL_FLAG] as ElementAnimationState;\n          // move animations are currently not supported...\n          if (details && details.setForMove) {\n            player.destroy();\n            return;\n          }\n        }\n\n        const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n        const leaveClassName = leaveNodeMapIds.get(element) !;\n        const enterClassName = enterNodeMapIds.get(element) !;\n        const instruction = this._buildInstruction(\n            entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned) !;\n        if (instruction.errors && instruction.errors.length) {\n          erroneousTransitions.push(instruction);\n          return;\n        }\n\n        // even though the element may not be apart of the DOM, it may\n        // still be added at a later point (due to the mechanics of content\n        // projection and/or dynamic component insertion) therefore it's\n        // important we still style the element.\n        if (nodeIsOrphaned) {\n          player.onStart(() => eraseStyles(element, instruction.fromStyles));\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // if a unmatched transition is queued to go then it SHOULD NOT render\n        // an animation and cancel the previously running animations.\n        if (entry.isFallbackTransition) {\n          player.onStart(() => eraseStyles(element, instruction.fromStyles));\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // this means that if a parent animation uses this animation as a sub trigger\n        // then it will instruct the timeline builder to not add a player delay, but\n        // instead stretch the first keyframe gap up until the animation starts. The\n        // reason this is important is to prevent extra initialization styles from being\n        // required by the user in the animation.\n        instruction.timelines.forEach(tl => tl.stretchStartingKeyframe = true);\n\n        subTimelines.append(element, instruction.timelines);\n\n        const tuple = {instruction, player, element};\n\n        queuedInstructions.push(tuple);\n\n        instruction.queriedElements.forEach(\n            element => getOrSetAsInMap(queriedElements, element, []).push(player));\n\n        instruction.preStyleProps.forEach((stringMap, element) => {\n          const props = Object.keys(stringMap);\n          if (props.length) {\n            let setVal: Set<string> = allPreStyleElements.get(element) !;\n            if (!setVal) {\n              allPreStyleElements.set(element, setVal = new Set<string>());\n            }\n            props.forEach(prop => setVal.add(prop));\n          }\n        });\n\n        instruction.postStyleProps.forEach((stringMap, element) => {\n          const props = Object.keys(stringMap);\n          let setVal: Set<string> = allPostStyleElements.get(element) !;\n          if (!setVal) {\n            allPostStyleElements.set(element, setVal = new Set<string>());\n          }\n          props.forEach(prop => setVal.add(prop));\n        });\n      });\n    }\n\n    if (erroneousTransitions.length) {\n      const errors: string[] = [];\n      erroneousTransitions.forEach(instruction => {\n        errors.push(`@${instruction.triggerName} has failed due to:\\n`);\n        instruction.errors !.forEach(error => errors.push(`- ${error}\\n`));\n      });\n\n      allPlayers.forEach(player => player.destroy());\n      this.reportError(errors);\n    }\n\n    const allPreviousPlayersMap = new Map<any, TransitionAnimationPlayer[]>();\n    // this map works to tell which element in the DOM tree is contained by\n    // which animation. Further down below this map will get populated once\n    // the players are built and in doing so it can efficiently figure out\n    // if a sub player is skipped due to a parent player having priority.\n    const animationElementMap = new Map<any, any>();\n    queuedInstructions.forEach(entry => {\n      const element = entry.element;\n      if (subTimelines.has(element)) {\n        animationElementMap.set(element, element);\n        this._beforeAnimationBuild(\n            entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n      }\n    });\n\n    skippedPlayers.forEach(player => {\n      const element = player.element;\n      const previousPlayers =\n          this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n      previousPlayers.forEach(prevPlayer => {\n        getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);\n        prevPlayer.destroy();\n      });\n    });\n\n    // this is a special case for nodes that will be removed (either by)\n    // having their own leave animations or by being queried in a container\n    // that will be removed once a parent animation is complete. The idea\n    // here is that * styles must be identical to ! styles because of\n    // backwards compatibility (* is also filled in by default in many places).\n    // Otherwise * styles will return an empty value or auto since the element\n    // that is being getComputedStyle'd will not be visible (since * = destination)\n    const replaceNodes = allLeaveNodes.filter(node => {\n      return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n    });\n\n    // POST STAGE: fill the * styles\n    const postStylesMap = new Map<any, ÉµStyleData>();\n    const allLeaveQueriedNodes = cloakAndComputeStyles(\n        postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n\n    allLeaveQueriedNodes.forEach(node => {\n      if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n        replaceNodes.push(node);\n      }\n    });\n\n    // PRE STAGE: fill the ! styles\n    const preStylesMap = new Map<any, ÉµStyleData>();\n    enterNodeMap.forEach((nodes, root) => {\n      cloakAndComputeStyles(\n          preStylesMap, this.driver, new Set(nodes), allPreStyleElements, PRE_STYLE);\n    });\n\n    replaceNodes.forEach(node => {\n      const post = postStylesMap.get(node);\n      const pre = preStylesMap.get(node);\n      postStylesMap.set(node, { ...post, ...pre } as any);\n    });\n\n    const rootPlayers: TransitionAnimationPlayer[] = [];\n    const subPlayers: TransitionAnimationPlayer[] = [];\n    const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n    queuedInstructions.forEach(entry => {\n      const {element, player, instruction} = entry;\n      // this means that it was never consumed by a parent animation which\n      // means that it is independent and therefore should be set for animation\n      if (subTimelines.has(element)) {\n        if (disabledElementsSet.has(element)) {\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          player.disabled = true;\n          player.overrideTotalTime(instruction.totalTime);\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // this will flow up the DOM and query the map to figure out\n        // if a parent animation has priority over it. In the situation\n        // that a parent is detected then it will cancel the loop. If\n        // nothing is detected, or it takes a few hops to find a parent,\n        // then it will fill in the missing nodes and signal them as having\n        // a detected parent (or a NO_PARENT value via a special constant).\n        let parentWithAnimation: any = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n        if (animationElementMap.size > 1) {\n          let elm = element;\n          const parentsToAdd: any[] = [];\n          while (elm = elm.parentNode) {\n            const detectedParent = animationElementMap.get(elm);\n            if (detectedParent) {\n              parentWithAnimation = detectedParent;\n              break;\n            }\n            parentsToAdd.push(elm);\n          }\n          parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n        }\n\n        const innerPlayer = this._buildAnimation(\n            player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap,\n            postStylesMap);\n\n        player.setRealPlayer(innerPlayer);\n\n        if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n          rootPlayers.push(player);\n        } else {\n          const parentPlayers = this.playersByElement.get(parentWithAnimation);\n          if (parentPlayers && parentPlayers.length) {\n            player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n          }\n          skippedPlayers.push(player);\n        }\n      } else {\n        eraseStyles(element, instruction.fromStyles);\n        player.onDestroy(() => setStyles(element, instruction.toStyles));\n        // there still might be a ancestor player animating this\n        // element therefore we will still add it as a sub player\n        // even if its animation may be disabled\n        subPlayers.push(player);\n        if (disabledElementsSet.has(element)) {\n          skippedPlayers.push(player);\n        }\n      }\n    });\n\n    // find all of the sub players' corresponding inner animation player\n    subPlayers.forEach(player => {\n      // even if any players are not found for a sub animation then it\n      // will still complete itself after the next tick since it's Noop\n      const playersForElement = skippedPlayersMap.get(player.element);\n      if (playersForElement && playersForElement.length) {\n        const innerPlayer = optimizeGroupPlayer(playersForElement);\n        player.setRealPlayer(innerPlayer);\n      }\n    });\n\n    // the reason why we don't actually play the animation is\n    // because all that a skipped player is designed to do is to\n    // fire the start/done transition callback events\n    skippedPlayers.forEach(player => {\n      if (player.parentPlayer) {\n        player.syncPlayerEvents(player.parentPlayer);\n      } else {\n        player.destroy();\n      }\n    });\n\n    // run through all of the queued removals and see if they\n    // were picked up by a query. If not then perform the removal\n    // operation right away unless a parent animation is ongoing.\n    for (let i = 0; i < allLeaveNodes.length; i++) {\n      const element = allLeaveNodes[i];\n      const details = element[REMOVAL_FLAG] as ElementAnimationState;\n      removeClass(element, LEAVE_CLASSNAME);\n\n      // this means the element has a removal animation that is being\n      // taken care of and therefore the inner elements will hang around\n      // until that animation is over (or the parent queried animation)\n      if (details && details.hasAnimation) continue;\n\n      let players: TransitionAnimationPlayer[] = [];\n\n      // if this element is queried or if it contains queried children\n      // then we want for the element not to be removed from the page\n      // until the queried animations have finished\n      if (queriedElements.size) {\n        let queriedPlayerResults = queriedElements.get(element);\n        if (queriedPlayerResults && queriedPlayerResults.length) {\n          players.push(...queriedPlayerResults);\n        }\n\n        let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n        for (let j = 0; j < queriedInnerElements.length; j++) {\n          let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n          if (queriedPlayers && queriedPlayers.length) {\n            players.push(...queriedPlayers);\n          }\n        }\n      }\n\n      const activePlayers = players.filter(p => !p.destroyed);\n      if (activePlayers.length) {\n        removeNodesAfterAnimationDone(this, element, activePlayers);\n      } else {\n        this.processLeaveNode(element);\n      }\n    }\n\n    // this is required so the cleanup method doesn't remove them\n    allLeaveNodes.length = 0;\n\n    rootPlayers.forEach(player => {\n      this.players.push(player);\n      player.onDone(() => {\n        player.destroy();\n\n        const index = this.players.indexOf(player);\n        this.players.splice(index, 1);\n      });\n      player.play();\n    });\n\n    return rootPlayers;\n  }\n\n  elementContainsData(namespaceId: string, element: any) {\n    let containsData = false;\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) containsData = true;\n    if (this.playersByElement.has(element)) containsData = true;\n    if (this.playersByQueriedElement.has(element)) containsData = true;\n    if (this.statesByElement.has(element)) containsData = true;\n    return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n  }\n\n  afterFlush(callback: () => any) { this._flushFns.push(callback); }\n\n  afterFlushAnimationsDone(callback: () => any) { this._whenQuietFns.push(callback); }\n\n  private _getPreviousPlayers(\n      element: string, isQueriedElement: boolean, namespaceId?: string, triggerName?: string,\n      toStateValue?: any): TransitionAnimationPlayer[] {\n    let players: TransitionAnimationPlayer[] = [];\n    if (isQueriedElement) {\n      const queriedElementPlayers = this.playersByQueriedElement.get(element);\n      if (queriedElementPlayers) {\n        players = queriedElementPlayers;\n      }\n    } else {\n      const elementPlayers = this.playersByElement.get(element);\n      if (elementPlayers) {\n        const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n        elementPlayers.forEach(player => {\n          if (player.queued) return;\n          if (!isRemovalAnimation && player.triggerName != triggerName) return;\n          players.push(player);\n        });\n      }\n    }\n    if (namespaceId || triggerName) {\n      players = players.filter(player => {\n        if (namespaceId && namespaceId != player.namespaceId) return false;\n        if (triggerName && triggerName != player.triggerName) return false;\n        return true;\n      });\n    }\n    return players;\n  }\n\n  private _beforeAnimationBuild(\n      namespaceId: string, instruction: AnimationTransitionInstruction,\n      allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>) {\n    const triggerName = instruction.triggerName;\n    const rootElement = instruction.element;\n\n    // when a removal animation occurs, ALL previous players are collected\n    // and destroyed (even if they are outside of the current namespace)\n    const targetNameSpaceId: string|undefined =\n        instruction.isRemovalTransition ? undefined : namespaceId;\n    const targetTriggerName: string|undefined =\n        instruction.isRemovalTransition ? undefined : triggerName;\n\n    for (const timelineInstruction of instruction.timelines) {\n      const element = timelineInstruction.element;\n      const isQueriedElement = element !== rootElement;\n      const players = getOrSetAsInMap(allPreviousPlayersMap, element, []);\n      const previousPlayers = this._getPreviousPlayers(\n          element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n      previousPlayers.forEach(player => {\n        const realPlayer = player.getRealPlayer() as any;\n        if (realPlayer.beforeDestroy) {\n          realPlayer.beforeDestroy();\n        }\n        player.destroy();\n        players.push(player);\n      });\n    }\n\n    // this needs to be done so that the PRE/POST styles can be\n    // computed properly without interfering with the previous animation\n    eraseStyles(rootElement, instruction.fromStyles);\n  }\n\n  private _buildAnimation(\n      namespaceId: string, instruction: AnimationTransitionInstruction,\n      allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>,\n      skippedPlayersMap: Map<any, AnimationPlayer[]>, preStylesMap: Map<any, ÉµStyleData>,\n      postStylesMap: Map<any, ÉµStyleData>): AnimationPlayer {\n    const triggerName = instruction.triggerName;\n    const rootElement = instruction.element;\n\n    // we first run this so that the previous animation player\n    // data can be passed into the successive animation players\n    const allQueriedPlayers: TransitionAnimationPlayer[] = [];\n    const allConsumedElements = new Set<any>();\n    const allSubElements = new Set<any>();\n    const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n      const element = timelineInstruction.element;\n      allConsumedElements.add(element);\n\n      // FIXME (matsko): make sure to-be-removed animations are removed properly\n      const details = element[REMOVAL_FLAG];\n      if (details && details.removedBeforeQueried)\n        return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n\n      const isQueriedElement = element !== rootElement;\n      const previousPlayers =\n          flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n                                  .map(p => p.getRealPlayer()))\n              .filter(p => {\n                // the `element` is not apart of the AnimationPlayer definition, but\n                // Mock/WebAnimations\n                // use the element within their implementation. This will be added in Angular5 to\n                // AnimationPlayer\n                const pp = p as any;\n                return pp.element ? pp.element === element : false;\n              });\n\n      const preStyles = preStylesMap.get(element);\n      const postStyles = postStylesMap.get(element);\n      const keyframes = normalizeKeyframes(\n          this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles,\n          postStyles);\n      const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n\n      // this means that this particular player belongs to a sub trigger. It is\n      // important that we match this player up with the corresponding (@trigger.listener)\n      if (timelineInstruction.subTimeline && skippedPlayersMap) {\n        allSubElements.add(element);\n      }\n\n      if (isQueriedElement) {\n        const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n        wrappedPlayer.setRealPlayer(player);\n        allQueriedPlayers.push(wrappedPlayer);\n      }\n\n      return player;\n    });\n\n    allQueriedPlayers.forEach(player => {\n      getOrSetAsInMap(this.playersByQueriedElement, player.element, []).push(player);\n      player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n    });\n\n    allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n    const player = optimizeGroupPlayer(allNewPlayers);\n    player.onDestroy(() => {\n      allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n      setStyles(rootElement, instruction.toStyles);\n    });\n\n    // this basically makes all of the callbacks for sub element animations\n    // be dependent on the upper players for when they finish\n    allSubElements.forEach(\n        element => { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });\n\n    return player;\n  }\n\n  private _buildPlayer(\n      instruction: AnimationTimelineInstruction, keyframes: ÉµStyleData[],\n      previousPlayers: AnimationPlayer[]): AnimationPlayer {\n    if (keyframes.length > 0) {\n      return this.driver.animate(\n          instruction.element, keyframes, instruction.duration, instruction.delay,\n          instruction.easing, previousPlayers);\n    }\n\n    // special case for when an empty transition|definition is provided\n    // ... there is no point in rendering an empty animation\n    return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n  }\n}\n\nexport class TransitionAnimationPlayer implements AnimationPlayer {\n  private _player: AnimationPlayer = new NoopAnimationPlayer();\n  private _containsRealPlayer = false;\n\n  private _queuedCallbacks: {[name: string]: (() => any)[]} = {};\n  public readonly destroyed = false;\n  // TODO(issue/24571): remove '!'.\n  public parentPlayer !: AnimationPlayer;\n\n  public markedForDestroy: boolean = false;\n  public disabled = false;\n\n  readonly queued: boolean = true;\n  public readonly totalTime: number = 0;\n\n  constructor(public namespaceId: string, public triggerName: string, public element: any) {}\n\n  setRealPlayer(player: AnimationPlayer) {\n    if (this._containsRealPlayer) return;\n\n    this._player = player;\n    Object.keys(this._queuedCallbacks).forEach(phase => {\n      this._queuedCallbacks[phase].forEach(\n          callback => listenOnPlayer(player, phase, undefined, callback));\n    });\n    this._queuedCallbacks = {};\n    this._containsRealPlayer = true;\n    this.overrideTotalTime(player.totalTime);\n    (this as{queued: boolean}).queued = false;\n  }\n\n  getRealPlayer() { return this._player; }\n\n  overrideTotalTime(totalTime: number) { (this as any).totalTime = totalTime; }\n\n  syncPlayerEvents(player: AnimationPlayer) {\n    const p = this._player as any;\n    if (p.triggerCallback) {\n      player.onStart(() => p.triggerCallback !('start'));\n    }\n    player.onDone(() => this.finish());\n    player.onDestroy(() => this.destroy());\n  }\n\n  private _queueEvent(name: string, callback: (event: any) => any): void {\n    getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);\n  }\n\n  onDone(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('done', fn);\n    }\n    this._player.onDone(fn);\n  }\n\n  onStart(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('start', fn);\n    }\n    this._player.onStart(fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('destroy', fn);\n    }\n    this._player.onDestroy(fn);\n  }\n\n  init(): void { this._player.init(); }\n\n  hasStarted(): boolean { return this.queued ? false : this._player.hasStarted(); }\n\n  play(): void { !this.queued && this._player.play(); }\n\n  pause(): void { !this.queued && this._player.pause(); }\n\n  restart(): void { !this.queued && this._player.restart(); }\n\n  finish(): void { this._player.finish(); }\n\n  destroy(): void {\n    (this as{destroyed: boolean}).destroyed = true;\n    this._player.destroy();\n  }\n\n  reset(): void { !this.queued && this._player.reset(); }\n\n  setPosition(p: any): void {\n    if (!this.queued) {\n      this._player.setPosition(p);\n    }\n  }\n\n  getPosition(): number { return this.queued ? 0 : this._player.getPosition(); }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const p = this._player as any;\n    if (p.triggerCallback) {\n      p.triggerCallback(phaseName);\n    }\n  }\n}\n\nfunction deleteOrUnsetInMap(map: Map<any, any[]>| {[key: string]: any}, key: any, value: any) {\n  let currentValues: any[]|null|undefined;\n  if (map instanceof Map) {\n    currentValues = map.get(key);\n    if (currentValues) {\n      if (currentValues.length) {\n        const index = currentValues.indexOf(value);\n        currentValues.splice(index, 1);\n      }\n      if (currentValues.length == 0) {\n        map.delete(key);\n      }\n    }\n  } else {\n    currentValues = map[key];\n    if (currentValues) {\n      if (currentValues.length) {\n        const index = currentValues.indexOf(value);\n        currentValues.splice(index, 1);\n      }\n      if (currentValues.length == 0) {\n        delete map[key];\n      }\n    }\n  }\n  return currentValues;\n}\n\nfunction normalizeTriggerValue(value: any): any {\n  // we use `!= null` here because it's the most simple\n  // way to test against a \"falsy\" value without mixing\n  // in empty strings or a zero value. DO NOT OPTIMIZE.\n  return value != null ? value : null;\n}\n\nfunction isElementNode(node: any) {\n  return node && node['nodeType'] === 1;\n}\n\nfunction isTriggerEventValid(eventName: string): boolean {\n  return eventName == 'start' || eventName == 'done';\n}\n\nfunction cloakElement(element: any, value?: string) {\n  const oldValue = element.style.display;\n  element.style.display = value != null ? value : 'none';\n  return oldValue;\n}\n\nfunction cloakAndComputeStyles(\n    valuesMap: Map<any, ÉµStyleData>, driver: AnimationDriver, elements: Set<any>,\n    elementPropsMap: Map<any, Set<string>>, defaultStyle: string): any[] {\n  const cloakVals: string[] = [];\n  elements.forEach(element => cloakVals.push(cloakElement(element)));\n\n  const failedElements: any[] = [];\n\n  elementPropsMap.forEach((props: Set<string>, element: any) => {\n    const styles: ÉµStyleData = {};\n    props.forEach(prop => {\n      const value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);\n\n      // there is no easy way to detect this because a sub element could be removed\n      // by a parent animation element being detached.\n      if (!value || value.length == 0) {\n        element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n        failedElements.push(element);\n      }\n    });\n    valuesMap.set(element, styles);\n  });\n\n  // we use a index variable here since Set.forEach(a, i) does not return\n  // an index value for the closure (but instead just the value)\n  let i = 0;\n  elements.forEach(element => cloakElement(element, cloakVals[i++]));\n\n  return failedElements;\n}\n\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots: any[], nodes: any[]): Map<any, any[]> {\n  const rootMap = new Map<any, any[]>();\n  roots.forEach(root => rootMap.set(root, []));\n\n  if (nodes.length == 0) return rootMap;\n\n  const NULL_NODE = 1;\n  const nodeSet = new Set(nodes);\n  const localRootMap = new Map<any, any>();\n\n  function getRoot(node: any): any {\n    if (!node) return NULL_NODE;\n\n    let root = localRootMap.get(node);\n    if (root) return root;\n\n    const parent = node.parentNode;\n    if (rootMap.has(parent)) {  // ngIf inside @trigger\n      root = parent;\n    } else if (nodeSet.has(parent)) {  // ngIf inside ngIf\n      root = NULL_NODE;\n    } else {  // recurse upwards\n      root = getRoot(parent);\n    }\n\n    localRootMap.set(node, root);\n    return root;\n  }\n\n  nodes.forEach(node => {\n    const root = getRoot(node);\n    if (root !== NULL_NODE) {\n      rootMap.get(root) !.push(node);\n    }\n  });\n\n  return rootMap;\n}\n\nconst CLASSES_CACHE_KEY = '$$classes';\nfunction containsClass(element: any, className: string): boolean {\n  if (element.classList) {\n    return element.classList.contains(className);\n  } else {\n    const classes = element[CLASSES_CACHE_KEY];\n    return classes && classes[className];\n  }\n}\n\nfunction addClass(element: any, className: string) {\n  if (element.classList) {\n    element.classList.add(className);\n  } else {\n    let classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n    if (!classes) {\n      classes = element[CLASSES_CACHE_KEY] = {};\n    }\n    classes[className] = true;\n  }\n}\n\nfunction removeClass(element: any, className: string) {\n  if (element.classList) {\n    element.classList.remove(className);\n  } else {\n    let classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n    if (classes) {\n      delete classes[className];\n    }\n  }\n}\n\nfunction removeNodesAfterAnimationDone(\n    engine: TransitionAnimationEngine, element: any, players: AnimationPlayer[]) {\n  optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\n\nfunction flattenGroupPlayers(players: AnimationPlayer[]): AnimationPlayer[] {\n  const finalPlayers: AnimationPlayer[] = [];\n  _flattenGroupPlayersRecur(players, finalPlayers);\n  return finalPlayers;\n}\n\nfunction _flattenGroupPlayersRecur(players: AnimationPlayer[], finalPlayers: AnimationPlayer[]) {\n  for (let i = 0; i < players.length; i++) {\n    const player = players[i];\n    if (player instanceof AnimationGroupPlayer) {\n      _flattenGroupPlayersRecur(player.players, finalPlayers);\n    } else {\n      finalPlayers.push(player as AnimationPlayer);\n    }\n  }\n}\n\nfunction objEquals(a: {[key: string]: any}, b: {[key: string]: any}): boolean {\n  const k1 = Object.keys(a);\n  const k2 = Object.keys(b);\n  if (k1.length != k2.length) return false;\n  for (let i = 0; i < k1.length; i++) {\n    const prop = k1[i];\n    if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n  }\n  return true;\n}\n\nfunction replacePostStylesAsPre(\n    element: any, allPreStyleElements: Map<any, Set<string>>,\n    allPostStyleElements: Map<any, Set<string>>): boolean {\n  const postEntry = allPostStyleElements.get(element);\n  if (!postEntry) return false;\n\n  let preEntry = allPreStyleElements.get(element);\n  if (preEntry) {\n    postEntry.forEach(data => preEntry !.add(data));\n  } else {\n    allPreStyleElements.set(element, postEntry);\n  }\n\n  allPostStyleElements.delete(element);\n  return true;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationPlayer, AnimationTriggerMetadata} from '@angular/animations';\nimport {TriggerAst} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {AnimationTrigger, buildTrigger} from '../dsl/animation_trigger';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\n\nimport {AnimationDriver} from './animation_driver';\nimport {parseTimelineCommand} from './shared';\nimport {TimelineAnimationEngine} from './timeline_animation_engine';\nimport {TransitionAnimationEngine} from './transition_animation_engine';\n\nexport class AnimationEngine {\n  private _transitionEngine: TransitionAnimationEngine;\n  private _timelineEngine: TimelineAnimationEngine;\n\n  private _triggerCache: {[key: string]: AnimationTrigger} = {};\n\n  // this method is designed to be overridden by the code that uses this engine\n  public onRemovalComplete = (element: any, context: any) => {};\n\n  constructor(\n      private bodyNode: any, private _driver: AnimationDriver,\n      normalizer: AnimationStyleNormalizer) {\n    this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, normalizer);\n    this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, normalizer);\n\n    this._transitionEngine.onRemovalComplete = (element: any, context: any) =>\n        this.onRemovalComplete(element, context);\n  }\n\n  registerTrigger(\n      componentId: string, namespaceId: string, hostElement: any, name: string,\n      metadata: AnimationTriggerMetadata): void {\n    const cacheKey = componentId + '-' + name;\n    let trigger = this._triggerCache[cacheKey];\n    if (!trigger) {\n      const errors: any[] = [];\n      const ast =\n          buildAnimationAst(this._driver, metadata as AnimationMetadata, errors) as TriggerAst;\n      if (errors.length) {\n        throw new Error(\n            `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.join(\"\\n - \")}`);\n      }\n      trigger = buildTrigger(name, ast);\n      this._triggerCache[cacheKey] = trigger;\n    }\n    this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n  }\n\n  register(namespaceId: string, hostElement: any) {\n    this._transitionEngine.register(namespaceId, hostElement);\n  }\n\n  destroy(namespaceId: string, context: any) {\n    this._transitionEngine.destroy(namespaceId, context);\n  }\n\n  onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n    this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n  }\n\n  onRemove(namespaceId: string, element: any, context: any, isHostElement?: boolean): void {\n    this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n  }\n\n  disableAnimations(element: any, disable: boolean) {\n    this._transitionEngine.markElementAsDisabled(element, disable);\n  }\n\n  process(namespaceId: string, element: any, property: string, value: any) {\n    if (property.charAt(0) == '@') {\n      const [id, action] = parseTimelineCommand(property);\n      const args = value as any[];\n      this._timelineEngine.command(id, element, action, args);\n    } else {\n      this._transitionEngine.trigger(namespaceId, element, property, value);\n    }\n  }\n\n  listen(\n      namespaceId: string, element: any, eventName: string, eventPhase: string,\n      callback: (event: any) => any): () => any {\n    // @@listen\n    if (eventName.charAt(0) == '@') {\n      const [id, action] = parseTimelineCommand(eventName);\n      return this._timelineEngine.listen(id, element, action, callback);\n    }\n    return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n  }\n\n  flush(microtaskId: number = -1): void { this._transitionEngine.flush(microtaskId); }\n\n  get players(): AnimationPlayer[] {\n    return (this._transitionEngine.players as AnimationPlayer[])\n        .concat(this._timelineEngine.players as AnimationPlayer[]);\n  }\n\n  whenRenderingDone(): Promise<any> { return this._transitionEngine.whenRenderingDone(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {eraseStyles, setStyles} from '../util';\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nexport function packageNonAnimatableStyles(\n    element: any, styles: {[key: string]: any} | {[key: string]: any}[]): SpecialCasedStyles|null {\n  let startStyles: {[key: string]: any}|null = null;\n  let endStyles: {[key: string]: any}|null = null;\n  if (Array.isArray(styles) && styles.length) {\n    startStyles = filterNonAnimatableStyles(styles[0]);\n    if (styles.length > 1) {\n      endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n    }\n  } else if (styles) {\n    startStyles = filterNonAnimatableStyles(styles);\n  }\n\n  return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n                                      null;\n}\n\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nexport class SpecialCasedStyles {\n  static initialStylesByElement = new WeakMap<any, {[key: string]: any}>();\n\n  private _state = SpecialCasedStylesState.Pending;\n  private _initialStyles !: {[key: string]: any};\n\n  constructor(\n      private _element: any, private _startStyles: {[key: string]: any}|null,\n      private _endStyles: {[key: string]: any}|null) {\n    let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n    if (!initialStyles) {\n      SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = {});\n    }\n    this._initialStyles = initialStyles;\n  }\n\n  start() {\n    if (this._state < SpecialCasedStylesState.Started) {\n      if (this._startStyles) {\n        setStyles(this._element, this._startStyles, this._initialStyles);\n      }\n      this._state = SpecialCasedStylesState.Started;\n    }\n  }\n\n  finish() {\n    this.start();\n    if (this._state < SpecialCasedStylesState.Finished) {\n      setStyles(this._element, this._initialStyles);\n      if (this._endStyles) {\n        setStyles(this._element, this._endStyles);\n        this._endStyles = null;\n      }\n      this._state = SpecialCasedStylesState.Started;\n    }\n  }\n\n  destroy() {\n    this.finish();\n    if (this._state < SpecialCasedStylesState.Destroyed) {\n      SpecialCasedStyles.initialStylesByElement.delete(this._element);\n      if (this._startStyles) {\n        eraseStyles(this._element, this._startStyles);\n        this._endStyles = null;\n      }\n      if (this._endStyles) {\n        eraseStyles(this._element, this._endStyles);\n        this._endStyles = null;\n      }\n      setStyles(this._element, this._initialStyles);\n      this._state = SpecialCasedStylesState.Destroyed;\n    }\n  }\n}\n\n/**\n * An enum of states reflective of what the status of `SpecialCasedStyles` is.\n *\n * Depending on how `SpecialCasedStyles` is interacted with, the start and end\n * styles may not be applied in the same way. This enum ensures that if and when\n * the ending styles are applied then the starting styles are applied. It is\n * also used to reflect what the current status of the special cased styles are\n * which helps prevent the starting/ending styles not be applied twice. It is\n * also used to cleanup the styles once `SpecialCasedStyles` is destroyed.\n */\nconst enum SpecialCasedStylesState {\n  Pending = 0,\n  Started = 1,\n  Finished = 2,\n  Destroyed = 3,\n}\n\nfunction filterNonAnimatableStyles(styles: {[key: string]: any}) {\n  let result: {[key: string]: any}|null = null;\n  const props = Object.keys(styles);\n  for (let i = 0; i < props.length; i++) {\n    const prop = props[i];\n    if (isNonAnimatableStyle(prop)) {\n      result = result || {};\n      result[prop] = styles[prop];\n    }\n  }\n  return result;\n}\n\nfunction isNonAnimatableStyle(prop: string) {\n  return prop === 'display' || prop === 'position';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nconst ANIMATION_PROP = 'animation';\nconst ANIMATIONEND_EVENT = 'animationend';\nconst ONE_SECOND = 1000;\n\nexport class ElementAnimationStyleHandler {\n  private readonly _eventFn: (e: any) => any;\n  private _finished = false;\n  private _destroyed = false;\n  private _startTime = 0;\n  private _position = 0;\n\n  constructor(\n      private readonly _element: any, private readonly _name: string,\n      private readonly _duration: number, private readonly _delay: number,\n      private readonly _easing: string, private readonly _fillMode: ''|'both'|'forwards',\n      private readonly _onDoneFn: () => any) {\n    this._eventFn = (e) => this._handleCallback(e);\n  }\n\n  apply() {\n    applyKeyframeAnimation(\n        this._element,\n        `${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`);\n    addRemoveAnimationEvent(this._element, this._eventFn, false);\n    this._startTime = Date.now();\n  }\n\n  pause() { playPauseAnimation(this._element, this._name, 'paused'); }\n\n  resume() { playPauseAnimation(this._element, this._name, 'running'); }\n\n  setPosition(position: number) {\n    const index = findIndexForAnimation(this._element, this._name);\n    this._position = position * this._duration;\n    setAnimationStyle(this._element, 'Delay', `-${this._position}ms`, index);\n  }\n\n  getPosition() { return this._position; }\n\n  private _handleCallback(event: any) {\n    const timestamp = event._ngTestManualTimestamp || Date.now();\n    const elapsedTime =\n        parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND;\n    if (event.animationName == this._name &&\n        Math.max(timestamp - this._startTime, 0) >= this._delay && elapsedTime >= this._duration) {\n      this.finish();\n    }\n  }\n\n  finish() {\n    if (this._finished) return;\n    this._finished = true;\n    this._onDoneFn();\n    addRemoveAnimationEvent(this._element, this._eventFn, true);\n  }\n\n  destroy() {\n    if (this._destroyed) return;\n    this._destroyed = true;\n    this.finish();\n    removeKeyframeAnimation(this._element, this._name);\n  }\n}\n\nfunction playPauseAnimation(element: any, name: string, status: 'running' | 'paused') {\n  const index = findIndexForAnimation(element, name);\n  setAnimationStyle(element, 'PlayState', status, index);\n}\n\nfunction applyKeyframeAnimation(element: any, value: string): number {\n  const anim = getAnimationStyle(element, '').trim();\n  let index = 0;\n  if (anim.length) {\n    index = countChars(anim, ',') + 1;\n    value = `${anim}, ${value}`;\n  }\n  setAnimationStyle(element, '', value);\n  return index;\n}\n\nfunction removeKeyframeAnimation(element: any, name: string) {\n  const anim = getAnimationStyle(element, '');\n  const tokens = anim.split(',');\n  const index = findMatchingTokenIndex(tokens, name);\n  if (index >= 0) {\n    tokens.splice(index, 1);\n    const newValue = tokens.join(',');\n    setAnimationStyle(element, '', newValue);\n  }\n}\n\nfunction findIndexForAnimation(element: any, value: string) {\n  const anim = getAnimationStyle(element, '');\n  if (anim.indexOf(',') > 0) {\n    const tokens = anim.split(',');\n    return findMatchingTokenIndex(tokens, value);\n  }\n  return findMatchingTokenIndex([anim], value);\n}\n\nfunction findMatchingTokenIndex(tokens: string[], searchToken: string): number {\n  for (let i = 0; i < tokens.length; i++) {\n    if (tokens[i].indexOf(searchToken) >= 0) {\n      return i;\n    }\n  }\n  return -1;\n}\n\nfunction addRemoveAnimationEvent(element: any, fn: (e: any) => any, doRemove: boolean) {\n  doRemove ? element.removeEventListener(ANIMATIONEND_EVENT, fn) :\n             element.addEventListener(ANIMATIONEND_EVENT, fn);\n}\n\nfunction setAnimationStyle(element: any, name: string, value: string, index?: number) {\n  const prop = ANIMATION_PROP + name;\n  if (index != null) {\n    const oldValue = element.style[prop];\n    if (oldValue.length) {\n      const tokens = oldValue.split(',');\n      tokens[index] = value;\n      value = tokens.join(',');\n    }\n  }\n  element.style[prop] = value;\n}\n\nfunction getAnimationStyle(element: any, name: string) {\n  return element.style[ANIMATION_PROP + name];\n}\n\nfunction countChars(value: string, char: string): number {\n  let count = 0;\n  for (let i = 0; i < value.length; i++) {\n    const c = value.charAt(i);\n    if (c === char) count++;\n  }\n  return count;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer} from '@angular/animations';\n\nimport {computeStyle} from '../../util';\nimport {SpecialCasedStyles} from '../special_cased_styles';\nimport {ElementAnimationStyleHandler} from './element_animation_style_handler';\n\nconst DEFAULT_FILL_MODE = 'forwards';\nconst DEFAULT_EASING = 'linear';\n\nexport const enum AnimatorControlState {INITIALIZED = 1, STARTED = 2, FINISHED = 3, DESTROYED = 4}\n\nexport class CssKeyframesPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n\n  private _started = false;\n  // TODO(issue/24571): remove '!'.\n  private _styler !: ElementAnimationStyleHandler;\n\n  // TODO(issue/24571): remove '!'.\n  public parentPlayer !: AnimationPlayer;\n  public readonly totalTime: number;\n  public readonly easing: string;\n  public currentSnapshot: {[key: string]: string} = {};\n\n  private _state: AnimatorControlState = 0;\n\n  constructor(\n      public readonly element: any, public readonly keyframes: {[key: string]: string | number}[],\n      public readonly animationName: string, private readonly _duration: number,\n      private readonly _delay: number, easing: string,\n      private readonly _finalStyles: {[key: string]: any},\n      private readonly _specialStyles?: SpecialCasedStyles|null) {\n    this.easing = easing || DEFAULT_EASING;\n    this.totalTime = _duration + _delay;\n    this._buildStyler();\n  }\n\n  onStart(fn: () => void): void { this._onStartFns.push(fn); }\n\n  onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n\n  onDestroy(fn: () => void): void { this._onDestroyFns.push(fn); }\n\n  destroy() {\n    this.init();\n    if (this._state >= AnimatorControlState.DESTROYED) return;\n    this._state = AnimatorControlState.DESTROYED;\n    this._styler.destroy();\n    this._flushStartFns();\n    this._flushDoneFns();\n    if (this._specialStyles) {\n      this._specialStyles.destroy();\n    }\n    this._onDestroyFns.forEach(fn => fn());\n    this._onDestroyFns = [];\n  }\n\n  private _flushDoneFns() {\n    this._onDoneFns.forEach(fn => fn());\n    this._onDoneFns = [];\n  }\n\n  private _flushStartFns() {\n    this._onStartFns.forEach(fn => fn());\n    this._onStartFns = [];\n  }\n\n  finish() {\n    this.init();\n    if (this._state >= AnimatorControlState.FINISHED) return;\n    this._state = AnimatorControlState.FINISHED;\n    this._styler.finish();\n    this._flushStartFns();\n    if (this._specialStyles) {\n      this._specialStyles.finish();\n    }\n    this._flushDoneFns();\n  }\n\n  setPosition(value: number) { this._styler.setPosition(value); }\n\n  getPosition(): number { return this._styler.getPosition(); }\n\n  hasStarted(): boolean { return this._state >= AnimatorControlState.STARTED; }\n  init(): void {\n    if (this._state >= AnimatorControlState.INITIALIZED) return;\n    this._state = AnimatorControlState.INITIALIZED;\n    const elm = this.element;\n    this._styler.apply();\n    if (this._delay) {\n      this._styler.pause();\n    }\n  }\n\n  play(): void {\n    this.init();\n    if (!this.hasStarted()) {\n      this._flushStartFns();\n      this._state = AnimatorControlState.STARTED;\n      if (this._specialStyles) {\n        this._specialStyles.start();\n      }\n    }\n    this._styler.resume();\n  }\n\n  pause(): void {\n    this.init();\n    this._styler.pause();\n  }\n  restart(): void {\n    this.reset();\n    this.play();\n  }\n  reset(): void {\n    this._styler.destroy();\n    this._buildStyler();\n    this._styler.apply();\n  }\n\n  private _buildStyler() {\n    this._styler = new ElementAnimationStyleHandler(\n        this.element, this.animationName, this._duration, this._delay, this.easing,\n        DEFAULT_FILL_MODE, () => this.finish());\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n\n  beforeDestroy() {\n    this.init();\n    const styles: {[key: string]: string} = {};\n    if (this.hasStarted()) {\n      const finished = this._state >= AnimatorControlState.FINISHED;\n      Object.keys(this._finalStyles).forEach(prop => {\n        if (prop != 'offset') {\n          styles[prop] = finished ? this._finalStyles[prop] : computeStyle(this.element, prop);\n        }\n      });\n    }\n    this.currentSnapshot = styles;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NoopAnimationPlayer} from '@angular/animations';\nimport {hypenatePropsObject} from '../shared';\n\nexport class DirectStylePlayer extends NoopAnimationPlayer {\n  private _startingStyles: {[key: string]: any}|null = {};\n  private __initialized = false;\n  private _styles: {[key: string]: any};\n\n  constructor(public element: any, styles: {[key: string]: any}) {\n    super();\n    this._styles = hypenatePropsObject(styles);\n  }\n\n  init() {\n    if (this.__initialized || !this._startingStyles) return;\n    this.__initialized = true;\n    Object.keys(this._styles).forEach(prop => {\n      this._startingStyles ![prop] = this.element.style[prop];\n    });\n    super.init();\n  }\n\n  play() {\n    if (!this._startingStyles) return;\n    this.init();\n    Object.keys(this._styles)\n        .forEach(prop => this.element.style.setProperty(prop, this._styles[prop]));\n    super.play();\n  }\n\n  destroy() {\n    if (!this._startingStyles) return;\n    Object.keys(this._startingStyles).forEach(prop => {\n      const value = this._startingStyles ![prop];\n      if (value) {\n        this.element.style.setProperty(prop, value);\n      } else {\n        this.element.style.removeProperty(prop);\n      }\n    });\n    this._startingStyles = null;\n    super.destroy();\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, ÉµStyleData} from '@angular/animations';\n\nimport {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, computeStyle} from '../../util';\nimport {AnimationDriver} from '../animation_driver';\nimport {containsElement, hypenatePropsObject, invokeQuery, matchesElement, validateStyleProperty} from '../shared';\nimport {packageNonAnimatableStyles} from '../special_cased_styles';\n\nimport {CssKeyframesPlayer} from './css_keyframes_player';\nimport {DirectStylePlayer} from './direct_style_player';\n\nconst KEYFRAMES_NAME_PREFIX = 'gen_css_kf_';\nconst TAB_SPACE = ' ';\n\nexport class CssKeyframesDriver implements AnimationDriver {\n  private _count = 0;\n  private readonly _head: any = document.querySelector('head');\n  private _warningIssued = false;\n\n  validateStyleProperty(prop: string): boolean { return validateStyleProperty(prop); }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return (window.getComputedStyle(element) as any)[prop] as string;\n  }\n\n  buildKeyframeElement(element: any, name: string, keyframes: {[key: string]: any}[]): any {\n    keyframes = keyframes.map(kf => hypenatePropsObject(kf));\n    let keyframeStr = `@keyframes ${name} {\\n`;\n    let tab = '';\n    keyframes.forEach(kf => {\n      tab = TAB_SPACE;\n      const offset = parseFloat(kf['offset']);\n      keyframeStr += `${tab}${offset * 100}% {\\n`;\n      tab += TAB_SPACE;\n      Object.keys(kf).forEach(prop => {\n        const value = kf[prop];\n        switch (prop) {\n          case 'offset':\n            return;\n          case 'easing':\n            if (value) {\n              keyframeStr += `${tab}animation-timing-function: ${value};\\n`;\n            }\n            return;\n          default:\n            keyframeStr += `${tab}${prop}: ${value};\\n`;\n            return;\n        }\n      });\n      keyframeStr += `${tab}}\\n`;\n    });\n    keyframeStr += `}\\n`;\n\n    const kfElm = document.createElement('style');\n    kfElm.innerHTML = keyframeStr;\n    return kfElm;\n  }\n\n  animate(\n      element: any, keyframes: ÉµStyleData[], duration: number, delay: number, easing: string,\n      previousPlayers: AnimationPlayer[] = [], scrubberAccessRequested?: boolean): AnimationPlayer {\n    if (scrubberAccessRequested) {\n      this._notifyFaultyScrubber();\n    }\n\n    const previousCssKeyframePlayers = <CssKeyframesPlayer[]>previousPlayers.filter(\n        player => player instanceof CssKeyframesPlayer);\n\n    const previousStyles: {[key: string]: any} = {};\n\n    if (allowPreviousPlayerStylesMerge(duration, delay)) {\n      previousCssKeyframePlayers.forEach(player => {\n        let styles = player.currentSnapshot;\n        Object.keys(styles).forEach(prop => previousStyles[prop] = styles[prop]);\n      });\n    }\n\n    keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n    const finalStyles = flattenKeyframesIntoStyles(keyframes);\n\n    // if there is no animation then there is no point in applying\n    // styles and waiting for an event to get fired. This causes lag.\n    // It's better to just directly apply the styles to the element\n    // via the direct styling animation player.\n    if (duration == 0) {\n      return new DirectStylePlayer(element, finalStyles);\n    }\n\n    const animationName = `${KEYFRAMES_NAME_PREFIX}${this._count++}`;\n    const kfElm = this.buildKeyframeElement(element, animationName, keyframes);\n    document.querySelector('head') !.appendChild(kfElm);\n\n    const specialStyles = packageNonAnimatableStyles(element, keyframes);\n    const player = new CssKeyframesPlayer(\n        element, keyframes, animationName, duration, delay, easing, finalStyles, specialStyles);\n\n    player.onDestroy(() => removeElement(kfElm));\n    return player;\n  }\n\n  private _notifyFaultyScrubber() {\n    if (!this._warningIssued) {\n      console.warn(\n          '@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\\n',\n          '  visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill.');\n      this._warningIssued = true;\n    }\n  }\n}\n\nfunction flattenKeyframesIntoStyles(\n    keyframes: null | {[key: string]: any} | {[key: string]: any}[]): {[key: string]: any} {\n  let flatKeyframes: {[key: string]: any} = {};\n  if (keyframes) {\n    const kfs = Array.isArray(keyframes) ? keyframes : [keyframes];\n    kfs.forEach(kf => {\n      Object.keys(kf).forEach(prop => {\n        if (prop == 'offset' || prop == 'easing') return;\n        flatKeyframes[prop] = kf[prop];\n      });\n    });\n  }\n  return flatKeyframes;\n}\n\nfunction removeElement(node: any) {\n  node.parentNode.removeChild(node);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer} from '@angular/animations';\n\nimport {computeStyle} from '../../util';\nimport {SpecialCasedStyles} from '../special_cased_styles';\n\nimport {DOMAnimation} from './dom_animation';\n\nexport class WebAnimationsPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n  private _duration: number;\n  private _delay: number;\n  private _initialized = false;\n  private _finished = false;\n  private _started = false;\n  private _destroyed = false;\n  // TODO(issue/24571): remove '!'.\n  private _finalKeyframe !: {[key: string]: string | number};\n\n  // TODO(issue/24571): remove '!'.\n  public readonly domPlayer !: DOMAnimation;\n  public time = 0;\n\n  public parentPlayer: AnimationPlayer|null = null;\n  public currentSnapshot: {[styleName: string]: string | number} = {};\n\n  constructor(\n      public element: any, public keyframes: {[key: string]: string | number}[],\n      public options: {[key: string]: string | number},\n      private _specialStyles?: SpecialCasedStyles|null) {\n    this._duration = <number>options['duration'];\n    this._delay = <number>options['delay'] || 0;\n    this.time = this._duration + this._delay;\n  }\n\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n\n  init(): void {\n    this._buildPlayer();\n    this._preparePlayerBeforeStart();\n  }\n\n  private _buildPlayer(): void {\n    if (this._initialized) return;\n    this._initialized = true;\n\n    const keyframes = this.keyframes;\n    (this as{domPlayer: DOMAnimation}).domPlayer =\n        this._triggerWebAnimation(this.element, keyframes, this.options);\n    this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};\n    this.domPlayer.addEventListener('finish', () => this._onFinish());\n  }\n\n  private _preparePlayerBeforeStart() {\n    // this is required so that the player doesn't start to animate right away\n    if (this._delay) {\n      this._resetDomPlayerState();\n    } else {\n      this.domPlayer.pause();\n    }\n  }\n\n  /** @internal */\n  _triggerWebAnimation(element: any, keyframes: any[], options: any): DOMAnimation {\n    // jscompiler doesn't seem to know animate is a native property because it's not fully\n    // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n    return element['animate'](keyframes, options) as DOMAnimation;\n  }\n\n  onStart(fn: () => void): void { this._onStartFns.push(fn); }\n\n  onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n\n  onDestroy(fn: () => void): void { this._onDestroyFns.push(fn); }\n\n  play(): void {\n    this._buildPlayer();\n    if (!this.hasStarted()) {\n      this._onStartFns.forEach(fn => fn());\n      this._onStartFns = [];\n      this._started = true;\n      if (this._specialStyles) {\n        this._specialStyles.start();\n      }\n    }\n    this.domPlayer.play();\n  }\n\n  pause(): void {\n    this.init();\n    this.domPlayer.pause();\n  }\n\n  finish(): void {\n    this.init();\n    if (this._specialStyles) {\n      this._specialStyles.finish();\n    }\n    this._onFinish();\n    this.domPlayer.finish();\n  }\n\n  reset(): void {\n    this._resetDomPlayerState();\n    this._destroyed = false;\n    this._finished = false;\n    this._started = false;\n  }\n\n  private _resetDomPlayerState() {\n    if (this.domPlayer) {\n      this.domPlayer.cancel();\n    }\n  }\n\n  restart(): void {\n    this.reset();\n    this.play();\n  }\n\n  hasStarted(): boolean { return this._started; }\n\n  destroy(): void {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      this._resetDomPlayerState();\n      this._onFinish();\n      if (this._specialStyles) {\n        this._specialStyles.destroy();\n      }\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n\n  setPosition(p: number): void { this.domPlayer.currentTime = p * this.time; }\n\n  getPosition(): number { return this.domPlayer.currentTime / this.time; }\n\n  get totalTime(): number { return this._delay + this._duration; }\n\n  beforeDestroy() {\n    const styles: {[key: string]: string | number} = {};\n    if (this.hasStarted()) {\n      Object.keys(this._finalKeyframe).forEach(prop => {\n        if (prop != 'offset') {\n          styles[prop] =\n              this._finished ? this._finalKeyframe[prop] : computeStyle(this.element, prop);\n        }\n      });\n    }\n    this.currentSnapshot = styles;\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, ÉµStyleData} from '@angular/animations';\n\nimport {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, copyStyles} from '../../util';\nimport {AnimationDriver} from '../animation_driver';\nimport {CssKeyframesDriver} from '../css_keyframes/css_keyframes_driver';\nimport {containsElement, invokeQuery, isBrowser, matchesElement, validateStyleProperty} from '../shared';\nimport {packageNonAnimatableStyles} from '../special_cased_styles';\n\nimport {WebAnimationsPlayer} from './web_animations_player';\n\nexport class WebAnimationsDriver implements AnimationDriver {\n  private _isNativeImpl = /\\{\\s*\\[native\\s+code\\]\\s*\\}/.test(getElementAnimateFn().toString());\n  private _cssKeyframesDriver = new CssKeyframesDriver();\n\n  validateStyleProperty(prop: string): boolean { return validateStyleProperty(prop); }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return (window.getComputedStyle(element) as any)[prop] as string;\n  }\n\n  overrideWebAnimationsSupport(supported: boolean) { this._isNativeImpl = supported; }\n\n  animate(\n      element: any, keyframes: ÉµStyleData[], duration: number, delay: number, easing: string,\n      previousPlayers: AnimationPlayer[] = [], scrubberAccessRequested?: boolean): AnimationPlayer {\n    const useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;\n    if (useKeyframes) {\n      return this._cssKeyframesDriver.animate(\n          element, keyframes, duration, delay, easing, previousPlayers);\n    }\n\n    const fill = delay == 0 ? 'both' : 'forwards';\n    const playerOptions: {[key: string]: string | number} = {duration, delay, fill};\n    // we check for this to avoid having a null|undefined value be present\n    // for the easing (which results in an error for certain browsers #9752)\n    if (easing) {\n      playerOptions['easing'] = easing;\n    }\n\n    const previousStyles: {[key: string]: any} = {};\n    const previousWebAnimationPlayers = <WebAnimationsPlayer[]>previousPlayers.filter(\n        player => player instanceof WebAnimationsPlayer);\n\n    if (allowPreviousPlayerStylesMerge(duration, delay)) {\n      previousWebAnimationPlayers.forEach(player => {\n        let styles = player.currentSnapshot;\n        Object.keys(styles).forEach(prop => previousStyles[prop] = styles[prop]);\n      });\n    }\n\n    keyframes = keyframes.map(styles => copyStyles(styles, false));\n    keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n    const specialStyles = packageNonAnimatableStyles(element, keyframes);\n    return new WebAnimationsPlayer(element, keyframes, playerOptions, specialStyles);\n  }\n}\n\nexport function supportsWebAnimations() {\n  return typeof getElementAnimateFn() === 'function';\n}\n\nfunction getElementAnimateFn(): any {\n  return (isBrowser() && (<any>Element).prototype['animate']) || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationBuilder, AnimationFactory, AnimationMetadata, AnimationOptions, AnimationPlayer, sequence} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, RendererFactory2, RendererType2, ViewEncapsulation} from '@angular/core';\n\nimport {AnimationRenderer} from './animation_renderer';\n\n@Injectable()\nexport class BrowserAnimationBuilder extends AnimationBuilder {\n  private _nextAnimationId = 0;\n  private _renderer: AnimationRenderer;\n\n  constructor(rootRenderer: RendererFactory2, @Inject(DOCUMENT) doc: any) {\n    super();\n    const typeData = {\n      id: '0',\n      encapsulation: ViewEncapsulation.None,\n      styles: [],\n      data: {animation: []}\n    } as RendererType2;\n    this._renderer = rootRenderer.createRenderer(doc.body, typeData) as AnimationRenderer;\n  }\n\n  build(animation: AnimationMetadata|AnimationMetadata[]): AnimationFactory {\n    const id = this._nextAnimationId.toString();\n    this._nextAnimationId++;\n    const entry = Array.isArray(animation) ? sequence(animation) : animation;\n    issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n    return new BrowserAnimationFactory(id, this._renderer);\n  }\n}\n\nexport class BrowserAnimationFactory extends AnimationFactory {\n  constructor(private _id: string, private _renderer: AnimationRenderer) { super(); }\n\n  create(element: any, options?: AnimationOptions): AnimationPlayer {\n    return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n  }\n}\n\nexport class RendererAnimationPlayer implements AnimationPlayer {\n  public parentPlayer: AnimationPlayer|null = null;\n  private _started = false;\n\n  constructor(\n      public id: string, public element: any, options: AnimationOptions,\n      private _renderer: AnimationRenderer) {\n    this._command('create', options);\n  }\n\n  private _listen(eventName: string, callback: (event: any) => any): () => void {\n    return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n  }\n\n  private _command(command: string, ...args: any[]) {\n    return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n  }\n\n  onDone(fn: () => void): void { this._listen('done', fn); }\n\n  onStart(fn: () => void): void { this._listen('start', fn); }\n\n  onDestroy(fn: () => void): void { this._listen('destroy', fn); }\n\n  init(): void { this._command('init'); }\n\n  hasStarted(): boolean { return this._started; }\n\n  play(): void {\n    this._command('play');\n    this._started = true;\n  }\n\n  pause(): void { this._command('pause'); }\n\n  restart(): void { this._command('restart'); }\n\n  finish(): void { this._command('finish'); }\n\n  destroy(): void { this._command('destroy'); }\n\n  reset(): void { this._command('reset'); }\n\n  setPosition(p: number): void { this._command('setPosition', p); }\n\n  getPosition(): number { return 0; }\n\n  public totalTime = 0;\n}\n\nfunction issueAnimationCommand(\n    renderer: AnimationRenderer, element: any, id: string, command: string, args: any[]): any {\n  return renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationTriggerMetadata} from '@angular/animations';\nimport {ÉµAnimationEngine as AnimationEngine} from '@angular/animations/browser';\nimport {Injectable, NgZone, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2} from '@angular/core';\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\n\n@Injectable()\nexport class AnimationRendererFactory implements RendererFactory2 {\n  private _currentId: number = 0;\n  private _microtaskId: number = 1;\n  private _animationCallbacksBuffer: [(e: any) => any, any][] = [];\n  private _rendererCache = new Map<Renderer2, BaseAnimationRenderer>();\n  private _cdRecurDepth = 0;\n  private promise: Promise<any> = Promise.resolve(0);\n\n  constructor(\n      private delegate: RendererFactory2, private engine: AnimationEngine, private _zone: NgZone) {\n    engine.onRemovalComplete = (element: any, delegate: Renderer2) => {\n      // Note: if an component element has a leave animation, and the component\n      // a host leave animation, the view engine will call `removeChild` for the parent\n      // component renderer as well as for the child component renderer.\n      // Therefore, we need to check if we already removed the element.\n      if (delegate && delegate.parentNode(element)) {\n        delegate.removeChild(element.parentNode, element);\n      }\n    };\n  }\n\n  createRenderer(hostElement: any, type: RendererType2): Renderer2 {\n    const EMPTY_NAMESPACE_ID = '';\n\n    // cache the delegates to find out which cached delegate can\n    // be used by which cached renderer\n    const delegate = this.delegate.createRenderer(hostElement, type);\n    if (!hostElement || !type || !type.data || !type.data['animation']) {\n      let renderer: BaseAnimationRenderer|undefined = this._rendererCache.get(delegate);\n      if (!renderer) {\n        renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);\n        // only cache this result when the base renderer is used\n        this._rendererCache.set(delegate, renderer);\n      }\n      return renderer;\n    }\n\n    const componentId = type.id;\n    const namespaceId = type.id + '-' + this._currentId;\n    this._currentId++;\n\n    this.engine.register(namespaceId, hostElement);\n    const animationTriggers = type.data['animation'] as AnimationTriggerMetadata[];\n    animationTriggers.forEach(\n        trigger => this.engine.registerTrigger(\n            componentId, namespaceId, hostElement, trigger.name, trigger));\n    return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n  }\n\n  begin() {\n    this._cdRecurDepth++;\n    if (this.delegate.begin) {\n      this.delegate.begin();\n    }\n  }\n\n  private _scheduleCountTask() {\n    // always use promise to schedule microtask instead of use Zone\n    this.promise.then(() => { this._microtaskId++; });\n  }\n\n  /** @internal */\n  scheduleListenerCallback(count: number, fn: (e: any) => any, data: any) {\n    if (count >= 0 && count < this._microtaskId) {\n      this._zone.run(() => fn(data));\n      return;\n    }\n\n    if (this._animationCallbacksBuffer.length == 0) {\n      Promise.resolve(null).then(() => {\n        this._zone.run(() => {\n          this._animationCallbacksBuffer.forEach(tuple => {\n            const [fn, data] = tuple;\n            fn(data);\n          });\n          this._animationCallbacksBuffer = [];\n        });\n      });\n    }\n\n    this._animationCallbacksBuffer.push([fn, data]);\n  }\n\n  end() {\n    this._cdRecurDepth--;\n\n    // this is to prevent animations from running twice when an inner\n    // component does CD when a parent component instead has inserted it\n    if (this._cdRecurDepth == 0) {\n      this._zone.runOutsideAngular(() => {\n        this._scheduleCountTask();\n        this.engine.flush(this._microtaskId);\n      });\n    }\n    if (this.delegate.end) {\n      this.delegate.end();\n    }\n  }\n\n  whenRenderingDone(): Promise<any> { return this.engine.whenRenderingDone(); }\n}\n\nexport class BaseAnimationRenderer implements Renderer2 {\n  constructor(\n      protected namespaceId: string, public delegate: Renderer2, public engine: AnimationEngine) {\n    this.destroyNode = this.delegate.destroyNode ? (n) => delegate.destroyNode !(n) : null;\n  }\n\n  get data() { return this.delegate.data; }\n\n  destroyNode: ((n: any) => void)|null;\n\n  destroy(): void {\n    this.engine.destroy(this.namespaceId, this.delegate);\n    this.delegate.destroy();\n  }\n\n  createElement(name: string, namespace?: string|null|undefined) {\n    return this.delegate.createElement(name, namespace);\n  }\n\n  createComment(value: string) { return this.delegate.createComment(value); }\n\n  createText(value: string) { return this.delegate.createText(value); }\n\n  appendChild(parent: any, newChild: any): void {\n    this.delegate.appendChild(parent, newChild);\n    this.engine.onInsert(this.namespaceId, newChild, parent, false);\n  }\n\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    this.delegate.insertBefore(parent, newChild, refChild);\n    this.engine.onInsert(this.namespaceId, newChild, parent, true);\n  }\n\n  removeChild(parent: any, oldChild: any, isHostElement: boolean): void {\n    this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n  }\n\n  selectRootElement(selectorOrNode: any, preserveContent?: boolean) {\n    return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n  }\n\n  parentNode(node: any) { return this.delegate.parentNode(node); }\n\n  nextSibling(node: any) { return this.delegate.nextSibling(node); }\n\n  setAttribute(el: any, name: string, value: string, namespace?: string|null|undefined): void {\n    this.delegate.setAttribute(el, name, value, namespace);\n  }\n\n  removeAttribute(el: any, name: string, namespace?: string|null|undefined): void {\n    this.delegate.removeAttribute(el, name, namespace);\n  }\n\n  addClass(el: any, name: string): void { this.delegate.addClass(el, name); }\n\n  removeClass(el: any, name: string): void { this.delegate.removeClass(el, name); }\n\n  setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2|undefined): void {\n    this.delegate.setStyle(el, style, value, flags);\n  }\n\n  removeStyle(el: any, style: string, flags?: RendererStyleFlags2|undefined): void {\n    this.delegate.removeStyle(el, style, flags);\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n      this.disableAnimations(el, !!value);\n    } else {\n      this.delegate.setProperty(el, name, value);\n    }\n  }\n\n  setValue(node: any, value: string): void { this.delegate.setValue(node, value); }\n\n  listen(target: any, eventName: string, callback: (event: any) => boolean | void): () => void {\n    return this.delegate.listen(target, eventName, callback);\n  }\n\n  protected disableAnimations(element: any, value: boolean) {\n    this.engine.disableAnimations(element, value);\n  }\n}\n\nexport class AnimationRenderer extends BaseAnimationRenderer implements Renderer2 {\n  constructor(\n      public factory: AnimationRendererFactory, namespaceId: string, delegate: Renderer2,\n      engine: AnimationEngine) {\n    super(namespaceId, delegate, engine);\n    this.namespaceId = namespaceId;\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    if (name.charAt(0) == ANIMATION_PREFIX) {\n      if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n        value = value === undefined ? true : !!value;\n        this.disableAnimations(el, value as boolean);\n      } else {\n        this.engine.process(this.namespaceId, el, name.substr(1), value);\n      }\n    } else {\n      this.delegate.setProperty(el, name, value);\n    }\n  }\n\n  listen(target: 'window'|'document'|'body'|any, eventName: string, callback: (event: any) => any):\n      () => void {\n    if (eventName.charAt(0) == ANIMATION_PREFIX) {\n      const element = resolveElementFromTarget(target);\n      let name = eventName.substr(1);\n      let phase = '';\n      // @listener.phase is for trigger animation callbacks\n      // @@listener is for animation builder callbacks\n      if (name.charAt(0) != ANIMATION_PREFIX) {\n        [name, phase] = parseTriggerCallbackName(name);\n      }\n      return this.engine.listen(this.namespaceId, element, name, phase, event => {\n        const countId = (event as any)['_data'] || -1;\n        this.factory.scheduleListenerCallback(countId, callback, event);\n      });\n    }\n    return this.delegate.listen(target, eventName, callback);\n  }\n}\n\nfunction resolveElementFromTarget(target: 'window' | 'document' | 'body' | any): any {\n  switch (target) {\n    case 'body':\n      return document.body;\n    case 'document':\n      return document;\n    case 'window':\n      return window;\n    default:\n      return target;\n  }\n}\n\nfunction parseTriggerCallbackName(triggerName: string) {\n  const dotIndex = triggerName.indexOf('.');\n  const trigger = triggerName.substring(0, dotIndex);\n  const phase = triggerName.substr(dotIndex + 1);\n  return [trigger, phase];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationBuilder} from '@angular/animations';\nimport {AnimationDriver, ÉµAnimationEngine as AnimationEngine, ÉµAnimationStyleNormalizer as AnimationStyleNormalizer, ÉµCssKeyframesDriver as CssKeyframesDriver, ÉµNoopAnimationDriver as NoopAnimationDriver, ÉµWebAnimationsDriver as WebAnimationsDriver, ÉµWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer, ÉµsupportsWebAnimations as supportsWebAnimations} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, NgZone, Provider, RendererFactory2} from '@angular/core';\nimport {ÉµDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\nimport {BrowserAnimationBuilder} from './animation_builder';\nimport {AnimationRendererFactory} from './animation_renderer';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine {\n  constructor(\n      @Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {\n    super(doc.body, driver, normalizer);\n  }\n}\n\nexport function instantiateSupportedAnimationDriver() {\n  return supportsWebAnimations() ? new WebAnimationsDriver() : new CssKeyframesDriver();\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n  return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory(\n    renderer: DomRendererFactory2, engine: AnimationEngine, zone: NgZone) {\n  return new AnimationRendererFactory(renderer, engine, zone);\n}\n\n/**\n * @publicApi\n */\nexport const ANIMATION_MODULE_TYPE =\n    new InjectionToken<'NoopAnimations'|'BrowserAnimations'>('AnimationModuleType');\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n  {provide: AnimationBuilder, useClass: BrowserAnimationBuilder},\n  {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n  {provide: AnimationEngine, useClass: InjectableAnimationEngine}, {\n    provide: RendererFactory2,\n    useFactory: instantiateRendererFactory,\n    deps: [DomRendererFactory2, AnimationEngine, NgZone]\n  }\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n  {provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver},\n  {provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n  {provide: AnimationDriver, useClass: NoopAnimationDriver},\n  {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {BrowserModule} from '@angular/platform-browser';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\n@NgModule({\n  exports: [BrowserModule],\n  providers: BROWSER_ANIMATIONS_PROVIDERS,\n})\nexport class BrowserAnimationsModule {\n}\n\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\n@NgModule({\n  exports: [BrowserModule],\n  providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n})\nexport class NoopAnimationsModule {\n}\n"],"sourceRoot":""}