ember-source 4.5.0-alpha.4 → 4.5.0-beta.2

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 (126) hide show
  1. package/CHANGELOG.md +13 -4
  2. package/blueprints-js/-addon-import.js +48 -0
  3. package/blueprints-js/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +24 -0
  4. package/blueprints-js/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  5. package/blueprints-js/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +12 -0
  6. package/blueprints-js/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +13 -0
  7. package/blueprints-js/component/files/__root__/__path__/__name__.js +3 -0
  8. package/blueprints-js/component/files/__root__/__templatepath__/__templatename__.hbs +1 -0
  9. package/blueprints-js/component-addon/files/__root__/__path__/__name__.js +1 -0
  10. package/blueprints-js/component-class/files/__root__/__path__/__name__.js +3 -0
  11. package/blueprints-js/component-class-addon/files/__root__/__path__/__name__.js +1 -0
  12. package/blueprints-js/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +34 -0
  13. package/blueprints-js/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +36 -0
  14. package/blueprints-js/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +38 -0
  15. package/blueprints-js/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +31 -0
  16. package/blueprints-js/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +36 -0
  17. package/blueprints-js/controller/files/__root__/__path__/__name__.js +3 -0
  18. package/blueprints-js/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  19. package/blueprints-js/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  20. package/blueprints-js/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  21. package/blueprints-js/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  22. package/blueprints-js/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  23. package/blueprints-js/helper/files/__root__/__collection__/__name__.js +5 -0
  24. package/blueprints-js/helper/mu-files/__root__/__collection__/__name__.js +7 -0
  25. package/blueprints-js/helper-addon/files/__root__/__path__/__name__.js +1 -0
  26. package/blueprints-js/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +26 -0
  27. package/blueprints-js/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +28 -0
  28. package/blueprints-js/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +18 -0
  29. package/blueprints-js/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +15 -0
  30. package/blueprints-js/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +17 -0
  31. package/blueprints-js/initializer/files/__root__/initializers/__name__.js +5 -0
  32. package/blueprints-js/initializer-addon/files/__root__/__path__/__name__.js +1 -0
  33. package/blueprints-js/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +28 -0
  34. package/blueprints-js/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +31 -0
  35. package/blueprints-js/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +25 -0
  36. package/blueprints-js/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +37 -0
  37. package/blueprints-js/instance-initializer/files/__root__/instance-initializers/__name__.js +5 -0
  38. package/blueprints-js/instance-initializer-addon/files/__root__/__path__/__name__.js +1 -0
  39. package/blueprints-js/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +30 -0
  40. package/blueprints-js/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +32 -0
  41. package/blueprints-js/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +26 -0
  42. package/blueprints-js/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +39 -0
  43. package/blueprints-js/mixin/files/__root__/mixins/__name__.js +3 -0
  44. package/blueprints-js/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +13 -0
  45. package/blueprints-js/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +13 -0
  46. package/blueprints-js/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +12 -0
  47. package/blueprints-js/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +12 -0
  48. package/blueprints-js/route/files/__root__/__path__/__name__.js +9 -0
  49. package/blueprints-js/route/files/__root__/__templatepath__/__templatename__.hbs +2 -0
  50. package/blueprints-js/route-addon/files/__root__/__path__/__name__.js +1 -0
  51. package/blueprints-js/route-addon/files/__root__/__templatepath__/__templatename__.js +1 -0
  52. package/blueprints-js/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +15 -0
  53. package/blueprints-js/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +17 -0
  54. package/blueprints-js/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  55. package/blueprints-js/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +11 -0
  56. package/blueprints-js/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +11 -0
  57. package/blueprints-js/service/files/__root__/__path__/__name__.js +3 -0
  58. package/blueprints-js/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +16 -0
  59. package/blueprints-js/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +18 -0
  60. package/blueprints-js/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +13 -0
  61. package/blueprints-js/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +12 -0
  62. package/blueprints-js/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +12 -0
  63. package/blueprints-js/template/files/__root__/__path__/__name__.hbs +0 -0
  64. package/blueprints-js/test-framework-detector.js +60 -0
  65. package/blueprints-js/util/files/__root__/utils/__name__.js +3 -0
  66. package/blueprints-js/util-test/mocha-files/__root__/__testType__/__name__-test.js +11 -0
  67. package/blueprints-js/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +11 -0
  68. package/blueprints-js/util-test/qunit-files/__root__/__testType__/__name__-test.js +10 -0
  69. package/blueprints-js/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +10 -0
  70. package/build-metadata.json +3 -3
  71. package/dist/ember-template-compiler.js +12 -5
  72. package/dist/ember-template-compiler.map +1 -1
  73. package/dist/ember-testing.js +1 -1
  74. package/dist/ember-testing.map +1 -1
  75. package/dist/ember.debug.js +722 -1001
  76. package/dist/ember.debug.map +1 -1
  77. package/dist/header/license.js +1 -1
  78. package/dist/packages/@ember/-internals/container/index.js +2 -2
  79. package/dist/packages/@ember/-internals/glimmer/index.js +33 -23
  80. package/dist/packages/@ember/-internals/metal/index.js +19 -7
  81. package/dist/packages/@ember/-internals/routing/lib/location/api.js +3 -3
  82. package/dist/packages/@ember/-internals/routing/lib/location/auto_location.js +5 -1
  83. package/dist/packages/@ember/-internals/routing/lib/services/router.js +7 -6
  84. package/dist/packages/@ember/-internals/routing/lib/services/routing.js +9 -6
  85. package/dist/packages/@ember/-internals/routing/lib/system/route.js +6 -9
  86. package/dist/packages/@ember/-internals/routing/lib/system/router.js +4 -2
  87. package/dist/packages/@ember/-internals/routing/lib/utils.js +15 -25
  88. package/dist/packages/@ember/-internals/runtime/lib/compare.js +4 -1
  89. package/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +14 -15
  90. package/dist/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +32 -44
  91. package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +1 -1
  92. package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +7 -22
  93. package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +34 -46
  94. package/dist/packages/@ember/-internals/runtime/lib/mixins/enumerable.js +2 -15
  95. package/dist/packages/@ember/-internals/runtime/lib/mixins/evented.js +13 -57
  96. package/dist/packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.js +2 -16
  97. package/dist/packages/@ember/-internals/runtime/lib/mixins/observable.js +64 -134
  98. package/dist/packages/@ember/-internals/runtime/lib/mixins/promise_proxy.js +28 -86
  99. package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +59 -61
  100. package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +17 -24
  101. package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +59 -85
  102. package/dist/packages/@ember/-internals/runtime/lib/system/object.js +9 -2
  103. package/dist/packages/@ember/-internals/runtime/lib/system/object_proxy.js +3 -77
  104. package/dist/packages/@ember/-internals/utils/index.js +1 -1
  105. package/dist/packages/@ember/-internals/utils/types.js +1 -0
  106. package/dist/packages/@ember/-internals/views/lib/compat/attrs.js +1 -2
  107. package/dist/packages/@ember/-internals/views/lib/component_lookup.js +2 -2
  108. package/dist/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -9
  109. package/dist/packages/@ember/-internals/views/lib/mixins/child_views_support.js +4 -6
  110. package/dist/packages/@ember/-internals/views/lib/mixins/class_names_support.js +13 -18
  111. package/dist/packages/@ember/-internals/views/lib/mixins/view_state_support.js +3 -2
  112. package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +57 -58
  113. package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +142 -120
  114. package/dist/packages/@ember/-internals/views/lib/system/utils.js +1 -1
  115. package/dist/packages/@ember/-internals/views/lib/views/states/destroying.js +1 -1
  116. package/dist/packages/@ember/-internals/views/lib/views/states/has_element.js +2 -2
  117. package/dist/packages/@ember/-internals/views/lib/views/states/in_dom.js +3 -1
  118. package/dist/packages/@ember/application/instance.js +1 -0
  119. package/dist/packages/@ember/application/lib/application.js +8 -1
  120. package/dist/packages/@ember/canary-features/index.js +2 -2
  121. package/dist/packages/@ember/engine/instance.js +1 -1
  122. package/dist/packages/@ember/engine/lib/engine-parent.js +1 -5
  123. package/dist/packages/@ember/renderer/index.js +28 -0
  124. package/dist/packages/ember/version.js +1 -1
  125. package/docs/data.json +838 -712
  126. package/package.json +4 -3
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 4.5.0-alpha.4
9
+ * @version 4.5.0-beta.2
10
10
  */
11
11
  /* eslint-disable no-var */
12
12
 
@@ -541,7 +541,7 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
541
541
  }
542
542
  }
543
543
 
544
- var INIT_FACTORY = (0, _utils.symbol)('INIT_FACTORY');
544
+ var INIT_FACTORY = Symbol('INIT_FACTORY');
545
545
  _exports.INIT_FACTORY = INIT_FACTORY;
546
546
 
547
547
  function getFactoryFor(obj) {
@@ -4185,7 +4185,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4185
4185
  return props;
4186
4186
  }
4187
4187
 
4188
- var REF = (0, _utils.symbol)('REF');
4188
+ var REF = Symbol('REF');
4189
4189
 
4190
4190
  class MutableCell {
4191
4191
  constructor(ref, value) {
@@ -4215,9 +4215,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4215
4215
 
4216
4216
  var ARGS = (0, _utils.enumerableSymbol)('ARGS');
4217
4217
  var HAS_BLOCK = (0, _utils.enumerableSymbol)('HAS_BLOCK');
4218
- var DIRTY_TAG = (0, _utils.symbol)('DIRTY_TAG');
4219
- var IS_DISPATCHING_ATTRS = (0, _utils.symbol)('IS_DISPATCHING_ATTRS');
4220
- var BOUNDS = (0, _utils.symbol)('BOUNDS');
4218
+ var DIRTY_TAG = Symbol('DIRTY_TAG');
4219
+ var IS_DISPATCHING_ATTRS = Symbol('IS_DISPATCHING_ATTRS');
4220
+ var BOUNDS = Symbol('BOUNDS');
4221
4221
  var EMBER_VIEW_REF = (0, _reference.createPrimitiveRef)('ember-view');
4222
4222
 
4223
4223
  function aliasIdToElementId(args, props) {
@@ -4933,7 +4933,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
4933
4933
 
4934
4934
  var _a;
4935
4935
 
4936
- var RECOMPUTE_TAG = (0, _utils.symbol)('RECOMPUTE_TAG');
4936
+ var RECOMPUTE_TAG = Symbol('RECOMPUTE_TAG');
4937
4937
  var IS_CLASSIC_HELPER = Symbol('IS_CLASSIC_HELPER');
4938
4938
 
4939
4939
  class Helper extends _runtime2.FrameworkObject {
@@ -5178,14 +5178,25 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
5178
5178
  return string.replace(badChars, escapeChar);
5179
5179
  }
5180
5180
  /**
5181
- Mark a string as safe for unescaped output with Ember templates. If you
5182
- return HTML from a helper, use this function to
5183
- ensure Ember's rendering layer does not escape the HTML.
5181
+ Use this method to indicate that a string should be rendered as HTML
5182
+ when the string is used in a template. To say this another way,
5183
+ strings marked with `htmlSafe` will not be HTML escaped.
5184
+
5185
+ A word of warning - The `htmlSafe` method does not make the string safe;
5186
+ it only tells the framework to treat the string as if it is safe to render
5187
+ as HTML. If a string contains user inputs or other untrusted
5188
+ data, you must sanitize the string before using the `htmlSafe` method.
5189
+ Otherwise your code is vulnerable to
5190
+ [Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).
5191
+ There are many open source sanitization libraries to choose from,
5192
+ both for front end and server-side sanitization.
5184
5193
 
5185
5194
  ```javascript
5186
5195
  import { htmlSafe } from '@ember/template';
5187
5196
 
5188
- htmlSafe('<div>someString</div>')
5197
+ const someTrustedOrSanitizedString = "<div>Hello!</div>"
5198
+
5199
+ htmlSafe(someTrustedorSanitizedString)
5189
5200
  ```
5190
5201
 
5191
5202
  @method htmlSafe
@@ -5919,11 +5930,11 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
5919
5930
  }
5920
5931
 
5921
5932
  function hasForEach(value) {
5922
- return typeof value['forEach'] === 'function';
5933
+ return value != null && typeof value['forEach'] === 'function';
5923
5934
  }
5924
5935
 
5925
5936
  function isNativeIterable(value) {
5926
- return typeof value[Symbol.iterator] === 'function';
5937
+ return value != null && typeof value[Symbol.iterator] === 'function';
5927
5938
  }
5928
5939
 
5929
5940
  function isIndexable(value) {
@@ -7129,11 +7140,18 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7129
7140
  '-outlet': outletHelper,
7130
7141
  '-in-el-null': inElementNullCheckHelper
7131
7142
  };
7143
+ var BUILTIN_HELPERS = Object.assign(Object.assign({}, BUILTIN_KEYWORD_HELPERS), {
7144
+ array: _runtime.array,
7145
+ concat: _runtime.concat,
7146
+ fn: _runtime.fn,
7147
+ get: _runtime.get,
7148
+ hash: _runtime.hash
7149
+ });
7132
7150
 
7133
7151
  if (true
7134
7152
  /* DEBUG */
7135
7153
  ) {
7136
- BUILTIN_KEYWORD_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;
7154
+ BUILTIN_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;
7137
7155
  } else {
7138
7156
  // Bug: this may be a quirk of our test setup?
7139
7157
  // In prod builds, this is a no-op helper and is unused in practice. We shouldn't need
@@ -7143,16 +7161,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7143
7161
  // not really harm anything, since it's just a no-op pass-through helper and the bytes
7144
7162
  // has to be included anyway. In the future, perhaps we can avoid the latter by using
7145
7163
  // `import(...)`?
7146
- BUILTIN_KEYWORD_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;
7164
+ BUILTIN_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;
7147
7165
  }
7148
7166
 
7149
- var BUILTIN_HELPERS = Object.assign(Object.assign({}, BUILTIN_KEYWORD_HELPERS), {
7150
- array: _runtime.array,
7151
- concat: _runtime.concat,
7152
- fn: _runtime.fn,
7153
- get: _runtime.get,
7154
- hash: _runtime.hash
7155
- });
7156
7167
  {
7157
7168
  BUILTIN_HELPERS['unique-id'] = uniqueId;
7158
7169
  }
@@ -7744,7 +7755,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
7744
7755
 
7745
7756
  getBounds(view) {
7746
7757
  var bounds = view[BOUNDS];
7747
- (true && !(Boolean(bounds)) && (0, _debug.assert)('object passed to getBounds must have the BOUNDS symbol as a property', Boolean(bounds)));
7758
+ (true && !(bounds) && (0, _debug.assert)('object passed to getBounds must have the BOUNDS symbol as a property', bounds));
7748
7759
  var parentElement = bounds.parentElement();
7749
7760
  var firstNode = bounds.firstNode();
7750
7761
  var lastNode = bounds.lastNode();
@@ -9395,8 +9406,13 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
9395
9406
  */
9396
9407
 
9397
9408
 
9398
- var PROPERTY_DID_CHANGE = (0, _utils.enumerableSymbol)('PROPERTY_DID_CHANGE');
9409
+ var PROPERTY_DID_CHANGE = Symbol('PROPERTY_DID_CHANGE');
9399
9410
  _exports.PROPERTY_DID_CHANGE = PROPERTY_DID_CHANGE;
9411
+
9412
+ function hasPropertyDidChange(obj) {
9413
+ return obj != null && typeof obj === 'object' && typeof obj[PROPERTY_DID_CHANGE] === 'function';
9414
+ }
9415
+
9400
9416
  var deferred = 0;
9401
9417
  /**
9402
9418
  This function is called just after an object property has changed.
@@ -9431,9 +9447,11 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
9431
9447
  }
9432
9448
 
9433
9449
  if (PROPERTY_DID_CHANGE in obj) {
9434
- // we need to check the arguments length here; there's a check in `PROPERTY_DID_CHANGE`
9450
+ // It's redundant to do this here, but we don't want to check above so we can avoid an extra function call in prod.
9451
+ (true && !(hasPropertyDidChange(obj)) && (0, _debug.assert)('property did change hook is invalid', hasPropertyDidChange(obj))); // we need to check the arguments length here; there's a check in Component's `PROPERTY_DID_CHANGE`
9435
9452
  // that checks its arguments length, so we have to explicitly not call this with `value`
9436
9453
  // if it is not passed to `notifyPropertyChange`
9454
+
9437
9455
  if (arguments.length === 4) {
9438
9456
  obj[PROPERTY_DID_CHANGE](keyName, value);
9439
9457
  } else {
@@ -10362,8 +10380,9 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
10362
10380
  // See GH#18147 / GH#19028 for details.
10363
10381
 
10364
10382
  if ( // ensure that we only run this once, while the component is being instantiated
10365
- meta$$1.isInitializing() && this._dependentKeys !== undefined && this._dependentKeys.length > 0 && // These two properties are set on Ember.Component
10366
- typeof obj[PROPERTY_DID_CHANGE] === 'function' && obj.isComponent) {
10383
+ meta$$1.isInitializing() && this._dependentKeys !== undefined && this._dependentKeys.length > 0 && typeof obj[PROPERTY_DID_CHANGE] === 'function' && obj.isComponent) {
10384
+ // It's redundant to do this here, but we don't want to check above so we can avoid an extra function call in prod.
10385
+ (true && !(hasPropertyDidChange(obj)) && (0, _debug.assert)('property did change hook is invalid', hasPropertyDidChange(obj)));
10367
10386
  addObserver(obj, keyName, () => {
10368
10387
  obj[PROPERTY_DID_CHANGE](keyName);
10369
10388
  }, undefined, true);
@@ -11408,12 +11427,14 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11408
11427
 
11409
11428
  function getProperties(obj, keys) {
11410
11429
  var ret = {};
11411
- var propertyNames = arguments;
11430
+ var propertyNames;
11412
11431
  var i = 1;
11413
11432
 
11414
11433
  if (arguments.length === 2 && Array.isArray(keys)) {
11415
11434
  i = 0;
11416
11435
  propertyNames = arguments[1];
11436
+ } else {
11437
+ propertyNames = Array.from(arguments);
11417
11438
  }
11418
11439
 
11419
11440
  for (; i < propertyNames.length; i++) {
@@ -11591,7 +11612,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11591
11612
  if (obj && (0, _utils.getName)(obj) === void 0) {
11592
11613
  // Replace the class' `toString` with the dot-separated path
11593
11614
  (0, _utils.setName)(obj, paths.join('.')); // Support nested namespaces
11594
- } else if (obj && obj.isNamespace) {
11615
+ } else if (obj && isNamespace(obj)) {
11595
11616
  // Skip aliased namespaces
11596
11617
  if (seen.has(obj)) {
11597
11618
  continue;
@@ -11606,6 +11627,10 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
11606
11627
  paths.length = idx; // cut out last item
11607
11628
  }
11608
11629
 
11630
+ function isNamespace(obj) {
11631
+ return obj != null && typeof obj === 'object' && obj.isNamespace;
11632
+ }
11633
+
11609
11634
  function isUppercase(code) {
11610
11635
  return code >= 65 && code <= 90 // A
11611
11636
  ; // Z
@@ -13238,10 +13263,10 @@ define("@ember/-internals/routing/lib/location/api", ["exports", "@ember/debug"]
13238
13263
  @private
13239
13264
  */
13240
13265
  create(options) {
13241
- var implementation = options && options.implementation;
13242
- (true && !(Boolean(implementation)) && (0, _debug.assert)("Location.create: you must specify a 'implementation' option", Boolean(implementation)));
13266
+ var implementation = options === null || options === void 0 ? void 0 : options.implementation;
13267
+ (true && !(implementation) && (0, _debug.assert)("Location.create: you must specify a 'implementation' option", implementation));
13243
13268
  var implementationClass = this.implementations[implementation];
13244
- (true && !(Boolean(implementationClass)) && (0, _debug.assert)(`Location.create: ${implementation} is not a valid implementation`, Boolean(implementationClass)));
13269
+ (true && !(implementationClass) && (0, _debug.assert)(`Location.create: ${implementation} is not a valid implementation`, implementationClass));
13245
13270
  (true && !(false) && (0, _debug.deprecate)("Calling `create` on Location class is deprecated. Instead, use `container.lookup('location:my-location')` to lookup the location you need.", false, {
13246
13271
  id: 'deprecate-auto-location',
13247
13272
  until: '5.0.0',
@@ -13389,7 +13414,10 @@ define("@ember/-internals/routing/lib/location/auto_location", ["exports", "@emb
13389
13414
  var {
13390
13415
  concreteImplementation
13391
13416
  } = this;
13392
- (true && !(concreteImplementation) && (0, _debug.assert)("AutoLocation's detect() method should be called before calling any other hooks.", concreteImplementation));
13417
+ (true && !(concreteImplementation) && (0, _debug.assert)("AutoLocation's detect() method should be called before calling any other hooks.", concreteImplementation)); // We need this cast because `Parameters` is deferred so that it is not
13418
+ // possible for TS to see it will always produce the right type. However,
13419
+ // since `AnyFn` has a rest type, it is allowed. See discussion on [this
13420
+ // issue](https://github.com/microsoft/TypeScript/issues/47615).
13393
13421
 
13394
13422
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13395
13423
  args[_key] = arguments[_key];
@@ -14241,13 +14269,13 @@ define("@ember/-internals/routing/lib/location/util", ["exports"], function (_ex
14241
14269
  location.replace(getOrigin(location) + path);
14242
14270
  }
14243
14271
  });
14244
- define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service", "@glimmer/validator", "@ember/-internals/routing/lib/system/router", "@ember/-internals/routing/lib/utils"], function (_exports, _owner, _runtime, _utils, _debug, _computed, _service, _validator, _router, _utils2) {
14272
+ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/debug", "@ember/object/computed", "@ember/service", "@glimmer/validator", "@ember/-internals/routing/lib/system/router", "@ember/-internals/routing/lib/utils"], function (_exports, _owner, _runtime, _debug, _computed, _service, _validator, _router2, _utils) {
14245
14273
  "use strict";
14246
14274
 
14247
14275
  Object.defineProperty(_exports, "__esModule", {
14248
14276
  value: true
14249
14277
  });
14250
- _exports.default = void 0;
14278
+ _exports.default = _exports.ROUTER = void 0;
14251
14279
 
14252
14280
  var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
14253
14281
  var c = arguments.length,
@@ -14259,7 +14287,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14259
14287
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14260
14288
  };
14261
14289
 
14262
- var ROUTER = (0, _utils.symbol)('ROUTER');
14290
+ var ROUTER = Symbol('ROUTER');
14291
+ _exports.ROUTER = ROUTER;
14263
14292
 
14264
14293
  function cleanURL(url, rootURL) {
14265
14294
  if (rootURL === '/') {
@@ -14279,14 +14308,16 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14279
14308
 
14280
14309
  var owner = (0, _owner.getOwner)(this);
14281
14310
  (true && !(owner) && (0, _debug.assert)('RouterService is unexpectedly missing an owner', owner));
14282
- router = owner.lookup('router:main');
14283
- (true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTER SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
14284
- return this[ROUTER] = router;
14311
+
14312
+ var _router = owner.lookup('router:main');
14313
+
14314
+ (true && !(_router instanceof _router2.default) && (0, _debug.assert)('ROUTER SERVICE BUG: Expected router to be an instance of EmberRouter', _router instanceof _router2.default));
14315
+ return this[ROUTER] = _router;
14285
14316
  }
14286
14317
 
14287
14318
  willDestroy() {
14288
14319
  super.willDestroy();
14289
- this[ROUTER] = null;
14320
+ this[ROUTER] = undefined;
14290
14321
  }
14291
14322
  /**
14292
14323
  Transition the application into another route. The route may
@@ -14333,7 +14364,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14333
14364
  args[_key] = arguments[_key];
14334
14365
  }
14335
14366
 
14336
- if ((0, _utils2.resemblesURL)(args[0])) {
14367
+ if ((0, _utils.resemblesURL)(args[0])) {
14337
14368
  // NOTE: this `args[0] as string` cast is safe and TS correctly infers it
14338
14369
  // in 3.6+, so it can be removed when TS is upgraded.
14339
14370
  return this._router._doURLTransition('transitionTo', args[0]);
@@ -14343,7 +14374,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14343
14374
  routeName,
14344
14375
  models,
14345
14376
  queryParams
14346
- } = (0, _utils2.extractRouteArgs)(args);
14377
+ } = (0, _utils.extractRouteArgs)(args);
14347
14378
 
14348
14379
  var transition = this._router._doTransition(routeName, models, queryParams, true);
14349
14380
 
@@ -14500,7 +14531,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14500
14531
  routeName,
14501
14532
  models,
14502
14533
  queryParams
14503
- } = (0, _utils2.extractRouteArgs)(args);
14534
+ } = (0, _utils.extractRouteArgs)(args);
14504
14535
  var routerMicrolib = this._router._routerMicrolib; // When using isActive() in a getter, we want to entagle with the auto-tracking system
14505
14536
  // for example,
14506
14537
  // in
@@ -14544,7 +14575,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14544
14575
  /* fromRouterService */
14545
14576
  );
14546
14577
 
14547
- return (0, _utils2.shallowEqual)(queryParams, currentQueryParams);
14578
+ return (0, _utils.shallowEqual)(queryParams, currentQueryParams);
14548
14579
  }
14549
14580
 
14550
14581
  return true;
@@ -14760,7 +14791,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
14760
14791
 
14761
14792
  __decorate([(0, _computed.readOnly)('_router.currentRoute')], RouterService.prototype, "currentRoute", void 0);
14762
14793
  });
14763
- define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/object/computed", "@ember/service", "@ember/-internals/routing/lib/system/router"], function (_exports, _owner, _utils, _debug, _computed, _service, _router) {
14794
+ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-internals/owner", "@ember/debug", "@ember/object/computed", "@ember/service", "@ember/-internals/routing/lib/system/router", "@ember/-internals/routing/lib/services/router"], function (_exports, _owner, _debug, _computed, _service, _router2, _router3) {
14764
14795
  "use strict";
14765
14796
 
14766
14797
  Object.defineProperty(_exports, "__esModule", {
@@ -14771,7 +14802,7 @@ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-in
14771
14802
  /**
14772
14803
  @module ember
14773
14804
  */
14774
- var ROUTER = (0, _utils.symbol)('ROUTER');
14805
+
14775
14806
  /**
14776
14807
  The Routing service is used by LinkTo, and provides facilities for
14777
14808
  the component/view layer to interact with the router.
@@ -14782,10 +14813,9 @@ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-in
14782
14813
  @private
14783
14814
  @class RoutingService
14784
14815
  */
14785
-
14786
14816
  class RoutingService extends _service.default {
14787
14817
  get router() {
14788
- var router = this[ROUTER];
14818
+ var router = this[_router3.ROUTER];
14789
14819
 
14790
14820
  if (router !== undefined) {
14791
14821
  return router;
@@ -14793,10 +14823,14 @@ define("@ember/-internals/routing/lib/services/routing", ["exports", "@ember/-in
14793
14823
 
14794
14824
  var owner = (0, _owner.getOwner)(this);
14795
14825
  (true && !(owner) && (0, _debug.assert)('RoutingService is unexpectedly missing an owner', owner));
14796
- router = owner.lookup('router:main');
14797
- (true && !(router instanceof _router.default) && (0, _debug.assert)('ROUTING SERVICE BUG: Expected router to be an instance of EmberRouter', router instanceof _router.default));
14798
- router.setupRouter();
14799
- return this[ROUTER] = router;
14826
+
14827
+ var _router = owner.lookup('router:main');
14828
+
14829
+ (true && !(_router instanceof _router2.default) && (0, _debug.assert)('ROUTING SERVICE BUG: Expected router to be an instance of EmberRouter', _router instanceof _router2.default));
14830
+
14831
+ _router.setupRouter();
14832
+
14833
+ return this[_router3.ROUTER] = _router;
14800
14834
  }
14801
14835
 
14802
14836
  hasRoute(routeName) {
@@ -15331,7 +15365,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
15331
15365
 
15332
15366
  var ROUTE_CONNECTIONS = new WeakMap();
15333
15367
  _exports.ROUTE_CONNECTIONS = ROUTE_CONNECTIONS;
15334
- var RENDER = (0, _utils.symbol)('render');
15368
+ var RENDER = Symbol('render');
15335
15369
 
15336
15370
  class Route extends _runtime.Object.extend(_runtime.ActionHandler, _runtime.Evented) {
15337
15371
  constructor(owner) {
@@ -16458,7 +16492,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16458
16492
 
16459
16493
 
16460
16494
  get _qp() {
16461
- var combinedQueryParameterConfiguration;
16495
+ var combinedQueryParameterConfiguration = {};
16462
16496
  var controllerName = this.controllerName || this.routeName;
16463
16497
  var owner = (0, _owner.getOwner)(this);
16464
16498
  (true && !(owner) && (0, _debug.assert)('Route is unexpectedly missing an owner', owner));
@@ -16499,6 +16533,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16499
16533
  }
16500
16534
 
16501
16535
  var desc = combinedQueryParameterConfiguration[propName];
16536
+ (true && !(desc) && (0, _debug.assert)(`[BUG] missing query parameter configuration for ${propName}`, desc));
16502
16537
  var scope = desc.scope || 'model';
16503
16538
  var parts = undefined;
16504
16539
 
@@ -16784,9 +16819,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16784
16819
  continue;
16785
16820
  }
16786
16821
 
16787
- var newControllerParameterConfiguration = {};
16788
- Object.assign(newControllerParameterConfiguration, controllerQP[cqpName], routeQP[cqpName]);
16789
- qps[cqpName] = newControllerParameterConfiguration; // allows us to skip this QP when we check route QPs.
16822
+ qps[cqpName] = Object.assign(Object.assign({}, controllerQP[cqpName]), routeQP[cqpName]); // allows us to skip this QP when we check route QPs.
16790
16823
 
16791
16824
  keysAlreadyMergedOrSkippable[cqpName] = true;
16792
16825
  } // loop over all route qps, skipping those that were merged in the first pass
@@ -16798,9 +16831,7 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/-intern
16798
16831
  continue;
16799
16832
  }
16800
16833
 
16801
- var newRouteParameterConfiguration = {};
16802
- Object.assign(newRouteParameterConfiguration, routeQP[rqpName], controllerQP[rqpName]);
16803
- qps[rqpName] = newRouteParameterConfiguration;
16834
+ qps[rqpName] = Object.assign(Object.assign({}, routeQP[rqpName]), controllerQP[rqpName]);
16804
16835
  }
16805
16836
 
16806
16837
  return qps;
@@ -18548,7 +18579,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18548
18579
 
18549
18580
  for (var i = routeInfos.length - 1; i >= 0; i--) {
18550
18581
  routeInfo = routeInfos[i];
18551
- (true && !(routeInfo) && (0, _debug.assert)('has routeInfo', routeInfo));
18582
+ (true && !(routeInfo) && (0, _debug.assert)('[BUG] Missing routeInfo', routeInfo));
18552
18583
  handler = routeInfo.route;
18553
18584
  actionHandler = handler && handler.actions && handler.actions[name];
18554
18585
 
@@ -18558,6 +18589,8 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18558
18589
  } else {
18559
18590
  // Should only hit here if a non-bubbling error action is triggered on a route.
18560
18591
  if (name === 'error') {
18592
+ (true && !(handler) && (0, _debug.assert)('[BUG] Missing handler', handler));
18593
+
18561
18594
  handler._router._markErrorAsHandled(args[0]);
18562
18595
  }
18563
18596
 
@@ -18569,7 +18602,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
18569
18602
  var defaultHandler = defaultActionHandlers[name];
18570
18603
 
18571
18604
  if (defaultHandler) {
18572
- defaultHandler.apply(this, [routeInfos, ...args]);
18605
+ defaultHandler.call(this, routeInfos, ...args);
18573
18606
  return;
18574
18607
  }
18575
18608
 
@@ -19171,35 +19204,26 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
19171
19204
  }
19172
19205
 
19173
19206
  function accumulateQueryParamDescriptors(_desc, accum) {
19174
- var desc = _desc;
19175
- var tmp;
19176
-
19177
- if (typeof desc === 'string') {
19178
- tmp = {};
19179
- tmp[desc] = {
19207
+ var desc = typeof _desc === 'string' ? {
19208
+ [_desc]: {
19180
19209
  as: null
19181
- };
19182
- desc = tmp;
19183
- }
19210
+ }
19211
+ } : _desc;
19184
19212
 
19185
19213
  for (var key in desc) {
19186
19214
  if (!Object.prototype.hasOwnProperty.call(desc, key)) {
19187
19215
  return;
19188
19216
  }
19189
19217
 
19190
- var singleDesc = desc[key];
19191
-
19192
- if (typeof singleDesc === 'string') {
19193
- singleDesc = {
19194
- as: singleDesc
19195
- };
19196
- }
19197
-
19198
- var val = accum[key] || {
19218
+ var _singleDesc = desc[key];
19219
+ var singleDesc = typeof _singleDesc === 'string' ? {
19220
+ as: _singleDesc
19221
+ } : _singleDesc;
19222
+ var partialVal = accum[key] || {
19199
19223
  as: null,
19200
19224
  scope: 'model'
19201
19225
  };
19202
- Object.assign(val, singleDesc);
19226
+ var val = Object.assign(Object.assign({}, partialVal), singleDesc);
19203
19227
  accum[key] = val;
19204
19228
  }
19205
19229
  }
@@ -19241,13 +19265,12 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
19241
19265
  }
19242
19266
 
19243
19267
  function shallowEqual(a, b) {
19244
- var k;
19245
19268
  var aCount = 0;
19246
19269
  var bCount = 0;
19247
19270
 
19248
- for (k in a) {
19249
- if (Object.prototype.hasOwnProperty.call(a, k)) {
19250
- if (a[k] !== b[k]) {
19271
+ for (var kA in a) {
19272
+ if (Object.prototype.hasOwnProperty.call(a, kA)) {
19273
+ if (a[kA] !== b[kA]) {
19251
19274
  return false;
19252
19275
  }
19253
19276
 
@@ -19255,8 +19278,8 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
19255
19278
  }
19256
19279
  }
19257
19280
 
19258
- for (k in b) {
19259
- if (Object.prototype.hasOwnProperty.call(b, k)) {
19281
+ for (var kB in b) {
19282
+ if (Object.prototype.hasOwnProperty.call(b, kB)) {
19260
19283
  bCount++;
19261
19284
  }
19262
19285
  }
@@ -19494,7 +19517,10 @@ define("@ember/-internals/runtime/lib/compare", ["exports", "@ember/-internals/r
19494
19517
  instance: 7,
19495
19518
  function: 8,
19496
19519
  class: 9,
19497
- date: 10
19520
+ date: 10,
19521
+ regexp: 11,
19522
+ filelist: 12,
19523
+ error: 13
19498
19524
  }; //
19499
19525
  // the spaceship operator
19500
19526
  //
@@ -19800,12 +19826,16 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
19800
19826
  @module ember
19801
19827
  */
19802
19828
  function contentFor(proxy) {
19803
- var content = (0, _metal.get)(proxy, 'content');
19829
+ var content = (0, _metal.get)(proxy, 'content'); // SAFETY: Ideally we'd assert instead of casting, but @glimmer/validator doesn't give us
19830
+ // sufficient public types for this. Previously this code was .js and worked correctly so
19831
+ // hopefully this is sufficiently reliable.
19832
+
19804
19833
  (0, _validator.updateTag)((0, _metal.tagForObject)(proxy), (0, _metal.tagForObject)(content));
19805
19834
  return content;
19806
19835
  }
19807
19836
 
19808
19837
  function customTagForProxy(proxy, key, addMandatorySetter) {
19838
+ (true && !((0, _utils.isProxy)(proxy)) && (0, _debug.assert)('Expected a proxy', (0, _utils.isProxy)(proxy)));
19809
19839
  var meta = (0, _validator.tagMetaFor)(proxy);
19810
19840
  var tag = (0, _validator.tagFor)(proxy, key, meta);
19811
19841
 
@@ -19813,6 +19843,7 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
19813
19843
  /* DEBUG */
19814
19844
  ) {
19815
19845
  // TODO: Replace this with something more first class for tracking tags in DEBUG
19846
+ // SAFETY: This is not an officially supported property but setting shouldn't cause issues.
19816
19847
  tag._propertyKey = key;
19817
19848
  }
19818
19849
 
@@ -19820,6 +19851,7 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
19820
19851
  if (true
19821
19852
  /* DEBUG */
19822
19853
  && addMandatorySetter) {
19854
+ (true && !(_utils.setupMandatorySetter) && (0, _debug.assert)('[BUG] setupMandatorySetter should be set when debugging', setupMandatorySetter));
19823
19855
  (0, _utils.setupMandatorySetter)(tag, proxy, key);
19824
19856
  }
19825
19857
 
@@ -19835,20 +19867,11 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
19835
19867
  return (0, _validator.combine)(tags);
19836
19868
  }
19837
19869
  }
19838
- /**
19839
- `Ember.ProxyMixin` forwards all properties not defined by the proxy itself
19840
- to a proxied `content` object. See ObjectProxy for more details.
19841
-
19842
- @class ProxyMixin
19843
- @namespace Ember
19844
- @private
19845
- */
19846
-
19847
19870
 
19848
- var _default = _metal.Mixin.create({
19871
+ var ProxyMixin = _metal.Mixin.create({
19849
19872
  /**
19850
19873
  The object whose properties will be forwarded.
19851
- @property content
19874
+ @property content
19852
19875
  @type {unknown}
19853
19876
  @default null
19854
19877
  @public
@@ -19892,12 +19915,14 @@ define("@ember/-internals/runtime/lib/mixins/-proxy", ["exports", "@ember/-inter
19892
19915
  }
19893
19916
 
19894
19917
  var content = contentFor(this);
19895
- (true && !(content) && (0, _debug.assert)(`Cannot delegate set('${key}', ${value}) to the 'content' property of object proxy ${this}: its 'content' is undefined.`, content));
19918
+ (true && !(content) && (0, _debug.assert)(`Cannot delegate set('${key}', ${value}) to the 'content' property of object proxy ${this}: its 'content' is undefined.`, content)); // SAFETY: We don't actually guarantee that this is an object, so this isn't necessarily safe :(
19919
+
19896
19920
  return (0, _metal.set)(content, key, value);
19897
19921
  }
19898
19922
 
19899
19923
  });
19900
19924
 
19925
+ var _default = ProxyMixin;
19901
19926
  _exports.default = _default;
19902
19927
  });
19903
19928
  define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@ember/-internals/metal", "@ember/debug"], function (_exports, _metal, _debug) {
@@ -19911,34 +19936,22 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
19911
19936
  /**
19912
19937
  @module ember
19913
19938
  */
19914
-
19915
- /**
19916
- `Ember.ActionHandler` is available on some familiar classes including
19917
- `Route`, `Component`, and `Controller`.
19918
- (Internally the mixin is used by `Ember.CoreView`, `Ember.ControllerMixin`,
19919
- and `Route` and available to the above classes through
19920
- inheritance.)
19921
-
19922
- @class ActionHandler
19923
- @namespace Ember
19924
- @private
19925
- */
19926
19939
  var ActionHandler = _metal.Mixin.create({
19927
19940
  mergedProperties: ['actions'],
19928
19941
 
19929
19942
  /**
19930
19943
  The collection of functions, keyed by name, available on this
19931
19944
  `ActionHandler` as action targets.
19932
- These functions will be invoked when a matching `{{action}}` is triggered
19945
+ These functions will be invoked when a matching `{{action}}` is triggered
19933
19946
  from within a template and the application's current route is this route.
19934
- Actions can also be invoked from other parts of your application
19947
+ Actions can also be invoked from other parts of your application
19935
19948
  via `ActionHandler#send`.
19936
- The `actions` hash will inherit action handlers from
19949
+ The `actions` hash will inherit action handlers from
19937
19950
  the `actions` hash defined on extended parent classes
19938
19951
  or mixins rather than just replace the entire hash, e.g.:
19939
- ```app/mixins/can-display-banner.js
19952
+ ```app/mixins/can-display-banner.js
19940
19953
  import Mixin from '@ember/mixin';
19941
- export default Mixin.create({
19954
+ export default Mixin.create({
19942
19955
  actions: {
19943
19956
  displayBanner(msg) {
19944
19957
  // ...
@@ -19946,28 +19959,28 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
19946
19959
  }
19947
19960
  });
19948
19961
  ```
19949
- ```app/routes/welcome.js
19962
+ ```app/routes/welcome.js
19950
19963
  import Route from '@ember/routing/route';
19951
19964
  import CanDisplayBanner from '../mixins/can-display-banner';
19952
- export default Route.extend(CanDisplayBanner, {
19965
+ export default Route.extend(CanDisplayBanner, {
19953
19966
  actions: {
19954
19967
  playMusic() {
19955
19968
  // ...
19956
19969
  }
19957
19970
  }
19958
19971
  });
19959
- // `WelcomeRoute`, when active, will be able to respond
19972
+ // `WelcomeRoute`, when active, will be able to respond
19960
19973
  // to both actions, since the actions hash is merged rather
19961
19974
  // then replaced when extending mixins / parent classes.
19962
19975
  this.send('displayBanner');
19963
19976
  this.send('playMusic');
19964
19977
  ```
19965
- Within a Controller, Route or Component's action handler,
19978
+ Within a Controller, Route or Component's action handler,
19966
19979
  the value of the `this` context is the Controller, Route or
19967
19980
  Component object:
19968
- ```app/routes/song.js
19981
+ ```app/routes/song.js
19969
19982
  import Route from '@ember/routing/route';
19970
- export default Route.extend({
19983
+ export default Route.extend({
19971
19984
  actions: {
19972
19985
  myAction() {
19973
19986
  this.controllerFor("song");
@@ -19977,13 +19990,13 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
19977
19990
  }
19978
19991
  });
19979
19992
  ```
19980
- It is also possible to call `this._super(...arguments)` from within an
19993
+ It is also possible to call `this._super(...arguments)` from within an
19981
19994
  action handler if it overrides a handler defined on a parent
19982
19995
  class or mixin:
19983
- Take for example the following routes:
19984
- ```app/mixins/debug-route.js
19996
+ Take for example the following routes:
19997
+ ```app/mixins/debug-route.js
19985
19998
  import Mixin from '@ember/mixin';
19986
- export default Mixin.create({
19999
+ export default Mixin.create({
19987
20000
  actions: {
19988
20001
  debugRouteInformation() {
19989
20002
  console.debug("It's a-me, console.debug!");
@@ -19991,54 +20004,54 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
19991
20004
  }
19992
20005
  });
19993
20006
  ```
19994
- ```app/routes/annoying-debug.js
20007
+ ```app/routes/annoying-debug.js
19995
20008
  import Route from '@ember/routing/route';
19996
20009
  import DebugRoute from '../mixins/debug-route';
19997
- export default Route.extend(DebugRoute, {
20010
+ export default Route.extend(DebugRoute, {
19998
20011
  actions: {
19999
20012
  debugRouteInformation() {
20000
20013
  // also call the debugRouteInformation of mixed in DebugRoute
20001
20014
  this._super(...arguments);
20002
- // show additional annoyance
20015
+ // show additional annoyance
20003
20016
  window.alert(...);
20004
20017
  }
20005
20018
  }
20006
20019
  });
20007
20020
  ```
20008
- ## Bubbling
20009
- By default, an action will stop bubbling once a handler defined
20021
+ ## Bubbling
20022
+ By default, an action will stop bubbling once a handler defined
20010
20023
  on the `actions` hash handles it. To continue bubbling the action,
20011
20024
  you must return `true` from the handler:
20012
- ```app/router.js
20025
+ ```app/router.js
20013
20026
  Router.map(function() {
20014
20027
  this.route("album", function() {
20015
20028
  this.route("song");
20016
20029
  });
20017
20030
  });
20018
20031
  ```
20019
- ```app/routes/album.js
20032
+ ```app/routes/album.js
20020
20033
  import Route from '@ember/routing/route';
20021
- export default Route.extend({
20034
+ export default Route.extend({
20022
20035
  actions: {
20023
20036
  startPlaying: function() {
20024
20037
  }
20025
20038
  }
20026
20039
  });
20027
20040
  ```
20028
- ```app/routes/album-song.js
20041
+ ```app/routes/album-song.js
20029
20042
  import Route from '@ember/routing/route';
20030
- export default Route.extend({
20043
+ export default Route.extend({
20031
20044
  actions: {
20032
20045
  startPlaying() {
20033
20046
  // ...
20034
- if (actionShouldAlsoBeTriggeredOnParentRoute) {
20047
+ if (actionShouldAlsoBeTriggeredOnParentRoute) {
20035
20048
  return true;
20036
20049
  }
20037
20050
  }
20038
20051
  }
20039
20052
  });
20040
20053
  ```
20041
- @property actions
20054
+ @property actions
20042
20055
  @type Object
20043
20056
  @default null
20044
20057
  @public
@@ -20048,14 +20061,14 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
20048
20061
  Triggers a named action on the `ActionHandler`. Any parameters
20049
20062
  supplied after the `actionName` string will be passed as arguments
20050
20063
  to the action target function.
20051
- If the `ActionHandler` has its `target` property set, actions may
20064
+ If the `ActionHandler` has its `target` property set, actions may
20052
20065
  bubble to the `target`. Bubbling happens when an `actionName` can
20053
20066
  not be found in the `ActionHandler`'s `actions` hash or if the
20054
20067
  action target function returns `true`.
20055
- Example
20056
- ```app/routes/welcome.js
20068
+ Example
20069
+ ```app/routes/welcome.js
20057
20070
  import Route from '@ember/routing/route';
20058
- export default Route.extend({
20071
+ export default Route.extend({
20059
20072
  actions: {
20060
20073
  playTheme() {
20061
20074
  this.send('playMusic', 'theme.mp3');
@@ -20066,7 +20079,7 @@ define("@ember/-internals/runtime/lib/mixins/action_handler", ["exports", "@embe
20066
20079
  }
20067
20080
  });
20068
20081
  ```
20069
- @method send
20082
+ @method send
20070
20083
  @param {String} actionName The action to trigger
20071
20084
  @param {*} context a context to send with the action
20072
20085
  @public
@@ -21329,7 +21342,7 @@ define("@ember/-internals/runtime/lib/mixins/array", ["exports", "@ember/-intern
21329
21342
  idx >= length, then append to the end of the array.
21330
21343
  @param {Number} amt Number of elements that should be removed from
21331
21344
  the array, starting at *idx*.
21332
- @param {EmberArray} objects An array of zero or more objects that should be
21345
+ @param {EmberArray} [objects] An optional array of zero or more objects that should be
21333
21346
  inserted into the array at *idx*
21334
21347
  @public
21335
21348
  */
@@ -21758,31 +21771,16 @@ define("@ember/-internals/runtime/lib/mixins/comparable", ["exports", "@ember/-i
21758
21771
  });
21759
21772
  _exports.default = void 0;
21760
21773
 
21761
- /**
21762
- @module ember
21763
- */
21764
-
21765
- /**
21766
- Implements some standard methods for comparing objects. Add this mixin to
21767
- any class you create that can compare its instances.
21768
-
21769
- You should implement the `compare()` method.
21770
-
21771
- @class Comparable
21772
- @namespace Ember
21773
- @since Ember 0.9
21774
- @private
21775
- */
21776
- var _default = _metal.Mixin.create({
21774
+ var Comparable = _metal.Mixin.create({
21777
21775
  /**
21778
21776
  __Required.__ You must implement this method to apply this mixin.
21779
- Override to return the result of the comparison of the two parameters. The
21777
+ Override to return the result of the comparison of the two parameters. The
21780
21778
  compare method should return:
21781
- - `-1` if `a < b`
21779
+ - `-1` if `a < b`
21782
21780
  - `0` if `a == b`
21783
21781
  - `1` if `a > b`
21784
- Default implementation raises an exception.
21785
- @method compare
21782
+ Default implementation raises an exception.
21783
+ @method compare
21786
21784
  @param a {Object} the first object to compare
21787
21785
  @param b {Object} the second object to compare
21788
21786
  @return {Number} the result of the comparison
@@ -21791,6 +21789,7 @@ define("@ember/-internals/runtime/lib/mixins/comparable", ["exports", "@ember/-i
21791
21789
  compare: null
21792
21790
  });
21793
21791
 
21792
+ var _default = Comparable;
21794
21793
  _exports.default = _default;
21795
21794
  });
21796
21795
  define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@ember/runloop", "@ember/-internals/metal"], function (_exports, _runloop, _metal) {
@@ -21801,21 +21800,10 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
21801
21800
  });
21802
21801
  _exports.default = void 0;
21803
21802
 
21804
- /**
21805
- @module ember
21806
- */
21807
-
21808
- /**
21809
- ContainerProxyMixin is used to provide public access to specific
21810
- container functionality.
21811
-
21812
- @class ContainerProxyMixin
21813
- @private
21814
- */
21815
- var containerProxyMixin = {
21803
+ var ContainerProxyMixin = _metal.Mixin.create({
21816
21804
  /**
21817
21805
  The container stores state.
21818
- @private
21806
+ @private
21819
21807
  @property {Ember.Container} __container__
21820
21808
  */
21821
21809
  __container__: null,
@@ -21823,16 +21811,16 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
21823
21811
  /**
21824
21812
  Returns an object that can be used to provide an owner to a
21825
21813
  manually created instance.
21826
- Example:
21827
- ```
21814
+ Example:
21815
+ ```
21828
21816
  import { getOwner } from '@ember/application';
21829
- let owner = getOwner(this);
21830
- User.create(
21817
+ let owner = getOwner(this);
21818
+ User.create(
21831
21819
  owner.ownerInjection(),
21832
21820
  { username: 'rwjblue' }
21833
21821
  )
21834
21822
  ```
21835
- @public
21823
+ @public
21836
21824
  @method ownerInjection
21837
21825
  @since 2.3.0
21838
21826
  @return {Object}
@@ -21843,30 +21831,30 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
21843
21831
 
21844
21832
  /**
21845
21833
  Given a fullName return a corresponding instance.
21846
- The default behavior is for lookup to return a singleton instance.
21834
+ The default behavior is for lookup to return a singleton instance.
21847
21835
  The singleton is scoped to the container, allowing multiple containers
21848
21836
  to all have their own locally scoped singletons.
21849
- ```javascript
21837
+ ```javascript
21850
21838
  let registry = new Registry();
21851
21839
  let container = registry.container();
21852
- registry.register('api:twitter', Twitter);
21853
- let twitter = container.lookup('api:twitter');
21854
- twitter instanceof Twitter; // => true
21855
- // by default the container will return singletons
21840
+ registry.register('api:twitter', Twitter);
21841
+ let twitter = container.lookup('api:twitter');
21842
+ twitter instanceof Twitter; // => true
21843
+ // by default the container will return singletons
21856
21844
  let twitter2 = container.lookup('api:twitter');
21857
21845
  twitter2 instanceof Twitter; // => true
21858
- twitter === twitter2; //=> true
21846
+ twitter === twitter2; //=> true
21859
21847
  ```
21860
- If singletons are not wanted an optional flag can be provided at lookup.
21861
- ```javascript
21848
+ If singletons are not wanted an optional flag can be provided at lookup.
21849
+ ```javascript
21862
21850
  let registry = new Registry();
21863
21851
  let container = registry.container();
21864
- registry.register('api:twitter', Twitter);
21865
- let twitter = container.lookup('api:twitter', { singleton: false });
21852
+ registry.register('api:twitter', Twitter);
21853
+ let twitter = container.lookup('api:twitter', { singleton: false });
21866
21854
  let twitter2 = container.lookup('api:twitter', { singleton: false });
21867
- twitter === twitter2; //=> false
21855
+ twitter === twitter2; //=> false
21868
21856
  ```
21869
- @public
21857
+ @public
21870
21858
  @method lookup
21871
21859
  @param {String} fullName
21872
21860
  @param {Object} options
@@ -21891,49 +21879,44 @@ define("@ember/-internals/runtime/lib/mixins/container_proxy", ["exports", "@emb
21891
21879
 
21892
21880
  /**
21893
21881
  Given a fullName return a factory manager.
21894
- This method returns a manager which can be used for introspection of the
21882
+ This method returns a manager which can be used for introspection of the
21895
21883
  factory's class or for the creation of factory instances with initial
21896
21884
  properties. The manager is an object with the following properties:
21897
- * `class` - The registered or resolved class.
21885
+ * `class` - The registered or resolved class.
21898
21886
  * `create` - A function that will create an instance of the class with
21899
21887
  any dependencies injected.
21900
- For example:
21901
- ```javascript
21888
+ For example:
21889
+ ```javascript
21902
21890
  import { getOwner } from '@ember/application';
21903
- let owner = getOwner(otherInstance);
21891
+ let owner = getOwner(otherInstance);
21904
21892
  // the owner is commonly the `applicationInstance`, and can be accessed via
21905
21893
  // an instance initializer.
21906
- let factory = owner.factoryFor('service:bespoke');
21907
- factory.class;
21894
+ let factory = owner.factoryFor('service:bespoke');
21895
+ factory.class;
21908
21896
  // The registered or resolved class. For example when used with an Ember-CLI
21909
21897
  // app, this would be the default export from `app/services/bespoke.js`.
21910
- let instance = factory.create({
21898
+ let instance = factory.create({
21911
21899
  someProperty: 'an initial property value'
21912
21900
  });
21913
21901
  // Create an instance with any injections and the passed options as
21914
21902
  // initial properties.
21915
21903
  ```
21916
- Any instances created via the factory's `.create()` method *must* be destroyed
21904
+ Any instances created via the factory's `.create()` method *must* be destroyed
21917
21905
  manually by the caller of `.create()`. Typically, this is done during the creating
21918
21906
  objects own `destroy` or `willDestroy` methods.
21919
- @public
21907
+ @public
21920
21908
  @method factoryFor
21921
21909
  @param {String} fullName
21922
21910
  @param {Object} options
21923
21911
  @return {FactoryManager}
21924
21912
  */
21925
- factoryFor(fullName, options) {
21926
- if (options === void 0) {
21927
- options = {};
21928
- }
21929
-
21930
- return this.__container__.factoryFor(fullName, options);
21913
+ factoryFor(fullName) {
21914
+ return this.__container__.factoryFor(fullName);
21931
21915
  }
21932
21916
 
21933
- };
21934
-
21935
- var _default = _metal.Mixin.create(containerProxyMixin);
21917
+ });
21936
21918
 
21919
+ var _default = ContainerProxyMixin;
21937
21920
  _exports.default = _default;
21938
21921
  });
21939
21922
  define("@ember/-internals/runtime/lib/mixins/enumerable", ["exports", "@ember/-internals/metal"], function (_exports, _metal) {
@@ -21944,21 +21927,9 @@ define("@ember/-internals/runtime/lib/mixins/enumerable", ["exports", "@ember/-i
21944
21927
  });
21945
21928
  _exports.default = void 0;
21946
21929
 
21947
- /**
21948
- @module @ember/enumerable
21949
- @private
21950
- */
21951
-
21952
- /**
21953
- The methods in this mixin have been moved to [MutableArray](/ember/release/classes/MutableArray). This mixin has
21954
- been intentionally preserved to avoid breaking Enumerable.detect checks
21955
- until the community migrates away from them.
21956
-
21957
- @class Enumerable
21958
- @private
21959
- */
21960
- var _default = _metal.Mixin.create();
21930
+ var Enumerable = _metal.Mixin.create();
21961
21931
 
21932
+ var _default = Enumerable;
21962
21933
  _exports.default = _default;
21963
21934
  });
21964
21935
  define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-internals/metal"], function (_exports, _metal) {
@@ -21969,63 +21940,19 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
21969
21940
  });
21970
21941
  _exports.default = void 0;
21971
21942
 
21972
- /**
21973
- @module @ember/object
21974
- */
21975
-
21976
- /**
21977
- This mixin allows for Ember objects to subscribe to and emit events.
21978
-
21979
- ```app/utils/person.js
21980
- import EmberObject from '@ember/object';
21981
- import Evented from '@ember/object/evented';
21982
-
21983
- export default EmberObject.extend(Evented, {
21984
- greet() {
21985
- // ...
21986
- this.trigger('greet');
21987
- }
21988
- });
21989
- ```
21990
-
21991
- ```javascript
21992
- var person = Person.create();
21993
-
21994
- person.on('greet', function() {
21995
- console.log('Our person has greeted');
21996
- });
21997
-
21998
- person.greet();
21999
-
22000
- // outputs: 'Our person has greeted'
22001
- ```
22002
-
22003
- You can also chain multiple event subscriptions:
22004
-
22005
- ```javascript
22006
- person.on('greet', function() {
22007
- console.log('Our person has greeted');
22008
- }).one('greet', function() {
22009
- console.log('Offer one-time special');
22010
- }).off('event', this, forgetThis);
22011
- ```
22012
-
22013
- @class Evented
22014
- @public
22015
- */
22016
- var _default = _metal.Mixin.create({
21943
+ var Evented = _metal.Mixin.create({
22017
21944
  /**
22018
21945
  Subscribes to a named event with given function.
22019
- ```javascript
21946
+ ```javascript
22020
21947
  person.on('didLoad', function() {
22021
21948
  // fired once the person has loaded
22022
21949
  });
22023
21950
  ```
22024
- An optional target can be passed in as the 2nd argument that will
21951
+ An optional target can be passed in as the 2nd argument that will
22025
21952
  be set as the "this" for the callback. This is a good way to give your
22026
21953
  function access to the object triggering the event. When the target
22027
21954
  parameter is used the callback method becomes the third argument.
22028
- @method on
21955
+ @method on
22029
21956
  @param {String} name The name of the event
22030
21957
  @param {Object} [target] The "this" binding for the callback
22031
21958
  @param {Function|String} method A function or the name of a function to be called on `target`
@@ -22041,10 +21968,10 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
22041
21968
  Subscribes a function to a named event and then cancels the subscription
22042
21969
  after the first time the event is triggered. It is good to use ``one`` when
22043
21970
  you only care about the first time an event has taken place.
22044
- This function takes an optional 2nd argument that will become the "this"
21971
+ This function takes an optional 2nd argument that will become the "this"
22045
21972
  value for the callback. When the target parameter is used the callback method
22046
21973
  becomes the third argument.
22047
- @method one
21974
+ @method one
22048
21975
  @param {String} name The name of the event
22049
21976
  @param {Object} [target] The "this" binding for the callback
22050
21977
  @param {Function|String} method A function or the name of a function to be called on `target`
@@ -22060,12 +21987,12 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
22060
21987
  Triggers a named event for the object. Any additional arguments
22061
21988
  will be passed as parameters to the functions that are subscribed to the
22062
21989
  event.
22063
- ```javascript
21990
+ ```javascript
22064
21991
  person.on('didEat', function(food) {
22065
21992
  console.log('person ate some ' + food);
22066
21993
  });
22067
- person.trigger('didEat', 'broccoli');
22068
- // outputs: person ate some broccoli
21994
+ person.trigger('didEat', 'broccoli');
21995
+ // outputs: person ate some broccoli
22069
21996
  ```
22070
21997
  @method trigger
22071
21998
  @param {String} name The name of the event
@@ -22082,7 +22009,7 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
22082
22009
 
22083
22010
  /**
22084
22011
  Cancels subscription for given name, target, and method.
22085
- @method off
22012
+ @method off
22086
22013
  @param {String} name The name of the event
22087
22014
  @param {Object} target The target of the subscription
22088
22015
  @param {Function|String} method The function or the name of a function of the subscription
@@ -22096,7 +22023,7 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
22096
22023
 
22097
22024
  /**
22098
22025
  Checks to see if object has any subscriptions for named event.
22099
- @method has
22026
+ @method has
22100
22027
  @param {String} name The name of the event
22101
22028
  @return {Boolean} does the object have a subscription for event
22102
22029
  @public
@@ -22107,6 +22034,7 @@ define("@ember/-internals/runtime/lib/mixins/evented", ["exports", "@ember/-inte
22107
22034
 
22108
22035
  });
22109
22036
 
22037
+ var _default = Evented;
22110
22038
  _exports.default = _default;
22111
22039
  });
22112
22040
  define("@ember/-internals/runtime/lib/mixins/mutable_enumerable", ["exports", "@ember/-internals/runtime/lib/mixins/enumerable", "@ember/-internals/metal"], function (_exports, _enumerable, _metal) {
@@ -22117,22 +22045,9 @@ define("@ember/-internals/runtime/lib/mixins/mutable_enumerable", ["exports", "@
22117
22045
  });
22118
22046
  _exports.default = void 0;
22119
22047
 
22120
- /**
22121
- @module ember
22122
- */
22123
-
22124
- /**
22125
- The methods in this mixin have been moved to MutableArray. This mixin has
22126
- been intentionally preserved to avoid breaking MutableEnumerable.detect
22127
- checks until the community migrates away from them.
22128
-
22129
- @class MutableEnumerable
22130
- @namespace Ember
22131
- @uses Enumerable
22132
- @private
22133
- */
22134
- var _default = _metal.Mixin.create(_enumerable.default);
22048
+ var MutableEnumerable = _metal.Mixin.create(_enumerable.default);
22135
22049
 
22050
+ var _default = MutableEnumerable;
22136
22051
  _exports.default = _default;
22137
22052
  });
22138
22053
  define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-internals/meta", "@ember/-internals/metal", "@ember/debug"], function (_exports, _meta, _metal, _debug) {
@@ -22146,105 +22061,34 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22146
22061
  /**
22147
22062
  @module @ember/object
22148
22063
  */
22149
-
22150
- /**
22151
- ## Overview
22152
-
22153
- This mixin provides properties and property observing functionality, core
22154
- features of the Ember object model.
22155
-
22156
- Properties and observers allow one object to observe changes to a
22157
- property on another object. This is one of the fundamental ways that
22158
- models, controllers and views communicate with each other in an Ember
22159
- application.
22160
-
22161
- Any object that has this mixin applied can be used in observer
22162
- operations. That includes `EmberObject` and most objects you will
22163
- interact with as you write your Ember application.
22164
-
22165
- Note that you will not generally apply this mixin to classes yourself,
22166
- but you will use the features provided by this module frequently, so it
22167
- is important to understand how to use it.
22168
-
22169
- ## Using `get()` and `set()`
22170
-
22171
- Because of Ember's support for bindings and observers, you will always
22172
- access properties using the get method, and set properties using the
22173
- set method. This allows the observing objects to be notified and
22174
- computed properties to be handled properly.
22175
-
22176
- More documentation about `get` and `set` are below.
22177
-
22178
- ## Observing Property Changes
22179
-
22180
- You typically observe property changes simply by using the `observer`
22181
- function in classes that you write.
22182
-
22183
- For example:
22184
-
22185
- ```javascript
22186
- import { observer } from '@ember/object';
22187
- import EmberObject from '@ember/object';
22188
-
22189
- EmberObject.extend({
22190
- valueObserver: observer('value', function(sender, key, value, rev) {
22191
- // Executes whenever the "value" property changes
22192
- // See the addObserver method for more information about the callback arguments
22193
- })
22194
- });
22195
- ```
22196
-
22197
- Although this is the most common way to add an observer, this capability
22198
- is actually built into the `EmberObject` class on top of two methods
22199
- defined in this mixin: `addObserver` and `removeObserver`. You can use
22200
- these two methods to add and remove observers yourself if you need to
22201
- do so at runtime.
22202
-
22203
- To add an observer for a property, call:
22204
-
22205
- ```javascript
22206
- object.addObserver('propertyKey', targetObject, targetAction)
22207
- ```
22208
-
22209
- This will call the `targetAction` method on the `targetObject` whenever
22210
- the value of the `propertyKey` changes.
22211
-
22212
- Note that if `propertyKey` is a computed property, the observer will be
22213
- called when any of the property dependencies are changed, even if the
22214
- resulting value of the computed property is unchanged. This is necessary
22215
- because computed properties are not computed until `get` is called.
22216
-
22217
- @class Observable
22218
- @public
22219
- */
22220
- var _default = _metal.Mixin.create({
22064
+ var Observable = _metal.Mixin.create({
22221
22065
  /**
22222
22066
  Retrieves the value of a property from the object.
22223
- This method is usually similar to using `object[keyName]` or `object.keyName`,
22067
+ This method is usually similar to using `object[keyName]` or `object.keyName`,
22224
22068
  however it supports both computed properties and the unknownProperty
22225
22069
  handler.
22226
- Because `get` unifies the syntax for accessing all these kinds
22070
+ Because `get` unifies the syntax for accessing all these kinds
22227
22071
  of properties, it can make many refactorings easier, such as replacing a
22228
22072
  simple property with a computed property, or vice versa.
22229
- ### Computed Properties
22230
- Computed properties are methods defined with the `property` modifier
22073
+ ### Computed Properties
22074
+ Computed properties are methods defined with the `property` modifier
22231
22075
  declared at the end, such as:
22232
- ```javascript
22076
+ ```javascript
22233
22077
  import { computed } from '@ember/object';
22234
- fullName: computed('firstName', 'lastName', function() {
22078
+ fullName: computed('firstName', 'lastName', function() {
22235
22079
  return this.get('firstName') + ' ' + this.get('lastName');
22236
22080
  })
22237
22081
  ```
22238
- When you call `get` on a computed property, the function will be
22082
+ When you call `get` on a computed property, the function will be
22239
22083
  called and the return value will be returned instead of the function
22240
22084
  itself.
22241
- ### Unknown Properties
22242
- Likewise, if you try to call `get` on a property whose value is
22085
+ ### Unknown Properties
22086
+ Likewise, if you try to call `get` on a property whose value is
22243
22087
  `undefined`, the `unknownProperty()` method will be called on the object.
22244
22088
  If this method returns any value other than `undefined`, it will be returned
22245
22089
  instead. This allows you to implement "virtual" properties that are
22246
22090
  not defined upfront.
22247
- @method get
22091
+ @method get
22248
22092
  @param {String} keyName The property to retrieve
22249
22093
  @return {Object} The property value or undefined.
22250
22094
  @public
@@ -22256,16 +22100,16 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22256
22100
  /**
22257
22101
  To get the values of multiple properties at once, call `getProperties`
22258
22102
  with a list of strings or an array:
22259
- ```javascript
22103
+ ```javascript
22260
22104
  record.getProperties('firstName', 'lastName', 'zipCode');
22261
22105
  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
22262
22106
  ```
22263
- is equivalent to:
22264
- ```javascript
22107
+ is equivalent to:
22108
+ ```javascript
22265
22109
  record.getProperties(['firstName', 'lastName', 'zipCode']);
22266
22110
  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
22267
22111
  ```
22268
- @method getProperties
22112
+ @method getProperties
22269
22113
  @param {String...|Array} list of keys to get
22270
22114
  @return {Object}
22271
22115
  @public
@@ -22275,39 +22119,39 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22275
22119
  args[_key] = arguments[_key];
22276
22120
  }
22277
22121
 
22278
- return (0, _metal.getProperties)(...[this].concat(args));
22122
+ return (0, _metal.getProperties)(this, ...args);
22279
22123
  },
22280
22124
 
22281
22125
  /**
22282
22126
  Sets the provided key or path to the value.
22283
- ```javascript
22127
+ ```javascript
22284
22128
  record.set("key", value);
22285
22129
  ```
22286
- This method is generally very similar to calling `object["key"] = value` or
22130
+ This method is generally very similar to calling `object["key"] = value` or
22287
22131
  `object.key = value`, except that it provides support for computed
22288
22132
  properties, the `setUnknownProperty()` method and property observers.
22289
- ### Computed Properties
22290
- If you try to set a value on a key that has a computed property handler
22133
+ ### Computed Properties
22134
+ If you try to set a value on a key that has a computed property handler
22291
22135
  defined (see the `get()` method for an example), then `set()` will call
22292
22136
  that method, passing both the value and key instead of simply changing
22293
22137
  the value itself. This is useful for those times when you need to
22294
22138
  implement a property that is composed of one or more member
22295
22139
  properties.
22296
- ### Unknown Properties
22297
- If you try to set a value on a key that is undefined in the target
22140
+ ### Unknown Properties
22141
+ If you try to set a value on a key that is undefined in the target
22298
22142
  object, then the `setUnknownProperty()` handler will be called instead. This
22299
22143
  gives you an opportunity to implement complex "virtual" properties that
22300
22144
  are not predefined on the object. If `setUnknownProperty()` returns
22301
22145
  undefined, then `set()` will simply set the value on the object.
22302
- ### Property Observers
22303
- In addition to changing the property, `set()` will also register a property
22146
+ ### Property Observers
22147
+ In addition to changing the property, `set()` will also register a property
22304
22148
  change with the object. Unless you have placed this call inside of a
22305
22149
  `beginPropertyChanges()` and `endPropertyChanges(),` any "local" observers
22306
22150
  (i.e. observer methods declared on the same object), will be called
22307
22151
  immediately. Any "remote" observers (i.e. observer methods declared on
22308
22152
  another object) will be placed in a queue and called at a later time in a
22309
22153
  coalesced manner.
22310
- @method set
22154
+ @method set
22311
22155
  @param {String} keyName The property to set
22312
22156
  @param {Object} value The value to set or `null`.
22313
22157
  @return {Object} The passed value
@@ -22321,10 +22165,10 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22321
22165
  Sets a list of properties at once. These properties are set inside
22322
22166
  a single `beginPropertyChanges` and `endPropertyChanges` batch, so
22323
22167
  observers will be buffered.
22324
- ```javascript
22168
+ ```javascript
22325
22169
  record.setProperties({ firstName: 'Charles', lastName: 'Jolley' });
22326
22170
  ```
22327
- @method setProperties
22171
+ @method setProperties
22328
22172
  @param {Object} hash the hash of keys and values to set
22329
22173
  @return {Object} The passed in hash
22330
22174
  @public
@@ -22335,14 +22179,14 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22335
22179
 
22336
22180
  /**
22337
22181
  Begins a grouping of property changes.
22338
- You can use this method to group property changes so that notifications
22182
+ You can use this method to group property changes so that notifications
22339
22183
  will not be sent until the changes are finished. If you plan to make a
22340
22184
  large number of changes to an object at one time, you should call this
22341
22185
  method at the beginning of the changes to begin deferring change
22342
22186
  notifications. When you are done making changes, call
22343
22187
  `endPropertyChanges()` to deliver the deferred change notifications and end
22344
22188
  deferring.
22345
- @method beginPropertyChanges
22189
+ @method beginPropertyChanges
22346
22190
  @return {Observable}
22347
22191
  @private
22348
22192
  */
@@ -22353,13 +22197,13 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22353
22197
 
22354
22198
  /**
22355
22199
  Ends a grouping of property changes.
22356
- You can use this method to group property changes so that notifications
22200
+ You can use this method to group property changes so that notifications
22357
22201
  will not be sent until the changes are finished. If you plan to make a
22358
22202
  large number of changes to an object at one time, you should call
22359
22203
  `beginPropertyChanges()` at the beginning of the changes to defer change
22360
22204
  notifications. When you are done making changes, call this method to
22361
22205
  deliver the deferred change notifications and end deferring.
22362
- @method endPropertyChanges
22206
+ @method endPropertyChanges
22363
22207
  @return {Observable}
22364
22208
  @private
22365
22209
  */
@@ -22370,11 +22214,11 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22370
22214
 
22371
22215
  /**
22372
22216
  Notify the observer system that a property has just changed.
22373
- Sometimes you need to change a value directly or indirectly without
22217
+ Sometimes you need to change a value directly or indirectly without
22374
22218
  actually calling `get()` or `set()` on it. In this case, you can use this
22375
22219
  method instead. Calling this method will notify all observers that the
22376
22220
  property has potentially changed value.
22377
- @method notifyPropertyChange
22221
+ @method notifyPropertyChange
22378
22222
  @param {String} keyName The property key to be notified about.
22379
22223
  @return {Observable}
22380
22224
  @public
@@ -22386,13 +22230,13 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22386
22230
 
22387
22231
  /**
22388
22232
  Adds an observer on a property.
22389
- This is the core method used to register an observer for a property.
22390
- Once you call this method, any time the key's value is set, your observer
22233
+ This is the core method used to register an observer for a property.
22234
+ Once you call this method, any time the key's value is set, your observer
22391
22235
  will be notified. Note that the observers are triggered any time the
22392
22236
  value is set, regardless of whether it has actually changed. Your
22393
22237
  observer should be prepared to handle that.
22394
- There are two common invocation patterns for `.addObserver()`:
22395
- - Passing two arguments:
22238
+ There are two common invocation patterns for `.addObserver()`:
22239
+ - Passing two arguments:
22396
22240
  - the name of the property to observe (as a string)
22397
22241
  - the function to invoke (an actual function)
22398
22242
  - Passing three arguments:
@@ -22401,47 +22245,47 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22401
22245
  function on)
22402
22246
  - the name of the function to invoke on the target object
22403
22247
  (as a string).
22404
- ```app/components/my-component.js
22248
+ ```app/components/my-component.js
22405
22249
  import Component from '@ember/component';
22406
- export default Component.extend({
22250
+ export default Component.extend({
22407
22251
  init() {
22408
22252
  this._super(...arguments);
22409
- // the following are equivalent:
22410
- // using three arguments
22253
+ // the following are equivalent:
22254
+ // using three arguments
22411
22255
  this.addObserver('foo', this, 'fooDidChange');
22412
- // using two arguments
22256
+ // using two arguments
22413
22257
  this.addObserver('foo', (...args) => {
22414
22258
  this.fooDidChange(...args);
22415
22259
  });
22416
22260
  },
22417
- fooDidChange() {
22261
+ fooDidChange() {
22418
22262
  // your custom logic code
22419
22263
  }
22420
22264
  });
22421
22265
  ```
22422
- ### Observer Methods
22423
- Observer methods have the following signature:
22424
- ```app/components/my-component.js
22266
+ ### Observer Methods
22267
+ Observer methods have the following signature:
22268
+ ```app/components/my-component.js
22425
22269
  import Component from '@ember/component';
22426
- export default Component.extend({
22270
+ export default Component.extend({
22427
22271
  init() {
22428
22272
  this._super(...arguments);
22429
22273
  this.addObserver('foo', this, 'fooDidChange');
22430
22274
  },
22431
- fooDidChange(sender, key, value, rev) {
22275
+ fooDidChange(sender, key, value, rev) {
22432
22276
  // your code
22433
22277
  }
22434
22278
  });
22435
22279
  ```
22436
- The `sender` is the object that changed. The `key` is the property that
22280
+ The `sender` is the object that changed. The `key` is the property that
22437
22281
  changes. The `value` property is currently reserved and unused. The `rev`
22438
22282
  is the last property revision of the object when it changed, which you can
22439
22283
  use to detect if the key value has really changed or not.
22440
- Usually you will not need the value or revision parameters at
22284
+ Usually you will not need the value or revision parameters at
22441
22285
  the end. In this case, it is common to write observer methods that take
22442
22286
  only a sender and key value as parameters or, if you aren't interested in
22443
22287
  any of these values, to write an observer that has no parameters at all.
22444
- @method addObserver
22288
+ @method addObserver
22445
22289
  @param {String} key The key to observe
22446
22290
  @param {Object} target The target object to invoke
22447
22291
  @param {String|Function} method The method to invoke
@@ -22458,7 +22302,7 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22458
22302
  Remove an observer you have previously registered on this object. Pass
22459
22303
  the same key, target, and method you passed to `addObserver()` and your
22460
22304
  target will no longer receive notifications.
22461
- @method removeObserver
22305
+ @method removeObserver
22462
22306
  @param {String} key The key to observe
22463
22307
  @param {Object} target The target object to invoke
22464
22308
  @param {String|Function} method The method to invoke
@@ -22476,7 +22320,7 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22476
22320
  particular key. You can use this method to potentially defer performing
22477
22321
  an expensive action until someone begins observing a particular property
22478
22322
  on the object.
22479
- @method hasObserverFor
22323
+ @method hasObserverFor
22480
22324
  @param {String} key Key to check
22481
22325
  @return {Boolean}
22482
22326
  @private
@@ -22487,11 +22331,11 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22487
22331
 
22488
22332
  /**
22489
22333
  Set the value of a property to the current value plus some amount.
22490
- ```javascript
22334
+ ```javascript
22491
22335
  person.incrementProperty('age');
22492
22336
  team.incrementProperty('score', 2);
22493
22337
  ```
22494
- @method incrementProperty
22338
+ @method incrementProperty
22495
22339
  @param {String} keyName The name of the property to increment
22496
22340
  @param {Number} increment The amount to increment by. Defaults to 1
22497
22341
  @return {Number} The new property value
@@ -22502,17 +22346,17 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22502
22346
  increment = 1;
22503
22347
  }
22504
22348
 
22505
- (true && !(!isNaN(parseFloat(increment)) && isFinite(increment)) && (0, _debug.assert)('Must pass a numeric value to incrementProperty', !isNaN(parseFloat(increment)) && isFinite(increment)));
22349
+ (true && !(!isNaN(parseFloat(String(increment))) && isFinite(increment)) && (0, _debug.assert)('Must pass a numeric value to incrementProperty', !isNaN(parseFloat(String(increment))) && isFinite(increment)));
22506
22350
  return (0, _metal.set)(this, keyName, (parseFloat((0, _metal.get)(this, keyName)) || 0) + increment);
22507
22351
  },
22508
22352
 
22509
22353
  /**
22510
22354
  Set the value of a property to the current value minus some amount.
22511
- ```javascript
22355
+ ```javascript
22512
22356
  player.decrementProperty('lives');
22513
22357
  orc.decrementProperty('health', 5);
22514
22358
  ```
22515
- @method decrementProperty
22359
+ @method decrementProperty
22516
22360
  @param {String} keyName The name of the property to decrement
22517
22361
  @param {Number} decrement The amount to decrement by. Defaults to 1
22518
22362
  @return {Number} The new property value
@@ -22523,17 +22367,17 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22523
22367
  decrement = 1;
22524
22368
  }
22525
22369
 
22526
- (true && !(!isNaN(parseFloat(decrement)) && isFinite(decrement)) && (0, _debug.assert)('Must pass a numeric value to decrementProperty', !isNaN(parseFloat(decrement)) && isFinite(decrement)));
22370
+ (true && !((typeof decrement === 'number' || !isNaN(parseFloat(decrement))) && isFinite(decrement)) && (0, _debug.assert)('Must pass a numeric value to decrementProperty', (typeof decrement === 'number' || !isNaN(parseFloat(decrement))) && isFinite(decrement)));
22527
22371
  return (0, _metal.set)(this, keyName, ((0, _metal.get)(this, keyName) || 0) - decrement);
22528
22372
  },
22529
22373
 
22530
22374
  /**
22531
22375
  Set the value of a boolean property to the opposite of its
22532
22376
  current value.
22533
- ```javascript
22377
+ ```javascript
22534
22378
  starship.toggleProperty('warpDriveEngaged');
22535
22379
  ```
22536
- @method toggleProperty
22380
+ @method toggleProperty
22537
22381
  @param {String} keyName The name of the property to toggle
22538
22382
  @return {Boolean} The new property value
22539
22383
  @public
@@ -22547,7 +22391,7 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22547
22391
  This allows you to inspect the value of a computed property
22548
22392
  without accidentally invoking it if it is intended to be
22549
22393
  generated lazily.
22550
- @method cacheFor
22394
+ @method cacheFor
22551
22395
  @param {String} keyName
22552
22396
  @return {Object} The cached value of the computed property, if any
22553
22397
  @public
@@ -22562,6 +22406,7 @@ define("@ember/-internals/runtime/lib/mixins/observable", ["exports", "@ember/-i
22562
22406
 
22563
22407
  });
22564
22408
 
22409
+ var _default = Observable;
22565
22410
  _exports.default = _default;
22566
22411
  });
22567
22412
  define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember/-internals/metal", "@ember/error"], function (_exports, _metal, _error) {
@@ -22600,76 +22445,12 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22600
22445
  throw reason;
22601
22446
  }, 'Ember: PromiseProxy');
22602
22447
  }
22603
- /**
22604
- A low level mixin making ObjectProxy promise-aware.
22605
-
22606
- ```javascript
22607
- import { resolve } from 'rsvp';
22608
- import $ from 'jquery';
22609
- import ObjectProxy from '@ember/object/proxy';
22610
- import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
22611
-
22612
- let ObjectPromiseProxy = ObjectProxy.extend(PromiseProxyMixin);
22613
-
22614
- let proxy = ObjectPromiseProxy.create({
22615
- promise: resolve($.getJSON('/some/remote/data.json'))
22616
- });
22617
-
22618
- proxy.then(function(json){
22619
- // the json
22620
- }, function(reason) {
22621
- // the reason why you have no json
22622
- });
22623
- ```
22624
-
22625
- the proxy has bindable attributes which
22626
- track the promises life cycle
22627
-
22628
- ```javascript
22629
- proxy.get('isPending') //=> true
22630
- proxy.get('isSettled') //=> false
22631
- proxy.get('isRejected') //=> false
22632
- proxy.get('isFulfilled') //=> false
22633
- ```
22634
-
22635
- When the $.getJSON completes, and the promise is fulfilled
22636
- with json, the life cycle attributes will update accordingly.
22637
- Note that $.getJSON doesn't return an ECMA specified promise,
22638
- it is useful to wrap this with an `RSVP.resolve` so that it behaves
22639
- as a spec compliant promise.
22640
-
22641
- ```javascript
22642
- proxy.get('isPending') //=> false
22643
- proxy.get('isSettled') //=> true
22644
- proxy.get('isRejected') //=> false
22645
- proxy.get('isFulfilled') //=> true
22646
- ```
22647
-
22648
- As the proxy is an ObjectProxy, and the json now its content,
22649
- all the json properties will be available directly from the proxy.
22650
-
22651
- ```javascript
22652
- // Assuming the following json:
22653
- {
22654
- firstName: 'Stefan',
22655
- lastName: 'Penner'
22656
- }
22657
-
22658
- // both properties will accessible on the proxy
22659
- proxy.get('firstName') //=> 'Stefan'
22660
- proxy.get('lastName') //=> 'Penner'
22661
- ```
22662
-
22663
- @class PromiseProxyMixin
22664
- @public
22665
- */
22666
-
22667
22448
 
22668
- var _default = _metal.Mixin.create({
22449
+ var PromiseProxyMixin = _metal.Mixin.create({
22669
22450
  /**
22670
22451
  If the proxied promise is rejected this will contain the reason
22671
22452
  provided.
22672
- @property reason
22453
+ @property reason
22673
22454
  @default null
22674
22455
  @public
22675
22456
  */
@@ -22677,7 +22458,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22677
22458
 
22678
22459
  /**
22679
22460
  Once the proxied promise has settled this will become `false`.
22680
- @property isPending
22461
+ @property isPending
22681
22462
  @default true
22682
22463
  @public
22683
22464
  */
@@ -22687,7 +22468,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22687
22468
 
22688
22469
  /**
22689
22470
  Once the proxied promise has settled this will become `true`.
22690
- @property isSettled
22471
+ @property isSettled
22691
22472
  @default false
22692
22473
  @public
22693
22474
  */
@@ -22697,7 +22478,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22697
22478
 
22698
22479
  /**
22699
22480
  Will become `true` if the proxied promise is rejected.
22700
- @property isRejected
22481
+ @property isRejected
22701
22482
  @default false
22702
22483
  @public
22703
22484
  */
@@ -22705,7 +22486,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22705
22486
 
22706
22487
  /**
22707
22488
  Will become `true` if the proxied promise is fulfilled.
22708
- @property isFulfilled
22489
+ @property isFulfilled
22709
22490
  @default false
22710
22491
  @public
22711
22492
  */
@@ -22713,17 +22494,17 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22713
22494
 
22714
22495
  /**
22715
22496
  The promise whose fulfillment value is being proxied by this object.
22716
- This property must be specified upon creation, and should not be
22497
+ This property must be specified upon creation, and should not be
22717
22498
  changed once created.
22718
- Example:
22719
- ```javascript
22499
+ Example:
22500
+ ```javascript
22720
22501
  import ObjectProxy from '@ember/object/proxy';
22721
22502
  import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
22722
- ObjectProxy.extend(PromiseProxyMixin).create({
22503
+ ObjectProxy.extend(PromiseProxyMixin).create({
22723
22504
  promise: <thenable>
22724
22505
  });
22725
22506
  ```
22726
- @property promise
22507
+ @property promise
22727
22508
  @public
22728
22509
  */
22729
22510
  promise: (0, _metal.computed)({
@@ -22731,7 +22512,7 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22731
22512
  throw new _error.default("PromiseProxy's promise must be set");
22732
22513
  },
22733
22514
 
22734
- set(key, promise) {
22515
+ set(_key, promise) {
22735
22516
  return tap(this, promise);
22736
22517
  }
22737
22518
 
@@ -22739,8 +22520,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22739
22520
 
22740
22521
  /**
22741
22522
  An alias to the proxied promise's `then`.
22742
- See RSVP.Promise.then.
22743
- @method then
22523
+ See RSVP.Promise.then.
22524
+ @method then
22744
22525
  @param {Function} callback
22745
22526
  @return {RSVP.Promise}
22746
22527
  @public
@@ -22749,8 +22530,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22749
22530
 
22750
22531
  /**
22751
22532
  An alias to the proxied promise's `catch`.
22752
- See RSVP.Promise.catch.
22753
- @method catch
22533
+ See RSVP.Promise.catch.
22534
+ @method catch
22754
22535
  @param {Function} callback
22755
22536
  @return {RSVP.Promise}
22756
22537
  @since 1.3.0
@@ -22760,8 +22541,8 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22760
22541
 
22761
22542
  /**
22762
22543
  An alias to the proxied promise's `finally`.
22763
- See RSVP.Promise.finally.
22764
- @method finally
22544
+ See RSVP.Promise.finally.
22545
+ @method finally
22765
22546
  @param {Function} callback
22766
22547
  @return {RSVP.Promise}
22767
22548
  @since 1.3.0
@@ -22770,16 +22551,21 @@ define("@ember/-internals/runtime/lib/mixins/promise_proxy", ["exports", "@ember
22770
22551
  finally: promiseAlias('finally')
22771
22552
  });
22772
22553
 
22773
- _exports.default = _default;
22774
-
22775
22554
  function promiseAlias(name) {
22776
22555
  return function () {
22777
- var promise = (0, _metal.get)(this, 'promise');
22556
+ var promise = (0, _metal.get)(this, 'promise'); // We need this cast because `Parameters` is deferred so that it is not
22557
+ // possible for TS to see it will always produce the right type. However,
22558
+ // since `AnyFn` has a rest type, it is allowed. See discussion on [this
22559
+ // issue](https://github.com/microsoft/TypeScript/issues/47615).
22560
+
22778
22561
  return promise[name](...arguments);
22779
22562
  };
22780
22563
  }
22564
+
22565
+ var _default = PromiseProxyMixin;
22566
+ _exports.default = _default;
22781
22567
  });
22782
- define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@ember/debug", "@ember/-internals/metal"], function (_exports, _debug, _metal) {
22568
+ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@ember/-internals/metal", "@ember/debug"], function (_exports, _metal, _debug) {
22783
22569
  "use strict";
22784
22570
 
22785
22571
  Object.defineProperty(_exports, "__esModule", {
@@ -22790,20 +22576,12 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22790
22576
  /**
22791
22577
  @module ember
22792
22578
  */
22793
-
22794
- /**
22795
- RegistryProxyMixin is used to provide public access to specific
22796
- registry functionality.
22797
-
22798
- @class RegistryProxyMixin
22799
- @private
22800
- */
22801
- var _default = _metal.Mixin.create({
22579
+ var RegistryProxyMixin = _metal.Mixin.create({
22802
22580
  __registry__: null,
22803
22581
 
22804
22582
  /**
22805
22583
  Given a fullName return the corresponding factory.
22806
- @public
22584
+ @public
22807
22585
  @method resolveRegistration
22808
22586
  @param {String} fullName
22809
22587
  @return {Function} fullName's factory
@@ -22817,48 +22595,48 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22817
22595
  Registers a factory that can be used for dependency injection (with
22818
22596
  `inject`) or for service lookup. Each factory is registered with
22819
22597
  a full name including two parts: `type:name`.
22820
- A simple example:
22821
- ```javascript
22598
+ A simple example:
22599
+ ```javascript
22822
22600
  import Application from '@ember/application';
22823
22601
  import EmberObject from '@ember/object';
22824
- let App = Application.create();
22825
- App.Orange = EmberObject.extend();
22602
+ let App = Application.create();
22603
+ App.Orange = EmberObject.extend();
22826
22604
  App.register('fruit:favorite', App.Orange);
22827
22605
  ```
22828
- Ember will resolve factories from the `App` namespace automatically.
22606
+ Ember will resolve factories from the `App` namespace automatically.
22829
22607
  For example `App.CarsController` will be discovered and returned if
22830
22608
  an application requests `controller:cars`.
22831
- An example of registering a controller with a non-standard name:
22832
- ```javascript
22609
+ An example of registering a controller with a non-standard name:
22610
+ ```javascript
22833
22611
  import Application from '@ember/application';
22834
22612
  import Controller from '@ember/controller';
22835
- let App = Application.create();
22613
+ let App = Application.create();
22836
22614
  let Session = Controller.extend();
22837
- App.register('controller:session', Session);
22838
- // The Session controller can now be treated like a normal controller,
22615
+ App.register('controller:session', Session);
22616
+ // The Session controller can now be treated like a normal controller,
22839
22617
  // despite its non-standard name.
22840
22618
  App.ApplicationController = Controller.extend({
22841
22619
  needs: ['session']
22842
22620
  });
22843
22621
  ```
22844
- Registered factories are **instantiated** by having `create`
22622
+ Registered factories are **instantiated** by having `create`
22845
22623
  called on them. Additionally they are **singletons**, each time
22846
22624
  they are looked up they return the same instance.
22847
- Some examples modifying that default behavior:
22848
- ```javascript
22625
+ Some examples modifying that default behavior:
22626
+ ```javascript
22849
22627
  import Application from '@ember/application';
22850
22628
  import EmberObject from '@ember/object';
22851
- let App = Application.create();
22852
- App.Person = EmberObject.extend();
22629
+ let App = Application.create();
22630
+ App.Person = EmberObject.extend();
22853
22631
  App.Orange = EmberObject.extend();
22854
22632
  App.Email = EmberObject.extend();
22855
22633
  App.session = EmberObject.create();
22856
- App.register('model:user', App.Person, { singleton: false });
22634
+ App.register('model:user', App.Person, { singleton: false });
22857
22635
  App.register('fruit:favorite', App.Orange);
22858
22636
  App.register('communication:main', App.Email, { singleton: false });
22859
22637
  App.register('session', App.session, { instantiate: false });
22860
22638
  ```
22861
- @method register
22639
+ @method register
22862
22640
  @param fullName {String} type:name (e.g., 'model:user')
22863
22641
  @param factory {any} (e.g., App.Person)
22864
22642
  @param options {Object} (optional) disable instantiation or singleton usage
@@ -22868,17 +22646,17 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22868
22646
 
22869
22647
  /**
22870
22648
  Unregister a factory.
22871
- ```javascript
22649
+ ```javascript
22872
22650
  import Application from '@ember/application';
22873
22651
  import EmberObject from '@ember/object';
22874
- let App = Application.create();
22652
+ let App = Application.create();
22875
22653
  let User = EmberObject.extend();
22876
22654
  App.register('model:user', User);
22877
- App.resolveRegistration('model:user').create() instanceof User //=> true
22878
- App.unregister('model:user')
22655
+ App.resolveRegistration('model:user').create() instanceof User //=> true
22656
+ App.unregister('model:user')
22879
22657
  App.resolveRegistration('model:user') === undefined //=> true
22880
22658
  ```
22881
- @public
22659
+ @public
22882
22660
  @method unregister
22883
22661
  @param {String} fullName
22884
22662
  */
@@ -22886,7 +22664,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22886
22664
 
22887
22665
  /**
22888
22666
  Check if a factory is registered.
22889
- @public
22667
+ @public
22890
22668
  @method hasRegistration
22891
22669
  @param {String} fullName
22892
22670
  @return {Boolean}
@@ -22895,7 +22673,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22895
22673
 
22896
22674
  /**
22897
22675
  Return a specific registered option for a particular factory.
22898
- @public
22676
+ @public
22899
22677
  @method registeredOption
22900
22678
  @param {String} fullName
22901
22679
  @param {String} optionName
@@ -22905,7 +22683,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22905
22683
 
22906
22684
  /**
22907
22685
  Register options for a particular factory.
22908
- @public
22686
+ @public
22909
22687
  @method registerOptions
22910
22688
  @param {String} fullName
22911
22689
  @param {Object} options
@@ -22914,7 +22692,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22914
22692
 
22915
22693
  /**
22916
22694
  Return registered options for a particular factory.
22917
- @public
22695
+ @public
22918
22696
  @method registeredOptions
22919
22697
  @param {String} fullName
22920
22698
  @return {Object} options
@@ -22923,22 +22701,22 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22923
22701
 
22924
22702
  /**
22925
22703
  Allow registering options for all factories of a type.
22926
- ```javascript
22704
+ ```javascript
22927
22705
  import Application from '@ember/application';
22928
- let App = Application.create();
22706
+ let App = Application.create();
22929
22707
  let appInstance = App.buildInstance();
22930
- // if all of type `connection` must not be singletons
22708
+ // if all of type `connection` must not be singletons
22931
22709
  appInstance.registerOptionsForType('connection', { singleton: false });
22932
- appInstance.register('connection:twitter', TwitterConnection);
22710
+ appInstance.register('connection:twitter', TwitterConnection);
22933
22711
  appInstance.register('connection:facebook', FacebookConnection);
22934
- let twitter = appInstance.lookup('connection:twitter');
22712
+ let twitter = appInstance.lookup('connection:twitter');
22935
22713
  let twitter2 = appInstance.lookup('connection:twitter');
22936
- twitter === twitter2; // => false
22937
- let facebook = appInstance.lookup('connection:facebook');
22714
+ twitter === twitter2; // => false
22715
+ let facebook = appInstance.lookup('connection:facebook');
22938
22716
  let facebook2 = appInstance.lookup('connection:facebook');
22939
- facebook === facebook2; // => false
22717
+ facebook === facebook2; // => false
22940
22718
  ```
22941
- @public
22719
+ @public
22942
22720
  @method registerOptionsForType
22943
22721
  @param {String} type
22944
22722
  @param {Object} options
@@ -22947,7 +22725,7 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22947
22725
 
22948
22726
  /**
22949
22727
  Return the registered options for all factories of a type.
22950
- @public
22728
+ @public
22951
22729
  @method registeredOptionsForType
22952
22730
  @param {String} type
22953
22731
  @return {Object} options
@@ -22957,37 +22735,37 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22957
22735
  /**
22958
22736
  Define a dependency injection onto a specific factory or all factories
22959
22737
  of a type.
22960
- When Ember instantiates a controller, view, or other framework component
22738
+ When Ember instantiates a controller, view, or other framework component
22961
22739
  it can attach a dependency to that component. This is often used to
22962
22740
  provide services to a set of framework components.
22963
- An example of providing a session object to all controllers:
22964
- ```javascript
22741
+ An example of providing a session object to all controllers:
22742
+ ```javascript
22965
22743
  import { alias } from '@ember/object/computed';
22966
22744
  import Application from '@ember/application';
22967
22745
  import Controller from '@ember/controller';
22968
22746
  import EmberObject from '@ember/object';
22969
- let App = Application.create();
22747
+ let App = Application.create();
22970
22748
  let Session = EmberObject.extend({ isAuthenticated: false });
22971
- // A factory must be registered before it can be injected
22749
+ // A factory must be registered before it can be injected
22972
22750
  App.register('session:main', Session);
22973
- // Inject 'session:main' onto all factories of the type 'controller'
22751
+ // Inject 'session:main' onto all factories of the type 'controller'
22974
22752
  // with the name 'session'
22975
22753
  App.inject('controller', 'session', 'session:main');
22976
- App.IndexController = Controller.extend({
22754
+ App.IndexController = Controller.extend({
22977
22755
  isLoggedIn: alias('session.isAuthenticated')
22978
22756
  });
22979
22757
  ```
22980
- Injections can also be performed on specific factories.
22981
- ```javascript
22758
+ Injections can also be performed on specific factories.
22759
+ ```javascript
22982
22760
  App.inject(<full_name or type>, <property name>, <full_name>)
22983
22761
  App.inject('route', 'source', 'source:main')
22984
22762
  App.inject('route:application', 'email', 'model:email')
22985
22763
  ```
22986
- It is important to note that injections can only be performed on
22764
+ It is important to note that injections can only be performed on
22987
22765
  classes that are instantiated by Ember itself. Instantiating a class
22988
22766
  directly (via `create` or `new`) bypasses the dependency injection
22989
22767
  system.
22990
- @public
22768
+ @public
22991
22769
  @method inject
22992
22770
  @param factoryNameOrType {String}
22993
22771
  @param property {String}
@@ -22997,13 +22775,18 @@ define("@ember/-internals/runtime/lib/mixins/registry_proxy", ["exports", "@embe
22997
22775
  inject: registryAlias('injection')
22998
22776
  });
22999
22777
 
23000
- _exports.default = _default;
23001
-
23002
22778
  function registryAlias(name) {
23003
22779
  return function () {
22780
+ // We need this cast because `Parameters` is deferred so that it is not
22781
+ // possible for TS to see it will always produce the right type. However,
22782
+ // since `AnyFn` has a rest type, it is allowed. See discussion on [this
22783
+ // issue](https://github.com/microsoft/TypeScript/issues/47615).
23004
22784
  return this.__registry__[name](...arguments);
23005
22785
  };
23006
22786
  }
22787
+
22788
+ var _default = RegistryProxyMixin;
22789
+ _exports.default = _default;
23007
22790
  });
23008
22791
  define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports", "@ember/-internals/environment", "@ember/-internals/metal", "@ember/debug"], function (_exports, _environment, _metal, _debug) {
23009
22792
  "use strict";
@@ -23016,19 +22799,6 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23016
22799
  /**
23017
22800
  @module ember
23018
22801
  */
23019
-
23020
- /**
23021
- `Ember.TargetActionSupport` is a mixin that can be included in a class
23022
- to add a `triggerAction` method with semantics similar to the Handlebars
23023
- `{{action}}` helper. In normal Ember usage, the `{{action}}` helper is
23024
- usually the best choice. This mixin is most often useful when you are
23025
- doing more complex event handling in Components.
23026
-
23027
- @class TargetActionSupport
23028
- @namespace Ember
23029
- @extends Mixin
23030
- @private
23031
- */
23032
22802
  var TargetActionSupport = _metal.Mixin.create({
23033
22803
  target: null,
23034
22804
  action: null,
@@ -23052,9 +22822,9 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23052
22822
  /**
23053
22823
  Send an `action` with an `actionContext` to a `target`. The action, actionContext
23054
22824
  and target will be retrieved from properties of the object. For example:
23055
- ```javascript
22825
+ ```javascript
23056
22826
  import { alias } from '@ember/object/computed';
23057
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
22827
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23058
22828
  target: alias('controller'),
23059
22829
  action: 'save',
23060
22830
  actionContext: alias('context'),
@@ -23064,9 +22834,9 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23064
22834
  }
23065
22835
  });
23066
22836
  ```
23067
- The `target`, `action`, and `actionContext` can be provided as properties of
22837
+ The `target`, `action`, and `actionContext` can be provided as properties of
23068
22838
  an optional object argument to `triggerAction` as well.
23069
- ```javascript
22839
+ ```javascript
23070
22840
  App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23071
22841
  click() {
23072
22842
  this.triggerAction({
@@ -23078,12 +22848,12 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23078
22848
  }
23079
22849
  });
23080
22850
  ```
23081
- The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
22851
+ The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
23082
22852
  But `target` and `action` must be specified either as properties or with the argument
23083
22853
  to `triggerAction`, or a combination:
23084
- ```javascript
22854
+ ```javascript
23085
22855
  import { alias } from '@ember/object/computed';
23086
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
22856
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
23087
22857
  target: alias('controller'),
23088
22858
  click() {
23089
22859
  this.triggerAction({
@@ -23093,7 +22863,7 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23093
22863
  }
23094
22864
  });
23095
22865
  ```
23096
- @method triggerAction
22866
+ @method triggerAction
23097
22867
  @param opts {Object} (optional, with the optional keys action, target and/or actionContext)
23098
22868
  @return {Boolean} true if the action was sent successfully and did not return false
23099
22869
  @private
@@ -23115,14 +22885,16 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23115
22885
  actionContext = (0, _metal.get)(this, 'actionContextObject') || this;
23116
22886
  }
23117
22887
 
22888
+ var context = Array.isArray(actionContext) ? actionContext : [actionContext];
22889
+
23118
22890
  if (target && action) {
23119
22891
  var ret;
23120
22892
 
23121
- if (target.send) {
23122
- ret = target.send(...[action].concat(actionContext));
22893
+ if (isSendable(target)) {
22894
+ ret = target.send(action, ...context);
23123
22895
  } else {
23124
22896
  (true && !(typeof target[action] === 'function') && (0, _debug.assert)(`The action '${action}' did not exist on ${target}`, typeof target[action] === 'function'));
23125
- ret = target[action](...[].concat(actionContext));
22897
+ ret = target[action](...context);
23126
22898
  }
23127
22899
 
23128
22900
  if (ret !== false) {
@@ -23135,6 +22907,10 @@ define("@ember/-internals/runtime/lib/mixins/target_action_support", ["exports",
23135
22907
 
23136
22908
  });
23137
22909
 
22910
+ function isSendable(obj) {
22911
+ return obj != null && typeof obj === 'object' && typeof obj.send === 'function';
22912
+ }
22913
+
23138
22914
  function getTarget(instance) {
23139
22915
  var target = (0, _metal.get)(instance, 'target');
23140
22916
 
@@ -23179,12 +22955,18 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23179
22955
  /**
23180
22956
  @module @ember/array
23181
22957
  */
22958
+ function isMutable(obj) {
22959
+ return Array.isArray(obj) || typeof obj.replace === 'function';
22960
+ }
22961
+
23182
22962
  var ARRAY_OBSERVER_MAPPING = {
23183
22963
  willChange: '_arrangedContentArrayWillChange',
23184
22964
  didChange: '_arrangedContentArrayDidChange'
23185
22965
  };
23186
22966
 
23187
22967
  function customTagForArrayProxy(proxy, key) {
22968
+ (true && !(proxy instanceof ArrayProxy) && (0, _debug.assert)('[BUG] Expected a proxy', proxy instanceof ArrayProxy));
22969
+
23188
22970
  if (key === '[]') {
23189
22971
  proxy._revalidate();
23190
22972
 
@@ -23197,90 +22979,53 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23197
22979
 
23198
22980
  return (0, _validator.tagFor)(proxy, key);
23199
22981
  }
23200
- /**
23201
- An ArrayProxy wraps any other object that implements `Array` and/or
23202
- `MutableArray,` forwarding all requests. This makes it very useful for
23203
- a number of binding use cases or other cases where being able to swap
23204
- out the underlying array is useful.
23205
-
23206
- A simple example of usage:
23207
-
23208
- ```javascript
23209
- import { A } from '@ember/array';
23210
- import ArrayProxy from '@ember/array/proxy';
23211
-
23212
- let pets = ['dog', 'cat', 'fish'];
23213
- let ap = ArrayProxy.create({ content: A(pets) });
23214
-
23215
- ap.get('firstObject'); // 'dog'
23216
- ap.set('content', ['amoeba', 'paramecium']);
23217
- ap.get('firstObject'); // 'amoeba'
23218
- ```
23219
-
23220
- This class can also be useful as a layer to transform the contents of
23221
- an array, as they are accessed. This can be done by overriding
23222
- `objectAtContent`:
23223
-
23224
- ```javascript
23225
- import { A } from '@ember/array';
23226
- import ArrayProxy from '@ember/array/proxy';
23227
-
23228
- let pets = ['dog', 'cat', 'fish'];
23229
- let ap = ArrayProxy.create({
23230
- content: A(pets),
23231
- objectAtContent: function(idx) {
23232
- return this.get('content').objectAt(idx).toUpperCase();
23233
- }
23234
- });
23235
-
23236
- ap.get('firstObject'); // . 'DOG'
23237
- ```
23238
-
23239
- When overriding this class, it is important to place the call to
23240
- `_super` *after* setting `content` so the internal observers have
23241
- a chance to fire properly:
23242
-
23243
- ```javascript
23244
- import { A } from '@ember/array';
23245
- import ArrayProxy from '@ember/array/proxy';
23246
-
23247
- export default ArrayProxy.extend({
23248
- init() {
23249
- this.set('content', A(['dog', 'cat', 'fish']));
23250
- this._super(...arguments);
23251
- }
23252
- });
23253
- ```
23254
-
23255
- @class ArrayProxy
23256
- @extends EmberObject
23257
- @uses MutableArray
23258
- @public
23259
- */
23260
-
23261
22982
 
23262
22983
  class ArrayProxy extends _object.default {
23263
- init() {
23264
- super.init(...arguments);
22984
+ constructor() {
22985
+ super(...arguments);
23265
22986
  /*
23266
22987
  `this._objectsDirtyIndex` determines which indexes in the `this._objects`
23267
22988
  cache are dirty.
23268
- If `this._objectsDirtyIndex === -1` then no indexes are dirty.
22989
+ If `this._objectsDirtyIndex === -1` then no indexes are dirty.
23269
22990
  Otherwise, an index `i` is dirty if `i >= this._objectsDirtyIndex`.
23270
- Calling `objectAt` with a dirty index will cause the `this._objects`
22991
+ Calling `objectAt` with a dirty index will cause the `this._objects`
23271
22992
  cache to be recomputed.
23272
22993
  */
23273
22994
 
22995
+ /** @internal */
22996
+
23274
22997
  this._objectsDirtyIndex = 0;
22998
+ /** @internal */
22999
+
23275
23000
  this._objects = null;
23001
+ /** @internal */
23002
+
23276
23003
  this._lengthDirty = true;
23004
+ /** @internal */
23005
+
23277
23006
  this._length = 0;
23007
+ /** @internal */
23008
+
23278
23009
  this._arrangedContent = null;
23010
+ /** @internal */
23011
+
23279
23012
  this._arrangedContentIsUpdating = false;
23013
+ /** @internal */
23014
+
23280
23015
  this._arrangedContentTag = null;
23016
+ /** @internal */
23017
+
23281
23018
  this._arrangedContentRevision = null;
23019
+ /** @internal */
23020
+
23282
23021
  this._lengthTag = null;
23022
+ /** @internal */
23023
+
23283
23024
  this._arrTag = null;
23025
+ }
23026
+
23027
+ init(props) {
23028
+ super.init(props);
23284
23029
  (0, _manager.setCustomTagFor)(this, customTagForArrayProxy);
23285
23030
  }
23286
23031
 
@@ -23291,20 +23036,12 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23291
23036
  willDestroy() {
23292
23037
  this._removeArrangedContentArrayObserver();
23293
23038
  }
23294
- /**
23295
- The content array. Must be an object that implements `Array` and/or
23296
- `MutableArray.`
23297
- @property content
23298
- @type EmberArray
23299
- @public
23300
- */
23301
-
23302
23039
  /**
23303
23040
  Should actually retrieve the object at the specified index from the
23304
23041
  content. You can override this method in subclasses to transform the
23305
23042
  content item to something new.
23306
- This method will only be called if content is non-`null`.
23307
- @method objectAtContent
23043
+ This method will only be called if content is non-`null`.
23044
+ @method objectAtContent
23308
23045
  @param {Number} idx The index to retrieve.
23309
23046
  @return {Object} the value or undefined if none found
23310
23047
  @public
@@ -23312,7 +23049,9 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23312
23049
 
23313
23050
 
23314
23051
  objectAtContent(idx) {
23315
- return (0, _metal.objectAt)((0, _metal.get)(this, 'arrangedContent'), idx);
23052
+ var arrangedContent = (0, _metal.get)(this, 'arrangedContent');
23053
+ (true && !(arrangedContent) && (0, _debug.assert)('[BUG] Called objectAtContent without content', arrangedContent));
23054
+ return (0, _metal.objectAt)(arrangedContent, idx);
23316
23055
  } // See additional docs for `replace` from `MutableArray`:
23317
23056
  // https://api.emberjs.com/ember/release/classes/MutableArray/methods/replace?anchor=replace
23318
23057
 
@@ -23325,19 +23064,21 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23325
23064
  Should actually replace the specified objects on the content array.
23326
23065
  You can override this method in subclasses to transform the content item
23327
23066
  into something new.
23328
- This method will only be called if content is non-`null`.
23329
- @method replaceContent
23067
+ This method will only be called if content is non-`null`.
23068
+ @method replaceContent
23330
23069
  @param {Number} idx The starting index
23331
23070
  @param {Number} amt The number of items to remove from the content.
23332
- @param {EmberArray} objects Optional array of objects to insert or null if no
23333
- objects.
23071
+ @param {EmberArray} objects Optional array of objects to insert.
23334
23072
  @return {void}
23335
23073
  @public
23336
23074
  */
23337
23075
 
23338
23076
 
23339
23077
  replaceContent(idx, amt, objects) {
23340
- (0, _metal.get)(this, 'content').replace(idx, amt, objects);
23078
+ var content = (0, _metal.get)(this, 'content');
23079
+ (true && !(content) && (0, _debug.assert)('[BUG] Called objectAtContent without content', content));
23080
+ (true && !(isMutable(content)) && (0, _debug.assert)('Mutating a non-mutable array is not allowed', isMutable(content)));
23081
+ content.replace(idx, amt, objects);
23341
23082
  } // Overriding objectAt is not supported.
23342
23083
 
23343
23084
 
@@ -23355,6 +23096,9 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23355
23096
  var length = this._objects.length = (0, _metal.get)(arrangedContent, 'length');
23356
23097
 
23357
23098
  for (var i = this._objectsDirtyIndex; i < length; i++) {
23099
+ // SAFETY: This is expected to only ever return an instance of T. In other words, there should
23100
+ // be no gaps in the array. Unfortunately, we can't actually assert for it since T could include
23101
+ // any types, including null or undefined.
23358
23102
  this._objects[i] = this.objectAtContent(i);
23359
23103
  }
23360
23104
  } else {
@@ -23377,6 +23121,7 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23377
23121
  this._lengthDirty = false;
23378
23122
  }
23379
23123
 
23124
+ (true && !(this._lengthTag) && (0, _debug.assert)('[BUG] _lengthTag is not set', this._lengthTag));
23380
23125
  (0, _validator.consumeTag)(this._lengthTag);
23381
23126
  return this._length;
23382
23127
  }
@@ -23396,6 +23141,7 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23396
23141
  var content = (0, _metal.get)(this, 'content');
23397
23142
 
23398
23143
  if (content) {
23144
+ (true && !(isMutable(content)) && (0, _debug.assert)('Mutating a non-mutable array is not allowed', isMutable(content)));
23399
23145
  (0, _metal.replace)(content, value, removedCount, added);
23400
23146
 
23401
23147
  this._invalidate();
@@ -23419,6 +23165,7 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23419
23165
 
23420
23166
  _addArrangedContentArrayObserver(arrangedContent) {
23421
23167
  if (arrangedContent && !arrangedContent.isDestroyed) {
23168
+ // @ts-expect-error This check is still good for ensuring correctness
23422
23169
  (true && !(arrangedContent !== this) && (0, _debug.assert)("Can't set ArrayProxy's content to itself", arrangedContent !== this));
23423
23170
  (true && !((0, _array.isArray)(arrangedContent) || arrangedContent.isDestroyed) && (0, _debug.assert)(`ArrayProxy expects an Array or ArrayProxy, but you passed ${typeof arrangedContent}`, (0, _array.isArray)(arrangedContent) || arrangedContent.isDestroyed));
23424
23171
  (0, _metal.addArrayObserver)(arrangedContent, this, ARRAY_OBSERVER_MAPPING);
@@ -23434,7 +23181,7 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23434
23181
 
23435
23182
  _arrangedContentArrayWillChange() {}
23436
23183
 
23437
- _arrangedContentArrayDidChange(proxy, idx, removedCnt, addedCnt) {
23184
+ _arrangedContentArrayDidChange(_proxy, idx, removedCnt, addedCnt) {
23438
23185
  (0, _metal.arrayContentWillChange)(this, idx, removedCnt, addedCnt);
23439
23186
  var dirtyIndex = idx;
23440
23187
 
@@ -23488,17 +23235,18 @@ define("@ember/-internals/runtime/lib/system/array_proxy", ["exports", "@ember/-
23488
23235
 
23489
23236
  }
23490
23237
 
23491
- _exports.default = ArrayProxy;
23492
23238
  ArrayProxy.reopen(_array.MutableArray, {
23493
23239
  /**
23494
23240
  The array that the proxy pretends to be. In the default `ArrayProxy`
23495
23241
  implementation, this and `content` are the same. Subclasses of `ArrayProxy`
23496
23242
  can override this property to provide things like sorting and filtering.
23497
- @property arrangedContent
23243
+ @property arrangedContent
23498
23244
  @public
23499
23245
  */
23500
23246
  arrangedContent: (0, _metal.alias)('content')
23501
23247
  });
23248
+ var _default = ArrayProxy;
23249
+ _exports.default = _default;
23502
23250
  });
23503
23251
  define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-internals/container", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/-internals/meta", "@ember/-internals/metal", "@ember/-internals/runtime/lib/mixins/action_handler", "@ember/debug", "@glimmer/util", "@glimmer/destroyable", "@glimmer/owner"], function (_exports, _container, _owner, _utils, _meta2, _metal, _action_handler, _debug, _util, _destroyable, _owner2) {
23504
23252
  "use strict";
@@ -24358,6 +24106,8 @@ define("@ember/-internals/runtime/lib/system/object", ["exports", "@ember/-inter
24358
24106
  /**
24359
24107
  @module @ember/object
24360
24108
  */
24109
+ var _a;
24110
+
24361
24111
  class EmberObject extends _core_object.default.extend(_observable.default) {
24362
24112
  get _debugContainerKey() {
24363
24113
  var factory = (0, _container.getFactoryFor)(this);
@@ -24374,15 +24124,20 @@ define("@ember/-internals/runtime/lib/system/object", ["exports", "@ember/-inter
24374
24124
  if (true
24375
24125
  /* DEBUG */
24376
24126
  ) {
24377
- var INIT_WAS_CALLED = (0, _utils.symbol)('INIT_WAS_CALLED');
24127
+ var INIT_WAS_CALLED = Symbol('INIT_WAS_CALLED');
24378
24128
  var ASSERT_INIT_WAS_CALLED = (0, _utils.symbol)('ASSERT_INIT_WAS_CALLED');
24379
24129
  _exports.FrameworkObject = FrameworkObject = class DebugFrameworkObject extends EmberObject {
24130
+ constructor() {
24131
+ super(...arguments);
24132
+ this[_a] = false;
24133
+ }
24134
+
24380
24135
  init(properties) {
24381
24136
  super.init(properties);
24382
24137
  this[INIT_WAS_CALLED] = true;
24383
24138
  }
24384
24139
 
24385
- [ASSERT_INIT_WAS_CALLED]() {
24140
+ [(_a = INIT_WAS_CALLED, ASSERT_INIT_WAS_CALLED)]() {
24386
24141
  (true && !(this[INIT_WAS_CALLED]) && (0, _debug.assert)(`You must call \`super.init(...arguments);\` or \`this._super(...arguments)\` when overriding \`init\` on a framework object. Please update ${this} to call \`super.init(...arguments);\` from \`init\` when using native classes or \`this._super(...arguments)\` when using \`EmberObject.extend()\`.`, this[INIT_WAS_CALLED]));
24387
24142
  }
24388
24143
 
@@ -24398,86 +24153,11 @@ define("@ember/-internals/runtime/lib/system/object_proxy", ["exports", "@ember/
24398
24153
  });
24399
24154
  _exports.default = void 0;
24400
24155
 
24401
- /**
24402
- `ObjectProxy` forwards all properties not defined by the proxy itself
24403
- to a proxied `content` object.
24404
-
24405
- ```javascript
24406
- import EmberObject from '@ember/object';
24407
- import ObjectProxy from '@ember/object/proxy';
24408
-
24409
- let exampleObject = EmberObject.create({
24410
- name: 'Foo'
24411
- });
24412
-
24413
- let exampleProxy = ObjectProxy.create({
24414
- content: exampleObject
24415
- });
24416
-
24417
- // Access and change existing properties
24418
- exampleProxy.get('name'); // 'Foo'
24419
- exampleProxy.set('name', 'Bar');
24420
- exampleObject.get('name'); // 'Bar'
24421
-
24422
- // Create new 'description' property on `exampleObject`
24423
- exampleProxy.set('description', 'Foo is a whizboo baz');
24424
- exampleObject.get('description'); // 'Foo is a whizboo baz'
24425
- ```
24426
-
24427
- While `content` is unset, setting a property to be delegated will throw an
24428
- Error.
24429
-
24430
- ```javascript
24431
- import ObjectProxy from '@ember/object/proxy';
24432
-
24433
- let exampleProxy = ObjectProxy.create({
24434
- content: null,
24435
- flag: null
24436
- });
24437
- exampleProxy.set('flag', true);
24438
- exampleProxy.get('flag'); // true
24439
- exampleProxy.get('foo'); // undefined
24440
- exampleProxy.set('foo', 'data'); // throws Error
24441
- ```
24442
-
24443
- Delegated properties can be bound to and will change when content is updated.
24444
-
24445
- Computed properties on the proxy itself can depend on delegated properties.
24446
-
24447
- ```javascript
24448
- import { computed } from '@ember/object';
24449
- import ObjectProxy from '@ember/object/proxy';
24450
-
24451
- ProxyWithComputedProperty = ObjectProxy.extend({
24452
- fullName: computed('firstName', 'lastName', function() {
24453
- var firstName = this.get('firstName'),
24454
- lastName = this.get('lastName');
24455
- if (firstName && lastName) {
24456
- return firstName + ' ' + lastName;
24457
- }
24458
- return firstName || lastName;
24459
- })
24460
- });
24461
-
24462
- let exampleProxy = ProxyWithComputedProperty.create();
24463
-
24464
- exampleProxy.get('fullName'); // undefined
24465
- exampleProxy.set('content', {
24466
- firstName: 'Tom', lastName: 'Dale'
24467
- }); // triggers property change for fullName on proxy
24468
-
24469
- exampleProxy.get('fullName'); // 'Tom Dale'
24470
- ```
24471
-
24472
- @class ObjectProxy
24473
- @extends EmberObject
24474
- @uses Ember.ProxyMixin
24475
- @public
24476
- */
24477
24156
  class ObjectProxy extends _object.default {}
24478
24157
 
24479
- _exports.default = ObjectProxy;
24480
24158
  ObjectProxy.PrototypeMixin.reopen(_proxy.default);
24159
+ var _default = ObjectProxy;
24160
+ _exports.default = _default;
24481
24161
  });
24482
24162
  define("@ember/-internals/runtime/lib/type-of", ["exports", "@ember/-internals/runtime/lib/system/core_object"], function (_exports, _core_object) {
24483
24163
  "use strict";
@@ -25163,7 +24843,7 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
25163
24843
  var key = keys[i];
25164
24844
  (true && !(key) && (0, _debug.assert)('has key', key)); // Looping over array
25165
24845
 
25166
- s += `${inspectKey(key)}: ${inspectValue(obj[key], depth, seen)}`;
24846
+ s += `${inspectKey(String(key))}: ${inspectValue(obj[key], depth, seen)}`;
25167
24847
  }
25168
24848
 
25169
24849
  s += ' }';
@@ -25495,6 +25175,13 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
25495
25175
  */
25496
25176
 
25497
25177
  });
25178
+ define("@ember/-internals/utils/types", ["exports"], function (_exports) {
25179
+ "use strict";
25180
+
25181
+ Object.defineProperty(_exports, "__esModule", {
25182
+ value: true
25183
+ });
25184
+ });
25498
25185
  define("@ember/-internals/views/index", ["exports", "@ember/-internals/views/lib/system/utils", "@ember/-internals/views/lib/system/event_dispatcher", "@ember/-internals/views/lib/component_lookup", "@ember/-internals/views/lib/views/core_view", "@ember/-internals/views/lib/mixins/class_names_support", "@ember/-internals/views/lib/mixins/child_views_support", "@ember/-internals/views/lib/mixins/view_state_support", "@ember/-internals/views/lib/mixins/view_support", "@ember/-internals/views/lib/mixins/action_support", "@ember/-internals/views/lib/compat/attrs", "@ember/-internals/views/lib/system/action_manager"], function (_exports, _utils, _event_dispatcher, _component_lookup, _core_view, _class_names_support, _child_views_support, _view_state_support, _view_support, _action_support, _attrs, _action_manager) {
25499
25186
  "use strict";
25500
25187
 
@@ -25652,14 +25339,14 @@ define("@ember/-internals/views/index", ["exports", "@ember/-internals/views/lib
25652
25339
  }
25653
25340
  });
25654
25341
  });
25655
- define("@ember/-internals/views/lib/compat/attrs", ["exports", "@ember/-internals/utils"], function (_exports, _utils) {
25342
+ define("@ember/-internals/views/lib/compat/attrs", ["exports"], function (_exports) {
25656
25343
  "use strict";
25657
25344
 
25658
25345
  Object.defineProperty(_exports, "__esModule", {
25659
25346
  value: true
25660
25347
  });
25661
25348
  _exports.MUTABLE_CELL = void 0;
25662
- var MUTABLE_CELL = (0, _utils.symbol)('MUTABLE_CELL');
25349
+ var MUTABLE_CELL = Symbol('MUTABLE_CELL');
25663
25350
  _exports.MUTABLE_CELL = MUTABLE_CELL;
25664
25351
  });
25665
25352
  define("@ember/-internals/views/lib/compat/fallback-view-registry", ["exports", "@ember/-internals/utils"], function (_exports, _utils) {
@@ -25683,9 +25370,9 @@ define("@ember/-internals/views/lib/component_lookup", ["exports", "@ember/-inte
25683
25370
  _exports.default = void 0;
25684
25371
 
25685
25372
  var _default = _runtime.Object.extend({
25686
- componentFor(name, owner, options) {
25373
+ componentFor(name, owner) {
25687
25374
  var fullName = `component:${name}`;
25688
- return owner.factoryFor(fullName, options);
25375
+ return owner.factoryFor(fullName);
25689
25376
  },
25690
25377
 
25691
25378
  layoutFor(name, owner, options) {
@@ -25708,7 +25395,7 @@ define("@ember/-internals/views/lib/mixins/action_support", ["exports", "@ember/
25708
25395
  /**
25709
25396
  @module ember
25710
25397
  */
25711
- var mixinObj = {
25398
+ var ActionSupport = _metal.Mixin.create({
25712
25399
  send(actionName) {
25713
25400
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
25714
25401
  args[_key - 1] = arguments[_key];
@@ -25735,15 +25422,9 @@ define("@ember/-internals/views/lib/mixins/action_support", ["exports", "@ember/
25735
25422
  }
25736
25423
  }
25737
25424
 
25738
- };
25739
- /**
25740
- @class ActionSupport
25741
- @namespace Ember
25742
- @private
25743
- */
25744
-
25745
- var _default = _metal.Mixin.create(mixinObj);
25425
+ });
25746
25426
 
25427
+ var _default = ActionSupport;
25747
25428
  _exports.default = _default;
25748
25429
  });
25749
25430
  define("@ember/-internals/views/lib/mixins/child_views_support", ["exports", "@ember/-internals/metal", "@ember/-internals/views/lib/system/utils"], function (_exports, _metal, _utils) {
@@ -25754,13 +25435,10 @@ define("@ember/-internals/views/lib/mixins/child_views_support", ["exports", "@e
25754
25435
  });
25755
25436
  _exports.default = void 0;
25756
25437
 
25757
- /**
25758
- @module ember
25759
- */
25760
- var _default = _metal.Mixin.create({
25438
+ var ChildViewsSupport = _metal.Mixin.create({
25761
25439
  /**
25762
25440
  Array of child views. You should never edit this array directly.
25763
- @property childViews
25441
+ @property childViews
25764
25442
  @type Array
25765
25443
  @default []
25766
25444
  @private
@@ -25781,6 +25459,7 @@ define("@ember/-internals/views/lib/mixins/child_views_support", ["exports", "@e
25781
25459
 
25782
25460
  });
25783
25461
 
25462
+ var _default = ChildViewsSupport;
25784
25463
  _exports.default = _default;
25785
25464
  });
25786
25465
  define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@ember/-internals/metal", "@ember/debug"], function (_exports, _metal, _debug) {
@@ -25795,13 +25474,8 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25795
25474
  @module ember
25796
25475
  */
25797
25476
  var EMPTY_ARRAY = Object.freeze([]);
25798
- /**
25799
- @class ClassNamesSupport
25800
- @namespace Ember
25801
- @private
25802
- */
25803
25477
 
25804
- var _default = _metal.Mixin.create({
25478
+ var ClassNamesSupport = _metal.Mixin.create({
25805
25479
  concatenatedProperties: ['classNames', 'classNameBindings'],
25806
25480
 
25807
25481
  init() {
@@ -25815,7 +25489,7 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25815
25489
  Standard CSS class names to apply to the view's outer element. This
25816
25490
  property automatically inherits any class names defined by the view's
25817
25491
  superclasses as well.
25818
- @property classNames
25492
+ @property classNames
25819
25493
  @type Array
25820
25494
  @default ['ember-view']
25821
25495
  @public
@@ -25826,7 +25500,7 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25826
25500
  A list of properties of the view to apply as class names. If the property
25827
25501
  is a string value, the value of that string will be applied as a class
25828
25502
  name.
25829
- ```javascript
25503
+ ```javascript
25830
25504
  // Applies the 'high' class to the view element
25831
25505
  import Component from '@ember/component';
25832
25506
  Component.extend({
@@ -25834,9 +25508,9 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25834
25508
  priority: 'high'
25835
25509
  });
25836
25510
  ```
25837
- If the value of the property is a Boolean, the name of that property is
25511
+ If the value of the property is a Boolean, the name of that property is
25838
25512
  added as a dasherized class name.
25839
- ```javascript
25513
+ ```javascript
25840
25514
  // Applies the 'is-urgent' class to the view element
25841
25515
  import Component from '@ember/component';
25842
25516
  Component.extend({
@@ -25844,9 +25518,9 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25844
25518
  isUrgent: true
25845
25519
  });
25846
25520
  ```
25847
- If you would prefer to use a custom value instead of the dasherized
25521
+ If you would prefer to use a custom value instead of the dasherized
25848
25522
  property name, you can pass a binding like this:
25849
- ```javascript
25523
+ ```javascript
25850
25524
  // Applies the 'urgent' class to the view element
25851
25525
  import Component from '@ember/component';
25852
25526
  Component.extend({
@@ -25854,9 +25528,9 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25854
25528
  isUrgent: true
25855
25529
  });
25856
25530
  ```
25857
- If you would like to specify a class that should only be added when the
25531
+ If you would like to specify a class that should only be added when the
25858
25532
  property is false, you can declare a binding like this:
25859
- ```javascript
25533
+ ```javascript
25860
25534
  // Applies the 'disabled' class to the view element
25861
25535
  import Component from '@ember/component';
25862
25536
  Component.extend({
@@ -25864,8 +25538,8 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25864
25538
  isEnabled: false
25865
25539
  });
25866
25540
  ```
25867
- This list of properties is inherited from the component's superclasses as well.
25868
- @property classNameBindings
25541
+ This list of properties is inherited from the component's superclasses as well.
25542
+ @property classNameBindings
25869
25543
  @type Array
25870
25544
  @default []
25871
25545
  @public
@@ -25873,6 +25547,7 @@ define("@ember/-internals/views/lib/mixins/class_names_support", ["exports", "@e
25873
25547
  classNameBindings: EMPTY_ARRAY
25874
25548
  });
25875
25549
 
25550
+ var _default = ClassNamesSupport;
25876
25551
  _exports.default = _default;
25877
25552
  });
25878
25553
  define("@ember/-internals/views/lib/mixins/view_state_support", ["exports", "@ember/-internals/metal"], function (_exports, _metal) {
@@ -25886,7 +25561,7 @@ define("@ember/-internals/views/lib/mixins/view_state_support", ["exports", "@em
25886
25561
  /**
25887
25562
  @module ember
25888
25563
  */
25889
- var _default = _metal.Mixin.create({
25564
+ var ViewStateSupport = _metal.Mixin.create({
25890
25565
  _transitionTo(state) {
25891
25566
  var priorState = this._currentState;
25892
25567
  var currentState = this._currentState = this._states[state];
@@ -25903,6 +25578,7 @@ define("@ember/-internals/views/lib/mixins/view_state_support", ["exports", "@em
25903
25578
 
25904
25579
  });
25905
25580
 
25581
+ var _default = ViewStateSupport;
25906
25582
  _exports.default = _default;
25907
25583
  });
25908
25584
  define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-internals/utils", "@ember/-internals/metal", "@ember/debug", "@ember/-internals/browser-environment", "@ember/-internals/views/lib/system/utils"], function (_exports, _utils, _metal, _debug, _browserEnvironment, _utils2) {
@@ -25917,43 +25593,43 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
25917
25593
  return this;
25918
25594
  }
25919
25595
 
25920
- var mixin = {
25596
+ var ViewMixin = _metal.Mixin.create({
25921
25597
  /**
25922
25598
  A list of properties of the view to apply as attributes. If the property
25923
25599
  is a string value, the value of that string will be applied as the value
25924
25600
  for an attribute of the property's name.
25925
- The following example creates a tag like `<div priority="high" />`.
25926
- ```app/components/my-component.js
25601
+ The following example creates a tag like `<div priority="high" />`.
25602
+ ```app/components/my-component.js
25927
25603
  import Component from '@ember/component';
25928
- export default Component.extend({
25604
+ export default Component.extend({
25929
25605
  attributeBindings: ['priority'],
25930
25606
  priority: 'high'
25931
25607
  });
25932
25608
  ```
25933
- If the value of the property is a Boolean, the attribute is treated as
25609
+ If the value of the property is a Boolean, the attribute is treated as
25934
25610
  an HTML Boolean attribute. It will be present if the property is `true`
25935
25611
  and omitted if the property is `false`.
25936
- The following example creates markup like `<div visible />`.
25937
- ```app/components/my-component.js
25612
+ The following example creates markup like `<div visible />`.
25613
+ ```app/components/my-component.js
25938
25614
  import Component from '@ember/component';
25939
- export default Component.extend({
25615
+ export default Component.extend({
25940
25616
  attributeBindings: ['visible'],
25941
25617
  visible: true
25942
25618
  });
25943
25619
  ```
25944
- If you would prefer to use a custom value instead of the property name,
25620
+ If you would prefer to use a custom value instead of the property name,
25945
25621
  you can create the same markup as the last example with a binding like
25946
25622
  this:
25947
- ```app/components/my-component.js
25623
+ ```app/components/my-component.js
25948
25624
  import Component from '@ember/component';
25949
- export default Component.extend({
25625
+ export default Component.extend({
25950
25626
  attributeBindings: ['isVisible:visible'],
25951
25627
  isVisible: true
25952
25628
  });
25953
25629
  ```
25954
- This list of attributes is inherited from the component's superclasses,
25630
+ This list of attributes is inherited from the component's superclasses,
25955
25631
  as well.
25956
- @property attributeBindings
25632
+ @property attributeBindings
25957
25633
  @type Array
25958
25634
  @default []
25959
25635
  @public
@@ -25967,7 +25643,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
25967
25643
  /**
25968
25644
  Return the nearest ancestor that is an instance of the provided
25969
25645
  class or mixin.
25970
- @method nearestOfType
25646
+ @method nearestOfType
25971
25647
  @param {Class,Mixin} klass Subclass of Ember.View (or Ember.View itself),
25972
25648
  or an instance of Mixin.
25973
25649
  @return Ember.View
@@ -25985,11 +25661,13 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
25985
25661
 
25986
25662
  view = view.parentView;
25987
25663
  }
25664
+
25665
+ return;
25988
25666
  },
25989
25667
 
25990
25668
  /**
25991
25669
  Return the nearest ancestor that has a given property.
25992
- @method nearestWithProperty
25670
+ @method nearestWithProperty
25993
25671
  @param {String} property A property name
25994
25672
  @return Ember.View
25995
25673
  @deprecated use `yield` and contextual components for composition instead.
@@ -26012,13 +25690,13 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26012
25690
  view is already in the DOM or not. If the view is in the DOM, the
26013
25691
  rendering process will be deferred to give bindings a chance
26014
25692
  to synchronize.
26015
- If children were added during the rendering process using `appendChild`,
25693
+ If children were added during the rendering process using `appendChild`,
26016
25694
  `rerender` will remove them, because they will be added again
26017
25695
  if needed by the next `render`.
26018
- In general, if the display of your view changes, you should modify
25696
+ In general, if the display of your view changes, you should modify
26019
25697
  the DOM element directly instead of manually calling `rerender`, which can
26020
25698
  be slow.
26021
- @method rerender
25699
+ @method rerender
26022
25700
  @public
26023
25701
  */
26024
25702
  rerender() {
@@ -26031,7 +25709,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26031
25709
 
26032
25710
  /**
26033
25711
  Returns the current DOM element for the view.
26034
- @property element
25712
+ @property element
26035
25713
  @type DOMElement
26036
25714
  @public
26037
25715
  */
@@ -26047,14 +25725,14 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26047
25725
 
26048
25726
  /**
26049
25727
  Appends the view's element to the specified parent element.
26050
- Note that this method just schedules the view to be appended; the DOM
25728
+ Note that this method just schedules the view to be appended; the DOM
26051
25729
  element will not be appended to the given element until all bindings have
26052
25730
  finished synchronizing.
26053
- This is not typically a function that you will need to call directly when
25731
+ This is not typically a function that you will need to call directly when
26054
25732
  building your application. If you do need to use `appendTo`, be sure that
26055
25733
  the target element you are providing is associated with an `Application`
26056
25734
  and does not have an ancestor element that is associated with an Ember view.
26057
- @method appendTo
25735
+ @method appendTo
26058
25736
  @param {String|DOMElement} A selector, element, HTML string
26059
25737
  @return {Ember.View} receiver
26060
25738
  @private
@@ -26063,14 +25741,15 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26063
25741
  var target;
26064
25742
 
26065
25743
  if (_browserEnvironment.hasDOM) {
25744
+ (true && !(typeof selector === 'string' || selector instanceof Element) && (0, _debug.assert)(`Expected a selector or instance of Element`, typeof selector === 'string' || selector instanceof Element));
26066
25745
  target = typeof selector === 'string' ? document.querySelector(selector) : selector;
26067
25746
  (true && !(target) && (0, _debug.assert)(`You tried to append to (${selector}) but that isn't in the DOM`, target));
26068
25747
  (true && !(!(0, _utils2.matches)(target, '.ember-view')) && (0, _debug.assert)('You cannot append to an existing Ember.View.', !(0, _utils2.matches)(target, '.ember-view')));
26069
25748
  (true && !((() => {
26070
25749
  var node = target.parentNode;
26071
25750
 
26072
- while (node) {
26073
- if (node.nodeType !== 9 && (0, _utils2.matches)(node, '.ember-view')) {
25751
+ while (node instanceof Element) {
25752
+ if ((0, _utils2.matches)(node, '.ember-view')) {
26074
25753
  return false;
26075
25754
  }
26076
25755
 
@@ -26081,8 +25760,8 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26081
25760
  })()) && (0, _debug.assert)('You cannot append to an existing Ember.View.', (() => {
26082
25761
  var node = target.parentNode;
26083
25762
 
26084
- while (node) {
26085
- if (node.nodeType !== 9 && (0, _utils2.matches)(node, '.ember-view')) {
25763
+ while (node instanceof Element) {
25764
+ if ((0, _utils2.matches)(node, '.ember-view')) {
26086
25765
  return false;
26087
25766
  }
26088
25767
 
@@ -26094,8 +25773,10 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26094
25773
  } else {
26095
25774
  target = selector;
26096
25775
  (true && !(typeof target !== 'string') && (0, _debug.assert)(`You tried to append to a selector string (${selector}) in an environment without a DOM`, typeof target !== 'string'));
26097
- (true && !(typeof selector.appendChild === 'function') && (0, _debug.assert)(`You tried to append to a non-Element (${selector}) in an environment without a DOM`, typeof selector.appendChild === 'function'));
26098
- }
25776
+ (true && !(typeof target.appendChild === 'function') && (0, _debug.assert)(`You tried to append to a non-Element (${selector}) in an environment without a DOM`, typeof target.appendChild === 'function'));
25777
+ } // SAFETY: SimpleElement is supposed to be a subset of Element so this _should_ be safe.
25778
+ // However, the types are more specific in some places which necessitates the `as`.
25779
+
26099
25780
 
26100
25781
  this.renderer.appendTo(this, target);
26101
25782
  return this;
@@ -26105,13 +25786,13 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26105
25786
  Appends the view's element to the document body. If the view does
26106
25787
  not have an HTML representation yet
26107
25788
  the element will be generated automatically.
26108
- If your application uses the `rootElement` property, you must append
25789
+ If your application uses the `rootElement` property, you must append
26109
25790
  the view within that element. Rendering views outside of the `rootElement`
26110
25791
  is not supported.
26111
- Note that this method just schedules the view to be appended; the DOM
25792
+ Note that this method just schedules the view to be appended; the DOM
26112
25793
  element will not be appended to the document body until all bindings have
26113
25794
  finished synchronizing.
26114
- @method append
25795
+ @method append
26115
25796
  @return {Ember.View} receiver
26116
25797
  @private
26117
25798
  */
@@ -26122,17 +25803,17 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26122
25803
  /**
26123
25804
  The HTML `id` of the view's element in the DOM. You can provide this
26124
25805
  value yourself but it must be unique (just as in HTML):
26125
- ```handlebars
25806
+ ```handlebars
26126
25807
  {{my-component elementId="a-really-cool-id"}}
26127
25808
  ```
26128
- If not manually set a default value will be provided by the framework.
26129
- Once rendered an element's `elementId` is considered immutable and you
25809
+ If not manually set a default value will be provided by the framework.
25810
+ Once rendered an element's `elementId` is considered immutable and you
26130
25811
  should never change it. If you need to compute a dynamic value for the
26131
25812
  `elementId`, you should do this when the component or element is being
26132
25813
  instantiated:
26133
- ```app/components/my-component.js
25814
+ ```app/components/my-component.js
26134
25815
  import Component from '@ember/component';
26135
- export default Component.extend({
25816
+ export default Component.extend({
26136
25817
  init() {
26137
25818
  this._super(...arguments);
26138
25819
  let index = this.get('index');
@@ -26140,7 +25821,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26140
25821
  }
26141
25822
  });
26142
25823
  ```
26143
- @property elementId
25824
+ @property elementId
26144
25825
  @type String
26145
25826
  @public
26146
25827
  */
@@ -26148,7 +25829,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26148
25829
 
26149
25830
  /**
26150
25831
  Called when a view is going to insert an element into the DOM.
26151
- @event willInsertElement
25832
+ @event willInsertElement
26152
25833
  @public
26153
25834
  */
26154
25835
  willInsertElement: K,
@@ -26157,9 +25838,9 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26157
25838
  Called when the element of the view has been inserted into the DOM.
26158
25839
  Override this function to do any set up that requires an element
26159
25840
  in the document body.
26160
- When a view has children, didInsertElement will be called on the
25841
+ When a view has children, didInsertElement will be called on the
26161
25842
  child view(s) first and on itself afterwards.
26162
- @event didInsertElement
25843
+ @event didInsertElement
26163
25844
  @public
26164
25845
  */
26165
25846
  didInsertElement: K,
@@ -26168,7 +25849,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26168
25849
  Called when the view is about to rerender, but before anything has
26169
25850
  been torn down. This is a good opportunity to tear down any manual
26170
25851
  observers you have installed based on the DOM state
26171
- @event willClearRender
25852
+ @event willClearRender
26172
25853
  @public
26173
25854
  */
26174
25855
  willClearRender: K,
@@ -26178,7 +25859,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26178
25859
  child views). This will remove the view from any parent node, then make
26179
25860
  sure that the DOM element managed by the view can be released by the
26180
25861
  memory manager.
26181
- @method destroy
25862
+ @method destroy
26182
25863
  @private
26183
25864
  */
26184
25865
  destroy() {
@@ -26191,23 +25872,23 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26191
25872
  Called when the element of the view is going to be destroyed. Override
26192
25873
  this function to do any teardown that requires an element, like removing
26193
25874
  event listeners.
26194
- Please note: any property changes made during this event will have no
25875
+ Please note: any property changes made during this event will have no
26195
25876
  effect on object observers.
26196
- @event willDestroyElement
25877
+ @event willDestroyElement
26197
25878
  @public
26198
25879
  */
26199
25880
  willDestroyElement: K,
26200
25881
 
26201
25882
  /**
26202
25883
  Called after the element of the view is destroyed.
26203
- @event willDestroyElement
25884
+ @event willDestroyElement
26204
25885
  @public
26205
25886
  */
26206
25887
  didDestroyElement: K,
26207
25888
 
26208
25889
  /**
26209
25890
  Called when the parentView property has changed.
26210
- @event parentViewDidChange
25891
+ @event parentViewDidChange
26211
25892
  @private
26212
25893
  */
26213
25894
  parentViewDidChange: K,
@@ -26219,13 +25900,13 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26219
25900
  Tag name for the view's outer element. The tag name is only used when an
26220
25901
  element is first created. If you change the `tagName` for an element, you
26221
25902
  must destroy and recreate the view element.
26222
- By default, the render buffer will use a `<div>` tag for views.
26223
- If the tagName is `''`, the view will be tagless, with no outer element.
25903
+ By default, the render buffer will use a `<div>` tag for views.
25904
+ If the tagName is `''`, the view will be tagless, with no outer element.
26224
25905
  Component properties that depend on the presence of an outer element, such
26225
25906
  as `classNameBindings` and `attributeBindings`, do not work with tagless
26226
25907
  components. Tagless components cannot implement methods to handle events,
26227
25908
  and their `element` property has a `null` value.
26228
- @property tagName
25909
+ @property tagName
26229
25910
  @type String
26230
25911
  @default null
26231
25912
  @public
@@ -26240,10 +25921,10 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26240
25921
 
26241
25922
  /**
26242
25923
  Setup a view, but do not finish waking it up.
26243
- * configure `childViews`
25924
+ * configure `childViews`
26244
25925
  * register the view with the global views hash, which is used for event
26245
25926
  dispatch
26246
- @method init
25927
+ @method init
26247
25928
  @private
26248
25929
  */
26249
25930
  init() {
@@ -26265,7 +25946,7 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26265
25946
 
26266
25947
  /**
26267
25948
  Handle events from `EventDispatcher`
26268
- @method handleEvent
25949
+ @method handleEvent
26269
25950
  @param eventName {String}
26270
25951
  @param evt {Event}
26271
25952
  @private
@@ -26274,15 +25955,9 @@ define("@ember/-internals/views/lib/mixins/view_support", ["exports", "@ember/-i
26274
25955
  return this._currentState.handleEvent(this, eventName, evt);
26275
25956
  }
26276
25957
 
26277
- };
26278
- /**
26279
- @class ViewMixin
26280
- @namespace Ember
26281
- @private
26282
- */
26283
-
26284
- var _default = _metal.Mixin.create(mixin);
25958
+ });
26285
25959
 
25960
+ var _default = ViewMixin;
26286
25961
  _exports.default = _default;
26287
25962
  });
26288
25963
  define("@ember/-internals/views/lib/system/action_manager", ["exports"], function (_exports) {
@@ -26333,146 +26008,149 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26333
26008
  @extends Ember.Object
26334
26009
  */
26335
26010
 
26336
- var _default = _runtime.Object.extend({
26337
- /**
26338
- The set of events names (and associated handler function names) to be setup
26339
- and dispatched by the `EventDispatcher`. Modifications to this list can be done
26340
- at setup time, generally via the `Application.customEvents` hash.
26341
- To add new events to be listened to:
26342
- ```javascript
26343
- import Application from '@ember/application';
26344
- let App = Application.create({
26345
- customEvents: {
26346
- paste: 'paste'
26347
- }
26348
- });
26349
- ```
26350
- To prevent default events from being listened to:
26351
- ```javascript
26352
- import Application from '@ember/application';
26353
- let App = Application.create({
26354
- customEvents: {
26355
- mouseenter: null,
26356
- mouseleave: null
26357
- }
26358
- });
26359
- ```
26360
- @property events
26361
- @type Object
26362
- @private
26363
- */
26364
- events: {
26365
- touchstart: 'touchStart',
26366
- touchmove: 'touchMove',
26367
- touchend: 'touchEnd',
26368
- touchcancel: 'touchCancel',
26369
- keydown: 'keyDown',
26370
- keyup: 'keyUp',
26371
- keypress: 'keyPress',
26372
- mousedown: 'mouseDown',
26373
- mouseup: 'mouseUp',
26374
- contextmenu: 'contextMenu',
26375
- click: 'click',
26376
- dblclick: 'doubleClick',
26377
- focusin: 'focusIn',
26378
- focusout: 'focusOut',
26379
- submit: 'submit',
26380
- input: 'input',
26381
- change: 'change',
26382
- dragstart: 'dragStart',
26383
- drag: 'drag',
26384
- dragenter: 'dragEnter',
26385
- dragleave: 'dragLeave',
26386
- dragover: 'dragOver',
26387
- drop: 'drop',
26388
- dragend: 'dragEnd'
26389
- },
26390
-
26391
- /**
26392
- The root DOM element to which event listeners should be attached. Event
26393
- listeners will be attached to the document unless this is overridden.
26394
- Can be specified as a DOMElement or a selector string.
26395
- The default body is a string since this may be evaluated before document.body
26396
- exists in the DOM.
26397
- @private
26398
- @property rootElement
26399
- @type DOMElement
26400
- @default 'body'
26401
- */
26402
- rootElement: 'body',
26011
+ class EventDispatcher extends _runtime.Object {
26012
+ constructor() {
26013
+ super(...arguments);
26014
+ /**
26015
+ The set of events names (and associated handler function names) to be setup
26016
+ and dispatched by the `EventDispatcher`. Modifications to this list can be done
26017
+ at setup time, generally via the `Application.customEvents` hash.
26018
+ To add new events to be listened to:
26019
+ ```javascript
26020
+ import Application from '@ember/application';
26021
+ let App = Application.create({
26022
+ customEvents: {
26023
+ paste: 'paste'
26024
+ }
26025
+ });
26026
+ ```
26027
+ To prevent default events from being listened to:
26028
+ ```javascript
26029
+ import Application from '@ember/application';
26030
+ let App = Application.create({
26031
+ customEvents: {
26032
+ mouseenter: null,
26033
+ mouseleave: null
26034
+ }
26035
+ });
26036
+ ```
26037
+ @property events
26038
+ @type Object
26039
+ @private
26040
+ */
26403
26041
 
26404
- init() {
26405
- this._super();
26042
+ this.events = {
26043
+ touchstart: 'touchStart',
26044
+ touchmove: 'touchMove',
26045
+ touchend: 'touchEnd',
26046
+ touchcancel: 'touchCancel',
26047
+ keydown: 'keyDown',
26048
+ keyup: 'keyUp',
26049
+ keypress: 'keyPress',
26050
+ mousedown: 'mouseDown',
26051
+ mouseup: 'mouseUp',
26052
+ contextmenu: 'contextMenu',
26053
+ click: 'click',
26054
+ dblclick: 'doubleClick',
26055
+ focusin: 'focusIn',
26056
+ focusout: 'focusOut',
26057
+ submit: 'submit',
26058
+ input: 'input',
26059
+ change: 'change',
26060
+ dragstart: 'dragStart',
26061
+ drag: 'drag',
26062
+ dragenter: 'dragEnter',
26063
+ dragleave: 'dragLeave',
26064
+ dragover: 'dragOver',
26065
+ drop: 'drop',
26066
+ dragend: 'dragEnd'
26067
+ };
26068
+ /**
26069
+ The root DOM element to which event listeners should be attached. Event
26070
+ listeners will be attached to the document unless this is overridden.
26071
+ Can be specified as a DOMElement or a selector string.
26072
+ The default body is a string since this may be evaluated before document.body
26073
+ exists in the DOM.
26074
+ @private
26075
+ @property rootElement
26076
+ @type DOMElement
26077
+ @default 'body'
26078
+ */
26406
26079
 
26080
+ this.rootElement = 'body';
26407
26081
  this._eventHandlers = Object.create(null);
26408
26082
  this._didSetup = false;
26409
26083
  this.finalEventNameMapping = null;
26410
26084
  this._sanitizedRootElement = null;
26411
26085
  this.lazyEvents = new Map();
26412
- },
26413
-
26086
+ this._reverseEventNameMapping = null;
26087
+ }
26414
26088
  /**
26415
26089
  Sets up event listeners for standard browser events.
26416
- This will be called after the browser sends a `DOMContentReady` event. By
26090
+ This will be called after the browser sends a `DOMContentReady` event. By
26417
26091
  default, it will set up all of the listeners on the document body. If you
26418
26092
  would like to register the listeners on a different element, set the event
26419
26093
  dispatcher's `root` property.
26420
- @private
26094
+ @private
26421
26095
  @method setup
26422
26096
  @param addedEvents {Object}
26423
26097
  */
26098
+
26099
+
26424
26100
  setup(addedEvents, _rootElement) {
26101
+ var _a;
26102
+
26425
26103
  (true && !((() => {
26426
26104
  var owner = (0, _owner.getOwner)(this);
26105
+ (true && !(owner) && (0, _debug.assert)('[BUG] Missing owner', owner)); // SAFETY: This is not guaranteed to be safe, but this is what we expect to be returned.
26106
+
26427
26107
  var environment = owner.lookup('-environment:main');
26428
26108
  return environment.isInteractive;
26429
26109
  })()) && (0, _debug.assert)('EventDispatcher should never be setup in fastboot mode. Please report this as an Ember bug.', (() => {
26430
26110
  var owner = (0, _owner.getOwner)(this);
26111
+ (true && !(owner) && (0, _debug.assert)('[BUG] Missing owner', owner));
26431
26112
  var environment = owner.lookup('-environment:main');
26432
26113
  return environment.isInteractive;
26433
26114
  })()));
26434
- var events = this.finalEventNameMapping = Object.assign({}, (0, _metal.get)(this, 'events'), addedEvents);
26435
- this._reverseEventNameMapping = Object.keys(events).reduce((result, key) => Object.assign(result, {
26436
- [events[key]]: key
26437
- }), {});
26115
+ var events = this.finalEventNameMapping = Object.assign(Object.assign({}, (0, _metal.get)(this, 'events')), addedEvents);
26116
+ this._reverseEventNameMapping = Object.keys(events).reduce((result, key) => {
26117
+ var eventName = events[key];
26118
+ return eventName ? Object.assign(Object.assign({}, result), {
26119
+ [eventName]: key
26120
+ }) : result;
26121
+ }, {});
26438
26122
  var lazyEvents = this.lazyEvents;
26439
26123
 
26440
26124
  if (_rootElement !== undefined && _rootElement !== null) {
26441
26125
  (0, _metal.set)(this, 'rootElement', _rootElement);
26442
26126
  }
26443
26127
 
26444
- var rootElementSelector = (0, _metal.get)(this, 'rootElement');
26445
- var rootElement;
26446
-
26447
- if (typeof rootElementSelector !== 'string') {
26448
- rootElement = rootElementSelector;
26449
- } else {
26450
- rootElement = document.querySelector(rootElementSelector);
26451
- }
26452
-
26453
- (true && !(!rootElement.classList.contains(ROOT_ELEMENT_CLASS)) && (0, _debug.assert)(`You cannot use the same root element (${(0, _metal.get)(this, 'rootElement') || rootElement.tagName}) multiple times in an Ember.Application`, !rootElement.classList.contains(ROOT_ELEMENT_CLASS)));
26128
+ var specifiedRootElement = (0, _metal.get)(this, 'rootElement');
26129
+ var rootElement = typeof specifiedRootElement !== 'string' ? specifiedRootElement : document.querySelector(specifiedRootElement);
26130
+ (true && !(rootElement) && (0, _debug.assert)(`Could not find rootElement (${specifiedRootElement})`, rootElement));
26131
+ (true && !(!rootElement.classList.contains(ROOT_ELEMENT_CLASS)) && (0, _debug.assert)(`You cannot use the same root element (${specifiedRootElement}) multiple times in an Ember.Application`, !rootElement.classList.contains(ROOT_ELEMENT_CLASS)));
26454
26132
  (true && !((() => {
26455
26133
  var target = rootElement.parentNode;
26456
26134
 
26457
- do {
26135
+ while (target instanceof Element) {
26458
26136
  if (target.classList.contains(ROOT_ELEMENT_CLASS)) {
26459
26137
  return false;
26460
26138
  }
26461
26139
 
26462
26140
  target = target.parentNode;
26463
- } while (target && target.nodeType === 1);
26141
+ }
26464
26142
 
26465
26143
  return true;
26466
26144
  })()) && (0, _debug.assert)('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', (() => {
26467
26145
  var target = rootElement.parentNode;
26468
26146
 
26469
- do {
26147
+ while (target instanceof Element) {
26470
26148
  if (target.classList.contains(ROOT_ELEMENT_CLASS)) {
26471
26149
  return false;
26472
26150
  }
26473
26151
 
26474
26152
  target = target.parentNode;
26475
- } while (target && target.nodeType === 1);
26153
+ }
26476
26154
 
26477
26155
  return true;
26478
26156
  })()));
@@ -26484,55 +26162,72 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26484
26162
 
26485
26163
  for (var event in events) {
26486
26164
  if (Object.prototype.hasOwnProperty.call(events, event)) {
26487
- lazyEvents.set(event, events[event]);
26165
+ lazyEvents.set(event, (_a = events[event]) !== null && _a !== void 0 ? _a : null);
26488
26166
  }
26489
26167
  }
26490
26168
 
26491
26169
  this._didSetup = true;
26492
- },
26493
-
26170
+ }
26494
26171
  /**
26495
26172
  Setup event listeners for the given browser event name
26496
- @private
26173
+ @private
26497
26174
  @method setupHandlerForBrowserEvent
26498
26175
  @param event the name of the event in the browser
26499
26176
  */
26177
+
26178
+
26500
26179
  setupHandlerForBrowserEvent(event) {
26501
- this.setupHandler(this._sanitizedRootElement, event, this.finalEventNameMapping[event]);
26502
- },
26180
+ var _a;
26503
26181
 
26182
+ (true && !(this.finalEventNameMapping) && (0, _debug.assert)('[BUG] Expected finalEventNameMapping to be set', this.finalEventNameMapping));
26183
+ (true && !(this._sanitizedRootElement) && (0, _debug.assert)('[BUG] Expected _santizedRootElement to be set', this._sanitizedRootElement));
26184
+ this.setupHandler(this._sanitizedRootElement, event, (_a = this.finalEventNameMapping[event]) !== null && _a !== void 0 ? _a : null);
26185
+ }
26504
26186
  /**
26505
26187
  Setup event listeners for the given Ember event name (camel case)
26506
- @private
26188
+ @private
26507
26189
  @method setupHandlerForEmberEvent
26508
26190
  @param eventName
26509
26191
  */
26192
+
26193
+
26510
26194
  setupHandlerForEmberEvent(eventName) {
26511
- this.setupHandler(this._sanitizedRootElement, this._reverseEventNameMapping[eventName], eventName);
26512
- },
26195
+ var _a;
26513
26196
 
26197
+ (true && !(this._sanitizedRootElement) && (0, _debug.assert)('[BUG] Expected _sanitizedRootElement to be set', this._sanitizedRootElement));
26198
+ var event = (_a = this._reverseEventNameMapping) === null || _a === void 0 ? void 0 : _a[eventName];
26199
+
26200
+ if (event) {
26201
+ this.setupHandler(this._sanitizedRootElement, event, eventName);
26202
+ }
26203
+ }
26514
26204
  /**
26515
26205
  Registers an event listener on the rootElement. If the given event is
26516
26206
  triggered, the provided event handler will be triggered on the target view.
26517
- If the target view does not implement the event handler, or if the handler
26207
+ If the target view does not implement the event handler, or if the handler
26518
26208
  returns `false`, the parent view will be called. The event will continue to
26519
26209
  bubble to each successive parent view until it reaches the top.
26520
- @private
26210
+ @private
26521
26211
  @method setupHandler
26522
26212
  @param {Element} rootElement
26523
26213
  @param {String} event the name of the event in the browser
26524
26214
  @param {String} eventName the name of the method to call on the view
26525
26215
  */
26216
+
26217
+
26526
26218
  setupHandler(rootElement, event, eventName) {
26527
26219
  if (eventName === null || !this.lazyEvents.has(event)) {
26528
26220
  return; // nothing to do
26529
26221
  }
26530
26222
 
26531
26223
  var viewHandler = (target, event) => {
26224
+ // SAFETY: SimpleElement is supposed to be a subset of Element so this _should_ be safe.
26225
+ // However, the types are more specific in some places which necessitates the `as`.
26532
26226
  var view = (0, _views.getElementView)(target);
26533
26227
  var result = true;
26534
26228
 
26535
26229
  if (view) {
26230
+ // SAFETY: As currently written, this is not safe. Though it seems to always be true.
26536
26231
  result = view.handleEvent(eventName, event);
26537
26232
  }
26538
26233
 
@@ -26541,41 +26236,48 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26541
26236
 
26542
26237
  var actionHandler = (target, event) => {
26543
26238
  var actionId = target.getAttribute('data-ember-action');
26544
- var actions = _action_manager.default.registeredActions[actionId]; // In Glimmer2 this attribute is set to an empty string and an additional
26239
+ var actions; // In Glimmer2 this attribute is set to an empty string and an additional
26545
26240
  // attribute it set for each action on a given element. In this case, the
26546
26241
  // attributes need to be read so that a proper set of action handlers can
26547
26242
  // be coalesced.
26548
26243
 
26549
26244
  if (actionId === '') {
26550
- var attributes = target.attributes;
26551
- var attributeCount = attributes.length;
26552
26245
  actions = [];
26553
26246
 
26554
- for (var i = 0; i < attributeCount; i++) {
26555
- var attr = attributes.item(i);
26247
+ for (var attr of target.attributes) {
26556
26248
  var attrName = attr.name;
26557
26249
 
26558
26250
  if (attrName.indexOf('data-ember-action-') === 0) {
26559
- actions = actions.concat(_action_manager.default.registeredActions[attr.value]);
26251
+ var action = _action_manager.default.registeredActions[attr.value];
26252
+ (true && !(action) && (0, _debug.assert)('[BUG] Missing action', action));
26253
+ actions.push(action);
26560
26254
  }
26561
26255
  }
26256
+ } else if (actionId) {
26257
+ // FIXME: This branch is never called in tests. Improve tests or remove
26258
+ var actionState = _action_manager.default.registeredActions[actionId];
26259
+
26260
+ if (actionState) {
26261
+ actions = [actionState];
26262
+ }
26562
26263
  } // We have to check for actions here since in some cases, jQuery will trigger
26563
26264
  // an event on `removeChild` (i.e. focusout) after we've already torn down the
26564
26265
  // action handlers for the view.
26565
26266
 
26566
26267
 
26567
26268
  if (!actions) {
26269
+ // FIXME: This branch is never called in tests. Improve tests or remove
26568
26270
  return;
26569
26271
  }
26570
26272
 
26571
26273
  var result = true;
26572
26274
 
26573
26275
  for (var index = 0; index < actions.length; index++) {
26574
- var action = actions[index];
26276
+ var _action = actions[index];
26575
26277
 
26576
- if (action && action.eventName === eventName) {
26278
+ if (_action && _action.eventName === eventName) {
26577
26279
  // return false if any of the action handlers returns false
26578
- result = action.handler(event) && result;
26280
+ result = _action.handler(event) && result;
26579
26281
  }
26580
26282
  }
26581
26283
 
@@ -26584,8 +26286,11 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26584
26286
 
26585
26287
  var handleEvent = this._eventHandlers[event] = event => {
26586
26288
  var target = event.target;
26289
+ (true && !(target instanceof Element) && (0, _debug.assert)(`[BUG] Received event without an Element target: ${event.type}, ${target}`, target instanceof Element));
26587
26290
 
26588
26291
  do {
26292
+ // SAFETY: SimpleElement is supposed to be a subset of Element so this _should_ be safe.
26293
+ // However, the types are more specific in some places which necessitates the `as`.
26589
26294
  if ((0, _views.getElementView)(target)) {
26590
26295
  if (viewHandler(target, event) === false) {
26591
26296
  event.preventDefault();
@@ -26601,26 +26306,19 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26601
26306
  }
26602
26307
 
26603
26308
  target = target.parentNode;
26604
- } while (target && target.nodeType === 1);
26309
+ } while (target instanceof Element);
26605
26310
  };
26606
26311
 
26607
26312
  rootElement.addEventListener(event, handleEvent);
26608
26313
  this.lazyEvents.delete(event);
26609
- },
26314
+ }
26610
26315
 
26611
26316
  destroy() {
26612
26317
  if (this._didSetup === false) {
26613
26318
  return;
26614
26319
  }
26615
26320
 
26616
- var rootElementSelector = (0, _metal.get)(this, 'rootElement');
26617
- var rootElement;
26618
-
26619
- if (rootElementSelector.nodeType) {
26620
- rootElement = rootElementSelector;
26621
- } else {
26622
- rootElement = document.querySelector(rootElementSelector);
26623
- }
26321
+ var rootElement = this._sanitizedRootElement;
26624
26322
 
26625
26323
  if (!rootElement) {
26626
26324
  return;
@@ -26632,15 +26330,15 @@ define("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
26632
26330
 
26633
26331
  rootElement.classList.remove(ROOT_ELEMENT_CLASS);
26634
26332
  return this._super(...arguments);
26635
- },
26333
+ }
26636
26334
 
26637
26335
  toString() {
26638
26336
  return '(EventDispatcher)';
26639
26337
  }
26640
26338
 
26641
- });
26339
+ }
26642
26340
 
26643
- _exports.default = _default;
26341
+ _exports.default = EventDispatcher;
26644
26342
  });
26645
26343
  define("@ember/-internals/views/lib/system/utils", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug"], function (_exports, _owner, _utils, _debug) {
26646
26344
  "use strict";
@@ -26873,7 +26571,7 @@ define("@ember/-internals/views/lib/system/utils", ["exports", "@ember/-internal
26873
26571
  */
26874
26572
 
26875
26573
 
26876
- var elMatches = typeof Element !== 'undefined' ? Element.prototype.matches || Element.prototype['matchesSelector'] || Element.prototype['mozMatchesSelector'] || Element.prototype['msMatchesSelector'] || Element.prototype['oMatchesSelector'] || Element.prototype['webkitMatchesSelector'] : undefined;
26574
+ var elMatches = typeof Element !== 'undefined' ? Element.prototype.matches : undefined;
26877
26575
  _exports.elMatches = elMatches;
26878
26576
 
26879
26577
  function matches(el, selector) {
@@ -27051,7 +26749,7 @@ define("@ember/-internals/views/lib/views/states/destroying", ["exports", "@embe
27051
26749
  value: true
27052
26750
  });
27053
26751
  _exports.default = void 0;
27054
- var destroying = Object.assign({}, _default3.default, {
26752
+ var destroying = Object.assign(Object.assign({}, _default3.default), {
27055
26753
  appendChild() {
27056
26754
  throw new _error.default("You can't call appendChild on a view being destroyed");
27057
26755
  },
@@ -27073,9 +26771,9 @@ define("@ember/-internals/views/lib/views/states/has_element", ["exports", "@emb
27073
26771
  value: true
27074
26772
  });
27075
26773
  _exports.default = void 0;
27076
- var hasElement = Object.assign({}, _default3.default, {
26774
+ var hasElement = Object.assign(Object.assign({}, _default3.default), {
27077
26775
  rerender(view) {
27078
- view.renderer.rerender(view);
26776
+ view.renderer.rerender();
27079
26777
  },
27080
26778
 
27081
26779
  destroy(view) {
@@ -27104,14 +26802,14 @@ define("@ember/-internals/views/lib/views/states/has_element", ["exports", "@emb
27104
26802
 
27105
26803
  _exports.default = _default2;
27106
26804
  });
27107
- define("@ember/-internals/views/lib/views/states/in_dom", ["exports", "@ember/-internals/utils", "@ember/error", "@ember/-internals/views/lib/views/states/has_element"], function (_exports, _utils, _error, _has_element) {
26805
+ define("@ember/-internals/views/lib/views/states/in_dom", ["exports", "@ember/-internals/utils", "@ember/debug", "@ember/error", "@ember/-internals/views/lib/views/states/has_element"], function (_exports, _utils, _debug, _error, _has_element) {
27108
26806
  "use strict";
27109
26807
 
27110
26808
  Object.defineProperty(_exports, "__esModule", {
27111
26809
  value: true
27112
26810
  });
27113
26811
  _exports.default = void 0;
27114
- var inDOM = Object.assign({}, _has_element.default, {
26812
+ var inDOM = Object.assign(Object.assign({}, _has_element.default), {
27115
26813
  enter(view) {
27116
26814
  // Register the view for event handling. This hash is used by
27117
26815
  // Ember.EventDispatcher to dispatch incoming events.
@@ -27121,6 +26819,7 @@ define("@ember/-internals/views/lib/views/states/in_dom", ["exports", "@ember/-i
27121
26819
  /* DEBUG */
27122
26820
  ) {
27123
26821
  var elementId = view.elementId;
26822
+ (true && !(_utils.teardownMandatorySetter) && (0, _debug.assert)('[BUG] Expected teardownMandatorySetter to be set in DEBUG mode', teardownMandatorySetter));
27124
26823
  (0, _utils.teardownMandatorySetter)(view, 'elementId');
27125
26824
  Object.defineProperty(view, 'elementId', {
27126
26825
  configurable: true,
@@ -27389,6 +27088,7 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
27389
27088
  var applicationCustomEvents = (0, _metal.get)(this.application, 'customEvents');
27390
27089
  var instanceCustomEvents = (0, _metal.get)(this, 'customEvents');
27391
27090
  var customEvents = Object.assign({}, applicationCustomEvents, instanceCustomEvents);
27091
+ (true && !(this.rootElement === null || typeof this.rootElement === 'string' || this.rootElement instanceof Element) && (0, _debug.assert)('[BUG] Tried to set up dispatcher with an invalid root element', this.rootElement === null || typeof this.rootElement === 'string' || this.rootElement instanceof Element));
27392
27092
  dispatcher.setup(customEvents, this.rootElement);
27393
27093
  return dispatcher;
27394
27094
  }
@@ -27921,11 +27621,20 @@ define("@ember/application/lib/application", ["exports", "@ember/-internals/util
27921
27621
 
27922
27622
 
27923
27623
  waitForDOMReady() {
27924
- var document = this._document;
27624
+ var document = this._document; // SAFETY: Casting as Document should be safe since we're just reading a property.
27625
+ // If it's not actually a Document then it will evaluate false which is fine for our
27626
+ // purposes.
27925
27627
 
27926
27628
  if (document === null || document.readyState !== 'loading') {
27927
27629
  (0, _runloop.schedule)('actions', this, this.domReady);
27928
27630
  } else {
27631
+ // Ideally we'd just check `document instanceof Document` but currently some tests pass a fake document.
27632
+ (true && !(function (d) {
27633
+ return typeof d.removeEventListener === 'function';
27634
+ }(document)) && (0, _debug.assert)('[BUG] Called waitForDOMReady with an invalid document', function (d) {
27635
+ return typeof d.removeEventListener === 'function';
27636
+ }(document)));
27637
+
27929
27638
  var callback = () => {
27930
27639
  document.removeEventListener('DOMContentLoaded', callback);
27931
27640
  (0, _runloop.run)(this, this.domReady);
@@ -28626,8 +28335,8 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
28626
28335
  @public
28627
28336
  */
28628
28337
  var DEFAULT_FEATURES = {
28629
- EMBER_LIBRARIES_ISREGISTERED: null,
28630
- EMBER_IMPROVED_INSTRUMENTATION: null,
28338
+ EMBER_LIBRARIES_ISREGISTERED: false,
28339
+ EMBER_IMPROVED_INSTRUMENTATION: false,
28631
28340
  EMBER_UNIQUE_ID_HELPER: true,
28632
28341
  EMBER_DEFAULT_HELPER_MANAGER: true
28633
28342
  };
@@ -30582,19 +30291,16 @@ define("@ember/engine/instance", ["exports", "@ember/-internals/runtime", "@embe
30582
30291
  var _default = EngineInstance;
30583
30292
  _exports.default = _default;
30584
30293
  });
30585
- define("@ember/engine/lib/engine-parent", ["exports", "@ember/-internals/utils"], function (_exports, _utils) {
30294
+ define("@ember/engine/lib/engine-parent", ["exports"], function (_exports) {
30586
30295
  "use strict";
30587
30296
 
30588
30297
  Object.defineProperty(_exports, "__esModule", {
30589
30298
  value: true
30590
30299
  });
30300
+ _exports.ENGINE_PARENT = void 0;
30591
30301
  _exports.getEngineParent = getEngineParent;
30592
30302
  _exports.setEngineParent = setEngineParent;
30593
-
30594
- /**
30595
- @module @ember/engine
30596
- */
30597
- var ENGINE_PARENT = (0, _utils.symbol)('ENGINE_PARENT');
30303
+ var ENGINE_PARENT = Symbol('ENGINE_PARENT');
30598
30304
  /**
30599
30305
  `getEngineParent` retrieves an engine instance's parent instance.
30600
30306
 
@@ -30606,6 +30312,8 @@ define("@ember/engine/lib/engine-parent", ["exports", "@ember/-internals/utils"]
30606
30312
  @private
30607
30313
  */
30608
30314
 
30315
+ _exports.ENGINE_PARENT = ENGINE_PARENT;
30316
+
30609
30317
  function getEngineParent(engine) {
30610
30318
  return engine[ENGINE_PARENT];
30611
30319
  }
@@ -33679,6 +33387,19 @@ define("@ember/polyfills/lib/assign", ["exports", "@ember/debug"], function (_ex
33679
33387
  return Object.assign(target, ...rest);
33680
33388
  }
33681
33389
  });
33390
+ define("@ember/renderer/index", ["exports", "@ember/-internals/glimmer"], function (_exports, _glimmer) {
33391
+ "use strict";
33392
+
33393
+ Object.defineProperty(_exports, "__esModule", {
33394
+ value: true
33395
+ });
33396
+ Object.defineProperty(_exports, "renderSettled", {
33397
+ enumerable: true,
33398
+ get: function () {
33399
+ return _glimmer.renderSettled;
33400
+ }
33401
+ });
33402
+ });
33682
33403
  define("@ember/routing/auto-location", ["exports", "@ember/-internals/routing"], function (_exports, _routing) {
33683
33404
  "use strict";
33684
33405
 
@@ -54695,7 +54416,7 @@ define("ember/version", ["exports"], function (_exports) {
54695
54416
  value: true
54696
54417
  });
54697
54418
  _exports.default = void 0;
54698
- var _default = "4.5.0-alpha.4";
54419
+ var _default = "4.5.0-beta.2";
54699
54420
  _exports.default = _default;
54700
54421
  });
54701
54422
  define("route-recognizer", ["exports"], function (_exports) {