ember-source 2.17.0.beta.4 → 2.17.0.beta.5
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.
- checksums.yaml +5 -5
- data/dist/ember-runtime.js +319 -230
- data/dist/ember-template-compiler.js +323 -249
- data/dist/ember-testing.js +1 -1
- data/dist/ember-tests.js +80 -18
- data/dist/ember-tests.prod.js +80 -18
- data/dist/ember.debug.js +329 -238
- data/dist/ember.min.js +146 -147
- data/dist/ember.prod.js +156 -154
- data/package.json +14 -13
- metadata +3 -3
@@ -6,7 +6,7 @@
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
7
7
|
* @license Licensed under MIT license
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
9
|
-
* @version 2.17.0-beta.
|
9
|
+
* @version 2.17.0-beta.5
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -7629,10 +7629,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
7629
7629
|
@public
|
7630
7630
|
*/
|
7631
7631
|
var Ember = typeof emberEnvironment.context.imports.Ember === 'object' && emberEnvironment.context.imports.Ember || {},
|
7632
|
-
|
7633
|
-
|
7634
|
-
shouldReflush,
|
7635
|
-
debugStack,
|
7632
|
+
TransactionRunner,
|
7633
|
+
runner,
|
7636
7634
|
_hasOwnProperty,
|
7637
7635
|
_propertyIsEnumerable,
|
7638
7636
|
getPrototypeOf,
|
@@ -8222,6 +8220,149 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
8222
8220
|
return ObserverSet;
|
8223
8221
|
}();
|
8224
8222
|
|
8223
|
+
/**
|
8224
|
+
@module ember
|
8225
|
+
*/
|
8226
|
+
var id = 0;
|
8227
|
+
|
8228
|
+
// Returns whether Type(value) is Object according to the terminology in the spec
|
8229
|
+
function isObject$1(value) {
|
8230
|
+
return typeof value === 'object' && value !== null || typeof value === 'function';
|
8231
|
+
}
|
8232
|
+
|
8233
|
+
/*
|
8234
|
+
* @class Ember.WeakMap
|
8235
|
+
* @public
|
8236
|
+
* @category ember-metal-weakmap
|
8237
|
+
*
|
8238
|
+
* A partial polyfill for [WeakMap](http://www.ecma-international.org/ecma-262/6.0/#sec-weakmap-objects).
|
8239
|
+
*
|
8240
|
+
* There is a small but important caveat. This implementation assumes that the
|
8241
|
+
* weak map will live longer (in the sense of garbage collection) than all of its
|
8242
|
+
* keys, otherwise it is possible to leak the values stored in the weak map. In
|
8243
|
+
* practice, most use cases satisfy this limitation which is why it is included
|
8244
|
+
* in ember-metal.
|
8245
|
+
*/
|
8246
|
+
var WeakMapPolyfill = function () {
|
8247
|
+
function WeakMapPolyfill(iterable) {
|
8248
|
+
var i, _iterable$i, key, value;
|
8249
|
+
|
8250
|
+
this._id = emberUtils.GUID_KEY + id++;
|
8251
|
+
|
8252
|
+
if (iterable === null || iterable === undefined) {} else if (Array.isArray(iterable)) {
|
8253
|
+
for (i = 0; i < iterable.length; i++) {
|
8254
|
+
_iterable$i = iterable[i], key = _iterable$i[0], value = _iterable$i[1];
|
8255
|
+
|
8256
|
+
|
8257
|
+
this.set(key, value);
|
8258
|
+
}
|
8259
|
+
} else {
|
8260
|
+
throw new TypeError('The weak map constructor polyfill only supports an array argument');
|
8261
|
+
}
|
8262
|
+
}
|
8263
|
+
|
8264
|
+
/*
|
8265
|
+
* @method get
|
8266
|
+
* @param key {Object | Function}
|
8267
|
+
* @return {Any} stored value
|
8268
|
+
*/
|
8269
|
+
|
8270
|
+
WeakMapPolyfill.prototype.get = function (obj) {
|
8271
|
+
if (!isObject$1(obj)) {
|
8272
|
+
return undefined;
|
8273
|
+
}
|
8274
|
+
|
8275
|
+
var meta$$1 = exports.peekMeta(obj),
|
8276
|
+
map,
|
8277
|
+
val;
|
8278
|
+
if (meta$$1 !== undefined) {
|
8279
|
+
map = meta$$1.readableWeak();
|
8280
|
+
|
8281
|
+
if (map !== undefined) {
|
8282
|
+
val = map[this._id];
|
8283
|
+
|
8284
|
+
if (val === UNDEFINED) {
|
8285
|
+
return undefined;
|
8286
|
+
}
|
8287
|
+
return val;
|
8288
|
+
}
|
8289
|
+
}
|
8290
|
+
};
|
8291
|
+
|
8292
|
+
/*
|
8293
|
+
* @method set
|
8294
|
+
* @param key {Object | Function}
|
8295
|
+
* @param value {Any}
|
8296
|
+
* @return {WeakMap} the weak map
|
8297
|
+
*/
|
8298
|
+
|
8299
|
+
WeakMapPolyfill.prototype.set = function (obj, value) {
|
8300
|
+
if (!isObject$1(obj)) {
|
8301
|
+
throw new TypeError('Invalid value used as weak map key');
|
8302
|
+
}
|
8303
|
+
|
8304
|
+
if (value === undefined) {
|
8305
|
+
value = UNDEFINED;
|
8306
|
+
}
|
8307
|
+
|
8308
|
+
meta(obj).writableWeak()[this._id] = value;
|
8309
|
+
|
8310
|
+
return this;
|
8311
|
+
};
|
8312
|
+
|
8313
|
+
/*
|
8314
|
+
* @method has
|
8315
|
+
* @param key {Object | Function}
|
8316
|
+
* @return {boolean} if the key exists
|
8317
|
+
*/
|
8318
|
+
|
8319
|
+
WeakMapPolyfill.prototype.has = function (obj) {
|
8320
|
+
if (!isObject$1(obj)) {
|
8321
|
+
return false;
|
8322
|
+
}
|
8323
|
+
|
8324
|
+
var meta$$1 = exports.peekMeta(obj),
|
8325
|
+
map;
|
8326
|
+
if (meta$$1 !== undefined) {
|
8327
|
+
map = meta$$1.readableWeak();
|
8328
|
+
|
8329
|
+
if (map !== undefined) {
|
8330
|
+
return map[this._id] !== undefined;
|
8331
|
+
}
|
8332
|
+
}
|
8333
|
+
|
8334
|
+
return false;
|
8335
|
+
};
|
8336
|
+
|
8337
|
+
/*
|
8338
|
+
* @method delete
|
8339
|
+
* @param key {Object | Function}
|
8340
|
+
* @return {boolean} if the key was deleted
|
8341
|
+
*/
|
8342
|
+
|
8343
|
+
WeakMapPolyfill.prototype.delete = function (obj) {
|
8344
|
+
if (this.has(obj)) {
|
8345
|
+
delete exports.peekMeta(obj).writableWeak()[this._id];
|
8346
|
+
return true;
|
8347
|
+
} else {
|
8348
|
+
return false;
|
8349
|
+
}
|
8350
|
+
};
|
8351
|
+
|
8352
|
+
/*
|
8353
|
+
* @method toString
|
8354
|
+
* @return {String}
|
8355
|
+
*/
|
8356
|
+
|
8357
|
+
WeakMapPolyfill.prototype.toString = function () {
|
8358
|
+
return '[object WeakMap]';
|
8359
|
+
};
|
8360
|
+
|
8361
|
+
return WeakMapPolyfill;
|
8362
|
+
}();
|
8363
|
+
|
8364
|
+
var WeakMap$1 = emberUtils.HAS_NATIVE_WEAKMAP ? WeakMap : WeakMapPolyfill;
|
8365
|
+
|
8225
8366
|
exports.runInTransaction = void 0;
|
8226
8367
|
exports.didRender = void 0;
|
8227
8368
|
exports.assertNotRendered = void 0;
|
@@ -8229,94 +8370,201 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
8229
8370
|
// detect-backtracking-rerender by default is debug build only
|
8230
8371
|
// detect-glimmer-allow-backtracking-rerender can be enabled in custom builds
|
8231
8372
|
if (ember_features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
|
8232
|
-
counter = 0;
|
8233
|
-
inTransaction = false;
|
8234
|
-
shouldReflush = void 0;
|
8235
|
-
debugStack = void 0;
|
8236
8373
|
|
8374
|
+
// there are 4 states
|
8237
8375
|
|
8238
|
-
|
8239
|
-
|
8240
|
-
|
8241
|
-
{
|
8242
|
-
debugStack = context$$1.env.debugStack;
|
8243
|
-
}
|
8244
|
-
context$$1[methodName]();
|
8245
|
-
inTransaction = false;
|
8246
|
-
counter++;
|
8247
|
-
return shouldReflush;
|
8248
|
-
};
|
8376
|
+
// NATIVE WEAKMAP AND DEBUG
|
8377
|
+
// tracks lastRef and lastRenderedIn per rendered object and key during a transaction
|
8378
|
+
// release everything via normal weakmap semantics by just derefencing the weakmap
|
8249
8379
|
|
8250
|
-
|
8251
|
-
|
8252
|
-
|
8253
|
-
}
|
8254
|
-
var meta$$1 = meta(object),
|
8255
|
-
referenceMap,
|
8256
|
-
templateMap;
|
8257
|
-
var lastRendered = meta$$1.writableLastRendered();
|
8258
|
-
lastRendered[key] = counter;
|
8380
|
+
// NATIVE WEAKMAP AND RELEASE
|
8381
|
+
// tracks transactionId per rendered object and key during a transaction
|
8382
|
+
// release everything via normal weakmap semantics by just derefencing the weakmap
|
8259
8383
|
|
8260
|
-
|
8261
|
-
|
8384
|
+
// WEAKMAP POLYFILL AND DEBUG
|
8385
|
+
// tracks lastRef and lastRenderedIn per rendered object and key during a transaction
|
8386
|
+
// since lastRef retains a lot of app state (will have a ref to the Container)
|
8387
|
+
// if the object rendered is retained (like a immutable POJO in module state)
|
8388
|
+
// during acceptance tests this adds up and obfuscates finding other leaks.
|
8262
8389
|
|
8263
|
-
|
8390
|
+
// WEAKMAP POLYFILL AND RELEASE
|
8391
|
+
// tracks transactionId per rendered object and key during a transaction
|
8392
|
+
// leaks it because small and likely not worth tracking it since it will only
|
8393
|
+
// be leaked if the object is retained
|
8264
8394
|
|
8265
|
-
|
8395
|
+
TransactionRunner = function () {
|
8396
|
+
function TransactionRunner() {
|
8266
8397
|
|
8267
|
-
|
8268
|
-
|
8398
|
+
this.transactionId = 0;
|
8399
|
+
this.inTransaction = false;
|
8400
|
+
this.shouldReflush = false;
|
8401
|
+
this.weakMap = new WeakMap$1();
|
8402
|
+
{
|
8403
|
+
// track templates
|
8404
|
+
this.debugStack = undefined;
|
8405
|
+
|
8406
|
+
if (!emberUtils.HAS_NATIVE_WEAKMAP) {
|
8407
|
+
// DEBUG AND POLYFILL
|
8408
|
+
// needs obj tracking
|
8409
|
+
this.objs = [];
|
8410
|
+
}
|
8269
8411
|
}
|
8270
8412
|
}
|
8271
|
-
};
|
8272
8413
|
|
8273
|
-
|
8274
|
-
|
8275
|
-
|
8276
|
-
|
8277
|
-
|
8278
|
-
|
8279
|
-
|
8280
|
-
|
8281
|
-
|
8282
|
-
|
8283
|
-
|
8284
|
-
|
8285
|
-
|
8414
|
+
TransactionRunner.prototype.runInTransaction = function (context$$1, methodName) {
|
8415
|
+
this.before(context$$1);
|
8416
|
+
try {
|
8417
|
+
context$$1[methodName]();
|
8418
|
+
} finally {
|
8419
|
+
this.after();
|
8420
|
+
}
|
8421
|
+
return this.shouldReflush;
|
8422
|
+
};
|
8423
|
+
|
8424
|
+
TransactionRunner.prototype.didRender = function (object, key, reference) {
|
8425
|
+
if (!this.inTransaction) {
|
8426
|
+
return;
|
8427
|
+
}
|
8286
8428
|
{
|
8287
|
-
|
8288
|
-
|
8289
|
-
|
8290
|
-
|
8291
|
-
|
8292
|
-
|
8293
|
-
|
8294
|
-
|
8295
|
-
|
8296
|
-
|
8297
|
-
|
8298
|
-
|
8299
|
-
|
8429
|
+
this.setKey(object, key, {
|
8430
|
+
lastRef: reference,
|
8431
|
+
lastRenderedIn: this.debugStack.peek()
|
8432
|
+
});
|
8433
|
+
}
|
8434
|
+
};
|
8435
|
+
|
8436
|
+
TransactionRunner.prototype.assertNotRendered = function (object, key) {
|
8437
|
+
var _getKey, lastRef, lastRenderedIn, currentlyIn, parts, label, message;
|
8438
|
+
|
8439
|
+
if (!this.inTransaction) {
|
8440
|
+
return;
|
8441
|
+
}
|
8442
|
+
if (this.hasRendered(object, key)) {
|
8443
|
+
{
|
8444
|
+
_getKey = this.getKey(object, key), lastRef = _getKey.lastRef, lastRenderedIn = _getKey.lastRenderedIn;
|
8445
|
+
currentlyIn = this.debugStack.peek();
|
8446
|
+
parts = [];
|
8447
|
+
label = void 0;
|
8448
|
+
|
8449
|
+
|
8450
|
+
if (lastRef !== undefined) {
|
8451
|
+
while (lastRef && lastRef._propertyKey) {
|
8452
|
+
parts.unshift(lastRef._propertyKey);
|
8453
|
+
lastRef = lastRef._parentReference;
|
8454
|
+
}
|
8455
|
+
|
8456
|
+
label = parts.join('.');
|
8457
|
+
} else {
|
8458
|
+
label = 'the same value';
|
8300
8459
|
}
|
8301
8460
|
|
8302
|
-
|
8303
|
-
|
8304
|
-
|
8461
|
+
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';
|
8462
|
+
|
8463
|
+
|
8464
|
+
if (ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
|
8465
|
+
true && !false && emberDebug.deprecate(message + ' will be removed in Ember 3.0.', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
|
8466
|
+
} else {
|
8467
|
+
true && !false && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
|
8468
|
+
}
|
8305
8469
|
}
|
8306
8470
|
|
8307
|
-
|
8471
|
+
this.shouldReflush = true;
|
8472
|
+
}
|
8473
|
+
};
|
8308
8474
|
|
8475
|
+
TransactionRunner.prototype.hasRendered = function (object, key) {
|
8476
|
+
if (!this.inTransaction) {
|
8477
|
+
return false;
|
8478
|
+
}
|
8479
|
+
{
|
8480
|
+
return this.getKey(object, key) !== undefined;
|
8481
|
+
}
|
8482
|
+
return this.getKey(object, key) === this.transactionId;
|
8483
|
+
};
|
8309
8484
|
|
8310
|
-
|
8311
|
-
|
8312
|
-
|
8313
|
-
|
8485
|
+
TransactionRunner.prototype.before = function (context$$1) {
|
8486
|
+
this.inTransaction = true;
|
8487
|
+
this.shouldReflush = false;
|
8488
|
+
{
|
8489
|
+
this.debugStack = context$$1.env.debugStack;
|
8490
|
+
}
|
8491
|
+
};
|
8492
|
+
|
8493
|
+
TransactionRunner.prototype.after = function () {
|
8494
|
+
this.transactionId++;
|
8495
|
+
this.inTransaction = false;
|
8496
|
+
{
|
8497
|
+
this.debugStack = undefined;
|
8498
|
+
}
|
8499
|
+
this.clearObjectMap();
|
8500
|
+
};
|
8501
|
+
|
8502
|
+
TransactionRunner.prototype.createMap = function (object) {
|
8503
|
+
var map = Object.create(null);
|
8504
|
+
this.weakMap.set(object, map);
|
8505
|
+
if (true && !emberUtils.HAS_NATIVE_WEAKMAP) {
|
8506
|
+
// POLYFILL AND DEBUG
|
8507
|
+
// requires tracking objects
|
8508
|
+
this.objs.push(object);
|
8509
|
+
}
|
8510
|
+
return map;
|
8511
|
+
};
|
8512
|
+
|
8513
|
+
TransactionRunner.prototype.getOrCreateMap = function (object) {
|
8514
|
+
var map = this.weakMap.get(object);
|
8515
|
+
if (map === undefined) {
|
8516
|
+
map = this.createMap(object);
|
8517
|
+
}
|
8518
|
+
return map;
|
8519
|
+
};
|
8520
|
+
|
8521
|
+
TransactionRunner.prototype.setKey = function (object, key, value) {
|
8522
|
+
var map = this.getOrCreateMap(object);
|
8523
|
+
map[key] = value;
|
8524
|
+
};
|
8525
|
+
|
8526
|
+
TransactionRunner.prototype.getKey = function (object, key) {
|
8527
|
+
var map = this.weakMap.get(object);
|
8528
|
+
if (map !== undefined) {
|
8529
|
+
return map[key];
|
8530
|
+
}
|
8531
|
+
};
|
8532
|
+
|
8533
|
+
TransactionRunner.prototype.clearObjectMap = function () {
|
8534
|
+
var objs, weakMap, i;
|
8535
|
+
|
8536
|
+
if (emberUtils.HAS_NATIVE_WEAKMAP) {
|
8537
|
+
// NATIVE AND (DEBUG OR RELEASE)
|
8538
|
+
// if we have a real native weakmap
|
8539
|
+
// releasing the ref will allow the values to be GCed
|
8540
|
+
this.weakMap = new WeakMap$1();
|
8541
|
+
} else {
|
8542
|
+
// POLYFILL AND DEBUG
|
8543
|
+
// with a polyfill the weakmap keys must be cleared since
|
8544
|
+
// they have the last reference, acceptance tests will leak
|
8545
|
+
// the container if you render a immutable object retained
|
8546
|
+
// in module scope.
|
8547
|
+
objs = this.objs, weakMap = this.weakMap;
|
8548
|
+
|
8549
|
+
|
8550
|
+
this.objs = [];
|
8551
|
+
for (i = 0; i < objs.length; i++) {
|
8552
|
+
weakMap.delete(objs[i]);
|
8314
8553
|
}
|
8315
8554
|
}
|
8555
|
+
// POLYFILL AND RELEASE
|
8556
|
+
// we leak the key map if the object is retained but this is
|
8557
|
+
// a POJO of keys to transaction ids
|
8558
|
+
};
|
8316
8559
|
|
8317
|
-
|
8318
|
-
|
8319
|
-
|
8560
|
+
return TransactionRunner;
|
8561
|
+
}();
|
8562
|
+
runner = new TransactionRunner();
|
8563
|
+
|
8564
|
+
|
8565
|
+
exports.runInTransaction = runner.runInTransaction.bind(runner);
|
8566
|
+
exports.didRender = runner.didRender.bind(runner);
|
8567
|
+
exports.assertNotRendered = runner.assertNotRendered.bind(runner);
|
8320
8568
|
} else {
|
8321
8569
|
// in production do nothing to detect reflushes
|
8322
8570
|
exports.runInTransaction = function (context$$1, methodName) {
|
@@ -9506,14 +9754,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
9506
9754
|
// inherited, and we can optimize it much better than JS runtimes.
|
9507
9755
|
this.parent = parentMeta;
|
9508
9756
|
|
9509
|
-
if (ember_features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
|
9510
|
-
this._lastRendered = undefined;
|
9511
|
-
{
|
9512
|
-
this._lastRenderedReferenceMap = undefined;
|
9513
|
-
this._lastRenderedTemplateMap = undefined;
|
9514
|
-
}
|
9515
|
-
}
|
9516
|
-
|
9517
9757
|
this._listeners = undefined;
|
9518
9758
|
this._listenersFinalized = false;
|
9519
9759
|
this._suspendedListeners = undefined;
|
@@ -9906,29 +10146,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
9906
10146
|
return Meta;
|
9907
10147
|
}();
|
9908
10148
|
|
9909
|
-
if (ember_features.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
|
9910
|
-
Meta.prototype.writableLastRendered = function () {
|
9911
|
-
return this._getOrCreateOwnMap('_lastRendered');
|
9912
|
-
};
|
9913
|
-
Meta.prototype.readableLastRendered = function () {
|
9914
|
-
return this._lastRendered;
|
9915
|
-
};
|
9916
|
-
{
|
9917
|
-
Meta.prototype.writableLastRenderedReferenceMap = function () {
|
9918
|
-
return this._getOrCreateOwnMap('_lastRenderedReferenceMap');
|
9919
|
-
};
|
9920
|
-
Meta.prototype.readableLastRenderedReferenceMap = function () {
|
9921
|
-
return this._lastRenderedReferenceMap;
|
9922
|
-
};
|
9923
|
-
Meta.prototype.writableLastRenderedTemplateMap = function () {
|
9924
|
-
return this._getOrCreateOwnMap('_lastRenderedTemplateMap');
|
9925
|
-
};
|
9926
|
-
Meta.prototype.readableLastRenderedTemplateMap = function () {
|
9927
|
-
return this._lastRenderedTemplateMap;
|
9928
|
-
};
|
9929
|
-
}
|
9930
|
-
}
|
9931
|
-
|
9932
10149
|
for (var name in protoMethods) {
|
9933
10150
|
Meta.prototype[name] = protoMethods[name];
|
9934
10151
|
}
|
@@ -11540,149 +11757,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
11540
11757
|
}
|
11541
11758
|
}
|
11542
11759
|
|
11543
|
-
/**
|
11544
|
-
@module ember
|
11545
|
-
*/
|
11546
|
-
var id = 0;
|
11547
|
-
|
11548
|
-
// Returns whether Type(value) is Object according to the terminology in the spec
|
11549
|
-
function isObject$1(value) {
|
11550
|
-
return typeof value === 'object' && value !== null || typeof value === 'function';
|
11551
|
-
}
|
11552
|
-
|
11553
|
-
/*
|
11554
|
-
* @class Ember.WeakMap
|
11555
|
-
* @public
|
11556
|
-
* @category ember-metal-weakmap
|
11557
|
-
*
|
11558
|
-
* A partial polyfill for [WeakMap](http://www.ecma-international.org/ecma-262/6.0/#sec-weakmap-objects).
|
11559
|
-
*
|
11560
|
-
* There is a small but important caveat. This implementation assumes that the
|
11561
|
-
* weak map will live longer (in the sense of garbage collection) than all of its
|
11562
|
-
* keys, otherwise it is possible to leak the values stored in the weak map. In
|
11563
|
-
* practice, most use cases satisfy this limitation which is why it is included
|
11564
|
-
* in ember-metal.
|
11565
|
-
*/
|
11566
|
-
var WeakMapPolyfill = function () {
|
11567
|
-
function WeakMapPolyfill(iterable) {
|
11568
|
-
var i, _iterable$i, key, value;
|
11569
|
-
|
11570
|
-
this._id = emberUtils.GUID_KEY + id++;
|
11571
|
-
|
11572
|
-
if (iterable === null || iterable === undefined) {} else if (Array.isArray(iterable)) {
|
11573
|
-
for (i = 0; i < iterable.length; i++) {
|
11574
|
-
_iterable$i = iterable[i], key = _iterable$i[0], value = _iterable$i[1];
|
11575
|
-
|
11576
|
-
|
11577
|
-
this.set(key, value);
|
11578
|
-
}
|
11579
|
-
} else {
|
11580
|
-
throw new TypeError('The weak map constructor polyfill only supports an array argument');
|
11581
|
-
}
|
11582
|
-
}
|
11583
|
-
|
11584
|
-
/*
|
11585
|
-
* @method get
|
11586
|
-
* @param key {Object | Function}
|
11587
|
-
* @return {Any} stored value
|
11588
|
-
*/
|
11589
|
-
|
11590
|
-
WeakMapPolyfill.prototype.get = function (obj) {
|
11591
|
-
if (!isObject$1(obj)) {
|
11592
|
-
return undefined;
|
11593
|
-
}
|
11594
|
-
|
11595
|
-
var meta$$1 = exports.peekMeta(obj),
|
11596
|
-
map,
|
11597
|
-
val;
|
11598
|
-
if (meta$$1 !== undefined) {
|
11599
|
-
map = meta$$1.readableWeak();
|
11600
|
-
|
11601
|
-
if (map !== undefined) {
|
11602
|
-
val = map[this._id];
|
11603
|
-
|
11604
|
-
if (val === UNDEFINED) {
|
11605
|
-
return undefined;
|
11606
|
-
}
|
11607
|
-
return val;
|
11608
|
-
}
|
11609
|
-
}
|
11610
|
-
};
|
11611
|
-
|
11612
|
-
/*
|
11613
|
-
* @method set
|
11614
|
-
* @param key {Object | Function}
|
11615
|
-
* @param value {Any}
|
11616
|
-
* @return {WeakMap} the weak map
|
11617
|
-
*/
|
11618
|
-
|
11619
|
-
WeakMapPolyfill.prototype.set = function (obj, value) {
|
11620
|
-
if (!isObject$1(obj)) {
|
11621
|
-
throw new TypeError('Invalid value used as weak map key');
|
11622
|
-
}
|
11623
|
-
|
11624
|
-
if (value === undefined) {
|
11625
|
-
value = UNDEFINED;
|
11626
|
-
}
|
11627
|
-
|
11628
|
-
meta(obj).writableWeak()[this._id] = value;
|
11629
|
-
|
11630
|
-
return this;
|
11631
|
-
};
|
11632
|
-
|
11633
|
-
/*
|
11634
|
-
* @method has
|
11635
|
-
* @param key {Object | Function}
|
11636
|
-
* @return {boolean} if the key exists
|
11637
|
-
*/
|
11638
|
-
|
11639
|
-
WeakMapPolyfill.prototype.has = function (obj) {
|
11640
|
-
if (!isObject$1(obj)) {
|
11641
|
-
return false;
|
11642
|
-
}
|
11643
|
-
|
11644
|
-
var meta$$1 = exports.peekMeta(obj),
|
11645
|
-
map;
|
11646
|
-
if (meta$$1 !== undefined) {
|
11647
|
-
map = meta$$1.readableWeak();
|
11648
|
-
|
11649
|
-
if (map !== undefined) {
|
11650
|
-
return map[this._id] !== undefined;
|
11651
|
-
}
|
11652
|
-
}
|
11653
|
-
|
11654
|
-
return false;
|
11655
|
-
};
|
11656
|
-
|
11657
|
-
/*
|
11658
|
-
* @method delete
|
11659
|
-
* @param key {Object | Function}
|
11660
|
-
* @return {boolean} if the key was deleted
|
11661
|
-
*/
|
11662
|
-
|
11663
|
-
WeakMapPolyfill.prototype.delete = function (obj) {
|
11664
|
-
if (this.has(obj)) {
|
11665
|
-
delete exports.peekMeta(obj).writableWeak()[this._id];
|
11666
|
-
return true;
|
11667
|
-
} else {
|
11668
|
-
return false;
|
11669
|
-
}
|
11670
|
-
};
|
11671
|
-
|
11672
|
-
/*
|
11673
|
-
* @method toString
|
11674
|
-
* @return {String}
|
11675
|
-
*/
|
11676
|
-
|
11677
|
-
WeakMapPolyfill.prototype.toString = function () {
|
11678
|
-
return '[object WeakMap]';
|
11679
|
-
};
|
11680
|
-
|
11681
|
-
return WeakMapPolyfill;
|
11682
|
-
}();
|
11683
|
-
|
11684
|
-
var weak_map = emberUtils.HAS_NATIVE_WEAKMAP ? WeakMap : WeakMapPolyfill;
|
11685
|
-
|
11686
11760
|
/**
|
11687
11761
|
@module @ember/utils
|
11688
11762
|
*/
|
@@ -14876,7 +14950,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
14876
14950
|
};
|
14877
14951
|
exports.set = set;
|
14878
14952
|
exports.trySet = trySet;
|
14879
|
-
exports.WeakMap =
|
14953
|
+
exports.WeakMap = WeakMap$1;
|
14880
14954
|
exports.WeakMapPolyfill = WeakMapPolyfill;
|
14881
14955
|
exports.addListener = addListener;
|
14882
14956
|
exports.hasListeners = function (obj, eventName) {
|
@@ -17278,7 +17352,7 @@ enifed('ember/features', ['exports', 'ember-environment', 'ember-utils'], functi
|
|
17278
17352
|
enifed("ember/version", ["exports"], function (exports) {
|
17279
17353
|
"use strict";
|
17280
17354
|
|
17281
|
-
exports.default = "2.17.0-beta.
|
17355
|
+
exports.default = "2.17.0-beta.5";
|
17282
17356
|
});
|
17283
17357
|
enifed("handlebars", ["exports"], function (exports) {
|
17284
17358
|
"use strict";
|