ember-source 2.18.2 → 3.0.0.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,19 @@
1
1
  (function() {
2
2
  /*!
3
3
  * @overview Ember - JavaScript Application Framework
4
- * @copyright Copyright 2011-2017 Tilde Inc. and contributors
4
+ * @copyright Copyright 2011-2018 Tilde Inc. and contributors
5
5
  * Portions Copyright 2006-2011 Strobe Inc.
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 2.18.2
9
+ * @version 3.0.0-beta.1
10
10
  */
11
11
 
12
- /*global process */
12
+ /*globals process */
13
13
  var enifed, requireModule, Ember;
14
- var mainContext = this; // Used in ember-environment/lib/global.js
14
+
15
+ // Used in ember-environment/lib/global.js
16
+ mainContext = this; // eslint-disable-line no-undef
15
17
 
16
18
  (function() {
17
19
  function missingModule(name, referrerName) {
@@ -4635,7 +4637,7 @@ enifed('backburner', ['exports'], function (exports) {
4635
4637
 
4636
4638
 
4637
4639
  this._queueBeingFlushed = [];
4638
- this.targetQueues = Object.create(null);
4640
+ this.targetQueues = new Map();
4639
4641
  this.index = 0;
4640
4642
  this._queue = [];
4641
4643
  this.name = name;
@@ -4652,20 +4654,6 @@ enifed('backburner', ['exports'], function (exports) {
4652
4654
  };
4653
4655
  };
4654
4656
 
4655
- Queue.prototype.pushUnique = function (target, method, args, stack) {
4656
- var guid = this.guidForTarget(target);
4657
- if (guid) {
4658
- this.pushUniqueWithGuid(guid, target, method, args, stack);
4659
- } else {
4660
- this.pushUniqueWithoutGuid(target, method, args, stack);
4661
- }
4662
- return {
4663
- queue: this,
4664
- target: target,
4665
- method: method
4666
- };
4667
- };
4668
-
4669
4657
  Queue.prototype.flush = function (sync) {
4670
4658
  var _options = this.options,
4671
4659
  before = _options.before,
@@ -4677,7 +4665,7 @@ enifed('backburner', ['exports'], function (exports) {
4677
4665
  var method = void 0;
4678
4666
  var args = void 0;
4679
4667
  var errorRecordedForStack = void 0;
4680
- this.targetQueues = Object.create(null);
4668
+ this.targetQueues.clear();
4681
4669
  if (this._queueBeingFlushed.length === 0) {
4682
4670
  this._queueBeingFlushed = this._queue;
4683
4671
  this._queue = [];
@@ -4738,26 +4726,20 @@ enifed('backburner', ['exports'], function (exports) {
4738
4726
 
4739
4727
  Queue.prototype.cancel = function (_ref) {
4740
4728
  var target = _ref.target,
4741
- method = _ref.method,
4742
- t,
4743
- i,
4744
- l;
4729
+ method = _ref.method;
4745
4730
 
4746
4731
  var queue = this._queue;
4747
- var guid = this.guidForTarget(target);
4748
- var targetQueue = guid ? this.targetQueues[guid] : undefined;
4749
- if (targetQueue !== undefined) {
4750
- t = void 0;
4751
-
4752
- for (i = 0, l = targetQueue.length; i < l; i += 2) {
4753
- t = targetQueue[i];
4754
- if (t === method) {
4755
- targetQueue.splice(i, 2);
4756
- break;
4757
- }
4732
+ var targetQueueMap = this.targetQueues.get(target);
4733
+ var index = void 0;
4734
+ if (targetQueueMap !== undefined) {
4735
+ index = targetQueueMap.get(method);
4736
+ if (index !== undefined) {
4737
+ targetQueueMap.delete(method);
4758
4738
  }
4759
4739
  }
4760
- var index = findItem(target, method, queue);
4740
+ if (index === undefined) {
4741
+ index = findItem(target, method, queue);
4742
+ }
4761
4743
  if (index > -1) {
4762
4744
  queue.splice(index, 4);
4763
4745
  return true;
@@ -4773,74 +4755,46 @@ enifed('backburner', ['exports'], function (exports) {
4773
4755
  return false;
4774
4756
  };
4775
4757
 
4776
- Queue.prototype.guidForTarget = function (target) {
4777
- if (!target) {
4778
- return;
4779
- }
4780
- var peekGuid = this.globalOptions.peekGuid;
4781
- if (peekGuid) {
4782
- return peekGuid(target);
4783
- }
4784
- var KEY = this.globalOptions.GUID_KEY;
4785
- if (KEY) {
4786
- return target[KEY];
4758
+ Queue.prototype.pushUnique = function (target, method, args, stack) {
4759
+ var localQueueMap = this.targetQueues.get(target),
4760
+ queueIndex,
4761
+ queue;
4762
+ if (localQueueMap === undefined) {
4763
+ localQueueMap = new Map();
4764
+ this.targetQueues.set(target, localQueueMap);
4787
4765
  }
4788
- };
4766
+ var index = localQueueMap.get(method);
4767
+ if (index === undefined) {
4768
+ queueIndex = this._queue.push(target, method, args, stack) - 4;
4789
4769
 
4790
- Queue.prototype.pushUniqueWithoutGuid = function (target, method, args, stack) {
4791
- var queue = this._queue;
4792
- var index = findItem(target, method, queue);
4793
- if (index > -1) {
4794
- queue[index + 2] = args; // replace args
4795
- queue[index + 3] = stack; // replace stack
4770
+ localQueueMap.set(method, queueIndex);
4796
4771
  } else {
4797
- queue.push(target, method, args, stack);
4798
- }
4799
- };
4800
-
4801
- Queue.prototype.targetQueue = function (_targetQueue, target, method, args, stack) {
4802
- var queue = this._queue,
4803
- i,
4804
- l,
4805
- currentMethod,
4806
- currentIndex;
4807
- for (i = 0, l = _targetQueue.length; i < l; i += 2) {
4808
- currentMethod = _targetQueue[i];
4809
-
4810
- if (currentMethod === method) {
4811
- currentIndex = _targetQueue[i + 1];
4812
-
4813
- queue[currentIndex + 2] = args; // replace args
4814
- queue[currentIndex + 3] = stack; // replace stack
4815
- return;
4816
- }
4817
- }
4818
- _targetQueue.push(method, queue.push(target, method, args, stack) - 4);
4819
- };
4772
+ queue = this._queue;
4820
4773
 
4821
- Queue.prototype.pushUniqueWithGuid = function (guid, target, method, args, stack) {
4822
- var localQueue = this.targetQueues[guid];
4823
- if (localQueue !== undefined) {
4824
- this.targetQueue(localQueue, target, method, args, stack);
4825
- } else {
4826
- this.targetQueues[guid] = [method, this._queue.push(target, method, args, stack) - 4];
4774
+ queue[index + 2] = args; // replace args
4775
+ queue[index + 3] = stack; // replace stack
4827
4776
  }
4777
+ return {
4778
+ queue: this,
4779
+ target: target,
4780
+ method: method
4781
+ };
4828
4782
  };
4829
4783
 
4830
4784
  Queue.prototype.invoke = function (target, method, args /*, onError, errorRecordedForStack */) {
4831
- if (args !== undefined) {
4832
- method.apply(target, args);
4833
- } else {
4785
+ if (args === undefined) {
4834
4786
  method.call(target);
4787
+ } else {
4788
+ method.apply(target, args);
4835
4789
  }
4836
4790
  };
4837
4791
 
4838
4792
  Queue.prototype.invokeWithOnError = function (target, method, args, onError, errorRecordedForStack) {
4839
4793
  try {
4840
- if (args !== undefined) {
4841
- method.apply(target, args);
4842
- } else {
4794
+ if (args === undefined) {
4843
4795
  method.call(target);
4796
+ } else {
4797
+ method.apply(target, args);
4844
4798
  }
4845
4799
  } catch (error) {
4846
4800
  onError(error, errorRecordedForStack);
@@ -5230,45 +5184,28 @@ enifed('backburner', ['exports'], function (exports) {
5230
5184
  return this._setTimeout(fn, executeAt);
5231
5185
  };
5232
5186
 
5233
- Backburner.prototype.throttle = function (targetOrThisArgOrMethod) {
5187
+ Backburner.prototype.throttle = function (target, method) /*, ...args, wait, [immediate] */{
5234
5188
  var _this2 = this,
5235
5189
  _len4,
5236
5190
  args,
5237
5191
  _key4;
5238
5192
 
5239
- var target = void 0;
5240
- var method = void 0;
5241
- var immediate = void 0;
5242
- var isImmediate = void 0;
5243
- var wait = void 0;
5244
-
5245
- for (_len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
5246
- args[_key4 - 1] = arguments[_key4];
5193
+ for (_len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
5194
+ args[_key4 - 2] = arguments[_key4];
5247
5195
  }
5248
5196
 
5249
- if (args.length === 1) {
5250
- method = targetOrThisArgOrMethod;
5251
- wait = args.pop();
5252
- target = null;
5197
+ var immediate = args.pop();
5198
+ var isImmediate = void 0;
5199
+ var wait = void 0;
5200
+ if (isCoercableNumber(immediate)) {
5201
+ wait = immediate;
5253
5202
  isImmediate = true;
5254
5203
  } else {
5255
- target = targetOrThisArgOrMethod;
5256
- method = args.shift();
5257
- immediate = args.pop();
5258
- if (isString(method)) {
5259
- method = target[method];
5260
- } else if (!isFunction(method)) {
5261
- args.unshift(method);
5262
- method = target;
5263
- target = null;
5264
- }
5265
- if (isCoercableNumber(immediate)) {
5266
- wait = immediate;
5267
- isImmediate = true;
5268
- } else {
5269
- wait = args.pop();
5270
- isImmediate = immediate === true;
5271
- }
5204
+ wait = args.pop();
5205
+ isImmediate = immediate === true;
5206
+ }
5207
+ if (isString(method)) {
5208
+ method = target[method];
5272
5209
  }
5273
5210
  var index = findItem(target, method, this._throttlers);
5274
5211
  if (index > -1) {
@@ -5295,46 +5232,29 @@ enifed('backburner', ['exports'], function (exports) {
5295
5232
  return timer;
5296
5233
  };
5297
5234
 
5298
- Backburner.prototype.debounce = function (targetOrThisArgOrMethod) {
5235
+ Backburner.prototype.debounce = function (target, method) /* , wait, [immediate] */{
5299
5236
  var _this3 = this,
5300
5237
  _len5,
5301
5238
  args,
5302
5239
  _key5,
5303
5240
  timerId;
5304
5241
 
5305
- var target = void 0;
5306
- var method = void 0;
5307
- var immediate = void 0;
5308
- var isImmediate = void 0;
5309
- var wait = void 0;
5310
-
5311
- for (_len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
5312
- args[_key5 - 1] = arguments[_key5];
5242
+ for (_len5 = arguments.length, args = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {
5243
+ args[_key5 - 2] = arguments[_key5];
5313
5244
  }
5314
5245
 
5315
- if (args.length === 1) {
5316
- method = targetOrThisArgOrMethod;
5317
- wait = args.pop();
5318
- target = null;
5246
+ var immediate = args.pop();
5247
+ var isImmediate = void 0;
5248
+ var wait = void 0;
5249
+ if (isCoercableNumber(immediate)) {
5250
+ wait = immediate;
5319
5251
  isImmediate = false;
5320
5252
  } else {
5321
- target = targetOrThisArgOrMethod;
5322
- method = args.shift();
5323
- immediate = args.pop();
5324
- if (isString(method)) {
5325
- method = target[method];
5326
- } else if (!isFunction(method)) {
5327
- args.unshift(method);
5328
- method = target;
5329
- target = null;
5330
- }
5331
- if (isCoercableNumber(immediate)) {
5332
- wait = immediate;
5333
- isImmediate = false;
5334
- } else {
5335
- wait = args.pop();
5336
- isImmediate = immediate === true;
5337
- }
5253
+ wait = args.pop();
5254
+ isImmediate = immediate === true;
5255
+ }
5256
+ if (isString(method)) {
5257
+ method = target[method];
5338
5258
  }
5339
5259
  wait = parseInt(wait, 10);
5340
5260
  // Remove debouncee
@@ -5568,28 +5488,11 @@ enifed('backburner', ['exports'], function (exports) {
5568
5488
 
5569
5489
  exports.default = Backburner;
5570
5490
  });
5571
- enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'], function (exports, _emberUtils, _emberDebug, _features) {
5491
+ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features', 'ember-environment'], function (exports, _emberUtils, _emberDebug, _features, _emberEnvironment) {
5572
5492
  'use strict';
5573
5493
 
5574
5494
  exports.Container = exports.privatize = exports.Registry = undefined;
5575
5495
 
5576
- /* globals Proxy */
5577
- var CONTAINER_OVERRIDE = (0, _emberUtils.symbol)('CONTAINER_OVERRIDE');
5578
-
5579
- /**
5580
- A container used to instantiate and cache objects.
5581
-
5582
- Every `Container` must be associated with a `Registry`, which is referenced
5583
- to determine the factory and options that should be used to instantiate
5584
- objects.
5585
-
5586
- The public API for `Container` is still in flux and should not be considered
5587
- stable.
5588
-
5589
- @private
5590
- @class Container
5591
- */
5592
-
5593
5496
  var Container = function () {
5594
5497
  function Container(registry) {
5595
5498
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -5599,7 +5502,6 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5599
5502
  this.owner = options.owner || null;
5600
5503
  this.cache = (0, _emberUtils.dictionary)(options.cache || null);
5601
5504
  this.factoryManagerCache = (0, _emberUtils.dictionary)(options.factoryManagerCache || null);
5602
- this[CONTAINER_OVERRIDE] = undefined;
5603
5505
  this.isDestroyed = false;
5604
5506
 
5605
5507
  this.validationCache = (0, _emberUtils.dictionary)(options.validationCache || null);
@@ -6024,6 +5926,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6024
5926
  }();
6025
5927
 
6026
5928
  var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/;
5929
+ var missingResolverFunctionsDeprecation = 'Passing a `resolver` function into a Registry is deprecated. Please pass in a Resolver object with a `resolve` method.';
6027
5930
 
6028
5931
  /**
6029
5932
  A registry used to store factory and option information keyed
@@ -6047,7 +5950,11 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6047
5950
  this.fallback = options.fallback || null;
6048
5951
  this.resolver = options.resolver || null;
6049
5952
 
6050
- if (typeof this.resolver === 'function') {
5953
+ if (_emberEnvironment.ENV._ENABLE_RESOLVER_FUNCTION_SUPPORT !== true) {
5954
+ true && !(typeof this.resolver !== 'function') && (0, _emberDebug.assert)(missingResolverFunctionsDeprecation, typeof this.resolver !== 'function');
5955
+ }
5956
+
5957
+ if (typeof this.resolver === 'function' && _emberEnvironment.ENV._ENABLE_RESOLVER_FUNCTION_SUPPORT === true) {
6051
5958
  deprecateResolverFunction(this);
6052
5959
  }
6053
5960
 
@@ -6059,7 +5966,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6059
5966
  this._localLookupCache = Object.create(null);
6060
5967
  this._normalizeCache = (0, _emberUtils.dictionary)(null);
6061
5968
  this._resolveCache = (0, _emberUtils.dictionary)(null);
6062
- this._failCache = (0, _emberUtils.dictionary)(null);
5969
+ this._failSet = new Set();
6063
5970
 
6064
5971
  this._options = (0, _emberUtils.dictionary)(null);
6065
5972
  this._typeOptions = (0, _emberUtils.dictionary)(null);
@@ -6141,7 +6048,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6141
6048
  var normalizedName = this.normalize(fullName);
6142
6049
  true && !!this._resolveCache[normalizedName] && (0, _emberDebug.assert)('Cannot re-register: \'' + fullName + '\', as it has already been resolved.', !this._resolveCache[normalizedName]);
6143
6050
 
6144
- delete this._failCache[normalizedName];
6051
+ this._failSet.delete(normalizedName);
6145
6052
  this.registrations[normalizedName] = factory;
6146
6053
  this._options[normalizedName] = options;
6147
6054
  };
@@ -6155,8 +6062,8 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6155
6062
 
6156
6063
  delete this.registrations[normalizedName];
6157
6064
  delete this._resolveCache[normalizedName];
6158
- delete this._failCache[normalizedName];
6159
6065
  delete this._options[normalizedName];
6066
+ this._failSet.delete(normalizedName);
6160
6067
  };
6161
6068
 
6162
6069
  Registry.prototype.resolve = function (fullName, options) {
@@ -6291,13 +6198,10 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6291
6198
  };
6292
6199
 
6293
6200
  Registry.prototype.knownForType = function (type) {
6294
- var fallbackKnown = void 0,
6295
- resolverKnown = void 0,
6201
+ var localKnown = (0, _emberUtils.dictionary)(null),
6296
6202
  index,
6297
6203
  fullName,
6298
6204
  itemType;
6299
-
6300
- var localKnown = (0, _emberUtils.dictionary)(null);
6301
6205
  var registeredNames = Object.keys(this.registrations);
6302
6206
  for (index = 0; index < registeredNames.length; index++) {
6303
6207
  fullName = registeredNames[index];
@@ -6309,6 +6213,8 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6309
6213
  }
6310
6214
  }
6311
6215
 
6216
+ var fallbackKnown = void 0,
6217
+ resolverKnown = void 0;
6312
6218
  if (this.fallback !== null) {
6313
6219
  fallbackKnown = this.fallback.knownForType(type);
6314
6220
  }
@@ -6372,7 +6278,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6372
6278
  }();
6373
6279
 
6374
6280
  function deprecateResolverFunction(registry) {
6375
- true && !false && (0, _emberDebug.deprecate)('Passing a `resolver` function into a Registry is deprecated. Please pass in a Resolver object with a `resolve` method.', false, { id: 'ember-application.registry-resolver-as-function', until: '3.0.0', url: 'https://emberjs.com/deprecations/v2.x#toc_registry-resolver-as-function' });
6281
+ true && !false && (0, _emberDebug.deprecate)(missingResolverFunctionsDeprecation, false, { id: 'ember-application.registry-resolver-as-function', until: '3.0.0', url: 'https://emberjs.com/deprecations/v2.x#toc_registry-resolver-as-function' });
6376
6282
 
6377
6283
  registry.resolver = { resolve: registry.resolver };
6378
6284
  }
@@ -6457,7 +6363,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6457
6363
  if (cached !== undefined) {
6458
6364
  return cached;
6459
6365
  }
6460
- if (registry._failCache[cacheKey]) {
6366
+ if (registry._failSet.has(cacheKey)) {
6461
6367
  return;
6462
6368
  }
6463
6369
 
@@ -6472,7 +6378,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6472
6378
  }
6473
6379
 
6474
6380
  if (resolved === undefined) {
6475
- registry._failCache[cacheKey] = true;
6381
+ registry._failSet.add(cacheKey);
6476
6382
  } else {
6477
6383
  registry._resolveCache[cacheKey] = resolved;
6478
6384
  }
@@ -6573,28 +6479,8 @@ enifed('ember-babel', ['exports'], function (exports) {
6573
6479
 
6574
6480
  exports.slice = Array.prototype.slice;
6575
6481
  });
6576
- enifed('ember-console', ['exports', 'ember-environment'], function (exports, _emberEnvironment) {
6577
- 'use strict';
6578
-
6579
- function K() {}
6580
-
6581
- function consoleMethod(name) {
6582
- var consoleObj = void 0;
6583
- if (_emberEnvironment.context.imports.console) {
6584
- consoleObj = _emberEnvironment.context.imports.console;
6585
- } else if (typeof console !== 'undefined') {
6586
- // eslint-disable-line no-undef
6587
- consoleObj = console; // eslint-disable-line no-undef
6588
- }
6589
-
6590
- var method = typeof consoleObj === 'object' ? consoleObj[name] : null;
6591
-
6592
- if (typeof method !== 'function') {
6593
- return;
6594
- }
6595
-
6596
- return method.bind(consoleObj);
6597
- }
6482
+ enifed("ember-console", ["exports"], function (exports) {
6483
+ "use strict";
6598
6484
 
6599
6485
  /**
6600
6486
  Inside Ember-Metal, simply uses the methods from `imports.console`.
@@ -6604,110 +6490,41 @@ enifed('ember-console', ['exports', 'ember-environment'], function (exports, _em
6604
6490
  @namespace Ember
6605
6491
  @public
6606
6492
  */
6607
- var index = {
6608
- /**
6609
- Logs the arguments to the console.
6610
- You can pass as many arguments as you want and they will be joined together with a space.
6611
- ```javascript
6612
- var foo = 1;
6613
- Ember.Logger.log('log value of foo:', foo);
6614
- // "log value of foo: 1" will be printed to the console
6615
- ```
6616
- @method log
6617
- @for Ember.Logger
6618
- @param {*} arguments
6619
- @public
6620
- */
6621
- log: consoleMethod('log') || K,
6622
6493
 
6623
- /**
6624
- Prints the arguments to the console with a warning icon.
6625
- You can pass as many arguments as you want and they will be joined together with a space.
6626
- ```javascript
6627
- Ember.Logger.warn('Something happened!');
6628
- // "Something happened!" will be printed to the console with a warning icon.
6629
- ```
6630
- @method warn
6631
- @for Ember.Logger
6632
- @param {*} arguments
6633
- @public
6634
- */
6635
- warn: consoleMethod('warn') || K,
6494
+ exports.default = {
6495
+ log: function () {
6496
+ var _console;
6636
6497
 
6637
- /**
6638
- Prints the arguments to the console with an error icon, red text and a stack trace.
6639
- You can pass as many arguments as you want and they will be joined together with a space.
6640
- ```javascript
6641
- Ember.Logger.error('Danger! Danger!');
6642
- // "Danger! Danger!" will be printed to the console in red text.
6643
- ```
6644
- @method error
6645
- @for Ember.Logger
6646
- @param {*} arguments
6647
- @public
6648
- */
6649
- error: consoleMethod('error') || K,
6498
+ return (_console = console).log.apply(_console, arguments);
6499
+ },
6500
+ warn: function () {
6501
+ var _console2;
6650
6502
 
6651
- /**
6652
- Logs the arguments to the console.
6653
- You can pass as many arguments as you want and they will be joined together with a space.
6654
- ```javascript
6655
- var foo = 1;
6656
- Ember.Logger.info('log value of foo:', foo);
6657
- // "log value of foo: 1" will be printed to the console
6658
- ```
6659
- @method info
6660
- @for Ember.Logger
6661
- @param {*} arguments
6662
- @public
6663
- */
6664
- info: consoleMethod('info') || K,
6503
+ return (_console2 = console).warn.apply(_console2, arguments);
6504
+ },
6505
+ error: function () {
6506
+ var _console3;
6665
6507
 
6666
- /**
6667
- Logs the arguments to the console in blue text.
6668
- You can pass as many arguments as you want and they will be joined together with a space.
6669
- ```javascript
6670
- var foo = 1;
6671
- Ember.Logger.debug('log value of foo:', foo);
6672
- // "log value of foo: 1" will be printed to the console
6673
- ```
6674
- @method debug
6675
- @for Ember.Logger
6676
- @param {*} arguments
6677
- @public
6678
- */
6679
- debug: consoleMethod('debug') || consoleMethod('info') || K,
6508
+ return (_console3 = console).error.apply(_console3, arguments);
6509
+ },
6510
+ info: function () {
6511
+ var _console4;
6680
6512
 
6681
- /**
6682
- If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace.
6683
- ```javascript
6684
- Ember.Logger.assert(true); // undefined
6685
- Ember.Logger.assert(true === false); // Throws an Assertion failed error.
6686
- Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message.
6687
- ```
6688
- @method assert
6689
- @for Ember.Logger
6690
- @param {Boolean} bool Value to test
6691
- @param {String} message Assertion message on failed
6692
- @public
6693
- */
6694
- assert: consoleMethod('assert') || function (test, message) {
6695
- if (!test) {
6696
- try {
6697
- // attempt to preserve the stack
6698
- throw new Error('assertion failed: ' + message);
6699
- } catch (error) {
6700
- setTimeout(function () {
6701
- throw error;
6702
- }, 0);
6703
- }
6704
- }
6513
+ return (_console4 = console).info.apply(_console4, arguments);
6514
+ },
6515
+ debug: function () {
6516
+ var _console5, _console6;
6517
+
6518
+ return console.debug && (_console5 = console).debug.apply(_console5, arguments) || (_console6 = console).info.apply(_console6, arguments); // eslint-disable-line no-console
6519
+ },
6520
+ assert: function () {
6521
+ var _console7;
6522
+
6523
+ return (_console7 = console).assert.apply(_console7, arguments);
6705
6524
  }
6706
6525
  };
6707
-
6708
- exports.default = index;
6709
6526
  });
6710
- enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports, _error, _emberConsole, _emberEnvironment, _handlers) {
6527
+ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _error, _emberConsole, _emberEnvironment, _index, _handlers) {
6711
6528
  'use strict';
6712
6529
 
6713
6530
  exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = exports.registerHandler = undefined;
@@ -6752,8 +6569,8 @@ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console'
6752
6569
  @param handler {Function} A function to handle deprecation calls.
6753
6570
  @since 2.1.0
6754
6571
  */
6755
- var registerHandler = function () {}; /*global __fail__*/
6756
-
6572
+ /*global __fail__*/
6573
+ var registerHandler = function () {};
6757
6574
  var missingOptionsDeprecation = void 0,
6758
6575
  missingOptionsIdDeprecation = void 0,
6759
6576
  missingOptionsUntilDeprecation = void 0,
@@ -6873,7 +6690,13 @@ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console'
6873
6690
  @since 1.0.0
6874
6691
  */
6875
6692
  deprecate = function deprecate(message, test, options) {
6876
- if (!options || !options.id && !options.until) {
6693
+ if (_emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT !== true) {
6694
+ (0, _index.assert)(missingOptionsDeprecation, options && (options.id || options.until));
6695
+ (0, _index.assert)(missingOptionsIdDeprecation, options.id);
6696
+ (0, _index.assert)(missingOptionsUntilDeprecation, options.until);
6697
+ }
6698
+
6699
+ if ((!options || !options.id && !options.until) && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {
6877
6700
  deprecate(missingOptionsDeprecation, false, {
6878
6701
  id: 'ember-debug.deprecate-options-missing',
6879
6702
  until: '3.0.0',
@@ -6881,7 +6704,7 @@ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console'
6881
6704
  });
6882
6705
  }
6883
6706
 
6884
- if (options && !options.id) {
6707
+ if (options && !options.id && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {
6885
6708
  deprecate(missingOptionsIdDeprecation, false, {
6886
6709
  id: 'ember-debug.deprecate-id-missing',
6887
6710
  until: '3.0.0',
@@ -6889,7 +6712,7 @@ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console'
6889
6712
  });
6890
6713
  }
6891
6714
 
6892
- if (options && !options.until) {
6715
+ if (options && !options.until && _emberEnvironment.ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {
6893
6716
  deprecate(missingOptionsUntilDeprecation, options && options.until, {
6894
6717
  id: 'ember-debug.deprecate-until-missing',
6895
6718
  until: '3.0.0',
@@ -7400,7 +7223,7 @@ enifed("ember-debug/testing", ["exports"], function (exports) {
7400
7223
  };
7401
7224
  var testing = false;
7402
7225
  });
7403
- enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate', 'ember-debug/handlers'], function (exports, _emberConsole, _deprecate, _handlers) {
7226
+ enifed('ember-debug/warn', ['exports', 'ember-environment', 'ember-console', 'ember-debug/deprecate', 'ember-debug/index', 'ember-debug/handlers'], function (exports, _emberEnvironment, _emberConsole, _deprecate, _index, _handlers) {
7404
7227
  'use strict';
7405
7228
 
7406
7229
  exports.missingOptionsDeprecation = exports.missingOptionsIdDeprecation = exports.registerHandler = undefined;
@@ -7476,7 +7299,13 @@ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate',
7476
7299
  options = test;
7477
7300
  test = false;
7478
7301
  }
7479
- if (!options) {
7302
+
7303
+ if (_emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT !== true) {
7304
+ (0, _index.assert)(missingOptionsDeprecation, options);
7305
+ (0, _index.assert)(missingOptionsIdDeprecation, options && options.id);
7306
+ }
7307
+
7308
+ if (!options && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {
7480
7309
  (0, _deprecate.default)(missingOptionsDeprecation, false, {
7481
7310
  id: 'ember-debug.warn-options-missing',
7482
7311
  until: '3.0.0',
@@ -7484,7 +7313,7 @@ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate',
7484
7313
  });
7485
7314
  }
7486
7315
 
7487
- if (options && !options.id) {
7316
+ if (options && !options.id && _emberEnvironment.ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {
7488
7317
  (0, _deprecate.default)(missingOptionsIdDeprecation, false, {
7489
7318
  id: 'ember-debug.warn-id-missing',
7490
7319
  until: '3.0.0',
@@ -7640,7 +7469,6 @@ enifed('ember-environment', ['exports'], function (exports) {
7640
7469
  hasDOM: true,
7641
7470
  isChrome: !!window.chrome && !window.opera,
7642
7471
  isFirefox: typeof InstallTrigger !== 'undefined',
7643
- isPhantom: !!window.callPhantom,
7644
7472
  location: window.location,
7645
7473
  history: window.history,
7646
7474
  userAgent: window.navigator.userAgent,
@@ -7649,7 +7477,6 @@ enifed('ember-environment', ['exports'], function (exports) {
7649
7477
  hasDOM: false,
7650
7478
  isChrome: false,
7651
7479
  isFirefox: false,
7652
- isPhantom: false,
7653
7480
  location: null,
7654
7481
  history: null,
7655
7482
  userAgent: 'Lynx (textmode)',
@@ -7660,12 +7487,12 @@ enifed('ember-environment', ['exports'], function (exports) {
7660
7487
  exports.context = context;
7661
7488
  exports.environment = environment;
7662
7489
  });
7663
- enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-debug', 'ember-babel', 'ember/features', '@glimmer/reference', 'require', 'ember-console', 'backburner'], function (exports, emberEnvironment, emberUtils, emberDebug, emberBabel, ember_features, _glimmer_reference, require, Logger, Backburner) {
7490
+ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-debug', 'ember/features', 'ember-babel', '@glimmer/reference', 'require', 'backburner', 'ember-console'], function (exports, emberEnvironment, emberUtils, emberDebug, features, emberBabel, reference, require, Backburner, Logger) {
7664
7491
  'use strict';
7665
7492
 
7666
- require = 'default' in require ? require['default'] : require;
7667
- Logger = 'default' in Logger ? Logger['default'] : Logger;
7668
- Backburner = 'default' in Backburner ? Backburner['default'] : Backburner;
7493
+ require = require && require.hasOwnProperty('default') ? require['default'] : require;
7494
+ Backburner = Backburner && Backburner.hasOwnProperty('default') ? Backburner['default'] : Backburner;
7495
+ Logger = Logger && Logger.hasOwnProperty('default') ? Logger['default'] : Logger;
7669
7496
 
7670
7497
  /**
7671
7498
  @module ember
@@ -7689,10 +7516,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
7689
7516
  var Ember = typeof emberEnvironment.context.imports.Ember === 'object' && emberEnvironment.context.imports.Ember || {},
7690
7517
  TransactionRunner,
7691
7518
  runner,
7519
+ messageFor,
7520
+ trapFor,
7692
7521
  _hasOwnProperty,
7693
7522
  _propertyIsEnumerable,
7694
- getPrototypeOf,
7695
- metaStore,
7696
7523
  setWithMandatorySetter,
7697
7524
  makeEnumerable;
7698
7525
 
@@ -7910,11 +7737,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
7910
7737
  */
7911
7738
  function addListener(obj, eventName, target, method, once) {
7912
7739
  true && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to addListener', !!obj && !!eventName);
7913
- true && !(eventName !== 'didInitAttrs') && emberDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', {
7914
- id: 'ember-views.did-init-attrs',
7915
- until: '3.0.0',
7916
- url: 'https://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs'
7917
- });
7740
+
7741
+ if (emberEnvironment.ENV._ENABLE_DID_INIT_ATTRS_SUPPORT === true) {
7742
+ true && !(eventName !== 'didInitAttrs') && emberDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', {
7743
+ id: 'ember-views.did-init-attrs',
7744
+ until: '3.0.0',
7745
+ url: 'https://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs'
7746
+ });
7747
+ } else {
7748
+ true && !(eventName !== 'didInitAttrs') && emberDebug.assert('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + ' is no longer supported.', eventName !== 'didInitAttrs');
7749
+ }
7918
7750
 
7919
7751
  if (!method && 'function' === typeof target) {
7920
7752
  method = target;
@@ -8036,7 +7868,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8036
7868
  var meta$$1, i, target, method, flags;
8037
7869
 
8038
7870
  if (actions === undefined) {
8039
- meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
7871
+ meta$$1 = _meta === undefined ? peekMeta(obj) : _meta;
8040
7872
 
8041
7873
  actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);
8042
7874
  }
@@ -8104,7 +7936,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8104
7936
  i,
8105
7937
  target,
8106
7938
  method;
8107
- var meta$$1 = exports.peekMeta(obj);
7939
+ var meta$$1 = peekMeta(obj);
8108
7940
  var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;
8109
7941
 
8110
7942
  if (actions === undefined) {
@@ -8157,7 +7989,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8157
7989
  };
8158
7990
 
8159
7991
  function makeTag() {
8160
- return new _glimmer_reference.DirtyableTag();
7992
+ return new reference.DirtyableTag();
8161
7993
  }
8162
7994
 
8163
7995
  function tagFor(object, _meta) {
@@ -8168,7 +8000,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8168
8000
 
8169
8001
  return meta$$1.writableTag(makeTag);
8170
8002
  } else {
8171
- return _glimmer_reference.CONSTANT_TAG;
8003
+ return reference.CONSTANT_TAG;
8172
8004
  }
8173
8005
  }
8174
8006
 
@@ -8278,194 +8110,33 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8278
8110
  return ObserverSet;
8279
8111
  }();
8280
8112
 
8281
- /**
8282
- @module ember
8283
- */
8284
- var id = 0;
8285
-
8286
- // Returns whether Type(value) is Object according to the terminology in the spec
8287
- function isObject$1(value) {
8288
- return typeof value === 'object' && value !== null || typeof value === 'function';
8289
- }
8290
-
8291
- /*
8292
- * @class Ember.WeakMap
8293
- * @public
8294
- * @category ember-metal-weakmap
8295
- *
8296
- * A partial polyfill for [WeakMap](http://www.ecma-international.org/ecma-262/6.0/#sec-weakmap-objects).
8297
- *
8298
- * There is a small but important caveat. This implementation assumes that the
8299
- * weak map will live longer (in the sense of garbage collection) than all of its
8300
- * keys, otherwise it is possible to leak the values stored in the weak map. In
8301
- * practice, most use cases satisfy this limitation which is why it is included
8302
- * in ember-metal.
8303
- */
8304
- var WeakMapPolyfill = function () {
8305
- function WeakMapPolyfill(iterable) {
8306
- var i, _iterable$i, key, value;
8307
-
8308
- this._id = emberUtils.GUID_KEY + id++;
8309
-
8310
- if (iterable === null || iterable === undefined) {} else if (Array.isArray(iterable)) {
8311
- for (i = 0; i < iterable.length; i++) {
8312
- _iterable$i = iterable[i], key = _iterable$i[0], value = _iterable$i[1];
8313
-
8314
-
8315
- this.set(key, value);
8316
- }
8317
- } else {
8318
- throw new TypeError('The weak map constructor polyfill only supports an array argument');
8319
- }
8320
- }
8321
-
8322
- /*
8323
- * @method get
8324
- * @param key {Object | Function}
8325
- * @return {Any} stored value
8326
- */
8327
-
8328
- WeakMapPolyfill.prototype.get = function (obj) {
8329
- if (!isObject$1(obj)) {
8330
- return undefined;
8331
- }
8332
-
8333
- var meta$$1 = exports.peekMeta(obj),
8334
- map,
8335
- val;
8336
- if (meta$$1 !== undefined) {
8337
- map = meta$$1.readableWeak();
8338
-
8339
- if (map !== undefined) {
8340
- val = map[this._id];
8341
-
8342
- if (val === UNDEFINED) {
8343
- return undefined;
8344
- }
8345
- return val;
8346
- }
8347
- }
8348
- };
8349
-
8350
- /*
8351
- * @method set
8352
- * @param key {Object | Function}
8353
- * @param value {Any}
8354
- * @return {WeakMap} the weak map
8355
- */
8356
-
8357
- WeakMapPolyfill.prototype.set = function (obj, value) {
8358
- if (!isObject$1(obj)) {
8359
- throw new TypeError('Invalid value used as weak map key');
8360
- }
8361
-
8362
- if (value === undefined) {
8363
- value = UNDEFINED;
8364
- }
8365
-
8366
- meta(obj).writableWeak()[this._id] = value;
8367
-
8368
- return this;
8369
- };
8370
-
8371
- /*
8372
- * @method has
8373
- * @param key {Object | Function}
8374
- * @return {boolean} if the key exists
8375
- */
8376
-
8377
- WeakMapPolyfill.prototype.has = function (obj) {
8378
- if (!isObject$1(obj)) {
8379
- return false;
8380
- }
8381
-
8382
- var meta$$1 = exports.peekMeta(obj),
8383
- map;
8384
- if (meta$$1 !== undefined) {
8385
- map = meta$$1.readableWeak();
8386
-
8387
- if (map !== undefined) {
8388
- return map[this._id] !== undefined;
8389
- }
8390
- }
8391
-
8392
- return false;
8393
- };
8394
-
8395
- /*
8396
- * @method delete
8397
- * @param key {Object | Function}
8398
- * @return {boolean} if the key was deleted
8399
- */
8400
-
8401
- WeakMapPolyfill.prototype.delete = function (obj) {
8402
- if (this.has(obj)) {
8403
- delete exports.peekMeta(obj).writableWeak()[this._id];
8404
- return true;
8405
- } else {
8406
- return false;
8407
- }
8408
- };
8409
-
8410
- /*
8411
- * @method toString
8412
- * @return {String}
8413
- */
8414
-
8415
- WeakMapPolyfill.prototype.toString = function () {
8416
- return '[object WeakMap]';
8417
- };
8418
-
8419
- return WeakMapPolyfill;
8420
- }();
8421
-
8422
- var WeakMap$1 = emberUtils.HAS_NATIVE_WEAKMAP ? WeakMap : WeakMapPolyfill;
8423
-
8424
8113
  exports.runInTransaction = void 0;
8425
8114
  exports.didRender = void 0;
8426
8115
  exports.assertNotRendered = void 0;
8427
8116
 
8428
8117
  // detect-backtracking-rerender by default is debug build only
8429
- // detect-glimmer-allow-backtracking-rerender can be enabled in custom builds
8430
- if (ember_features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
8118
+ if (features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER) {
8431
8119
 
8432
- // there are 4 states
8120
+ // there are 2 states
8433
8121
 
8434
- // NATIVE WEAKMAP AND DEBUG
8122
+ // DEBUG
8435
8123
  // tracks lastRef and lastRenderedIn per rendered object and key during a transaction
8436
8124
  // release everything via normal weakmap semantics by just derefencing the weakmap
8437
8125
 
8438
- // NATIVE WEAKMAP AND RELEASE
8126
+ // RELEASE
8439
8127
  // tracks transactionId per rendered object and key during a transaction
8440
8128
  // release everything via normal weakmap semantics by just derefencing the weakmap
8441
8129
 
8442
- // WEAKMAP POLYFILL AND DEBUG
8443
- // tracks lastRef and lastRenderedIn per rendered object and key during a transaction
8444
- // since lastRef retains a lot of app state (will have a ref to the Container)
8445
- // if the object rendered is retained (like a immutable POJO in module state)
8446
- // during acceptance tests this adds up and obfuscates finding other leaks.
8447
-
8448
- // WEAKMAP POLYFILL AND RELEASE
8449
- // tracks transactionId per rendered object and key during a transaction
8450
- // leaks it because small and likely not worth tracking it since it will only
8451
- // be leaked if the object is retained
8452
-
8453
8130
  TransactionRunner = function () {
8454
8131
  function TransactionRunner() {
8455
8132
 
8456
8133
  this.transactionId = 0;
8457
8134
  this.inTransaction = false;
8458
8135
  this.shouldReflush = false;
8459
- this.weakMap = new WeakMap$1();
8136
+ this.weakMap = new WeakMap();
8460
8137
  {
8461
8138
  // track templates
8462
8139
  this.debugStack = undefined;
8463
-
8464
- if (!emberUtils.HAS_NATIVE_WEAKMAP) {
8465
- // DEBUG AND POLYFILL
8466
- // needs obj tracking
8467
- this.objs = [];
8468
- }
8469
8140
  }
8470
8141
  }
8471
8142
 
@@ -8479,20 +8150,20 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8479
8150
  return this.shouldReflush;
8480
8151
  };
8481
8152
 
8482
- TransactionRunner.prototype.didRender = function (object, key, reference) {
8153
+ TransactionRunner.prototype.didRender = function (object, key, reference$$1) {
8483
8154
  if (!this.inTransaction) {
8484
8155
  return;
8485
8156
  }
8486
8157
  {
8487
8158
  this.setKey(object, key, {
8488
- lastRef: reference,
8159
+ lastRef: reference$$1,
8489
8160
  lastRenderedIn: this.debugStack.peek()
8490
8161
  });
8491
8162
  }
8492
8163
  };
8493
8164
 
8494
8165
  TransactionRunner.prototype.assertNotRendered = function (object, key) {
8495
- var _getKey, lastRef, lastRenderedIn, currentlyIn, parts, label, message;
8166
+ var _getKey, lastRef, lastRenderedIn, currentlyIn, parts, label;
8496
8167
 
8497
8168
  if (!this.inTransaction) {
8498
8169
  return;
@@ -8516,14 +8187,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8516
8187
  label = 'the same value';
8517
8188
  }
8518
8189
 
8519
- message = 'You modified "' + label + '" twice on ' + object + ' in a single render. It was rendered in ' + lastRenderedIn + ' and modified in ' + currentlyIn + '. This was unreliable and slow in Ember 1.x and';
8520
-
8521
-
8522
- if (ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
8523
- true && !false && emberDebug.deprecate(message + ' will be removed in Ember 3.0.', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
8524
- } else {
8525
- true && !false && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
8526
- }
8190
+ true && !false && emberDebug.assert('You modified "' + label + '" twice on ' + object + ' in a single render. It was rendered in ' + lastRenderedIn + ' and modified in ' + currentlyIn + '. This was unreliable and slow in Ember 1.x and is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
8527
8191
  }
8528
8192
 
8529
8193
  this.shouldReflush = true;
@@ -8560,11 +8224,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8560
8224
  TransactionRunner.prototype.createMap = function (object) {
8561
8225
  var map = Object.create(null);
8562
8226
  this.weakMap.set(object, map);
8563
- if (true && !emberUtils.HAS_NATIVE_WEAKMAP) {
8564
- // POLYFILL AND DEBUG
8565
- // requires tracking objects
8566
- this.objs.push(object);
8567
- }
8568
8227
  return map;
8569
8228
  };
8570
8229
 
@@ -8589,30 +8248,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8589
8248
  };
8590
8249
 
8591
8250
  TransactionRunner.prototype.clearObjectMap = function () {
8592
- var objs, weakMap, i;
8593
-
8594
- if (emberUtils.HAS_NATIVE_WEAKMAP) {
8595
- // NATIVE AND (DEBUG OR RELEASE)
8596
- // if we have a real native weakmap
8597
- // releasing the ref will allow the values to be GCed
8598
- this.weakMap = new WeakMap$1();
8599
- } else {
8600
- // POLYFILL AND DEBUG
8601
- // with a polyfill the weakmap keys must be cleared since
8602
- // they have the last reference, acceptance tests will leak
8603
- // the container if you render a immutable object retained
8604
- // in module scope.
8605
- objs = this.objs, weakMap = this.weakMap;
8606
-
8607
-
8608
- this.objs = [];
8609
- for (i = 0; i < objs.length; i++) {
8610
- weakMap.delete(objs[i]);
8611
- }
8612
- }
8613
- // POLYFILL AND RELEASE
8614
- // we leak the key map if the object is retained but this is
8615
- // a POJO of keys to transaction ids
8251
+ this.weakMap = new WeakMap();
8616
8252
  };
8617
8253
 
8618
8254
  return TransactionRunner;
@@ -8631,16 +8267,176 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8631
8267
  };
8632
8268
  }
8633
8269
 
8634
- /**
8635
- @module ember
8636
- @private
8637
- */
8638
-
8639
- var PROPERTY_DID_CHANGE = emberUtils.symbol('PROPERTY_DID_CHANGE');
8270
+ function watchPath(obj, keyPath, meta$$1) {
8271
+ if (typeof obj !== 'object' || obj === null) {
8272
+ return;
8273
+ }
8274
+ var m = meta$$1 === undefined ? meta(obj) : meta$$1;
8275
+ var counter = m.peekWatching(keyPath) || 0;
8640
8276
 
8641
- var beforeObserverSet = new ObserverSet();
8642
- var observerSet = new ObserverSet();
8643
- var deferred = 0;
8277
+ m.writeWatching(keyPath, counter + 1);
8278
+ if (counter === 0) {
8279
+ // activate watching first time
8280
+ m.writableChains(makeChainNode).add(keyPath);
8281
+ }
8282
+ }
8283
+
8284
+ function unwatchPath(obj, keyPath, meta$$1) {
8285
+ if (typeof obj !== 'object' || obj === null) {
8286
+ return;
8287
+ }
8288
+ var m = meta$$1 === undefined ? peekMeta(obj) : meta$$1;
8289
+
8290
+ if (m === undefined) {
8291
+ return;
8292
+ }
8293
+ var counter = m.peekWatching(keyPath) || 0;
8294
+
8295
+ if (counter === 1) {
8296
+ m.writeWatching(keyPath, 0);
8297
+ m.writableChains(makeChainNode).remove(keyPath);
8298
+ } else if (counter > 1) {
8299
+ m.writeWatching(keyPath, counter - 1);
8300
+ }
8301
+ }
8302
+
8303
+ /**
8304
+ @module ember
8305
+ */
8306
+ /**
8307
+ Starts watching a property on an object. Whenever the property changes,
8308
+ invokes `Ember.propertyWillChange` and `Ember.propertyDidChange`. This is the
8309
+ primitive used by observers and dependent keys; usually you will never call
8310
+ this method directly but instead use higher level methods like
8311
+ `Ember.addObserver()`
8312
+
8313
+ @private
8314
+ @method watch
8315
+ @for Ember
8316
+ @param obj
8317
+ @param {String} _keyPath
8318
+ */
8319
+ function watch(obj, _keyPath, m) {
8320
+ if (isPath(_keyPath)) {
8321
+ watchPath(obj, _keyPath, m);
8322
+ } else {
8323
+ watchKey(obj, _keyPath, m);
8324
+ }
8325
+ }
8326
+
8327
+ function watcherCount(obj, key) {
8328
+ var meta$$1 = peekMeta(obj);
8329
+ return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
8330
+ }
8331
+
8332
+ function unwatch(obj, _keyPath, m) {
8333
+ if (isPath(_keyPath)) {
8334
+ unwatchPath(obj, _keyPath, m);
8335
+ } else {
8336
+ unwatchKey(obj, _keyPath, m);
8337
+ }
8338
+ }
8339
+
8340
+ /**
8341
+ @module @ember/object
8342
+ */
8343
+
8344
+ function changeEvent(keyName) {
8345
+ return keyName + ':change';
8346
+ }
8347
+
8348
+ function beforeEvent(keyName) {
8349
+ return keyName + ':before';
8350
+ }
8351
+
8352
+ /**
8353
+ @method addObserver
8354
+ @static
8355
+ @for @ember/object/observers
8356
+ @param obj
8357
+ @param {String} _path
8358
+ @param {Object|Function} target
8359
+ @param {Function|String} [method]
8360
+ @public
8361
+ */
8362
+ function addObserver(obj, _path, target, method) {
8363
+ addListener(obj, changeEvent(_path), target, method);
8364
+ watch(obj, _path);
8365
+
8366
+ return this;
8367
+ }
8368
+
8369
+ /**
8370
+ @method removeObserver
8371
+ @static
8372
+ @for @ember/object/observers
8373
+ @param obj
8374
+ @param {String} path
8375
+ @param {Object|Function} target
8376
+ @param {Function|String} [method]
8377
+ @public
8378
+ */
8379
+ function removeObserver(obj, path, target, method) {
8380
+ unwatch(obj, path);
8381
+ removeListener(obj, changeEvent(path), target, method);
8382
+
8383
+ return this;
8384
+ }
8385
+
8386
+ /**
8387
+ @method _addBeforeObserver
8388
+ @static
8389
+ @for @ember/object/observers
8390
+ @param obj
8391
+ @param {String} path
8392
+ @param {Object|Function} target
8393
+ @param {Function|String} [method]
8394
+ @deprecated
8395
+ @private
8396
+ */
8397
+ function _addBeforeObserver(obj, path, target, method) {
8398
+ addListener(obj, beforeEvent(path), target, method);
8399
+ watch(obj, path);
8400
+
8401
+ return this;
8402
+ }
8403
+
8404
+ // Suspend observer during callback.
8405
+ //
8406
+ // This should only be used by the target of the observer
8407
+ // while it is setting the observed path.
8408
+ function _suspendObserver(obj, path, target, method, callback) {
8409
+ return suspendListener(obj, changeEvent(path), target, method, callback);
8410
+ }
8411
+
8412
+ /**
8413
+ @method removeBeforeObserver
8414
+ @static
8415
+ @for @ember/object/observers
8416
+ @param obj
8417
+ @param {String} path
8418
+ @param {Object|Function} target
8419
+ @param {Function|String} [method]
8420
+ @deprecated
8421
+ @private
8422
+ */
8423
+ function _removeBeforeObserver(obj, path, target, method) {
8424
+ unwatch(obj, path);
8425
+ removeListener(obj, beforeEvent(path), target, method);
8426
+
8427
+ return this;
8428
+ }
8429
+
8430
+ /**
8431
+ @module ember
8432
+ @private
8433
+ */
8434
+
8435
+ var PROPERTY_DID_CHANGE = emberUtils.symbol('PROPERTY_DID_CHANGE');
8436
+
8437
+ var beforeObserverSet = new ObserverSet();
8438
+ var observerSet = new ObserverSet();
8439
+ var deferred = 0;
8644
8440
 
8645
8441
  // ..........................................................
8646
8442
  // PROPERTY CHANGES
@@ -8663,16 +8459,15 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8663
8459
  @private
8664
8460
  */
8665
8461
  function propertyWillChange(obj, keyName, _meta) {
8666
- var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
8462
+ var meta$$1 = _meta === undefined ? peekMeta(obj) : _meta;
8667
8463
  if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {
8668
8464
  return;
8669
8465
  }
8670
8466
 
8671
8467
  var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;
8672
- var possibleDesc = obj[keyName];
8673
- var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8468
+ var possibleDesc = descriptorFor(obj, keyName, meta$$1);
8674
8469
 
8675
- if (isDescriptor && possibleDesc.willChange) {
8470
+ if (possibleDesc !== undefined && possibleDesc.willChange) {
8676
8471
  possibleDesc.willChange(obj, keyName);
8677
8472
  }
8678
8473
 
@@ -8701,18 +8496,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8701
8496
  @private
8702
8497
  */
8703
8498
  function propertyDidChange(obj, keyName, _meta) {
8704
- var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
8499
+ var meta$$1 = _meta === undefined ? peekMeta(obj) : _meta;
8705
8500
  var hasMeta = meta$$1 !== undefined;
8706
8501
 
8707
8502
  if (hasMeta && !meta$$1.isInitialized(obj)) {
8708
8503
  return;
8709
8504
  }
8710
8505
 
8711
- var possibleDesc = obj[keyName];
8712
- var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8506
+ var possibleDesc = descriptorFor(obj, keyName, meta$$1);
8713
8507
 
8714
8508
  // shouldn't this mean that we're watching this key?
8715
- if (isDescriptor && possibleDesc.didChange) {
8509
+ if (possibleDesc !== undefined && possibleDesc.didChange) {
8716
8510
  possibleDesc.didChange(obj, keyName);
8717
8511
  }
8718
8512
 
@@ -8733,7 +8527,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8733
8527
  markObjectAsDirty(meta$$1, keyName);
8734
8528
  }
8735
8529
 
8736
- if (ember_features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
8530
+ if (features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER) {
8737
8531
  exports.assertNotRendered(obj, keyName, meta$$1);
8738
8532
  }
8739
8533
  }
@@ -8779,8 +8573,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8779
8573
  }
8780
8574
 
8781
8575
  function iterDeps(method, obj, depKey, seen, meta$$1) {
8782
- var possibleDesc = void 0,
8783
- isDescriptor = void 0;
8576
+ var possibleDesc = void 0;
8784
8577
  var guid = emberUtils.guidFor(obj);
8785
8578
  var current = seen[guid];
8786
8579
 
@@ -8799,10 +8592,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8799
8592
  return;
8800
8593
  }
8801
8594
 
8802
- possibleDesc = obj[key];
8803
- isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8595
+ possibleDesc = descriptorFor(obj, key, meta$$1);
8804
8596
 
8805
- if (isDescriptor && possibleDesc._suspended === obj) {
8597
+ if (possibleDesc !== undefined && possibleDesc._suspended === obj) {
8806
8598
  return;
8807
8599
  }
8808
8600
 
@@ -8865,13 +8657,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8865
8657
 
8866
8658
  @method changeProperties
8867
8659
  @param {Function} callback
8868
- @param [binding]
8869
8660
  @private
8870
8661
  */
8871
- function changeProperties(callback, binding) {
8662
+ function changeProperties(callback) {
8872
8663
  beginPropertyChanges();
8873
8664
  try {
8874
- callback.call(binding);
8665
+ callback();
8875
8666
  } finally {
8876
8667
  endPropertyChanges();
8877
8668
  }
@@ -8925,7 +8716,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8925
8716
  return;
8926
8717
  }
8927
8718
 
8928
- var eventName = keyName + ':before';
8719
+ var eventName = beforeEvent(keyName);
8929
8720
  var listeners = void 0,
8930
8721
  added = void 0;
8931
8722
  if (deferred > 0) {
@@ -8940,7 +8731,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8940
8731
  return;
8941
8732
  }
8942
8733
 
8943
- var eventName = keyName + ':change';
8734
+ var eventName = changeEvent(keyName);
8944
8735
  var listeners = void 0;
8945
8736
  if (deferred > 0) {
8946
8737
  listeners = observerSet.add(obj, keyName, eventName);
@@ -8969,29 +8760,13 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8969
8760
  this.isDescriptor = true;
8970
8761
  }
8971
8762
 
8972
- var REDEFINE_SUPPORTED = function () {
8973
- // https://github.com/spalger/kibana/commit/b7e35e6737df585585332857a4c397dc206e7ff9
8974
- var a = Object.create(Object.prototype, {
8975
- prop: {
8976
- configurable: true,
8977
- value: 1
8978
- }
8979
- });
8980
-
8981
- Object.defineProperty(a, 'prop', {
8982
- configurable: true,
8983
- value: 2
8984
- });
8985
-
8986
- return a.prop === 2;
8987
- }();
8988
8763
  // ..........................................................
8989
8764
  // DEFINING PROPERTIES API
8990
8765
  //
8991
8766
 
8992
8767
  function MANDATORY_SETTER_FUNCTION(name) {
8993
8768
  function SETTER_FUNCTION(value) {
8994
- var m = exports.peekMeta(this);
8769
+ var m = peekMeta(this);
8995
8770
  if (!m.isInitialized(this)) {
8996
8771
  m.writeValues(name, value);
8997
8772
  } else {
@@ -9005,7 +8780,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9005
8780
 
9006
8781
  function DEFAULT_GETTER_FUNCTION(name) {
9007
8782
  return function () {
9008
- var meta$$1 = exports.peekMeta(this);
8783
+ var meta$$1 = peekMeta(this);
9009
8784
  if (meta$$1 !== undefined) {
9010
8785
  return meta$$1.peekValues(name);
9011
8786
  }
@@ -9014,7 +8789,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9014
8789
 
9015
8790
  function INHERITING_GETTER_FUNCTION(name) {
9016
8791
  function IGETTER_FUNCTION() {
9017
- var meta$$1 = exports.peekMeta(this),
8792
+ var meta$$1 = peekMeta(this),
9018
8793
  proto;
9019
8794
  var val = void 0;
9020
8795
  if (meta$$1 !== undefined) {
@@ -9034,6 +8809,78 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9034
8809
  return IGETTER_FUNCTION;
9035
8810
  }
9036
8811
 
8812
+ var DESCRIPTOR_GETTER_FUNCTION = void 0;
8813
+
8814
+ if (features.EMBER_METAL_ES5_GETTERS) {
8815
+ DESCRIPTOR_GETTER_FUNCTION = function (name, descriptor) {
8816
+ return function () {
8817
+ return descriptor.get(this, name);
8818
+ };
8819
+ };
8820
+ } else if (features.DESCRIPTOR_TRAP) {
8821
+ // Future traveler, although this code looks scary. It merely exists in
8822
+ // development to aid in development asertions. Production builds of
8823
+ // ember strip this entire branch out.
8824
+ messageFor = function (obj, keyName, property, value) {
8825
+ return 'You attempted to access the `' + keyName + '.' + property + '` property ' + ('(of ' + obj + '). Due to certain internal implementation details of Ember, ') + ('the `' + keyName + '` property previously contained an internal "descriptor" ') + ('object (a private API), therefore `' + keyName + '.' + property + '` would have ') + ('been `' + String(value).replace(/\n/g, ' ') + '`. This internal implementation ') + 'detail was never intended to be a public (or even intimate) API.\n\n' + 'This internal implementation detail has now changed and the (still private) ' + '"descriptor" object has been relocated to the object\'s "meta" (also a ' + ('private API). Soon, accessing `' + keyName + '` on this object will ') + 'return the computed value (see RFC #281 for more details).\n\n' + 'If you are seeing this error, you are likely using an addon that ' + 'relies on this now-defunct private implementation detail. If you can, ' + 'find out which addon is doing this from the stack trace below and ' + 'report this bug to the addon authors. If you feel stuck, the Ember ' + 'Community Slack (https://ember-community-slackin.herokuapp.com/) ' + 'may be able to offer some help.\n\n' + 'If you are an addon author and need help transitioning your code, ' + 'please get in touch in the #dev-ember channel in the Ember Community ' + 'Slack.';
8826
+ };
8827
+ trapFor = void 0;
8828
+
8829
+
8830
+ if (emberUtils.HAS_NATIVE_PROXY) {
8831
+ /* globals Proxy */
8832
+ trapFor = function (obj, keyName, descriptor) {
8833
+ return new Proxy(descriptor, {
8834
+ get: function (descriptor, property) {
8835
+ if (property === DESCRIPTOR) {
8836
+ return descriptor;
8837
+ } else if (property === 'toString' || property == 'valueOf' || Symbol && property === Symbol.toPrimitive) {
8838
+ return function () {
8839
+ return '[COMPUTED PROPERTY]';
8840
+ };
8841
+ }
8842
+
8843
+ true && !false && emberDebug.assert(messageFor(obj, keyName, property, descriptor[property]));
8844
+ }
8845
+ });
8846
+ };
8847
+ } else {
8848
+ trapFor = function (obj, keyName, descriptor) {
8849
+ var trap = Object.create(null);
8850
+
8851
+ Object.defineProperty(trap, DESCRIPTOR, {
8852
+ configurable: false,
8853
+ enumerable: false,
8854
+ writable: false,
8855
+ value: descriptor
8856
+ });
8857
+
8858
+ trap.toString = trap.valueOf = function () {
8859
+ return '[COMPUTED PROPERTY]';
8860
+ };
8861
+
8862
+ // Without a proxy, we can only trap the "likely" properties
8863
+ ['isDescriptor', 'setup', 'teardown', 'get', '_getter', 'set', '_setter', 'meta'].forEach(function (property) {
8864
+ Object.defineProperty(trap, property, {
8865
+ configurable: false,
8866
+ enumerable: false,
8867
+ get: function () {
8868
+ true && !false && emberDebug.assert(messageFor(obj, keyName, property, descriptor[property]));
8869
+ }
8870
+ });
8871
+ });
8872
+
8873
+ return trap;
8874
+ };
8875
+ }
8876
+
8877
+ DESCRIPTOR_GETTER_FUNCTION = function (name, descriptor) {
8878
+ return function () {
8879
+ return trapFor(this, name, descriptor);
8880
+ };
8881
+ };
8882
+ }
8883
+
9037
8884
  /**
9038
8885
  NOTE: This is a low-level method used by other parts of the API. You almost
9039
8886
  never want to call this method directly. Instead you should use
@@ -9089,31 +8936,42 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9089
8936
  var watchEntry = meta$$1.peekWatching(keyName),
9090
8937
  defaultDescriptor;
9091
8938
  var watching = watchEntry !== undefined && watchEntry > 0;
9092
- var possibleDesc = obj[keyName];
9093
- var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8939
+ var previousDesc = descriptorFor(obj, keyName, meta$$1);
8940
+ var wasDescriptor = previousDesc !== undefined;
9094
8941
 
9095
- if (isDescriptor) {
9096
- possibleDesc.teardown(obj, keyName, meta$$1);
8942
+ if (wasDescriptor) {
8943
+ previousDesc.teardown(obj, keyName, meta$$1);
8944
+
8945
+ if (features.EMBER_METAL_ES5_GETTERS) {
8946
+ meta$$1.removeDescriptors(keyName);
8947
+ }
9097
8948
  }
9098
8949
 
9099
8950
  var value = void 0;
9100
8951
  if (desc instanceof Descriptor) {
9101
8952
  value = desc;
9102
- if (ember_features.MANDATORY_SETTER) {
9103
- if (watching) {
9104
- Object.defineProperty(obj, keyName, {
9105
- configurable: true,
9106
- enumerable: true,
9107
- writable: true,
9108
- value: value
9109
- });
9110
- } else {
9111
- obj[keyName] = value;
9112
- }
8953
+
8954
+ if (features.EMBER_METAL_ES5_GETTERS || features.DESCRIPTOR_TRAP) {
8955
+ Object.defineProperty(obj, keyName, {
8956
+ configurable: true,
8957
+ enumerable: true,
8958
+ get: DESCRIPTOR_GETTER_FUNCTION(keyName, value)
8959
+ });
8960
+ } else if (features.MANDATORY_SETTER && watching) {
8961
+ Object.defineProperty(obj, keyName, {
8962
+ configurable: true,
8963
+ enumerable: true,
8964
+ writable: true,
8965
+ value: value
8966
+ });
9113
8967
  } else {
9114
8968
  obj[keyName] = value;
9115
8969
  }
9116
8970
 
8971
+ if (features.EMBER_METAL_ES5_GETTERS) {
8972
+ meta$$1.writeDescriptors(keyName, value);
8973
+ }
8974
+
9117
8975
  didDefineComputedProperty(obj.constructor);
9118
8976
 
9119
8977
  if (typeof desc.setup === 'function') {
@@ -9122,26 +8980,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9122
8980
  } else if (desc === undefined || desc === null) {
9123
8981
  value = data;
9124
8982
 
9125
- if (ember_features.MANDATORY_SETTER) {
9126
- if (watching) {
9127
- meta$$1.writeValues(keyName, data);
8983
+ if (features.MANDATORY_SETTER && watching) {
8984
+ meta$$1.writeValues(keyName, data);
9128
8985
 
9129
- defaultDescriptor = {
9130
- configurable: true,
9131
- enumerable: true,
9132
- set: MANDATORY_SETTER_FUNCTION(keyName),
9133
- get: DEFAULT_GETTER_FUNCTION(keyName)
9134
- };
8986
+ defaultDescriptor = {
8987
+ configurable: true,
8988
+ enumerable: true,
8989
+ set: MANDATORY_SETTER_FUNCTION(keyName),
8990
+ get: DEFAULT_GETTER_FUNCTION(keyName)
8991
+ };
9135
8992
 
9136
8993
 
9137
- if (REDEFINE_SUPPORTED) {
9138
- Object.defineProperty(obj, keyName, defaultDescriptor);
9139
- } else {
9140
- handleBrokenPhantomDefineProperty(obj, keyName, defaultDescriptor);
9141
- }
9142
- } else {
9143
- obj[keyName] = data;
9144
- }
8994
+ Object.defineProperty(obj, keyName, defaultDescriptor);
8995
+ } else if ((features.EMBER_METAL_ES5_GETTERS || features.DESCRIPTOR_TRAP) && wasDescriptor) {
8996
+ Object.defineProperty(obj, keyName, {
8997
+ configurable: true,
8998
+ enumerable: true,
8999
+ writable: true,
9000
+ value: value
9001
+ });
9145
9002
  } else {
9146
9003
  obj[keyName] = data;
9147
9004
  }
@@ -9181,12 +9038,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9181
9038
  }
9182
9039
  }
9183
9040
 
9184
- function handleBrokenPhantomDefineProperty(obj, keyName, desc) {
9185
- // https://github.com/ariya/phantomjs/issues/11856
9186
- Object.defineProperty(obj, keyName, { configurable: true, writable: true, value: 'iCry' });
9187
- Object.defineProperty(obj, keyName, desc);
9188
- }
9189
-
9190
9041
  var handleMandatorySetter = void 0;
9191
9042
 
9192
9043
  function watchKey(obj, keyName, _meta) {
@@ -9195,17 +9046,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9195
9046
  }
9196
9047
 
9197
9048
  var meta$$1 = _meta === undefined ? meta(obj) : _meta,
9198
- possibleDesc,
9199
- isDescriptor;
9049
+ possibleDesc;
9200
9050
  var count = meta$$1.peekWatching(keyName) || 0;
9201
9051
  meta$$1.writeWatching(keyName, count + 1);
9202
9052
 
9203
9053
  if (count === 0) {
9204
9054
  // activate watching first time
9205
- possibleDesc = obj[keyName];
9206
- isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
9055
+ possibleDesc = descriptorFor(obj, keyName, meta$$1);
9056
+
9207
9057
 
9208
- if (isDescriptor && possibleDesc.willWatch) {
9058
+ if (possibleDesc !== undefined && possibleDesc.willWatch) {
9209
9059
  possibleDesc.willWatch(obj, keyName, meta$$1);
9210
9060
  }
9211
9061
 
@@ -9213,14 +9063,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9213
9063
  obj.willWatchProperty(keyName);
9214
9064
  }
9215
9065
 
9216
- if (ember_features.MANDATORY_SETTER) {
9066
+ if (features.MANDATORY_SETTER) {
9217
9067
  // NOTE: this is dropped for prod + minified builds
9218
9068
  handleMandatorySetter(meta$$1, obj, keyName);
9219
9069
  }
9220
9070
  }
9221
9071
  }
9222
9072
 
9223
- if (ember_features.MANDATORY_SETTER) {
9073
+ if (features.MANDATORY_SETTER) {
9224
9074
  _hasOwnProperty = function (obj, key) {
9225
9075
  return Object.prototype.hasOwnProperty.call(obj, key);
9226
9076
  };
@@ -9236,15 +9086,13 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9236
9086
  var descriptor = emberUtils.lookupDescriptor(obj, keyName),
9237
9087
  desc;
9238
9088
  var hasDescriptor = descriptor !== null;
9239
- var configurable = hasDescriptor ? descriptor.configurable : true;
9240
- var isWritable = hasDescriptor ? descriptor.writable : true;
9241
- var hasValue = hasDescriptor ? 'value' in descriptor : true;
9242
9089
  var possibleDesc = hasDescriptor && descriptor.value;
9243
- var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
9244
-
9245
- if (isDescriptor) {
9090
+ if (isDescriptor(possibleDesc)) {
9246
9091
  return;
9247
9092
  }
9093
+ var configurable = hasDescriptor ? descriptor.configurable : true;
9094
+ var isWritable = hasDescriptor ? descriptor.writable : true;
9095
+ var hasValue = hasDescriptor ? 'value' in descriptor : true;
9248
9096
 
9249
9097
  // this x in Y deopts, so keeping it in this function is better;
9250
9098
  if (configurable && isWritable && hasValue && keyName in obj) {
@@ -9272,9 +9120,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9272
9120
  if (typeof obj !== 'object' || obj === null) {
9273
9121
  return;
9274
9122
  }
9275
- var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta,
9123
+ var meta$$1 = _meta === undefined ? peekMeta(obj) : _meta,
9276
9124
  possibleDesc,
9277
- isDescriptor,
9125
+ _isDescriptor,
9278
9126
  maybeMandatoryDescriptor,
9279
9127
  possibleValue;
9280
9128
 
@@ -9287,11 +9135,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9287
9135
  if (count === 1) {
9288
9136
  meta$$1.writeWatching(keyName, 0);
9289
9137
 
9290
- possibleDesc = obj[keyName];
9291
- isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
9138
+ possibleDesc = descriptorFor(obj, keyName, meta$$1);
9139
+ _isDescriptor = possibleDesc !== undefined;
9292
9140
 
9293
9141
 
9294
- if (isDescriptor && possibleDesc.didUnwatch) {
9142
+ if (_isDescriptor && possibleDesc.didUnwatch) {
9295
9143
  possibleDesc.didUnwatch(obj, keyName, meta$$1);
9296
9144
  }
9297
9145
 
@@ -9299,7 +9147,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9299
9147
  obj.didUnwatchProperty(keyName);
9300
9148
  }
9301
9149
 
9302
- if (ember_features.MANDATORY_SETTER) {
9150
+ if (features.MANDATORY_SETTER) {
9303
9151
  // It is true, the following code looks quite WAT. But have no fear, It
9304
9152
  // exists purely to improve development ergonomics and is removed from
9305
9153
  // ember.min.js and ember.prod.js builds.
@@ -9308,7 +9156,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9308
9156
  // for mutation, will bypass observation. This code exists to assert when
9309
9157
  // that occurs, and attempt to provide more helpful feedback. The alternative
9310
9158
  // is tricky to debug partially observable properties.
9311
- if (!isDescriptor && keyName in obj) {
9159
+ if (!_isDescriptor && keyName in obj) {
9312
9160
  maybeMandatoryDescriptor = emberUtils.lookupDescriptor(obj, keyName);
9313
9161
 
9314
9162
 
@@ -9337,43 +9185,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9337
9185
  }
9338
9186
  }
9339
9187
 
9340
- function makeChainNode(obj) {
9341
- return new ChainNode(null, null, obj);
9342
- }
9343
-
9344
- function watchPath(obj, keyPath, meta$$1) {
9345
- if (typeof obj !== 'object' || obj === null) {
9346
- return;
9347
- }
9348
- var m = meta$$1 === undefined ? meta(obj) : meta$$1;
9349
- var counter = m.peekWatching(keyPath) || 0;
9350
-
9351
- m.writeWatching(keyPath, counter + 1);
9352
- if (counter === 0) {
9353
- // activate watching first time
9354
- m.writableChains(makeChainNode).add(keyPath);
9355
- }
9356
- }
9357
-
9358
- function unwatchPath(obj, keyPath, meta$$1) {
9359
- if (typeof obj !== 'object' || obj === null) {
9360
- return;
9361
- }
9362
- var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;
9363
-
9364
- if (m === undefined) {
9365
- return;
9366
- }
9367
- var counter = m.peekWatching(keyPath) || 0;
9368
-
9369
- if (counter === 1) {
9370
- m.writeWatching(keyPath, 0);
9371
- m.writableChains(makeChainNode).remove(keyPath);
9372
- } else if (counter > 1) {
9373
- m.writeWatching(keyPath, counter - 1);
9374
- }
9375
- }
9376
-
9377
9188
  var FIRST_KEY = /^([^\.]+)/;
9378
9189
 
9379
9190
  function firstKey(path) {
@@ -9384,8 +9195,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9384
9195
  return typeof obj === 'object' && obj !== null;
9385
9196
  }
9386
9197
 
9387
- function isVolatile(obj) {
9388
- return !(isObject(obj) && obj.isDescriptor && obj._volatile === false);
9198
+ function isVolatile(obj, keyName, meta$$1) {
9199
+ var desc = descriptorFor(obj, keyName, meta$$1);
9200
+ return !(desc !== undefined && desc._volatile === false);
9389
9201
  }
9390
9202
 
9391
9203
  var ChainWatchers = function () {
@@ -9489,6 +9301,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9489
9301
  return new ChainWatchers();
9490
9302
  }
9491
9303
 
9304
+ function makeChainNode(obj) {
9305
+ return new ChainNode(null, null, obj);
9306
+ }
9307
+
9492
9308
  function addChainWatcher(obj, keyName, node) {
9493
9309
  var m = meta(obj);
9494
9310
  m.writableChainWatchers(makeChainWatcher).add(keyName, node);
@@ -9500,7 +9316,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9500
9316
  return;
9501
9317
  }
9502
9318
 
9503
- var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
9319
+ var meta$$1 = _meta === undefined ? peekMeta(obj) : _meta;
9504
9320
 
9505
9321
  if (meta$$1 === undefined || meta$$1.readableChainWatchers() === undefined) {
9506
9322
  return;
@@ -9575,7 +9391,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9575
9391
 
9576
9392
 
9577
9393
  ChainNode.prototype.copy = function (obj) {
9578
- var ret = new ChainNode(null, null, obj),
9394
+ var ret = makeChainNode(obj),
9579
9395
  path;
9580
9396
  var paths = this._paths;
9581
9397
  if (paths !== undefined) {
@@ -9726,7 +9542,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9726
9542
  return;
9727
9543
  }
9728
9544
 
9729
- var meta$$1 = exports.peekMeta(obj),
9545
+ var meta$$1 = peekMeta(obj),
9730
9546
  cache;
9731
9547
 
9732
9548
  // check if object meant only to be a prototype
@@ -9735,7 +9551,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9735
9551
  }
9736
9552
 
9737
9553
  // Use `get` if the return value is an EachProxy or an uncacheable value.
9738
- if (isVolatile(obj[key])) {
9554
+ if (isVolatile(obj, key, meta$$1)) {
9739
9555
  return get(obj, key);
9740
9556
  // Otherwise attempt to get the cached value of the computed property
9741
9557
  } else {
@@ -9772,7 +9588,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9772
9588
  var META_DESTROYED = 1 << 3;
9773
9589
  var IS_PROXY = 1 << 4;
9774
9590
 
9775
- var META_FIELD = '__ember_meta__';
9776
9591
  var NODE_STACK = [];
9777
9592
 
9778
9593
  var Meta = function () {
@@ -9783,7 +9598,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9783
9598
  }
9784
9599
 
9785
9600
  this._cache = undefined;
9786
- this._weak = undefined;
9601
+
9602
+ if (features.EMBER_METAL_ES5_GETTERS) {
9603
+ this._descriptors = undefined;
9604
+ }
9605
+
9787
9606
  this._watching = undefined;
9788
9607
  this._mixins = undefined;
9789
9608
  this._bindings = undefined;
@@ -9851,7 +9670,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9851
9670
  if (node._watching) {
9852
9671
  nodeObject = node._object;
9853
9672
  if (nodeObject !== undefined) {
9854
- foreignMeta = exports.peekMeta(nodeObject);
9673
+ foreignMeta = peekMeta(nodeObject);
9855
9674
  // avoid cleaning up chain watchers when both current and
9856
9675
  // foreign objects are being destroyed
9857
9676
  // if both are being destroyed manual cleanup is not needed
@@ -10007,9 +9826,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10007
9826
 
10008
9827
  if (innerMap !== undefined) {
10009
9828
  for (var innerKey in innerMap) {
10010
- seen = seen || Object.create(null);
10011
- if (seen[innerKey] === undefined) {
10012
- seen[innerKey] = true;
9829
+ seen = seen === undefined ? new Set() : seen;
9830
+ if (!seen.has(innerKey)) {
9831
+ seen.add(innerKey);
10013
9832
  calls = calls || [];
10014
9833
  calls.push(innerKey, innerMap[innerKey]);
10015
9834
  }
@@ -10034,14 +9853,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10034
9853
  return this._cache;
10035
9854
  };
10036
9855
 
10037
- Meta.prototype.writableWeak = function () {
10038
- return this._getOrCreateOwnMap('_weak');
10039
- };
10040
-
10041
- Meta.prototype.readableWeak = function () {
10042
- return this._weak;
10043
- };
10044
-
10045
9856
  Meta.prototype.writableTags = function () {
10046
9857
  return this._getOrCreateOwnMap('_tags');
10047
9858
  };
@@ -10128,9 +9939,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10128
9939
 
10129
9940
  if (map !== undefined) {
10130
9941
  for (var key in map) {
10131
- seen = seen || Object.create(null);
10132
- if (seen[key] === undefined) {
10133
- seen[key] = true;
9942
+ seen = seen === undefined ? new Set() : seen;
9943
+ if (!seen.has(key)) {
9944
+ seen.add(key);
10134
9945
  fn(key, map[key]);
10135
9946
  }
10136
9947
  }
@@ -10208,19 +10019,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10208
10019
  Meta.prototype[name] = protoMethods[name];
10209
10020
  }
10210
10021
 
10211
- var META_DESC = {
10212
- writable: true,
10213
- configurable: true,
10214
- enumerable: false,
10215
- value: null
10216
- };
10217
-
10218
- var EMBER_META_PROPERTY = {
10219
- name: META_FIELD,
10220
- descriptor: META_DESC
10221
- };
10222
-
10223
- if (ember_features.MANDATORY_SETTER) {
10022
+ if (features.MANDATORY_SETTER) {
10224
10023
  Meta.prototype.readInheritedValue = function (key, subkey) {
10225
10024
 
10226
10025
  var pointer = this,
@@ -10255,55 +10054,60 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10255
10054
  };
10256
10055
  }
10257
10056
 
10258
- var setMeta = void 0;
10259
- exports.peekMeta = void 0;
10057
+ if (features.EMBER_METAL_ES5_GETTERS) {
10058
+ Meta.prototype.writeDescriptors = function (subkey, value) {
10059
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot update descriptors for `' + subkey + '` on `' + emberUtils.toString(this.source) + '` after it has been destroyed.', !this.isMetaDestroyed());
10260
10060
 
10261
- // choose the one appropriate for given platform
10262
- if (emberUtils.HAS_NATIVE_WEAKMAP) {
10263
- getPrototypeOf = Object.getPrototypeOf;
10264
- metaStore = new WeakMap();
10061
+ var map = this._getOrCreateOwnMap('_descriptors');
10062
+ map[subkey] = value;
10063
+ };
10265
10064
 
10065
+ Meta.prototype.peekDescriptors = function (subkey) {
10066
+ var possibleDesc = this._findInherited('_descriptors', subkey);
10067
+ return possibleDesc === UNDEFINED ? undefined : possibleDesc;
10068
+ };
10266
10069
 
10267
- setMeta = function (obj, meta) {
10268
- {
10269
- counters.setCalls++;
10270
- }
10271
- metaStore.set(obj, meta);
10070
+ Meta.prototype.removeDescriptors = function (subkey) {
10071
+ this.writeDescriptors(subkey, UNDEFINED);
10272
10072
  };
10073
+ }
10273
10074
 
10274
- exports.peekMeta = function (obj) {
10275
- var pointer = obj;
10276
- var meta = void 0;
10277
- while (pointer !== undefined && pointer !== null) {
10278
- meta = metaStore.get(pointer);
10279
- // jshint loopfunc:true
10280
- {
10281
- counters.peekCalls++;
10282
- }
10283
- if (meta !== undefined) {
10284
- return meta;
10285
- }
10075
+ var getPrototypeOf = Object.getPrototypeOf;
10076
+ var metaStore = new WeakMap();
10286
10077
 
10287
- pointer = getPrototypeOf(pointer);
10288
- {
10289
- counters.peekPrototypeWalks++;
10290
- }
10078
+ function setMeta(obj, meta) {
10079
+ true && !(obj !== null) && emberDebug.assert('Cannot call `setMeta` on null', obj !== null);
10080
+ true && !(obj !== undefined) && emberDebug.assert('Cannot call `setMeta` on undefined', obj !== undefined);
10081
+ true && !(typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call `setMeta` on ' + typeof obj, typeof obj === 'object' || typeof obj === 'function');
10082
+
10083
+ {
10084
+ counters.setCalls++;
10085
+ }
10086
+ metaStore.set(obj, meta);
10087
+ }
10088
+
10089
+ function peekMeta(obj) {
10090
+ true && !(obj !== null) && emberDebug.assert('Cannot call `peekMeta` on null', obj !== null);
10091
+ true && !(obj !== undefined) && emberDebug.assert('Cannot call `peekMeta` on undefined', obj !== undefined);
10092
+ true && !(typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call `peekMeta` on ' + typeof obj, typeof obj === 'object' || typeof obj === 'function');
10093
+
10094
+ var pointer = obj;
10095
+ var meta = void 0;
10096
+ while (pointer !== undefined && pointer !== null) {
10097
+ meta = metaStore.get(pointer);
10098
+ // jshint loopfunc:true
10099
+ {
10100
+ counters.peekCalls++;
10291
10101
  }
10292
- };
10293
- } else {
10294
- setMeta = function (obj, meta) {
10295
- if (obj.__defineNonEnumerable) {
10296
- obj.__defineNonEnumerable(EMBER_META_PROPERTY);
10297
- } else {
10298
- Object.defineProperty(obj, META_FIELD, META_DESC);
10102
+ if (meta !== undefined) {
10103
+ return meta;
10299
10104
  }
10300
10105
 
10301
- obj[META_FIELD] = meta;
10302
- };
10303
-
10304
- exports.peekMeta = function (obj) {
10305
- return obj[META_FIELD];
10306
- };
10106
+ pointer = getPrototypeOf(pointer);
10107
+ {
10108
+ counters.peekPrototypeWalks++;
10109
+ }
10110
+ }
10307
10111
  }
10308
10112
 
10309
10113
  /**
@@ -10337,11 +10141,15 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10337
10141
  @return {Object} the meta hash for an object
10338
10142
  */
10339
10143
  function meta(obj) {
10144
+ true && !(obj !== null) && emberDebug.assert('Cannot call `meta` on null', obj !== null);
10145
+ true && !(obj !== undefined) && emberDebug.assert('Cannot call `meta` on undefined', obj !== undefined);
10146
+ true && !(typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call `meta` on ' + typeof obj, typeof obj === 'object' || typeof obj === 'function');
10147
+
10340
10148
  {
10341
10149
  counters.metaCalls++;
10342
10150
  }
10343
10151
 
10344
- var maybeMeta = exports.peekMeta(obj);
10152
+ var maybeMeta = peekMeta(obj);
10345
10153
  var parent = void 0;
10346
10154
 
10347
10155
  // remove this code, in-favor of explicit parent
@@ -10357,6 +10165,67 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10357
10165
  return newMeta;
10358
10166
  }
10359
10167
 
10168
+ // Using `symbol()` here causes some node test to fail, presumably
10169
+ // because we define the CP with one copy of Ember and boot the app
10170
+ // with a different copy, so the random key we generate do not line
10171
+ // up. Is that testing a legit scenario?
10172
+ var DESCRIPTOR = '__DESCRIPTOR__';
10173
+
10174
+ /**
10175
+ Returns the CP descriptor assocaited with `obj` and `keyName`, if any.
10176
+
10177
+ @method descriptorFor
10178
+ @param {Object} obj the object to check
10179
+ @param {String} keyName the key to check
10180
+ @return {Descriptor}
10181
+ @private
10182
+ */
10183
+ function descriptorFor(obj, keyName, _meta) {
10184
+ var _meta2, possibleDesc;
10185
+
10186
+ true && !(obj !== null) && emberDebug.assert('Cannot call `descriptorFor` on null', obj !== null);
10187
+ true && !(obj !== undefined) && emberDebug.assert('Cannot call `descriptorFor` on undefined', obj !== undefined);
10188
+ true && !(typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call `descriptorFor` on ' + typeof obj, typeof obj === 'object' || typeof obj === 'function');
10189
+
10190
+ if (features.EMBER_METAL_ES5_GETTERS) {
10191
+ _meta2 = _meta === undefined ? peekMeta(obj) : _meta;
10192
+
10193
+
10194
+ if (_meta2 !== undefined) {
10195
+ return _meta2.peekDescriptors(keyName);
10196
+ }
10197
+ } else {
10198
+ possibleDesc = obj[keyName];
10199
+
10200
+
10201
+ if (features.DESCRIPTOR_TRAP && isDescriptorTrap(possibleDesc)) {
10202
+ return possibleDesc[DESCRIPTOR];
10203
+ } else {
10204
+ return isDescriptor(possibleDesc) ? possibleDesc : undefined;
10205
+ }
10206
+ }
10207
+ }
10208
+
10209
+ function isDescriptorTrap(possibleDesc) {
10210
+ if (features.DESCRIPTOR_TRAP) {
10211
+ return possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc[DESCRIPTOR] !== undefined;
10212
+ } else {
10213
+ throw new Error('Cannot call `isDescriptorTrap` in production');
10214
+ }
10215
+ }
10216
+
10217
+ /**
10218
+ Check whether a value is a CP descriptor.
10219
+
10220
+ @method descriptorFor
10221
+ @param {any} possibleDesc the value to check
10222
+ @return {boolean}
10223
+ @private
10224
+ */
10225
+ function isDescriptor(possibleDesc) {
10226
+ return possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
10227
+ }
10228
+
10360
10229
  var Cache = function () {
10361
10230
  function Cache(limit, func, key, store) {
10362
10231
 
@@ -10524,14 +10393,39 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10524
10393
  true && !(keyName.lastIndexOf('this.', 0) !== 0) && emberDebug.assert('\'this\' in paths is not supported', keyName.lastIndexOf('this.', 0) !== 0);
10525
10394
  true && !(keyName !== '') && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');
10526
10395
 
10527
- var value = obj[keyName];
10528
- var isDescriptor = value !== null && typeof value === 'object' && value.isDescriptor;
10396
+ var type = typeof obj;
10397
+
10398
+ var isObject = type === 'object';
10399
+
10400
+
10401
+ var descriptor = undefined;
10402
+ var value = void 0;
10403
+
10404
+ if (isObject || type === 'function') {
10405
+ if (features.EMBER_METAL_ES5_GETTERS) {
10406
+ descriptor = descriptorFor(obj, keyName);
10407
+ }
10529
10408
 
10530
- if (isDescriptor) {
10531
- return value.get(obj, keyName);
10532
- } else if (isPath(keyName)) {
10409
+ if (!features.EMBER_METAL_ES5_GETTERS || descriptor === undefined) {
10410
+ value = obj[keyName];
10411
+
10412
+ if (features.DESCRIPTOR_TRAP && isDescriptorTrap(value)) {
10413
+ descriptor = value[DESCRIPTOR];
10414
+ } else if (isDescriptor(value)) {
10415
+ descriptor = value;
10416
+ }
10417
+ }
10418
+
10419
+ if (descriptor !== undefined) {
10420
+ return descriptor.get(obj, keyName);
10421
+ }
10422
+ } else {
10423
+ value = obj[keyName];
10424
+ }
10425
+
10426
+ if (isPath(keyName)) {
10533
10427
  return _getPath(obj, keyName);
10534
- } else if (value === undefined && 'object' === typeof obj && !(keyName in obj) && typeof obj.unknownProperty === 'function') {
10428
+ } else if (value === undefined && isObject && !(keyName in obj) && typeof obj.unknownProperty === 'function') {
10535
10429
  return obj.unknownProperty(keyName);
10536
10430
  } else {
10537
10431
  return value;
@@ -10614,22 +10508,37 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10614
10508
  return setPath(obj, keyName, value, tolerant);
10615
10509
  }
10616
10510
 
10511
+ if (features.EMBER_METAL_ES5_GETTERS) {
10512
+ possibleDesc = descriptorFor(obj, keyName);
10513
+
10514
+
10515
+ if (possibleDesc !== undefined) {
10516
+ /* computed property */
10517
+ possibleDesc.set(obj, keyName, value);
10518
+ return value;
10519
+ }
10520
+ }
10521
+
10617
10522
  var currentValue = obj[keyName],
10523
+ possibleDesc,
10618
10524
  meta$$1;
10619
- var isDescriptor = currentValue !== null && typeof currentValue === 'object' && currentValue.isDescriptor;
10620
10525
 
10621
- if (isDescriptor) {
10526
+ if (features.DESCRIPTOR_TRAP && isDescriptorTrap(currentValue)) {
10527
+ currentValue = currentValue[DESCRIPTOR];
10528
+ }
10529
+
10530
+ if (isDescriptor(currentValue)) {
10622
10531
  /* computed property */
10623
10532
  currentValue.set(obj, keyName, value);
10624
10533
  } else if (currentValue === undefined && 'object' === typeof obj && !(keyName in obj) && typeof obj.setUnknownProperty === 'function') {
10625
10534
  /* unknown property */
10626
10535
  obj.setUnknownProperty(keyName, value);
10627
10536
  } else if (!(currentValue === value)) {
10628
- meta$$1 = exports.peekMeta(obj);
10537
+ meta$$1 = peekMeta(obj);
10629
10538
 
10630
10539
  propertyWillChange(obj, keyName, meta$$1);
10631
10540
 
10632
- if (ember_features.MANDATORY_SETTER) {
10541
+ if (features.MANDATORY_SETTER) {
10633
10542
  setWithMandatorySetter(meta$$1, obj, keyName, value);
10634
10543
  } else {
10635
10544
  obj[keyName] = value;
@@ -10641,7 +10550,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10641
10550
  return value;
10642
10551
  }
10643
10552
 
10644
- if (ember_features.MANDATORY_SETTER) {
10553
+ if (features.MANDATORY_SETTER) {
10645
10554
  setWithMandatorySetter = function (meta$$1, obj, keyName, value) {
10646
10555
  if (meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0) {
10647
10556
  makeEnumerable(obj, keyName);
@@ -10767,43 +10676,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10767
10676
  }
10768
10677
  }
10769
10678
 
10770
- /**
10771
- @module ember
10772
- */
10773
- /**
10774
- Starts watching a property on an object. Whenever the property changes,
10775
- invokes `Ember.propertyWillChange` and `Ember.propertyDidChange`. This is the
10776
- primitive used by observers and dependent keys; usually you will never call
10777
- this method directly but instead use higher level methods like
10778
- `Ember.addObserver()`
10779
-
10780
- @private
10781
- @method watch
10782
- @for Ember
10783
- @param obj
10784
- @param {String} _keyPath
10785
- */
10786
- function watch(obj, _keyPath, m) {
10787
- if (isPath(_keyPath)) {
10788
- watchPath(obj, _keyPath, m);
10789
- } else {
10790
- watchKey(obj, _keyPath, m);
10791
- }
10792
- }
10793
-
10794
- function watcherCount(obj, key) {
10795
- var meta$$1 = exports.peekMeta(obj);
10796
- return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
10797
- }
10798
-
10799
- function unwatch(obj, _keyPath, m) {
10800
- if (isPath(_keyPath)) {
10801
- unwatchPath(obj, _keyPath, m);
10802
- } else {
10803
- unwatchKey(obj, _keyPath, m);
10804
- }
10805
- }
10806
-
10807
10679
  // ..........................................................
10808
10680
  // DEPENDENT KEYS
10809
10681
  //
@@ -11148,7 +11020,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11148
11020
  }
11149
11021
 
11150
11022
  // don't create objects just to invalidate
11151
- var meta$$1 = exports.peekMeta(obj);
11023
+ var meta$$1 = peekMeta(obj);
11152
11024
  if (meta$$1 === undefined || meta$$1.source !== obj) {
11153
11025
  return;
11154
11026
  }
@@ -11379,7 +11251,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11379
11251
  @public
11380
11252
  */
11381
11253
  function cacheFor(obj, key) {
11382
- var meta$$1 = exports.peekMeta(obj);
11254
+ var meta$$1 = peekMeta(obj);
11383
11255
  var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;
11384
11256
  var ret = cache !== undefined ? cache[key] : undefined;
11385
11257
 
@@ -11476,6 +11348,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11476
11348
  }(Descriptor);
11477
11349
 
11478
11350
  function AliasedProperty_readOnlySet(obj, keyName) {
11351
+ // eslint-disable-line no-unused-vars
11479
11352
  throw new emberDebug.Error('Cannot set read-only property \'' + keyName + '\' on object: ' + emberUtils.inspect(obj));
11480
11353
  }
11481
11354
 
@@ -11649,7 +11522,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11649
11522
  }
11650
11523
 
11651
11524
  exports.flaggedInstrument = void 0;
11652
- if (ember_features.EMBER_IMPROVED_INSTRUMENTATION) {
11525
+ if (features.EMBER_IMPROVED_INSTRUMENTATION) {
11653
11526
  exports.flaggedInstrument = instrument;
11654
11527
  } else {
11655
11528
  exports.flaggedInstrument = function (name, payload, callback) {
@@ -11942,7 +11815,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11942
11815
 
11943
11816
 
11944
11817
  var backburner$1 = new Backburner(['sync', 'actions', 'destroy'], {
11945
- GUID_KEY: emberUtils.GUID_KEY,
11946
11818
  sync: {
11947
11819
  before: beginPropertyChanges,
11948
11820
  after: endPropertyChanges
@@ -12073,7 +11945,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12073
11945
  setup: Ember.run.bind(this, this.setupEditor)
12074
11946
  });
12075
11947
  }),
12076
-
11948
+
12077
11949
  didInsertElement() {
12078
11950
  tinymce.init({
12079
11951
  selector: '#' + this.$().prop('id'),
@@ -12764,7 +12636,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12764
12636
  return Libraries;
12765
12637
  }();
12766
12638
 
12767
- if (ember_features.EMBER_LIBRARIES_ISREGISTERED) {
12639
+ if (features.EMBER_LIBRARIES_ISREGISTERED) {
12768
12640
  Libraries.prototype.isRegistered = function (name) {
12769
12641
  return !!this._getLibraryByName(name);
12770
12642
  };
@@ -13319,96 +13191,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13319
13191
  */
13320
13192
 
13321
13193
 
13322
- /**
13323
- @module @ember/object
13324
- */
13325
-
13326
- function changeEvent(keyName) {
13327
- return keyName + ':change';
13328
- }
13329
-
13330
- function beforeEvent(keyName) {
13331
- return keyName + ':before';
13332
- }
13333
-
13334
- /**
13335
- @method addObserver
13336
- @static
13337
- @for @ember/object/observers
13338
- @param obj
13339
- @param {String} _path
13340
- @param {Object|Function} target
13341
- @param {Function|String} [method]
13342
- @public
13343
- */
13344
- function addObserver(obj, _path, target, method) {
13345
- addListener(obj, changeEvent(_path), target, method);
13346
- watch(obj, _path);
13347
-
13348
- return this;
13349
- }
13350
-
13351
- /**
13352
- @method removeObserver
13353
- @static
13354
- @for @ember/object/observers
13355
- @param obj
13356
- @param {String} path
13357
- @param {Object|Function} target
13358
- @param {Function|String} [method]
13359
- @public
13360
- */
13361
- function removeObserver(obj, path, target, method) {
13362
- unwatch(obj, path);
13363
- removeListener(obj, changeEvent(path), target, method);
13364
-
13365
- return this;
13366
- }
13367
-
13368
- /**
13369
- @method _addBeforeObserver
13370
- @static
13371
- @for @ember/object/observers
13372
- @param obj
13373
- @param {String} path
13374
- @param {Object|Function} target
13375
- @param {Function|String} [method]
13376
- @deprecated
13377
- @private
13378
- */
13379
- function _addBeforeObserver(obj, path, target, method) {
13380
- addListener(obj, beforeEvent(path), target, method);
13381
- watch(obj, path);
13382
-
13383
- return this;
13384
- }
13385
-
13386
- // Suspend observer during callback.
13387
- //
13388
- // This should only be used by the target of the observer
13389
- // while it is setting the observed path.
13390
- function _suspendObserver(obj, path, target, method, callback) {
13391
- return suspendListener(obj, changeEvent(path), target, method, callback);
13392
- }
13393
-
13394
- /**
13395
- @method removeBeforeObserver
13396
- @static
13397
- @for @ember/object/observers
13398
- @param obj
13399
- @param {String} path
13400
- @param {Object|Function} target
13401
- @param {Function|String} [method]
13402
- @deprecated
13403
- @private
13404
- */
13405
- function _removeBeforeObserver(obj, path, target, method) {
13406
- unwatch(obj, path);
13407
- removeListener(obj, beforeEvent(path), target, method);
13408
-
13409
- return this;
13410
- }
13411
-
13412
13194
  /**
13413
13195
  @module ember
13414
13196
  */
@@ -13615,12 +13397,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13615
13397
  /* Called when the from side changes. */
13616
13398
 
13617
13399
  Binding.prototype.fromDidChange = function () {
13400
+ // eslint-disable-line no-unused-vars
13618
13401
  this._scheduleSync('fwd');
13619
13402
  };
13620
13403
 
13621
13404
  /* Called when the to side changes. */
13622
13405
 
13623
13406
  Binding.prototype.toDidChange = function () {
13407
+ // eslint-disable-line no-unused-vars
13624
13408
  this._scheduleSync('back');
13625
13409
  };
13626
13410
 
@@ -13925,9 +13709,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13925
13709
  }
13926
13710
 
13927
13711
  function giveDescriptorSuper(meta$$1, key, property, values, descs, base) {
13928
- var superProperty = void 0,
13929
- possibleDesc,
13930
- superDesc;
13712
+ var superProperty = void 0;
13931
13713
 
13932
13714
  // Computed properties override methods, and do not call super to them
13933
13715
  if (values[key] === undefined) {
@@ -13938,11 +13720,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13938
13720
  // If we didn't find the original descriptor in a parent mixin, find
13939
13721
  // it on the original object.
13940
13722
  if (!superProperty) {
13941
- possibleDesc = base[key];
13942
- superDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
13943
-
13944
-
13945
- superProperty = superDesc;
13723
+ superProperty = descriptorFor(base, key, meta$$1);
13946
13724
  }
13947
13725
 
13948
13726
  if (superProperty === undefined || !(superProperty instanceof ComputedProperty)) {
@@ -13966,24 +13744,26 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13966
13744
  }
13967
13745
 
13968
13746
  function giveMethodSuper(obj, key, method, values, descs) {
13969
- var superMethod = void 0;
13970
-
13971
13747
  // Methods overwrite computed properties, and do not call super to them.
13972
- if (descs[key] === undefined) {
13973
- // Find the original method in a parent mixin
13974
- superMethod = values[key];
13748
+ if (descs[key] !== undefined) {
13749
+ return method;
13975
13750
  }
13976
13751
 
13752
+ // Find the original method in a parent mixin
13753
+ var superMethod = values[key];
13754
+
13977
13755
  // If we didn't find the original value in a parent mixin, find it in
13978
13756
  // the original object
13979
- superMethod = superMethod || obj[key];
13757
+ if (superMethod === undefined && (!features.EMBER_METAL_ES5_GETTERS || descriptorFor(obj, key) === undefined)) {
13758
+ superMethod = obj[key];
13759
+ }
13980
13760
 
13981
13761
  // Only wrap the new method if the original method was a function
13982
- if (superMethod === undefined || 'function' !== typeof superMethod) {
13983
- return method;
13762
+ if (typeof superMethod === 'function') {
13763
+ return emberUtils.wrap(method, superMethod);
13984
13764
  }
13985
13765
 
13986
- return emberUtils.wrap(method, superMethod);
13766
+ return method;
13987
13767
  }
13988
13768
 
13989
13769
  function applyConcatenatedProperties(obj, key, value, values) {
@@ -14052,7 +13832,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14052
13832
 
14053
13833
  function addNormalizedProperty(base, key, value, meta$$1, descs, values, concats, mergings) {
14054
13834
  if (value instanceof Descriptor) {
14055
- if (value === REQUIRED && descs[key]) {
13835
+ if (emberEnvironment.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT && value === REQUIRED && descs[key]) {
14056
13836
  return CONTINUE;
14057
13837
  }
14058
13838
 
@@ -14101,6 +13881,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14101
13881
  }
14102
13882
 
14103
13883
  if (props) {
13884
+ // remove willMergeMixin after 3.4 as it was used for _actions
14104
13885
  if (base.willMergeMixin) {
14105
13886
  base.willMergeMixin(props);
14106
13887
  }
@@ -14172,7 +13953,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14172
13953
  if (descs[altKey] || values[altKey]) {
14173
13954
  value = values[altKey];
14174
13955
  desc = descs[altKey];
14175
- } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor) {
13956
+ } else if ((possibleDesc = descriptorFor(obj, altKey)) !== undefined) {
14176
13957
  desc = possibleDesc;
14177
13958
  value = undefined;
14178
13959
  } else {
@@ -14193,19 +13974,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14193
13974
  }
14194
13975
  }
14195
13976
 
14196
- function replaceObserversAndListeners(obj, key, observerOrListener) {
14197
- var prev = obj[key];
14198
-
13977
+ function replaceObserversAndListeners(obj, key, prev, next) {
14199
13978
  if (typeof prev === 'function') {
14200
13979
  updateObserversAndListeners(obj, key, prev.__ember_observesBefore__, _removeBeforeObserver);
14201
13980
  updateObserversAndListeners(obj, key, prev.__ember_observes__, removeObserver);
14202
13981
  updateObserversAndListeners(obj, key, prev.__ember_listens__, removeListener);
14203
13982
  }
14204
13983
 
14205
- if (typeof observerOrListener === 'function') {
14206
- updateObserversAndListeners(obj, key, observerOrListener.__ember_observesBefore__, _addBeforeObserver);
14207
- updateObserversAndListeners(obj, key, observerOrListener.__ember_observes__, addObserver);
14208
- updateObserversAndListeners(obj, key, observerOrListener.__ember_listens__, addListener);
13984
+ if (typeof next === 'function') {
13985
+ updateObserversAndListeners(obj, key, next.__ember_observesBefore__, _addBeforeObserver);
13986
+ updateObserversAndListeners(obj, key, next.__ember_observes__, addObserver);
13987
+ updateObserversAndListeners(obj, key, next.__ember_listens__, addListener);
14209
13988
  }
14210
13989
  }
14211
13990
 
@@ -14240,7 +14019,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14240
14019
  desc = descs[key];
14241
14020
  value = values[key];
14242
14021
 
14243
- if (desc === REQUIRED) {
14022
+ if (emberEnvironment.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT && desc === REQUIRED) {
14244
14023
  continue;
14245
14024
  }
14246
14025
 
@@ -14255,7 +14034,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14255
14034
  continue;
14256
14035
  }
14257
14036
 
14258
- replaceObserversAndListeners(obj, key, value);
14037
+ if (features.EMBER_METAL_ES5_GETTERS && descriptorFor(obj, key) !== undefined) {
14038
+ replaceObserversAndListeners(obj, key, null, value);
14039
+ } else {
14040
+ replaceObserversAndListeners(obj, key, obj[key], value);
14041
+ }
14259
14042
 
14260
14043
  if (detectBinding(key)) {
14261
14044
  meta$$1.writeBindings(key, value);
@@ -14437,7 +14220,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14437
14220
 
14438
14221
 
14439
14222
  Mixin.mixins = function (obj) {
14440
- var meta$$1 = exports.peekMeta(obj);
14223
+ var meta$$1 = peekMeta(obj);
14441
14224
  var ret = [];
14442
14225
  if (meta$$1 === undefined) {
14443
14226
  return ret;
@@ -14516,7 +14299,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14516
14299
  if (obj instanceof Mixin) {
14517
14300
  return _detect(obj, this, {});
14518
14301
  }
14519
- var meta$$1 = exports.peekMeta(obj);
14302
+ var meta$$1 = peekMeta(obj);
14520
14303
  if (meta$$1 === undefined) {
14521
14304
  return false;
14522
14305
  }
@@ -14684,76 +14467,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14684
14467
  @public
14685
14468
  @static
14686
14469
  */
14687
- function observer() {
14688
- var _paths = void 0,
14689
- func = void 0,
14690
- _len5,
14691
- args,
14692
- _key5,
14693
- i;
14694
-
14695
- for (_len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
14696
- args[_key5] = arguments[_key5];
14697
- }
14698
-
14699
- if (typeof args[args.length - 1] !== 'function') {
14700
- // revert to old, soft-deprecated argument ordering
14701
- true && !false && emberDebug.deprecate('Passing the dependentKeys after the callback function in observer is deprecated. Ensure the callback function is the last argument.', false, { id: 'ember-metal.observer-argument-order', until: '3.0.0' });
14702
-
14703
- func = args.shift();
14704
- _paths = args;
14705
- } else {
14706
- func = args.pop();
14707
- _paths = args;
14708
- }
14709
-
14710
- true && !(typeof func === 'function') && emberDebug.assert('observer called without a function', typeof func === 'function');
14711
- true && !(_paths.length > 0 && _paths.every(function (p) {
14712
- return typeof p === 'string' && p.length;
14713
- })) && emberDebug.assert('observer called without valid path', _paths.length > 0 && _paths.every(function (p) {
14714
- return typeof p === 'string' && p.length;
14715
- }));
14716
-
14717
- var paths = [];
14718
- var addWatchedProperty = function (path) {
14719
- return paths.push(path);
14720
- };
14721
-
14722
- for (i = 0; i < _paths.length; ++i) {
14723
- expandProperties(_paths[i], addWatchedProperty);
14724
- }
14725
-
14726
- func.__ember_observes__ = paths;
14727
- return func;
14728
- }
14729
-
14730
- /**
14731
- Specify a method that observes property changes.
14732
-
14733
- ```javascript
14734
- import EmberObject from '@ember/object';
14735
-
14736
- EmberObject.extend({
14737
- valueObserver: Ember.immediateObserver('value', function() {
14738
- // Executes whenever the "value" property changes
14739
- })
14740
- });
14741
- ```
14742
-
14743
- In the future, `observer` may become asynchronous. In this event,
14744
- `immediateObserver` will maintain the synchronous behavior.
14745
-
14746
- Also available as `Function.prototype.observesImmediately` if prototype extensions are
14747
- enabled.
14748
-
14749
- @method _immediateObserver
14750
- @for Ember
14751
- @param {String} propertyNames*
14752
- @param {Function} func
14753
- @deprecated Use `observer` instead.
14754
- @return func
14755
- @private
14756
- */
14757
14470
 
14758
14471
 
14759
14472
  /**
@@ -14799,10 +14512,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14799
14512
  }
14800
14513
 
14801
14514
  function injectedPropertyGet(keyName) {
14802
- var desc = this[keyName];
14515
+ var desc = descriptorFor(this, keyName);
14803
14516
  var owner = emberUtils.getOwner(this) || this.container; // fallback to `container` for backwards compat
14804
14517
 
14805
- true && !(desc && desc.isDescriptor && desc.type) && emberDebug.assert('InjectedProperties should be defined with the inject computed property macros.', desc && desc.isDescriptor && desc.type);
14518
+ true && !(desc && desc.type) && emberDebug.assert('InjectedProperties should be defined with the inject computed property macros.', desc && desc.type);
14806
14519
  true && !owner && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
14807
14520
 
14808
14521
  return owner.lookup(desc.type + ':' + (desc.name || keyName));
@@ -14846,6 +14559,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14846
14559
  Object.defineProperty(obj, key, this.desc);
14847
14560
  };
14848
14561
 
14562
+ Descriptor$$1.prototype.get = function (obj, key) {
14563
+ return obj[key];
14564
+ };
14565
+
14566
+ Descriptor$$1.prototype.set = function (obj, key, value) {
14567
+ return obj[key] = value;
14568
+ };
14569
+
14849
14570
  Descriptor$$1.prototype.teardown = function () {};
14850
14571
 
14851
14572
  return Descriptor$$1;
@@ -14969,14 +14690,19 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14969
14690
  exports.getDispatchOverride = function () {
14970
14691
  return dispatchOverride;
14971
14692
  };
14972
- exports.META_DESC = META_DESC;
14693
+ exports.descriptorFor = descriptorFor;
14973
14694
  exports.meta = meta;
14695
+ exports.peekMeta = peekMeta;
14974
14696
  exports.deleteMeta = function (obj) {
14697
+ true && !(obj !== null) && emberDebug.assert('Cannot call `deleteMeta` on null', obj !== null);
14698
+ true && !(obj !== undefined) && emberDebug.assert('Cannot call `deleteMeta` on undefined', obj !== undefined);
14699
+ true && !(typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call `deleteMeta` on ' + typeof obj, typeof obj === 'object' || typeof obj === 'function');
14700
+
14975
14701
  {
14976
14702
  counters.deleteCalls++;
14977
14703
  }
14978
14704
 
14979
- var meta = exports.peekMeta(obj);
14705
+ var meta = peekMeta(obj);
14980
14706
  if (meta !== undefined) {
14981
14707
  meta.destroy();
14982
14708
  }
@@ -14994,11 +14720,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14994
14720
  };
14995
14721
  exports.set = set;
14996
14722
  exports.trySet = trySet;
14997
- exports.WeakMap = WeakMap$1;
14998
- exports.WeakMapPolyfill = WeakMapPolyfill;
14999
14723
  exports.addListener = addListener;
15000
14724
  exports.hasListeners = function (obj, eventName) {
15001
- var meta$$1 = exports.peekMeta(obj);
14725
+ var meta$$1 = peekMeta(obj);
15002
14726
  if (meta$$1 === undefined) {
15003
14727
  return false;
15004
14728
  }
@@ -15032,7 +14756,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15032
14756
  exports.suspendListener = suspendListener;
15033
14757
  exports.suspendListeners = suspendListeners;
15034
14758
  exports.watchedEvents = function (obj) {
15035
- var meta$$1 = exports.peekMeta(obj);
14759
+ var meta$$1 = peekMeta(obj);
15036
14760
  return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];
15037
14761
  };
15038
14762
  exports.isNone = isNone;
@@ -15132,54 +14856,29 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15132
14856
  exports.aliasMethod = function (methodName) {
15133
14857
  return new Alias(methodName);
15134
14858
  };
15135
- exports._immediateObserver = function () {
15136
- var i, arg;
15137
-
15138
- true && !false && emberDebug.deprecate('Usage of `Ember.immediateObserver` is deprecated, use `observer` instead.', false, { id: 'ember-metal.immediate-observer', until: '3.0.0' });
15139
-
15140
- for (i = 0; i < arguments.length; i++) {
15141
- arg = arguments[i];
15142
-
15143
- true && !(typeof arg !== 'string' || arg.indexOf('.') === -1) && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);
15144
- }
15145
-
15146
- return observer.apply(this, arguments);
15147
- };
15148
14859
  exports._beforeObserver = function () {
15149
14860
  for (_len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
15150
14861
  args[_key6] = arguments[_key6];
15151
14862
  }
15152
14863
 
15153
- var func = args[args.length - 1],
14864
+ var func = args.pop(),
15154
14865
  _len6,
15155
14866
  args,
15156
14867
  _key6,
15157
14868
  i;
15158
- var paths = void 0;
14869
+ var _paths = args;
14870
+
14871
+ true && !(typeof func === 'function') && emberDebug.assert('_beforeObserver called without a function', typeof func === 'function');
15159
14872
 
14873
+ var paths = [];
15160
14874
  var addWatchedProperty = function (path) {
15161
14875
  paths.push(path);
15162
14876
  };
15163
14877
 
15164
- var _paths = args.slice(0, -1);
15165
-
15166
- if (typeof func !== 'function') {
15167
- // revert to old, soft-deprecated argument ordering
15168
-
15169
- func = args[0];
15170
- _paths = args.slice(1);
15171
- }
15172
-
15173
- paths = [];
15174
-
15175
14878
  for (i = 0; i < _paths.length; ++i) {
15176
14879
  expandProperties(_paths[i], addWatchedProperty);
15177
14880
  }
15178
14881
 
15179
- if (typeof func !== 'function') {
15180
- throw new emberDebug.EmberError('_beforeObserver called without a function');
15181
- }
15182
-
15183
14882
  func.__ember_observesBefore__ = paths;
15184
14883
  return func;
15185
14884
  };
@@ -15193,7 +14892,37 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15193
14892
  applyMixin(obj, args, false);
15194
14893
  return obj;
15195
14894
  };
15196
- exports.observer = observer;
14895
+ exports.observer = function () {
14896
+ for (_len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
14897
+ args[_key5] = arguments[_key5];
14898
+ }
14899
+
14900
+ var func = args.pop(),
14901
+ _len5,
14902
+ args,
14903
+ _key5,
14904
+ i;
14905
+ var _paths = args;
14906
+
14907
+ true && !(typeof func === 'function') && emberDebug.assert('observer called without a function', typeof func === 'function');
14908
+ true && !(_paths.length > 0 && _paths.every(function (p) {
14909
+ return typeof p === 'string' && p.length;
14910
+ })) && emberDebug.assert('observer called without valid path', _paths.length > 0 && _paths.every(function (p) {
14911
+ return typeof p === 'string' && p.length;
14912
+ }));
14913
+
14914
+ var paths = [];
14915
+ var addWatchedProperty = function (path) {
14916
+ return paths.push(path);
14917
+ };
14918
+
14919
+ for (i = 0; i < _paths.length; ++i) {
14920
+ expandProperties(_paths[i], addWatchedProperty);
14921
+ }
14922
+
14923
+ func.__ember_observes__ = paths;
14924
+ return func;
14925
+ };
15197
14926
  exports.required = function () {
15198
14927
  true && !false && emberDebug.deprecate('Ember.required is deprecated as its behavior is inconsistent and unreliable.', false, { id: 'ember-metal.required', until: '3.0.0' });
15199
14928
 
@@ -15218,7 +14947,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15218
14947
  };
15219
14948
  exports.tagForProperty = function (object, propertyKey, _meta) {
15220
14949
  if (typeof object !== 'object' || object === null) {
15221
- return _glimmer_reference.CONSTANT_TAG;
14950
+ return reference.CONSTANT_TAG;
15222
14951
  }
15223
14952
 
15224
14953
  var meta$$1 = _meta === undefined ? meta(object) : _meta;
@@ -15266,7 +14995,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15266
14995
  var meta$$1;
15267
14996
 
15268
14997
  if (typeof value === 'object' && value !== null) {
15269
- meta$$1 = exports.peekMeta(value);
14998
+ meta$$1 = peekMeta(value);
15270
14999
 
15271
15000
  return meta$$1 === undefined ? false : meta$$1.isProxy();
15272
15001
  }
@@ -15366,7 +15095,7 @@ enifed('ember-template-compiler/plugins/assert-input-helper-without-block', ['ex
15366
15095
  return 'The {{input}} helper cannot be used in block form. ' + sourceInformation;
15367
15096
  }
15368
15097
  });
15369
- enifed('ember-template-compiler/plugins/assert-reserved-named-arguments', ['exports', 'ember-debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberDebug, _calculateLocationDisplay) {
15098
+ enifed('ember-template-compiler/plugins/assert-reserved-named-arguments', ['exports', 'ember-debug', 'ember/features', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberDebug, _features, _calculateLocationDisplay) {
15370
15099
  'use strict';
15371
15100
 
15372
15101
  exports.default = function (env) {
@@ -15376,27 +15105,49 @@ enifed('ember-template-compiler/plugins/assert-reserved-named-arguments', ['expo
15376
15105
  name: 'assert-reserved-named-arguments',
15377
15106
 
15378
15107
  visitors: {
15379
- PathExpression: function (node) {
15380
- if (node.original[0] === '@') {
15381
- true && !false && (0, _emberDebug.assert)(assertMessage(moduleName, node));
15108
+ PathExpression: function (_ref) {
15109
+ var original = _ref.original,
15110
+ loc = _ref.loc;
15111
+
15112
+ if (isReserved(original)) {
15113
+ true && !false && (0, _emberDebug.assert)(assertMessage(original) + ' ' + (0, _calculateLocationDisplay.default)(moduleName, loc));
15382
15114
  }
15383
15115
  }
15384
15116
  }
15385
15117
  };
15386
15118
  };
15387
15119
 
15120
+ var RESERVED = ['@arguments', '@args'];
15388
15121
 
15389
- function assertMessage(moduleName, node) {
15390
- var path = node.original;
15391
- var source = (0, _calculateLocationDisplay.default)(moduleName, node.loc);
15122
+ var isReserved = void 0,
15123
+ assertMessage = void 0;
15392
15124
 
15393
- return '\'' + path + '\' is not a valid path. ' + source;
15125
+ if (_features.EMBER_GLIMMER_NAMED_ARGUMENTS) {
15126
+ isReserved = function (name) {
15127
+ return RESERVED.indexOf(name) !== -1 || name.match(/^@[^a-z]/);
15128
+ };
15129
+ assertMessage = function (name) {
15130
+ return '\'' + name + '\' is reserved.';
15131
+ };
15132
+ } else {
15133
+ isReserved = function (name) {
15134
+ return name[0] === '@';
15135
+ };
15136
+ assertMessage = function (name) {
15137
+ return '\'' + name + '\' is not a valid path.';
15138
+ };
15394
15139
  }
15395
15140
  });
15396
15141
  enifed('ember-template-compiler/plugins/deprecate-render-model', ['exports', 'ember-debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberDebug, _calculateLocationDisplay) {
15397
15142
  'use strict';
15398
15143
 
15399
- exports.default = function (env) {
15144
+ exports.default =
15145
+
15146
+ /*
15147
+ * Remove after 3.4 once _ENABLE_RENDER_SUPPORT flag is no
15148
+ * longer needed.
15149
+ */
15150
+ function (env) {
15400
15151
  var moduleName = env.meta.moduleName;
15401
15152
 
15402
15153
  return {
@@ -15422,7 +15173,6 @@ enifed('ember-template-compiler/plugins/deprecate-render-model', ['exports', 'em
15422
15173
  };
15423
15174
  };
15424
15175
 
15425
-
15426
15176
  function deprecationMessage(moduleName, node, param) {
15427
15177
  var sourceInformation = (0, _calculateLocationDisplay.default)(moduleName, node.loc);
15428
15178
  var componentName = node.params[0].original;
@@ -15435,7 +15185,13 @@ enifed('ember-template-compiler/plugins/deprecate-render-model', ['exports', 'em
15435
15185
  enifed('ember-template-compiler/plugins/deprecate-render', ['exports', 'ember-debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberDebug, _calculateLocationDisplay) {
15436
15186
  'use strict';
15437
15187
 
15438
- exports.default = function (env) {
15188
+ exports.default =
15189
+
15190
+ /*
15191
+ * Remove after 3.4 once _ENABLE_RENDER_SUPPORT flag is no
15192
+ * longer needed.
15193
+ */
15194
+ function (env) {
15439
15195
  var moduleName = env.meta.moduleName;
15440
15196
 
15441
15197
  return {
@@ -15466,7 +15222,6 @@ enifed('ember-template-compiler/plugins/deprecate-render', ['exports', 'ember-de
15466
15222
  };
15467
15223
  };
15468
15224
 
15469
-
15470
15225
  function each(list, callback) {
15471
15226
  var i, l;
15472
15227
 
@@ -15506,10 +15261,10 @@ enifed('ember-template-compiler/plugins/extract-pragma-tag', ['exports'], functi
15506
15261
  };
15507
15262
  var PRAGMA_TAG = 'use-component-manager';
15508
15263
  });
15509
- enifed('ember-template-compiler/plugins/index', ['exports', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-input-on-to-onEvent', 'ember-template-compiler/plugins/transform-top-level-components', 'ember-template-compiler/plugins/transform-inline-link-to', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-quoted-bindings-into-just-bindings', 'ember-template-compiler/plugins/deprecate-render-model', 'ember-template-compiler/plugins/deprecate-render', 'ember-template-compiler/plugins/assert-reserved-named-arguments', 'ember-template-compiler/plugins/transform-action-syntax', 'ember-template-compiler/plugins/transform-input-type-syntax', 'ember-template-compiler/plugins/transform-attrs-into-args', 'ember-template-compiler/plugins/transform-each-in-into-each', 'ember-template-compiler/plugins/transform-has-block-syntax', 'ember-template-compiler/plugins/transform-dot-component-invocation', 'ember-template-compiler/plugins/extract-pragma-tag', 'ember-template-compiler/plugins/assert-input-helper-without-block', 'ember/features'], function (exports, _transformOldBindingSyntax, _transformAngleBracketComponents, _transformInputOnToOnEvent, _transformTopLevelComponents, _transformInlineLinkTo, _transformOldClassBindingSyntax, _transformQuotedBindingsIntoJustBindings, _deprecateRenderModel, _deprecateRender, _assertReservedNamedArguments, _transformActionSyntax, _transformInputTypeSyntax, _transformAttrsIntoArgs, _transformEachInIntoEach, _transformHasBlockSyntax, _transformDotComponentInvocation, _extractPragmaTag, _assertInputHelperWithoutBlock, _features) {
15264
+ enifed('ember-template-compiler/plugins/index', ['exports', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-top-level-components', 'ember-template-compiler/plugins/transform-inline-link-to', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-quoted-bindings-into-just-bindings', 'ember-template-compiler/plugins/deprecate-render-model', 'ember-template-compiler/plugins/deprecate-render', 'ember-template-compiler/plugins/assert-reserved-named-arguments', 'ember-template-compiler/plugins/transform-action-syntax', 'ember-template-compiler/plugins/transform-input-type-syntax', 'ember-template-compiler/plugins/transform-attrs-into-args', 'ember-template-compiler/plugins/transform-each-in-into-each', 'ember-template-compiler/plugins/transform-has-block-syntax', 'ember-template-compiler/plugins/transform-dot-component-invocation', 'ember-template-compiler/plugins/extract-pragma-tag', 'ember-template-compiler/plugins/assert-input-helper-without-block', 'ember/features'], function (exports, _transformOldBindingSyntax, _transformAngleBracketComponents, _transformTopLevelComponents, _transformInlineLinkTo, _transformOldClassBindingSyntax, _transformQuotedBindingsIntoJustBindings, _deprecateRenderModel, _deprecateRender, _assertReservedNamedArguments, _transformActionSyntax, _transformInputTypeSyntax, _transformAttrsIntoArgs, _transformEachInIntoEach, _transformHasBlockSyntax, _transformDotComponentInvocation, _extractPragmaTag, _assertInputHelperWithoutBlock, _features) {
15510
15265
  'use strict';
15511
15266
 
15512
- var transforms = [_transformDotComponentInvocation.default, _transformOldBindingSyntax.default, _transformAngleBracketComponents.default, _transformInputOnToOnEvent.default, _transformTopLevelComponents.default, _transformInlineLinkTo.default, _transformOldClassBindingSyntax.default, _transformQuotedBindingsIntoJustBindings.default, _deprecateRenderModel.default, _deprecateRender.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _transformInputTypeSyntax.default, _transformAttrsIntoArgs.default, _transformEachInIntoEach.default, _transformHasBlockSyntax.default, _assertInputHelperWithoutBlock.default];
15267
+ var transforms = [_transformDotComponentInvocation.default, _transformOldBindingSyntax.default, _transformAngleBracketComponents.default, _transformTopLevelComponents.default, _transformInlineLinkTo.default, _transformOldClassBindingSyntax.default, _transformQuotedBindingsIntoJustBindings.default, _deprecateRenderModel.default, _deprecateRender.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _transformInputTypeSyntax.default, _transformAttrsIntoArgs.default, _transformEachInIntoEach.default, _transformHasBlockSyntax.default, _assertInputHelperWithoutBlock.default];
15513
15268
 
15514
15269
  if (_features.GLIMMER_CUSTOM_COMPONENT_MANAGER) {
15515
15270
  transforms.push(_extractPragmaTag.default);
@@ -15584,7 +15339,7 @@ enifed('ember-template-compiler/plugins/transform-action-syntax', ['exports'], f
15584
15339
  enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['exports'], function (exports) {
15585
15340
  'use strict';
15586
15341
 
15587
- exports.default = function () {
15342
+ exports.default = function () /* env */{
15588
15343
  return {
15589
15344
  name: 'transform-angle-bracket-components',
15590
15345
 
@@ -15916,124 +15671,6 @@ enifed('ember-template-compiler/plugins/transform-inline-link-to', ['exports'],
15916
15671
  return b.sexpr('-html-safe', [expr]);
15917
15672
  }
15918
15673
  });
15919
- enifed('ember-template-compiler/plugins/transform-input-on-to-onEvent', ['exports', 'ember-debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberDebug, _calculateLocationDisplay) {
15920
- 'use strict';
15921
-
15922
- exports.default =
15923
-
15924
- /**
15925
- @module ember
15926
- */
15927
-
15928
- /**
15929
- An HTMLBars AST transformation that replaces all instances of
15930
-
15931
- ```handlebars
15932
- {{input on="enter" action="doStuff"}}
15933
- {{input on="key-press" action="doStuff"}}
15934
- ```
15935
-
15936
- with
15937
-
15938
- ```handlebars
15939
- {{input enter="doStuff"}}
15940
- {{input key-press="doStuff"}}
15941
- ```
15942
-
15943
- @private
15944
- @class TransformInputOnToOnEvent
15945
- */
15946
- function (env) {
15947
- var b = env.syntax.builders;
15948
- var moduleName = env.meta.moduleName;
15949
-
15950
- return {
15951
- name: 'transform-input-on-to-onEvent',
15952
-
15953
- visitors: {
15954
- MustacheStatement: function (node) {
15955
- if (node.path.original !== 'input') {
15956
- return;
15957
- }
15958
-
15959
- var action = hashPairForKey(node.hash, 'action');
15960
- var on = hashPairForKey(node.hash, 'on');
15961
- var onEvent = hashPairForKey(node.hash, 'onEvent');
15962
-
15963
- if (!action && !on && !onEvent) {
15964
- return;
15965
- }
15966
-
15967
- var normalizedOn = on || onEvent;
15968
- var moduleInfo = (0, _calculateLocationDisplay.default)(moduleName, node.loc);
15969
-
15970
- if (normalizedOn && normalizedOn.value.type !== 'StringLiteral') {
15971
- true && !false && (0, _emberDebug.deprecate)('Using a dynamic value for \'#{normalizedOn.key}=\' with the \'{{input}}\' helper ' + moduleInfo + 'is deprecated.', false, { id: 'ember-template-compiler.transform-input-on-to-onEvent.dynamic-value', until: '3.0.0' });
15972
-
15973
- normalizedOn.key = 'onEvent';
15974
- return; // exit early, as we cannot transform further
15975
- }
15976
-
15977
- removeFromHash(node.hash, normalizedOn);
15978
- removeFromHash(node.hash, action);
15979
-
15980
- if (!action) {
15981
- true && !false && (0, _emberDebug.deprecate)('Using \'{{input ' + normalizedOn.key + '="' + normalizedOn.value.value + '" ...}}\' without specifying an action ' + moduleInfo + 'will do nothing.', false, { id: 'ember-template-compiler.transform-input-on-to-onEvent.no-action', until: '3.0.0' });
15982
-
15983
- return; // exit early, if no action was available there is nothing to do
15984
- }
15985
-
15986
- var specifiedOn = normalizedOn ? normalizedOn.key + '="' + normalizedOn.value.value + '" ' : '';
15987
- if (normalizedOn && normalizedOn.value.value === 'keyPress') {
15988
- // using `keyPress` in the root of the component will
15989
- // clobber the keyPress event handler
15990
- normalizedOn.value.value = 'key-press';
15991
- }
15992
-
15993
- var expected = (normalizedOn ? normalizedOn.value.value : 'enter') + '="' + action.value.original + '"';
15994
-
15995
- true && !false && (0, _emberDebug.deprecate)('Using \'{{input ' + specifiedOn + 'action="' + action.value.original + '"}}\' ' + moduleInfo + 'is deprecated. Please use \'{{input ' + expected + '}}\' instead.', false, { id: 'ember-template-compiler.transform-input-on-to-onEvent.normalized-on', until: '3.0.0' });
15996
-
15997
- if (!normalizedOn) {
15998
- normalizedOn = b.pair('onEvent', b.string('enter'));
15999
- }
16000
-
16001
- node.hash.pairs.push(b.pair(normalizedOn.value.value, action.value));
16002
- }
16003
- }
16004
- };
16005
- };
16006
-
16007
- function hashPairForKey(hash, key) {
16008
- var i, pair;
16009
-
16010
- for (i = 0; i < hash.pairs.length; i++) {
16011
- pair = hash.pairs[i];
16012
-
16013
- if (pair.key === key) {
16014
- return pair;
16015
- }
16016
- }
16017
-
16018
- return false;
16019
- }
16020
-
16021
- function removeFromHash(hash, pairToRemove) {
16022
- var newPairs = [],
16023
- i,
16024
- pair;
16025
- for (i = 0; i < hash.pairs.length; i++) {
16026
- pair = hash.pairs[i];
16027
-
16028
-
16029
- if (pair !== pairToRemove) {
16030
- newPairs.push(pair);
16031
- }
16032
- }
16033
-
16034
- hash.pairs = newPairs;
16035
- }
16036
- });
16037
15674
  enifed('ember-template-compiler/plugins/transform-input-type-syntax', ['exports'], function (exports) {
16038
15675
  'use strict';
16039
15676
 
@@ -16216,7 +15853,6 @@ enifed('ember-template-compiler/plugins/transform-old-class-binding-syntax', ['e
16216
15853
 
16217
15854
  each(allOfTheMicrosyntaxes, function (_ref) {
16218
15855
  var value = _ref.value,
16219
- loc = _ref.loc,
16220
15856
  microsyntax;
16221
15857
 
16222
15858
  var sexprs = [];
@@ -16303,7 +15939,7 @@ enifed('ember-template-compiler/plugins/transform-old-class-binding-syntax', ['e
16303
15939
  enifed('ember-template-compiler/plugins/transform-quoted-bindings-into-just-bindings', ['exports'], function (exports) {
16304
15940
  'use strict';
16305
15941
 
16306
- exports.default = function () {
15942
+ exports.default = function () /* env */{
16307
15943
 
16308
15944
  return {
16309
15945
  name: 'transform-quoted-bindings-into-just-bindings',
@@ -16353,7 +15989,7 @@ enifed('ember-template-compiler/plugins/transform-quoted-bindings-into-just-bind
16353
15989
  enifed('ember-template-compiler/plugins/transform-top-level-components', ['exports'], function (exports) {
16354
15990
  'use strict';
16355
15991
 
16356
- exports.default = function () {
15992
+ exports.default = function () /* env */{
16357
15993
  return {
16358
15994
  name: 'transform-top-level-component',
16359
15995
 
@@ -16510,7 +16146,6 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16510
16146
  var options = (0, _emberUtils.assign)({ meta: {} }, _options),
16511
16147
  meta,
16512
16148
  potententialPugins,
16513
- providedPlugins,
16514
16149
  pluginsToAdd;
16515
16150
 
16516
16151
  // move `moduleName` into `meta` property
@@ -16524,14 +16159,11 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16524
16159
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
16525
16160
  } else {
16526
16161
  potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
16527
- providedPlugins = options.plugins.ast.map(function (plugin) {
16528
- return wrapLegacyPluginIfNeeded(plugin);
16529
- });
16530
16162
  pluginsToAdd = potententialPugins.filter(function (plugin) {
16531
16163
  return options.plugins.ast.indexOf(plugin) === -1;
16532
16164
  });
16533
16165
 
16534
- options.plugins.ast = providedPlugins.concat(pluginsToAdd);
16166
+ options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
16535
16167
  }
16536
16168
 
16537
16169
  return options;
@@ -16541,65 +16173,40 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16541
16173
  throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16542
16174
  }
16543
16175
 
16544
- for (i = 0; i < USER_PLUGINS.length; i++) {
16545
- PLUGIN = USER_PLUGINS[i];
16546
-
16547
- if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
16548
- return;
16549
- }
16550
- }
16551
-
16552
- var plugin = wrapLegacyPluginIfNeeded(_plugin),
16553
- i,
16554
- PLUGIN;
16555
-
16556
- USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16557
- };
16558
- exports.unregisterPlugin = function (type, PluginClass) {
16559
- if (type !== 'ast') {
16560
- throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16561
- }
16562
-
16563
- USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16564
- return plugin !== PluginClass && plugin.__raw !== PluginClass;
16565
- });
16566
- };
16567
-
16568
- var USER_PLUGINS = [];
16569
-
16570
- function wrapLegacyPluginIfNeeded(_plugin) {
16571
- var plugin = _plugin;
16176
+ var plugin = void 0;
16572
16177
  if (_plugin.prototype && _plugin.prototype.transform) {
16573
16178
  plugin = function (env) {
16574
- var pluginInstantiated = false;
16575
-
16576
16179
  return {
16577
16180
  name: _plugin.constructor && _plugin.constructor.name,
16578
16181
 
16579
16182
  visitors: {
16580
16183
  Program: function (node) {
16581
- var _plugin2;
16582
-
16583
- if (!pluginInstantiated) {
16184
+ var plugin = new _plugin(env);
16584
16185
 
16585
- pluginInstantiated = true;
16586
- _plugin2 = new _plugin(env);
16186
+ plugin.syntax = env.syntax;
16587
16187
 
16588
-
16589
- _plugin2.syntax = env.syntax;
16590
-
16591
- return _plugin2.transform(node);
16592
- }
16188
+ return plugin.transform(node);
16593
16189
  }
16594
16190
  }
16595
16191
  };
16596
16192
  };
16193
+ } else {
16194
+ plugin = _plugin;
16195
+ }
16597
16196
 
16598
- plugin.__raw = _plugin;
16197
+ USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16198
+ };
16199
+ exports.removePlugin = function (type, PluginClass) {
16200
+ if (type !== 'ast') {
16201
+ throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16599
16202
  }
16600
16203
 
16601
- return plugin;
16602
- }
16204
+ USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16205
+ return plugin !== PluginClass;
16206
+ });
16207
+ };
16208
+
16209
+ var USER_PLUGINS = [];
16603
16210
  });
16604
16211
  enifed('ember-template-compiler/system/compile', ['exports', 'require', 'ember-template-compiler/system/precompile'], function (exports, _require2, _precompile) {
16605
16212
  'use strict';
@@ -17198,19 +16805,6 @@ enifed('ember-utils', ['exports'], function (exports) {
17198
16805
  }
17199
16806
  }
17200
16807
 
17201
- var HAS_NATIVE_WEAKMAP = function () {
17202
- // detect if `WeakMap` is even present
17203
- var hasWeakMap = typeof WeakMap === 'function';
17204
- if (!hasWeakMap) {
17205
- return false;
17206
- }
17207
-
17208
- var instance = new WeakMap();
17209
- // use `Object`'s `.toString` directly to prevent us from detecting
17210
- // polyfills as native weakmaps
17211
- return Object.prototype.toString.call(instance) === '[object WeakMap]';
17212
- }();
17213
-
17214
16808
  var HAS_NATIVE_PROXY = typeof Proxy === 'function';
17215
16809
 
17216
16810
  /*
@@ -17382,32 +16976,34 @@ enifed('ember-utils', ['exports'], function (exports) {
17382
16976
  exports.applyStr = applyStr;
17383
16977
  exports.NAME_KEY = name;
17384
16978
  exports.toString = toString;
17385
- exports.HAS_NATIVE_WEAKMAP = HAS_NATIVE_WEAKMAP;
17386
16979
  exports.HAS_NATIVE_PROXY = HAS_NATIVE_PROXY;
17387
16980
  });
17388
16981
  enifed('ember/features', ['exports', 'ember-environment', 'ember-utils'], function (exports, _emberEnvironment, _emberUtils) {
17389
16982
  'use strict';
17390
16983
 
17391
- exports.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER = exports.MANDATORY_SETTER = exports.GLIMMER_CUSTOM_COMPONENT_MANAGER = exports.EMBER_MODULE_UNIFICATION = exports.EMBER_ENGINES_MOUNT_PARAMS = exports.EMBER_ROUTING_ROUTER_SERVICE = exports.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER = exports.EMBER_METAL_WEAKMAP = exports.EMBER_IMPROVED_INSTRUMENTATION = exports.EMBER_LIBRARIES_ISREGISTERED = exports.FEATURES_STRIPPED_TEST = exports.FEATURES = exports.DEFAULT_FEATURES = undefined;
17392
- var DEFAULT_FEATURES = exports.DEFAULT_FEATURES = { "features-stripped-test": false, "ember-libraries-isregistered": false, "ember-improved-instrumentation": false, "ember-metal-weakmap": false, "ember-glimmer-allow-backtracking-rerender": false, "ember-routing-router-service": true, "ember-engines-mount-params": true, "ember-module-unification": false, "glimmer-custom-component-manager": false, "mandatory-setter": true, "ember-glimmer-detect-backtracking-rerender": true };
16984
+ exports.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER = exports.MANDATORY_SETTER = exports.DESCRIPTOR_TRAP = exports.GLIMMER_CUSTOM_COMPONENT_MANAGER = exports.EMBER_MODULE_UNIFICATION = exports.EMBER_ENGINES_MOUNT_PARAMS = exports.EMBER_ROUTING_ROUTER_SERVICE = exports.EMBER_METAL_ES5_GETTERS = exports.EMBER_GLIMMER_TEMPLATE_ONLY_COMPONENTS = exports.EMBER_GLIMMER_REMOVE_APPLICATION_TEMPLATE_WRAPPER = exports.EMBER_GLIMMER_NAMED_ARGUMENTS = exports.EMBER_IMPROVED_INSTRUMENTATION = exports.EMBER_LIBRARIES_ISREGISTERED = exports.FEATURES_STRIPPED_TEST = exports.FEATURES = exports.DEFAULT_FEATURES = undefined;
16985
+ var DEFAULT_FEATURES = exports.DEFAULT_FEATURES = { "features-stripped-test": false, "ember-libraries-isregistered": false, "ember-improved-instrumentation": false, "ember-glimmer-named-arguments": false, "ember-glimmer-remove-application-template-wrapper": false, "ember-glimmer-template-only-components": false, "ember-metal-es5-getters": false, "ember-routing-router-service": true, "ember-engines-mount-params": true, "ember-module-unification": false, "glimmer-custom-component-manager": false, "descriptor-trap": true, "mandatory-setter": true, "ember-glimmer-detect-backtracking-rerender": true };
17393
16986
  var FEATURES = exports.FEATURES = (0, _emberUtils.assign)(DEFAULT_FEATURES, _emberEnvironment.ENV.FEATURES);
17394
16987
 
17395
16988
  exports.FEATURES_STRIPPED_TEST = FEATURES["features-stripped-test"];
17396
16989
  exports.EMBER_LIBRARIES_ISREGISTERED = FEATURES["ember-libraries-isregistered"];
17397
16990
  exports.EMBER_IMPROVED_INSTRUMENTATION = FEATURES["ember-improved-instrumentation"];
17398
- exports.EMBER_METAL_WEAKMAP = FEATURES["ember-metal-weakmap"];
17399
- exports.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER = FEATURES["ember-glimmer-allow-backtracking-rerender"];
16991
+ exports.EMBER_GLIMMER_NAMED_ARGUMENTS = FEATURES["ember-glimmer-named-arguments"];
16992
+ exports.EMBER_GLIMMER_REMOVE_APPLICATION_TEMPLATE_WRAPPER = FEATURES["ember-glimmer-remove-application-template-wrapper"];
16993
+ exports.EMBER_GLIMMER_TEMPLATE_ONLY_COMPONENTS = FEATURES["ember-glimmer-template-only-components"];
16994
+ exports.EMBER_METAL_ES5_GETTERS = FEATURES["ember-metal-es5-getters"];
17400
16995
  exports.EMBER_ROUTING_ROUTER_SERVICE = FEATURES["ember-routing-router-service"];
17401
16996
  exports.EMBER_ENGINES_MOUNT_PARAMS = FEATURES["ember-engines-mount-params"];
17402
16997
  exports.EMBER_MODULE_UNIFICATION = FEATURES["ember-module-unification"];
17403
16998
  exports.GLIMMER_CUSTOM_COMPONENT_MANAGER = FEATURES["glimmer-custom-component-manager"];
16999
+ exports.DESCRIPTOR_TRAP = FEATURES["descriptor-trap"];
17404
17000
  exports.MANDATORY_SETTER = FEATURES["mandatory-setter"];
17405
17001
  exports.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER = FEATURES["ember-glimmer-detect-backtracking-rerender"];
17406
17002
  });
17407
17003
  enifed("ember/version", ["exports"], function (exports) {
17408
17004
  "use strict";
17409
17005
 
17410
- exports.default = "2.18.2";
17006
+ exports.default = "3.0.0-beta.1";
17411
17007
  });
17412
17008
  enifed("handlebars", ["exports"], function (exports) {
17413
17009
  "use strict";
@@ -17956,8 +17552,8 @@ enifed("handlebars", ["exports"], function (exports) {
17956
17552
  this.begin(condition);
17957
17553
  } };
17958
17554
  lexer.options = {};
17959
- lexer.performAction = function (yy, yy_, $avoiding_name_collisions, YY_START
17960
- /**/) {
17555
+ lexer.performAction = function (yy, yy_,
17556
+ /**/$avoiding_name_collisions) {
17961
17557
 
17962
17558
  function strip(start, end) {
17963
17559
  return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);