ember-source 6.12.0 → 7.0.0-alpha.1

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 (597) hide show
  1. package/blueprints/initializer-test/files/__root__/__testType__/__path__/__name__-test.ts +2 -2
  2. package/blueprints/instance-initializer-test/files/__root__/__testType__/__path__/__name__-test.ts +3 -3
  3. package/build-metadata.json +3 -3
  4. package/dist/{packages/shared-chunks/registry-XY5cfmbH.js → dev/packages/@ember/-internals/container/index.js} +28 -27
  5. package/dist/{packages → dev/packages}/@ember/-internals/deprecations/index.js +5 -16
  6. package/dist/{packages/shared-chunks/env-DEd6hPbj.js → dev/packages/@ember/-internals/environment/index.js} +31 -53
  7. package/dist/dev/packages/@ember/-internals/glimmer/index.js +42 -0
  8. package/dist/{packages → dev/packages}/@ember/-internals/meta/lib/meta.js +37 -38
  9. package/dist/dev/packages/@ember/-internals/metal/index.js +63 -0
  10. package/dist/{packages → dev/packages}/@ember/-internals/routing/index.js +7 -8
  11. package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/ext/rsvp.js +1 -2
  12. package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/-proxy.js +14 -15
  13. package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/action_handler.js +21 -9
  14. package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/registry_proxy.js +11 -2
  15. package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/target_action_support.js +22 -9
  16. package/dist/{packages → dev/packages}/@ember/-internals/string/index.js +1 -2
  17. package/dist/dev/packages/@ember/-internals/utils/index.js +34 -0
  18. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/compat/fallback-view-registry.js +1 -2
  19. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/mixins/action_support.js +16 -10
  20. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/system/event_dispatcher.js +19 -20
  21. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/system/utils.js +7 -23
  22. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/views/core_view.js +6 -7
  23. package/dist/{packages → dev/packages}/@ember/-internals/views/lib/views/states.js +3 -4
  24. package/dist/{packages → dev/packages}/@ember/application/index.js +50 -121
  25. package/dist/{packages → dev/packages}/@ember/application/instance.js +17 -17
  26. package/dist/{packages → dev/packages}/@ember/application/namespace.js +27 -9
  27. package/dist/{packages → dev/packages}/@ember/array/index.js +34 -25
  28. package/dist/{packages → dev/packages}/@ember/array/proxy.js +19 -20
  29. package/dist/{packages → dev/packages}/@ember/canary-features/index.js +1 -1
  30. package/dist/dev/packages/@ember/component/helper.js +14 -0
  31. package/dist/{packages → dev/packages}/@ember/component/index.js +12 -12
  32. package/dist/{packages → dev/packages}/@ember/component/template-only.js +6 -6
  33. package/dist/{packages → dev/packages}/@ember/controller/index.js +7 -9
  34. package/dist/{packages → dev/packages}/@ember/debug/container-debug-adapter.js +6 -7
  35. package/dist/{packages → dev/packages}/@ember/debug/data-adapter.js +6 -7
  36. package/dist/{packages → dev/packages}/@ember/debug/index.js +4 -11
  37. package/dist/{packages → dev/packages}/@ember/debug/lib/assert.js +1 -3
  38. package/dist/{packages → dev/packages}/@ember/debug/lib/deprecate.js +7 -3
  39. package/dist/{packages → dev/packages}/@ember/debug/lib/handlers.js +1 -3
  40. package/dist/{packages → dev/packages}/@ember/debug/lib/warn.js +1 -2
  41. package/dist/{packages → dev/packages}/@ember/engine/index.js +22 -22
  42. package/dist/dev/packages/@ember/engine/instance.js +200 -0
  43. package/dist/{packages → dev/packages}/@ember/helper/index.js +12 -11
  44. package/dist/{packages → dev/packages}/@ember/instrumentation/index.js +3 -8
  45. package/dist/dev/packages/@ember/modifier/index.js +23 -0
  46. package/dist/{packages → dev/packages}/@ember/modifier/on.js +6 -6
  47. package/dist/dev/packages/@ember/object/-internals.js +49 -0
  48. package/dist/{packages → dev/packages}/@ember/object/compat.js +11 -12
  49. package/dist/{packages → dev/packages}/@ember/object/computed.js +7 -8
  50. package/dist/{packages → dev/packages}/@ember/object/core.js +28 -29
  51. package/dist/{packages → dev/packages}/@ember/object/evented.js +7 -8
  52. package/dist/dev/packages/@ember/object/events.js +11 -0
  53. package/dist/{packages → dev/packages}/@ember/object/index.js +18 -19
  54. package/dist/{packages → dev/packages}/@ember/object/internals.js +1 -1
  55. package/dist/{packages → dev/packages}/@ember/object/lib/computed/computed_macros.js +30 -27
  56. package/dist/{packages → dev/packages}/@ember/object/lib/computed/reduce_computed_macros.js +36 -37
  57. package/dist/{packages → dev/packages}/@ember/object/mixin.js +15 -23
  58. package/dist/dev/packages/@ember/object/observable.js +181 -0
  59. package/dist/dev/packages/@ember/object/observers.js +11 -0
  60. package/dist/{packages → dev/packages}/@ember/object/promise-proxy-mixin.js +7 -8
  61. package/dist/dev/packages/@ember/renderer/index.js +14 -0
  62. package/dist/dev/packages/@ember/routing/-internals.js +22 -0
  63. package/dist/{packages → dev/packages}/@ember/routing/hash-location.js +1 -1
  64. package/dist/{packages → dev/packages}/@ember/routing/history-location.js +9 -25
  65. package/dist/dev/packages/@ember/routing/index.js +14 -0
  66. package/dist/{packages → dev/packages}/@ember/routing/lib/dsl.js +5 -6
  67. package/dist/{packages → dev/packages}/@ember/routing/lib/generate_controller.js +22 -10
  68. package/dist/{packages → dev/packages}/@ember/routing/lib/location-utils.js +3 -16
  69. package/dist/{packages → dev/packages}/@ember/routing/lib/routing-service.js +19 -9
  70. package/dist/{packages → dev/packages}/@ember/routing/lib/utils.js +12 -13
  71. package/dist/{packages → dev/packages}/@ember/routing/none-location.js +2 -4
  72. package/dist/{packages → dev/packages}/@ember/routing/route.js +38 -39
  73. package/dist/{packages → dev/packages}/@ember/routing/router-service.js +13 -14
  74. package/dist/{packages → dev/packages}/@ember/routing/router.js +63 -71
  75. package/dist/{packages → dev/packages}/@ember/runloop/index.js +9 -8
  76. package/dist/{packages → dev/packages}/@ember/service/index.js +6 -7
  77. package/dist/dev/packages/@ember/template/index.js +14 -0
  78. package/dist/{packages → dev/packages}/@ember/template-compilation/index.js +3 -3
  79. package/dist/dev/packages/@ember/template-compiler/index.js +2 -0
  80. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/compile-options.js +11 -6
  81. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/dasherize-component-name.js +1 -2
  82. package/dist/dev/packages/@ember/template-compiler/lib/plugins/allowed-globals.js +56 -0
  83. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-against-attrs.js +19 -3
  84. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +11 -2
  85. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +1 -2
  86. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +3 -4
  87. package/dist/dev/packages/@ember/template-compiler/lib/plugins/index.js +40 -0
  88. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-each-track-array.js +21 -2
  89. package/dist/dev/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +50 -0
  90. package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-resolutions.js +2 -3
  91. package/dist/dev/packages/@ember/template-compiler/lib/template.js +248 -0
  92. package/dist/dev/packages/@ember/template-factory/index.js +8 -0
  93. package/dist/dev/packages/@ember/test/index.js +18 -0
  94. package/dist/{packages → dev/packages}/@ember/utils/lib/compare.js +5 -6
  95. package/dist/{packages → dev/packages}/@ember/utils/lib/is_empty.js +6 -7
  96. package/dist/{packages → dev/packages}/@glimmer/destroyable/index.js +21 -16
  97. package/dist/{packages/shared-chunks/encoder-CT1wqYMF.js → dev/packages/@glimmer/encoder/index.js} +3 -4
  98. package/dist/{packages → dev/packages}/@glimmer/global-context/index.js +6 -5
  99. package/dist/{packages/shared-chunks/api-1B_9SjFR.js → dev/packages/@glimmer/manager/index.js} +17 -14
  100. package/dist/dev/packages/@glimmer/node/index.js +40 -0
  101. package/dist/{packages → dev/packages}/@glimmer/opcode-compiler/index.js +5 -6
  102. package/dist/dev/packages/@glimmer/program/index.js +12 -0
  103. package/dist/dev/packages/@glimmer/reference/index.js +208 -0
  104. package/dist/dev/packages/@glimmer/runtime/index.js +11 -0
  105. package/dist/dev/packages/@glimmer/tracking/index.js +137 -0
  106. package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +11 -0
  107. package/dist/{packages → dev/packages}/@glimmer/util/index.js +2 -3
  108. package/dist/{packages → dev/packages}/@glimmer/validator/index.js +304 -372
  109. package/dist/{packages → dev/packages}/@glimmer/vm/index.js +1 -1
  110. package/dist/{packages → dev/packages}/ember/version.js +2 -2
  111. package/dist/dev/packages/ember-template-compiler/index.js +109 -0
  112. package/dist/{packages → dev/packages}/ember-testing/index.js +1 -3
  113. package/dist/dev/packages/ember-testing/lib/public-api.js +2 -0
  114. package/dist/dev/packages/ember-testing/lib/test/pending_requests.js +10 -0
  115. package/dist/dev/packages/ember-testing/lib/test.js +25 -0
  116. package/dist/{packages/shared-chunks/router-DSi8WnDi.js → dev/packages/router_js/index.js} +120 -58
  117. package/dist/{packages/shared-chunks/alias-BEMS3qgG.js → dev/packages/shared-chunks/alias-CSC0WIbj.js} +4 -5
  118. package/dist/{packages/shared-chunks/api-CkUl6KyJ.js → dev/packages/shared-chunks/api-BqXkkT0p.js} +14 -16
  119. package/dist/{packages/shared-chunks/args-proxy-B91L3LRK.js → dev/packages/shared-chunks/args-proxy-DgXMc9b5.js} +7 -8
  120. package/dist/{packages/shared-chunks/array-BqYCCatg.js → dev/packages/shared-chunks/array-D8PfjQHi.js} +3 -4
  121. package/dist/dev/packages/shared-chunks/capabilities-O_xc7Yqk.js +34 -0
  122. package/dist/{packages/shared-chunks/collections-B8me-ZlQ.js → dev/packages/shared-chunks/collections-D_nY_0UJ.js} +1 -2
  123. package/dist/{packages/@ember/template-compiler/lib/template.js → dev/packages/shared-chunks/compiler-CNj62pww.js} +22 -243
  124. package/dist/{packages/shared-chunks/constants-oDhF27qL.js → dev/packages/shared-chunks/constants-eoaL3OJQ.js} +9 -9
  125. package/dist/{packages/shared-chunks/debug-to-string-BsFOvUtQ.js → dev/packages/shared-chunks/debug-to-string-CFb7h0lY.js} +1 -3
  126. package/dist/{packages/shared-chunks/dynamic-CuBsUXX8.js → dev/packages/shared-chunks/dynamic-CFg3dljk.js} +108 -134
  127. package/dist/{packages/shared-chunks/element-builder-BuVym8EM.js → dev/packages/shared-chunks/element-builder-BOxP8emt.js} +4 -5
  128. package/dist/{packages/shared-chunks/flags-BsZlvEeR.js → dev/packages/shared-chunks/flags-B9qxc-pB.js} +1 -1
  129. package/dist/{packages/shared-chunks/capabilities-DHiXCCuB.js → dev/packages/shared-chunks/fragment-Cc5k9Oy4.js} +2 -33
  130. package/dist/{packages/shared-chunks/index-ByyoGpfz.js → dev/packages/shared-chunks/index-PxU6E7q8.js} +658 -214
  131. package/dist/{packages/shared-chunks/index-CQkjwqTv.js → dev/packages/shared-chunks/index-Q7JnrdBn.js} +20 -19
  132. package/dist/dev/packages/shared-chunks/invoke-DxRPE05O.js +67 -0
  133. package/dist/{packages/shared-chunks/is_proxy-C2q5rUMp.js → dev/packages/shared-chunks/is_proxy-B0smdQy8.js} +1 -1
  134. package/dist/{packages/shared-chunks/mandatory-setter-DLKyVs4Q.js → dev/packages/shared-chunks/mandatory-setter-DHZe7-kW.js} +47 -48
  135. package/dist/{packages/shared-chunks/name-DVtQREj6.js → dev/packages/shared-chunks/name-Z7dpqvzn.js} +1 -1
  136. package/dist/{packages/shared-chunks/namespace_search-ClQOZuFA.js → dev/packages/shared-chunks/namespace_search-uT8odThF.js} +3 -4
  137. package/dist/{packages/shared-chunks/observers-DhgQ6ba5.js → dev/packages/shared-chunks/observers-Bj9qLVau.js} +231 -87
  138. package/dist/{packages/shared-chunks/program-CcLlGnAU.js → dev/packages/shared-chunks/program-DfV0v8aa.js} +4 -6
  139. package/dist/{packages/shared-chunks/program-context-CZJnCFdo.js → dev/packages/shared-chunks/program-context-BRjCC_BA.js} +2 -2
  140. package/dist/{packages/shared-chunks/property_set-DrZnfGQ7.js → dev/packages/shared-chunks/property_set-DaoZXGM5.js} +11 -16
  141. package/dist/dev/packages/shared-chunks/public-api-C3KlJmEr.js +10 -0
  142. package/dist/{packages/shared-chunks/reference-B6HMX4y0.js → dev/packages/shared-chunks/reference-C3TKDRnP.js} +11 -12
  143. package/dist/{packages/@glimmer/runtime/index.js → dev/packages/shared-chunks/rehydrate-builder-DPImr9e9.js} +8 -16
  144. package/dist/{packages/shared-chunks/render-DTOhhssy.js → dev/packages/shared-chunks/render-sg8BuFaE.js} +16 -23
  145. package/dist/{packages/shared-chunks/serialize-builder-DEgRJgNQ.js → dev/packages/shared-chunks/serialize-builder-b_gSYCSS.js} +7 -7
  146. package/dist/{packages/shared-chunks/set_properties-Dag9Xz6u.js → dev/packages/shared-chunks/set_properties-kVGzZL_a.js} +2 -2
  147. package/dist/{packages/shared-chunks/setup-registry-Bbj8WQen.js → dev/packages/shared-chunks/setup-registry-DGdDOxrk.js} +12 -12
  148. package/dist/{packages/shared-chunks/simple-cast-BXTrayoV.js → dev/packages/shared-chunks/simple-cast-DCvJLSin.js} +1 -1
  149. package/dist/{packages/shared-chunks/template-CMHIG4cn.js → dev/packages/shared-chunks/template-kM-7TTcc.js} +3 -4
  150. package/dist/dev/packages/shared-chunks/to-string-C7M8LBLH.js +36 -0
  151. package/dist/{packages/shared-chunks/transform-resolutions-vHYYonpB.js → dev/packages/shared-chunks/transform-resolutions-fXGQKGsL.js} +331 -288
  152. package/dist/{packages/shared-chunks/unrecognized-url-error-BBMMZhBN.js → dev/packages/shared-chunks/unrecognized-url-error-B3wUTorp.js} +103 -39
  153. package/dist/prod/packages/@ember/-internals/browser-environment/index.js +2 -0
  154. package/dist/prod/packages/@ember/-internals/container/index.js +697 -0
  155. package/dist/prod/packages/@ember/-internals/deprecations/index.js +114 -0
  156. package/dist/prod/packages/@ember/-internals/environment/index.js +171 -0
  157. package/dist/prod/packages/@ember/-internals/error-handling/index.js +26 -0
  158. package/dist/prod/packages/@ember/-internals/glimmer/index.js +39 -0
  159. package/dist/prod/packages/@ember/-internals/meta/index.js +1 -0
  160. package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +455 -0
  161. package/dist/prod/packages/@ember/-internals/metal/index.js +61 -0
  162. package/dist/prod/packages/@ember/-internals/owner/index.js +252 -0
  163. package/dist/prod/packages/@ember/-internals/routing/index.js +14 -0
  164. package/dist/prod/packages/@ember/-internals/runtime/index.js +9 -0
  165. package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +51 -0
  166. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +89 -0
  167. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +187 -0
  168. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/comparable.js +37 -0
  169. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +44 -0
  170. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +42 -0
  171. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +142 -0
  172. package/dist/prod/packages/@ember/-internals/string/index.js +93 -0
  173. package/dist/prod/packages/@ember/-internals/utility-types/index.js +12 -0
  174. package/dist/prod/packages/@ember/-internals/utils/index.js +75 -0
  175. package/dist/prod/packages/@ember/-internals/views/index.js +7 -0
  176. package/dist/prod/packages/@ember/-internals/views/lib/compat/attrs.js +3 -0
  177. package/dist/prod/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +7 -0
  178. package/dist/prod/packages/@ember/-internals/views/lib/component_lookup.js +14 -0
  179. package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +35 -0
  180. package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +227 -0
  181. package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +172 -0
  182. package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +87 -0
  183. package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +83 -0
  184. package/dist/prod/packages/@ember/application/index.js +899 -0
  185. package/dist/prod/packages/@ember/application/instance.js +438 -0
  186. package/dist/prod/packages/@ember/application/namespace.js +68 -0
  187. package/dist/prod/packages/@ember/array/-internals.js +9 -0
  188. package/dist/prod/packages/@ember/array/index.js +591 -0
  189. package/dist/prod/packages/@ember/array/lib/make-array.js +42 -0
  190. package/dist/prod/packages/@ember/array/make.js +1 -0
  191. package/dist/prod/packages/@ember/array/mutable.js +1 -0
  192. package/dist/prod/packages/@ember/array/proxy.js +267 -0
  193. package/dist/prod/packages/@ember/canary-features/index.js +67 -0
  194. package/dist/prod/packages/@ember/component/helper.js +12 -0
  195. package/dist/prod/packages/@ember/component/index.js +32 -0
  196. package/dist/prod/packages/@ember/component/template-only.js +39 -0
  197. package/dist/prod/packages/@ember/controller/index.js +177 -0
  198. package/dist/prod/packages/@ember/debug/container-debug-adapter.js +117 -0
  199. package/dist/prod/packages/@ember/debug/data-adapter.js +553 -0
  200. package/dist/prod/packages/@ember/debug/index.js +30 -0
  201. package/dist/prod/packages/@ember/debug/lib/assert.js +7 -0
  202. package/dist/prod/packages/@ember/debug/lib/capture-render-tree.js +28 -0
  203. package/dist/prod/packages/@ember/debug/lib/deprecate.js +56 -0
  204. package/dist/prod/packages/@ember/debug/lib/handlers.js +5 -0
  205. package/dist/prod/packages/@ember/debug/lib/inspect.js +120 -0
  206. package/dist/prod/packages/@ember/debug/lib/testing.js +9 -0
  207. package/dist/prod/packages/@ember/debug/lib/warn.js +6 -0
  208. package/dist/prod/packages/@ember/deprecated-features/index.js +7 -0
  209. package/dist/prod/packages/@ember/destroyable/index.js +251 -0
  210. package/dist/prod/packages/@ember/engine/index.js +450 -0
  211. package/dist/{packages → prod/packages}/@ember/engine/instance.js +24 -10
  212. package/dist/prod/packages/@ember/engine/lib/engine-parent.js +33 -0
  213. package/dist/prod/packages/@ember/engine/parent.js +1 -0
  214. package/dist/prod/packages/@ember/enumerable/index.js +20 -0
  215. package/dist/prod/packages/@ember/enumerable/mutable.js +22 -0
  216. package/dist/prod/packages/@ember/helper/index.js +489 -0
  217. package/dist/prod/packages/@ember/instrumentation/index.js +242 -0
  218. package/dist/prod/packages/@ember/modifier/index.js +21 -0
  219. package/dist/prod/packages/@ember/modifier/on.js +20 -0
  220. package/dist/prod/packages/@ember/object/-internals.js +28 -0
  221. package/dist/prod/packages/@ember/object/compat.js +128 -0
  222. package/dist/prod/packages/@ember/object/computed.js +10 -0
  223. package/dist/prod/packages/@ember/object/core.js +781 -0
  224. package/dist/prod/packages/@ember/object/evented.js +76 -0
  225. package/dist/prod/packages/@ember/object/events.js +6 -0
  226. package/dist/prod/packages/@ember/object/index.js +205 -0
  227. package/dist/prod/packages/@ember/object/internals.js +8 -0
  228. package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +776 -0
  229. package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +1032 -0
  230. package/dist/prod/packages/@ember/object/mixin.js +560 -0
  231. package/dist/{packages → prod/packages}/@ember/object/observable.js +80 -15
  232. package/dist/prod/packages/@ember/object/observers.js +6 -0
  233. package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +138 -0
  234. package/dist/prod/packages/@ember/object/proxy.js +98 -0
  235. package/dist/prod/packages/@ember/owner/index.js +88 -0
  236. package/dist/prod/packages/@ember/reactive/collections.js +1 -0
  237. package/dist/prod/packages/@ember/reactive/index.js +12 -0
  238. package/dist/prod/packages/@ember/renderer/index.js +12 -0
  239. package/dist/prod/packages/@ember/routing/hash-location.js +153 -0
  240. package/dist/prod/packages/@ember/routing/history-location.js +250 -0
  241. package/dist/prod/packages/@ember/routing/index.js +12 -0
  242. package/dist/prod/packages/@ember/routing/lib/cache.js +37 -0
  243. package/dist/prod/packages/@ember/routing/lib/controller_for.js +16 -0
  244. package/dist/prod/packages/@ember/routing/lib/dsl.js +178 -0
  245. package/dist/prod/packages/@ember/routing/lib/generate_controller.js +62 -0
  246. package/dist/prod/packages/@ember/routing/lib/location-utils.js +48 -0
  247. package/dist/prod/packages/@ember/routing/lib/query_params.js +9 -0
  248. package/dist/prod/packages/@ember/routing/lib/router_state.js +26 -0
  249. package/dist/prod/packages/@ember/routing/lib/routing-service.js +125 -0
  250. package/dist/prod/packages/@ember/routing/lib/utils.js +236 -0
  251. package/dist/prod/packages/@ember/routing/none-location.js +120 -0
  252. package/dist/prod/packages/@ember/routing/route.js +1604 -0
  253. package/dist/prod/packages/@ember/routing/router-service.js +640 -0
  254. package/dist/prod/packages/@ember/routing/router.js +1335 -0
  255. package/dist/prod/packages/@ember/runloop/index.js +736 -0
  256. package/dist/prod/packages/@ember/service/index.js +124 -0
  257. package/dist/prod/packages/@ember/template/index.js +12 -0
  258. package/dist/prod/packages/@ember/template-compilation/index.js +20 -0
  259. package/dist/prod/packages/@ember/template-compiler/-internal-primitives.js +1 -0
  260. package/dist/prod/packages/@ember/template-compiler/-internal-utils.js +1 -0
  261. package/dist/prod/packages/@ember/template-compiler/index.js +2 -0
  262. package/dist/prod/packages/@ember/template-compiler/lib/-internal/primitives.js +1 -0
  263. package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +103 -0
  264. package/dist/prod/packages/@ember/template-compiler/lib/dasherize-component-name.js +21 -0
  265. package/dist/prod/packages/@ember/template-compiler/lib/plugins/allowed-globals.js +56 -0
  266. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +49 -0
  267. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +34 -0
  268. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +22 -0
  269. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +37 -0
  270. package/dist/{packages → prod/packages}/@ember/template-compiler/lib/plugins/index.js +1 -1
  271. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-action-syntax.js +65 -0
  272. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-in-into-each.js +51 -0
  273. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +50 -0
  274. package/dist/{packages → prod/packages}/@ember/template-compiler/lib/plugins/transform-in-element.js +20 -6
  275. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +37 -0
  276. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +4 -0
  277. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js +57 -0
  278. package/dist/prod/packages/@ember/template-compiler/lib/plugins/utils.js +55 -0
  279. package/dist/prod/packages/@ember/template-compiler/lib/public-api.js +1 -0
  280. package/dist/prod/packages/@ember/template-compiler/lib/runtime.js +1 -0
  281. package/dist/prod/packages/@ember/template-compiler/lib/system/calculate-location-display.js +28 -0
  282. package/dist/prod/packages/@ember/template-compiler/lib/template.js +245 -0
  283. package/dist/prod/packages/@ember/template-factory/index.js +5 -0
  284. package/dist/prod/packages/@ember/test/adapter.js +2 -0
  285. package/dist/prod/packages/@ember/test/index.js +18 -0
  286. package/dist/prod/packages/@ember/utils/index.js +7 -0
  287. package/dist/prod/packages/@ember/utils/lib/compare.js +159 -0
  288. package/dist/prod/packages/@ember/utils/lib/is-equal.js +60 -0
  289. package/dist/prod/packages/@ember/utils/lib/is_blank.js +36 -0
  290. package/dist/prod/packages/@ember/utils/lib/is_empty.js +67 -0
  291. package/dist/prod/packages/@ember/utils/lib/is_none.js +28 -0
  292. package/dist/prod/packages/@ember/utils/lib/is_present.js +39 -0
  293. package/dist/prod/packages/@ember/utils/lib/type-of.js +110 -0
  294. package/dist/prod/packages/@ember/version/index.js +1 -0
  295. package/dist/prod/packages/@glimmer/destroyable/index.js +128 -0
  296. package/dist/prod/packages/@glimmer/encoder/index.js +28 -0
  297. package/dist/prod/packages/@glimmer/env/index.js +4 -0
  298. package/dist/prod/packages/@glimmer/global-context/index.js +138 -0
  299. package/dist/prod/packages/@glimmer/manager/index.js +293 -0
  300. package/dist/{packages/shared-chunks/node-dom-helper-BYL7Plyj.js → prod/packages/@glimmer/node/index.js} +10 -12
  301. package/dist/prod/packages/@glimmer/opcode-compiler/index.js +40 -0
  302. package/dist/prod/packages/@glimmer/owner/index.js +19 -0
  303. package/dist/prod/packages/@glimmer/program/index.js +12 -0
  304. package/dist/{packages/shared-chunks/iterable-BKS7az3P.js → prod/packages/@glimmer/reference/index.js} +13 -12
  305. package/dist/prod/packages/@glimmer/runtime/index.js +9 -0
  306. package/dist/prod/packages/@glimmer/tracking/index.js +115 -0
  307. package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +6 -0
  308. package/dist/prod/packages/@glimmer/util/index.js +129 -0
  309. package/dist/prod/packages/@glimmer/validator/index.js +1027 -0
  310. package/dist/prod/packages/@glimmer/vm/index.js +15 -0
  311. package/dist/prod/packages/@glimmer/wire-format/index.js +102 -0
  312. package/dist/prod/packages/@simple-dom/document/index.js +355 -0
  313. package/dist/prod/packages/backburner.js/index.js +939 -0
  314. package/dist/prod/packages/dag-map/index.js +202 -0
  315. package/dist/prod/packages/ember/version.js +4 -0
  316. package/dist/prod/packages/ember-template-compiler/index.js +100 -0
  317. package/dist/prod/packages/ember-testing/index.js +6 -0
  318. package/dist/prod/packages/ember-testing/lib/adapters/adapter.js +49 -0
  319. package/dist/prod/packages/ember-testing/lib/public-api.js +2 -0
  320. package/dist/prod/packages/ember-testing/lib/test/adapter.js +32 -0
  321. package/dist/prod/packages/ember-testing/lib/test/pending_requests.js +10 -0
  322. package/dist/prod/packages/ember-testing/lib/test/waiters.js +128 -0
  323. package/dist/prod/packages/ember-testing/lib/test.js +25 -0
  324. package/dist/prod/packages/route-recognizer/index.js +671 -0
  325. package/dist/prod/packages/router_js/index.js +1527 -0
  326. package/dist/prod/packages/rsvp/index.js +1 -0
  327. package/dist/prod/packages/shared-chunks/alias-BkT-0B1G.js +81 -0
  328. package/dist/prod/packages/shared-chunks/api-Co-k4HVs.js +200 -0
  329. package/dist/prod/packages/shared-chunks/args-proxy-Dl0A0YWI.js +131 -0
  330. package/dist/prod/packages/shared-chunks/array-EwekEvId.js +117 -0
  331. package/dist/prod/packages/shared-chunks/array-utils-CZQxrdD3.js +45 -0
  332. package/dist/prod/packages/shared-chunks/assert-CUCJBR2C.js +19 -0
  333. package/dist/prod/packages/shared-chunks/cache-qDyqAcpg.js +35 -0
  334. package/dist/prod/packages/shared-chunks/capabilities-DGmQ_mz4.js +26 -0
  335. package/dist/prod/packages/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js +121 -0
  336. package/dist/prod/packages/shared-chunks/collections-GpG8lT2g.js +75 -0
  337. package/dist/prod/packages/shared-chunks/compiler-Ddfo5StE.js +6806 -0
  338. package/dist/prod/packages/shared-chunks/computed_cache-DmYKevAP.js +12 -0
  339. package/dist/prod/packages/shared-chunks/constants-b-2IVErl.js +210 -0
  340. package/dist/prod/packages/shared-chunks/debug-brand-B1TWjOCH.js +12 -0
  341. package/dist/prod/packages/shared-chunks/decorator-BdDDBUd2.js +123 -0
  342. package/dist/prod/packages/shared-chunks/dictionary-gc5gpyOG.js +13 -0
  343. package/dist/prod/packages/shared-chunks/element-builder-CiLTrXD6.js +776 -0
  344. package/dist/prod/packages/shared-chunks/flags-B9qxc-pB.js +24 -0
  345. package/dist/prod/packages/shared-chunks/fragment-EpVz5Xuc.js +910 -0
  346. package/dist/prod/packages/shared-chunks/get-debug-name-BDxIL2Y1.js +3 -0
  347. package/dist/prod/packages/shared-chunks/has-dom-DdQORPzI.js +4 -0
  348. package/dist/prod/packages/shared-chunks/index-CSVCFS_p.js +1904 -0
  349. package/dist/prod/packages/shared-chunks/index-Cc8WmrB-.js +21 -0
  350. package/dist/prod/packages/shared-chunks/index-DZLHQAlb.js +5842 -0
  351. package/dist/prod/packages/shared-chunks/injected_property-DL3vQoFA.js +58 -0
  352. package/dist/prod/packages/shared-chunks/invoke-DxL00a1D.js +53 -0
  353. package/dist/prod/packages/shared-chunks/is_proxy-Cr1qlMv_.js +16 -0
  354. package/dist/prod/packages/shared-chunks/lookup-descriptor-CwcVgaLv.js +13 -0
  355. package/dist/prod/packages/shared-chunks/name-C68GLLO3.js +11 -0
  356. package/dist/prod/packages/shared-chunks/namespace_search-Aog9nySA.js +1070 -0
  357. package/dist/prod/packages/shared-chunks/object-utils-AijlD-JH.js +12 -0
  358. package/dist/prod/packages/shared-chunks/observers-R1ZklwWy.js +714 -0
  359. package/dist/prod/packages/shared-chunks/on-CrTl7JQU.js +3329 -0
  360. package/dist/prod/packages/shared-chunks/program-B7SJZ5NF.js +176 -0
  361. package/dist/prod/packages/shared-chunks/program-context-C-JdYXRA.js +146 -0
  362. package/dist/prod/packages/shared-chunks/property_set-O080KTKZ.js +99 -0
  363. package/dist/prod/packages/shared-chunks/public-api-C3KlJmEr.js +10 -0
  364. package/dist/prod/packages/shared-chunks/reference-BNqcwZWH.js +151 -0
  365. package/dist/prod/packages/shared-chunks/registers-ylirb0dq.js +35 -0
  366. package/dist/prod/packages/shared-chunks/rehydrate-builder-CSn1aIO1.js +459 -0
  367. package/dist/prod/packages/shared-chunks/render-C1ZnScKH.js +1464 -0
  368. package/dist/prod/packages/shared-chunks/rsvp-CnCSY930.js +2306 -0
  369. package/dist/prod/packages/shared-chunks/serialize-builder-CVQ3q8rJ.js +124 -0
  370. package/dist/prod/packages/shared-chunks/set_properties-CjsDTRey.js +101 -0
  371. package/dist/prod/packages/shared-chunks/setup-registry-CMNYh2jY.js +53 -0
  372. package/dist/prod/packages/shared-chunks/simple-cast-DCvJLSin.js +33 -0
  373. package/dist/prod/packages/shared-chunks/super-Cm_a_cLQ.js +275 -0
  374. package/dist/prod/packages/shared-chunks/template-Dc_cBOoX.js +19 -0
  375. package/dist/prod/packages/shared-chunks/tracked-ChVNBE2f.js +131 -0
  376. package/dist/prod/packages/shared-chunks/transform-resolutions-C7wq_Q_c.js +6939 -0
  377. package/dist/prod/packages/shared-chunks/unrecognized-url-error-DDBwfzdm.js +537 -0
  378. package/docs/data.json +3009 -2358
  379. package/lib/index.js +157 -279
  380. package/package.json +30 -58
  381. package/types/stable/@ember/-internals/deprecations/index.d.ts +0 -6
  382. package/types/stable/@ember/-internals/environment/index.d.ts +0 -1
  383. package/types/stable/@ember/-internals/environment/lib/env.d.ts +0 -3
  384. package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +3 -6
  385. package/types/stable/@ember/-internals/glimmer/lib/component-managers/root.d.ts +1 -2
  386. package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +22 -29
  387. package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +2 -2
  388. package/types/stable/@ember/-internals/glimmer/lib/resolver.d.ts +0 -2
  389. package/types/stable/@ember/-internals/glimmer/lib/utils/bindings.d.ts +0 -1
  390. package/types/stable/@ember/-internals/meta/lib/meta.d.ts +1 -1
  391. package/types/stable/@ember/-internals/metal/lib/alias.d.ts +0 -11
  392. package/types/stable/@ember/-internals/metal/lib/decorator.d.ts +0 -1
  393. package/types/stable/@ember/-internals/metal/lib/each_proxy_events.d.ts +0 -1
  394. package/types/stable/@ember/-internals/metal/lib/observer.d.ts +0 -2
  395. package/types/stable/@ember/-internals/metal/lib/property_get.d.ts +4 -10
  396. package/types/stable/@ember/-internals/utils/index.d.ts +0 -1
  397. package/types/stable/@ember/-internals/views/lib/system/utils.d.ts +3 -15
  398. package/types/stable/@ember/application/index.d.ts +2 -63
  399. package/types/stable/@ember/routing/history-location.d.ts +0 -1
  400. package/types/stable/@ember/routing/lib/location-utils.d.ts +1 -2
  401. package/types/stable/@ember/routing/none-location.d.ts +1 -2
  402. package/types/stable/@ember/template-compiler/index.d.ts +1 -0
  403. package/types/stable/@ember/template-compiler/lib/plugins/allowed-globals.d.ts +26 -0
  404. package/types/stable/@ember/test/index.d.ts +0 -3
  405. package/types/stable/@glimmer/interfaces/lib/compile/wire-format/api.d.ts +1 -1
  406. package/types/stable/@glimmer/interfaces/lib/template.d.ts +1 -1
  407. package/types/stable/@glimmer/program/lib/program.d.ts +0 -1
  408. package/types/stable/@glimmer/validator/lib/collections/map.d.ts +1 -1
  409. package/types/stable/@handlebars/parser/types/ast.d.ts +148 -0
  410. package/types/stable/@handlebars/parser/types/index.d.ts +13 -0
  411. package/types/stable/ember-template-compiler/index.d.ts +0 -2
  412. package/types/stable/ember-template-compiler/lib/public-api.d.ts +0 -1
  413. package/types/stable/ember-testing/lib/public-api.d.ts +0 -6
  414. package/types/stable/ember-testing/lib/test/pending_requests.d.ts +0 -3
  415. package/types/stable/ember-testing/lib/test.d.ts +0 -23
  416. package/types/stable/index.d.ts +15 -32
  417. package/types/stable/router_js/index.d.ts +7 -0
  418. package/types/stable/router_js/lib/core.d.ts +9 -0
  419. package/types/stable/router_js/lib/route-info.d.ts +107 -0
  420. package/types/stable/router_js/lib/router.d.ts +245 -0
  421. package/types/stable/router_js/lib/transition-aborted-error.d.ts +15 -0
  422. package/types/stable/router_js/lib/transition-intent/named-transition-intent.d.ts +23 -0
  423. package/types/stable/router_js/lib/transition-intent/url-transition-intent.d.ts +12 -0
  424. package/types/stable/router_js/lib/transition-intent.d.ts +13 -0
  425. package/types/stable/router_js/lib/transition-state.d.ts +25 -0
  426. package/types/stable/router_js/lib/transition.d.ts +241 -0
  427. package/types/stable/router_js/lib/unrecognized-url-error.d.ts +11 -0
  428. package/types/stable/router_js/lib/utils.d.ts +41 -0
  429. package/dist/ember-template-compiler.js +0 -20631
  430. package/dist/ember-template-compiler.js.map +0 -1
  431. package/dist/ember-testing.js +0 -1351
  432. package/dist/ember-testing.js.map +0 -1
  433. package/dist/ember.debug.js +0 -52306
  434. package/dist/ember.debug.js.map +0 -1
  435. package/dist/ember.prod.js +0 -49369
  436. package/dist/ember.prod.js.map +0 -1
  437. package/dist/packages/@ember/-internals/container/index.js +0 -1
  438. package/dist/packages/@ember/-internals/environment/index.js +0 -1
  439. package/dist/packages/@ember/-internals/glimmer/index.js +0 -18
  440. package/dist/packages/@ember/-internals/metal/index.js +0 -51
  441. package/dist/packages/@ember/-internals/utils/index.js +0 -7
  442. package/dist/packages/@ember/application/lib/lazy_load.js +0 -68
  443. package/dist/packages/@ember/component/helper.js +0 -14
  444. package/dist/packages/@ember/modifier/index.js +0 -23
  445. package/dist/packages/@ember/object/-internals.js +0 -35
  446. package/dist/packages/@ember/object/events.js +0 -12
  447. package/dist/packages/@ember/object/observers.js +0 -12
  448. package/dist/packages/@ember/renderer/index.js +0 -14
  449. package/dist/packages/@ember/routing/index.js +0 -14
  450. package/dist/packages/@ember/template/index.js +0 -14
  451. package/dist/packages/@ember/template-factory/index.js +0 -8
  452. package/dist/packages/@ember/test/index.js +0 -27
  453. package/dist/packages/@glimmer/encoder/index.js +0 -1
  454. package/dist/packages/@glimmer/manager/index.js +0 -5
  455. package/dist/packages/@glimmer/node/index.js +0 -2
  456. package/dist/packages/@glimmer/program/index.js +0 -3
  457. package/dist/packages/@glimmer/reference/index.js +0 -2
  458. package/dist/packages/@glimmer/tracking/index.js +0 -48
  459. package/dist/packages/@glimmer/tracking/primitives/cache/index.js +0 -12
  460. package/dist/packages/ember/barrel.js +0 -511
  461. package/dist/packages/ember/index.js +0 -20
  462. package/dist/packages/ember-template-compiler/index.js +0 -17135
  463. package/dist/packages/ember-testing/lib/adapters/qunit.js +0 -53
  464. package/dist/packages/ember-testing/lib/ext/application.js +0 -174
  465. package/dist/packages/ember-testing/lib/ext/rsvp.js +0 -17
  466. package/dist/packages/ember-testing/lib/helpers/and_then.js +0 -11
  467. package/dist/packages/ember-testing/lib/helpers/current_path.js +0 -32
  468. package/dist/packages/ember-testing/lib/helpers/current_route_name.js +0 -32
  469. package/dist/packages/ember-testing/lib/helpers/current_url.js +0 -29
  470. package/dist/packages/ember-testing/lib/helpers/pause_test.js +0 -76
  471. package/dist/packages/ember-testing/lib/helpers/visit.js +0 -51
  472. package/dist/packages/ember-testing/lib/helpers/wait.js +0 -55
  473. package/dist/packages/ember-testing/lib/helpers.js +0 -17
  474. package/dist/packages/ember-testing/lib/initializers.js +0 -56
  475. package/dist/packages/ember-testing/lib/public-api.js +0 -8
  476. package/dist/packages/ember-testing/lib/setup_for_testing.js +0 -31
  477. package/dist/packages/ember-testing/lib/test/helpers.js +0 -133
  478. package/dist/packages/ember-testing/lib/test/on_inject_helpers.js +0 -39
  479. package/dist/packages/ember-testing/lib/test/pending_requests.js +0 -22
  480. package/dist/packages/ember-testing/lib/test/promise.js +0 -83
  481. package/dist/packages/ember-testing/lib/test/run.js +0 -11
  482. package/dist/packages/ember-testing/lib/test.js +0 -68
  483. package/dist/packages/router_js/index.js +0 -2
  484. package/dist/packages/shared-chunks/helpers-C1rIkuSd.js +0 -11
  485. package/dist/packages/shared-chunks/invoke-BjRgvK2V.js +0 -27
  486. package/dist/packages/shared-chunks/public-api-BQsJemZG.js +0 -20
  487. package/dist/packages/shared-chunks/template_registry-DigcUg9m.js +0 -24
  488. package/dist/packages/shared-chunks/to-string-CqD7_vQ4.js +0 -60
  489. package/types/stable/@ember/-internals/environment/lib/global.d.ts +0 -4
  490. package/types/stable/@ember/-internals/glimmer/lib/modifiers/internal.d.ts +0 -34
  491. package/types/stable/@ember/-internals/glimmer/lib/syntax/utils.d.ts +0 -5
  492. package/types/stable/@ember/-internals/glimmer/lib/templates/empty.d.ts +0 -4
  493. package/types/stable/@ember/-internals/glimmer/lib/utils/debug-render-message.d.ts +0 -4
  494. package/types/stable/@ember/-internals/metal/lib/dependent_keys.d.ts +0 -3
  495. package/types/stable/@ember/-internals/utils/lib/symbol.d.ts +0 -5
  496. package/types/stable/@ember/application/lib/lazy_load.d.ts +0 -38
  497. package/types/stable/@ember/template-compiler/lib/public-types.d.ts +0 -3
  498. package/types/stable/ember/barrel.d.ts +0 -358
  499. package/types/stable/ember/index.d.ts +0 -358
  500. package/types/stable/ember-template-compiler/lib/system/bootstrap.d.ts +0 -26
  501. package/types/stable/ember-template-compiler/lib/system/initializer.d.ts +0 -3
  502. package/types/stable/ember-testing/lib/adapters/qunit.d.ts +0 -22
  503. package/types/stable/ember-testing/lib/ext/application.d.ts +0 -12
  504. package/types/stable/ember-testing/lib/ext/rsvp.d.ts +0 -4
  505. package/types/stable/ember-testing/lib/helpers/and_then.d.ts +0 -4
  506. package/types/stable/ember-testing/lib/helpers/current_path.d.ts +0 -22
  507. package/types/stable/ember-testing/lib/helpers/current_route_name.d.ts +0 -21
  508. package/types/stable/ember-testing/lib/helpers/current_url.d.ts +0 -22
  509. package/types/stable/ember-testing/lib/helpers/pause_test.d.ts +0 -52
  510. package/types/stable/ember-testing/lib/helpers/visit.d.ts +0 -22
  511. package/types/stable/ember-testing/lib/helpers/wait.d.ts +0 -34
  512. package/types/stable/ember-testing/lib/helpers.d.ts +0 -3
  513. package/types/stable/ember-testing/lib/initializers.d.ts +0 -3
  514. package/types/stable/ember-testing/lib/setup_for_testing.d.ts +0 -15
  515. package/types/stable/ember-testing/lib/test/helpers.d.ts +0 -116
  516. package/types/stable/ember-testing/lib/test/on_inject_helpers.d.ts +0 -33
  517. package/types/stable/ember-testing/lib/test/promise.d.ts +0 -37
  518. package/types/stable/ember-testing/lib/test/run.d.ts +0 -3
  519. package/types/stable/loader/lib/index.d.ts +0 -4
  520. package/types/stable/require.d.ts +0 -4
  521. /package/dist/{packages → dev/packages}/@ember/-internals/browser-environment/index.js +0 -0
  522. /package/dist/{packages → dev/packages}/@ember/-internals/error-handling/index.js +0 -0
  523. /package/dist/{packages → dev/packages}/@ember/-internals/meta/index.js +0 -0
  524. /package/dist/{packages → dev/packages}/@ember/-internals/owner/index.js +0 -0
  525. /package/dist/{packages → dev/packages}/@ember/-internals/runtime/index.js +0 -0
  526. /package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/comparable.js +0 -0
  527. /package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/container_proxy.js +0 -0
  528. /package/dist/{packages → dev/packages}/@ember/-internals/utility-types/index.js +0 -0
  529. /package/dist/{packages → dev/packages}/@ember/-internals/views/index.js +0 -0
  530. /package/dist/{packages → dev/packages}/@ember/-internals/views/lib/compat/attrs.js +0 -0
  531. /package/dist/{packages → dev/packages}/@ember/-internals/views/lib/component_lookup.js +0 -0
  532. /package/dist/{packages → dev/packages}/@ember/array/-internals.js +0 -0
  533. /package/dist/{packages → dev/packages}/@ember/array/lib/make-array.js +0 -0
  534. /package/dist/{packages → dev/packages}/@ember/array/make.js +0 -0
  535. /package/dist/{packages → dev/packages}/@ember/array/mutable.js +0 -0
  536. /package/dist/{packages → dev/packages}/@ember/debug/lib/capture-render-tree.js +0 -0
  537. /package/dist/{packages → dev/packages}/@ember/debug/lib/inspect.js +0 -0
  538. /package/dist/{packages → dev/packages}/@ember/debug/lib/testing.js +0 -0
  539. /package/dist/{packages → dev/packages}/@ember/deprecated-features/index.js +0 -0
  540. /package/dist/{packages → dev/packages}/@ember/destroyable/index.js +0 -0
  541. /package/dist/{packages → dev/packages}/@ember/engine/lib/engine-parent.js +0 -0
  542. /package/dist/{packages → dev/packages}/@ember/engine/parent.js +0 -0
  543. /package/dist/{packages → dev/packages}/@ember/enumerable/index.js +0 -0
  544. /package/dist/{packages → dev/packages}/@ember/enumerable/mutable.js +0 -0
  545. /package/dist/{packages → dev/packages}/@ember/object/proxy.js +0 -0
  546. /package/dist/{packages → dev/packages}/@ember/owner/index.js +0 -0
  547. /package/dist/{packages → dev/packages}/@ember/reactive/collections.js +0 -0
  548. /package/dist/{packages → dev/packages}/@ember/reactive/index.js +0 -0
  549. /package/dist/{packages → dev/packages}/@ember/routing/lib/cache.js +0 -0
  550. /package/dist/{packages → dev/packages}/@ember/routing/lib/controller_for.js +0 -0
  551. /package/dist/{packages → dev/packages}/@ember/routing/lib/query_params.js +0 -0
  552. /package/dist/{packages → dev/packages}/@ember/routing/lib/router_state.js +0 -0
  553. /package/dist/{packages → dev/packages}/@ember/template-compiler/-internal-primitives.js +0 -0
  554. /package/dist/{packages → dev/packages}/@ember/template-compiler/-internal-utils.js +0 -0
  555. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/-internal/primitives.js +0 -0
  556. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-action-syntax.js +0 -0
  557. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-each-in-into-each.js +0 -0
  558. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +0 -0
  559. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js +0 -0
  560. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/utils.js +0 -0
  561. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/public-api.js +0 -0
  562. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/runtime.js +0 -0
  563. /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/system/calculate-location-display.js +0 -0
  564. /package/dist/{packages → dev/packages}/@ember/template-compiler/runtime.js +0 -0
  565. /package/dist/{packages → dev/packages}/@ember/test/adapter.js +0 -0
  566. /package/dist/{packages → dev/packages}/@ember/utils/index.js +0 -0
  567. /package/dist/{packages → dev/packages}/@ember/utils/lib/is-equal.js +0 -0
  568. /package/dist/{packages → dev/packages}/@ember/utils/lib/is_blank.js +0 -0
  569. /package/dist/{packages → dev/packages}/@ember/utils/lib/is_none.js +0 -0
  570. /package/dist/{packages → dev/packages}/@ember/utils/lib/is_present.js +0 -0
  571. /package/dist/{packages → dev/packages}/@ember/utils/lib/type-of.js +0 -0
  572. /package/dist/{packages → dev/packages}/@ember/version/index.js +0 -0
  573. /package/dist/{packages → dev/packages}/@glimmer/env/index.js +0 -0
  574. /package/dist/{packages → dev/packages}/@glimmer/owner/index.js +0 -0
  575. /package/dist/{packages → dev/packages}/@glimmer/wire-format/index.js +0 -0
  576. /package/dist/{packages → dev/packages}/@simple-dom/document/index.js +0 -0
  577. /package/dist/{packages → dev/packages}/backburner.js/index.js +0 -0
  578. /package/dist/{packages → dev/packages}/dag-map/index.js +0 -0
  579. /package/dist/{packages → dev/packages}/ember-testing/lib/adapters/adapter.js +0 -0
  580. /package/dist/{packages → dev/packages}/ember-testing/lib/test/adapter.js +0 -0
  581. /package/dist/{packages → dev/packages}/ember-testing/lib/test/waiters.js +0 -0
  582. /package/dist/{packages → dev/packages}/route-recognizer/index.js +0 -0
  583. /package/dist/{packages → dev/packages}/rsvp/index.js +0 -0
  584. /package/dist/{packages → dev/packages}/shared-chunks/array-utils-CZQxrdD3.js +0 -0
  585. /package/dist/{packages → dev/packages}/shared-chunks/assert-CUCJBR2C.js +0 -0
  586. /package/dist/{packages → dev/packages}/shared-chunks/cache-qDyqAcpg.js +0 -0
  587. /package/dist/{packages → dev/packages}/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js +0 -0
  588. /package/dist/{packages → dev/packages}/shared-chunks/computed_cache-DmYKevAP.js +0 -0
  589. /package/dist/{packages → dev/packages}/shared-chunks/debug-brand-B1TWjOCH.js +0 -0
  590. /package/dist/{packages → dev/packages}/shared-chunks/dictionary-gc5gpyOG.js +0 -0
  591. /package/dist/{packages → dev/packages}/shared-chunks/index-BGP1rw3B.js +0 -0
  592. /package/dist/{packages → dev/packages}/shared-chunks/object-utils-AijlD-JH.js +0 -0
  593. /package/dist/{packages → dev/packages}/shared-chunks/present-B1rrjAVM.js +0 -0
  594. /package/dist/{packages → dev/packages}/shared-chunks/registers-ylirb0dq.js +0 -0
  595. /package/dist/{packages → dev/packages}/shared-chunks/rsvp-CnCSY930.js +0 -0
  596. /package/dist/{packages → prod/packages}/@ember/routing/-internals.js +0 -0
  597. /package/dist/{packages/@ember/template-compiler/index.js → prod/packages/@ember/template-compiler/runtime.js} +0 -0
@@ -0,0 +1,899 @@
1
+ import { getOwner as getOwner$1 } from '../owner/index.js';
2
+ import { m as makeDictionary } from '../../shared-chunks/dictionary-gc5gpyOG.js';
3
+ import '../../shared-chunks/super-Cm_a_cLQ.js';
4
+ import { h as hasDOM } from '../../shared-chunks/has-dom-DdQORPzI.js';
5
+ import '../-internals/environment/index.js';
6
+ import { assert } from '../debug/lib/assert.js';
7
+ import { schedule, once, join, run } from '../runloop/index.js';
8
+ import '../../@glimmer/validator/index.js';
9
+ import '../../shared-chunks/reference-BNqcwZWH.js';
10
+ import '../../shared-chunks/capabilities-DGmQ_mz4.js';
11
+ import '../../shared-chunks/observers-R1ZklwWy.js';
12
+ import { setOwner as setOwner$1 } from '../-internals/owner/index.js';
13
+ import '../-internals/runtime/lib/mixins/registry_proxy.js';
14
+ import '../-internals/runtime/lib/mixins/container_proxy.js';
15
+ import '../-internals/runtime/lib/mixins/comparable.js';
16
+ import '../-internals/runtime/lib/mixins/action_handler.js';
17
+ import '../-internals/runtime/lib/mixins/-proxy.js';
18
+ import '../enumerable/mutable.js';
19
+ import '../-internals/runtime/lib/mixins/target_action_support.js';
20
+ import '../-internals/runtime/lib/ext/rsvp.js';
21
+ import EventDispatcher from '../-internals/views/lib/system/event_dispatcher.js';
22
+ import '../object/index.js';
23
+ import '../-internals/views/lib/views/core_view.js';
24
+ import '../-internals/views/lib/mixins/action_support.js';
25
+ import '../-internals/views/lib/views/states.js';
26
+ import Route from '../routing/route.js';
27
+ import EmberRouter from '../routing/router.js';
28
+ import HashLocation from '../routing/hash-location.js';
29
+ import HistoryLocation from '../routing/history-location.js';
30
+ import NoneLocation from '../routing/none-location.js';
31
+ import '../engine/instance.js';
32
+ import '../../route-recognizer/index.js';
33
+ import { R as RSVP } from '../../shared-chunks/rsvp-CnCSY930.js';
34
+ import '../../shared-chunks/unrecognized-url-error-DDBwfzdm.js';
35
+ import '../routing/lib/routing-service.js';
36
+ import '../controller/index.js';
37
+ import BucketCache from '../routing/lib/cache.js';
38
+ import ApplicationInstance from './instance.js';
39
+ import Engine, { buildInitializerMethod } from '../engine/index.js';
40
+ import { privatize } from '../-internals/container/index.js';
41
+ import '../../shared-chunks/fragment-EpVz5Xuc.js';
42
+ import '../../shared-chunks/index-CSVCFS_p.js';
43
+ import '../../shared-chunks/index-DZLHQAlb.js';
44
+ import { s as setupApplicationRegistry } from '../../shared-chunks/setup-registry-CMNYh2jY.js';
45
+ import '../../shared-chunks/on-CrTl7JQU.js';
46
+ import '../../shared-chunks/constants-b-2IVErl.js';
47
+ import RouterService from '../routing/router-service.js';
48
+
49
+ /**
50
+ @module @ember/application
51
+ */
52
+
53
+ /**
54
+ * @deprecated Use `import { getOwner } from '@ember/owner';` instead.
55
+ */
56
+ const getOwner = getOwner$1;
57
+
58
+ /**
59
+ * @deprecated Use `import { setOwner } from '@ember/owner';` instead.
60
+ */
61
+ const setOwner = setOwner$1;
62
+
63
+ /**
64
+ An instance of `Application` is the starting point for every Ember
65
+ application. It instantiates, initializes and coordinates the
66
+ objects that make up your app.
67
+
68
+ Each Ember app has one and only one `Application` object. Although
69
+ Ember CLI creates this object implicitly, the `Application` class
70
+ is defined in the `app/app.js`. You can define a `ready` method on the
71
+ `Application` class, which will be run by Ember when the application is
72
+ initialized.
73
+
74
+ ```app/app.js
75
+ export default class App extends Application {
76
+ ready() {
77
+ // your code here
78
+ }
79
+ }
80
+ ```
81
+
82
+ Because `Application` ultimately inherits from `Ember.Namespace`, any classes
83
+ you create will have useful string representations when calling `toString()`.
84
+ See the `Ember.Namespace` documentation for more information.
85
+
86
+ While you can think of your `Application` as a container that holds the
87
+ other classes in your application, there are several other responsibilities
88
+ going on under-the-hood that you may want to understand. It is also important
89
+ to understand that an `Application` is different from an `ApplicationInstance`.
90
+ Refer to the Guides to understand the difference between these.
91
+
92
+ ### Event Delegation
93
+
94
+ Ember uses a technique called _event delegation_. This allows the framework
95
+ to set up a global, shared event listener instead of requiring each view to
96
+ do it manually. For example, instead of each view registering its own
97
+ `mousedown` listener on its associated element, Ember sets up a `mousedown`
98
+ listener on the `body`.
99
+
100
+ If a `mousedown` event occurs, Ember will look at the target of the event and
101
+ start walking up the DOM node tree, finding corresponding views and invoking
102
+ their `mouseDown` method as it goes.
103
+
104
+ `Application` has a number of default events that it listens for, as
105
+ well as a mapping from lowercase events to camel-cased view method names. For
106
+ example, the `keypress` event causes the `keyPress` method on the view to be
107
+ called, the `dblclick` event causes `doubleClick` to be called, and so on.
108
+
109
+ If there is a bubbling browser event that Ember does not listen for by
110
+ default, you can specify custom events and their corresponding view method
111
+ names by setting the application's `customEvents` property:
112
+
113
+ ```app/app.js
114
+ import Application from '@ember/application';
115
+
116
+ export default class App extends Application {
117
+ customEvents = {
118
+ // add support for the paste event
119
+ paste: 'paste'
120
+ }
121
+ }
122
+ ```
123
+
124
+ To prevent Ember from setting up a listener for a default event,
125
+ specify the event name with a `null` value in the `customEvents`
126
+ property:
127
+
128
+ ```app/app.js
129
+ import Application from '@ember/application';
130
+
131
+ export default class App extends Application {
132
+ customEvents = {
133
+ // prevent listeners for mouseenter/mouseleave events
134
+ mouseenter: null,
135
+ mouseleave: null
136
+ }
137
+ }
138
+ ```
139
+
140
+ By default, the application sets up these event listeners on the document
141
+ body. However, in cases where you are embedding an Ember application inside
142
+ an existing page, you may want it to set up the listeners on an element
143
+ inside the body.
144
+
145
+ For example, if only events inside a DOM element with the ID of `ember-app`
146
+ should be delegated, set your application's `rootElement` property:
147
+
148
+ ```app/app.js
149
+ import Application from '@ember/application';
150
+
151
+ export default class App extends Application {
152
+ rootElement = '#ember-app'
153
+ }
154
+ ```
155
+
156
+ The `rootElement` can be either a DOM element or a CSS selector
157
+ string. Note that *views appended to the DOM outside the root element will
158
+ not receive events.* If you specify a custom root element, make sure you only
159
+ append views inside it!
160
+
161
+ To learn more about the events Ember components use, see
162
+
163
+ [components/handling-events](https://guides.emberjs.com/release/components/handling-events/#toc_event-names).
164
+
165
+ ### Initializers
166
+
167
+ To add behavior to the Application's boot process, you can define initializers in
168
+ the `app/initializers` directory, or with `ember generate initializer` using Ember CLI.
169
+ These files should export a named `initialize` function which will receive the created `application`
170
+ object as its first argument.
171
+
172
+ ```javascript
173
+ export function initialize(application) {
174
+ // application.inject('route', 'foo', 'service:foo');
175
+ }
176
+ ```
177
+
178
+ Application initializers can be used for a variety of reasons including:
179
+
180
+ - setting up external libraries
181
+ - injecting dependencies
182
+ - setting up event listeners in embedded apps
183
+ - deferring the boot process using the `deferReadiness` and `advanceReadiness` APIs.
184
+
185
+ ### Routing
186
+
187
+ In addition to creating your application's router, `Application` is
188
+ also responsible for telling the router when to start routing. Transitions
189
+ between routes can be logged with the `LOG_TRANSITIONS` flag, and more
190
+ detailed intra-transition logging can be logged with
191
+ the `LOG_TRANSITIONS_INTERNAL` flag:
192
+
193
+ ```javascript
194
+ import Application from '@ember/application';
195
+
196
+ let App = Application.create({
197
+ LOG_TRANSITIONS: true, // basic logging of successful transitions
198
+ LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps
199
+ });
200
+ ```
201
+
202
+ By default, the router will begin trying to translate the current URL into
203
+ application state once the browser emits the `DOMContentReady` event. If you
204
+ need to defer routing, you can call the application's `deferReadiness()`
205
+ method. Once routing can begin, call the `advanceReadiness()` method.
206
+
207
+ If there is any setup required before routing begins, you can implement a
208
+ `ready()` method on your app that will be invoked immediately before routing
209
+ begins.
210
+
211
+ @class Application
212
+ @extends Engine
213
+ @public
214
+ */
215
+
216
+ class Application extends Engine {
217
+ /**
218
+ This creates a registry with the default Ember naming conventions.
219
+ It also configures the registry:
220
+ * registered views are created every time they are looked up (they are
221
+ not singletons)
222
+ * registered templates are not factories; the registered value is
223
+ returned directly.
224
+ * the router receives the application as its `namespace` property
225
+ * all controllers receive the router as their `target` and `controllers`
226
+ properties
227
+ * all controllers receive the application as their `namespace` property
228
+ * the application view receives the application controller as its
229
+ `controller` property
230
+ * the application view receives the application template as its
231
+ `defaultTemplate` property
232
+ @method buildRegistry
233
+ @static
234
+ @param {Application} namespace the application for which to
235
+ build the registry
236
+ @return {Ember.Registry} the built registry
237
+ @private
238
+ */
239
+ static buildRegistry(namespace) {
240
+ let registry = super.buildRegistry(namespace);
241
+ commonSetupRegistry(registry);
242
+ setupApplicationRegistry(registry);
243
+ return registry;
244
+ }
245
+ static initializer = buildInitializerMethod('initializers');
246
+ static instanceInitializer = buildInitializerMethod('instanceInitializers');
247
+
248
+ /**
249
+ The root DOM element of the Application. This can be specified as an
250
+ element or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).
251
+ This is the element that will be passed to the Application's,
252
+ `eventDispatcher`, which sets up the listeners for event delegation. Every
253
+ view in your application should be a child of the element you specify here.
254
+ @property rootElement
255
+ @type DOMElement
256
+ @default 'body'
257
+ @public
258
+ */
259
+
260
+ /**
261
+ @property _document
262
+ @type Document | null
263
+ @default 'window.document'
264
+ @private
265
+ */
266
+
267
+ /**
268
+ The `EventDispatcher` responsible for delegating events to this
269
+ application's views.
270
+ The event dispatcher is created by the application at initialization time
271
+ and sets up event listeners on the DOM element described by the
272
+ application's `rootElement` property.
273
+ See the documentation for `EventDispatcher` for more information.
274
+ @property eventDispatcher
275
+ @type Ember.EventDispatcher
276
+ @default null
277
+ @public
278
+ */
279
+
280
+ /**
281
+ The DOM events for which the event dispatcher should listen.
282
+ By default, the application's `Ember.EventDispatcher` listens
283
+ for a set of standard DOM events, such as `mousedown` and
284
+ `keyup`, and delegates them to your application's `Ember.View`
285
+ instances.
286
+ If you would like additional bubbling events to be delegated to your
287
+ views, set your `Application`'s `customEvents` property
288
+ to a hash containing the DOM event name as the key and the
289
+ corresponding view method name as the value. Setting an event to
290
+ a value of `null` will prevent a default event listener from being
291
+ added for that event.
292
+ To add new events to be listened to:
293
+ ```app/app.js
294
+ import Application from '@ember/application';
295
+ let App = Application.extend({
296
+ customEvents: {
297
+ // add support for the paste event
298
+ paste: 'paste'
299
+ }
300
+ });
301
+ ```
302
+ To prevent default events from being listened to:
303
+ ```app/app.js
304
+ import Application from '@ember/application';
305
+ let App = Application.extend({
306
+ customEvents: {
307
+ // remove support for mouseenter / mouseleave events
308
+ mouseenter: null,
309
+ mouseleave: null
310
+ }
311
+ });
312
+ ```
313
+ @property customEvents
314
+ @type Object
315
+ @default null
316
+ @public
317
+ */
318
+
319
+ /**
320
+ Whether the application should automatically start routing and render
321
+ templates to the `rootElement` on DOM ready. While default by true,
322
+ other environments such as FastBoot or a testing harness can set this
323
+ property to `false` and control the precise timing and behavior of the boot
324
+ process.
325
+ @property autoboot
326
+ @type Boolean
327
+ @default true
328
+ @private
329
+ */
330
+
331
+ /**
332
+ An array of application instances created by `buildInstance()`. Used
333
+ internally to ensure that all instances get destroyed.
334
+ @property _applicationInstances
335
+ @type Array
336
+ @private
337
+ */
338
+
339
+ init(properties) {
340
+ super.init(properties);
341
+ this.rootElement ??= 'body';
342
+ this._document ??= null;
343
+ this.eventDispatcher ??= null;
344
+ this.customEvents ??= null;
345
+ this.autoboot ??= true;
346
+ this._document ??= hasDOM ? window.document : null;
347
+
348
+ // Start off the number of deferrals at 1. This will be decremented by
349
+ // the Application's own `boot` method.
350
+ this._readinessDeferrals = 1;
351
+ this._booted = false;
352
+ this._applicationInstances = new Set();
353
+ this.autoboot = Boolean(this.autoboot);
354
+ if (this.autoboot) {
355
+ // Create subclass of Router for this Application instance.
356
+ // This is to ensure that someone reopening `App.Router` does not
357
+ // tamper with the default `Router`.
358
+ this.Router = (this.Router || EmberRouter).extend();
359
+ this._buildDeprecatedInstance();
360
+ this.waitForDOMReady();
361
+ }
362
+ }
363
+
364
+ /**
365
+ Create an ApplicationInstance for this application.
366
+ @public
367
+ @method buildInstance
368
+ @return {ApplicationInstance} the application instance
369
+ */
370
+ buildInstance(options = {}) {
371
+ return ApplicationInstance.create({
372
+ ...options,
373
+ base: this,
374
+ application: this
375
+ });
376
+ }
377
+
378
+ /**
379
+ Start tracking an ApplicationInstance for this application.
380
+ Used when the ApplicationInstance is created.
381
+ @private
382
+ @method _watchInstance
383
+ */
384
+ _watchInstance(instance) {
385
+ this._applicationInstances.add(instance);
386
+ }
387
+
388
+ /**
389
+ Stop tracking an ApplicationInstance for this application.
390
+ Used when the ApplicationInstance is about to be destroyed.
391
+ @private
392
+ @method _unwatchInstance
393
+ */
394
+ _unwatchInstance(instance) {
395
+ return this._applicationInstances.delete(instance);
396
+ }
397
+ Router;
398
+ __deprecatedInstance__;
399
+ __container__;
400
+
401
+ /*
402
+ Build the deprecated instance for legacy globals mode support.
403
+ Called when creating and resetting the application.
404
+ This is orthogonal to autoboot: the deprecated instance needs to
405
+ be created at Application construction (not boot) time to expose
406
+ App.__container__. If autoboot sees that this instance exists,
407
+ it will continue booting it to avoid doing unncessary work (as
408
+ opposed to building a new instance at boot time), but they are
409
+ otherwise unrelated.
410
+ @private
411
+ @method _buildDeprecatedInstance
412
+ */
413
+ _buildDeprecatedInstance() {
414
+ // Build a default instance
415
+ let instance = this.buildInstance();
416
+
417
+ // Legacy support for App.__container__ and other global methods
418
+ // on App that rely on a single, default instance.
419
+ this.__deprecatedInstance__ = instance;
420
+ this.__container__ = instance.__container__;
421
+ }
422
+
423
+ /**
424
+ Automatically kick-off the boot process for the application once the
425
+ DOM has become ready.
426
+ The initialization itself is scheduled on the actions queue which
427
+ ensures that code-loading finishes before booting.
428
+ If you are asynchronously loading code, you should call `deferReadiness()`
429
+ to defer booting, and then call `advanceReadiness()` once all of your code
430
+ has finished loading.
431
+ @private
432
+ @method waitForDOMReady
433
+ */
434
+ waitForDOMReady() {
435
+ const document = this._document;
436
+
437
+ // SAFETY: Casting as Document should be safe since we're just reading a property.
438
+ // If it's not actually a Document then it will evaluate false which is fine for our
439
+ // purposes.
440
+ if (document === null || document.readyState !== 'loading') {
441
+ schedule('actions', this, this.domReady);
442
+ } else {
443
+ let callback = () => {
444
+ document.removeEventListener('DOMContentLoaded', callback);
445
+ run(this, this.domReady);
446
+ };
447
+ document.addEventListener('DOMContentLoaded', callback);
448
+ }
449
+ }
450
+
451
+ /**
452
+ This is the autoboot flow:
453
+ 1. Boot the app by calling `this.boot()`
454
+ 2. Create an instance (or use the `__deprecatedInstance__` in globals mode)
455
+ 3. Boot the instance by calling `instance.boot()`
456
+ 4. Invoke the `App.ready()` callback
457
+ 5. Kick-off routing on the instance
458
+ Ideally, this is all we would need to do:
459
+ ```javascript
460
+ _autoBoot() {
461
+ this.boot().then(() => {
462
+ let instance = this.__deprecatedInstance__;
463
+ return instance.boot();
464
+ }).then((instance) => {
465
+ App.ready();
466
+ instance.startRouting();
467
+ });
468
+ }
469
+ ```
470
+ Unfortunately, we cannot actually write this because we need to participate
471
+ in the "synchronous" boot process. While the code above would work fine on
472
+ the initial boot (i.e. DOM ready), when `App.reset()` is called, we need to
473
+ boot a new instance synchronously (see the documentation on `_bootSync()`
474
+ for details).
475
+ Because of this restriction, the actual logic of this method is located
476
+ inside `didBecomeReady()`.
477
+ @private
478
+ @method domReady
479
+ */
480
+ domReady() {
481
+ if (this.isDestroying || this.isDestroyed) {
482
+ return;
483
+ }
484
+ this._bootSync();
485
+
486
+ // Continues to `didBecomeReady`
487
+ }
488
+
489
+ /**
490
+ Use this to defer readiness until some condition is true.
491
+ Example:
492
+ ```javascript
493
+ import Application from '@ember/application';
494
+ let App = Application.create();
495
+ App.deferReadiness();
496
+ fetch('/auth-token')
497
+ .then(response => response.json())
498
+ .then(data => {
499
+ App.token = data.token;
500
+ App.advanceReadiness();
501
+ });
502
+ ```
503
+ This allows you to perform asynchronous setup logic and defer
504
+ booting your application until the setup has finished.
505
+ However, if the setup requires a loading UI, it might be better
506
+ to use the router for this purpose.
507
+ @method deferReadiness
508
+ @public
509
+ */
510
+ deferReadiness() {
511
+ this._readinessDeferrals++;
512
+ }
513
+
514
+ /**
515
+ Call `advanceReadiness` after any asynchronous setup logic has completed.
516
+ Each call to `deferReadiness` must be matched by a call to `advanceReadiness`
517
+ or the application will never become ready and routing will not begin.
518
+ @method advanceReadiness
519
+ @see {Application#deferReadiness}
520
+ @public
521
+ */
522
+ advanceReadiness() {
523
+ this._readinessDeferrals--;
524
+ if (this._readinessDeferrals === 0) {
525
+ once(this, this.didBecomeReady);
526
+ }
527
+ }
528
+ _bootPromise = null;
529
+
530
+ /**
531
+ Initialize the application and return a promise that resolves with the `Application`
532
+ object when the boot process is complete.
533
+ Run any application initializers and run the application load hook. These hooks may
534
+ choose to defer readiness. For example, an authentication hook might want to defer
535
+ readiness until the auth token has been retrieved.
536
+ By default, this method is called automatically on "DOM ready"; however, if autoboot
537
+ is disabled, this is automatically called when the first application instance is
538
+ created via `visit`.
539
+ @public
540
+ @method boot
541
+ @return {Promise<Application,Error>}
542
+ */
543
+ boot() {
544
+ if (this._bootPromise) {
545
+ return this._bootPromise;
546
+ }
547
+ try {
548
+ this._bootSync();
549
+ } catch (_) {
550
+ // Ignore the error: in the asynchronous boot path, the error is already reflected
551
+ // in the promise rejection
552
+ }
553
+ return this._bootPromise;
554
+ }
555
+ _bootResolver = null;
556
+
557
+ /**
558
+ Unfortunately, a lot of existing code assumes the booting process is
559
+ "synchronous". Specifically, a lot of tests assumes the last call to
560
+ `app.advanceReadiness()` or `app.reset()` will result in the app being
561
+ fully-booted when the current runloop completes.
562
+ We would like new code (like the `visit` API) to stop making this assumption,
563
+ so we created the asynchronous version above that returns a promise. But until
564
+ we have migrated all the code, we would have to expose this method for use
565
+ *internally* in places where we need to boot an app "synchronously".
566
+ @private
567
+ */
568
+ _bootSync() {
569
+ if (this._booted || this.isDestroying || this.isDestroyed) {
570
+ return;
571
+ }
572
+
573
+ // Even though this returns synchronously, we still need to make sure the
574
+ // boot promise exists for book-keeping purposes: if anything went wrong in
575
+ // the boot process, we need to store the error as a rejection on the boot
576
+ // promise so that a future caller of `boot()` can tell what failed.
577
+ let defer = this._bootResolver = RSVP.defer();
578
+ this._bootPromise = defer.promise;
579
+ try {
580
+ this.runInitializers();
581
+ this.advanceReadiness();
582
+ // Continues to `didBecomeReady`
583
+ } catch (error) {
584
+ // For the asynchronous boot path
585
+ defer.reject(error);
586
+
587
+ // For the synchronous boot path
588
+ throw error;
589
+ }
590
+ }
591
+
592
+ /**
593
+ Reset the application. This is typically used only in tests. It cleans up
594
+ the application in the following order:
595
+ 1. Deactivate existing routes
596
+ 2. Destroy all objects in the container
597
+ 3. Create a new application container
598
+ 4. Re-route to the existing url
599
+ Typical Example:
600
+ ```javascript
601
+ import Application from '@ember/application';
602
+ let App;
603
+ run(function() {
604
+ App = Application.create();
605
+ });
606
+ module('acceptance test', {
607
+ setup: function() {
608
+ App.reset();
609
+ }
610
+ });
611
+ test('first test', function() {
612
+ // App is freshly reset
613
+ });
614
+ test('second test', function() {
615
+ // App is again freshly reset
616
+ });
617
+ ```
618
+ Advanced Example:
619
+ Occasionally you may want to prevent the app from initializing during
620
+ setup. This could enable extra configuration, or enable asserting prior
621
+ to the app becoming ready.
622
+ ```javascript
623
+ import Application from '@ember/application';
624
+ let App;
625
+ run(function() {
626
+ App = Application.create();
627
+ });
628
+ module('acceptance test', {
629
+ setup: function() {
630
+ run(function() {
631
+ App.reset();
632
+ App.deferReadiness();
633
+ });
634
+ }
635
+ });
636
+ test('first test', function() {
637
+ ok(true, 'something before app is initialized');
638
+ run(function() {
639
+ App.advanceReadiness();
640
+ });
641
+ ok(true, 'something after app is initialized');
642
+ });
643
+ ```
644
+ @method reset
645
+ @public
646
+ */
647
+ reset() {
648
+ let instance = this.__deprecatedInstance__;
649
+ this._readinessDeferrals = 1;
650
+ this._bootPromise = null;
651
+ this._bootResolver = null;
652
+ this._booted = false;
653
+ function handleReset() {
654
+ run(instance, 'destroy');
655
+ this._buildDeprecatedInstance();
656
+ schedule('actions', this, '_bootSync');
657
+ }
658
+ join(this, handleReset);
659
+ }
660
+
661
+ /**
662
+ @private
663
+ @method didBecomeReady
664
+ */
665
+ didBecomeReady() {
666
+ if (this.isDestroying || this.isDestroyed) {
667
+ return;
668
+ }
669
+ try {
670
+ // See documentation on `_autoboot()` for details
671
+ if (this.autoboot) {
672
+ // If we already have the __deprecatedInstance__ lying around, boot it to
673
+ // avoid unnecessary work
674
+ let instance = this.__deprecatedInstance__;
675
+ (false && !(instance) && assert('expected instance', instance));
676
+ instance._bootSync();
677
+
678
+ // TODO: App.ready() is not called when autoboot is disabled, is this correct?
679
+ this.ready();
680
+ instance.startRouting();
681
+ }
682
+
683
+ // For the asynchronous boot path
684
+ this._bootResolver.resolve(this);
685
+
686
+ // For the synchronous boot path
687
+ this._booted = true;
688
+ } catch (error) {
689
+ // For the asynchronous boot path
690
+ this._bootResolver.reject(error);
691
+
692
+ // For the synchronous boot path
693
+ throw error;
694
+ }
695
+ }
696
+
697
+ /**
698
+ Called when the Application has become ready, immediately before routing
699
+ begins. The call will be delayed until the DOM has become ready.
700
+ @event ready
701
+ @public
702
+ */
703
+ ready() {
704
+ return this;
705
+ }
706
+
707
+ // This method must be moved to the application instance object
708
+ willDestroy() {
709
+ super.willDestroy();
710
+ if (this._applicationInstances.size) {
711
+ this._applicationInstances.forEach(i => i.destroy());
712
+ this._applicationInstances.clear();
713
+ }
714
+ }
715
+
716
+ /**
717
+ Boot a new instance of `ApplicationInstance` for the current
718
+ application and navigate it to the given `url`. Returns a `Promise` that
719
+ resolves with the instance when the initial routing and rendering is
720
+ complete, or rejects with any error that occurred during the boot process.
721
+ When `autoboot` is disabled, calling `visit` would first cause the
722
+ application to boot, which runs the application initializers.
723
+ This method also takes a hash of boot-time configuration options for
724
+ customizing the instance's behavior. See the documentation on
725
+ `ApplicationInstance.BootOptions` for details.
726
+ `ApplicationInstance.BootOptions` is an interface class that exists
727
+ purely to document the available options; you do not need to construct it
728
+ manually. Simply pass a regular JavaScript object containing of the
729
+ desired options:
730
+ ```javascript
731
+ MyApp.visit("/", { location: "none", rootElement: "#container" });
732
+ ```
733
+ ### Supported Scenarios
734
+ While the `BootOptions` class exposes a large number of knobs, not all
735
+ combinations of them are valid; certain incompatible combinations might
736
+ result in unexpected behavior.
737
+ For example, booting the instance in the full browser environment
738
+ while specifying a foreign `document` object (e.g. `{ isBrowser: true,
739
+ document: iframe.contentDocument }`) does not work correctly today,
740
+ largely due to Ember's jQuery dependency.
741
+ Currently, there are three officially supported scenarios/configurations.
742
+ Usages outside of these scenarios are not guaranteed to work, but please
743
+ feel free to file bug reports documenting your experience and any issues
744
+ you encountered to help expand support.
745
+ #### Browser Applications (Manual Boot)
746
+ The setup is largely similar to how Ember works out-of-the-box. Normally,
747
+ Ember will boot a default instance for your Application on "DOM ready".
748
+ However, you can customize this behavior by disabling `autoboot`.
749
+ For example, this allows you to render a miniture demo of your application
750
+ into a specific area on your marketing website:
751
+ ```javascript
752
+ import MyApp from 'my-app';
753
+ $(function() {
754
+ let App = MyApp.create({ autoboot: false });
755
+ let options = {
756
+ // Override the router's location adapter to prevent it from updating
757
+ // the URL in the address bar
758
+ location: 'none',
759
+ // Override the default `rootElement` on the app to render into a
760
+ // specific `div` on the page
761
+ rootElement: '#demo'
762
+ };
763
+ // Start the app at the special demo URL
764
+ App.visit('/demo', options);
765
+ });
766
+ ```
767
+ Or perhaps you might want to boot two instances of your app on the same
768
+ page for a split-screen multiplayer experience:
769
+ ```javascript
770
+ import MyApp from 'my-app';
771
+ $(function() {
772
+ let App = MyApp.create({ autoboot: false });
773
+ let sessionId = MyApp.generateSessionID();
774
+ let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });
775
+ let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });
776
+ Promise.all([player1, player2]).then(() => {
777
+ // Both apps have completed the initial render
778
+ $('#loading').fadeOut();
779
+ });
780
+ });
781
+ ```
782
+ Do note that each app instance maintains their own registry/container, so
783
+ they will run in complete isolation by default.
784
+ #### Server-Side Rendering (also known as FastBoot)
785
+ This setup allows you to run your Ember app in a server environment using
786
+ Node.js and render its content into static HTML for SEO purposes.
787
+ ```javascript
788
+ const HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);
789
+ function renderURL(url) {
790
+ let dom = new SimpleDOM.Document();
791
+ let rootElement = dom.body;
792
+ let options = { isBrowser: false, document: dom, rootElement: rootElement };
793
+ return MyApp.visit(options).then(instance => {
794
+ try {
795
+ return HTMLSerializer.serialize(rootElement.firstChild);
796
+ } finally {
797
+ instance.destroy();
798
+ }
799
+ });
800
+ }
801
+ ```
802
+ In this scenario, because Ember does not have access to a global `document`
803
+ object in the Node.js environment, you must provide one explicitly. In practice,
804
+ in the non-browser environment, the stand-in `document` object only needs to
805
+ implement a limited subset of the full DOM API. The `SimpleDOM` library is known
806
+ to work.
807
+ Since there is no DOM access in the non-browser environment, you must also
808
+ specify a DOM `Element` object in the same `document` for the `rootElement` option
809
+ (as opposed to a selector string like `"body"`).
810
+ See the documentation on the `isBrowser`, `document` and `rootElement` properties
811
+ on `ApplicationInstance.BootOptions` for details.
812
+ #### Server-Side Resource Discovery
813
+ This setup allows you to run the routing layer of your Ember app in a server
814
+ environment using Node.js and completely disable rendering. This allows you
815
+ to simulate and discover the resources (i.e. AJAX requests) needed to fulfill
816
+ a given request and eagerly "push" these resources to the client.
817
+ ```app/initializers/network-service.js
818
+ import BrowserNetworkService from 'app/services/network/browser';
819
+ import NodeNetworkService from 'app/services/network/node';
820
+ // Inject a (hypothetical) service for abstracting all AJAX calls and use
821
+ // the appropriate implementation on the client/server. This also allows the
822
+ // server to log all the AJAX calls made during a particular request and use
823
+ // that for resource-discovery purpose.
824
+ export function initialize(application) {
825
+ if (window) { // browser
826
+ application.register('service:network', BrowserNetworkService);
827
+ } else { // node
828
+ application.register('service:network', NodeNetworkService);
829
+ }
830
+ };
831
+ export default {
832
+ name: 'network-service',
833
+ initialize: initialize
834
+ };
835
+ ```
836
+ ```app/routes/post.js
837
+ import Route from '@ember/routing/route';
838
+ import { service } from '@ember/service';
839
+ // An example of how the (hypothetical) service is used in routes.
840
+ export default class IndexRoute extends Route {
841
+ @service network;
842
+ model(params) {
843
+ return this.network.fetch(`/api/posts/${params.post_id}.json`);
844
+ }
845
+ afterModel(post) {
846
+ if (post.isExternalContent) {
847
+ return this.network.fetch(`/api/external/?url=${post.externalURL}`);
848
+ } else {
849
+ return post;
850
+ }
851
+ }
852
+ }
853
+ ```
854
+ ```javascript
855
+ // Finally, put all the pieces together
856
+ function discoverResourcesFor(url) {
857
+ return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {
858
+ let networkService = instance.lookup('service:network');
859
+ return networkService.requests; // => { "/api/posts/123.json": "..." }
860
+ });
861
+ }
862
+ ```
863
+ @public
864
+ @method visit
865
+ @param url {String} The initial URL to navigate to
866
+ @param options {ApplicationInstance.BootOptions}
867
+ @return {Promise<ApplicationInstance, Error>}
868
+ */
869
+ visit(url, options) {
870
+ return this.boot().then(() => {
871
+ let instance = this.buildInstance();
872
+ return instance.boot(options).then(() => instance.visit(url)).catch(error => {
873
+ run(instance, 'destroy');
874
+ throw error;
875
+ });
876
+ });
877
+ }
878
+ }
879
+ function commonSetupRegistry(registry) {
880
+ registry.register('router:main', EmberRouter);
881
+ registry.register('-view-registry:main', {
882
+ create() {
883
+ return makeDictionary(null);
884
+ }
885
+ });
886
+ registry.register('route:basic', Route);
887
+ registry.register('event_dispatcher:main', EventDispatcher);
888
+ registry.register('location:hash', HashLocation);
889
+ registry.register('location:history', HistoryLocation);
890
+ registry.register('location:none', NoneLocation);
891
+ registry.register(privatize`-bucket-cache:main`, {
892
+ create() {
893
+ return new BucketCache();
894
+ }
895
+ });
896
+ registry.register('service:router', RouterService);
897
+ }
898
+
899
+ export { Application as default, getOwner, setOwner };