@angular/core 7.2.0-rc.0 → 7.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/bundles/core-testing.umd.js +193 -131
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +11 -11
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +1777 -1329
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +111 -125
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/core.js +1 -1
  11. package/esm2015/index.js +2 -2
  12. package/esm2015/public_api.js +2 -2
  13. package/esm2015/src/application_init.js +1 -1
  14. package/esm2015/src/application_module.js +1 -1
  15. package/esm2015/src/application_ref.js +1 -1
  16. package/esm2015/src/application_tokens.js +1 -1
  17. package/esm2015/src/change_detection/change_detection.js +1 -1
  18. package/esm2015/src/change_detection/change_detection_util.js +1 -1
  19. package/esm2015/src/change_detection/change_detector_ref.js +1 -1
  20. package/esm2015/src/change_detection/constants.js +3 -3
  21. package/esm2015/src/change_detection/differs/default_iterable_differ.js +1 -1
  22. package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +1 -1
  23. package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
  24. package/esm2015/src/change_detection/differs/keyvalue_differs.js +1 -1
  25. package/esm2015/src/change_detection/pipe_transform.js +1 -1
  26. package/esm2015/src/change_detection.js +1 -1
  27. package/esm2015/src/codegen_private_exports.js +1 -1
  28. package/esm2015/src/console.js +1 -1
  29. package/esm2015/src/core.js +2 -2
  30. package/esm2015/src/core_private_export.js +1 -1
  31. package/esm2015/src/core_render3_private_export.js +2 -2
  32. package/esm2015/src/debug/debug_node.js +6 -6
  33. package/esm2015/src/di/defs.js +1 -1
  34. package/esm2015/src/di/forward_ref.js +1 -1
  35. package/esm2015/src/di/injectable.js +1 -1
  36. package/esm2015/src/di/injection_token.js +2 -2
  37. package/esm2015/src/di/injector.js +1 -1
  38. package/esm2015/src/di/injector_compatibility.js +1 -1
  39. package/esm2015/src/di/metadata.js +1 -1
  40. package/esm2015/src/di/provider.js +1 -1
  41. package/esm2015/src/di/r3_injector.js +1 -1
  42. package/esm2015/src/di/reflective_errors.js +1 -1
  43. package/esm2015/src/di/reflective_injector.js +1 -1
  44. package/esm2015/src/di/reflective_key.js +1 -1
  45. package/esm2015/src/di/reflective_provider.js +1 -1
  46. package/esm2015/src/di/scope.js +1 -1
  47. package/esm2015/src/di/util.js +1 -1
  48. package/esm2015/src/di.js +1 -1
  49. package/esm2015/src/error_handler.js +1 -1
  50. package/esm2015/src/errors.js +1 -1
  51. package/esm2015/src/event_emitter.js +1 -1
  52. package/esm2015/src/i18n/tokens.js +1 -1
  53. package/esm2015/src/is_dev_mode.js +1 -1
  54. package/esm2015/src/ivy_switch.js +1 -1
  55. package/esm2015/src/linker/compiler.js +1 -1
  56. package/esm2015/src/linker/component_factory.js +1 -1
  57. package/esm2015/src/linker/component_factory_resolver.js +1 -1
  58. package/esm2015/src/linker/element_ref.js +1 -1
  59. package/esm2015/src/linker/ng_module_factory.js +1 -1
  60. package/esm2015/src/linker/ng_module_factory_loader.js +1 -1
  61. package/esm2015/src/linker/query_list.js +1 -1
  62. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +1 -1
  63. package/esm2015/src/linker/template_ref.js +6 -4
  64. package/esm2015/src/linker/view_container_ref.js +1 -1
  65. package/esm2015/src/linker/view_ref.js +1 -1
  66. package/esm2015/src/linker.js +1 -1
  67. package/esm2015/src/metadata/di.js +1 -1
  68. package/esm2015/src/metadata/directives.js +1 -1
  69. package/esm2015/src/metadata/lifecycle_hooks.js +1 -1
  70. package/esm2015/src/metadata/ng_module.js +1 -1
  71. package/esm2015/src/metadata/resource_loading.js +1 -1
  72. package/esm2015/src/metadata/view.js +1 -1
  73. package/esm2015/src/metadata.js +1 -1
  74. package/esm2015/src/platform_core_providers.js +1 -1
  75. package/esm2015/src/profile/profile.js +1 -1
  76. package/esm2015/src/profile/wtf_impl.js +1 -1
  77. package/esm2015/src/r3_symbols.js +1 -1
  78. package/esm2015/src/reflection/platform_reflection_capabilities.js +1 -1
  79. package/esm2015/src/reflection/reflection.js +1 -1
  80. package/esm2015/src/reflection/reflection_capabilities.js +1 -1
  81. package/esm2015/src/reflection/reflector.js +1 -1
  82. package/esm2015/src/reflection/types.js +1 -1
  83. package/esm2015/src/render/api.js +1 -1
  84. package/esm2015/src/render.js +1 -1
  85. package/esm2015/src/render3/assert.js +1 -1
  86. package/esm2015/src/render3/bindings.js +3 -3
  87. package/esm2015/src/render3/component.js +8 -6
  88. package/esm2015/src/render3/component_ref.js +5 -5
  89. package/esm2015/src/render3/context_discovery.js +2 -2
  90. package/esm2015/src/render3/definition.js +3 -10
  91. package/esm2015/src/render3/di.js +107 -93
  92. package/esm2015/src/render3/di_setup.js +1 -1
  93. package/esm2015/src/render3/discovery_utils.js +5 -5
  94. package/esm2015/src/render3/empty.js +28 -0
  95. package/esm2015/src/render3/errors.js +1 -1
  96. package/esm2015/src/render3/features/inherit_definition_feature.js +3 -3
  97. package/esm2015/src/render3/features/ng_onchanges_feature.js +1 -1
  98. package/esm2015/src/render3/features/providers_feature.js +1 -1
  99. package/esm2015/src/render3/fields.js +1 -1
  100. package/esm2015/src/render3/global_utils.js +1 -1
  101. package/esm2015/src/render3/global_utils_api.js +1 -1
  102. package/esm2015/src/render3/hooks.js +14 -12
  103. package/esm2015/src/render3/i18n.js +3 -3
  104. package/esm2015/src/render3/index.js +2 -2
  105. package/esm2015/src/render3/instructions.js +319 -370
  106. package/esm2015/src/render3/interfaces/container.js +10 -1
  107. package/esm2015/src/render3/interfaces/context.js +1 -1
  108. package/esm2015/src/render3/interfaces/definition.js +1 -6
  109. package/esm2015/src/render3/interfaces/i18n.js +1 -1
  110. package/esm2015/src/render3/interfaces/injector.js +1 -2
  111. package/esm2015/src/render3/interfaces/node.js +37 -2
  112. package/esm2015/src/render3/interfaces/player.js +1 -1
  113. package/esm2015/src/render3/interfaces/projection.js +1 -1
  114. package/esm2015/src/render3/interfaces/query.js +1 -1
  115. package/esm2015/src/render3/interfaces/renderer.js +1 -1
  116. package/esm2015/src/render3/interfaces/sanitization.js +1 -1
  117. package/esm2015/src/render3/interfaces/styling.js +304 -113
  118. package/esm2015/src/render3/interfaces/view.js +15 -7
  119. package/esm2015/src/render3/jit/compiler_facade.js +1 -1
  120. package/esm2015/src/render3/jit/compiler_facade_interface.js +3 -1
  121. package/esm2015/src/render3/jit/directive.js +6 -7
  122. package/esm2015/src/render3/jit/environment.js +3 -1
  123. package/esm2015/src/render3/jit/injectable.js +1 -1
  124. package/esm2015/src/render3/jit/module.js +11 -9
  125. package/esm2015/src/render3/jit/pipe.js +1 -1
  126. package/esm2015/src/render3/jit/util.js +1 -1
  127. package/esm2015/src/render3/metadata.js +1 -1
  128. package/esm2015/src/render3/ng_dev_mode.js +1 -1
  129. package/esm2015/src/render3/ng_module_ref.js +1 -1
  130. package/esm2015/src/render3/node_assert.js +1 -1
  131. package/esm2015/src/render3/node_manipulation.js +5 -22
  132. package/esm2015/src/render3/node_selector_matcher.js +3 -3
  133. package/esm2015/src/render3/pipe.js +2 -2
  134. package/esm2015/src/render3/players.js +1 -1
  135. package/esm2015/src/render3/pure_function.js +3 -3
  136. package/esm2015/src/render3/query.js +3 -3
  137. package/esm2015/src/render3/state.js +14 -20
  138. package/esm2015/src/render3/styling/class_and_style_bindings.js +893 -213
  139. package/esm2015/src/render3/styling/core_player_handler.js +1 -1
  140. package/esm2015/src/render3/styling/player_factory.js +1 -1
  141. package/esm2015/src/render3/styling/util.js +37 -14
  142. package/esm2015/src/render3/tokens.js +1 -1
  143. package/esm2015/src/render3/util.js +21 -5
  144. package/esm2015/src/render3/view_engine_compatibility.js +5 -6
  145. package/esm2015/src/render3/view_engine_compatibility_prebound.js +1 -1
  146. package/esm2015/src/render3/view_ref.js +6 -16
  147. package/esm2015/src/sanitization/bypass.js +1 -1
  148. package/esm2015/src/sanitization/html_sanitizer.js +2 -2
  149. package/esm2015/src/sanitization/inert_body.js +4 -4
  150. package/esm2015/src/sanitization/sanitization.js +1 -1
  151. package/esm2015/src/sanitization/security.js +1 -1
  152. package/esm2015/src/sanitization/style_sanitizer.js +1 -1
  153. package/esm2015/src/sanitization/url_sanitizer.js +1 -1
  154. package/esm2015/src/testability/testability.js +1 -1
  155. package/esm2015/src/type.js +1 -1
  156. package/esm2015/src/util/decorators.js +1 -1
  157. package/esm2015/src/util/lang.js +1 -1
  158. package/esm2015/src/util/ng_reflect.js +1 -1
  159. package/esm2015/src/util/noop.js +1 -1
  160. package/esm2015/src/util/property.js +1 -1
  161. package/esm2015/src/util.js +1 -1
  162. package/esm2015/src/version.js +2 -2
  163. package/esm2015/src/view/element.js +1 -1
  164. package/esm2015/src/view/entrypoint.js +1 -1
  165. package/esm2015/src/view/errors.js +1 -1
  166. package/esm2015/src/view/index.js +1 -1
  167. package/esm2015/src/view/ng_content.js +1 -1
  168. package/esm2015/src/view/ng_module.js +1 -1
  169. package/esm2015/src/view/provider.js +1 -1
  170. package/esm2015/src/view/pure_expression.js +1 -1
  171. package/esm2015/src/view/query.js +1 -1
  172. package/esm2015/src/view/refs.js +1 -1
  173. package/esm2015/src/view/services.js +1 -1
  174. package/esm2015/src/view/text.js +1 -1
  175. package/esm2015/src/view/types.js +1 -1
  176. package/esm2015/src/view/util.js +1 -1
  177. package/esm2015/src/view/view.js +1 -1
  178. package/esm2015/src/view/view_attach.js +1 -1
  179. package/esm2015/src/zone/ng_zone.js +1 -1
  180. package/esm2015/src/zone.js +1 -1
  181. package/esm2015/testing/index.js +1 -1
  182. package/esm2015/testing/public_api.js +1 -1
  183. package/esm2015/testing/src/async.js +1 -1
  184. package/esm2015/testing/src/async_fallback.js +1 -1
  185. package/esm2015/testing/src/async_test_completer.js +1 -1
  186. package/esm2015/testing/src/before_each.js +1 -1
  187. package/esm2015/testing/src/component_fixture.js +1 -1
  188. package/esm2015/testing/src/fake_async.js +1 -1
  189. package/esm2015/testing/src/fake_async_fallback.js +1 -1
  190. package/esm2015/testing/src/lang_utils.js +1 -1
  191. package/esm2015/testing/src/logger.js +1 -1
  192. package/esm2015/testing/src/metadata_override.js +1 -1
  193. package/esm2015/testing/src/metadata_overrider.js +1 -1
  194. package/esm2015/testing/src/ng_zone_mock.js +1 -1
  195. package/esm2015/testing/src/private_export_testing.js +1 -1
  196. package/esm2015/testing/src/r3_test_bed.js +234 -152
  197. package/esm2015/testing/src/resolvers.js +12 -5
  198. package/esm2015/testing/src/test_bed.js +1 -1
  199. package/esm2015/testing/src/test_bed_common.js +1 -1
  200. package/esm2015/testing/src/test_compiler.js +1 -1
  201. package/esm2015/testing/src/testing.js +1 -1
  202. package/esm2015/testing/src/testing_internal.js +2 -2
  203. package/esm2015/testing/testing.js +1 -1
  204. package/esm5/core.js +1 -1
  205. package/esm5/index.js +1 -1
  206. package/esm5/public_api.js +1 -1
  207. package/esm5/src/application_init.js +1 -1
  208. package/esm5/src/application_module.js +1 -1
  209. package/esm5/src/application_ref.js +1 -1
  210. package/esm5/src/application_tokens.js +1 -1
  211. package/esm5/src/change_detection/change_detection.js +1 -1
  212. package/esm5/src/change_detection/change_detection_util.js +1 -1
  213. package/esm5/src/change_detection/change_detector_ref.js +1 -1
  214. package/esm5/src/change_detection/constants.js +3 -3
  215. package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -1
  216. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -1
  217. package/esm5/src/change_detection/differs/iterable_differs.js +1 -1
  218. package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -1
  219. package/esm5/src/change_detection/pipe_transform.js +1 -1
  220. package/esm5/src/change_detection.js +1 -1
  221. package/esm5/src/codegen_private_exports.js +1 -1
  222. package/esm5/src/console.js +1 -1
  223. package/esm5/src/core.js +1 -1
  224. package/esm5/src/core_private_export.js +1 -1
  225. package/esm5/src/core_render3_private_export.js +2 -2
  226. package/esm5/src/debug/debug_node.js +6 -6
  227. package/esm5/src/di/defs.js +1 -1
  228. package/esm5/src/di/forward_ref.js +1 -1
  229. package/esm5/src/di/injectable.js +1 -1
  230. package/esm5/src/di/injection_token.js +2 -2
  231. package/esm5/src/di/injector.js +1 -1
  232. package/esm5/src/di/injector_compatibility.js +1 -1
  233. package/esm5/src/di/metadata.js +1 -1
  234. package/esm5/src/di/provider.js +1 -1
  235. package/esm5/src/di/r3_injector.js +1 -1
  236. package/esm5/src/di/reflective_errors.js +1 -1
  237. package/esm5/src/di/reflective_injector.js +1 -1
  238. package/esm5/src/di/reflective_key.js +1 -1
  239. package/esm5/src/di/reflective_provider.js +1 -1
  240. package/esm5/src/di/scope.js +1 -1
  241. package/esm5/src/di/util.js +1 -1
  242. package/esm5/src/di.js +1 -1
  243. package/esm5/src/error_handler.js +1 -1
  244. package/esm5/src/errors.js +1 -1
  245. package/esm5/src/event_emitter.js +1 -1
  246. package/esm5/src/i18n/tokens.js +1 -1
  247. package/esm5/src/is_dev_mode.js +1 -1
  248. package/esm5/src/ivy_switch.js +1 -1
  249. package/esm5/src/linker/compiler.js +1 -1
  250. package/esm5/src/linker/component_factory.js +1 -1
  251. package/esm5/src/linker/component_factory_resolver.js +1 -1
  252. package/esm5/src/linker/element_ref.js +1 -1
  253. package/esm5/src/linker/ng_module_factory.js +1 -1
  254. package/esm5/src/linker/ng_module_factory_loader.js +1 -1
  255. package/esm5/src/linker/query_list.js +1 -1
  256. package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -1
  257. package/esm5/src/linker/template_ref.js +1 -1
  258. package/esm5/src/linker/view_container_ref.js +1 -1
  259. package/esm5/src/linker/view_ref.js +1 -1
  260. package/esm5/src/linker.js +1 -1
  261. package/esm5/src/metadata/di.js +1 -1
  262. package/esm5/src/metadata/directives.js +1 -1
  263. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  264. package/esm5/src/metadata/ng_module.js +1 -1
  265. package/esm5/src/metadata/resource_loading.js +1 -1
  266. package/esm5/src/metadata/view.js +1 -1
  267. package/esm5/src/metadata.js +1 -1
  268. package/esm5/src/platform_core_providers.js +1 -1
  269. package/esm5/src/profile/profile.js +1 -1
  270. package/esm5/src/profile/wtf_impl.js +1 -1
  271. package/esm5/src/r3_symbols.js +1 -1
  272. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -1
  273. package/esm5/src/reflection/reflection.js +1 -1
  274. package/esm5/src/reflection/reflection_capabilities.js +1 -1
  275. package/esm5/src/reflection/reflector.js +1 -1
  276. package/esm5/src/reflection/types.js +1 -1
  277. package/esm5/src/render/api.js +1 -1
  278. package/esm5/src/render.js +1 -1
  279. package/esm5/src/render3/assert.js +1 -1
  280. package/esm5/src/render3/bindings.js +3 -3
  281. package/esm5/src/render3/component.js +8 -6
  282. package/esm5/src/render3/component_ref.js +5 -5
  283. package/esm5/src/render3/context_discovery.js +2 -2
  284. package/esm5/src/render3/definition.js +3 -8
  285. package/esm5/src/render3/di.js +94 -84
  286. package/esm5/src/render3/di_setup.js +1 -1
  287. package/esm5/src/render3/discovery_utils.js +5 -5
  288. package/esm5/src/render3/empty.js +22 -0
  289. package/esm5/src/render3/errors.js +1 -1
  290. package/esm5/src/render3/features/inherit_definition_feature.js +3 -3
  291. package/esm5/src/render3/features/ng_onchanges_feature.js +1 -1
  292. package/esm5/src/render3/features/providers_feature.js +1 -1
  293. package/esm5/src/render3/fields.js +1 -1
  294. package/esm5/src/render3/global_utils.js +1 -1
  295. package/esm5/src/render3/global_utils_api.js +1 -1
  296. package/esm5/src/render3/hooks.js +11 -9
  297. package/esm5/src/render3/i18n.js +3 -3
  298. package/esm5/src/render3/index.js +2 -2
  299. package/esm5/src/render3/instructions.js +282 -282
  300. package/esm5/src/render3/interfaces/container.js +9 -1
  301. package/esm5/src/render3/interfaces/context.js +1 -1
  302. package/esm5/src/render3/interfaces/definition.js +1 -1
  303. package/esm5/src/render3/interfaces/i18n.js +1 -1
  304. package/esm5/src/render3/interfaces/injector.js +1 -1
  305. package/esm5/src/render3/interfaces/node.js +1 -1
  306. package/esm5/src/render3/interfaces/player.js +1 -1
  307. package/esm5/src/render3/interfaces/projection.js +1 -1
  308. package/esm5/src/render3/interfaces/query.js +1 -1
  309. package/esm5/src/render3/interfaces/renderer.js +1 -1
  310. package/esm5/src/render3/interfaces/sanitization.js +1 -1
  311. package/esm5/src/render3/interfaces/styling.js +1 -1
  312. package/esm5/src/render3/interfaces/view.js +1 -1
  313. package/esm5/src/render3/jit/compiler_facade.js +1 -1
  314. package/esm5/src/render3/jit/compiler_facade_interface.js +1 -1
  315. package/esm5/src/render3/jit/directive.js +6 -6
  316. package/esm5/src/render3/jit/environment.js +3 -1
  317. package/esm5/src/render3/jit/injectable.js +1 -1
  318. package/esm5/src/render3/jit/module.js +10 -8
  319. package/esm5/src/render3/jit/pipe.js +1 -1
  320. package/esm5/src/render3/jit/util.js +1 -1
  321. package/esm5/src/render3/metadata.js +1 -1
  322. package/esm5/src/render3/ng_dev_mode.js +1 -1
  323. package/esm5/src/render3/ng_module_ref.js +1 -1
  324. package/esm5/src/render3/node_assert.js +1 -1
  325. package/esm5/src/render3/node_manipulation.js +5 -21
  326. package/esm5/src/render3/node_selector_matcher.js +3 -3
  327. package/esm5/src/render3/pipe.js +2 -2
  328. package/esm5/src/render3/players.js +1 -1
  329. package/esm5/src/render3/pure_function.js +3 -3
  330. package/esm5/src/render3/query.js +3 -3
  331. package/esm5/src/render3/state.js +14 -19
  332. package/esm5/src/render3/styling/class_and_style_bindings.js +681 -210
  333. package/esm5/src/render3/styling/core_player_handler.js +1 -1
  334. package/esm5/src/render3/styling/player_factory.js +1 -1
  335. package/esm5/src/render3/styling/util.js +26 -13
  336. package/esm5/src/render3/tokens.js +1 -1
  337. package/esm5/src/render3/util.js +20 -5
  338. package/esm5/src/render3/view_engine_compatibility.js +5 -6
  339. package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -1
  340. package/esm5/src/render3/view_ref.js +6 -15
  341. package/esm5/src/sanitization/bypass.js +1 -1
  342. package/esm5/src/sanitization/html_sanitizer.js +2 -2
  343. package/esm5/src/sanitization/inert_body.js +4 -4
  344. package/esm5/src/sanitization/sanitization.js +1 -1
  345. package/esm5/src/sanitization/security.js +1 -1
  346. package/esm5/src/sanitization/style_sanitizer.js +1 -1
  347. package/esm5/src/sanitization/url_sanitizer.js +1 -1
  348. package/esm5/src/testability/testability.js +1 -1
  349. package/esm5/src/type.js +1 -1
  350. package/esm5/src/util/decorators.js +1 -1
  351. package/esm5/src/util/lang.js +1 -1
  352. package/esm5/src/util/ng_reflect.js +1 -1
  353. package/esm5/src/util/noop.js +1 -1
  354. package/esm5/src/util/property.js +1 -1
  355. package/esm5/src/util.js +1 -1
  356. package/esm5/src/version.js +2 -2
  357. package/esm5/src/view/element.js +1 -1
  358. package/esm5/src/view/entrypoint.js +1 -1
  359. package/esm5/src/view/errors.js +1 -1
  360. package/esm5/src/view/index.js +1 -1
  361. package/esm5/src/view/ng_content.js +1 -1
  362. package/esm5/src/view/ng_module.js +1 -1
  363. package/esm5/src/view/provider.js +1 -1
  364. package/esm5/src/view/pure_expression.js +1 -1
  365. package/esm5/src/view/query.js +1 -1
  366. package/esm5/src/view/refs.js +1 -1
  367. package/esm5/src/view/services.js +1 -1
  368. package/esm5/src/view/text.js +1 -1
  369. package/esm5/src/view/types.js +1 -1
  370. package/esm5/src/view/util.js +1 -1
  371. package/esm5/src/view/view.js +1 -1
  372. package/esm5/src/view/view_attach.js +1 -1
  373. package/esm5/src/zone/ng_zone.js +1 -1
  374. package/esm5/src/zone.js +1 -1
  375. package/esm5/testing/index.js +1 -1
  376. package/esm5/testing/public_api.js +1 -1
  377. package/esm5/testing/src/async.js +1 -1
  378. package/esm5/testing/src/async_fallback.js +1 -1
  379. package/esm5/testing/src/async_test_completer.js +1 -1
  380. package/esm5/testing/src/before_each.js +1 -1
  381. package/esm5/testing/src/component_fixture.js +1 -1
  382. package/esm5/testing/src/fake_async.js +1 -1
  383. package/esm5/testing/src/fake_async_fallback.js +1 -1
  384. package/esm5/testing/src/lang_utils.js +1 -1
  385. package/esm5/testing/src/logger.js +1 -1
  386. package/esm5/testing/src/metadata_override.js +1 -1
  387. package/esm5/testing/src/metadata_overrider.js +1 -1
  388. package/esm5/testing/src/ng_zone_mock.js +1 -1
  389. package/esm5/testing/src/private_export_testing.js +1 -1
  390. package/esm5/testing/src/r3_test_bed.js +174 -127
  391. package/esm5/testing/src/resolvers.js +11 -6
  392. package/esm5/testing/src/test_bed.js +1 -1
  393. package/esm5/testing/src/test_bed_common.js +1 -1
  394. package/esm5/testing/src/test_compiler.js +1 -1
  395. package/esm5/testing/src/testing.js +1 -1
  396. package/esm5/testing/src/testing_internal.js +2 -2
  397. package/esm5/testing/testing.js +1 -1
  398. package/fesm2015/core.js +2306 -1733
  399. package/fesm2015/core.js.map +1 -1
  400. package/fesm2015/testing.js +223 -150
  401. package/fesm2015/testing.js.map +1 -1
  402. package/fesm5/core.js +1781 -1335
  403. package/fesm5/core.js.map +1 -1
  404. package/fesm5/testing.js +181 -130
  405. package/fesm5/testing.js.map +1 -1
  406. package/package.json +1 -1
  407. package/src/change_detection/constants.d.ts +2 -2
  408. package/src/core_render3_private_export.d.ts +1 -1
  409. package/src/di/injection_token.d.ts +1 -1
  410. package/src/event_emitter.d.ts +2 -2
  411. package/src/linker/template_ref.d.ts +5 -3
  412. package/src/metadata/di.d.ts +1 -3
  413. package/src/metadata/directives.d.ts +3 -3
  414. package/src/render3/definition.d.ts +2 -4
  415. package/src/render3/di.d.ts +4 -3
  416. package/src/render3/empty.d.ts +16 -0
  417. package/src/render3/hooks.d.ts +3 -3
  418. package/src/render3/index.d.ts +1 -1
  419. package/src/render3/instructions.d.ts +117 -72
  420. package/src/render3/interfaces/container.d.ts +1 -0
  421. package/src/render3/interfaces/definition.d.ts +0 -3
  422. package/src/render3/interfaces/injector.d.ts +0 -1
  423. package/src/render3/interfaces/node.d.ts +37 -2
  424. package/src/render3/interfaces/styling.d.ts +392 -117
  425. package/src/render3/interfaces/view.d.ts +14 -6
  426. package/src/render3/jit/compiler_facade_interface.d.ts +2 -0
  427. package/src/render3/node_manipulation.d.ts +0 -7
  428. package/src/render3/state.d.ts +3 -4
  429. package/src/render3/styling/class_and_style_bindings.d.ts +114 -43
  430. package/src/render3/styling/util.d.ts +5 -2
  431. package/src/render3/util.d.ts +7 -0
  432. package/testing/src/r3_test_bed.d.ts +15 -0
  433. package/testing/testing.metadata.json +1 -1
  434. package/testing.d.ts +2 -3
package/fesm5/core.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v7.2.0-rc.0
2
+ * @license Angular v7.2.3
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { __decorate, __metadata, __spread, __extends, __param, __read, __assign, __values } from 'tslib';
8
- import { Subject, Subscription, Observable, merge } from 'rxjs';
7
+ import { __spread, __assign, __values, __extends, __decorate, __param, __metadata, __read } from 'tslib';
8
+ import { Subscription, Subject, Observable, merge } from 'rxjs';
9
9
  import { share } from 'rxjs/operators';
10
10
 
11
11
  /**
@@ -140,7 +140,7 @@ function getInjectorDef(type) {
140
140
  *
141
141
  * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
142
142
  * runtime representation) such as when injecting an interface, callable type, array or
143
- * parametrized type.
143
+ * parameterized type.
144
144
  *
145
145
  * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
146
146
  * the `Injector`. This provides additional level of type safety.
@@ -453,7 +453,7 @@ var ChangeDetectionStrategy;
453
453
  /**
454
454
  * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
455
455
  * until reactivated by setting the strategy to `Default` (`CheckAlways`).
456
- * Change detection can still be explictly invoked.
456
+ * Change detection can still be explicitly invoked.
457
457
  */
458
458
  ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
459
459
  /**
@@ -479,7 +479,7 @@ var ChangeDetectorStatus;
479
479
  */
480
480
  ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked";
481
481
  /**
482
- * A state in which change detection continues automatically until explictly
482
+ * A state in which change detection continues automatically until explicitly
483
483
  * deactivated.
484
484
  */
485
485
  ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways";
@@ -511,6 +511,140 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
511
511
  changeDetectionStrategy === ChangeDetectionStrategy.Default;
512
512
  }
513
513
 
514
+ /**
515
+ * @license
516
+ * Copyright Google Inc. All Rights Reserved.
517
+ *
518
+ * Use of this source code is governed by an MIT-style license that can be
519
+ * found in the LICENSE file at https://angular.io/license
520
+ */
521
+ var __window = typeof window !== 'undefined' && window;
522
+ var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
523
+ self instanceof WorkerGlobalScope && self;
524
+ var __global = typeof global !== 'undefined' && global;
525
+ // Check __global first, because in Node tests both __global and __window may be defined and _global
526
+ // should be __global in that case.
527
+ var _global = __global || __window || __self;
528
+ var promise = Promise.resolve(0);
529
+ var _symbolIterator = null;
530
+ function getSymbolIterator() {
531
+ if (!_symbolIterator) {
532
+ var Symbol_1 = _global['Symbol'];
533
+ if (Symbol_1 && Symbol_1.iterator) {
534
+ _symbolIterator = Symbol_1.iterator;
535
+ }
536
+ else {
537
+ // es6-shim specific logic
538
+ var keys = Object.getOwnPropertyNames(Map.prototype);
539
+ for (var i = 0; i < keys.length; ++i) {
540
+ var key = keys[i];
541
+ if (key !== 'entries' && key !== 'size' &&
542
+ Map.prototype[key] === Map.prototype['entries']) {
543
+ _symbolIterator = key;
544
+ }
545
+ }
546
+ }
547
+ }
548
+ return _symbolIterator;
549
+ }
550
+ function scheduleMicroTask(fn) {
551
+ if (typeof Zone === 'undefined') {
552
+ // use promise to schedule microTask instead of use Zone
553
+ promise.then(function () { fn && fn.apply(null, null); });
554
+ }
555
+ else {
556
+ Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
557
+ }
558
+ }
559
+ // JS has NaN !== NaN
560
+ function looseIdentical(a, b) {
561
+ return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
562
+ }
563
+ function stringify(token) {
564
+ if (typeof token === 'string') {
565
+ return token;
566
+ }
567
+ if (token instanceof Array) {
568
+ return '[' + token.map(stringify).join(', ') + ']';
569
+ }
570
+ if (token == null) {
571
+ return '' + token;
572
+ }
573
+ if (token.overriddenName) {
574
+ return "" + token.overriddenName;
575
+ }
576
+ if (token.name) {
577
+ return "" + token.name;
578
+ }
579
+ var res = token.toString();
580
+ if (res == null) {
581
+ return '' + res;
582
+ }
583
+ var newLineIndex = res.indexOf('\n');
584
+ return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
585
+ }
586
+ /**
587
+ * Convince closure compiler that the wrapped function has no side-effects.
588
+ *
589
+ * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
590
+ * allow us to execute a function but have closure compiler mark the call as no-side-effects.
591
+ * It is important that the return value for the `noSideEffects` function be assigned
592
+ * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
593
+ * compiler.
594
+ */
595
+ function noSideEffects(fn) {
596
+ return '' + { toString: fn };
597
+ }
598
+
599
+ /**
600
+ * @license
601
+ * Copyright Google Inc. All Rights Reserved.
602
+ *
603
+ * Use of this source code is governed by an MIT-style license that can be
604
+ * found in the LICENSE file at https://angular.io/license
605
+ */
606
+ var __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });
607
+ /**
608
+ * Allows to refer to references which are not yet defined.
609
+ *
610
+ * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
611
+ * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
612
+ * a query is not yet defined.
613
+ *
614
+ * @usageNotes
615
+ * ### Example
616
+ * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
617
+ * @publicApi
618
+ */
619
+ function forwardRef(forwardRefFn) {
620
+ forwardRefFn.__forward_ref__ = forwardRef;
621
+ forwardRefFn.toString = function () { return stringify(this()); };
622
+ return forwardRefFn;
623
+ }
624
+ /**
625
+ * Lazily retrieves the reference value from a forwardRef.
626
+ *
627
+ * Acts as the identity function when given a non-forward-ref value.
628
+ *
629
+ * @usageNotes
630
+ * ### Example
631
+ *
632
+ * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
633
+ *
634
+ * @see `forwardRef`
635
+ * @publicApi
636
+ */
637
+ function resolveForwardRef(type) {
638
+ var fn = type;
639
+ if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&
640
+ fn.__forward_ref__ === forwardRef) {
641
+ return fn();
642
+ }
643
+ else {
644
+ return type;
645
+ }
646
+ }
647
+
514
648
  /**
515
649
  * @license
516
650
  * Copyright Google Inc. All Rights Reserved.
@@ -654,91 +788,6 @@ var ViewEncapsulation;
654
788
  ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
655
789
  })(ViewEncapsulation || (ViewEncapsulation = {}));
656
790
 
657
- /**
658
- * @license
659
- * Copyright Google Inc. All Rights Reserved.
660
- *
661
- * Use of this source code is governed by an MIT-style license that can be
662
- * found in the LICENSE file at https://angular.io/license
663
- */
664
- var __window = typeof window !== 'undefined' && window;
665
- var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
666
- self instanceof WorkerGlobalScope && self;
667
- var __global = typeof global !== 'undefined' && global;
668
- // Check __global first, because in Node tests both __global and __window may be defined and _global
669
- // should be __global in that case.
670
- var _global = __global || __window || __self;
671
- var promise = Promise.resolve(0);
672
- var _symbolIterator = null;
673
- function getSymbolIterator() {
674
- if (!_symbolIterator) {
675
- var Symbol_1 = _global['Symbol'];
676
- if (Symbol_1 && Symbol_1.iterator) {
677
- _symbolIterator = Symbol_1.iterator;
678
- }
679
- else {
680
- // es6-shim specific logic
681
- var keys = Object.getOwnPropertyNames(Map.prototype);
682
- for (var i = 0; i < keys.length; ++i) {
683
- var key = keys[i];
684
- if (key !== 'entries' && key !== 'size' &&
685
- Map.prototype[key] === Map.prototype['entries']) {
686
- _symbolIterator = key;
687
- }
688
- }
689
- }
690
- }
691
- return _symbolIterator;
692
- }
693
- function scheduleMicroTask(fn) {
694
- if (typeof Zone === 'undefined') {
695
- // use promise to schedule microTask instead of use Zone
696
- promise.then(function () { fn && fn.apply(null, null); });
697
- }
698
- else {
699
- Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
700
- }
701
- }
702
- // JS has NaN !== NaN
703
- function looseIdentical(a, b) {
704
- return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
705
- }
706
- function stringify(token) {
707
- if (typeof token === 'string') {
708
- return token;
709
- }
710
- if (token instanceof Array) {
711
- return '[' + token.map(stringify).join(', ') + ']';
712
- }
713
- if (token == null) {
714
- return '' + token;
715
- }
716
- if (token.overriddenName) {
717
- return "" + token.overriddenName;
718
- }
719
- if (token.name) {
720
- return "" + token.name;
721
- }
722
- var res = token.toString();
723
- if (res == null) {
724
- return '' + res;
725
- }
726
- var newLineIndex = res.indexOf('\n');
727
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
728
- }
729
- /**
730
- * Convince closure compiler that the wrapped function has no side-effects.
731
- *
732
- * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
733
- * allow us to execute a function but have closure compiler mark the call as no-side-effects.
734
- * It is important that the return value for the `noSideEffects` function be assigned
735
- * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
736
- * compiler.
737
- */
738
- function noSideEffects(fn) {
739
- return '' + { toString: fn };
740
- }
741
-
742
791
  /**
743
792
  * @license
744
793
  * Copyright Google Inc. All Rights Reserved.
@@ -797,6 +846,27 @@ if (typeof ngDevMode === 'undefined' || ngDevMode) {
797
846
  ngDevModeResetPerfCounters();
798
847
  }
799
848
 
849
+ /**
850
+ * @license
851
+ * Copyright Google Inc. All Rights Reserved.
852
+ *
853
+ * Use of this source code is governed by an MIT-style license that can be
854
+ * found in the LICENSE file at https://angular.io/license
855
+ */
856
+ /**
857
+ * This file contains reuseable "empty" symbols that can be used as default return values
858
+ * in different parts of the rendering code. Because the same symbols are returned, this
859
+ * allows for identity checks against these values to be consistently used by the framework
860
+ * code.
861
+ */
862
+ var EMPTY_OBJ = {};
863
+ var EMPTY_ARRAY = [];
864
+ // freezing the values prevents any code from accidentally inserting new values in
865
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
866
+ Object.freeze(EMPTY_OBJ);
867
+ Object.freeze(EMPTY_ARRAY);
868
+ }
869
+
800
870
  /**
801
871
  * @license
802
872
  * Copyright Google Inc. All Rights Reserved.
@@ -804,12 +874,6 @@ if (typeof ngDevMode === 'undefined' || ngDevMode) {
804
874
  * Use of this source code is governed by an MIT-style license that can be
805
875
  * found in the LICENSE file at https://angular.io/license
806
876
  */
807
- var EMPTY = {};
808
- var EMPTY_ARRAY = [];
809
- if (typeof ngDevMode !== 'undefined' && ngDevMode) {
810
- Object.freeze(EMPTY);
811
- Object.freeze(EMPTY_ARRAY);
812
- }
813
877
  var _renderCompCount = 0;
814
878
  /**
815
879
  * Create a component definition object.
@@ -966,7 +1030,7 @@ function defineNgModule(def) {
966
1030
  */
967
1031
  function invertObject(obj, secondary) {
968
1032
  if (obj == null)
969
- return EMPTY;
1033
+ return EMPTY_OBJ;
970
1034
  var newLookup = {};
971
1035
  for (var minifiedKey in obj) {
972
1036
  if (obj.hasOwnProperty(minifiedKey)) {
@@ -1063,210 +1127,6 @@ function getNgModuleDef(type, throwNotFound) {
1063
1127
  return ngModuleDef;
1064
1128
  }
1065
1129
 
1066
- /**
1067
- * @license
1068
- * Copyright Google Inc. All Rights Reserved.
1069
- *
1070
- * Use of this source code is governed by an MIT-style license that can be
1071
- * found in the LICENSE file at https://angular.io/license
1072
- */
1073
- var R3ResolvedDependencyType;
1074
- (function (R3ResolvedDependencyType) {
1075
- R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token";
1076
- R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute";
1077
- })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));
1078
-
1079
- /**
1080
- * @license
1081
- * Copyright Google Inc. All Rights Reserved.
1082
- *
1083
- * Use of this source code is governed by an MIT-style license that can be
1084
- * found in the LICENSE file at https://angular.io/license
1085
- */
1086
- function getCompilerFacade() {
1087
- var globalNg = _global.ng;
1088
- if (!globalNg || !globalNg.ɵcompilerFacade) {
1089
- throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n" +
1090
- " - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n" +
1091
- " - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n" +
1092
- " - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");
1093
- }
1094
- return globalNg.ɵcompilerFacade;
1095
- }
1096
-
1097
- /**
1098
- * @license
1099
- * Copyright Google Inc. All Rights Reserved.
1100
- *
1101
- * Use of this source code is governed by an MIT-style license that can be
1102
- * found in the LICENSE file at https://angular.io/license
1103
- */
1104
- /**
1105
- * Inject decorator and metadata.
1106
- *
1107
- * @Annotation
1108
- * @publicApi
1109
- */
1110
- var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
1111
- /**
1112
- * Optional decorator and metadata.
1113
- *
1114
- * @Annotation
1115
- * @publicApi
1116
- */
1117
- var Optional = makeParamDecorator('Optional');
1118
- /**
1119
- * Self decorator and metadata.
1120
- *
1121
- * @Annotation
1122
- * @publicApi
1123
- */
1124
- var Self = makeParamDecorator('Self');
1125
- /**
1126
- * SkipSelf decorator and metadata.
1127
- *
1128
- * @Annotation
1129
- * @publicApi
1130
- */
1131
- var SkipSelf = makeParamDecorator('SkipSelf');
1132
- /**
1133
- * Host decorator and metadata.
1134
- *
1135
- * @Annotation
1136
- * @publicApi
1137
- */
1138
- var Host = makeParamDecorator('Host');
1139
-
1140
- /**
1141
- * @license
1142
- * Copyright Google Inc. All Rights Reserved.
1143
- *
1144
- * Use of this source code is governed by an MIT-style license that can be
1145
- * found in the LICENSE file at https://angular.io/license
1146
- */
1147
- /**
1148
- * Injection flags for DI.
1149
- *
1150
- * @publicApi
1151
- */
1152
- var InjectFlags;
1153
- (function (InjectFlags) {
1154
- // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.
1155
- InjectFlags[InjectFlags["Default"] = 0] = "Default";
1156
- /**
1157
- * Specifies that an injector should retrieve a dependency from any injector until reaching the
1158
- * host element of the current component. (Only used with Element Injector)
1159
- */
1160
- InjectFlags[InjectFlags["Host"] = 1] = "Host";
1161
- /** Don't descend into ancestors of the node requesting injection. */
1162
- InjectFlags[InjectFlags["Self"] = 2] = "Self";
1163
- /** Skip the node that is requesting injection. */
1164
- InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf";
1165
- /** Inject `defaultValue` instead if token not found. */
1166
- InjectFlags[InjectFlags["Optional"] = 8] = "Optional";
1167
- })(InjectFlags || (InjectFlags = {}));
1168
- /**
1169
- * Current injector value used by `inject`.
1170
- * - `undefined`: it is an error to call `inject`
1171
- * - `null`: `inject` can be called but there is no injector (limp-mode).
1172
- * - Injector instance: Use the injector for resolution.
1173
- */
1174
- var _currentInjector = undefined;
1175
- function setCurrentInjector(injector) {
1176
- var former = _currentInjector;
1177
- _currentInjector = injector;
1178
- return former;
1179
- }
1180
- /**
1181
- * Current implementation of inject.
1182
- *
1183
- * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed
1184
- * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this
1185
- * way for two reasons:
1186
- * 1. `Injector` should not depend on ivy logic.
1187
- * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.
1188
- */
1189
- var _injectImplementation;
1190
- /**
1191
- * Sets the current inject implementation.
1192
- */
1193
- function setInjectImplementation(impl) {
1194
- var previous = _injectImplementation;
1195
- _injectImplementation = impl;
1196
- return previous;
1197
- }
1198
- function injectInjectorOnly(token, flags) {
1199
- if (flags === void 0) { flags = InjectFlags.Default; }
1200
- if (_currentInjector === undefined) {
1201
- throw new Error("inject() must be called from an injection context");
1202
- }
1203
- else if (_currentInjector === null) {
1204
- return injectRootLimpMode(token, undefined, flags);
1205
- }
1206
- else {
1207
- return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);
1208
- }
1209
- }
1210
- function inject(token, flags) {
1211
- if (flags === void 0) { flags = InjectFlags.Default; }
1212
- return (_injectImplementation || injectInjectorOnly)(token, flags);
1213
- }
1214
- /**
1215
- * Injects `root` tokens in limp mode.
1216
- *
1217
- * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to
1218
- * `"root"`. This is known as the limp mode injection. In such case the value is stored in the
1219
- * `InjectableDef`.
1220
- */
1221
- function injectRootLimpMode(token, notFoundValue, flags) {
1222
- var injectableDef = getInjectableDef(token);
1223
- if (injectableDef && injectableDef.providedIn == 'root') {
1224
- return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
1225
- injectableDef.value;
1226
- }
1227
- if (flags & InjectFlags.Optional)
1228
- return null;
1229
- if (notFoundValue !== undefined)
1230
- return notFoundValue;
1231
- throw new Error("Injector: NOT_FOUND [" + stringify(token) + "]");
1232
- }
1233
- function injectArgs(types) {
1234
- var args = [];
1235
- for (var i = 0; i < types.length; i++) {
1236
- var arg = types[i];
1237
- if (Array.isArray(arg)) {
1238
- if (arg.length === 0) {
1239
- throw new Error('Arguments array must have arguments.');
1240
- }
1241
- var type = undefined;
1242
- var flags = InjectFlags.Default;
1243
- for (var j = 0; j < arg.length; j++) {
1244
- var meta = arg[j];
1245
- if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {
1246
- flags |= InjectFlags.Optional;
1247
- }
1248
- else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {
1249
- flags |= InjectFlags.SkipSelf;
1250
- }
1251
- else if (meta instanceof Self || meta.ngMetadataName === 'Self') {
1252
- flags |= InjectFlags.Self;
1253
- }
1254
- else if (meta instanceof Inject) {
1255
- type = meta.token;
1256
- }
1257
- else {
1258
- type = meta;
1259
- }
1260
- }
1261
- args.push(inject(type, flags));
1262
- }
1263
- else {
1264
- args.push(inject(arg));
1265
- }
1266
- }
1267
- return args;
1268
- }
1269
-
1270
1130
  /**
1271
1131
  * @license
1272
1132
  * Copyright Google Inc. All Rights Reserved.
@@ -1329,6 +1189,76 @@ function assertDataInRange(arr, index) {
1329
1189
  assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');
1330
1190
  }
1331
1191
 
1192
+ /**
1193
+ * @license
1194
+ * Copyright Google Inc. All Rights Reserved.
1195
+ *
1196
+ * Use of this source code is governed by an MIT-style license that can be
1197
+ * found in the LICENSE file at https://angular.io/license
1198
+ */
1199
+ // Below are constants for LView indices to help us look up LView members
1200
+ // without having to remember the specific indices.
1201
+ // Uglify will inline these when minifying so there shouldn't be a cost.
1202
+ var TVIEW = 0;
1203
+ var FLAGS = 1;
1204
+ var PARENT = 2;
1205
+ var NEXT = 3;
1206
+ var QUERIES = 4;
1207
+ var HOST = 5;
1208
+ var HOST_NODE = 6; // Rename to `T_HOST`?
1209
+ var BINDING_INDEX = 7;
1210
+ var CLEANUP = 8;
1211
+ var CONTEXT = 9;
1212
+ var INJECTOR = 10;
1213
+ var RENDERER_FACTORY = 11;
1214
+ var RENDERER = 12;
1215
+ var SANITIZER = 13;
1216
+ var TAIL = 14;
1217
+ var CONTAINER_INDEX = 15;
1218
+ var CONTENT_QUERIES = 16;
1219
+ var DECLARATION_VIEW = 17;
1220
+ /** Size of LView's header. Necessary to adjust for it when setting slots. */
1221
+ var HEADER_OFFSET = 18;
1222
+
1223
+ /**
1224
+ * @license
1225
+ * Copyright Google Inc. All Rights Reserved.
1226
+ *
1227
+ * Use of this source code is governed by an MIT-style license that can be
1228
+ * found in the LICENSE file at https://angular.io/license
1229
+ */
1230
+ /**
1231
+ * Below are constants for LContainer indices to help us look up LContainer members
1232
+ * without having to remember the specific indices.
1233
+ * Uglify will inline these when minifying so there shouldn't be a cost.
1234
+ */
1235
+ var ACTIVE_INDEX = 0;
1236
+ var VIEWS = 1;
1237
+ // PARENT, NEXT, QUERIES, and HOST are indices 2, 3, 4, and 5.
1238
+ // As we already have these constants in LView, we don't need to re-create them.
1239
+ var NATIVE = 6;
1240
+ var RENDER_PARENT = 7;
1241
+ // Because interfaces in TS/JS cannot be instanceof-checked this means that we
1242
+ // need to rely on predictable characteristics of data-structures to check if they
1243
+ // are what we expect for them to be. The `LContainer` interface code below has a
1244
+ // fixed length and the constant value below references that. Using the length value
1245
+ // below we can predictably gaurantee that we are dealing with an `LContainer` array.
1246
+ // This value MUST be kept up to date with the length of the `LContainer` array
1247
+ // interface below so that runtime type checking can work.
1248
+ var LCONTAINER_LENGTH = 8;
1249
+
1250
+ /**
1251
+ * @license
1252
+ * Copyright Google Inc. All Rights Reserved.
1253
+ *
1254
+ * Use of this source code is governed by an MIT-style license that can be
1255
+ * found in the LICENSE file at https://angular.io/license
1256
+ */
1257
+ /**
1258
+ * This property will be monkey-patched on elements, components and directives
1259
+ */
1260
+ var MONKEY_PATCH_KEY_NAME = '__ngContext__';
1261
+
1332
1262
  /**
1333
1263
  * @license
1334
1264
  * Copyright Google Inc. All Rights Reserved.
@@ -1461,210 +1391,6 @@ function isFactory(obj) {
1461
1391
  return obj != null && typeof obj == 'object' && Object.getPrototypeOf(obj) == FactoryPrototype;
1462
1392
  }
1463
1393
 
1464
- /**
1465
- * @license
1466
- * Copyright Google Inc. All Rights Reserved.
1467
- *
1468
- * Use of this source code is governed by an MIT-style license that can be
1469
- * found in the LICENSE file at https://angular.io/license
1470
- */
1471
- // Below are constants for LView indices to help us look up LView members
1472
- // without having to remember the specific indices.
1473
- // Uglify will inline these when minifying so there shouldn't be a cost.
1474
- var TVIEW = 0;
1475
- var FLAGS = 1;
1476
- var PARENT = 2;
1477
- var NEXT = 3;
1478
- var QUERIES = 4;
1479
- var HOST = 5;
1480
- var HOST_NODE = 6; // Rename to `T_HOST`?
1481
- var BINDING_INDEX = 7;
1482
- var CLEANUP = 8;
1483
- var CONTEXT = 9;
1484
- var INJECTOR = 10;
1485
- var RENDERER_FACTORY = 11;
1486
- var RENDERER = 12;
1487
- var SANITIZER = 13;
1488
- var TAIL = 14;
1489
- var CONTAINER_INDEX = 15;
1490
- var CONTENT_QUERIES = 16;
1491
- var DECLARATION_VIEW = 17;
1492
- /** Size of LView's header. Necessary to adjust for it when setting slots. */
1493
- var HEADER_OFFSET = 18;
1494
-
1495
- /**
1496
- * @license
1497
- * Copyright Google Inc. All Rights Reserved.
1498
- *
1499
- * Use of this source code is governed by an MIT-style license that can be
1500
- * found in the LICENSE file at https://angular.io/license
1501
- */
1502
- function assertNodeType(tNode, type) {
1503
- assertDefined(tNode, 'should be called with a TNode');
1504
- assertEqual(tNode.type, type, "should be a " + typeName(type));
1505
- }
1506
- function assertNodeOfPossibleTypes(tNode) {
1507
- var types = [];
1508
- for (var _i = 1; _i < arguments.length; _i++) {
1509
- types[_i - 1] = arguments[_i];
1510
- }
1511
- assertDefined(tNode, 'should be called with a TNode');
1512
- var found = types.some(function (type) { return tNode.type === type; });
1513
- assertEqual(found, true, "Should be one of " + types.map(typeName).join(', ') + " but got " + typeName(tNode.type));
1514
- }
1515
- function typeName(type) {
1516
- if (type == 1 /* Projection */)
1517
- return 'Projection';
1518
- if (type == 0 /* Container */)
1519
- return 'Container';
1520
- if (type == 2 /* View */)
1521
- return 'View';
1522
- if (type == 3 /* Element */)
1523
- return 'Element';
1524
- if (type == 4 /* ElementContainer */)
1525
- return 'ElementContainer';
1526
- return '<unknown>';
1527
- }
1528
-
1529
- /**
1530
- * @license
1531
- * Copyright Google Inc. All Rights Reserved.
1532
- *
1533
- * Use of this source code is governed by an MIT-style license that can be
1534
- * found in the LICENSE file at https://angular.io/license
1535
- */
1536
- /**
1537
- * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into
1538
- * TView.initHooks during directiveCreate.
1539
- *
1540
- * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:
1541
- * directive index), then saved in the even indices of the initHooks array. The odd indices
1542
- * hold the hook functions themselves.
1543
- *
1544
- * @param index The index of the directive in LView
1545
- * @param hooks The static hooks map on the directive def
1546
- * @param tView The current TView
1547
- */
1548
- function queueInitHooks(index, onInit, doCheck, tView) {
1549
- ngDevMode &&
1550
- assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');
1551
- if (onInit) {
1552
- (tView.initHooks || (tView.initHooks = [])).push(index, onInit);
1553
- }
1554
- if (doCheck) {
1555
- (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);
1556
- (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);
1557
- }
1558
- }
1559
- /**
1560
- * Loops through the directives on a node and queues all their hooks except ngOnInit
1561
- * and ngDoCheck, which are queued separately in directiveCreate.
1562
- */
1563
- function queueLifecycleHooks(tView, tNode) {
1564
- if (tView.firstTemplatePass) {
1565
- // It's necessary to loop through the directives at elementEnd() (rather than processing in
1566
- // directiveCreate) so we can preserve the current hook order. Content, view, and destroy
1567
- // hooks for projected components and directives must be called *before* their hosts.
1568
- for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {
1569
- var def = tView.data[i];
1570
- queueContentHooks(def, tView, i);
1571
- queueViewHooks(def, tView, i);
1572
- queueDestroyHooks(def, tView, i);
1573
- }
1574
- }
1575
- }
1576
- /** Queues afterContentInit and afterContentChecked hooks on TView */
1577
- function queueContentHooks(def, tView, i) {
1578
- if (def.afterContentInit) {
1579
- (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);
1580
- }
1581
- if (def.afterContentChecked) {
1582
- (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);
1583
- (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);
1584
- }
1585
- }
1586
- /** Queues afterViewInit and afterViewChecked hooks on TView */
1587
- function queueViewHooks(def, tView, i) {
1588
- if (def.afterViewInit) {
1589
- (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);
1590
- }
1591
- if (def.afterViewChecked) {
1592
- (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);
1593
- (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);
1594
- }
1595
- }
1596
- /** Queues onDestroy hooks on TView */
1597
- function queueDestroyHooks(def, tView, i) {
1598
- if (def.onDestroy != null) {
1599
- (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);
1600
- }
1601
- }
1602
- /**
1603
- * Calls onInit and doCheck calls if they haven't already been called.
1604
- *
1605
- * @param currentView The current view
1606
- */
1607
- function executeInitHooks(currentView, tView, creationMode) {
1608
- if (currentView[FLAGS] & 16 /* RunInit */) {
1609
- executeHooks(currentView, tView.initHooks, tView.checkHooks, creationMode);
1610
- currentView[FLAGS] &= ~16 /* RunInit */;
1611
- }
1612
- }
1613
- /**
1614
- * Iterates over afterViewInit and afterViewChecked functions and calls them.
1615
- *
1616
- * @param currentView The current view
1617
- */
1618
- function executeHooks(data, allHooks, checkHooks, creationMode) {
1619
- var hooksToCall = creationMode ? allHooks : checkHooks;
1620
- if (hooksToCall) {
1621
- callHooks(data, hooksToCall);
1622
- }
1623
- }
1624
- /**
1625
- * Calls lifecycle hooks with their contexts, skipping init hooks if it's not
1626
- * creation mode.
1627
- *
1628
- * @param currentView The current view
1629
- * @param arr The array in which the hooks are found
1630
- */
1631
- function callHooks(currentView, arr) {
1632
- for (var i = 0; i < arr.length; i += 2) {
1633
- arr[i + 1].call(currentView[arr[i]]);
1634
- }
1635
- }
1636
-
1637
- /**
1638
- * @license
1639
- * Copyright Google Inc. All Rights Reserved.
1640
- *
1641
- * Use of this source code is governed by an MIT-style license that can be
1642
- * found in the LICENSE file at https://angular.io/license
1643
- */
1644
- /**
1645
- * Below are constants for LContainer indices to help us look up LContainer members
1646
- * without having to remember the specific indices.
1647
- * Uglify will inline these when minifying so there shouldn't be a cost.
1648
- */
1649
- var ACTIVE_INDEX = 0;
1650
- var VIEWS = 1;
1651
- // PARENT, NEXT, QUERIES, and HOST are indices 2, 3, 4, and 5.
1652
- // As we already have these constants in LView, we don't need to re-create them.
1653
- var NATIVE = 6;
1654
- var RENDER_PARENT = 7;
1655
-
1656
- /**
1657
- * @license
1658
- * Copyright Google Inc. All Rights Reserved.
1659
- *
1660
- * Use of this source code is governed by an MIT-style license that can be
1661
- * found in the LICENSE file at https://angular.io/license
1662
- */
1663
- /**
1664
- * This property will be monkey-patched on elements, components and directives
1665
- */
1666
- var MONKEY_PATCH_KEY_NAME = '__ngContext__';
1667
-
1668
1394
  /**
1669
1395
  * @license
1670
1396
  * Copyright Google Inc. All Rights Reserved.
@@ -1770,120 +1496,483 @@ function isComponentDef(def) {
1770
1496
  }
1771
1497
  function isLContainer(value) {
1772
1498
  // Styling contexts are also arrays, but their first index contains an element node
1773
- return Array.isArray(value) && typeof value[ACTIVE_INDEX] === 'number';
1499
+ return Array.isArray(value) && value.length === LCONTAINER_LENGTH;
1774
1500
  }
1775
1501
  function isRootView(target) {
1776
- return (target[FLAGS] & 64 /* IsRoot */) !== 0;
1502
+ return (target[FLAGS] & 128 /* IsRoot */) !== 0;
1777
1503
  }
1778
1504
  /**
1779
1505
  * Retrieve the root view from any component by walking the parent `LView` until
1780
1506
  * reaching the root `LView`.
1781
1507
  *
1782
- * @param component any component
1508
+ * @param component any component
1509
+ */
1510
+ function getRootView(target) {
1511
+ ngDevMode && assertDefined(target, 'component');
1512
+ var lView = Array.isArray(target) ? target : readPatchedLView(target);
1513
+ while (lView && !(lView[FLAGS] & 128 /* IsRoot */)) {
1514
+ lView = lView[PARENT];
1515
+ }
1516
+ return lView;
1517
+ }
1518
+ function getRootContext(viewOrComponent) {
1519
+ var rootView = getRootView(viewOrComponent);
1520
+ ngDevMode &&
1521
+ assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');
1522
+ return rootView[CONTEXT];
1523
+ }
1524
+ /**
1525
+ * Returns the monkey-patch value data present on the target (which could be
1526
+ * a component, directive or a DOM node).
1527
+ */
1528
+ function readPatchedData(target) {
1529
+ ngDevMode && assertDefined(target, 'Target expected');
1530
+ return target[MONKEY_PATCH_KEY_NAME];
1531
+ }
1532
+ function readPatchedLView(target) {
1533
+ var value = readPatchedData(target);
1534
+ if (value) {
1535
+ return Array.isArray(value) ? value : value.lView;
1536
+ }
1537
+ return null;
1538
+ }
1539
+ function hasParentInjector(parentLocation) {
1540
+ return parentLocation !== NO_PARENT_INJECTOR;
1541
+ }
1542
+ function getParentInjectorIndex(parentLocation) {
1543
+ return parentLocation & 32767 /* InjectorIndexMask */;
1544
+ }
1545
+ function getParentInjectorViewOffset(parentLocation) {
1546
+ return parentLocation >> 16 /* ViewOffsetShift */;
1547
+ }
1548
+ /**
1549
+ * Unwraps a parent injector location number to find the view offset from the current injector,
1550
+ * then walks up the declaration view tree until the view is found that contains the parent
1551
+ * injector.
1552
+ *
1553
+ * @param location The location of the parent injector, which contains the view offset
1554
+ * @param startView The LView instance from which to start walking up the view tree
1555
+ * @returns The LView instance that contains the parent injector
1556
+ */
1557
+ function getParentInjectorView(location, startView) {
1558
+ var viewOffset = getParentInjectorViewOffset(location);
1559
+ var parentView = startView;
1560
+ // For most cases, the parent injector can be found on the host node (e.g. for component
1561
+ // or container), but we must keep the loop here to support the rarer case of deeply nested
1562
+ // <ng-template> tags or inline views, where the parent injector might live many views
1563
+ // above the child injector.
1564
+ while (viewOffset > 0) {
1565
+ parentView = parentView[DECLARATION_VIEW];
1566
+ viewOffset--;
1567
+ }
1568
+ return parentView;
1569
+ }
1570
+ /**
1571
+ * Unwraps a parent injector location number to find the view offset from the current injector,
1572
+ * then walks up the declaration view tree until the TNode of the parent injector is found.
1573
+ *
1574
+ * @param location The location of the parent injector, which contains the view offset
1575
+ * @param startView The LView instance from which to start walking up the view tree
1576
+ * @param startTNode The TNode instance of the starting element
1577
+ * @returns The TNode of the parent injector
1578
+ */
1579
+ function getParentInjectorTNode(location, startView, startTNode) {
1580
+ if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {
1581
+ // view offset is 0
1582
+ var injectorIndex = startTNode.parent.injectorIndex;
1583
+ var parentTNode_1 = startTNode.parent;
1584
+ while (parentTNode_1.parent != null && injectorIndex == parentTNode_1.injectorIndex) {
1585
+ parentTNode_1 = parentTNode_1.parent;
1586
+ }
1587
+ return parentTNode_1;
1588
+ }
1589
+ var viewOffset = getParentInjectorViewOffset(location);
1590
+ // view offset is 1
1591
+ var parentView = startView;
1592
+ var parentTNode = startView[HOST_NODE];
1593
+ // view offset is superior to 1
1594
+ while (viewOffset > 1) {
1595
+ parentView = parentView[DECLARATION_VIEW];
1596
+ parentTNode = parentView[HOST_NODE];
1597
+ viewOffset--;
1598
+ }
1599
+ return parentTNode;
1600
+ }
1601
+ var defaultScheduler = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only
1602
+ setTimeout // everything else
1603
+ ).bind(_global);
1604
+ /**
1605
+ * Equivalent to ES6 spread, add each item to an array.
1606
+ *
1607
+ * @param items The items to add
1608
+ * @param arr The array to which you want to add the items
1609
+ */
1610
+ function addAllToArray(items, arr) {
1611
+ for (var i = 0; i < items.length; i++) {
1612
+ arr.push(items[i]);
1613
+ }
1614
+ }
1615
+ /**
1616
+ * Given a current view, finds the nearest component's host (LElement).
1617
+ *
1618
+ * @param lView LView for which we want a host element node
1619
+ * @returns The host node
1620
+ */
1621
+ function findComponentView(lView) {
1622
+ var rootTNode = lView[HOST_NODE];
1623
+ while (rootTNode && rootTNode.type === 2 /* View */) {
1624
+ ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');
1625
+ lView = lView[DECLARATION_VIEW];
1626
+ rootTNode = lView[HOST_NODE];
1627
+ }
1628
+ return lView;
1629
+ }
1630
+
1631
+ /**
1632
+ * @license
1633
+ * Copyright Google Inc. All Rights Reserved.
1634
+ *
1635
+ * Use of this source code is governed by an MIT-style license that can be
1636
+ * found in the LICENSE file at https://angular.io/license
1637
+ */
1638
+ var R3ResolvedDependencyType;
1639
+ (function (R3ResolvedDependencyType) {
1640
+ R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token";
1641
+ R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute";
1642
+ })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));
1643
+
1644
+ /**
1645
+ * @license
1646
+ * Copyright Google Inc. All Rights Reserved.
1647
+ *
1648
+ * Use of this source code is governed by an MIT-style license that can be
1649
+ * found in the LICENSE file at https://angular.io/license
1650
+ */
1651
+ function getCompilerFacade() {
1652
+ var globalNg = _global.ng;
1653
+ if (!globalNg || !globalNg.ɵcompilerFacade) {
1654
+ throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n" +
1655
+ " - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n" +
1656
+ " - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n" +
1657
+ " - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");
1658
+ }
1659
+ return globalNg.ɵcompilerFacade;
1660
+ }
1661
+
1662
+ /**
1663
+ * @license
1664
+ * Copyright Google Inc. All Rights Reserved.
1665
+ *
1666
+ * Use of this source code is governed by an MIT-style license that can be
1667
+ * found in the LICENSE file at https://angular.io/license
1668
+ */
1669
+ /**
1670
+ * Inject decorator and metadata.
1671
+ *
1672
+ * @Annotation
1673
+ * @publicApi
1674
+ */
1675
+ var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
1676
+ /**
1677
+ * Optional decorator and metadata.
1678
+ *
1679
+ * @Annotation
1680
+ * @publicApi
1681
+ */
1682
+ var Optional = makeParamDecorator('Optional');
1683
+ /**
1684
+ * Self decorator and metadata.
1685
+ *
1686
+ * @Annotation
1687
+ * @publicApi
1688
+ */
1689
+ var Self = makeParamDecorator('Self');
1690
+ /**
1691
+ * SkipSelf decorator and metadata.
1692
+ *
1693
+ * @Annotation
1694
+ * @publicApi
1695
+ */
1696
+ var SkipSelf = makeParamDecorator('SkipSelf');
1697
+ /**
1698
+ * Host decorator and metadata.
1699
+ *
1700
+ * @Annotation
1701
+ * @publicApi
1702
+ */
1703
+ var Host = makeParamDecorator('Host');
1704
+
1705
+ /**
1706
+ * @license
1707
+ * Copyright Google Inc. All Rights Reserved.
1708
+ *
1709
+ * Use of this source code is governed by an MIT-style license that can be
1710
+ * found in the LICENSE file at https://angular.io/license
1711
+ */
1712
+ /**
1713
+ * Injection flags for DI.
1714
+ *
1715
+ * @publicApi
1716
+ */
1717
+ var InjectFlags;
1718
+ (function (InjectFlags) {
1719
+ // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.
1720
+ InjectFlags[InjectFlags["Default"] = 0] = "Default";
1721
+ /**
1722
+ * Specifies that an injector should retrieve a dependency from any injector until reaching the
1723
+ * host element of the current component. (Only used with Element Injector)
1724
+ */
1725
+ InjectFlags[InjectFlags["Host"] = 1] = "Host";
1726
+ /** Don't descend into ancestors of the node requesting injection. */
1727
+ InjectFlags[InjectFlags["Self"] = 2] = "Self";
1728
+ /** Skip the node that is requesting injection. */
1729
+ InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf";
1730
+ /** Inject `defaultValue` instead if token not found. */
1731
+ InjectFlags[InjectFlags["Optional"] = 8] = "Optional";
1732
+ })(InjectFlags || (InjectFlags = {}));
1733
+ /**
1734
+ * Current injector value used by `inject`.
1735
+ * - `undefined`: it is an error to call `inject`
1736
+ * - `null`: `inject` can be called but there is no injector (limp-mode).
1737
+ * - Injector instance: Use the injector for resolution.
1738
+ */
1739
+ var _currentInjector = undefined;
1740
+ function setCurrentInjector(injector) {
1741
+ var former = _currentInjector;
1742
+ _currentInjector = injector;
1743
+ return former;
1744
+ }
1745
+ /**
1746
+ * Current implementation of inject.
1747
+ *
1748
+ * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed
1749
+ * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this
1750
+ * way for two reasons:
1751
+ * 1. `Injector` should not depend on ivy logic.
1752
+ * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.
1753
+ */
1754
+ var _injectImplementation;
1755
+ /**
1756
+ * Sets the current inject implementation.
1757
+ */
1758
+ function setInjectImplementation(impl) {
1759
+ var previous = _injectImplementation;
1760
+ _injectImplementation = impl;
1761
+ return previous;
1762
+ }
1763
+ function injectInjectorOnly(token, flags) {
1764
+ if (flags === void 0) { flags = InjectFlags.Default; }
1765
+ if (_currentInjector === undefined) {
1766
+ throw new Error("inject() must be called from an injection context");
1767
+ }
1768
+ else if (_currentInjector === null) {
1769
+ return injectRootLimpMode(token, undefined, flags);
1770
+ }
1771
+ else {
1772
+ return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);
1773
+ }
1774
+ }
1775
+ function inject(token, flags) {
1776
+ if (flags === void 0) { flags = InjectFlags.Default; }
1777
+ return (_injectImplementation || injectInjectorOnly)(token, flags);
1778
+ }
1779
+ /**
1780
+ * Injects `root` tokens in limp mode.
1781
+ *
1782
+ * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to
1783
+ * `"root"`. This is known as the limp mode injection. In such case the value is stored in the
1784
+ * `InjectableDef`.
1785
+ */
1786
+ function injectRootLimpMode(token, notFoundValue, flags) {
1787
+ var injectableDef = getInjectableDef(token);
1788
+ if (injectableDef && injectableDef.providedIn == 'root') {
1789
+ return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
1790
+ injectableDef.value;
1791
+ }
1792
+ if (flags & InjectFlags.Optional)
1793
+ return null;
1794
+ if (notFoundValue !== undefined)
1795
+ return notFoundValue;
1796
+ throw new Error("Injector: NOT_FOUND [" + stringify(token) + "]");
1797
+ }
1798
+ function injectArgs(types) {
1799
+ var args = [];
1800
+ for (var i = 0; i < types.length; i++) {
1801
+ var arg = types[i];
1802
+ if (Array.isArray(arg)) {
1803
+ if (arg.length === 0) {
1804
+ throw new Error('Arguments array must have arguments.');
1805
+ }
1806
+ var type = undefined;
1807
+ var flags = InjectFlags.Default;
1808
+ for (var j = 0; j < arg.length; j++) {
1809
+ var meta = arg[j];
1810
+ if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {
1811
+ flags |= InjectFlags.Optional;
1812
+ }
1813
+ else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {
1814
+ flags |= InjectFlags.SkipSelf;
1815
+ }
1816
+ else if (meta instanceof Self || meta.ngMetadataName === 'Self') {
1817
+ flags |= InjectFlags.Self;
1818
+ }
1819
+ else if (meta instanceof Inject) {
1820
+ type = meta.token;
1821
+ }
1822
+ else {
1823
+ type = meta;
1824
+ }
1825
+ }
1826
+ args.push(inject(type, flags));
1827
+ }
1828
+ else {
1829
+ args.push(inject(arg));
1830
+ }
1831
+ }
1832
+ return args;
1833
+ }
1834
+
1835
+ /**
1836
+ * @license
1837
+ * Copyright Google Inc. All Rights Reserved.
1838
+ *
1839
+ * Use of this source code is governed by an MIT-style license that can be
1840
+ * found in the LICENSE file at https://angular.io/license
1841
+ */
1842
+ function assertNodeType(tNode, type) {
1843
+ assertDefined(tNode, 'should be called with a TNode');
1844
+ assertEqual(tNode.type, type, "should be a " + typeName(type));
1845
+ }
1846
+ function assertNodeOfPossibleTypes(tNode) {
1847
+ var types = [];
1848
+ for (var _i = 1; _i < arguments.length; _i++) {
1849
+ types[_i - 1] = arguments[_i];
1850
+ }
1851
+ assertDefined(tNode, 'should be called with a TNode');
1852
+ var found = types.some(function (type) { return tNode.type === type; });
1853
+ assertEqual(found, true, "Should be one of " + types.map(typeName).join(', ') + " but got " + typeName(tNode.type));
1854
+ }
1855
+ function typeName(type) {
1856
+ if (type == 1 /* Projection */)
1857
+ return 'Projection';
1858
+ if (type == 0 /* Container */)
1859
+ return 'Container';
1860
+ if (type == 2 /* View */)
1861
+ return 'View';
1862
+ if (type == 3 /* Element */)
1863
+ return 'Element';
1864
+ if (type == 4 /* ElementContainer */)
1865
+ return 'ElementContainer';
1866
+ return '<unknown>';
1867
+ }
1868
+
1869
+ /**
1870
+ * @license
1871
+ * Copyright Google Inc. All Rights Reserved.
1872
+ *
1873
+ * Use of this source code is governed by an MIT-style license that can be
1874
+ * found in the LICENSE file at https://angular.io/license
1875
+ */
1876
+ /**
1877
+ * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into
1878
+ * TView.initHooks during directiveCreate.
1879
+ *
1880
+ * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:
1881
+ * directive index), then saved in the even indices of the initHooks array. The odd indices
1882
+ * hold the hook functions themselves.
1883
+ *
1884
+ * @param index The index of the directive in LView
1885
+ * @param hooks The static hooks map on the directive def
1886
+ * @param tView The current TView
1783
1887
  */
1784
- function getRootView(target) {
1785
- ngDevMode && assertDefined(target, 'component');
1786
- var lView = Array.isArray(target) ? target : readPatchedLView(target);
1787
- while (lView && !(lView[FLAGS] & 64 /* IsRoot */)) {
1788
- lView = lView[PARENT];
1789
- }
1790
- return lView;
1791
- }
1792
- function getRootContext(viewOrComponent) {
1793
- var rootView = getRootView(viewOrComponent);
1888
+ function queueInitHooks(index, onInit, doCheck, tView) {
1794
1889
  ngDevMode &&
1795
- assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');
1796
- return rootView[CONTEXT];
1890
+ assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');
1891
+ if (onInit) {
1892
+ (tView.initHooks || (tView.initHooks = [])).push(index, onInit);
1893
+ }
1894
+ if (doCheck) {
1895
+ (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);
1896
+ (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);
1897
+ }
1797
1898
  }
1798
1899
  /**
1799
- * Returns the monkey-patch value data present on the target (which could be
1800
- * a component, directive or a DOM node).
1900
+ * Loops through the directives on a node and queues all their hooks except ngOnInit
1901
+ * and ngDoCheck, which are queued separately in directiveCreate.
1801
1902
  */
1802
- function readPatchedData(target) {
1803
- ngDevMode && assertDefined(target, 'Target expected');
1804
- return target[MONKEY_PATCH_KEY_NAME];
1805
- }
1806
- function readPatchedLView(target) {
1807
- var value = readPatchedData(target);
1808
- if (value) {
1809
- return Array.isArray(value) ? value : value.lView;
1903
+ function queueLifecycleHooks(tView, tNode) {
1904
+ if (tView.firstTemplatePass) {
1905
+ // It's necessary to loop through the directives at elementEnd() (rather than processing in
1906
+ // directiveCreate) so we can preserve the current hook order. Content, view, and destroy
1907
+ // hooks for projected components and directives must be called *before* their hosts.
1908
+ for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {
1909
+ var def = tView.data[i];
1910
+ queueContentHooks(def, tView, i);
1911
+ queueViewHooks(def, tView, i);
1912
+ queueDestroyHooks(def, tView, i);
1913
+ }
1810
1914
  }
1811
- return null;
1812
1915
  }
1813
- function hasParentInjector(parentLocation) {
1814
- return parentLocation !== NO_PARENT_INJECTOR;
1916
+ /** Queues afterContentInit and afterContentChecked hooks on TView */
1917
+ function queueContentHooks(def, tView, i) {
1918
+ if (def.afterContentInit) {
1919
+ (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);
1920
+ }
1921
+ if (def.afterContentChecked) {
1922
+ (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);
1923
+ (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);
1924
+ }
1815
1925
  }
1816
- function getParentInjectorIndex(parentLocation) {
1817
- return parentLocation & 32767 /* InjectorIndexMask */;
1926
+ /** Queues afterViewInit and afterViewChecked hooks on TView */
1927
+ function queueViewHooks(def, tView, i) {
1928
+ if (def.afterViewInit) {
1929
+ (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);
1930
+ }
1931
+ if (def.afterViewChecked) {
1932
+ (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);
1933
+ (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);
1934
+ }
1818
1935
  }
1819
- function getParentInjectorViewOffset(parentLocation) {
1820
- return parentLocation >> 16 /* ViewOffsetShift */;
1936
+ /** Queues onDestroy hooks on TView */
1937
+ function queueDestroyHooks(def, tView, i) {
1938
+ if (def.onDestroy != null) {
1939
+ (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);
1940
+ }
1821
1941
  }
1822
1942
  /**
1823
- * Unwraps a parent injector location number to find the view offset from the current injector,
1824
- * then walks up the declaration view tree until the view is found that contains the parent
1825
- * injector.
1943
+ * Calls onInit and doCheck calls if they haven't already been called.
1826
1944
  *
1827
- * @param location The location of the parent injector, which contains the view offset
1828
- * @param startView The LView instance from which to start walking up the view tree
1829
- * @returns The LView instance that contains the parent injector
1945
+ * @param currentView The current view
1830
1946
  */
1831
- function getParentInjectorView(location, startView) {
1832
- var viewOffset = getParentInjectorViewOffset(location);
1833
- var parentView = startView;
1834
- // For most cases, the parent injector can be found on the host node (e.g. for component
1835
- // or container), but we must keep the loop here to support the rarer case of deeply nested
1836
- // <ng-template> tags or inline views, where the parent injector might live many views
1837
- // above the child injector.
1838
- while (viewOffset > 0) {
1839
- parentView = parentView[DECLARATION_VIEW];
1840
- viewOffset--;
1947
+ function executeInitHooks(currentView, tView, checkNoChangesMode) {
1948
+ if (!checkNoChangesMode && currentView[FLAGS] & 32 /* RunInit */) {
1949
+ executeHooks(currentView, tView.initHooks, tView.checkHooks, checkNoChangesMode);
1950
+ currentView[FLAGS] &= ~32 /* RunInit */;
1841
1951
  }
1842
- return parentView;
1843
1952
  }
1844
1953
  /**
1845
- * Unwraps a parent injector location number to find the view offset from the current injector,
1846
- * then walks up the declaration view tree until the TNode of the parent injector is found.
1954
+ * Iterates over afterViewInit and afterViewChecked functions and calls them.
1847
1955
  *
1848
- * @param location The location of the parent injector, which contains the view offset
1849
- * @param startView The LView instance from which to start walking up the view tree
1850
- * @param startTNode The TNode instance of the starting element
1851
- * @returns The TNode of the parent injector
1956
+ * @param currentView The current view
1852
1957
  */
1853
- function getParentInjectorTNode(location, startView, startTNode) {
1854
- if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {
1855
- // view offset is 0
1856
- var injectorIndex = startTNode.parent.injectorIndex;
1857
- var parentTNode_1 = startTNode.parent;
1858
- while (parentTNode_1.parent != null && injectorIndex == parentTNode_1.injectorIndex) {
1859
- parentTNode_1 = parentTNode_1.parent;
1860
- }
1861
- return parentTNode_1;
1862
- }
1863
- var viewOffset = getParentInjectorViewOffset(location);
1864
- // view offset is 1
1865
- var parentView = startView;
1866
- var parentTNode = startView[HOST_NODE];
1867
- // view offset is superior to 1
1868
- while (viewOffset > 1) {
1869
- parentView = parentView[DECLARATION_VIEW];
1870
- parentTNode = parentView[HOST_NODE];
1871
- viewOffset--;
1958
+ function executeHooks(currentView, allHooks, checkHooks, checkNoChangesMode) {
1959
+ if (checkNoChangesMode)
1960
+ return;
1961
+ var hooksToCall = currentView[FLAGS] & 2 /* FirstLViewPass */ ? allHooks : checkHooks;
1962
+ if (hooksToCall) {
1963
+ callHooks(currentView, hooksToCall);
1872
1964
  }
1873
- return parentTNode;
1874
1965
  }
1875
- var defaultScheduler = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only
1876
- setTimeout // everything else
1877
- ).bind(_global);
1878
1966
  /**
1879
- * Equivalent to ES6 spread, add each item to an array.
1967
+ * Calls lifecycle hooks with their contexts, skipping init hooks if it's not
1968
+ * the first LView pass.
1880
1969
  *
1881
- * @param items The items to add
1882
- * @param arr The array to which you want to add the items
1970
+ * @param currentView The current view
1971
+ * @param arr The array in which the hooks are found
1883
1972
  */
1884
- function addAllToArray(items, arr) {
1885
- for (var i = 0; i < items.length; i++) {
1886
- arr.push(items[i]);
1973
+ function callHooks(currentView, arr) {
1974
+ for (var i = 0; i < arr.length; i += 2) {
1975
+ arr[i + 1].call(currentView[arr[i]]);
1887
1976
  }
1888
1977
  }
1889
1978
 
@@ -2040,13 +2129,10 @@ function getOrCreateCurrentQueries(QueryType) {
2040
2129
  }
2041
2130
  return currentQueries || (lView[QUERIES] = new QueryType(null, null, null));
2042
2131
  }
2043
- /**
2044
- * This property gets set before entering a template.
2045
- */
2046
- var creationMode;
2047
- function getCreationMode() {
2048
- // top level variables should not be exported for performance reasons (PERF_NOTES.md)
2049
- return creationMode;
2132
+ /** Checks whether a given view is in creation mode */
2133
+ function isCreationMode(view) {
2134
+ if (view === void 0) { view = lView; }
2135
+ return (view[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;
2050
2136
  }
2051
2137
  /**
2052
2138
  * State of the current view being processed.
@@ -2116,7 +2202,6 @@ function enterView(newView, hostTNode) {
2116
2202
  var oldView = lView;
2117
2203
  if (newView) {
2118
2204
  var tView = newView[TVIEW];
2119
- creationMode = (newView[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;
2120
2205
  firstTemplatePass = tView.firstTemplatePass;
2121
2206
  bindingRootIndex = tView.bindingStartIndex;
2122
2207
  }
@@ -2152,20 +2237,19 @@ function resetComponentState() {
2152
2237
  * the direction of traversal (up or down the view tree) a bit clearer.
2153
2238
  *
2154
2239
  * @param newView New state to become active
2155
- * @param creationOnly An optional boolean to indicate that the view was processed in creation mode
2156
- * only, i.e. the first update will be done later. Only possible for dynamically created views.
2157
2240
  */
2158
- function leaveView(newView, creationOnly) {
2241
+ function leaveView(newView) {
2159
2242
  var tView = lView[TVIEW];
2160
- if (!creationOnly) {
2161
- if (!checkNoChangesMode) {
2162
- executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, creationMode);
2163
- }
2243
+ if (isCreationMode(lView)) {
2244
+ lView[FLAGS] &= ~1 /* CreationMode */;
2245
+ }
2246
+ else {
2247
+ executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode);
2164
2248
  // Views are clean and in update mode after being checked, so these bits are cleared
2165
- lView[FLAGS] &= ~(1 /* CreationMode */ | 4 /* Dirty */);
2249
+ lView[FLAGS] &= ~(8 /* Dirty */ | 2 /* FirstLViewPass */);
2250
+ lView[FLAGS] |= 32 /* RunInit */;
2251
+ lView[BINDING_INDEX] = tView.bindingStartIndex;
2166
2252
  }
2167
- lView[FLAGS] |= 16 /* RunInit */;
2168
- lView[BINDING_INDEX] = tView.bindingStartIndex;
2169
2253
  enterView(newView, null);
2170
2254
  }
2171
2255
 
@@ -2212,7 +2296,7 @@ function leaveView(newView, creationOnly) {
2212
2296
  *
2213
2297
  * ```
2214
2298
  */
2215
- var includeViewProviders = false;
2299
+ var includeViewProviders = true;
2216
2300
  function setIncludeViewProviders(v) {
2217
2301
  var oldValue = includeViewProviders;
2218
2302
  includeViewProviders = v;
@@ -2327,7 +2411,7 @@ function getInjectorIndex(tNode, hostView) {
2327
2411
  */
2328
2412
  function getParentInjectorLocation(tNode, view) {
2329
2413
  if (tNode.parent && tNode.parent.injectorIndex !== -1) {
2330
- return tNode.parent.injectorIndex; // ViewOffset is 0, AcrossHostBoundary is 0
2414
+ return tNode.parent.injectorIndex; // ViewOffset is 0
2331
2415
  }
2332
2416
  // For most cases, the parent injector index can be found on the host node (e.g. for component
2333
2417
  // or container), so this loop will be skipped, but we must keep the loop here to support
@@ -2336,15 +2420,11 @@ function getParentInjectorLocation(tNode, view) {
2336
2420
  var viewOffset = 1;
2337
2421
  while (hostTNode && hostTNode.injectorIndex === -1) {
2338
2422
  view = view[DECLARATION_VIEW];
2339
- hostTNode = view[HOST_NODE];
2423
+ hostTNode = view ? view[HOST_NODE] : null;
2340
2424
  viewOffset++;
2341
2425
  }
2342
- var acrossHostBoundary = hostTNode && hostTNode.type === 3 /* Element */ ?
2343
- 32768 /* AcrossHostBoundary */ :
2344
- 0;
2345
2426
  return hostTNode ?
2346
- hostTNode.injectorIndex | (viewOffset << 16 /* ViewOffsetShift */) |
2347
- acrossHostBoundary :
2427
+ hostTNode.injectorIndex | (viewOffset << 16 /* ViewOffsetShift */) :
2348
2428
  -1;
2349
2429
  }
2350
2430
  /**
@@ -2395,7 +2475,7 @@ function injectAttributeImpl(tNode, attrNameToInject) {
2395
2475
  if (attrs) {
2396
2476
  for (var i = 0; i < attrs.length; i = i + 2) {
2397
2477
  var attrName = attrs[i];
2398
- if (attrName === 1 /* SelectOnly */)
2478
+ if (attrName === 3 /* SelectOnly */)
2399
2479
  break;
2400
2480
  if (attrName == attrNameToInject) {
2401
2481
  return attrs[i + 1];
@@ -2419,75 +2499,80 @@ function injectAttributeImpl(tNode, attrNameToInject) {
2419
2499
  */
2420
2500
  function getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) {
2421
2501
  if (flags === void 0) { flags = InjectFlags.Default; }
2422
- var bloomHash = bloomHashBitOrFactory(token);
2423
- // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
2424
- // so just call the factory function to create it.
2425
- if (typeof bloomHash === 'function') {
2426
- var savePreviousOrParentTNode = getPreviousOrParentTNode();
2427
- var saveLView = getLView();
2428
- setTNodeAndViewData(tNode, lView);
2429
- try {
2430
- var value = bloomHash();
2431
- if (value == null && !(flags & InjectFlags.Optional)) {
2432
- throw new Error("No provider for " + stringify$1(token) + "!");
2433
- }
2434
- else {
2435
- return value;
2436
- }
2437
- }
2438
- finally {
2439
- setTNodeAndViewData(savePreviousOrParentTNode, saveLView);
2440
- }
2441
- }
2442
- else if (typeof bloomHash == 'number') {
2443
- // If the token has a bloom hash, then it is a token which could be in NodeInjector.
2444
- // A reference to the previous injector TView that was found while climbing the element injector
2445
- // tree. This is used to know if viewProviders can be accessed on the current injector.
2446
- var previousTView = null;
2447
- var injectorIndex = getInjectorIndex(tNode, lView);
2448
- var parentLocation = NO_PARENT_INJECTOR;
2449
- // If we should skip this injector, or if there is no injector on this node, start by searching
2450
- // the parent injector.
2451
- if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
2452
- parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
2453
- lView[injectorIndex + PARENT_INJECTOR];
2454
- if (!shouldSearchParent(flags, parentLocation)) {
2455
- injectorIndex = -1;
2456
- }
2457
- else {
2458
- previousTView = lView[TVIEW];
2459
- injectorIndex = getParentInjectorIndex(parentLocation);
2460
- lView = getParentInjectorView(parentLocation, lView);
2461
- }
2462
- }
2463
- // Traverse up the injector tree until we find a potential match or until we know there
2464
- // *isn't* a match.
2465
- while (injectorIndex !== -1) {
2466
- parentLocation = lView[injectorIndex + PARENT_INJECTOR];
2467
- // Check the current injector. If it matches, see if it contains token.
2468
- var tView = lView[TVIEW];
2469
- if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
2470
- // At this point, we have an injector which *may* contain the token, so we step through
2471
- // the providers and directives associated with the injector's corresponding node to get
2472
- // the instance.
2473
- var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView);
2474
- if (instance !== NOT_FOUND) {
2475
- return instance;
2502
+ if (tNode) {
2503
+ var bloomHash = bloomHashBitOrFactory(token);
2504
+ // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
2505
+ // so just call the factory function to create it.
2506
+ if (typeof bloomHash === 'function') {
2507
+ var savePreviousOrParentTNode = getPreviousOrParentTNode();
2508
+ var saveLView = getLView();
2509
+ setTNodeAndViewData(tNode, lView);
2510
+ try {
2511
+ var value = bloomHash();
2512
+ if (value == null && !(flags & InjectFlags.Optional)) {
2513
+ throw new Error("No provider for " + stringify$1(token) + "!");
2514
+ }
2515
+ else {
2516
+ return value;
2476
2517
  }
2477
2518
  }
2478
- if (shouldSearchParent(flags, parentLocation) &&
2479
- bloomHasToken(bloomHash, injectorIndex, lView)) {
2480
- // The def wasn't found anywhere on this node, so it was a false positive.
2481
- // Traverse up the tree and continue searching.
2482
- previousTView = tView;
2483
- injectorIndex = getParentInjectorIndex(parentLocation);
2484
- lView = getParentInjectorView(parentLocation, lView);
2519
+ finally {
2520
+ setTNodeAndViewData(savePreviousOrParentTNode, saveLView);
2521
+ }
2522
+ }
2523
+ else if (typeof bloomHash == 'number') {
2524
+ // If the token has a bloom hash, then it is a token which could be in NodeInjector.
2525
+ // A reference to the previous injector TView that was found while climbing the element
2526
+ // injector tree. This is used to know if viewProviders can be accessed on the current
2527
+ // injector.
2528
+ var previousTView = null;
2529
+ var injectorIndex = getInjectorIndex(tNode, lView);
2530
+ var parentLocation = NO_PARENT_INJECTOR;
2531
+ var hostTElementNode = flags & InjectFlags.Host ? findComponentView(lView)[HOST_NODE] : null;
2532
+ // If we should skip this injector, or if there is no injector on this node, start by
2533
+ // searching
2534
+ // the parent injector.
2535
+ if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
2536
+ parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
2537
+ lView[injectorIndex + PARENT_INJECTOR];
2538
+ if (!shouldSearchParent(flags, false)) {
2539
+ injectorIndex = -1;
2540
+ }
2541
+ else {
2542
+ previousTView = lView[TVIEW];
2543
+ injectorIndex = getParentInjectorIndex(parentLocation);
2544
+ lView = getParentInjectorView(parentLocation, lView);
2545
+ }
2485
2546
  }
2486
- else {
2487
- // If we should not search parent OR If the ancestor bloom filter value does not have the
2488
- // bit corresponding to the directive we can give up on traversing up to find the specific
2489
- // injector.
2490
- injectorIndex = -1;
2547
+ // Traverse up the injector tree until we find a potential match or until we know there
2548
+ // *isn't* a match.
2549
+ while (injectorIndex !== -1) {
2550
+ parentLocation = lView[injectorIndex + PARENT_INJECTOR];
2551
+ // Check the current injector. If it matches, see if it contains token.
2552
+ var tView = lView[TVIEW];
2553
+ if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
2554
+ // At this point, we have an injector which *may* contain the token, so we step through
2555
+ // the providers and directives associated with the injector's corresponding node to get
2556
+ // the instance.
2557
+ var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
2558
+ if (instance !== NOT_FOUND) {
2559
+ return instance;
2560
+ }
2561
+ }
2562
+ if (shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&
2563
+ bloomHasToken(bloomHash, injectorIndex, lView)) {
2564
+ // The def wasn't found anywhere on this node, so it was a false positive.
2565
+ // Traverse up the tree and continue searching.
2566
+ previousTView = tView;
2567
+ injectorIndex = getParentInjectorIndex(parentLocation);
2568
+ lView = getParentInjectorView(parentLocation, lView);
2569
+ }
2570
+ else {
2571
+ // If we should not search parent OR If the ancestor bloom filter value does not have the
2572
+ // bit corresponding to the directive we can give up on traversing up to find the specific
2573
+ // injector.
2574
+ injectorIndex = -1;
2575
+ }
2491
2576
  }
2492
2577
  }
2493
2578
  }
@@ -2512,7 +2597,7 @@ function getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) {
2512
2597
  }
2513
2598
  }
2514
2599
  var NOT_FOUND = {};
2515
- function searchTokensOnInjector(injectorIndex, lView, token, previousTView) {
2600
+ function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
2516
2601
  var currentTView = lView[TVIEW];
2517
2602
  var tNode = currentTView.data[injectorIndex + TNODE];
2518
2603
  // First, we need to determine if view providers can be accessed by the starting element.
@@ -2533,7 +2618,10 @@ function searchTokensOnInjector(injectorIndex, lView, token, previousTView) {
2533
2618
  // This means that we just came from the Component's View and therefore are allowed to see
2534
2619
  // into the ViewProviders.
2535
2620
  (previousTView != currentTView && (tNode.type === 3 /* Element */));
2536
- var injectableIdx = locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders);
2621
+ // This special case happens when there is a @host on the inject and when we are searching
2622
+ // on the host element node.
2623
+ var isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;
2624
+ var injectableIdx = locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders, isHostSpecialCase);
2537
2625
  if (injectableIdx !== null) {
2538
2626
  return getNodeInjectable(currentTView.data, lView, injectableIdx, tNode);
2539
2627
  }
@@ -2548,11 +2636,11 @@ function searchTokensOnInjector(injectorIndex, lView, token, previousTView) {
2548
2636
  * @param lView The view we are currently processing
2549
2637
  * @param token Provider token or type of a directive to look for.
2550
2638
  * @param canAccessViewProviders Whether view providers should be considered.
2639
+ * @param isHostSpecialCase Whether the host special case applies.
2551
2640
  * @returns Index of a found directive or provider, or null when none found.
2552
2641
  */
2553
- function locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders) {
2642
+ function locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders, isHostSpecialCase) {
2554
2643
  var tView = lView[TVIEW];
2555
- var nodeFlags = tNode.flags;
2556
2644
  var nodeProviderIndexes = tNode.providerIndexes;
2557
2645
  var tInjectables = tView.data;
2558
2646
  var injectablesStart = nodeProviderIndexes & 65535 /* ProvidersStartIndexMask */;
@@ -2560,13 +2648,21 @@ function locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders)
2560
2648
  var directiveEnd = tNode.directiveEnd;
2561
2649
  var cptViewProvidersCount = nodeProviderIndexes >> 16 /* CptViewProvidersCountShift */;
2562
2650
  var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;
2563
- for (var i = startingIndex; i < directiveEnd; i++) {
2651
+ // When the host special case applies, only the viewProviders and the component are visible
2652
+ var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;
2653
+ for (var i = startingIndex; i < endIndex; i++) {
2564
2654
  var providerTokenOrDef = tInjectables[i];
2565
2655
  if (i < directivesStart && token === providerTokenOrDef ||
2566
2656
  i >= directivesStart && providerTokenOrDef.type === token) {
2567
2657
  return i;
2568
2658
  }
2569
2659
  }
2660
+ if (isHostSpecialCase) {
2661
+ var dirDef = tInjectables[directivesStart];
2662
+ if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {
2663
+ return directivesStart;
2664
+ }
2665
+ }
2570
2666
  return null;
2571
2667
  }
2572
2668
  /**
@@ -2649,10 +2745,8 @@ function bloomHasToken(bloomHash, injectorIndex, injectorView) {
2649
2745
  return !!(value & mask);
2650
2746
  }
2651
2747
  /** Returns true if flags prevent parent injector from being searched for tokens */
2652
- function shouldSearchParent(flags, parentLocation) {
2653
- return !(flags & InjectFlags.Self ||
2654
- (flags & InjectFlags.Host &&
2655
- (parentLocation & 32768 /* AcrossHostBoundary */)));
2748
+ function shouldSearchParent(flags, isFirstHostTNode) {
2749
+ return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);
2656
2750
  }
2657
2751
  function injectInjector() {
2658
2752
  var tNode = getPreviousOrParentTNode();
@@ -3064,7 +3158,7 @@ function getViewComponent(element) {
3064
3158
  // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`
3065
3159
  lView = lView[PARENT];
3066
3160
  }
3067
- return lView[FLAGS] & 64 /* IsRoot */ ? null : lView[CONTEXT];
3161
+ return lView[FLAGS] & 128 /* IsRoot */ ? null : lView[CONTEXT];
3068
3162
  }
3069
3163
  /**
3070
3164
  * Returns the `RootContext` instance that is associated with
@@ -3169,7 +3263,7 @@ function getRootView$1(componentOrView) {
3169
3263
  ngDevMode && assertDefined(componentOrView, 'component');
3170
3264
  lView = readPatchedLView(componentOrView);
3171
3265
  }
3172
- while (lView && !(lView[FLAGS] & 64 /* IsRoot */)) {
3266
+ while (lView && !(lView[FLAGS] & 128 /* IsRoot */)) {
3173
3267
  lView = lView[PARENT];
3174
3268
  }
3175
3269
  return lView;
@@ -3246,7 +3340,7 @@ function getListeners(element) {
3246
3340
  var secondParam = tCleanup[i++];
3247
3341
  if (typeof firstParam === 'string') {
3248
3342
  var name_1 = firstParam;
3249
- var listenerElement = lView[secondParam];
3343
+ var listenerElement = readElementValue(lView[secondParam]);
3250
3344
  var callback = lCleanup[tCleanup[i++]];
3251
3345
  var useCaptureOrIndx = tCleanup[i++];
3252
3346
  // if useCaptureOrIndx is boolean then report it as is.
@@ -3278,55 +3372,6 @@ function isDirectiveDefHack(obj) {
3278
3372
  return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
3279
3373
  }
3280
3374
 
3281
- /**
3282
- * @license
3283
- * Copyright Google Inc. All Rights Reserved.
3284
- *
3285
- * Use of this source code is governed by an MIT-style license that can be
3286
- * found in the LICENSE file at https://angular.io/license
3287
- */
3288
- var __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });
3289
- /**
3290
- * Allows to refer to references which are not yet defined.
3291
- *
3292
- * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
3293
- * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
3294
- * a query is not yet defined.
3295
- *
3296
- * @usageNotes
3297
- * ### Example
3298
- * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
3299
- * @publicApi
3300
- */
3301
- function forwardRef(forwardRefFn) {
3302
- forwardRefFn.__forward_ref__ = forwardRef;
3303
- forwardRefFn.toString = function () { return stringify(this()); };
3304
- return forwardRefFn;
3305
- }
3306
- /**
3307
- * Lazily retrieves the reference value from a forwardRef.
3308
- *
3309
- * Acts as the identity function when given a non-forward-ref value.
3310
- *
3311
- * @usageNotes
3312
- * ### Example
3313
- *
3314
- * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
3315
- *
3316
- * @see `forwardRef`
3317
- * @publicApi
3318
- */
3319
- function resolveForwardRef(type) {
3320
- var fn = type;
3321
- if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&
3322
- fn.__forward_ref__ === forwardRef) {
3323
- return fn();
3324
- }
3325
- else {
3326
- return type;
3327
- }
3328
- }
3329
-
3330
3375
  /**
3331
3376
  * @license
3332
3377
  * Copyright Google Inc. All Rights Reserved.
@@ -3532,7 +3577,7 @@ function bindingUpdated(lView, bindingIndex, value) {
3532
3577
  else if (isDifferent(lView[bindingIndex], value)) {
3533
3578
  if (ngDevMode && getCheckNoChangesMode()) {
3534
3579
  if (!devModeEqual(lView[bindingIndex], value)) {
3535
- throwErrorIfNoChangesMode(getCreationMode(), lView[bindingIndex], value);
3580
+ throwErrorIfNoChangesMode(isCreationMode(lView), lView[bindingIndex], value);
3536
3581
  }
3537
3582
  }
3538
3583
  lView[bindingIndex] = value;
@@ -3745,29 +3790,14 @@ function walkTNodeTree(viewToWalk, action, renderer, renderParent, beforeNode) {
3745
3790
  if (tNode.type === 2 /* View */ && currentView[NEXT]) {
3746
3791
  currentView = currentView[NEXT];
3747
3792
  nextTNode = currentView[TVIEW].node;
3748
- }
3749
- else {
3750
- nextTNode = tNode.next;
3751
- }
3752
- }
3753
- }
3754
- tNode = nextTNode;
3755
- }
3756
- }
3757
- /**
3758
- * Given a current view, finds the nearest component's host (LElement).
3759
- *
3760
- * @param lView LView for which we want a host element node
3761
- * @returns The host node
3762
- */
3763
- function findComponentView(lView) {
3764
- var rootTNode = lView[HOST_NODE];
3765
- while (rootTNode && rootTNode.type === 2 /* View */) {
3766
- ngDevMode && assertDefined(lView[PARENT], 'lView.parent');
3767
- lView = lView[PARENT];
3768
- rootTNode = lView[HOST_NODE];
3793
+ }
3794
+ else {
3795
+ nextTNode = tNode.next;
3796
+ }
3797
+ }
3798
+ }
3799
+ tNode = nextTNode;
3769
3800
  }
3770
- return lView;
3771
3801
  }
3772
3802
  /**
3773
3803
  * NOTE: for performance reasons, the possible actions are inlined within the function instead of
@@ -3886,7 +3916,7 @@ function insertView(lView, lContainer, parentView, index, containerIndex) {
3886
3916
  lView[QUERIES].insertView(index);
3887
3917
  }
3888
3918
  // Sets the attached flag
3889
- lView[FLAGS] |= 8 /* Attached */;
3919
+ lView[FLAGS] |= 16 /* Attached */;
3890
3920
  }
3891
3921
  /**
3892
3922
  * Detaches a view from a container.
@@ -3915,7 +3945,7 @@ function detachView(lContainer, removeIndex, detached) {
3915
3945
  viewToDetach[CONTAINER_INDEX] = -1;
3916
3946
  viewToDetach[PARENT] = null;
3917
3947
  // Unsets the attached flag
3918
- viewToDetach[FLAGS] &= ~8 /* Attached */;
3948
+ viewToDetach[FLAGS] &= ~16 /* Attached */;
3919
3949
  return viewToDetach;
3920
3950
  }
3921
3951
  /**
@@ -3948,7 +3978,7 @@ function destroyLView(view) {
3948
3978
  }
3949
3979
  destroyViewTree(view);
3950
3980
  // Sets the destroyed flag
3951
- view[FLAGS] |= 32 /* Destroyed */;
3981
+ view[FLAGS] |= 64 /* Destroyed */;
3952
3982
  }
3953
3983
  /**
3954
3984
  * Determines which LViewOrLContainer to jump to when traversing back up the
@@ -4348,7 +4378,7 @@ function isNodeMatchingSelector(tNode, selector, isProjectionMode) {
4348
4378
  ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');
4349
4379
  var mode = 4 /* ELEMENT */;
4350
4380
  var nodeAttrs = tNode.attrs;
4351
- var selectOnlyMarkerIdx = nodeAttrs ? nodeAttrs.indexOf(1 /* SelectOnly */) : -1;
4381
+ var selectOnlyMarkerIdx = nodeAttrs ? nodeAttrs.indexOf(3 /* SelectOnly */) : -1;
4352
4382
  // When processing ":not" selectors, we skip to the next ":not" if the
4353
4383
  // current one doesn't match
4354
4384
  var skipToNextSelector = false;
@@ -4437,7 +4467,7 @@ function findAttrIndexInNode(name, attrs) {
4437
4467
  i += 4;
4438
4468
  }
4439
4469
  else {
4440
- if (maybeAttrName === 1 /* SelectOnly */) {
4470
+ if (maybeAttrName === 3 /* SelectOnly */) {
4441
4471
  selectOnlyMode = true;
4442
4472
  }
4443
4473
  i += selectOnlyMode ? 1 : 2;
@@ -4539,16 +4569,17 @@ var CorePlayerHandler = /** @class */ (function () {
4539
4569
  * found in the LICENSE file at https://angular.io/license
4540
4570
  */
4541
4571
  var ANIMATION_PROP_PREFIX = '@';
4542
- function createEmptyStylingContext(element, sanitizer, initialStylingValues) {
4572
+ function createEmptyStylingContext(element, sanitizer, initialStyles, initialClasses) {
4543
4573
  return [
4544
- null,
4545
- sanitizer || null,
4546
- initialStylingValues || [null],
4547
- 0,
4548
4574
  0,
4575
+ [null, -1, false, sanitizer || null],
4576
+ initialStyles || [null],
4577
+ initialClasses || [null],
4578
+ [0, 0],
4549
4579
  element || null,
4550
4580
  null,
4551
- null // PreviousMultiStyleValue
4581
+ null,
4582
+ null,
4552
4583
  ];
4553
4584
  }
4554
4585
  /**
@@ -4561,6 +4592,8 @@ function allocStylingContext(element, templateStyleContext) {
4561
4592
  // each instance gets a copy
4562
4593
  var context = templateStyleContext.slice();
4563
4594
  context[5 /* ElementPosition */] = element;
4595
+ // this will prevent any other directives from extending the context
4596
+ context[0 /* MasterFlagPosition */] |= 32 /* BindingAllocationLocked */;
4564
4597
  return context;
4565
4598
  }
4566
4599
  /**
@@ -4598,8 +4631,8 @@ function getStylingContext(index, viewData) {
4598
4631
  }
4599
4632
  function isStylingContext(value) {
4600
4633
  // Not an LView or an LContainer
4601
- return Array.isArray(value) && typeof value[FLAGS] !== 'number' &&
4602
- typeof value[ACTIVE_INDEX] !== 'number';
4634
+ return Array.isArray(value) && typeof value[0 /* MasterFlagPosition */] === 'number' &&
4635
+ Array.isArray(value[2 /* InitialStyleValuesPosition */]);
4603
4636
  }
4604
4637
  function isAnimationProp(name) {
4605
4638
  return name[0] === ANIMATION_PROP_PREFIX;
@@ -4663,140 +4696,392 @@ function getOrCreatePlayerContext(target, context) {
4663
4696
  return getPlayerContext(stylingContext) || allocPlayerContext(stylingContext);
4664
4697
  }
4665
4698
  function getPlayerContext(stylingContext) {
4666
- return stylingContext[0 /* PlayerContext */];
4699
+ return stylingContext[8 /* PlayerContext */];
4667
4700
  }
4668
4701
  function allocPlayerContext(data) {
4669
- return data[0 /* PlayerContext */] =
4702
+ return data[8 /* PlayerContext */] =
4670
4703
  [5 /* SinglePlayerBuildersStartPosition */, null, null, null, null];
4671
4704
  }
4672
4705
  function throwInvalidRefError() {
4673
4706
  throw new Error('Only elements that exist in an Angular application can be used for animations');
4674
4707
  }
4708
+ function hasStyling(attrs) {
4709
+ for (var i = 0; i < attrs.length; i++) {
4710
+ var attr = attrs[i];
4711
+ if (attr == 1 /* Classes */ || attr == 2 /* Styles */)
4712
+ return true;
4713
+ }
4714
+ return false;
4715
+ }
4716
+ function hasClassInput(tNode) {
4717
+ return tNode.flags & 8 /* hasClassInput */ ? true : false;
4718
+ }
4675
4719
 
4676
- var EMPTY_ARR = [];
4677
- var EMPTY_OBJ = {};
4678
4720
  /**
4679
- * Creates a styling context template where styling information is stored.
4680
- * Any styles that are later referenced using `updateStyleProp` must be
4681
- * passed in within this function. Initial values for those styles are to
4682
- * be declared after all initial style properties are declared (this change in
4683
- * mode between declarations and initial styles is made possible using a special
4684
- * enum value found in `definition.ts`).
4685
- *
4686
- * @param initialStyleDeclarations a list of style declarations and initial style values
4687
- * that are used later within the styling context.
4688
- *
4689
- * -> ['width', 'height', SPECIAL_ENUM_VAL, 'width', '100px']
4690
- * This implies that `width` and `height` will be later styled and that the `width`
4691
- * property has an initial value of `100px`.
4692
- *
4693
- * @param initialClassDeclarations a list of class declarations and initial class values
4694
- * that are used later within the styling context.
4695
- *
4696
- * -> ['foo', 'bar', SPECIAL_ENUM_VAL, 'foo', true]
4697
- * This implies that `foo` and `bar` will be later styled and that the `foo`
4698
- * class will be applied to the element as an initial class since it's true
4699
- */
4700
- function createStylingContextTemplate(initialClassDeclarations, initialStyleDeclarations, styleSanitizer, onlyProcessSingleClasses) {
4701
- var initialStylingValues = [null];
4702
- var context = createEmptyStylingContext(null, styleSanitizer, initialStylingValues);
4703
- // we use two maps since a class name might collide with a CSS style prop
4704
- var stylesLookup = {};
4705
- var classesLookup = {};
4706
- var totalStyleDeclarations = 0;
4707
- if (initialStyleDeclarations) {
4708
- var hasPassedDeclarations = false;
4709
- for (var i = 0; i < initialStyleDeclarations.length; i++) {
4710
- var v = initialStyleDeclarations[i];
4711
- // this flag value marks where the declarations end the initial values begin
4712
- if (v === 1 /* VALUES_MODE */) {
4713
- hasPassedDeclarations = true;
4721
+ * This file includes the code to power all styling-binding operations in Angular.
4722
+ *
4723
+ * These include:
4724
+ * [style]="myStyleObj"
4725
+ * [class]="myClassObj"
4726
+ * [style.prop]="myPropValue"
4727
+ * [class.name]="myClassValue"
4728
+ *
4729
+ * There are many different ways in which these functions below are called. Please see
4730
+ * `interfaces/styles.ts` to get a better idea of how the styling algorithm works.
4731
+ */
4732
+ /**
4733
+ * Creates a new StylingContext an fills it with the provided static styling attribute values.
4734
+ */
4735
+ function initializeStaticContext(attrs) {
4736
+ var context = createEmptyStylingContext();
4737
+ var initialClasses = context[3 /* InitialClassValuesPosition */] =
4738
+ [null];
4739
+ var initialStyles = context[2 /* InitialStyleValuesPosition */] =
4740
+ [null];
4741
+ // The attributes array has marker values (numbers) indicating what the subsequent
4742
+ // values represent. When we encounter a number, we set the mode to that type of attribute.
4743
+ var mode = -1;
4744
+ for (var i = 0; i < attrs.length; i++) {
4745
+ var attr = attrs[i];
4746
+ if (typeof attr == 'number') {
4747
+ mode = attr;
4748
+ }
4749
+ else if (mode === 2 /* Styles */) {
4750
+ initialStyles.push(attr, attrs[++i]);
4751
+ }
4752
+ else if (mode === 1 /* Classes */) {
4753
+ initialClasses.push(attr, true);
4754
+ }
4755
+ else if (mode === 3 /* SelectOnly */) {
4756
+ break;
4757
+ }
4758
+ }
4759
+ return context;
4760
+ }
4761
+ /**
4762
+ * Designed to update an existing styling context with new static styling
4763
+ * data (classes and styles).
4764
+ *
4765
+ * @param context the existing styling context
4766
+ * @param attrs an array of new static styling attributes that will be
4767
+ * assigned to the context
4768
+ * @param directive the directive instance with which static data is associated with.
4769
+ */
4770
+ function patchContextWithStaticAttrs(context, attrs, directive) {
4771
+ // If the styling context has already been patched with the given directive's bindings,
4772
+ // then there is no point in doing it again. The reason why this may happen (the directive
4773
+ // styling being patched twice) is because the `stylingBinding` function is called each time
4774
+ // an element is created (both within a template function and within directive host bindings).
4775
+ var directives = context[1 /* DirectiveRegistryPosition */];
4776
+ if (getDirectiveRegistryValuesIndexOf(directives, directive) == -1) {
4777
+ // this is a new directive which we have not seen yet.
4778
+ directives.push(directive, -1, false, null);
4779
+ var initialClasses = null;
4780
+ var initialStyles = null;
4781
+ var mode = -1;
4782
+ for (var i = 0; i < attrs.length; i++) {
4783
+ var attr = attrs[i];
4784
+ if (typeof attr == 'number') {
4785
+ mode = attr;
4786
+ }
4787
+ else if (mode == 1 /* Classes */) {
4788
+ initialClasses = initialClasses || context[3 /* InitialClassValuesPosition */];
4789
+ patchInitialStylingValue(initialClasses, attr, true);
4790
+ }
4791
+ else if (mode == 2 /* Styles */) {
4792
+ initialStyles = initialStyles || context[2 /* InitialStyleValuesPosition */];
4793
+ patchInitialStylingValue(initialStyles, attr, attrs[++i]);
4794
+ }
4795
+ }
4796
+ }
4797
+ }
4798
+ /**
4799
+ * Designed to add a style or class value into the existing set of initial styles.
4800
+ *
4801
+ * The function will search and figure out if a style/class value is already present
4802
+ * within the provided initial styling array. If and when a style/class value is not
4803
+ * present (or if it's value is falsy) then it will be inserted/updated in the list
4804
+ * of initial styling values.
4805
+ */
4806
+ function patchInitialStylingValue(initialStyling, prop, value) {
4807
+ // Even values are keys; Odd numbers are values; Search keys only
4808
+ for (var i = 1 /* KeyValueStartPosition */; i < initialStyling.length;) {
4809
+ var key = initialStyling[i];
4810
+ if (key === prop) {
4811
+ var existingValue = initialStyling[i + 1 /* ValueOffset */];
4812
+ // If there is no previous style value (when `null`) or no previous class
4813
+ // applied (when `false`) then we update the the newly given value.
4814
+ if (existingValue == null || existingValue == false) {
4815
+ initialStyling[i + 1 /* ValueOffset */] = value;
4816
+ }
4817
+ return;
4818
+ }
4819
+ i = i + 2 /* Size */;
4820
+ }
4821
+ // We did not find existing key, add a new one.
4822
+ initialStyling.push(prop, value);
4823
+ }
4824
+ /**
4825
+ * Runs through the initial styling data present in the context and renders
4826
+ * them via the renderer on the element.
4827
+ */
4828
+ function renderInitialStylesAndClasses(element, context, renderer) {
4829
+ var initialClasses = context[3 /* InitialClassValuesPosition */];
4830
+ renderInitialStylingValues(element, renderer, initialClasses, true);
4831
+ var initialStyles = context[2 /* InitialStyleValuesPosition */];
4832
+ renderInitialStylingValues(element, renderer, initialStyles, false);
4833
+ }
4834
+ /**
4835
+ * This is a helper function designed to render each entry present within the
4836
+ * provided list of initialStylingValues.
4837
+ */
4838
+ function renderInitialStylingValues(element, renderer, initialStylingValues, isEntryClassBased) {
4839
+ for (var i = 1 /* KeyValueStartPosition */; i < initialStylingValues.length; i += 2 /* Size */) {
4840
+ var value = initialStylingValues[i + 1 /* ValueOffset */];
4841
+ if (value) {
4842
+ if (isEntryClassBased) {
4843
+ setClass(element, initialStylingValues[i + 0 /* PropOffset */], true, renderer, null);
4714
4844
  }
4715
4845
  else {
4716
- var prop = v;
4717
- if (hasPassedDeclarations) {
4718
- var value = initialStyleDeclarations[++i];
4719
- initialStylingValues.push(value);
4720
- stylesLookup[prop] = initialStylingValues.length - 1;
4721
- }
4722
- else {
4723
- totalStyleDeclarations++;
4724
- stylesLookup[prop] = 0;
4725
- }
4846
+ setStyle(element, initialStylingValues[i + 0 /* PropOffset */], value, renderer, null);
4726
4847
  }
4727
4848
  }
4728
4849
  }
4729
- // make where the class offsets begin
4730
- context[4 /* ClassOffsetPosition */] = totalStyleDeclarations;
4731
- var initialStaticClasses = onlyProcessSingleClasses ? [] : null;
4732
- if (initialClassDeclarations) {
4733
- var hasPassedDeclarations = false;
4734
- for (var i = 0; i < initialClassDeclarations.length; i++) {
4735
- var v = initialClassDeclarations[i];
4736
- // this flag value marks where the declarations end the initial values begin
4737
- if (v === 1 /* VALUES_MODE */) {
4738
- hasPassedDeclarations = true;
4850
+ }
4851
+ /**
4852
+ * Adds in new binding values to a styling context.
4853
+ *
4854
+ * If a directive value is provided then all provided class/style binding names will
4855
+ * reference the provided directive.
4856
+ *
4857
+ * @param context the existing styling context
4858
+ * @param directiveRef the directive that the new bindings will reference
4859
+ * @param classBindingNames an array of class binding names that will be added to the context
4860
+ * @param styleBindingNames an array of style binding names that will be added to the context
4861
+ * @param styleSanitizer an optional sanitizer that handle all sanitization on for each of
4862
+ * the bindings added to the context. Note that if a directive is provided then the sanitizer
4863
+ * instance will only be active if and when the directive updates the bindings that it owns.
4864
+ */
4865
+ function updateContextWithBindings(context, directiveRef, classBindingNames, styleBindingNames, styleSanitizer, onlyProcessSingleClasses) {
4866
+ if (context[0 /* MasterFlagPosition */] & 32 /* BindingAllocationLocked */)
4867
+ return;
4868
+ // this means the context has already been patched with the directive's bindings
4869
+ var directiveIndex = findOrPatchDirectiveIntoRegistry(context, directiveRef, styleSanitizer);
4870
+ if (directiveIndex === -1) {
4871
+ // this means the directive has already been patched in ... No point in doing anything
4872
+ return;
4873
+ }
4874
+ // there are alot of variables being used below to track where in the context the new
4875
+ // binding values will be placed. Because the context consists of multiple types of
4876
+ // entries (single classes/styles and multi classes/styles) alot of the index positions
4877
+ // need to be computed ahead of time and the context needs to be extended before the values
4878
+ // are inserted in.
4879
+ var singlePropOffsetValues = context[4 /* SinglePropOffsetPositions */];
4880
+ var totalCurrentClassBindings = singlePropOffsetValues[1 /* ClassesCountPosition */];
4881
+ var totalCurrentStyleBindings = singlePropOffsetValues[0 /* StylesCountPosition */];
4882
+ var classesOffset = totalCurrentClassBindings * 4 /* Size */;
4883
+ var stylesOffset = totalCurrentStyleBindings * 4 /* Size */;
4884
+ var singleStylesStartIndex = 9 /* SingleStylesStartPosition */;
4885
+ var singleClassesStartIndex = singleStylesStartIndex + stylesOffset;
4886
+ var multiStylesStartIndex = singleClassesStartIndex + classesOffset;
4887
+ var multiClassesStartIndex = multiStylesStartIndex + stylesOffset;
4888
+ // because we're inserting more bindings into the context, this means that the
4889
+ // binding values need to be referenced the singlePropOffsetValues array so that
4890
+ // the template/directive can easily find them inside of the `elementStyleProp`
4891
+ // and the `elementClassProp` functions without iterating through the entire context.
4892
+ // The first step to setting up these reference points is to mark how many bindings
4893
+ // are being added. Even if these bindings already exist in the context, the directive
4894
+ // or template code will still call them unknowingly. Therefore the total values need
4895
+ // to be registered so that we know how many bindings are assigned to each directive.
4896
+ var currentSinglePropsLength = singlePropOffsetValues.length;
4897
+ singlePropOffsetValues.push(styleBindingNames ? styleBindingNames.length : 0, classBindingNames ? classBindingNames.length : 0);
4898
+ // the code below will check to see if a new style binding already exists in the context
4899
+ // if so then there is no point in inserting it into the context again. Whether or not it
4900
+ // exists the styling offset code will now know exactly where it is
4901
+ var insertionOffset = 0;
4902
+ var filteredStyleBindingNames = [];
4903
+ if (styleBindingNames && styleBindingNames.length) {
4904
+ for (var i_1 = 0; i_1 < styleBindingNames.length; i_1++) {
4905
+ var name_1 = styleBindingNames[i_1];
4906
+ var singlePropIndex = getMatchingBindingIndex(context, name_1, singleStylesStartIndex, singleClassesStartIndex);
4907
+ if (singlePropIndex == -1) {
4908
+ singlePropIndex = singleClassesStartIndex + insertionOffset;
4909
+ insertionOffset += 4 /* Size */;
4910
+ filteredStyleBindingNames.push(name_1);
4911
+ }
4912
+ singlePropOffsetValues.push(singlePropIndex);
4913
+ }
4914
+ }
4915
+ // just like with the style binding loop above, the new class bindings get the same treatment...
4916
+ var filteredClassBindingNames = [];
4917
+ if (classBindingNames && classBindingNames.length) {
4918
+ for (var i_2 = 0; i_2 < classBindingNames.length; i_2++) {
4919
+ var name_2 = classBindingNames[i_2];
4920
+ var singlePropIndex = getMatchingBindingIndex(context, name_2, singleClassesStartIndex, multiStylesStartIndex);
4921
+ if (singlePropIndex == -1) {
4922
+ singlePropIndex = multiStylesStartIndex + insertionOffset;
4923
+ insertionOffset += 4 /* Size */;
4924
+ filteredClassBindingNames.push(name_2);
4739
4925
  }
4740
4926
  else {
4741
- var className = v;
4742
- if (hasPassedDeclarations) {
4743
- var value = initialClassDeclarations[++i];
4744
- initialStylingValues.push(value);
4745
- classesLookup[className] = initialStylingValues.length - 1;
4746
- initialStaticClasses && initialStaticClasses.push(className);
4747
- }
4748
- else {
4749
- classesLookup[className] = 0;
4927
+ singlePropIndex += filteredStyleBindingNames.length * 4 /* Size */;
4928
+ }
4929
+ singlePropOffsetValues.push(singlePropIndex);
4930
+ }
4931
+ }
4932
+ // because new styles are being inserted, this means the existing collection of style offset
4933
+ // index values are incorrect (they point to the wrong values). The code below will run through
4934
+ // the entire offset array and update the existing set of index values to point to their new
4935
+ // locations while taking the new binding values into consideration.
4936
+ var i = 2 /* ValueStartPosition */;
4937
+ if (filteredStyleBindingNames.length) {
4938
+ while (i < currentSinglePropsLength) {
4939
+ var totalStyles = singlePropOffsetValues[i + 0 /* StylesCountPosition */];
4940
+ var totalClasses = singlePropOffsetValues[i + 1 /* ClassesCountPosition */];
4941
+ if (totalClasses) {
4942
+ var start = i + 2 /* ValueStartPosition */ + totalStyles;
4943
+ for (var j = start; j < start + totalClasses; j++) {
4944
+ singlePropOffsetValues[j] += filteredStyleBindingNames.length * 4 /* Size */;
4750
4945
  }
4751
4946
  }
4947
+ var total = totalStyles + totalClasses;
4948
+ i += 2 /* ValueStartPosition */ + total;
4752
4949
  }
4753
4950
  }
4754
- var styleProps = Object.keys(stylesLookup);
4755
- var classNames = Object.keys(classesLookup);
4756
- var classNamesIndexStart = styleProps.length;
4757
- var totalProps = styleProps.length + classNames.length;
4758
- // *2 because we are filling for both single and multi style spaces
4759
- var maxLength = totalProps * 4 /* Size */ * 2 + 8 /* SingleStylesStartPosition */;
4760
- // we need to fill the array from the start so that we can access
4761
- // both the multi and the single array positions in the same loop block
4762
- for (var i = 8 /* SingleStylesStartPosition */; i < maxLength; i++) {
4951
+ var totalNewEntries = filteredClassBindingNames.length + filteredStyleBindingNames.length;
4952
+ // in the event that there are new style values being inserted, all existing class and style
4953
+ // bindings need to have their pointer values offsetted with the new amount of space that is
4954
+ // used for the new style/class bindings.
4955
+ for (var i_3 = singleStylesStartIndex; i_3 < context.length; i_3 += 4 /* Size */) {
4956
+ var isMultiBased = i_3 >= multiStylesStartIndex;
4957
+ var isClassBased = i_3 >= (isMultiBased ? multiClassesStartIndex : singleClassesStartIndex);
4958
+ var flag = getPointers(context, i_3);
4959
+ var staticIndex = getInitialIndex(flag);
4960
+ var singleOrMultiIndex = getMultiOrSingleIndex(flag);
4961
+ if (isMultiBased) {
4962
+ singleOrMultiIndex +=
4963
+ isClassBased ? (filteredStyleBindingNames.length * 4 /* Size */) : 0;
4964
+ }
4965
+ else {
4966
+ singleOrMultiIndex += (totalNewEntries * 4 /* Size */) +
4967
+ ((isClassBased ? filteredStyleBindingNames.length : 0) * 4 /* Size */);
4968
+ }
4969
+ setFlag(context, i_3, pointers(flag, staticIndex, singleOrMultiIndex));
4970
+ }
4971
+ // this is where we make space in the context for the new style bindings
4972
+ for (var i_4 = 0; i_4 < filteredStyleBindingNames.length * 4 /* Size */; i_4++) {
4973
+ context.splice(multiClassesStartIndex, 0, null);
4974
+ context.splice(singleClassesStartIndex, 0, null);
4975
+ singleClassesStartIndex++;
4976
+ multiStylesStartIndex++;
4977
+ multiClassesStartIndex += 2; // both single + multi slots were inserted
4978
+ }
4979
+ // this is where we make space in the context for the new class bindings
4980
+ for (var i_5 = 0; i_5 < filteredClassBindingNames.length * 4 /* Size */; i_5++) {
4981
+ context.splice(multiStylesStartIndex, 0, null);
4763
4982
  context.push(null);
4764
- }
4765
- var singleStart = 8 /* SingleStylesStartPosition */;
4766
- var multiStart = totalProps * 4 /* Size */ + 8 /* SingleStylesStartPosition */;
4767
- // fill single and multi-level styles
4768
- for (var i = 0; i < totalProps; i++) {
4769
- var isClassBased_1 = i >= classNamesIndexStart;
4770
- var prop = isClassBased_1 ? classNames[i - classNamesIndexStart] : styleProps[i];
4771
- var indexForInitial = isClassBased_1 ? classesLookup[prop] : stylesLookup[prop];
4772
- var initialValue = initialStylingValues[indexForInitial];
4773
- var indexForMulti = i * 4 /* Size */ + multiStart;
4774
- var indexForSingle = i * 4 /* Size */ + singleStart;
4775
- var initialFlag = prepareInitialFlag(prop, isClassBased_1, styleSanitizer || null);
4776
- setFlag(context, indexForSingle, pointers(initialFlag, indexForInitial, indexForMulti));
4777
- setProp(context, indexForSingle, prop);
4778
- setValue(context, indexForSingle, null);
4779
- setPlayerBuilderIndex(context, indexForSingle, 0);
4780
- var flagForMulti = initialFlag | (initialValue !== null ? 1 /* Dirty */ : 0 /* None */);
4781
- setFlag(context, indexForMulti, pointers(flagForMulti, indexForInitial, indexForSingle));
4782
- setProp(context, indexForMulti, prop);
4783
- setValue(context, indexForMulti, null);
4784
- setPlayerBuilderIndex(context, indexForMulti, 0);
4785
- }
4983
+ multiStylesStartIndex++;
4984
+ multiClassesStartIndex++;
4985
+ }
4986
+ var initialClasses = context[3 /* InitialClassValuesPosition */];
4987
+ var initialStyles = context[2 /* InitialStyleValuesPosition */];
4988
+ // the code below will insert each new entry into the context and assign the appropriate
4989
+ // flags and index values to them. It's important this runs at the end of this function
4990
+ // because the context, property offset and index values have all been computed just before.
4991
+ for (var i_6 = 0; i_6 < totalNewEntries; i_6++) {
4992
+ var entryIsClassBased = i_6 >= filteredStyleBindingNames.length;
4993
+ var adjustedIndex = entryIsClassBased ? (i_6 - filteredStyleBindingNames.length) : i_6;
4994
+ var propName = entryIsClassBased ? filteredClassBindingNames[adjustedIndex] :
4995
+ filteredStyleBindingNames[adjustedIndex];
4996
+ var multiIndex = void 0, singleIndex = void 0;
4997
+ if (entryIsClassBased) {
4998
+ multiIndex = multiClassesStartIndex +
4999
+ ((totalCurrentClassBindings + adjustedIndex) * 4 /* Size */);
5000
+ singleIndex = singleClassesStartIndex +
5001
+ ((totalCurrentClassBindings + adjustedIndex) * 4 /* Size */);
5002
+ }
5003
+ else {
5004
+ multiIndex =
5005
+ multiStylesStartIndex + ((totalCurrentStyleBindings + adjustedIndex) * 4 /* Size */);
5006
+ singleIndex = singleStylesStartIndex +
5007
+ ((totalCurrentStyleBindings + adjustedIndex) * 4 /* Size */);
5008
+ }
5009
+ // if a property is not found in the initial style values list then it
5010
+ // is ALWAYS added incase a follow-up directive introduces the same initial
5011
+ // style/class value later on.
5012
+ var initialValuesToLookup = entryIsClassBased ? initialClasses : initialStyles;
5013
+ var indexForInitial = getInitialStylingValuesIndexOf(initialValuesToLookup, propName);
5014
+ if (indexForInitial === -1) {
5015
+ indexForInitial = initialValuesToLookup.length + 1 /* ValueOffset */;
5016
+ initialValuesToLookup.push(propName, entryIsClassBased ? false : null);
5017
+ }
5018
+ else {
5019
+ indexForInitial += 1 /* ValueOffset */;
5020
+ }
5021
+ var initialFlag = prepareInitialFlag(context, propName, entryIsClassBased, styleSanitizer || null);
5022
+ setFlag(context, singleIndex, pointers(initialFlag, indexForInitial, multiIndex));
5023
+ setProp(context, singleIndex, propName);
5024
+ setValue(context, singleIndex, null);
5025
+ setPlayerBuilderIndex(context, singleIndex, 0, directiveIndex);
5026
+ setFlag(context, multiIndex, pointers(initialFlag, indexForInitial, singleIndex));
5027
+ setProp(context, multiIndex, propName);
5028
+ setValue(context, multiIndex, null);
5029
+ setPlayerBuilderIndex(context, multiIndex, 0, directiveIndex);
5030
+ }
5031
+ // the total classes/style values are updated so the next time the context is patched
5032
+ // additional style/class bindings from another directive then it knows exactly where
5033
+ // to insert them in the context
5034
+ singlePropOffsetValues[1 /* ClassesCountPosition */] =
5035
+ totalCurrentClassBindings + filteredClassBindingNames.length;
5036
+ singlePropOffsetValues[0 /* StylesCountPosition */] =
5037
+ totalCurrentStyleBindings + filteredStyleBindingNames.length;
4786
5038
  // there is no initial value flag for the master index since it doesn't
4787
5039
  // reference an initial style value
4788
- var masterFlag = pointers(0, 0, multiStart) |
5040
+ var masterFlag = pointers(0, 0, multiStylesStartIndex) |
4789
5041
  (onlyProcessSingleClasses ? 16 /* OnlyProcessSingleClasses */ : 0);
4790
- setFlag(context, 3 /* MasterFlagPosition */, masterFlag);
4791
- setContextDirty(context, initialStylingValues.length > 1);
4792
- if (initialStaticClasses) {
4793
- context[6 /* PreviousOrCachedMultiClassValue */] = initialStaticClasses.join(' ');
5042
+ setFlag(context, 0 /* MasterFlagPosition */, masterFlag);
5043
+ }
5044
+ /**
5045
+ * Searches through the existing registry of directives
5046
+ */
5047
+ function findOrPatchDirectiveIntoRegistry(context, directiveRef, styleSanitizer) {
5048
+ var directiveRefs = context[1 /* DirectiveRegistryPosition */];
5049
+ var nextOffsetInsertionIndex = context[4 /* SinglePropOffsetPositions */].length;
5050
+ var directiveIndex;
5051
+ var detectedIndex = getDirectiveRegistryValuesIndexOf(directiveRefs, directiveRef);
5052
+ if (detectedIndex === -1) {
5053
+ directiveIndex = directiveRefs.length / 4 /* Size */;
5054
+ directiveRefs.push(directiveRef, nextOffsetInsertionIndex, false, styleSanitizer || null);
4794
5055
  }
4795
- return context;
5056
+ else {
5057
+ var singlePropStartPosition = detectedIndex + 1 /* SinglePropValuesIndexOffset */;
5058
+ if (directiveRefs[singlePropStartPosition] >= 0) {
5059
+ // the directive has already been patched into the context
5060
+ return -1;
5061
+ }
5062
+ directiveIndex = detectedIndex / 4 /* Size */;
5063
+ // because the directive already existed this means that it was set during elementHostAttrs or
5064
+ // elementStart which means that the binding values were not here. Therefore, the values below
5065
+ // need to be applied so that single class and style properties can be assigned later.
5066
+ var singlePropPositionIndex = detectedIndex + 1 /* SinglePropValuesIndexOffset */;
5067
+ directiveRefs[singlePropPositionIndex] = nextOffsetInsertionIndex;
5068
+ // the sanitizer is also apart of the binding process and will be used when bindings are
5069
+ // applied.
5070
+ var styleSanitizerIndex = detectedIndex + 3 /* StyleSanitizerOffset */;
5071
+ directiveRefs[styleSanitizerIndex] = styleSanitizer || null;
5072
+ }
5073
+ return directiveIndex;
5074
+ }
5075
+ function getMatchingBindingIndex(context, bindingName, start, end) {
5076
+ for (var j = start; j < end; j += 4 /* Size */) {
5077
+ if (getProp(context, j) === bindingName)
5078
+ return j;
5079
+ }
5080
+ return -1;
4796
5081
  }
4797
5082
  /**
4798
5083
  * Sets and resolves all `multi` styling on an `StylingContext` so that they can be
4799
- * applied to the element once `renderStyleAndClassBindings` is called.
5084
+ * applied to the element once `renderStyling` is called.
4800
5085
  *
4801
5086
  * All missing styles/class (any values that are not provided in the new `styles`
4802
5087
  * or `classes` params) will resolve to `null` within their respective positions
@@ -4807,8 +5092,9 @@ function createStylingContextTemplate(initialClassDeclarations, initialStyleDecl
4807
5092
  * @param classesInput The key/value map of CSS class names that will be used for the update.
4808
5093
  * @param stylesInput The key/value map of CSS styles that will be used for the update.
4809
5094
  */
4810
- function updateStylingMap(context, classesInput, stylesInput) {
5095
+ function updateStylingMap(context, classesInput, stylesInput, directiveRef) {
4811
5096
  stylesInput = stylesInput || null;
5097
+ var directiveIndex = getDirectiveIndexFromRegistry(context, directiveRef || null);
4812
5098
  var element = context[5 /* ElementPosition */];
4813
5099
  var classesPlayerBuilder = classesInput instanceof BoundPlayerFactory ?
4814
5100
  new ClassAndStylePlayerBuilder(classesInput, element, 1 /* Class */) :
@@ -4822,13 +5108,13 @@ function updateStylingMap(context, classesInput, stylesInput) {
4822
5108
  var stylesValue = stylesPlayerBuilder ? stylesInput.value : stylesInput;
4823
5109
  // early exit (this is what's done to avoid using ctx.bind() to cache the value)
4824
5110
  var ignoreAllClassUpdates = limitToSingleClasses(context) || classesValue === NO_CHANGE ||
4825
- classesValue === context[6 /* PreviousOrCachedMultiClassValue */];
4826
- var ignoreAllStyleUpdates = stylesValue === NO_CHANGE || stylesValue === context[7 /* PreviousMultiStyleValue */];
5111
+ classesValue === context[6 /* CachedClassValueOrInitialClassString */];
5112
+ var ignoreAllStyleUpdates = stylesValue === NO_CHANGE || stylesValue === context[7 /* CachedStyleValue */];
4827
5113
  if (ignoreAllClassUpdates && ignoreAllStyleUpdates)
4828
5114
  return;
4829
- context[6 /* PreviousOrCachedMultiClassValue */] = classesValue;
4830
- context[7 /* PreviousMultiStyleValue */] = stylesValue;
4831
- var classNames = EMPTY_ARR;
5115
+ context[6 /* CachedClassValueOrInitialClassString */] = classesValue;
5116
+ context[7 /* CachedStyleValue */] = stylesValue;
5117
+ var classNames = EMPTY_ARRAY;
4832
5118
  var applyAllClasses = false;
4833
5119
  var playerBuildersAreDirty = false;
4834
5120
  var classesPlayerBuilderIndex = classesPlayerBuilder ? 1 /* ClassMapPlayerBuilderPosition */ : 0;
@@ -4851,11 +5137,11 @@ function updateStylingMap(context, classesInput, stylesInput) {
4851
5137
  applyAllClasses = true;
4852
5138
  }
4853
5139
  else {
4854
- classNames = classesValue ? Object.keys(classesValue) : EMPTY_ARR;
5140
+ classNames = classesValue ? Object.keys(classesValue) : EMPTY_ARRAY;
4855
5141
  }
4856
5142
  }
4857
5143
  var classes = (classesValue || EMPTY_OBJ);
4858
- var styleProps = stylesValue ? Object.keys(stylesValue) : EMPTY_ARR;
5144
+ var styleProps = stylesValue ? Object.keys(stylesValue) : EMPTY_ARRAY;
4859
5145
  var styles = stylesValue || EMPTY_OBJ;
4860
5146
  var classesStartIndex = styleProps.length;
4861
5147
  var multiStartIndex = getMultiStartIndex(context);
@@ -4867,27 +5153,31 @@ function updateStylingMap(context, classesInput, stylesInput) {
4867
5153
  // styles differ with respect to the context. Later if the context/styles/classes
4868
5154
  // are off-balance then they will be dealt in another loop after this one
4869
5155
  while (ctxIndex < context.length && propIndex < propLimit) {
4870
- var isClassBased_2 = propIndex >= classesStartIndex;
4871
- var processValue = (!isClassBased_2 && !ignoreAllStyleUpdates) || (isClassBased_2 && !ignoreAllClassUpdates);
5156
+ var isClassBased = propIndex >= classesStartIndex;
5157
+ var processValue = (!isClassBased && !ignoreAllStyleUpdates) || (isClassBased && !ignoreAllClassUpdates);
4872
5158
  // when there is a cache-hit for a string-based class then we should
4873
5159
  // avoid doing any work diffing any of the changes
4874
5160
  if (processValue) {
4875
- var adjustedPropIndex = isClassBased_2 ? propIndex - classesStartIndex : propIndex;
4876
- var newProp = isClassBased_2 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
4877
- var newValue = isClassBased_2 ? (applyAllClasses ? true : classes[newProp]) : styles[newProp];
4878
- var playerBuilderIndex = isClassBased_2 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
5161
+ var adjustedPropIndex = isClassBased ? propIndex - classesStartIndex : propIndex;
5162
+ var newProp = isClassBased ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
5163
+ var newValue = isClassBased ? (applyAllClasses ? true : classes[newProp]) : styles[newProp];
5164
+ var playerBuilderIndex = isClassBased ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
4879
5165
  var prop = getProp(context, ctxIndex);
4880
5166
  if (prop === newProp) {
4881
5167
  var value = getValue(context, ctxIndex);
4882
5168
  var flag = getPointers(context, ctxIndex);
4883
- setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex);
5169
+ setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);
4884
5170
  if (hasValueChanged(flag, value, newValue)) {
4885
5171
  setValue(context, ctxIndex, newValue);
4886
5172
  playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
4887
5173
  var initialValue = getInitialValue(context, flag);
4888
- // there is no point in setting this to dirty if the previously
4889
- // rendered value was being referenced by the initial style (or null)
4890
- if (hasValueChanged(flag, initialValue, newValue)) {
5174
+ // SKIP IF INITIAL CHECK
5175
+ // If the former `value` is `null` then it means that an initial value
5176
+ // could be being rendered on screen. If that is the case then there is
5177
+ // no point in updating the value incase it matches. In other words if the
5178
+ // new value is the exact same as the previously rendered value (which
5179
+ // happens to be the initial value) then do nothing.
5180
+ if (value != null || hasValueChanged(flag, initialValue, newValue)) {
4891
5181
  setDirty(context, ctxIndex, true);
4892
5182
  dirty = true;
4893
5183
  }
@@ -4903,7 +5193,8 @@ function updateStylingMap(context, classesInput, stylesInput) {
4903
5193
  if (hasValueChanged(flagToCompare, valueToCompare, newValue)) {
4904
5194
  var initialValue = getInitialValue(context, flagToCompare);
4905
5195
  setValue(context, ctxIndex, newValue);
4906
- if (hasValueChanged(flagToCompare, initialValue, newValue)) {
5196
+ // same if statement logic as above (look for SKIP IF INITIAL CHECK).
5197
+ if (valueToCompare != null || hasValueChanged(flagToCompare, initialValue, newValue)) {
4907
5198
  setDirty(context, ctxIndex, true);
4908
5199
  playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
4909
5200
  dirty = true;
@@ -4912,9 +5203,9 @@ function updateStylingMap(context, classesInput, stylesInput) {
4912
5203
  }
4913
5204
  else {
4914
5205
  // we only care to do this if the insertion is in the middle
4915
- var newFlag = prepareInitialFlag(newProp, isClassBased_2, getStyleSanitizer(context));
5206
+ var newFlag = prepareInitialFlag(context, newProp, isClassBased, getStyleSanitizer(context, directiveIndex));
4916
5207
  playerBuildersAreDirty = playerBuildersAreDirty || !!playerBuilderIndex;
4917
- insertNewMultiProperty(context, ctxIndex, isClassBased_2, newProp, newFlag, newValue, playerBuilderIndex);
5208
+ insertNewMultiProperty(context, ctxIndex, isClassBased, newProp, newFlag, newValue, directiveIndex, playerBuilderIndex);
4918
5209
  dirty = true;
4919
5210
  }
4920
5211
  }
@@ -4927,19 +5218,19 @@ function updateStylingMap(context, classesInput, stylesInput) {
4927
5218
  // case the goal is to "remove" them from the context (by nullifying)
4928
5219
  while (ctxIndex < context.length) {
4929
5220
  var flag = getPointers(context, ctxIndex);
4930
- var isClassBased_3 = (flag & 2 /* Class */) === 2 /* Class */;
4931
- var processValue = (!isClassBased_3 && !ignoreAllStyleUpdates) || (isClassBased_3 && !ignoreAllClassUpdates);
5221
+ var isClassBased = (flag & 2 /* Class */) === 2 /* Class */;
5222
+ var processValue = (!isClassBased && !ignoreAllStyleUpdates) || (isClassBased && !ignoreAllClassUpdates);
4932
5223
  if (processValue) {
4933
5224
  var value = getValue(context, ctxIndex);
4934
- var doRemoveValue = valueExists(value, isClassBased_3);
5225
+ var doRemoveValue = valueExists(value, isClassBased);
4935
5226
  if (doRemoveValue) {
4936
5227
  setDirty(context, ctxIndex, true);
4937
5228
  setValue(context, ctxIndex, null);
4938
5229
  // we keep the player factory the same so that the `nulled` value can
4939
5230
  // be instructed into the player because removing a style and/or a class
4940
5231
  // is a valid animation player instruction.
4941
- var playerBuilderIndex = isClassBased_3 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
4942
- setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex);
5232
+ var playerBuilderIndex = isClassBased ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
5233
+ setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);
4943
5234
  dirty = true;
4944
5235
  }
4945
5236
  }
@@ -4948,31 +5239,46 @@ function updateStylingMap(context, classesInput, stylesInput) {
4948
5239
  // this means that there are left-over properties in the context that
4949
5240
  // were not detected in the context during the loop above. In that
4950
5241
  // case we want to add the new entries into the list
4951
- var sanitizer = getStyleSanitizer(context);
5242
+ var sanitizer = getStyleSanitizer(context, directiveIndex);
4952
5243
  while (propIndex < propLimit) {
4953
- var isClassBased_4 = propIndex >= classesStartIndex;
4954
- var processValue = (!isClassBased_4 && !ignoreAllStyleUpdates) || (isClassBased_4 && !ignoreAllClassUpdates);
5244
+ var isClassBased = propIndex >= classesStartIndex;
5245
+ var processValue = (!isClassBased && !ignoreAllStyleUpdates) || (isClassBased && !ignoreAllClassUpdates);
4955
5246
  if (processValue) {
4956
- var adjustedPropIndex = isClassBased_4 ? propIndex - classesStartIndex : propIndex;
4957
- var prop = isClassBased_4 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
4958
- var value = isClassBased_4 ? (applyAllClasses ? true : classes[prop]) : styles[prop];
4959
- var flag = prepareInitialFlag(prop, isClassBased_4, sanitizer) | 1 /* Dirty */;
4960
- var playerBuilderIndex = isClassBased_4 ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
4961
- context.push(flag, prop, value, playerBuilderIndex);
5247
+ var adjustedPropIndex = isClassBased ? propIndex - classesStartIndex : propIndex;
5248
+ var prop = isClassBased ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];
5249
+ var value = isClassBased ? (applyAllClasses ? true : classes[prop]) : styles[prop];
5250
+ var flag = prepareInitialFlag(context, prop, isClassBased, sanitizer) | 1 /* Dirty */;
5251
+ var playerBuilderIndex = isClassBased ? classesPlayerBuilderIndex : stylesPlayerBuilderIndex;
5252
+ var ctxIndex_1 = context.length;
5253
+ context.push(flag, prop, value, 0);
5254
+ setPlayerBuilderIndex(context, ctxIndex_1, playerBuilderIndex, directiveIndex);
4962
5255
  dirty = true;
4963
5256
  }
4964
5257
  propIndex++;
4965
5258
  }
4966
5259
  if (dirty) {
4967
5260
  setContextDirty(context, true);
5261
+ setDirectiveDirty(context, directiveIndex, true);
4968
5262
  }
4969
5263
  if (playerBuildersAreDirty) {
4970
5264
  setContextPlayersDirty(context, true);
4971
5265
  }
4972
5266
  }
4973
5267
  /**
4974
- * Sets and resolves a single styling property/value on the provided `StylingContext` so
4975
- * that they can be applied to the element once `renderStyleAndClassBindings` is called.
5268
+ * This method will toggle the referenced CSS class (by the provided index)
5269
+ * within the given context.
5270
+ *
5271
+ * @param context The styling context that will be updated with the
5272
+ * newly provided class value.
5273
+ * @param offset The index of the CSS class which is being updated.
5274
+ * @param addOrRemove Whether or not to add or remove the CSS class
5275
+ */
5276
+ function updateClassProp(context, offset, addOrRemove, directiveRef) {
5277
+ _updateSingleStylingValue(context, offset, addOrRemove, true, directiveRef);
5278
+ }
5279
+ /**
5280
+ * Sets and resolves a single style value on the provided `StylingContext` so
5281
+ * that they can be applied to the element once `renderStyling` is called.
4976
5282
  *
4977
5283
  * Note that prop-level styling values are considered higher priority than any styling that
4978
5284
  * has been applied using `updateStylingMap`, therefore, when styling values are rendered
@@ -4981,20 +5287,29 @@ function updateStylingMap(context, classesInput, stylesInput) {
4981
5287
  *
4982
5288
  * @param context The styling context that will be updated with the
4983
5289
  * newly provided style value.
4984
- * @param index The index of the property which is being updated.
5290
+ * @param offset The index of the property which is being updated.
4985
5291
  * @param value The CSS style value that will be assigned
5292
+ * @param directiveRef an optional reference to the directive responsible
5293
+ * for this binding change. If present then style binding will only
5294
+ * actualize if the directive has ownership over this binding
5295
+ * (see styling.ts#directives for more information about the algorithm).
4986
5296
  */
4987
- function updateStyleProp(context, index, input) {
4988
- var singleIndex = 8 /* SingleStylesStartPosition */ + index * 4 /* Size */;
5297
+ function updateStyleProp(context, offset, input, directiveRef) {
5298
+ _updateSingleStylingValue(context, offset, input, false, directiveRef);
5299
+ }
5300
+ function _updateSingleStylingValue(context, offset, input, isClassBased, directiveRef) {
5301
+ var directiveIndex = getDirectiveIndexFromRegistry(context, directiveRef || null);
5302
+ var singleIndex = getSinglePropIndexValue(context, directiveIndex, offset, isClassBased);
4989
5303
  var currValue = getValue(context, singleIndex);
4990
5304
  var currFlag = getPointers(context, singleIndex);
5305
+ var currDirective = getDirectiveIndexFromEntry(context, singleIndex);
4991
5306
  var value = (input instanceof BoundPlayerFactory) ? input.value : input;
4992
- // didn't change ... nothing to make a note of
4993
- if (hasValueChanged(currFlag, currValue, value)) {
4994
- var isClassBased_5 = (currFlag & 2 /* Class */) === 2 /* Class */;
5307
+ if (hasValueChanged(currFlag, currValue, value) &&
5308
+ allowValueChange(currValue, value, currDirective, directiveIndex)) {
5309
+ var isClassBased_1 = (currFlag & 2 /* Class */) === 2 /* Class */;
4995
5310
  var element = context[5 /* ElementPosition */];
4996
5311
  var playerBuilder = input instanceof BoundPlayerFactory ?
4997
- new ClassAndStylePlayerBuilder(input, element, isClassBased_5 ? 1 /* Class */ : 2 /* Style */) :
5312
+ new ClassAndStylePlayerBuilder(input, element, isClassBased_1 ? 1 /* Class */ : 2 /* Style */) :
4998
5313
  null;
4999
5314
  var value_1 = (playerBuilder ? input.value : input);
5000
5315
  var currPlayerIndex = getPlayerBuilderIndex(context, singleIndex);
@@ -5003,9 +5318,16 @@ function updateStyleProp(context, index, input) {
5003
5318
  if (hasPlayerBuilderChanged(context, playerBuilder, currPlayerIndex)) {
5004
5319
  var newIndex = setPlayerBuilder(context, playerBuilder, currPlayerIndex);
5005
5320
  playerBuilderIndex = playerBuilder ? newIndex : 0;
5006
- setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex);
5007
5321
  playerBuildersAreDirty = true;
5008
5322
  }
5323
+ if (playerBuildersAreDirty || currDirective !== directiveIndex) {
5324
+ setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex, directiveIndex);
5325
+ }
5326
+ if (currDirective !== directiveIndex) {
5327
+ var prop = getProp(context, singleIndex);
5328
+ var sanitizer = getStyleSanitizer(context, directiveIndex);
5329
+ setSanitizeFlag(context, singleIndex, (sanitizer && sanitizer(prop)) ? true : false);
5330
+ }
5009
5331
  // the value will always get updated (even if the dirty flag is skipped)
5010
5332
  setValue(context, singleIndex, value_1);
5011
5333
  var indexForMulti = getMultiOrSingleIndex(currFlag);
@@ -5015,12 +5337,13 @@ function updateStyleProp(context, index, input) {
5015
5337
  var multiDirty = false;
5016
5338
  var singleDirty = true;
5017
5339
  // only when the value is set to `null` should the multi-value get flagged
5018
- if (!valueExists(value_1, isClassBased_5) && valueExists(valueForMulti, isClassBased_5)) {
5340
+ if (!valueExists(value_1, isClassBased_1) && valueExists(valueForMulti, isClassBased_1)) {
5019
5341
  multiDirty = true;
5020
5342
  singleDirty = false;
5021
5343
  }
5022
5344
  setDirty(context, indexForMulti, multiDirty);
5023
5345
  setDirty(context, singleIndex, singleDirty);
5346
+ setDirectiveDirty(context, directiveIndex, true);
5024
5347
  setContextDirty(context, true);
5025
5348
  }
5026
5349
  if (playerBuildersAreDirty) {
@@ -5028,19 +5351,6 @@ function updateStyleProp(context, index, input) {
5028
5351
  }
5029
5352
  }
5030
5353
  }
5031
- /**
5032
- * This method will toggle the referenced CSS class (by the provided index)
5033
- * within the given context.
5034
- *
5035
- * @param context The styling context that will be updated with the
5036
- * newly provided class value.
5037
- * @param index The index of the CSS class which is being updated.
5038
- * @param addOrRemove Whether or not to add or remove the CSS class
5039
- */
5040
- function updateClassProp(context, index, addOrRemove) {
5041
- var adjustedIndex = index + context[4 /* ClassOffsetPosition */];
5042
- updateStyleProp(context, adjustedIndex, addOrRemove);
5043
- }
5044
5354
  /**
5045
5355
  * Renders all queued styling using a renderer onto the given element.
5046
5356
  *
@@ -5058,31 +5368,41 @@ function updateClassProp(context, index, addOrRemove) {
5058
5368
  * to this key/value map instead of being renderered via the renderer.
5059
5369
  * @param stylesStore if provided, the updated style values will be applied
5060
5370
  * to this key/value map instead of being renderered via the renderer.
5371
+ * @param directiveRef an optional directive that will be used to target which
5372
+ * styling values are rendered. If left empty, only the bindings that are
5373
+ * registered on the template will be rendered.
5061
5374
  * @returns number the total amount of players that got queued for animation (if any)
5062
5375
  */
5063
- function renderStyleAndClassBindings(context, renderer, rootOrView, isFirstRender, classesStore, stylesStore) {
5376
+ function renderStyling(context, renderer, rootOrView, isFirstRender, classesStore, stylesStore, directiveRef) {
5064
5377
  var totalPlayersQueued = 0;
5065
- if (isContextDirty(context)) {
5066
- var flushPlayerBuilders = context[3 /* MasterFlagPosition */] & 8 /* PlayerBuildersDirty */;
5378
+ var targetDirectiveIndex = getDirectiveIndexFromRegistry(context, directiveRef || null);
5379
+ if (isContextDirty(context) && isDirectiveDirty(context, targetDirectiveIndex)) {
5380
+ var flushPlayerBuilders = context[0 /* MasterFlagPosition */] & 8 /* PlayerBuildersDirty */;
5067
5381
  var native = context[5 /* ElementPosition */];
5068
5382
  var multiStartIndex = getMultiStartIndex(context);
5069
- var styleSanitizer = getStyleSanitizer(context);
5070
5383
  var onlySingleClasses = limitToSingleClasses(context);
5071
- for (var i = 8 /* SingleStylesStartPosition */; i < context.length; i += 4 /* Size */) {
5384
+ var stillDirty = false;
5385
+ for (var i = 9 /* SingleStylesStartPosition */; i < context.length; i += 4 /* Size */) {
5072
5386
  // there is no point in rendering styles that have not changed on screen
5073
5387
  if (isDirty(context, i)) {
5388
+ var flag = getPointers(context, i);
5389
+ var directiveIndex = getDirectiveIndexFromEntry(context, i);
5390
+ if (targetDirectiveIndex !== directiveIndex) {
5391
+ stillDirty = true;
5392
+ continue;
5393
+ }
5074
5394
  var prop = getProp(context, i);
5075
5395
  var value = getValue(context, i);
5076
- var flag = getPointers(context, i);
5396
+ var styleSanitizer = (flag & 4 /* Sanitize */) ? getStyleSanitizer(context, directiveIndex) : null;
5077
5397
  var playerBuilder = getPlayerBuilder(context, i);
5078
- var isClassBased_6 = flag & 2 /* Class */ ? true : false;
5398
+ var isClassBased = flag & 2 /* Class */ ? true : false;
5079
5399
  var isInSingleRegion = i < multiStartIndex;
5080
- var readInitialValue = !isClassBased_6 || !onlySingleClasses;
5400
+ var readInitialValue = !isClassBased || !onlySingleClasses;
5081
5401
  var valueToApply = value;
5082
5402
  // VALUE DEFER CASE 1: Use a multi value instead of a null single value
5083
5403
  // this check implies that a single value was removed and we
5084
5404
  // should now defer to a multi value and use that (if set).
5085
- if (isInSingleRegion && !valueExists(valueToApply, isClassBased_6)) {
5405
+ if (isInSingleRegion && !valueExists(valueToApply, isClassBased)) {
5086
5406
  // single values ALWAYS have a reference to a multi index
5087
5407
  var multiIndex = getMultiOrSingleIndex(flag);
5088
5408
  valueToApply = getValue(context, multiIndex);
@@ -5093,7 +5413,9 @@ function renderStyleAndClassBindings(context, renderer, rootOrView, isFirstRende
5093
5413
  // note that this should always be a falsy check since `false` is used
5094
5414
  // for both class and style comparisons (styles can't be false and false
5095
5415
  // classes are turned off and should therefore defer to their initial values)
5096
- if (!valueExists(valueToApply, isClassBased_6) && readInitialValue) {
5416
+ // Note that we ignore class-based deferals because otherwise a class can never
5417
+ // be removed in the case that it exists as true in the initial classes list...
5418
+ if (!isClassBased && !valueExists(valueToApply, isClassBased) && readInitialValue) {
5097
5419
  valueToApply = getInitialValue(context, flag);
5098
5420
  }
5099
5421
  // if the first render is true then we do not want to start applying falsy
@@ -5102,12 +5424,11 @@ function renderStyleAndClassBindings(context, renderer, rootOrView, isFirstRende
5102
5424
  // was truthy before.
5103
5425
  var doApplyValue = isFirstRender ? valueToApply : true;
5104
5426
  if (doApplyValue) {
5105
- if (isClassBased_6) {
5427
+ if (isClassBased) {
5106
5428
  setClass(native, prop, valueToApply ? true : false, renderer, classesStore, playerBuilder);
5107
5429
  }
5108
5430
  else {
5109
- var sanitizer = (flag & 4 /* Sanitize */) ? styleSanitizer : null;
5110
- setStyle(native, prop, valueToApply, renderer, sanitizer, stylesStore, playerBuilder);
5431
+ setStyle(native, prop, valueToApply, renderer, styleSanitizer, stylesStore, playerBuilder);
5111
5432
  }
5112
5433
  }
5113
5434
  setDirty(context, i, false);
@@ -5141,7 +5462,8 @@ function renderStyleAndClassBindings(context, renderer, rootOrView, isFirstRende
5141
5462
  }
5142
5463
  setContextPlayersDirty(context, false);
5143
5464
  }
5144
- setContextDirty(context, false);
5465
+ setDirectiveDirty(context, targetDirectiveIndex, false);
5466
+ setContextDirty(context, stillDirty);
5145
5467
  }
5146
5468
  return totalPlayersQueued;
5147
5469
  }
@@ -5168,6 +5490,8 @@ function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder
5168
5490
  }
5169
5491
  }
5170
5492
  else if (value) {
5493
+ value = value.toString(); // opacity, z-index and flexbox all have number values which may not
5494
+ // assign as numbers
5171
5495
  ngDevMode && ngDevMode.rendererSetStyle++;
5172
5496
  isProceduralRenderer(renderer) ?
5173
5497
  renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :
@@ -5212,8 +5536,16 @@ function setClass(native, className, add, renderer, store, playerBuilder) {
5212
5536
  native['classList'].remove(className);
5213
5537
  }
5214
5538
  }
5539
+ function setSanitizeFlag(context, index, sanitizeYes) {
5540
+ if (sanitizeYes) {
5541
+ context[index] |= 4 /* Sanitize */;
5542
+ }
5543
+ else {
5544
+ context[index] &= ~4 /* Sanitize */;
5545
+ }
5546
+ }
5215
5547
  function setDirty(context, index, isDirtyYes) {
5216
- var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5548
+ var adjustedIndex = index >= 9 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5217
5549
  if (isDirtyYes) {
5218
5550
  context[adjustedIndex] |= 1 /* Dirty */;
5219
5551
  }
@@ -5222,37 +5554,37 @@ function setDirty(context, index, isDirtyYes) {
5222
5554
  }
5223
5555
  }
5224
5556
  function isDirty(context, index) {
5225
- var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5557
+ var adjustedIndex = index >= 9 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5226
5558
  return (context[adjustedIndex] & 1 /* Dirty */) == 1 /* Dirty */;
5227
5559
  }
5228
- function isClassBased(context, index) {
5229
- var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5560
+ function isClassBasedValue(context, index) {
5561
+ var adjustedIndex = index >= 9 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5230
5562
  return (context[adjustedIndex] & 2 /* Class */) == 2 /* Class */;
5231
5563
  }
5232
5564
  function isSanitizable(context, index) {
5233
- var adjustedIndex = index >= 8 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5565
+ var adjustedIndex = index >= 9 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;
5234
5566
  return (context[adjustedIndex] & 4 /* Sanitize */) == 4 /* Sanitize */;
5235
5567
  }
5236
5568
  function pointers(configFlag, staticIndex, dynamicIndex) {
5237
- return (configFlag & 31 /* BitMask */) | (staticIndex << 5 /* BitCountSize */) |
5238
- (dynamicIndex << (14 /* BitCountSize */ + 5 /* BitCountSize */));
5569
+ return (configFlag & 63 /* BitMask */) | (staticIndex << 6 /* BitCountSize */) |
5570
+ (dynamicIndex << (14 /* BitCountSize */ + 6 /* BitCountSize */));
5239
5571
  }
5240
5572
  function getInitialValue(context, flag) {
5241
5573
  var index = getInitialIndex(flag);
5242
- return context[2 /* InitialStylesPosition */][index];
5574
+ var entryIsClassBased = flag & 2 /* Class */;
5575
+ var initialValues = entryIsClassBased ? context[3 /* InitialClassValuesPosition */] :
5576
+ context[2 /* InitialStyleValuesPosition */];
5577
+ return initialValues[index];
5243
5578
  }
5244
5579
  function getInitialIndex(flag) {
5245
- return (flag >> 5 /* BitCountSize */) & 16383 /* BitMask */;
5580
+ return (flag >> 6 /* BitCountSize */) & 16383 /* BitMask */;
5246
5581
  }
5247
5582
  function getMultiOrSingleIndex(flag) {
5248
- var index = (flag >> (14 /* BitCountSize */ + 5 /* BitCountSize */)) & 16383 /* BitMask */;
5249
- return index >= 8 /* SingleStylesStartPosition */ ? index : -1;
5583
+ var index = (flag >> (14 /* BitCountSize */ + 6 /* BitCountSize */)) & 16383 /* BitMask */;
5584
+ return index >= 9 /* SingleStylesStartPosition */ ? index : -1;
5250
5585
  }
5251
5586
  function getMultiStartIndex(context) {
5252
- return getMultiOrSingleIndex(context[3 /* MasterFlagPosition */]);
5253
- }
5254
- function getStyleSanitizer(context) {
5255
- return context[1 /* StyleSanitizerPosition */];
5587
+ return getMultiOrSingleIndex(context[0 /* MasterFlagPosition */]);
5256
5588
  }
5257
5589
  function setProp(context, index, prop) {
5258
5590
  context[index + 1 /* PropertyOffset */] = prop;
@@ -5261,7 +5593,7 @@ function setValue(context, index, value) {
5261
5593
  context[index + 2 /* ValueOffset */] = value;
5262
5594
  }
5263
5595
  function hasPlayerBuilderChanged(context, builder, index) {
5264
- var playerContext = context[0 /* PlayerContext */];
5596
+ var playerContext = context[8 /* PlayerContext */];
5265
5597
  if (builder) {
5266
5598
  if (!playerContext || index === 0) {
5267
5599
  return true;
@@ -5273,7 +5605,7 @@ function hasPlayerBuilderChanged(context, builder, index) {
5273
5605
  return playerContext[index] !== builder;
5274
5606
  }
5275
5607
  function setPlayerBuilder(context, builder, insertionIndex) {
5276
- var playerContext = context[0 /* PlayerContext */] || allocPlayerContext(context);
5608
+ var playerContext = context[8 /* PlayerContext */] || allocPlayerContext(context);
5277
5609
  if (insertionIndex > 0) {
5278
5610
  playerContext[insertionIndex] = builder;
5279
5611
  }
@@ -5285,16 +5617,23 @@ function setPlayerBuilder(context, builder, insertionIndex) {
5285
5617
  }
5286
5618
  return insertionIndex;
5287
5619
  }
5288
- function setPlayerBuilderIndex(context, index, playerBuilderIndex) {
5289
- context[index + 3 /* PlayerBuilderIndexOffset */] = playerBuilderIndex;
5620
+ function directiveOwnerPointers(directiveIndex, playerIndex) {
5621
+ return (playerIndex << 16 /* BitCountSize */) | directiveIndex;
5622
+ }
5623
+ function setPlayerBuilderIndex(context, index, playerBuilderIndex, directiveIndex) {
5624
+ var value = directiveOwnerPointers(directiveIndex, playerBuilderIndex);
5625
+ context[index + 3 /* PlayerBuilderIndexOffset */] = value;
5290
5626
  }
5291
5627
  function getPlayerBuilderIndex(context, index) {
5292
- return context[index + 3 /* PlayerBuilderIndexOffset */] || 0;
5628
+ var flag = context[index + 3 /* PlayerBuilderIndexOffset */];
5629
+ var playerBuilderIndex = (flag >> 16 /* BitCountSize */) &
5630
+ 65535 /* BitMask */;
5631
+ return playerBuilderIndex;
5293
5632
  }
5294
5633
  function getPlayerBuilder(context, index) {
5295
5634
  var playerBuilderIndex = getPlayerBuilderIndex(context, index);
5296
5635
  if (playerBuilderIndex) {
5297
- var playerContext = context[0 /* PlayerContext */];
5636
+ var playerContext = context[8 /* PlayerContext */];
5298
5637
  if (playerContext) {
5299
5638
  return playerContext[playerBuilderIndex];
5300
5639
  }
@@ -5302,11 +5641,11 @@ function getPlayerBuilder(context, index) {
5302
5641
  return null;
5303
5642
  }
5304
5643
  function setFlag(context, index, flag) {
5305
- var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
5644
+ var adjustedIndex = index === 0 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
5306
5645
  context[adjustedIndex] = flag;
5307
5646
  }
5308
5647
  function getPointers(context, index) {
5309
- var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
5648
+ var adjustedIndex = index === 0 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);
5310
5649
  return context[adjustedIndex];
5311
5650
  }
5312
5651
  function getValue(context, index) {
@@ -5316,20 +5655,20 @@ function getProp(context, index) {
5316
5655
  return context[index + 1 /* PropertyOffset */];
5317
5656
  }
5318
5657
  function isContextDirty(context) {
5319
- return isDirty(context, 3 /* MasterFlagPosition */);
5658
+ return isDirty(context, 0 /* MasterFlagPosition */);
5320
5659
  }
5321
5660
  function limitToSingleClasses(context) {
5322
- return context[3 /* MasterFlagPosition */] & 16 /* OnlyProcessSingleClasses */;
5661
+ return context[0 /* MasterFlagPosition */] & 16 /* OnlyProcessSingleClasses */;
5323
5662
  }
5324
5663
  function setContextDirty(context, isDirtyYes) {
5325
- setDirty(context, 3 /* MasterFlagPosition */, isDirtyYes);
5664
+ setDirty(context, 0 /* MasterFlagPosition */, isDirtyYes);
5326
5665
  }
5327
5666
  function setContextPlayersDirty(context, isDirtyYes) {
5328
5667
  if (isDirtyYes) {
5329
- context[3 /* MasterFlagPosition */] |= 8 /* PlayerBuildersDirty */;
5668
+ context[0 /* MasterFlagPosition */] |= 8 /* PlayerBuildersDirty */;
5330
5669
  }
5331
5670
  else {
5332
- context[3 /* MasterFlagPosition */] &= ~8 /* PlayerBuildersDirty */;
5671
+ context[0 /* MasterFlagPosition */] &= ~8 /* PlayerBuildersDirty */;
5333
5672
  }
5334
5673
  }
5335
5674
  function findEntryPositionByProp(context, prop, startIndex) {
@@ -5363,11 +5702,13 @@ function swapMultiContextEntries(context, indexA, indexB) {
5363
5702
  setValue(context, indexA, getValue(context, indexB));
5364
5703
  setProp(context, indexA, getProp(context, indexB));
5365
5704
  setFlag(context, indexA, getPointers(context, indexB));
5366
- setPlayerBuilderIndex(context, indexA, getPlayerBuilderIndex(context, indexB));
5705
+ var playerIndexA = getPlayerBuilderIndex(context, indexB);
5706
+ var directiveIndexA = 0;
5707
+ setPlayerBuilderIndex(context, indexA, playerIndexA, directiveIndexA);
5367
5708
  setValue(context, indexB, tmpValue);
5368
5709
  setProp(context, indexB, tmpProp);
5369
5710
  setFlag(context, indexB, tmpFlag);
5370
- setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex);
5711
+ setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex, directiveIndexA);
5371
5712
  }
5372
5713
  function updateSinglePointerValues(context, indexStartPosition) {
5373
5714
  for (var i = indexStartPosition; i < context.length; i += 4 /* Size */) {
@@ -5377,17 +5718,18 @@ function updateSinglePointerValues(context, indexStartPosition) {
5377
5718
  var singleFlag = getPointers(context, singleIndex);
5378
5719
  var initialIndexForSingle = getInitialIndex(singleFlag);
5379
5720
  var flagValue = (isDirty(context, singleIndex) ? 1 /* Dirty */ : 0 /* None */) |
5380
- (isClassBased(context, singleIndex) ? 2 /* Class */ : 0 /* None */) |
5721
+ (isClassBasedValue(context, singleIndex) ? 2 /* Class */ : 0 /* None */) |
5381
5722
  (isSanitizable(context, singleIndex) ? 4 /* Sanitize */ : 0 /* None */);
5382
5723
  var updatedFlag = pointers(flagValue, initialIndexForSingle, i);
5383
5724
  setFlag(context, singleIndex, updatedFlag);
5384
5725
  }
5385
5726
  }
5386
5727
  }
5387
- function insertNewMultiProperty(context, index, classBased, name, flag, value, playerIndex) {
5728
+ function insertNewMultiProperty(context, index, classBased, name, flag, value, directiveIndex, playerIndex) {
5388
5729
  var doShift = index < context.length;
5389
5730
  // prop does not exist in the list, add it in
5390
- context.splice(index, 0, flag | 1 /* Dirty */ | (classBased ? 2 /* Class */ : 0 /* None */), name, value, playerIndex);
5731
+ context.splice(index, 0, flag | 1 /* Dirty */ | (classBased ? 2 /* Class */ : 0 /* None */), name, value, 0);
5732
+ setPlayerBuilderIndex(context, index, playerIndex, directiveIndex);
5391
5733
  if (doShift) {
5392
5734
  // because the value was inserted midway into the array then we
5393
5735
  // need to update all the shifted multi values' single value
@@ -5401,14 +5743,20 @@ function valueExists(value, isClassBased) {
5401
5743
  }
5402
5744
  return value !== null;
5403
5745
  }
5404
- function prepareInitialFlag(name, isClassBased, sanitizer) {
5405
- if (isClassBased) {
5406
- return 2 /* Class */;
5746
+ function prepareInitialFlag(context, prop, entryIsClassBased, sanitizer) {
5747
+ var flag = (sanitizer && sanitizer(prop)) ? 4 /* Sanitize */ : 0 /* None */;
5748
+ var initialIndex;
5749
+ if (entryIsClassBased) {
5750
+ flag |= 2 /* Class */;
5751
+ initialIndex =
5752
+ getInitialStylingValuesIndexOf(context[3 /* InitialClassValuesPosition */], prop);
5407
5753
  }
5408
- else if (sanitizer && sanitizer(name)) {
5409
- return 4 /* Sanitize */;
5754
+ else {
5755
+ initialIndex =
5756
+ getInitialStylingValuesIndexOf(context[2 /* InitialStyleValuesPosition */], prop);
5410
5757
  }
5411
- return 0 /* None */;
5758
+ initialIndex = initialIndex > 0 ? (initialIndex + 1 /* ValueOffset */) : 0;
5759
+ return pointers(flag, initialIndex, 0);
5412
5760
  }
5413
5761
  function hasValueChanged(flag, a, b) {
5414
5762
  var isClassBased = flag & 2 /* Class */;
@@ -5452,6 +5800,108 @@ var ClassAndStylePlayerBuilder = /** @class */ (function () {
5452
5800
  };
5453
5801
  return ClassAndStylePlayerBuilder;
5454
5802
  }());
5803
+ function getDirectiveIndexFromEntry(context, index) {
5804
+ var value = context[index + 3 /* PlayerBuilderIndexOffset */];
5805
+ return value & 65535 /* BitMask */;
5806
+ }
5807
+ function getDirectiveIndexFromRegistry(context, directive) {
5808
+ var index = getDirectiveRegistryValuesIndexOf(context[1 /* DirectiveRegistryPosition */], directive);
5809
+ ngDevMode &&
5810
+ assertNotEqual(index, -1, "The provided directive " + directive + " has not been allocated to the element's style/class bindings");
5811
+ return index > 0 ? index / 4 /* Size */ : 0;
5812
+ // return index / DirectiveRegistryValuesIndex.Size;
5813
+ }
5814
+ function getDirectiveRegistryValuesIndexOf(directives, directive) {
5815
+ for (var i = 0; i < directives.length; i += 4 /* Size */) {
5816
+ if (directives[i] === directive) {
5817
+ return i;
5818
+ }
5819
+ }
5820
+ return -1;
5821
+ }
5822
+ function getInitialStylingValuesIndexOf(keyValues, key) {
5823
+ for (var i = 1 /* KeyValueStartPosition */; i < keyValues.length; i += 2 /* Size */) {
5824
+ if (keyValues[i] === key)
5825
+ return i;
5826
+ }
5827
+ return -1;
5828
+ }
5829
+ function getSinglePropIndexValue(context, directiveIndex, offset, isClassBased) {
5830
+ var singlePropOffsetRegistryIndex = context[1 /* DirectiveRegistryPosition */][(directiveIndex * 4 /* Size */) +
5831
+ 1 /* SinglePropValuesIndexOffset */];
5832
+ var offsets = context[4 /* SinglePropOffsetPositions */];
5833
+ var indexForOffset = singlePropOffsetRegistryIndex +
5834
+ 2 /* ValueStartPosition */ +
5835
+ (isClassBased ?
5836
+ offsets[singlePropOffsetRegistryIndex + 0 /* StylesCountPosition */] :
5837
+ 0) +
5838
+ offset;
5839
+ return offsets[indexForOffset];
5840
+ }
5841
+ function getStyleSanitizer(context, directiveIndex) {
5842
+ var dirs = context[1 /* DirectiveRegistryPosition */];
5843
+ var value = dirs[directiveIndex * 4 /* Size */ +
5844
+ 3 /* StyleSanitizerOffset */] ||
5845
+ dirs[3 /* StyleSanitizerOffset */] || null;
5846
+ return value;
5847
+ }
5848
+ function isDirectiveDirty(context, directiveIndex) {
5849
+ var dirs = context[1 /* DirectiveRegistryPosition */];
5850
+ return dirs[directiveIndex * 4 /* Size */ +
5851
+ 2 /* DirtyFlagOffset */];
5852
+ }
5853
+ function setDirectiveDirty(context, directiveIndex, dirtyYes) {
5854
+ var dirs = context[1 /* DirectiveRegistryPosition */];
5855
+ dirs[directiveIndex * 4 /* Size */ +
5856
+ 2 /* DirtyFlagOffset */] = dirtyYes;
5857
+ }
5858
+ function allowValueChange(currentValue, newValue, currentDirectiveOwner, newDirectiveOwner) {
5859
+ // the code below relies the importance of directive's being tied to their
5860
+ // index value. The index values for each directive are derived from being
5861
+ // registered into the styling context directive registry. The most important
5862
+ // directive is the parent component directive (the template) and each directive
5863
+ // that is added after is considered less important than the previous entry. This
5864
+ // prioritization of directives enables the styling algorithm to decide if a style
5865
+ // or class should be allowed to be updated/replaced incase an earlier directive
5866
+ // already wrote to the exact same style-property or className value. In other words
5867
+ // ... this decides what to do if and when there is a collision.
5868
+ if (currentValue) {
5869
+ if (newValue) {
5870
+ // if a directive index is lower than it always has priority over the
5871
+ // previous directive's value...
5872
+ return newDirectiveOwner <= currentDirectiveOwner;
5873
+ }
5874
+ else {
5875
+ // only write a null value incase it's the same owner writing it.
5876
+ // this avoids having a higher-priority directive write to null
5877
+ // only to have a lesser-priority directive change right to a
5878
+ // non-null value immediately afterwards.
5879
+ return currentDirectiveOwner === newDirectiveOwner;
5880
+ }
5881
+ }
5882
+ return true;
5883
+ }
5884
+ /**
5885
+ * This function is only designed to be called for `[class]` bindings when
5886
+ * `[ngClass]` (or something that uses `class` as an input) is present. Once
5887
+ * directive host bindings fully work for `[class]` and `[style]` inputs
5888
+ * then this can be deleted.
5889
+ */
5890
+ function getInitialClassNameValue(context) {
5891
+ var className = context[6 /* CachedClassValueOrInitialClassString */];
5892
+ if (className == null) {
5893
+ className = '';
5894
+ var initialClassValues = context[3 /* InitialClassValuesPosition */];
5895
+ for (var i = 1 /* KeyValueStartPosition */; i < initialClassValues.length; i += 2 /* Size */) {
5896
+ var isPresent = initialClassValues[i + 1];
5897
+ if (isPresent) {
5898
+ className += (className.length ? ' ' : '') + initialClassValues[i];
5899
+ }
5900
+ }
5901
+ context[6 /* CachedClassValueOrInitialClassString */] = className;
5902
+ }
5903
+ return className;
5904
+ }
5455
5905
 
5456
5906
  /**
5457
5907
  * @license
@@ -5471,29 +5921,23 @@ var _CLEAN_PROMISE = Promise.resolve(null);
5471
5921
  * bindings, refreshes child components.
5472
5922
  * Note: view hooks are triggered later when leaving the view.
5473
5923
  */
5474
- function refreshDescendantViews(lView, rf) {
5924
+ function refreshDescendantViews(lView) {
5475
5925
  var tView = lView[TVIEW];
5476
5926
  // This needs to be set before children are processed to support recursive components
5477
5927
  tView.firstTemplatePass = false;
5478
5928
  setFirstTemplatePass(false);
5479
- // Dynamically created views must run first only in creation mode. If this is a
5480
- // creation-only pass, we should not call lifecycle hooks or evaluate bindings.
5481
- // This will be done in the update-only pass.
5482
- if (rf !== 1 /* Create */) {
5483
- var creationMode = getCreationMode();
5929
+ // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.
5930
+ // This will be done in the update pass.
5931
+ if (!isCreationMode(lView)) {
5484
5932
  var checkNoChangesMode = getCheckNoChangesMode();
5485
- if (!checkNoChangesMode) {
5486
- executeInitHooks(lView, tView, creationMode);
5487
- }
5933
+ executeInitHooks(lView, tView, checkNoChangesMode);
5488
5934
  refreshDynamicEmbeddedViews(lView);
5489
5935
  // Content query results must be refreshed before content hooks are called.
5490
5936
  refreshContentQueries(tView);
5491
- if (!checkNoChangesMode) {
5492
- executeHooks(lView, tView.contentHooks, tView.contentCheckHooks, creationMode);
5493
- }
5937
+ executeHooks(lView, tView.contentHooks, tView.contentCheckHooks, checkNoChangesMode);
5494
5938
  setHostBindings(tView, lView);
5495
5939
  }
5496
- refreshChildComponents(tView.components, rf);
5940
+ refreshChildComponents(tView.components);
5497
5941
  }
5498
5942
  /** Sets the host bindings for the current view. */
5499
5943
  function setHostBindings(tView, viewData) {
@@ -5544,16 +5988,17 @@ function refreshContentQueries(tView) {
5544
5988
  }
5545
5989
  }
5546
5990
  /** Refreshes child components in the current view. */
5547
- function refreshChildComponents(components, rf) {
5991
+ function refreshChildComponents(components) {
5548
5992
  if (components != null) {
5549
5993
  for (var i = 0; i < components.length; i++) {
5550
- componentRefresh(components[i], rf);
5994
+ componentRefresh(components[i]);
5551
5995
  }
5552
5996
  }
5553
5997
  }
5554
5998
  function createLView(parentLView, tView, context, flags, rendererFactory, renderer, sanitizer, injector) {
5555
5999
  var lView = tView.blueprint.slice();
5556
- lView[FLAGS] = flags | 1 /* CreationMode */ | 8 /* Attached */ | 16 /* RunInit */;
6000
+ lView[FLAGS] = flags | 1 /* CreationMode */ | 16 /* Attached */ | 32 /* RunInit */ |
6001
+ 2 /* FirstLViewPass */;
5557
6002
  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
5558
6003
  lView[CONTEXT] = context;
5559
6004
  lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);
@@ -5630,7 +6075,7 @@ function createEmbeddedViewAndNode(tView, context, declarationView, renderer, qu
5630
6075
  var _previousOrParentTNode = getPreviousOrParentTNode();
5631
6076
  setIsParent(true);
5632
6077
  setPreviousOrParentTNode(null);
5633
- var lView = createLView(declarationView, tView, context, 2 /* CheckAlways */);
6078
+ var lView = createLView(declarationView, tView, context, 4 /* CheckAlways */);
5634
6079
  lView[DECLARATION_VIEW] = declarationView;
5635
6080
  if (queries) {
5636
6081
  lView[QUERIES] = queries.createView();
@@ -5653,13 +6098,13 @@ function createEmbeddedViewAndNode(tView, context, declarationView, renderer, qu
5653
6098
  * can't store TViews in the template function itself (as we do for comps). Instead, we store the
5654
6099
  * TView for dynamically created views on their host TNode, which only has one instance.
5655
6100
  */
5656
- function renderEmbeddedTemplate(viewToRender, tView, context, rf) {
6101
+ function renderEmbeddedTemplate(viewToRender, tView, context) {
5657
6102
  var _isParent = getIsParent();
5658
6103
  var _previousOrParentTNode = getPreviousOrParentTNode();
5659
6104
  setIsParent(true);
5660
6105
  setPreviousOrParentTNode(null);
5661
6106
  var oldView;
5662
- if (viewToRender[FLAGS] & 64 /* IsRoot */) {
6107
+ if (viewToRender[FLAGS] & 128 /* IsRoot */) {
5663
6108
  // This is a root view inside the view tree
5664
6109
  tickRootContext(getRootContext(viewToRender));
5665
6110
  }
@@ -5669,24 +6114,17 @@ function renderEmbeddedTemplate(viewToRender, tView, context, rf) {
5669
6114
  setPreviousOrParentTNode(null);
5670
6115
  oldView = enterView(viewToRender, viewToRender[HOST_NODE]);
5671
6116
  namespaceHTML();
5672
- tView.template(rf, context);
5673
- if (rf & 2 /* Update */) {
5674
- refreshDescendantViews(viewToRender, null);
5675
- }
5676
- else {
5677
- // This must be set to false immediately after the first creation run because in an
5678
- // ngFor loop, all the views will be created together before update mode runs and turns
5679
- // off firstTemplatePass. If we don't set it here, instances will perform directive
5680
- // matching, etc again and again.
5681
- viewToRender[TVIEW].firstTemplatePass = false;
5682
- setFirstTemplatePass(false);
5683
- }
6117
+ tView.template(getRenderFlags(viewToRender), context);
6118
+ // This must be set to false immediately after the first creation run because in an
6119
+ // ngFor loop, all the views will be created together before update mode runs and turns
6120
+ // off firstTemplatePass. If we don't set it here, instances will perform directive
6121
+ // matching, etc again and again.
6122
+ viewToRender[TVIEW].firstTemplatePass = false;
6123
+ setFirstTemplatePass(false);
6124
+ refreshDescendantViews(viewToRender);
5684
6125
  }
5685
6126
  finally {
5686
- // renderEmbeddedTemplate() is called twice, once for creation only and then once for
5687
- // update. When for creation only, leaveView() must not trigger view hooks, nor clean flags.
5688
- var isCreationOnly = (rf & 1 /* Create */) === 1 /* Create */;
5689
- leaveView(oldView, isCreationOnly);
6127
+ leaveView(oldView);
5690
6128
  setIsParent(_isParent);
5691
6129
  setPreviousOrParentTNode(_previousOrParentTNode);
5692
6130
  }
@@ -5706,21 +6144,29 @@ function nextContext(level) {
5706
6144
  if (level === void 0) { level = 1; }
5707
6145
  return nextContextImpl(level);
5708
6146
  }
5709
- function renderComponentOrTemplate(hostView, componentOrContext, rf, templateFn) {
6147
+ function renderComponentOrTemplate(hostView, context, templateFn) {
5710
6148
  var rendererFactory = hostView[RENDERER_FACTORY];
5711
6149
  var oldView = enterView(hostView, hostView[HOST_NODE]);
6150
+ var normalExecutionPath = !getCheckNoChangesMode();
5712
6151
  try {
5713
- if (rendererFactory.begin) {
6152
+ if (normalExecutionPath && rendererFactory.begin) {
5714
6153
  rendererFactory.begin();
5715
6154
  }
5716
- if (templateFn) {
5717
- namespaceHTML();
5718
- templateFn(rf || getRenderFlags(hostView), componentOrContext);
6155
+ if (isCreationMode(hostView)) {
6156
+ // creation mode pass
6157
+ if (templateFn) {
6158
+ namespaceHTML();
6159
+ templateFn(1 /* Create */, context);
6160
+ }
6161
+ refreshDescendantViews(hostView);
6162
+ hostView[FLAGS] &= ~1 /* CreationMode */;
5719
6163
  }
5720
- refreshDescendantViews(hostView, rf);
6164
+ // update mode pass
6165
+ templateFn && templateFn(2 /* Update */, context);
6166
+ refreshDescendantViews(hostView);
5721
6167
  }
5722
6168
  finally {
5723
- if (rendererFactory.end) {
6169
+ if (normalExecutionPath && rendererFactory.end) {
5724
6170
  rendererFactory.end();
5725
6171
  }
5726
6172
  leaveView(oldView);
@@ -5728,16 +6174,11 @@ function renderComponentOrTemplate(hostView, componentOrContext, rf, templateFn)
5728
6174
  }
5729
6175
  /**
5730
6176
  * This function returns the default configuration of rendering flags depending on when the
5731
- * template is in creation mode or update mode. By default, the update block is run with the
5732
- * creation block when the view is in creation mode. Otherwise, the update block is run
5733
- * alone.
5734
- *
5735
- * Dynamically created views do NOT use this configuration (update block and create block are
5736
- * always run separately).
6177
+ * template is in creation mode or update mode. Update block and create block are
6178
+ * always run separately.
5737
6179
  */
5738
6180
  function getRenderFlags(view) {
5739
- return view[FLAGS] & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :
5740
- 2 /* Update */;
6181
+ return isCreationMode(view) ? 1 /* Create */ : 2 /* Update */;
5741
6182
  }
5742
6183
  //////////////////////////
5743
6184
  //// Namespace
@@ -5760,7 +6201,8 @@ function namespaceHTML() {
5760
6201
  *
5761
6202
  * @param index Index of the element in the data array
5762
6203
  * @param name Name of the DOM Node
5763
- * @param attrs Statically bound set of attributes to be written into the DOM element on creation.
6204
+ * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
6205
+ * element on creation. Use [AttributeMarker] to denote the meaning of this array.
5764
6206
  * @param localRefs A set of local reference bindings on the element.
5765
6207
  */
5766
6208
  function element(index, name, attrs, localRefs) {
@@ -5818,7 +6260,8 @@ function elementContainerEnd() {
5818
6260
  *
5819
6261
  * @param index Index of the element in the LView array
5820
6262
  * @param name Name of the DOM Node
5821
- * @param attrs Statically bound set of attributes to be written into the DOM element on creation.
6263
+ * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
6264
+ * element on creation. Use [AttributeMarker] to denote the meaning of this array.
5822
6265
  * @param localRefs A set of local reference bindings on the element.
5823
6266
  *
5824
6267
  * Attributes and localRefs are passed as an array of strings where elements with an even index
@@ -5834,6 +6277,14 @@ function elementStart(index, name, attrs, localRefs) {
5834
6277
  ngDevMode && assertDataInRange(lView, index - 1);
5835
6278
  var tNode = createNodeAtIndex(index, 3 /* Element */, native, name, attrs || null);
5836
6279
  if (attrs) {
6280
+ // it's important to only prepare styling-related datastructures once for a given
6281
+ // tNode and not each time an element is created. Also, the styling code is designed
6282
+ // to be patched and constructed at various points, but only up until the first element
6283
+ // is created. Then the styling context is locked and can only be instantiated for each
6284
+ // successive element that is created.
6285
+ if (tView.firstTemplatePass && !tNode.stylingTemplate && hasStyling(attrs)) {
6286
+ tNode.stylingTemplate = initializeStaticContext(attrs);
6287
+ }
5837
6288
  setUpAttributes(native, attrs);
5838
6289
  }
5839
6290
  appendChild(native, tNode, lView);
@@ -5845,6 +6296,21 @@ function elementStart(index, name, attrs, localRefs) {
5845
6296
  attachPatchData(native, lView);
5846
6297
  }
5847
6298
  increaseElementDepthCount();
6299
+ // if a directive contains a host binding for "class" then all class-based data will
6300
+ // flow through that (except for `[class.prop]` bindings). This also includes initial
6301
+ // static class values as well. (Note that this will be fixed once map-based `[style]`
6302
+ // and `[class]` bindings work for multiple directives.)
6303
+ if (tView.firstTemplatePass) {
6304
+ var inputData = initializeTNodeInputs(tNode);
6305
+ if (inputData && inputData.hasOwnProperty('class')) {
6306
+ tNode.flags |= 8 /* hasClassInput */;
6307
+ }
6308
+ }
6309
+ // There is no point in rendering styles when a class directive is present since
6310
+ // it will take that over for us (this will be removed once #FW-882 is in).
6311
+ if (tNode.stylingTemplate && (tNode.flags & 8 /* hasClassInput */) === 0) {
6312
+ renderInitialStylesAndClasses(native, tNode.stylingTemplate, lView[RENDERER]);
6313
+ }
5848
6314
  }
5849
6315
  /**
5850
6316
  * Creates a native element from a tag name, using a renderer.
@@ -5984,28 +6450,30 @@ function setUpAttributes(native, attrs) {
5984
6450
  var isProc = isProceduralRenderer(renderer);
5985
6451
  var i = 0;
5986
6452
  while (i < attrs.length) {
5987
- var attrName = attrs[i];
5988
- if (attrName === 1 /* SelectOnly */)
5989
- break;
5990
- if (attrName === NG_PROJECT_AS_ATTR_NAME) {
5991
- i += 2;
5992
- }
5993
- else {
5994
- ngDevMode && ngDevMode.rendererSetAttribute++;
6453
+ var attrName = attrs[i++];
6454
+ if (typeof attrName == 'number') {
5995
6455
  if (attrName === 0 /* NamespaceURI */) {
5996
6456
  // Namespaced attributes
5997
- var namespaceURI = attrs[i + 1];
5998
- var attrName_1 = attrs[i + 2];
5999
- var attrVal = attrs[i + 3];
6457
+ var namespaceURI = attrs[i++];
6458
+ var attrName_1 = attrs[i++];
6459
+ var attrVal = attrs[i++];
6460
+ ngDevMode && ngDevMode.rendererSetAttribute++;
6000
6461
  isProc ?
6001
6462
  renderer
6002
6463
  .setAttribute(native, attrName_1, attrVal, namespaceURI) :
6003
6464
  native.setAttributeNS(namespaceURI, attrName_1, attrVal);
6004
- i += 4;
6005
6465
  }
6006
6466
  else {
6467
+ // All other `AttributeMarker`s are ignored here.
6468
+ break;
6469
+ }
6470
+ }
6471
+ else {
6472
+ /// attrName is string;
6473
+ var attrVal = attrs[i++];
6474
+ if (attrName !== NG_PROJECT_AS_ATTR_NAME) {
6007
6475
  // Standard attributes
6008
- var attrVal = attrs[i + 1];
6476
+ ngDevMode && ngDevMode.rendererSetAttribute++;
6009
6477
  if (isAnimationProp(attrName)) {
6010
6478
  if (isProc) {
6011
6479
  renderer.setProperty(native, attrName, attrVal);
@@ -6017,7 +6485,6 @@ function setUpAttributes(native, attrs) {
6017
6485
  .setAttribute(native, attrName, attrVal) :
6018
6486
  native.setAttribute(attrName, attrVal);
6019
6487
  }
6020
- i += 2;
6021
6488
  }
6022
6489
  }
6023
6490
  }
@@ -6156,6 +6623,13 @@ function elementEnd() {
6156
6623
  }
6157
6624
  queueLifecycleHooks(getLView()[TVIEW], previousOrParentTNode);
6158
6625
  decreaseElementDepthCount();
6626
+ // this is fired at the end of elementEnd because ALL of the stylingBindings code
6627
+ // (for directives and the template) have now executed which means the styling
6628
+ // context can be instantiated properly.
6629
+ if (hasClassInput(previousOrParentTNode)) {
6630
+ var stylingContext = getStylingContext(previousOrParentTNode.index, lView);
6631
+ setInputsForProperty(lView, previousOrParentTNode.inputs['class'], getInitialClassNameValue(stylingContext));
6632
+ }
6159
6633
  }
6160
6634
  /**
6161
6635
  * Updates the value of removes an attribute on an Element.
@@ -6200,6 +6674,37 @@ function elementAttribute(index, name, value, sanitizer) {
6200
6674
  * (this is necessary for host property bindings)
6201
6675
  */
6202
6676
  function elementProperty(index, propName, value, sanitizer, nativeOnly) {
6677
+ elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);
6678
+ }
6679
+ /**
6680
+ * Updates a synthetic host binding (e.g. `[@foo]`) on a component.
6681
+ *
6682
+ * This instruction is for compatibility purposes and is designed to ensure that a
6683
+ * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
6684
+ * the component's renderer. Normally all host bindings are evaluated with the parent
6685
+ * component's renderer, but, in the case of animation @triggers, they need to be
6686
+ * evaluated with the sub components renderer (because that's where the animation
6687
+ * triggers are defined).
6688
+ *
6689
+ * Do not use this instruction as a replacement for `elementProperty`. This instruction
6690
+ * only exists to ensure compatibility with the ViewEngine's host binding behavior.
6691
+ *
6692
+ * @param index The index of the element to update in the data array
6693
+ * @param propName Name of property. Because it is going to DOM, this is not subject to
6694
+ * renaming as part of minification.
6695
+ * @param value New value to write.
6696
+ * @param sanitizer An optional function used to sanitize the value.
6697
+ * @param nativeOnly Whether or not we should only set native properties and skip input check
6698
+ * (this is necessary for host property bindings)
6699
+ */
6700
+ function componentHostSyntheticProperty(index, propName, value, sanitizer, nativeOnly) {
6701
+ elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadComponentRenderer);
6702
+ }
6703
+ function loadComponentRenderer(tNode, lView) {
6704
+ var componentLView = lView[tNode.index];
6705
+ return componentLView[RENDERER];
6706
+ }
6707
+ function elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadRendererFn) {
6203
6708
  if (value === NO_CHANGE)
6204
6709
  return;
6205
6710
  var lView = getLView();
@@ -6219,7 +6724,7 @@ function elementProperty(index, propName, value, sanitizer, nativeOnly) {
6219
6724
  }
6220
6725
  }
6221
6726
  else if (tNode.type === 3 /* Element */) {
6222
- var renderer = lView[RENDERER];
6727
+ var renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];
6223
6728
  // It is assumed that the sanitizer is only added when the compiler determines that the property
6224
6729
  // is risky, so sanitization can be done without further checks.
6225
6730
  value = sanitizer != null ? sanitizer(value) : value;
@@ -6338,127 +6843,105 @@ function generatePropertyAliases(tNode, direction) {
6338
6843
  return propStore;
6339
6844
  }
6340
6845
  /**
6341
- * Add or remove a class in a `classList` on a DOM element.
6846
+ * Assign any inline style values to the element during creation mode.
6342
6847
  *
6343
- * This instruction is meant to handle the [class.foo]="exp" case
6848
+ * This instruction is meant to be called during creation mode to register all
6849
+ * dynamic style and class bindings on the element. Note for static values (no binding)
6850
+ * see `elementStart` and `elementHostAttrs`.
6851
+ *
6852
+ * @param classBindingNames An array containing bindable class names.
6853
+ * The `elementClassProp` refers to the class name by index in this array.
6854
+ * (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).
6855
+ * @param styleBindingNames An array containing bindable style properties.
6856
+ * The `elementStyleProp` refers to the class name by index in this array.
6857
+ * (i.e. `['width', 'height']` means `width=0` and `height=1`).
6858
+ * @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS
6859
+ * property values that are applied to the element (during rendering).
6860
+ * Note that the sanitizer instance itself is tied to the `directive` (if provided).
6861
+ * @param directive A directive instance the styling is associated with. If not provided
6862
+ * current view's controller instance is assumed.
6344
6863
  *
6345
- * @param index The index of the element to update in the data array
6346
- * @param classIndex Index of class to toggle. Because it is going to DOM, this is not subject to
6347
- * renaming as part of minification.
6348
- * @param value A value indicating if a given class should be added or removed.
6349
- * @param directive the ref to the directive that is attempting to change styling.
6864
+ * @publicApi
6350
6865
  */
6351
- function elementClassProp(index, classIndex, value, directive) {
6352
- if (directive != undefined) {
6353
- return hackImplementationOfElementClassProp(index, classIndex, value, directive); // proper supported in next PR
6866
+ function elementStyling(classBindingNames, styleBindingNames, styleSanitizer, directive) {
6867
+ var tNode = getPreviousOrParentTNode();
6868
+ if (!tNode.stylingTemplate) {
6869
+ tNode.stylingTemplate = createEmptyStylingContext();
6354
6870
  }
6355
- var val = (value instanceof BoundPlayerFactory) ? value : (!!value);
6356
- updateClassProp(getStylingContext(index + HEADER_OFFSET, getLView()), classIndex, val);
6871
+ updateContextWithBindings(tNode.stylingTemplate, directive || null, classBindingNames, styleBindingNames, styleSanitizer, hasClassInput(tNode));
6357
6872
  }
6358
6873
  /**
6359
- * Assign any inline style values to the element during creation mode.
6874
+ * Assign static styling values to a host element.
6360
6875
  *
6361
- * This instruction is meant to be called during creation mode to apply all styling
6362
- * (e.g. `style="..."`) values to the element. This is also where the provided index
6363
- * value is allocated for the styling details for its corresponding element (the element
6364
- * index is the previous index value from this one).
6365
- *
6366
- * (Note this function calls `elementStylingApply` immediately when called.)
6367
- *
6368
- *
6369
- * @param index Index value which will be allocated to store styling data for the element.
6370
- * (Note that this is not the element index, but rather an index value allocated
6371
- * specifically for element styling--the index must be the next index after the element
6372
- * index.)
6373
- * @param classDeclarations A key/value array of CSS classes that will be registered on the element.
6374
- * Each individual style will be used on the element as long as it is not overridden
6375
- * by any classes placed on the element by multiple (`[class]`) or singular (`[class.named]`)
6376
- * bindings. If a class binding changes its value to a falsy value then the matching initial
6377
- * class value that are passed in here will be applied to the element (if matched).
6378
- * @param styleDeclarations A key/value array of CSS styles that will be registered on the element.
6379
- * Each individual style will be used on the element as long as it is not overridden
6380
- * by any styles placed on the element by multiple (`[style]`) or singular (`[style.prop]`)
6381
- * bindings. If a style binding changes its value to null then the initial styling
6382
- * values that are passed in here will be applied to the element (if matched).
6383
- * @param styleSanitizer An optional sanitizer function that will be used (if provided)
6384
- * to sanitize the any CSS property values that are applied to the element (during rendering).
6385
- * @param directive the ref to the directive that is attempting to change styling.
6386
- */
6387
- function elementStyling(classDeclarations, styleDeclarations, styleSanitizer, directive) {
6388
- if (directive != undefined) {
6389
- getCreationMode() &&
6390
- hackImplementationOfElementStyling(classDeclarations || null, styleDeclarations || null, styleSanitizer || null, directive); // supported in next PR
6391
- return;
6392
- }
6876
+ * NOTE: This instruction is meant to used from `hostBindings` function only.
6877
+ *
6878
+ * @param directive A directive instance the styling is associated with.
6879
+ * @param attrs An array containing class and styling information. The values must be marked with
6880
+ * `AttributeMarker`.
6881
+ *
6882
+ * ```
6883
+ * var attrs = [AttributeMarker.Classes, 'foo', 'bar',
6884
+ * AttributeMarker.Styles, 'width', '100px', 'height, '200px']
6885
+ * elementHostAttrs(directive, attrs);
6886
+ * ```
6887
+ *
6888
+ * @publicApi
6889
+ */
6890
+ function elementHostAttrs(directive, attrs) {
6393
6891
  var tNode = getPreviousOrParentTNode();
6394
- var inputData = initializeTNodeInputs(tNode);
6395
6892
  if (!tNode.stylingTemplate) {
6396
- var hasClassInput = inputData && inputData.hasOwnProperty('class') ? true : false;
6397
- if (hasClassInput) {
6398
- tNode.flags |= 8 /* hasClassInput */;
6399
- }
6400
- // initialize the styling template.
6401
- tNode.stylingTemplate = createStylingContextTemplate(classDeclarations, styleDeclarations, styleSanitizer, hasClassInput);
6402
- }
6403
- if (styleDeclarations && styleDeclarations.length ||
6404
- classDeclarations && classDeclarations.length) {
6405
- var index = tNode.index;
6406
- if (delegateToClassInput(tNode)) {
6407
- var lView = getLView();
6408
- var stylingContext = getStylingContext(index, lView);
6409
- var initialClasses = stylingContext[6 /* PreviousOrCachedMultiClassValue */];
6410
- setInputsForProperty(lView, tNode.inputs['class'], initialClasses);
6411
- }
6412
- elementStylingApply(index - HEADER_OFFSET);
6893
+ tNode.stylingTemplate = initializeStaticContext(attrs);
6413
6894
  }
6895
+ patchContextWithStaticAttrs(tNode.stylingTemplate, attrs, directive);
6414
6896
  }
6415
6897
  /**
6416
- * Apply all styling values to the element which have been queued by any styling instructions.
6898
+ * Apply styling binding to the element.
6417
6899
  *
6418
- * This instruction is meant to be run once one or more `elementStyle` and/or `elementStyleProp`
6419
- * have been issued against the element. This function will also determine if any styles have
6420
- * changed and will then skip the operation if there is nothing new to render.
6900
+ * This instruction is meant to be run after `elementStyle` and/or `elementStyleProp`.
6901
+ * if any styling bindings have changed then the changes are flushed to the element.
6421
6902
  *
6422
- * Once called then all queued styles will be flushed.
6423
6903
  *
6424
- * @param index Index of the element's styling storage that will be rendered.
6425
- * (Note that this is not the element index, but rather an index value allocated
6426
- * specifically for element styling--the index must be the next index after the element
6427
- * index.)
6428
- * @param directive the ref to the directive that is attempting to change styling.
6904
+ * @param index Index of the element's with which styling is associated.
6905
+ * @param directive Directive instance that is attempting to change styling. (Defaults to the
6906
+ * component of the current view).
6907
+ components
6908
+ *
6909
+ * @publicApi
6429
6910
  */
6430
6911
  function elementStylingApply(index, directive) {
6431
- if (directive != undefined) {
6432
- return hackImplementationOfElementStylingApply(index, directive); // supported in next PR
6433
- }
6434
6912
  var lView = getLView();
6435
- var isFirstRender = (lView[FLAGS] & 1 /* CreationMode */) !== 0;
6436
- var totalPlayersQueued = renderStyleAndClassBindings(getStylingContext(index + HEADER_OFFSET, lView), lView[RENDERER], lView, isFirstRender);
6913
+ var isFirstRender = (lView[FLAGS] & 2 /* FirstLViewPass */) !== 0;
6914
+ var totalPlayersQueued = renderStyling(getStylingContext(index + HEADER_OFFSET, lView), lView[RENDERER], lView, isFirstRender, null, null, directive);
6437
6915
  if (totalPlayersQueued > 0) {
6438
6916
  var rootContext = getRootContext(lView);
6439
6917
  scheduleTick(rootContext, 2 /* FlushPlayers */);
6440
6918
  }
6441
6919
  }
6442
6920
  /**
6443
- * Queue a given style to be rendered on an Element.
6921
+ * Update a style bindings value on an element.
6444
6922
  *
6445
6923
  * If the style value is `null` then it will be removed from the element
6446
6924
  * (or assigned a different value depending if there are any styles placed
6447
6925
  * on the element with `elementStyle` or any styles that are present
6448
6926
  * from when the element was created (with `elementStyling`).
6449
6927
  *
6450
- * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)
6928
+ * (Note that the styling element is updated as part of `elementStylingApply`.)
6451
6929
  *
6452
- * @param index Index of the element's styling storage to change in the data array.
6453
- * (Note that this is not the element index, but rather an index value allocated
6454
- * specifically for element styling--the index must be the next index after the element
6455
- * index.)
6456
- * @param styleIndex Index of the style property on this element. (Monotonically increasing.)
6457
- * @param value New value to write (null to remove).
6930
+ * @param index Index of the element's with which styling is associated.
6931
+ * @param styleIndex Index of style to update. This index value refers to the
6932
+ * index of the style in the style bindings array that was passed into
6933
+ * `elementStlyingBindings`.
6934
+ * @param value New value to write (null to remove). Note that if a directive also
6935
+ * attempts to write to the same binding value then it will only be able to
6936
+ * do so if the template binding value is `null` (or doesn't exist at all).
6458
6937
  * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
6459
6938
  * Note that when a suffix is provided then the underlying sanitizer will
6460
6939
  * be ignored.
6461
- * @param directive the ref to the directive that is attempting to change styling.
6940
+ * @param directive Directive instance that is attempting to change styling. (Defaults to the
6941
+ * component of the current view).
6942
+ components
6943
+ *
6944
+ * @publicApi
6462
6945
  */
6463
6946
  function elementStyleProp(index, styleIndex, value, suffix, directive) {
6464
6947
  var valueToAdd = null;
@@ -6476,34 +6959,52 @@ function elementStyleProp(index, styleIndex, value, suffix, directive) {
6476
6959
  valueToAdd = value;
6477
6960
  }
6478
6961
  }
6479
- if (directive != undefined) {
6480
- hackImplementationOfElementStyleProp(index, styleIndex, valueToAdd, suffix, directive);
6481
- }
6482
- else {
6483
- updateStyleProp(getStylingContext(index + HEADER_OFFSET, getLView()), styleIndex, valueToAdd);
6484
- }
6962
+ updateStyleProp(getStylingContext(index + HEADER_OFFSET, getLView()), styleIndex, valueToAdd, directive);
6963
+ }
6964
+ /**
6965
+ * Add or remove a class via a class binding on a DOM element.
6966
+ *
6967
+ * This instruction is meant to handle the [class.foo]="exp" case and, therefore,
6968
+ * the class itself must already be applied using `elementStyling` within
6969
+ * the creation block.
6970
+ *
6971
+ * @param index Index of the element's with which styling is associated.
6972
+ * @param classIndex Index of class to toggle. This index value refers to the
6973
+ * index of the class in the class bindings array that was passed into
6974
+ * `elementStlyingBindings` (which is meant to be called before this
6975
+ * function is).
6976
+ * @param value A true/false value which will turn the class on or off.
6977
+ * @param directive Directive instance that is attempting to change styling. (Defaults to the
6978
+ * component of the current view).
6979
+ components
6980
+ *
6981
+ * @publicApi
6982
+ */
6983
+ function elementClassProp(index, classIndex, value, directive) {
6984
+ var onOrOffClassValue = (value instanceof BoundPlayerFactory) ? value : (!!value);
6985
+ updateClassProp(getStylingContext(index + HEADER_OFFSET, getLView()), classIndex, onOrOffClassValue, directive);
6485
6986
  }
6486
6987
  /**
6487
- * Queue a key/value map of styles to be rendered on an Element.
6988
+ * Update style and/or class bindings using object literal.
6488
6989
  *
6489
- * This instruction is meant to handle the `[style]="exp"` usage. When styles are applied to
6490
- * the Element they will then be placed with respect to any styles set with `elementStyleProp`.
6491
- * If any styles are set to `null` then they will be removed from the element (unless the same
6492
- * style properties have been assigned to the element during creation using `elementStyling`).
6990
+ * This instruction is meant apply styling via the `[style]="exp"` and `[class]="exp"` template
6991
+ * bindings. When styles are applied to the Element they will then be placed with respect to
6992
+ * any styles set with `elementStyleProp`. If any styles are set to `null` then they will be
6993
+ * removed from the element.
6493
6994
  *
6494
6995
  * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)
6495
6996
  *
6496
- * @param index Index of the element's styling storage to change in the data array.
6497
- * (Note that this is not the element index, but rather an index value allocated
6498
- * specifically for element styling--the index must be the next index after the element
6499
- * index.)
6997
+ * @param index Index of the element's with which styling is associated.
6500
6998
  * @param classes A key/value style map of CSS classes that will be added to the given element.
6501
6999
  * Any missing classes (that have already been applied to the element beforehand) will be
6502
7000
  * removed (unset) from the element's list of CSS classes.
6503
7001
  * @param styles A key/value style map of the styles that will be applied to the given element.
6504
7002
  * Any missing styles (that have already been applied to the element beforehand) will be
6505
7003
  * removed (unset) from the element's styling.
6506
- * @param directive the ref to the directive that is attempting to change styling.
7004
+ * @param directive Directive instance that is attempting to change styling. (Defaults to the
7005
+ * component of the current view).
7006
+ *
7007
+ * @publicApi
6507
7008
  */
6508
7009
  function elementStylingMap(index, classes, styles, directive) {
6509
7010
  if (directive != undefined)
@@ -6511,77 +7012,16 @@ function elementStylingMap(index, classes, styles, directive) {
6511
7012
  var lView = getLView();
6512
7013
  var tNode = getTNode(index, lView);
6513
7014
  var stylingContext = getStylingContext(index + HEADER_OFFSET, lView);
6514
- if (delegateToClassInput(tNode) && classes !== NO_CHANGE) {
6515
- var initialClasses = stylingContext[6 /* PreviousOrCachedMultiClassValue */];
7015
+ if (hasClassInput(tNode) && classes !== NO_CHANGE) {
7016
+ var initialClasses = getInitialClassNameValue(stylingContext);
6516
7017
  var classInputVal = (initialClasses.length ? (initialClasses + ' ') : '') + classes;
6517
7018
  setInputsForProperty(lView, tNode.inputs['class'], classInputVal);
6518
7019
  }
6519
- updateStylingMap(stylingContext, classes, styles);
6520
- }
6521
- function hackImplementationOfElementStyling(classDeclarations, styleDeclarations, styleSanitizer, directive) {
6522
- var node = getNativeByTNode(getPreviousOrParentTNode(), getLView());
6523
- ngDevMode && assertDefined(node, 'expecting parent DOM node');
6524
- var hostStylingHackMap = (node.hostStylingHack || (node.hostStylingHack = new Map()));
6525
- var squashedClassDeclarations = hackSquashDeclaration(classDeclarations);
6526
- hostStylingHackMap.set(directive, {
6527
- classDeclarations: squashedClassDeclarations,
6528
- styleDeclarations: hackSquashDeclaration(styleDeclarations), styleSanitizer: styleSanitizer
6529
- });
6530
- hackSetStaticClasses(node, squashedClassDeclarations);
6531
- }
6532
- function hackSetStaticClasses(node, classDeclarations) {
6533
- // Static classes need to be set here because static classes don't generate
6534
- // elementClassProp instructions.
6535
- var lView = getLView();
6536
- var staticClassStartIndex = classDeclarations.indexOf(1 /* VALUES_MODE */) + 1;
6537
- var renderer = lView[RENDERER];
6538
- for (var i = staticClassStartIndex; i < classDeclarations.length; i += 2) {
6539
- var className = classDeclarations[i];
6540
- var value = classDeclarations[i + 1];
6541
- // if value is true, then this is a static class and we should set it now.
6542
- // class bindings are set separately in elementClassProp.
6543
- if (value === true) {
6544
- if (isProceduralRenderer(renderer)) {
6545
- renderer.addClass(node, className);
6546
- }
6547
- else {
6548
- var classList = node.classList;
6549
- classList.add(className);
6550
- }
6551
- }
6552
- }
6553
- }
6554
- function hackSquashDeclaration(declarations) {
6555
- // assume the array is correct. This should be fine for View Engine compatibility.
6556
- return declarations || [];
6557
- }
6558
- function hackImplementationOfElementClassProp(index, classIndex, value, directive) {
6559
- var lView = getLView();
6560
- var node = getNativeByIndex(index, lView);
6561
- ngDevMode && assertDefined(node, 'could not locate node');
6562
- var hostStylingHack = node.hostStylingHack.get(directive);
6563
- var className = hostStylingHack.classDeclarations[classIndex];
6564
- var renderer = lView[RENDERER];
6565
- if (isProceduralRenderer(renderer)) {
6566
- value ? renderer.addClass(node, className) : renderer.removeClass(node, className);
6567
- }
6568
7020
  else {
6569
- var classList = node.classList;
6570
- value ? classList.add(className) : classList.remove(className);
7021
+ updateStylingMap(stylingContext, classes, styles);
6571
7022
  }
6572
7023
  }
6573
- function hackImplementationOfElementStylingApply(index, directive) {
6574
- // Do nothing because the hack implementation is eager.
6575
- }
6576
- function hackImplementationOfElementStyleProp(index, styleIndex, value, suffix, directive) {
6577
- var lView = getLView();
6578
- var node = getNativeByIndex(index, lView);
6579
- ngDevMode && assertDefined(node, 'could not locate node');
6580
- var hostStylingHack = node.hostStylingHack.get(directive);
6581
- var styleName = hostStylingHack.styleDeclarations[styleIndex];
6582
- var renderer = lView[RENDERER];
6583
- setStyle(node, styleName, value, renderer, null);
6584
- }
7024
+ /* START OF HACK BLOCK */
6585
7025
  function hackImplementationOfElementStylingMap(index, classes, styles, directive) {
6586
7026
  throw new Error('unimplemented. Should not be needed by ViewEngine compatibility');
6587
7027
  }
@@ -6893,7 +7333,7 @@ function addComponentLogic(lView, previousOrParentTNode, def) {
6893
7333
  // Only component views should be added to the view tree directly. Embedded views are
6894
7334
  // accessed through their containers because they may be removed / re-added later.
6895
7335
  var rendererFactory = lView[RENDERER_FACTORY];
6896
- var componentView = addToViewTree(lView, previousOrParentTNode.index, createLView(lView, tView, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, rendererFactory, lView[RENDERER_FACTORY].createRenderer(native, def)));
7336
+ var componentView = addToViewTree(lView, previousOrParentTNode.index, createLView(lView, tView, null, def.onPush ? 8 /* Dirty */ : 4 /* CheckAlways */, rendererFactory, lView[RENDERER_FACTORY].createRenderer(native, def)));
6897
7337
  componentView[HOST_NODE] = previousOrParentTNode;
6898
7338
  // Component view will always be created before any injected LContainers,
6899
7339
  // so this is a regular element, wrap it with the component view
@@ -6945,7 +7385,7 @@ function generateInitialInputs(directiveIndex, inputs, tNode) {
6945
7385
  var i = 0;
6946
7386
  while (i < attrs.length) {
6947
7387
  var attrName = attrs[i];
6948
- if (attrName === 1 /* SelectOnly */)
7388
+ if (attrName === 3 /* SelectOnly */)
6949
7389
  break;
6950
7390
  if (attrName === 0 /* NamespaceURI */) {
6951
7391
  // We do not allow inputs on namespaced attributes.
@@ -7071,11 +7511,9 @@ function containerRefreshStart(index) {
7071
7511
  ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);
7072
7512
  setIsParent(true);
7073
7513
  lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;
7074
- if (!getCheckNoChangesMode()) {
7075
- // We need to execute init hooks here so ngOnInit hooks are called in top level views
7076
- // before they are called in embedded views (for backwards compatibility).
7077
- executeInitHooks(lView, tView, getCreationMode());
7078
- }
7514
+ // We need to execute init hooks here so ngOnInit hooks are called in top level views
7515
+ // before they are called in embedded views (for backwards compatibility).
7516
+ executeInitHooks(lView, tView, getCheckNoChangesMode());
7079
7517
  }
7080
7518
  /**
7081
7519
  * Marks the end of the LContainer.
@@ -7116,7 +7554,7 @@ function refreshDynamicEmbeddedViews(lView) {
7116
7554
  var dynamicViewData = container_1[VIEWS][i];
7117
7555
  // The directives and pipes are not needed here as an existing view is only being refreshed.
7118
7556
  ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');
7119
- renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT], 2 /* Update */);
7557
+ renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT]);
7120
7558
  }
7121
7559
  }
7122
7560
  }
@@ -7173,7 +7611,7 @@ function embeddedViewStart(viewBlockId, consts, vars) {
7173
7611
  }
7174
7612
  else {
7175
7613
  // When we create a new LView, we always reset the state of the instructions.
7176
- viewToRender = createLView(lView, getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode), null, 2 /* CheckAlways */);
7614
+ viewToRender = createLView(lView, getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode), null, 4 /* CheckAlways */);
7177
7615
  if (lContainer[QUERIES]) {
7178
7616
  viewToRender[QUERIES] = lContainer[QUERIES].createView();
7179
7617
  }
@@ -7181,13 +7619,14 @@ function embeddedViewStart(viewBlockId, consts, vars) {
7181
7619
  enterView(viewToRender, viewToRender[TVIEW].node);
7182
7620
  }
7183
7621
  if (lContainer) {
7184
- if (getCreationMode()) {
7622
+ if (isCreationMode(viewToRender)) {
7185
7623
  // it is a new view, insert it into collection of views for a given container
7186
7624
  insertView(viewToRender, lContainer, lView, lContainer[ACTIVE_INDEX], -1);
7187
7625
  }
7188
7626
  lContainer[ACTIVE_INDEX]++;
7189
7627
  }
7190
- return getRenderFlags(viewToRender);
7628
+ return isCreationMode(viewToRender) ? 1 /* Create */ | 2 /* Update */ :
7629
+ 2 /* Update */;
7191
7630
  }
7192
7631
  /**
7193
7632
  * Initialize the TView (e.g. static data) for the active embedded view.
@@ -7217,7 +7656,11 @@ function getOrCreateEmbeddedTView(viewIndex, consts, vars, parent) {
7217
7656
  function embeddedViewEnd() {
7218
7657
  var lView = getLView();
7219
7658
  var viewHost = lView[HOST_NODE];
7220
- refreshDescendantViews(lView, null);
7659
+ if (isCreationMode(lView)) {
7660
+ refreshDescendantViews(lView); // creation mode pass
7661
+ lView[FLAGS] &= ~1 /* CreationMode */;
7662
+ }
7663
+ refreshDescendantViews(lView); // update mode pass
7221
7664
  leaveView(lView[PARENT]);
7222
7665
  setPreviousOrParentTNode(viewHost);
7223
7666
  setIsParent(false);
@@ -7227,17 +7670,16 @@ function embeddedViewEnd() {
7227
7670
  * Refreshes components by entering the component view and processing its bindings, queries, etc.
7228
7671
  *
7229
7672
  * @param adjustedElementIndex Element index in LView[] (adjusted for HEADER_OFFSET)
7230
- * @param rf The render flags that should be used to process this template
7231
7673
  */
7232
- function componentRefresh(adjustedElementIndex, rf) {
7674
+ function componentRefresh(adjustedElementIndex) {
7233
7675
  var lView = getLView();
7234
7676
  ngDevMode && assertDataInRange(lView, adjustedElementIndex);
7235
7677
  var hostView = getComponentViewByIndex(adjustedElementIndex, lView);
7236
7678
  ngDevMode && assertNodeType(lView[TVIEW].data[adjustedElementIndex], 3 /* Element */);
7237
7679
  // Only attached CheckAlways components or attached, dirty OnPush components should be checked
7238
- if (viewAttached(hostView) && hostView[FLAGS] & (2 /* CheckAlways */ | 4 /* Dirty */)) {
7680
+ if (viewAttached(hostView) && hostView[FLAGS] & (4 /* CheckAlways */ | 8 /* Dirty */)) {
7239
7681
  syncViewWithBlueprint(hostView);
7240
- detectChangesInternal(hostView, hostView[CONTEXT], rf);
7682
+ checkView(hostView, hostView[CONTEXT]);
7241
7683
  }
7242
7684
  }
7243
7685
  /**
@@ -7274,7 +7716,7 @@ function syncViewWithBlueprint(componentView) {
7274
7716
  }
7275
7717
  /** Returns a boolean for whether the view is attached */
7276
7718
  function viewAttached(view) {
7277
- return (view[FLAGS] & 8 /* Attached */) === 8 /* Attached */;
7719
+ return (view[FLAGS] & 16 /* Attached */) === 16 /* Attached */;
7278
7720
  }
7279
7721
  /**
7280
7722
  * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
@@ -7410,8 +7852,8 @@ function addToViewTree(lView, adjustedHostIndex, state) {
7410
7852
  /** If node is an OnPush component, marks its LView dirty. */
7411
7853
  function markDirtyIfOnPush(lView, viewIndex) {
7412
7854
  var childComponentLView = getComponentViewByIndex(viewIndex, lView);
7413
- if (!(childComponentLView[FLAGS] & 2 /* CheckAlways */)) {
7414
- childComponentLView[FLAGS] |= 4 /* Dirty */;
7855
+ if (!(childComponentLView[FLAGS] & 4 /* CheckAlways */)) {
7856
+ childComponentLView[FLAGS] |= 8 /* Dirty */;
7415
7857
  }
7416
7858
  }
7417
7859
  /** Wraps an event listener with preventDefault behavior. */
@@ -7426,11 +7868,11 @@ function wrapListenerWithPreventDefault(listenerFn) {
7426
7868
  }
7427
7869
  /** Marks current view and all ancestors dirty */
7428
7870
  function markViewDirty(lView) {
7429
- while (lView && !(lView[FLAGS] & 64 /* IsRoot */)) {
7430
- lView[FLAGS] |= 4 /* Dirty */;
7871
+ while (lView && !(lView[FLAGS] & 128 /* IsRoot */)) {
7872
+ lView[FLAGS] |= 8 /* Dirty */;
7431
7873
  lView = lView[PARENT];
7432
7874
  }
7433
- lView[FLAGS] |= 4 /* Dirty */;
7875
+ lView[FLAGS] |= 8 /* Dirty */;
7434
7876
  ngDevMode && assertDefined(lView[CONTEXT], 'rootContext should be defined');
7435
7877
  var rootContext = lView[CONTEXT];
7436
7878
  scheduleTick(rootContext, 1 /* DetectChanges */);
@@ -7472,7 +7914,7 @@ function scheduleTick(rootContext, flags) {
7472
7914
  function tickRootContext(rootContext) {
7473
7915
  for (var i = 0; i < rootContext.components.length; i++) {
7474
7916
  var rootComponent = rootContext.components[i];
7475
- renderComponentOrTemplate(readPatchedLView(rootComponent), rootComponent, 2 /* Update */);
7917
+ renderComponentOrTemplate(readPatchedLView(rootComponent), rootComponent);
7476
7918
  }
7477
7919
  }
7478
7920
  /**
@@ -7489,7 +7931,19 @@ function tickRootContext(rootContext) {
7489
7931
  * @param component The component which the change detection should be performed on.
7490
7932
  */
7491
7933
  function detectChanges(component) {
7492
- detectChangesInternal(getComponentViewByInstance(component), component, null);
7934
+ var view = getComponentViewByInstance(component);
7935
+ detectChangesInternal(view, component);
7936
+ }
7937
+ function detectChangesInternal(view, context) {
7938
+ var rendererFactory = view[RENDERER_FACTORY];
7939
+ if (rendererFactory.begin)
7940
+ rendererFactory.begin();
7941
+ if (isCreationMode(view)) {
7942
+ checkView(view, context); // creation mode pass
7943
+ }
7944
+ checkView(view, context); // update mode pass
7945
+ if (rendererFactory.end)
7946
+ rendererFactory.end();
7493
7947
  }
7494
7948
  /**
7495
7949
  * Synchronously perform change detection on a root view and its components.
@@ -7533,30 +7987,29 @@ function checkNoChangesInRootView(lView) {
7533
7987
  }
7534
7988
  }
7535
7989
  /** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */
7536
- function detectChangesInternal(hostView, component, rf) {
7990
+ function checkView(hostView, component) {
7537
7991
  var hostTView = hostView[TVIEW];
7538
7992
  var oldView = enterView(hostView, hostView[HOST_NODE]);
7539
7993
  var templateFn = hostTView.template;
7540
7994
  var viewQuery = hostTView.viewQuery;
7541
7995
  try {
7542
7996
  namespaceHTML();
7543
- createViewQuery(viewQuery, rf, hostView[FLAGS], component);
7544
- templateFn(rf || getRenderFlags(hostView), component);
7545
- refreshDescendantViews(hostView, rf);
7546
- updateViewQuery(viewQuery, hostView[FLAGS], component);
7997
+ createViewQuery(viewQuery, hostView, component);
7998
+ templateFn(getRenderFlags(hostView), component);
7999
+ refreshDescendantViews(hostView);
8000
+ updateViewQuery(viewQuery, hostView, component);
7547
8001
  }
7548
8002
  finally {
7549
- leaveView(oldView, rf === 1 /* Create */);
8003
+ leaveView(oldView);
7550
8004
  }
7551
8005
  }
7552
- function createViewQuery(viewQuery, renderFlags, viewFlags, component) {
7553
- if (viewQuery && (renderFlags === 1 /* Create */ ||
7554
- (renderFlags === null && (viewFlags & 1 /* CreationMode */)))) {
8006
+ function createViewQuery(viewQuery, view, component) {
8007
+ if (viewQuery && isCreationMode(view)) {
7555
8008
  viewQuery(1 /* Create */, component);
7556
8009
  }
7557
8010
  }
7558
- function updateViewQuery(viewQuery, flags, component) {
7559
- if (viewQuery && flags & 2 /* Update */) {
8011
+ function updateViewQuery(viewQuery, view, component) {
8012
+ if (viewQuery && !isCreationMode(view)) {
7560
8013
  viewQuery(2 /* Update */, component);
7561
8014
  }
7562
8015
  }
@@ -7799,9 +8252,6 @@ function initializeTNodeInputs(tNode) {
7799
8252
  }
7800
8253
  return null;
7801
8254
  }
7802
- function delegateToClassInput(tNode) {
7803
- return tNode.flags & 8 /* hasClassInput */;
7804
- }
7805
8255
  /**
7806
8256
  * Returns the current OpaqueViewState instance.
7807
8257
  *
@@ -7975,8 +8425,8 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
7975
8425
  // The first index of the first selector is the tag name.
7976
8426
  var componentTag = componentDef.selectors[0][0];
7977
8427
  var hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);
7978
- var rootFlags = componentDef.onPush ? 4 /* Dirty */ | 64 /* IsRoot */ :
7979
- 2 /* CheckAlways */ | 64 /* IsRoot */;
8428
+ var rootFlags = componentDef.onPush ? 8 /* Dirty */ | 128 /* IsRoot */ :
8429
+ 4 /* CheckAlways */ | 128 /* IsRoot */;
7980
8430
  var rootContext = createRootContext(opts.scheduler, opts.playerHandler);
7981
8431
  var renderer = rendererFactory.createRenderer(hostRNode, componentDef);
7982
8432
  var rootView = createLView(null, createTView(-1, null, 1, 0, null, null, null), rootContext, rootFlags, rendererFactory, renderer, undefined, opts.injector || null);
@@ -7987,7 +8437,9 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
7987
8437
  rendererFactory.begin();
7988
8438
  var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);
7989
8439
  component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);
7990
- refreshDescendantViews(rootView, null);
8440
+ refreshDescendantViews(rootView); // creation mode pass
8441
+ rootView[FLAGS] &= ~1 /* CreationMode */;
8442
+ refreshDescendantViews(rootView); // update mode pass
7991
8443
  }
7992
8444
  finally {
7993
8445
  leaveView(oldView);
@@ -8010,7 +8462,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
8010
8462
  function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {
8011
8463
  resetComponentState();
8012
8464
  var tView = rootView[TVIEW];
8013
- var componentView = createLView(rootView, getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, rendererFactory, renderer, sanitizer);
8465
+ var componentView = createLView(rootView, getOrCreateTView(def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 8 /* Dirty */ : 4 /* CheckAlways */, rendererFactory, renderer, sanitizer);
8014
8466
  var tNode = createNodeAtIndex(0, 3 /* Element */, rNode, null, null);
8015
8467
  if (tView.firstTemplatePass) {
8016
8468
  diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);
@@ -8275,7 +8727,7 @@ function InheritDefinitionFeature(definition) {
8275
8727
  }
8276
8728
  }
8277
8729
  function maybeUnwrapEmpty(value) {
8278
- if (value === EMPTY) {
8730
+ if (value === EMPTY_OBJ) {
8279
8731
  return {};
8280
8732
  }
8281
8733
  else if (value === EMPTY_ARRAY) {
@@ -8499,7 +8951,7 @@ var SWITCH_INJECTOR_FACTORY = SWITCH_INJECTOR_FACTORY__PRE_R3__;
8499
8951
  var IDENT = function (value) {
8500
8952
  return value;
8501
8953
  };
8502
- var EMPTY$1 = [];
8954
+ var EMPTY = [];
8503
8955
  var CIRCULAR = IDENT;
8504
8956
  var MULTI_PROVIDER_FN = function () {
8505
8957
  return Array.prototype.slice.call(arguments);
@@ -8517,8 +8969,8 @@ var StaticInjector = /** @class */ (function () {
8517
8969
  this.parent = parent;
8518
8970
  this.source = source;
8519
8971
  var records = this._records = new Map();
8520
- records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY$1, value: this, useNew: false });
8521
- records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY$1, value: this, useNew: false });
8972
+ records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });
8973
+ records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY, value: this, useNew: false });
8522
8974
  recursivelyProcessProviders(records, providers);
8523
8975
  }
8524
8976
  StaticInjector.prototype.get = function (token, notFoundValue, flags) {
@@ -8548,7 +9000,7 @@ var StaticInjector = /** @class */ (function () {
8548
9000
  function resolveProvider(provider) {
8549
9001
  var deps = computeDeps(provider);
8550
9002
  var fn = IDENT;
8551
- var value = EMPTY$1;
9003
+ var value = EMPTY;
8552
9004
  var useNew = false;
8553
9005
  var provide = resolveForwardRef(provider.provide);
8554
9006
  if (USE_VALUE in provider) {
@@ -8608,7 +9060,7 @@ function recursivelyProcessProviders(records, provider) {
8608
9060
  deps: [],
8609
9061
  useNew: false,
8610
9062
  fn: MULTI_PROVIDER_FN,
8611
- value: EMPTY$1
9063
+ value: EMPTY
8612
9064
  });
8613
9065
  }
8614
9066
  // Treat the provider as the token.
@@ -8639,7 +9091,7 @@ function tryResolveToken(token, record, records, parent, notFoundValue, flags) {
8639
9091
  path.unshift(token);
8640
9092
  if (record && record.value == CIRCULAR) {
8641
9093
  // Reset the Circular flag.
8642
- record.value = EMPTY$1;
9094
+ record.value = EMPTY;
8643
9095
  }
8644
9096
  throw e;
8645
9097
  }
@@ -8654,13 +9106,13 @@ function resolveToken(token, record, records, parent, notFoundValue, flags) {
8654
9106
  if (value == CIRCULAR) {
8655
9107
  throw Error(NO_NEW_LINE + 'Circular dependency');
8656
9108
  }
8657
- else if (value === EMPTY$1) {
9109
+ else if (value === EMPTY) {
8658
9110
  record.value = CIRCULAR;
8659
9111
  var obj = undefined;
8660
9112
  var useNew = record.useNew;
8661
9113
  var fn = record.fn;
8662
9114
  var depRecords = record.deps;
8663
- var deps = EMPTY$1;
9115
+ var deps = EMPTY;
8664
9116
  if (depRecords.length) {
8665
9117
  deps = [];
8666
9118
  for (var i = 0; i < depRecords.length; i++) {
@@ -8689,7 +9141,7 @@ function resolveToken(token, record, records, parent, notFoundValue, flags) {
8689
9141
  return value;
8690
9142
  }
8691
9143
  function computeDeps(provider) {
8692
- var deps = EMPTY$1;
9144
+ var deps = EMPTY;
8693
9145
  var providerDeps = provider.deps;
8694
9146
  if (providerDeps && providerDeps.length) {
8695
9147
  deps = [];
@@ -9549,7 +10001,7 @@ var ViewRef = /** @class */ (function () {
9549
10001
  });
9550
10002
  Object.defineProperty(ViewRef.prototype, "destroyed", {
9551
10003
  get: function () {
9552
- return (this._lView[FLAGS] & 32 /* Destroyed */) === 32 /* Destroyed */;
10004
+ return (this._lView[FLAGS] & 64 /* Destroyed */) === 64 /* Destroyed */;
9553
10005
  },
9554
10006
  enumerable: true,
9555
10007
  configurable: true
@@ -9656,7 +10108,7 @@ var ViewRef = /** @class */ (function () {
9656
10108
  * }
9657
10109
  * ```
9658
10110
  */
9659
- ViewRef.prototype.detach = function () { this._lView[FLAGS] &= ~8 /* Attached */; };
10111
+ ViewRef.prototype.detach = function () { this._lView[FLAGS] &= ~16 /* Attached */; };
9660
10112
  /**
9661
10113
  * Re-attaches a view to the change detection tree.
9662
10114
  *
@@ -9713,7 +10165,7 @@ var ViewRef = /** @class */ (function () {
9713
10165
  * }
9714
10166
  * ```
9715
10167
  */
9716
- ViewRef.prototype.reattach = function () { this._lView[FLAGS] |= 8 /* Attached */; };
10168
+ ViewRef.prototype.reattach = function () { this._lView[FLAGS] |= 16 /* Attached */; };
9717
10169
  /**
9718
10170
  * Checks the view and its children.
9719
10171
  *
@@ -9735,16 +10187,7 @@ var ViewRef = /** @class */ (function () {
9735
10187
  *
9736
10188
  * See {@link ChangeDetectorRef#detach detach} for more information.
9737
10189
  */
9738
- ViewRef.prototype.detectChanges = function () {
9739
- var rendererFactory = this._lView[RENDERER_FACTORY];
9740
- if (rendererFactory.begin) {
9741
- rendererFactory.begin();
9742
- }
9743
- detectChangesInternal(this._lView, this.context, null);
9744
- if (rendererFactory.end) {
9745
- rendererFactory.end();
9746
- }
9747
- };
10190
+ ViewRef.prototype.detectChanges = function () { detectChangesInternal(this._lView, this.context); };
9748
10191
  /**
9749
10192
  * Checks the change detector and its children, and throws if any changes are detected.
9750
10193
  *
@@ -9874,7 +10317,7 @@ function createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostVie
9874
10317
  if (container$$1) {
9875
10318
  insertView(lView, container$$1, hostView, index, hostTNode.index);
9876
10319
  }
9877
- renderEmbeddedTemplate(lView, this._tView, context, 1 /* Create */);
10320
+ renderEmbeddedTemplate(lView, this._tView, context);
9878
10321
  var viewRef = new ViewRef(lView, context, -1);
9879
10322
  viewRef._tViewNode = lView[HOST_NODE];
9880
10323
  return viewRef;
@@ -9943,7 +10386,7 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
9943
10386
  var parentView = getParentInjectorView(parentLocation, this._hostView);
9944
10387
  var parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);
9945
10388
  return !hasParentInjector(parentLocation) || parentTNode == null ?
9946
- new NullInjector() :
10389
+ new NodeInjector(null, this._hostView) :
9947
10390
  new NodeInjector(parentTNode, parentView);
9948
10391
  },
9949
10392
  enumerable: true,
@@ -10299,7 +10742,7 @@ var Version = /** @class */ (function () {
10299
10742
  /**
10300
10743
  * @publicApi
10301
10744
  */
10302
- var VERSION = new Version('7.2.0-rc.0');
10745
+ var VERSION = new Version('7.2.3');
10303
10746
 
10304
10747
  /**
10305
10748
  * @license
@@ -10406,8 +10849,8 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
10406
10849
  var hostRNode = isInternalRootView ?
10407
10850
  elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef)) :
10408
10851
  locateHostElement(rendererFactory, rootSelectorOrNode);
10409
- var rootFlags = this.componentDef.onPush ? 4 /* Dirty */ | 64 /* IsRoot */ :
10410
- 2 /* CheckAlways */ | 64 /* IsRoot */;
10852
+ var rootFlags = this.componentDef.onPush ? 8 /* Dirty */ | 128 /* IsRoot */ :
10853
+ 4 /* CheckAlways */ | 128 /* IsRoot */;
10411
10854
  var rootContext = !isInternalRootView ? rootViewInjector.get(ROOT_CONTEXT) : createRootContext();
10412
10855
  var renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);
10413
10856
  if (rootSelectorOrNode && hostRNode) {
@@ -10460,10 +10903,10 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
10460
10903
  // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref
10461
10904
  component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);
10462
10905
  addToViewTree(rootLView, HEADER_OFFSET, componentView);
10463
- refreshDescendantViews(rootLView, 1 /* Create */);
10906
+ refreshDescendantViews(rootLView);
10464
10907
  }
10465
10908
  finally {
10466
- leaveView(oldLView, true);
10909
+ leaveView(oldLView);
10467
10910
  if (rendererFactory.end)
10468
10911
  rendererFactory.end();
10469
10912
  }
@@ -10624,7 +11067,7 @@ var InertBodyHelper = /** @class */ (function () {
10624
11067
  try {
10625
11068
  html = encodeURI(html);
10626
11069
  }
10627
- catch (e) {
11070
+ catch (_a) {
10628
11071
  return null;
10629
11072
  }
10630
11073
  var xhr = new XMLHttpRequest();
@@ -10653,7 +11096,7 @@ var InertBodyHelper = /** @class */ (function () {
10653
11096
  body.removeChild(body.firstChild);
10654
11097
  return body;
10655
11098
  }
10656
- catch (e) {
11099
+ catch (_a) {
10657
11100
  return null;
10658
11101
  }
10659
11102
  };
@@ -10716,7 +11159,7 @@ function isDOMParserAvailable() {
10716
11159
  try {
10717
11160
  return !!window.DOMParser;
10718
11161
  }
10719
- catch (e) {
11162
+ catch (_a) {
10720
11163
  return false;
10721
11164
  }
10722
11165
  }
@@ -11008,7 +11451,7 @@ function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
11008
11451
  var sanitizer = new SanitizingHtmlSerializer();
11009
11452
  var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);
11010
11453
  if (isDevMode() && sanitizer.sanitizedSomething) {
11011
- console.warn('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');
11454
+ console.warn('WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');
11012
11455
  }
11013
11456
  return safeHtml;
11014
11457
  }
@@ -11063,11 +11506,11 @@ var COMMENT_MARKER = {
11063
11506
  * found in the LICENSE file at https://angular.io/license
11064
11507
  */
11065
11508
  var MARKER = "\uFFFD";
11066
- var ICU_BLOCK_REGEX = /^\s*(�\d+�)\s*,\s*(select|plural)\s*,/;
11509
+ var ICU_BLOCK_REGEX = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/;
11067
11510
  var SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi;
11068
11511
  var PH_REGEXP = /�(\/?[#*]\d+):?\d*�/gi;
11069
11512
  var BINDING_REGEXP = /�(\d+):?\d*�/gi;
11070
- var ICU_REGEXP = /({\s*�\d+�\s*,\s*\S{6}\s*,[\s\S]*})/gi;
11513
+ var ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi;
11071
11514
  // i18nPostproocess regexps
11072
11515
  var PP_PLACEHOLDERS = /\[(�.+?�?)\]/g;
11073
11516
  var PP_ICU_VARS = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g;
@@ -12600,7 +13043,7 @@ function pureFunction0(slotOffset, pureFn, thisArg) {
12600
13043
  // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
12601
13044
  var bindingIndex = getBindingRoot() + slotOffset;
12602
13045
  var lView = getLView();
12603
- return getCreationMode() ?
13046
+ return isCreationMode() ?
12604
13047
  updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :
12605
13048
  getBinding(lView, bindingIndex);
12606
13049
  }
@@ -12854,7 +13297,7 @@ function pipe(index, pipeName) {
12854
13297
  */
12855
13298
  function getPipeDef$1(name, registry) {
12856
13299
  if (registry) {
12857
- for (var i = 0; i < registry.length; i++) {
13300
+ for (var i = registry.length - 1; i >= 0; i--) {
12858
13301
  var pipeDef = registry[i];
12859
13302
  if (name === pipeDef.name) {
12860
13303
  return pipeDef;
@@ -13281,7 +13724,7 @@ function queryByReadToken(read, tNode, currentView) {
13281
13724
  return factoryFn();
13282
13725
  }
13283
13726
  else {
13284
- var matchingIdx = locateDirectiveOrProvider(tNode, currentView, read, false);
13727
+ var matchingIdx = locateDirectiveOrProvider(tNode, currentView, read, false, false);
13285
13728
  if (matchingIdx !== null) {
13286
13729
  return getNodeInjectable(currentView[TVIEW].data, currentView, matchingIdx, tNode);
13287
13730
  }
@@ -13326,7 +13769,7 @@ function add(query, tNode) {
13326
13769
  result = queryByTemplateRef(type, tNode, currentView, predicate.read);
13327
13770
  }
13328
13771
  else {
13329
- var matchingIdx = locateDirectiveOrProvider(tNode, currentView, type, false);
13772
+ var matchingIdx = locateDirectiveOrProvider(tNode, currentView, type, false, false);
13330
13773
  if (matchingIdx !== null) {
13331
13774
  result = queryRead(tNode, currentView, predicate.read, matchingIdx);
13332
13775
  }
@@ -13890,6 +14333,7 @@ var angularCoreEnv = {
13890
14333
  'ɵload': load,
13891
14334
  'ɵprojection': projection,
13892
14335
  'ɵelementProperty': elementProperty,
14336
+ 'ɵcomponentHostSyntheticProperty': componentHostSyntheticProperty,
13893
14337
  'ɵpipeBind1': pipeBind1,
13894
14338
  'ɵpipeBind2': pipeBind2,
13895
14339
  'ɵpipeBind3': pipeBind3,
@@ -13902,6 +14346,7 @@ var angularCoreEnv = {
13902
14346
  'ɵregisterContentQuery': registerContentQuery,
13903
14347
  'ɵreference': reference,
13904
14348
  'ɵelementStyling': elementStyling,
14349
+ 'ɵelementHostAttrs': elementHostAttrs,
13905
14350
  'ɵelementStylingMap': elementStylingMap,
13906
14351
  'ɵelementStyleProp': elementStyleProp,
13907
14352
  'ɵelementStylingApply': elementStylingApply,
@@ -14399,10 +14844,12 @@ function compileNgModuleDefs(moduleType, ngModule) {
14399
14844
  if (ngModuleDef === null) {
14400
14845
  ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, "ng://" + moduleType.name + "/ngModuleDef.js", {
14401
14846
  type: moduleType,
14402
- bootstrap: flatten$1(ngModule.bootstrap || EMPTY_ARRAY$2),
14403
- declarations: declarations,
14404
- imports: flatten$1(ngModule.imports || EMPTY_ARRAY$2).map(expandModuleWithProviders),
14405
- exports: flatten$1(ngModule.exports || EMPTY_ARRAY$2).map(expandModuleWithProviders),
14847
+ bootstrap: flatten$1(ngModule.bootstrap || EMPTY_ARRAY$2, resolveForwardRef),
14848
+ declarations: declarations.map(resolveForwardRef),
14849
+ imports: flatten$1(ngModule.imports || EMPTY_ARRAY$2, resolveForwardRef)
14850
+ .map(expandModuleWithProviders),
14851
+ exports: flatten$1(ngModule.exports || EMPTY_ARRAY$2, resolveForwardRef)
14852
+ .map(expandModuleWithProviders),
14406
14853
  emitInline: true,
14407
14854
  });
14408
14855
  }
@@ -14423,8 +14870,8 @@ function compileNgModuleDefs(moduleType, ngModule) {
14423
14870
  deps: reflectDependencies(moduleType),
14424
14871
  providers: ngModule.providers || EMPTY_ARRAY$2,
14425
14872
  imports: [
14426
- ngModule.imports || EMPTY_ARRAY$2,
14427
- ngModule.exports || EMPTY_ARRAY$2,
14873
+ (ngModule.imports || EMPTY_ARRAY$2).map(resolveForwardRef),
14874
+ (ngModule.exports || EMPTY_ARRAY$2).map(resolveForwardRef),
14428
14875
  ],
14429
14876
  };
14430
14877
  ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng://" + moduleType.name + "/ngInjectorDef.js", meta);
@@ -14443,7 +14890,7 @@ function verifySemanticsOfNgModuleDef(moduleType) {
14443
14890
  var ngModuleDef = getNgModuleDef(moduleType, true);
14444
14891
  var errors = [];
14445
14892
  ngModuleDef.declarations.forEach(verifyDeclarationsHaveDefinitions);
14446
- var combinedDeclarations = __spread(ngModuleDef.declarations, flatten$1(ngModuleDef.imports.map(computeCombinedExports)));
14893
+ var combinedDeclarations = __spread(ngModuleDef.declarations.map(resolveForwardRef), flatten$1(ngModuleDef.imports.map(computeCombinedExports), resolveForwardRef));
14447
14894
  ngModuleDef.exports.forEach(verifyExportsAreDeclaredOrReExported);
14448
14895
  ngModuleDef.declarations.forEach(verifyDeclarationIsUnique);
14449
14896
  ngModuleDef.declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);
@@ -14732,9 +15179,9 @@ function compileComponent(type, metadata) {
14732
15179
  var compiler = getCompilerFacade();
14733
15180
  if (ngComponentDef === null) {
14734
15181
  if (componentNeedsResolution(metadata)) {
14735
- var error = ["Component '" + stringify(type) + "' is not resolved:"];
15182
+ var error = ["Component '" + stringify$1(type) + "' is not resolved:"];
14736
15183
  if (metadata.templateUrl) {
14737
- error.push(" - templateUrl: " + stringify(metadata.templateUrl));
15184
+ error.push(" - templateUrl: " + stringify$1(metadata.templateUrl));
14738
15185
  }
14739
15186
  if (metadata.styleUrls && metadata.styleUrls.length) {
14740
15187
  error.push(" - styleUrls: " + JSON.stringify(metadata.styleUrls));
@@ -14742,8 +15189,8 @@ function compileComponent(type, metadata) {
14742
15189
  error.push("Did you run and wait for 'resolveComponentResources()'?");
14743
15190
  throw new Error(error.join('\n'));
14744
15191
  }
14745
- var meta = __assign({}, directiveMetadata(type, metadata), { template: metadata.template || '', preserveWhitespaces: metadata.preserveWhitespaces || false, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, viewQueries: extractQueriesMetadata(type, getReflect().propMetadata(type), isViewQuery), directives: [], pipes: new Map(), encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });
14746
- ngComponentDef = compiler.compileComponent(angularCoreEnv, "ng://" + stringify(type) + "/template.html", meta);
15192
+ var meta = __assign({}, directiveMetadata(type, metadata), { template: metadata.template || '', preserveWhitespaces: metadata.preserveWhitespaces || false, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, viewQueries: extractQueriesMetadata(type, getReflect().propMetadata(type), isViewQuery), directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });
15193
+ ngComponentDef = compiler.compileComponent(angularCoreEnv, "ng://" + stringify$1(type) + "/template.html", meta);
14747
15194
  // When NgModule decorator executed, we enqueued the module definition such that
14748
15195
  // it would only dequeue and add itself as module scope to all of its declarations,
14749
15196
  // but only if if all of its declarations had resolved. This call runs the check
@@ -14805,7 +15252,7 @@ function directiveMetadata(type, metadata) {
14805
15252
  typeArgumentCount: 0,
14806
15253
  selector: metadata.selector,
14807
15254
  deps: reflectDependencies(type),
14808
- host: metadata.host || EMPTY_OBJ$1,
15255
+ host: metadata.host || EMPTY_OBJ,
14809
15256
  propMetadata: propMetadata,
14810
15257
  inputs: metadata.inputs || EMPTY_ARRAY,
14811
15258
  outputs: metadata.outputs || EMPTY_ARRAY,
@@ -14819,9 +15266,8 @@ function directiveMetadata(type, metadata) {
14819
15266
  providers: metadata.providers || null,
14820
15267
  };
14821
15268
  }
14822
- var EMPTY_OBJ$1 = {};
14823
15269
  function convertToR3QueryPredicate(selector) {
14824
- return typeof selector === 'string' ? splitByComma(selector) : selector;
15270
+ return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);
14825
15271
  }
14826
15272
  function convertToR3QueryMetadata(propertyName, ann) {
14827
15273
  return {
@@ -14840,7 +15286,7 @@ function extractQueriesMetadata(type, propMetadata, isQueryAnn) {
14840
15286
  if (isQueryAnn(ann)) {
14841
15287
  if (!ann.selector) {
14842
15288
  throw new Error("Can't construct a query for the property \"" + field + "\" of " +
14843
- ("\"" + stringify(type) + "\" since the query selector wasn't defined."));
15289
+ ("\"" + stringify$1(type) + "\" since the query selector wasn't defined."));
14844
15290
  }
14845
15291
  queriesMeta.push(convertToR3QueryMetadata(field, ann));
14846
15292
  }
@@ -18304,8 +18750,8 @@ var DebugElement__POST_R3__ = /** @class */ (function (_super) {
18304
18750
  var lNode = lContext.lView[lContext.nodeIndex];
18305
18751
  var stylingContext = getStylingContext(lContext.nodeIndex, lContext.lView);
18306
18752
  if (stylingContext) {
18307
- for (var i = 8 /* SingleStylesStartPosition */; i < lNode.length; i += 4 /* Size */) {
18308
- if (isClassBased(lNode, i)) {
18753
+ for (var i = 9 /* SingleStylesStartPosition */; i < lNode.length; i += 4 /* Size */) {
18754
+ if (isClassBasedValue(lNode, i)) {
18309
18755
  var className = getProp(lNode, i);
18310
18756
  var value = getValue(lNode, i);
18311
18757
  if (typeof value == 'boolean') {
@@ -18337,8 +18783,8 @@ var DebugElement__POST_R3__ = /** @class */ (function (_super) {
18337
18783
  var lNode = lContext.lView[lContext.nodeIndex];
18338
18784
  var stylingContext = getStylingContext(lContext.nodeIndex, lContext.lView);
18339
18785
  if (stylingContext) {
18340
- for (var i = 8 /* SingleStylesStartPosition */; i < lNode.length; i += 4 /* Size */) {
18341
- if (!isClassBased(lNode, i)) {
18786
+ for (var i = 9 /* SingleStylesStartPosition */; i < lNode.length; i += 4 /* Size */) {
18787
+ if (!isClassBasedValue(lNode, i)) {
18342
18788
  var styleName = getProp(lNode, i);
18343
18789
  var value = getValue(lNode, i);
18344
18790
  if (value !== null) {
@@ -23939,5 +24385,5 @@ var NgModuleFactory_ = /** @class */ (function (_super) {
23939
24385
  * Generated bundle index. Do not edit.
23940
24386
  */
23941
24387
 
23942
- export { APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_s, _iterableDiffersFactory as ɵangular_packages_core_core_p, _keyValueDiffersFactory as ɵangular_packages_core_core_q, _localeFactory as ɵangular_packages_core_core_r, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, DefaultIterableDifferFactory as ɵangular_packages_core_core_n, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_o, DebugElement__PRE_R3__ as ɵangular_packages_core_core_m, DebugNode__PRE_R3__ as ɵangular_packages_core_core_l, injectInjectorOnly as ɵangular_packages_core_core_c, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k, wtfEnabled as ɵangular_packages_core_core_t, createScope as ɵangular_packages_core_core_v, detectWTF as ɵangular_packages_core_core_u, endTimeRange as ɵangular_packages_core_core_y, leave as ɵangular_packages_core_core_w, startTimeRange as ɵangular_packages_core_core_x, injectAttributeImpl as ɵangular_packages_core_core_bb, NG_INJECTABLE_DEF as ɵangular_packages_core_core_bi, getLView as ɵangular_packages_core_core_bc, getPreviousOrParentTNode as ɵangular_packages_core_core_bd, nextContextImpl as ɵangular_packages_core_core_be, BoundPlayerFactory as ɵangular_packages_core_core_bh, loadInternal as ɵangular_packages_core_core_bl, createElementRef as ɵangular_packages_core_core_h, createTemplateRef as ɵangular_packages_core_core_i, createViewRef as ɵangular_packages_core_core_j, makeParamDecorator as ɵangular_packages_core_core_a, makePropDecorator as ɵangular_packages_core_core_b, getClosureSafeProperty as ɵangular_packages_core_core_bj, _def as ɵangular_packages_core_core_z, DebugContext as ɵangular_packages_core_core_ba, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken, enableProdMode, isDevMode, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule, ViewEncapsulation, Version, VERSION, defineInjectable, defineInjector, forwardRef, resolveForwardRef, Injectable, INJECTOR$1 as INJECTOR, Injector, inject, InjectFlags, ReflectiveInjector, createInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, NoopNgZone as ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList$1 as QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef$1 as ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable, ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, Console as ɵConsole, getInjectableDef as ɵgetInjectableDef, inject as ɵinject, setCurrentInjector as ɵsetCurrentInjector, APP_ROOT as ɵAPP_ROOT, ivyEnabled as ɵivyEnabled, ComponentFactory as ɵComponentFactory, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, resolveComponentResources as ɵresolveComponentResources, ReflectionCapabilities as ɵReflectionCapabilities, RenderDebugInfo as ɵRenderDebugInfo, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, _global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify, makeDecorator as ɵmakeDecorator, isObservable as ɵisObservable, isPromise as ɵisPromise, clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR$1 as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, defineBase as ɵdefineBase, defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, defineNgModule as ɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, directiveInject as ɵdirectiveInject, injectAttribute as ɵinjectAttribute, getFactoryOf as ɵgetFactoryOf, getInheritedFactory as ɵgetInheritedFactory, templateRefExtractor as ɵtemplateRefExtractor, ProvidersFeature as ɵProvidersFeature, InheritDefinitionFeature as ɵInheritDefinitionFeature, NgOnChangesFeature as ɵNgOnChangesFeature, LifecycleHooksFeature as ɵLifecycleHooksFeature, NgModuleRef$1 as ɵRender3NgModuleRef, markDirty as ɵmarkDirty, NgModuleFactory$1 as ɵNgModuleFactory, NO_CHANGE as ɵNO_CHANGE, container as ɵcontainer, nextContext as ɵnextContext, elementStart as ɵelementStart, namespaceHTML as ɵnamespaceHTML, namespaceMathML as ɵnamespaceMathML, namespaceSVG as ɵnamespaceSVG, element as ɵelement, listener as ɵlistener, text as ɵtext, embeddedViewStart as ɵembeddedViewStart, query as ɵquery, registerContentQuery as ɵregisterContentQuery, projection as ɵprojection, bind as ɵbind, interpolation1 as ɵinterpolation1, interpolation2 as ɵinterpolation2, interpolation3 as ɵinterpolation3, interpolation4 as ɵinterpolation4, interpolation5 as ɵinterpolation5, interpolation6 as ɵinterpolation6, interpolation7 as ɵinterpolation7, interpolation8 as ɵinterpolation8, interpolationV as ɵinterpolationV, pipeBind1 as ɵpipeBind1, pipeBind2 as ɵpipeBind2, pipeBind3 as ɵpipeBind3, pipeBind4 as ɵpipeBind4, pipeBindV as ɵpipeBindV, pureFunction0 as ɵpureFunction0, pureFunction1 as ɵpureFunction1, pureFunction2 as ɵpureFunction2, pureFunction3 as ɵpureFunction3, pureFunction4 as ɵpureFunction4, pureFunction5 as ɵpureFunction5, pureFunction6 as ɵpureFunction6, pureFunction7 as ɵpureFunction7, pureFunction8 as ɵpureFunction8, pureFunctionV as ɵpureFunctionV, getCurrentView as ɵgetCurrentView, getHostElement as ɵgetHostElement, restoreView as ɵrestoreView, containerRefreshStart as ɵcontainerRefreshStart, containerRefreshEnd as ɵcontainerRefreshEnd, queryRefresh as ɵqueryRefresh, loadQueryList as ɵloadQueryList, elementEnd as ɵelementEnd, elementProperty as ɵelementProperty, projectionDef as ɵprojectionDef, reference as ɵreference, enableBindings as ɵenableBindings, disableBindings as ɵdisableBindings, allocHostVars as ɵallocHostVars, elementAttribute as ɵelementAttribute, elementContainerStart as ɵelementContainerStart, elementContainerEnd as ɵelementContainerEnd, elementStyling as ɵelementStyling, elementStylingMap as ɵelementStylingMap, elementStyleProp as ɵelementStyleProp, elementStylingApply as ɵelementStylingApply, elementClassProp as ɵelementClassProp, textBinding as ɵtextBinding, template as ɵtemplate, embeddedViewEnd as ɵembeddedViewEnd, store as ɵstore, load as ɵload, pipe as ɵpipe, whenRendered as ɵwhenRendered, i18n as ɵi18n, i18nAttributes as ɵi18nAttributes, i18nExp as ɵi18nExp, i18nStart as ɵi18nStart, i18nEnd as ɵi18nEnd, i18nApply as ɵi18nApply, i18nPostprocess as ɵi18nPostprocess, setClassMetadata as ɵsetClassMetadata, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, patchComponentDefWithScope as ɵpatchComponentDefWithScope, resetCompiledComponents as ɵresetCompiledComponents, compilePipe as ɵcompilePipe, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, getLContext as ɵgetLContext, bindPlayerFactory as ɵbindPlayerFactory, addPlayer as ɵaddPlayer, getPlayers as ɵgetPlayers, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, publishGlobalUtil as ɵpublishGlobalUtil, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, SWITCH_INJECTOR_FACTORY__POST_R3__ as ɵSWITCH_INJECTOR_FACTORY__POST_R3__, registerModuleFactory as ɵregisterModuleFactory, EMPTY_ARRAY$4 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, elementEventFullName as ɵelementEventFullName, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue$1 as ɵunv, viewDef as ɵvid };
24388
+ export { APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_s, _iterableDiffersFactory as ɵangular_packages_core_core_p, _keyValueDiffersFactory as ɵangular_packages_core_core_q, _localeFactory as ɵangular_packages_core_core_r, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, DefaultIterableDifferFactory as ɵangular_packages_core_core_n, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_o, DebugElement__PRE_R3__ as ɵangular_packages_core_core_m, DebugNode__PRE_R3__ as ɵangular_packages_core_core_l, injectInjectorOnly as ɵangular_packages_core_core_c, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k, wtfEnabled as ɵangular_packages_core_core_t, createScope as ɵangular_packages_core_core_v, detectWTF as ɵangular_packages_core_core_u, endTimeRange as ɵangular_packages_core_core_y, leave as ɵangular_packages_core_core_w, startTimeRange as ɵangular_packages_core_core_x, injectAttributeImpl as ɵangular_packages_core_core_bb, NG_INJECTABLE_DEF as ɵangular_packages_core_core_bi, getLView as ɵangular_packages_core_core_bc, getPreviousOrParentTNode as ɵangular_packages_core_core_bd, nextContextImpl as ɵangular_packages_core_core_be, BoundPlayerFactory as ɵangular_packages_core_core_bh, loadInternal as ɵangular_packages_core_core_bl, createElementRef as ɵangular_packages_core_core_h, createTemplateRef as ɵangular_packages_core_core_i, createViewRef as ɵangular_packages_core_core_j, makeParamDecorator as ɵangular_packages_core_core_a, makePropDecorator as ɵangular_packages_core_core_b, getClosureSafeProperty as ɵangular_packages_core_core_bj, _def as ɵangular_packages_core_core_z, DebugContext as ɵangular_packages_core_core_ba, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken, enableProdMode, isDevMode, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule, ViewEncapsulation, Version, VERSION, defineInjectable, defineInjector, forwardRef, resolveForwardRef, Injectable, INJECTOR$1 as INJECTOR, Injector, inject, inject as ɵinject, InjectFlags, ReflectiveInjector, createInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, NoopNgZone as ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentFactory as ɵComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList$1 as QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef$1 as ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable, ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, Console as ɵConsole, getInjectableDef as ɵgetInjectableDef, setCurrentInjector as ɵsetCurrentInjector, APP_ROOT as ɵAPP_ROOT, ivyEnabled as ɵivyEnabled, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, resolveComponentResources as ɵresolveComponentResources, ReflectionCapabilities as ɵReflectionCapabilities, RenderDebugInfo as ɵRenderDebugInfo, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, _global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify, makeDecorator as ɵmakeDecorator, isObservable as ɵisObservable, isPromise as ɵisPromise, clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR$1 as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, defineBase as ɵdefineBase, defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, defineNgModule as ɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, directiveInject as ɵdirectiveInject, injectAttribute as ɵinjectAttribute, getFactoryOf as ɵgetFactoryOf, getInheritedFactory as ɵgetInheritedFactory, templateRefExtractor as ɵtemplateRefExtractor, ProvidersFeature as ɵProvidersFeature, InheritDefinitionFeature as ɵInheritDefinitionFeature, NgOnChangesFeature as ɵNgOnChangesFeature, LifecycleHooksFeature as ɵLifecycleHooksFeature, NgModuleRef$1 as ɵRender3NgModuleRef, markDirty as ɵmarkDirty, NgModuleFactory$1 as ɵNgModuleFactory, NO_CHANGE as ɵNO_CHANGE, container as ɵcontainer, nextContext as ɵnextContext, elementStart as ɵelementStart, namespaceHTML as ɵnamespaceHTML, namespaceMathML as ɵnamespaceMathML, namespaceSVG as ɵnamespaceSVG, element as ɵelement, listener as ɵlistener, text as ɵtext, embeddedViewStart as ɵembeddedViewStart, query as ɵquery, registerContentQuery as ɵregisterContentQuery, projection as ɵprojection, bind as ɵbind, interpolation1 as ɵinterpolation1, interpolation2 as ɵinterpolation2, interpolation3 as ɵinterpolation3, interpolation4 as ɵinterpolation4, interpolation5 as ɵinterpolation5, interpolation6 as ɵinterpolation6, interpolation7 as ɵinterpolation7, interpolation8 as ɵinterpolation8, interpolationV as ɵinterpolationV, pipeBind1 as ɵpipeBind1, pipeBind2 as ɵpipeBind2, pipeBind3 as ɵpipeBind3, pipeBind4 as ɵpipeBind4, pipeBindV as ɵpipeBindV, pureFunction0 as ɵpureFunction0, pureFunction1 as ɵpureFunction1, pureFunction2 as ɵpureFunction2, pureFunction3 as ɵpureFunction3, pureFunction4 as ɵpureFunction4, pureFunction5 as ɵpureFunction5, pureFunction6 as ɵpureFunction6, pureFunction7 as ɵpureFunction7, pureFunction8 as ɵpureFunction8, pureFunctionV as ɵpureFunctionV, getCurrentView as ɵgetCurrentView, getHostElement as ɵgetHostElement, restoreView as ɵrestoreView, containerRefreshStart as ɵcontainerRefreshStart, containerRefreshEnd as ɵcontainerRefreshEnd, queryRefresh as ɵqueryRefresh, loadQueryList as ɵloadQueryList, elementEnd as ɵelementEnd, elementProperty as ɵelementProperty, componentHostSyntheticProperty as ɵcomponentHostSyntheticProperty, projectionDef as ɵprojectionDef, reference as ɵreference, enableBindings as ɵenableBindings, disableBindings as ɵdisableBindings, allocHostVars as ɵallocHostVars, elementAttribute as ɵelementAttribute, elementContainerStart as ɵelementContainerStart, elementContainerEnd as ɵelementContainerEnd, elementStyling as ɵelementStyling, elementHostAttrs as ɵelementHostAttrs, elementStylingMap as ɵelementStylingMap, elementStyleProp as ɵelementStyleProp, elementStylingApply as ɵelementStylingApply, elementClassProp as ɵelementClassProp, textBinding as ɵtextBinding, template as ɵtemplate, embeddedViewEnd as ɵembeddedViewEnd, store as ɵstore, load as ɵload, pipe as ɵpipe, whenRendered as ɵwhenRendered, i18n as ɵi18n, i18nAttributes as ɵi18nAttributes, i18nExp as ɵi18nExp, i18nStart as ɵi18nStart, i18nEnd as ɵi18nEnd, i18nApply as ɵi18nApply, i18nPostprocess as ɵi18nPostprocess, setClassMetadata as ɵsetClassMetadata, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, patchComponentDefWithScope as ɵpatchComponentDefWithScope, resetCompiledComponents as ɵresetCompiledComponents, compilePipe as ɵcompilePipe, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, getLContext as ɵgetLContext, bindPlayerFactory as ɵbindPlayerFactory, addPlayer as ɵaddPlayer, getPlayers as ɵgetPlayers, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, publishGlobalUtil as ɵpublishGlobalUtil, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, SWITCH_INJECTOR_FACTORY__POST_R3__ as ɵSWITCH_INJECTOR_FACTORY__POST_R3__, registerModuleFactory as ɵregisterModuleFactory, EMPTY_ARRAY$4 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, elementEventFullName as ɵelementEventFullName, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue$1 as ɵunv, viewDef as ɵvid };
23943
24389
  //# sourceMappingURL=core.js.map