ember-source 2.2.1 → 2.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +507 -239
- data/dist/ember-template-compiler.js +240 -157
- data/dist/ember-testing.js +21 -66
- data/dist/ember.debug.js +1354 -864
- data/dist/ember.js +1354 -864
- data/dist/ember.min.js +15 -14
- data/dist/ember.prod.js +1235 -782
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 987389815feafd5a73278765ff968fd8250abc47
|
4
|
+
data.tar.gz: 9c4b5d1a0ec33c1b22607385985ea620861984e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30e7b90369fbc10bcf604ca63bc53fa592d35b4aeddef818ee949bd96ad5cc2fa12b298876f98dce876082042219f4c66706ed9ed91d7934220c20d01c8914b0
|
7
|
+
data.tar.gz: 3bb440e2c99aeeccdda293655439e8d8b33596801e677edb25b6a7318c5f413eb41272c6364143b6b7910b5fc70a28448f03a6e2e82a67a07775ccbad6dff5f2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0-beta.1
|
data/dist/ember-runtime.js
CHANGED
@@ -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.
|
9
|
+
* @version 2.3.0-beta.1
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, require, requirejs, Ember;
|
@@ -43,6 +43,15 @@ var mainContext = this;
|
|
43
43
|
requirejs = require = requireModule = function(name) {
|
44
44
|
return internalRequire(name, null);
|
45
45
|
}
|
46
|
+
require['default'] = require;
|
47
|
+
|
48
|
+
function missingModule(name, referrerName) {
|
49
|
+
if (referrerName) {
|
50
|
+
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
51
|
+
} else {
|
52
|
+
throw new Error('Could not find module ' + name);
|
53
|
+
}
|
54
|
+
}
|
46
55
|
|
47
56
|
function internalRequire(name, referrerName) {
|
48
57
|
var exports = seen[name];
|
@@ -54,24 +63,22 @@ var mainContext = this;
|
|
54
63
|
exports = seen[name] = {};
|
55
64
|
|
56
65
|
if (!registry[name]) {
|
57
|
-
|
58
|
-
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
59
|
-
} else {
|
60
|
-
throw new Error('Could not find module ' + name);
|
61
|
-
}
|
66
|
+
missingModule(name, referrerName);
|
62
67
|
}
|
63
68
|
|
64
69
|
var mod = registry[name];
|
65
70
|
var deps = mod.deps;
|
66
71
|
var callback = mod.callback;
|
67
|
-
var reified = [];
|
68
72
|
var length = deps.length;
|
73
|
+
var reified = new Array(length);;
|
69
74
|
|
70
75
|
for (var i = 0; i < length; i++) {
|
71
76
|
if (deps[i] === 'exports') {
|
72
|
-
reified
|
77
|
+
reified[i] = exports;
|
78
|
+
} else if (deps[i] === 'require') {
|
79
|
+
reified[i] = require;
|
73
80
|
} else {
|
74
|
-
reified
|
81
|
+
reified[i] = internalRequire(deps[i], name);
|
75
82
|
}
|
76
83
|
}
|
77
84
|
|
@@ -1182,7 +1189,7 @@ enifed('backburner', ['exports', 'backburner/utils', 'backburner/platform', 'bac
|
|
1182
1189
|
clearTimeout(item[2]);
|
1183
1190
|
}
|
1184
1191
|
});
|
1185
|
-
enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/features'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalDictionary, _emberMetalFeatures) {
|
1192
|
+
enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/features', 'container/owner', 'ember-runtime/mixins/container_proxy'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalDictionary, _emberMetalFeatures, _containerOwner, _emberRuntimeMixinsContainer_proxy) {
|
1186
1193
|
'use strict';
|
1187
1194
|
|
1188
1195
|
/**
|
@@ -1200,12 +1207,24 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1200
1207
|
*/
|
1201
1208
|
function Container(registry, options) {
|
1202
1209
|
this.registry = registry;
|
1210
|
+
this.owner = options && options.owner ? options.owner : null;
|
1203
1211
|
this.cache = _emberMetalDictionary.default(options && options.cache ? options.cache : null);
|
1204
1212
|
this.factoryCache = _emberMetalDictionary.default(options && options.factoryCache ? options.factoryCache : null);
|
1205
1213
|
this.validationCache = _emberMetalDictionary.default(options && options.validationCache ? options.validationCache : null);
|
1214
|
+
|
1215
|
+
if (_emberMetalFeatures.default('ember-container-inject-owner')) {
|
1216
|
+
this._fakeContainerToInject = _emberRuntimeMixinsContainer_proxy.buildFakeContainerWithDeprecations(this);
|
1217
|
+
}
|
1206
1218
|
}
|
1207
1219
|
|
1208
1220
|
Container.prototype = {
|
1221
|
+
/**
|
1222
|
+
@private
|
1223
|
+
@property owner
|
1224
|
+
@type Object
|
1225
|
+
*/
|
1226
|
+
owner: null,
|
1227
|
+
|
1209
1228
|
/**
|
1210
1229
|
@private
|
1211
1230
|
@property registry
|
@@ -1346,17 +1365,17 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1346
1365
|
return !!injections._dynamic;
|
1347
1366
|
}
|
1348
1367
|
|
1349
|
-
function buildInjections(
|
1368
|
+
function buildInjections() /* container, ...injections */{
|
1350
1369
|
var hash = {};
|
1351
1370
|
|
1352
1371
|
if (arguments.length > 1) {
|
1353
|
-
var
|
1372
|
+
var container = arguments[0];
|
1354
1373
|
var injections = [];
|
1355
1374
|
var injection;
|
1356
1375
|
|
1357
|
-
for (var i =
|
1358
|
-
if (
|
1359
|
-
injections = injections.concat(
|
1376
|
+
for (var i = 1, l = arguments.length; i < l; i++) {
|
1377
|
+
if (arguments[i]) {
|
1378
|
+
injections = injections.concat(arguments[i]);
|
1360
1379
|
}
|
1361
1380
|
}
|
1362
1381
|
|
@@ -1403,6 +1422,14 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1403
1422
|
factoryInjections._toString = registry.makeToString(factory, fullName);
|
1404
1423
|
|
1405
1424
|
var injectedFactory = factory.extend(injections);
|
1425
|
+
|
1426
|
+
// TODO - remove all `container` injections when Ember reaches v3.0.0
|
1427
|
+
if (_emberMetalFeatures.default('ember-container-inject-owner')) {
|
1428
|
+
injectDeprecatedContainer(injectedFactory.prototype, container);
|
1429
|
+
} else {
|
1430
|
+
injectedFactory.prototype.container = container;
|
1431
|
+
}
|
1432
|
+
|
1406
1433
|
injectedFactory.reopenClass(factoryInjections);
|
1407
1434
|
|
1408
1435
|
if (factory && typeof factory._onLookup === 'function') {
|
@@ -1424,7 +1451,8 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1424
1451
|
|
1425
1452
|
var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
|
1426
1453
|
injections._debugContainerKey = fullName;
|
1427
|
-
|
1454
|
+
|
1455
|
+
_containerOwner.setOwner(injections, container.owner);
|
1428
1456
|
|
1429
1457
|
return injections;
|
1430
1458
|
}
|
@@ -1465,18 +1493,51 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1465
1493
|
|
1466
1494
|
validationCache[fullName] = true;
|
1467
1495
|
|
1496
|
+
var obj = undefined;
|
1497
|
+
|
1468
1498
|
if (typeof factory.extend === 'function') {
|
1469
1499
|
// assume the factory was extendable and is already injected
|
1470
|
-
|
1500
|
+
obj = factory.create();
|
1471
1501
|
} else {
|
1472
1502
|
// assume the factory was extendable
|
1473
1503
|
// to create time injections
|
1474
1504
|
// TODO: support new'ing for instantiation and merge injections for pure JS Functions
|
1475
|
-
|
1505
|
+
var injections = injectionsFor(container, fullName);
|
1506
|
+
|
1507
|
+
// Ensure that a container is available to an object during instantiation.
|
1508
|
+
// TODO - remove when Ember reaches v3.0.0
|
1509
|
+
if (_emberMetalFeatures.default('ember-container-inject-owner')) {
|
1510
|
+
// This "fake" container will be replaced after instantiation with a
|
1511
|
+
// property that raises deprecations every time it is accessed.
|
1512
|
+
injections.container = container._fakeContainerToInject;
|
1513
|
+
} else {
|
1514
|
+
injections.container = container;
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
obj = factory.create(injections);
|
1518
|
+
|
1519
|
+
// TODO - remove when Ember reaches v3.0.0
|
1520
|
+
if (_emberMetalFeatures.default('ember-container-inject-owner')) {
|
1521
|
+
injectDeprecatedContainer(obj, container);
|
1522
|
+
}
|
1476
1523
|
}
|
1524
|
+
|
1525
|
+
return obj;
|
1477
1526
|
}
|
1478
1527
|
}
|
1479
1528
|
|
1529
|
+
// TODO - remove when Ember reaches v3.0.0
|
1530
|
+
function injectDeprecatedContainer(object, container) {
|
1531
|
+
Object.defineProperty(object, 'container', {
|
1532
|
+
configurable: true,
|
1533
|
+
enumerable: false,
|
1534
|
+
get: function () {
|
1535
|
+
_emberMetalDebug.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
|
1536
|
+
return container;
|
1537
|
+
}
|
1538
|
+
});
|
1539
|
+
}
|
1540
|
+
|
1480
1541
|
function eachDestroyable(container, callback) {
|
1481
1542
|
var cache = container.cache;
|
1482
1543
|
var keys = Object.keys(cache);
|
@@ -1516,19 +1577,79 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1516
1577
|
}
|
1517
1578
|
}
|
1518
1579
|
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1580
|
+
exports.default = Container;
|
1581
|
+
});
|
1582
|
+
enifed('container/owner', ['exports', 'ember-metal/symbol'], function (exports, _emberMetalSymbol) {
|
1583
|
+
/**
|
1584
|
+
@module ember
|
1585
|
+
@submodule ember-runtime
|
1586
|
+
*/
|
1587
|
+
|
1588
|
+
'use strict';
|
1589
|
+
|
1590
|
+
exports.getOwner = getOwner;
|
1591
|
+
exports.setOwner = setOwner;
|
1592
|
+
var OWNER = _emberMetalSymbol.default('OWNER');
|
1593
|
+
|
1594
|
+
exports.OWNER = OWNER;
|
1595
|
+
/**
|
1596
|
+
Framework objects in an Ember application (components, services, routes, etc.)
|
1597
|
+
are created via a factory and dependency injection system. Each of these
|
1598
|
+
objects is the responsibility of an "owner", which handled its
|
1599
|
+
instantiation and manages its lifetime.
|
1600
|
+
|
1601
|
+
`getOwner` fetches the owner object responsible for an instance. This can
|
1602
|
+
be used to lookup or resolve other class instances, or register new factories
|
1603
|
+
into the owner.
|
1604
|
+
|
1605
|
+
For example, this component dynamically looks up a service based on the
|
1606
|
+
`audioType` passed as an attribute:
|
1607
|
+
|
1608
|
+
```
|
1609
|
+
// app/components/play-audio.js
|
1610
|
+
import Ember from 'ember';
|
1611
|
+
|
1612
|
+
// Usage:
|
1613
|
+
//
|
1614
|
+
// {{play-audio audioType=model.audioType audioFile=model.file}}
|
1615
|
+
//
|
1616
|
+
export default Ember.Component.extend({
|
1617
|
+
audioService: Ember.computed('audioType', function() {
|
1618
|
+
let owner = Ember.getOwner(this);
|
1619
|
+
return owner.lookup(`service:${this.get('audioType')}`);
|
1620
|
+
}),
|
1621
|
+
click() {
|
1622
|
+
let player = this.get('audioService');
|
1623
|
+
player.play(this.get('audioFile'));
|
1527
1624
|
}
|
1528
1625
|
});
|
1626
|
+
```
|
1627
|
+
|
1628
|
+
@method getOwner
|
1629
|
+
@param {Object} object A object with an owner.
|
1630
|
+
@return {Object} an owner object.
|
1631
|
+
@for Ember
|
1632
|
+
@public
|
1633
|
+
*/
|
1634
|
+
|
1635
|
+
function getOwner(object) {
|
1636
|
+
return object[OWNER];
|
1529
1637
|
}
|
1530
1638
|
|
1531
|
-
|
1639
|
+
/**
|
1640
|
+
`setOwner` forces a new owner on a given object instance. This is primarily
|
1641
|
+
useful in some testing cases.
|
1642
|
+
|
1643
|
+
@method setOwner
|
1644
|
+
@param {Object} object A object with an owner.
|
1645
|
+
@return {Object} an owner object.
|
1646
|
+
@for Ember
|
1647
|
+
@public
|
1648
|
+
*/
|
1649
|
+
|
1650
|
+
function setOwner(object, owner) {
|
1651
|
+
object[OWNER] = owner;
|
1652
|
+
}
|
1532
1653
|
});
|
1533
1654
|
enifed('container/registry', ['exports', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/assign', 'container/container'], function (exports, _emberMetalDebug, _emberMetalDictionary, _emberMetalAssign, _containerContainer) {
|
1534
1655
|
'use strict';
|
@@ -2192,7 +2313,7 @@ enifed('container/registry', ['exports', 'ember-metal/debug', 'ember-metal/dicti
|
|
2192
2313
|
|
2193
2314
|
exports.default = Registry;
|
2194
2315
|
});
|
2195
|
-
enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'container/container'], function (exports, _emberMetalCore, _containerRegistry, _containerContainer) {
|
2316
|
+
enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'container/container', 'container/owner'], function (exports, _emberMetalCore, _containerRegistry, _containerContainer, _containerOwner) {
|
2196
2317
|
'use strict';
|
2197
2318
|
|
2198
2319
|
/*
|
@@ -2215,6 +2336,8 @@ enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'conta
|
|
2215
2336
|
|
2216
2337
|
exports.Registry = _containerRegistry.default;
|
2217
2338
|
exports.Container = _containerContainer.default;
|
2339
|
+
exports.getOwner = _containerOwner.getOwner;
|
2340
|
+
exports.setOwner = _containerOwner.setOwner;
|
2218
2341
|
});
|
2219
2342
|
enifed('ember-metal/alias', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/error', 'ember-metal/properties', 'ember-metal/computed', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/dependent_keys'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalError, _emberMetalProperties, _emberMetalComputed, _emberMetalUtils, _emberMetalMeta, _emberMetalDependent_keys) {
|
2220
2343
|
'use strict';
|
@@ -2990,7 +3113,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
2990
3113
|
return;
|
2991
3114
|
}
|
2992
3115
|
|
2993
|
-
var m = obj
|
3116
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
2994
3117
|
|
2995
3118
|
if (!m || !m.readableChainWatchers()) {
|
2996
3119
|
return;
|
@@ -3038,7 +3161,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
3038
3161
|
return;
|
3039
3162
|
}
|
3040
3163
|
|
3041
|
-
var meta = obj
|
3164
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
3042
3165
|
|
3043
3166
|
// check if object meant only to be a prototype
|
3044
3167
|
if (meta && meta.proto === obj) {
|
@@ -3244,7 +3367,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
3244
3367
|
|
3245
3368
|
function finishChains(obj) {
|
3246
3369
|
// We only create meta if we really have to
|
3247
|
-
var m = obj
|
3370
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
3248
3371
|
if (m) {
|
3249
3372
|
m = _emberMetalMeta.meta(obj);
|
3250
3373
|
|
@@ -3560,7 +3683,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
3560
3683
|
}
|
3561
3684
|
|
3562
3685
|
// don't create objects just to invalidate
|
3563
|
-
var meta = obj
|
3686
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
3564
3687
|
if (!meta || meta.source !== obj) {
|
3565
3688
|
return;
|
3566
3689
|
}
|
@@ -3784,22 +3907,20 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
3784
3907
|
computed property function. You can use this helper to define properties
|
3785
3908
|
with mixins or via `Ember.defineProperty()`.
|
3786
3909
|
|
3787
|
-
If you pass function as argument
|
3788
|
-
|
3789
|
-
|
3790
|
-
The `get` function should accept two parameters, `key` and `value`. If `value` is not
|
3791
|
-
undefined you should set the `value` first. In either case return the
|
3792
|
-
current value of the property.
|
3793
|
-
|
3794
|
-
A computed property defined in this way might look like this:
|
3910
|
+
If you pass a function as an argument, it will be used as a getter. A computed
|
3911
|
+
property defined in this way might look like this:
|
3795
3912
|
|
3796
3913
|
```js
|
3797
3914
|
let Person = Ember.Object.extend({
|
3798
|
-
|
3799
|
-
|
3915
|
+
init() {
|
3916
|
+
this._super(...arguments);
|
3917
|
+
|
3918
|
+
this.firstName = 'Betty';
|
3919
|
+
this.lastName = 'Jones';
|
3920
|
+
},
|
3800
3921
|
|
3801
3922
|
fullName: Ember.computed('firstName', 'lastName', function() {
|
3802
|
-
return this.get('firstName')
|
3923
|
+
return `${this.get('firstName')} ${this.get('lastName')}`;
|
3803
3924
|
})
|
3804
3925
|
});
|
3805
3926
|
|
@@ -3811,14 +3932,45 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
3811
3932
|
client.get('fullName'); // 'Betty Fuller'
|
3812
3933
|
```
|
3813
3934
|
|
3935
|
+
You can pass a hash with two functions, `get` and `set`, as an
|
3936
|
+
argument to provide both a getter and setter:
|
3937
|
+
|
3938
|
+
```js
|
3939
|
+
let Person = Ember.Object.extend({
|
3940
|
+
init() {
|
3941
|
+
this._super(...arguments);
|
3942
|
+
|
3943
|
+
this.firstName = 'Betty';
|
3944
|
+
this.lastName = 'Jones';
|
3945
|
+
},
|
3946
|
+
|
3947
|
+
fullName: Ember.computed({
|
3948
|
+
get(key) {
|
3949
|
+
return `${this.get('firstName')} ${this.get('lastName')}`;
|
3950
|
+
},
|
3951
|
+
set(key, value) {
|
3952
|
+
let [firstName, lastName] = value.split(/\s+/);
|
3953
|
+
this.setProperties({ firstName, lastName });
|
3954
|
+
return value;
|
3955
|
+
}
|
3956
|
+
});
|
3957
|
+
})
|
3958
|
+
|
3959
|
+
let client = Person.create();
|
3960
|
+
client.get('firstName'); // 'Betty'
|
3961
|
+
|
3962
|
+
client.set('fullName', 'Carroll Fuller');
|
3963
|
+
client.get('firstName'); // 'Carroll'
|
3964
|
+
```
|
3965
|
+
|
3966
|
+
The `set` function should accept two parameters, `key` and `value`. The value
|
3967
|
+
returned from `set` will be the new value of the property.
|
3968
|
+
|
3814
3969
|
_Note: This is the preferred way to define computed properties when writing third-party
|
3815
3970
|
libraries that depend on or use Ember, since there is no guarantee that the user
|
3816
|
-
will have prototype extensions enabled._
|
3971
|
+
will have [prototype Extensions](http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/) enabled._
|
3817
3972
|
|
3818
|
-
|
3819
|
-
[Prototype Extensions](http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/).
|
3820
|
-
The alternative syntax might look like this
|
3821
|
-
(if prototype extensions are enabled, which is the default behavior):
|
3973
|
+
The alternative syntax, with prototype extensions, might look like:
|
3822
3974
|
|
3823
3975
|
```js
|
3824
3976
|
fullName() {
|
@@ -3868,7 +4020,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
3868
4020
|
@public
|
3869
4021
|
*/
|
3870
4022
|
function cacheFor(obj, key) {
|
3871
|
-
var meta = obj
|
4023
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
3872
4024
|
var cache = meta && meta.source === obj && meta.readableCache();
|
3873
4025
|
var ret = cache && cache[key];
|
3874
4026
|
|
@@ -3902,7 +4054,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
3902
4054
|
exports.computed = computed;
|
3903
4055
|
exports.cacheFor = cacheFor;
|
3904
4056
|
});
|
3905
|
-
enifed('ember-metal/computed_macros', ['exports', 'ember-metal/
|
4057
|
+
enifed('ember-metal/computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/computed', 'ember-metal/is_empty', 'ember-metal/is_none', 'ember-metal/alias'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalIs_empty, _emberMetalIs_none, _emberMetalAlias) {
|
3906
4058
|
'use strict';
|
3907
4059
|
|
3908
4060
|
exports.empty = empty;
|
@@ -4408,47 +4560,6 @@ enifed('ember-metal/computed_macros', ['exports', 'ember-metal/core', 'ember-met
|
|
4408
4560
|
});
|
4409
4561
|
|
4410
4562
|
exports.or = or;
|
4411
|
-
/**
|
4412
|
-
A computed property that returns the array of values
|
4413
|
-
for the provided dependent properties.
|
4414
|
-
|
4415
|
-
Example
|
4416
|
-
|
4417
|
-
```javascript
|
4418
|
-
var Hamster = Ember.Object.extend({
|
4419
|
-
clothes: Ember.computed.collect('hat', 'shirt')
|
4420
|
-
});
|
4421
|
-
|
4422
|
-
var hamster = Hamster.create();
|
4423
|
-
|
4424
|
-
hamster.get('clothes'); // [null, null]
|
4425
|
-
hamster.set('hat', 'Camp Hat');
|
4426
|
-
hamster.set('shirt', 'Camp Shirt');
|
4427
|
-
hamster.get('clothes'); // ['Camp Hat', 'Camp Shirt']
|
4428
|
-
```
|
4429
|
-
|
4430
|
-
@method collect
|
4431
|
-
@for Ember.computed
|
4432
|
-
@param {String} dependentKey*
|
4433
|
-
@return {Ember.ComputedProperty} computed property which maps
|
4434
|
-
values of all passed in properties to an array.
|
4435
|
-
@public
|
4436
|
-
*/
|
4437
|
-
var collect = generateComputedWithProperties(function (properties) {
|
4438
|
-
var res = _emberMetalCore.default.A();
|
4439
|
-
for (var key in properties) {
|
4440
|
-
if (properties.hasOwnProperty(key)) {
|
4441
|
-
if (_emberMetalIs_none.default(properties[key])) {
|
4442
|
-
res.push(null);
|
4443
|
-
} else {
|
4444
|
-
res.push(properties[key]);
|
4445
|
-
}
|
4446
|
-
}
|
4447
|
-
}
|
4448
|
-
return res;
|
4449
|
-
});
|
4450
|
-
|
4451
|
-
exports.collect = collect;
|
4452
4563
|
/**
|
4453
4564
|
Creates a new property that is an alias for another property
|
4454
4565
|
on an object. Calls to `get` or `set` this property behave as
|
@@ -4619,7 +4730,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
4619
4730
|
|
4620
4731
|
@class Ember
|
4621
4732
|
@static
|
4622
|
-
@version 2.
|
4733
|
+
@version 2.3.0-beta.1
|
4623
4734
|
@public
|
4624
4735
|
*/
|
4625
4736
|
|
@@ -4663,11 +4774,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
4663
4774
|
|
4664
4775
|
@property VERSION
|
4665
4776
|
@type String
|
4666
|
-
@default '2.
|
4777
|
+
@default '2.3.0-beta.1'
|
4667
4778
|
@static
|
4668
4779
|
@public
|
4669
4780
|
*/
|
4670
|
-
Ember.VERSION = '2.
|
4781
|
+
Ember.VERSION = '2.3.0-beta.1';
|
4671
4782
|
|
4672
4783
|
/**
|
4673
4784
|
The hash of environment variables used to control various configuration
|
@@ -5122,7 +5233,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
5122
5233
|
}
|
5123
5234
|
|
5124
5235
|
function accumulateListeners(obj, eventName, otherActions) {
|
5125
|
-
var meta = obj
|
5236
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
5126
5237
|
if (!meta) {
|
5127
5238
|
return;
|
5128
5239
|
}
|
@@ -5282,7 +5393,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
5282
5393
|
|
5283
5394
|
function sendEvent(obj, eventName, params, actions) {
|
5284
5395
|
if (!actions) {
|
5285
|
-
var meta = obj
|
5396
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
5286
5397
|
actions = meta && meta.matchingListeners(eventName);
|
5287
5398
|
}
|
5288
5399
|
|
@@ -5334,7 +5445,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
5334
5445
|
*/
|
5335
5446
|
|
5336
5447
|
function hasListeners(obj, eventName) {
|
5337
|
-
var meta = obj
|
5448
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
5338
5449
|
if (!meta) {
|
5339
5450
|
return false;
|
5340
5451
|
}
|
@@ -5351,7 +5462,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
5351
5462
|
|
5352
5463
|
function listenersFor(obj, eventName) {
|
5353
5464
|
var ret = [];
|
5354
|
-
var meta = obj
|
5465
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
5355
5466
|
var actions = meta && meta.matchingListeners(eventName);
|
5356
5467
|
|
5357
5468
|
if (!actions) {
|
@@ -5577,7 +5688,7 @@ enifed('ember-metal/get_properties', ['exports', 'ember-metal/property_get'], fu
|
|
5577
5688
|
return ret;
|
5578
5689
|
}
|
5579
5690
|
});
|
5580
|
-
enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/properties'], function (exports, _emberMetalDebug, _emberMetalComputed, _emberMetalAlias, _emberMetalProperties) {
|
5691
|
+
enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/properties', 'container/owner'], function (exports, _emberMetalDebug, _emberMetalComputed, _emberMetalAlias, _emberMetalProperties, _containerOwner) {
|
5581
5692
|
'use strict';
|
5582
5693
|
|
5583
5694
|
/**
|
@@ -5601,11 +5712,12 @@ enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-
|
|
5601
5712
|
|
5602
5713
|
function injectedPropertyGet(keyName) {
|
5603
5714
|
var desc = this[keyName];
|
5715
|
+
var owner = _containerOwner.getOwner(this);
|
5604
5716
|
|
5605
5717
|
_emberMetalDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
|
5606
|
-
_emberMetalDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.',
|
5718
|
+
_emberMetalDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
|
5607
5719
|
|
5608
|
-
return
|
5720
|
+
return owner.lookup(desc.type + ':' + (desc.name || keyName));
|
5609
5721
|
}
|
5610
5722
|
|
5611
5723
|
InjectedProperty.prototype = Object.create(_emberMetalProperties.Descriptor.prototype);
|
@@ -5928,6 +6040,8 @@ enifed('ember-metal/is_empty', ['exports', 'ember-metal/property_get', 'ember-me
|
|
5928
6040
|
Ember.isEmpty({}); // false
|
5929
6041
|
Ember.isEmpty('Adam Hawkins'); // false
|
5930
6042
|
Ember.isEmpty([0,1,2]); // false
|
6043
|
+
Ember.isEmpty('\n\t'); // false
|
6044
|
+
Ember.isEmpty(' '); // false
|
5931
6045
|
```
|
5932
6046
|
|
5933
6047
|
@method isEmpty
|
@@ -6797,6 +6911,8 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
6797
6911
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
6798
6912
|
|
6799
6913
|
exports.meta = meta;
|
6914
|
+
exports.peekMeta = peekMeta;
|
6915
|
+
exports.deleteMeta = deleteMeta;
|
6800
6916
|
|
6801
6917
|
/**
|
6802
6918
|
@module ember-metal
|
@@ -6835,6 +6951,7 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
6835
6951
|
};
|
6836
6952
|
|
6837
6953
|
var memberNames = Object.keys(members);
|
6954
|
+
var META_FIELD = '__ember_meta__';
|
6838
6955
|
|
6839
6956
|
function Meta(obj, parentMeta) {
|
6840
6957
|
this._cache = undefined;
|
@@ -7093,14 +7210,25 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
7093
7210
|
|
7094
7211
|
exports.META_DESC = META_DESC;
|
7095
7212
|
var EMBER_META_PROPERTY = {
|
7096
|
-
name:
|
7213
|
+
name: META_FIELD,
|
7097
7214
|
descriptor: META_DESC
|
7098
7215
|
};
|
7099
7216
|
|
7100
|
-
//
|
7101
|
-
var
|
7217
|
+
// choose the one appropriate for given platform
|
7218
|
+
var setMeta = function (obj, meta) {
|
7219
|
+
// if `null` already, just set it to the new value
|
7220
|
+
// otherwise define property first
|
7221
|
+
if (obj[META_FIELD] !== null) {
|
7222
|
+
if (obj.__defineNonEnumerable) {
|
7223
|
+
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
|
7224
|
+
} else {
|
7225
|
+
Object.defineProperty(obj, META_FIELD, META_DESC);
|
7226
|
+
}
|
7227
|
+
}
|
7228
|
+
|
7229
|
+
obj[META_FIELD] = meta;
|
7230
|
+
};
|
7102
7231
|
|
7103
|
-
exports.EMPTY_META = EMPTY_META;
|
7104
7232
|
/**
|
7105
7233
|
Retrieves the meta hash for an object. If `writable` is true ensures the
|
7106
7234
|
hash is writable for this object as well.
|
@@ -7120,34 +7248,32 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
7120
7248
|
@return {Object} the meta hash for an object
|
7121
7249
|
*/
|
7122
7250
|
|
7123
|
-
function meta(obj
|
7124
|
-
var
|
7125
|
-
|
7126
|
-
return ret || EMPTY_META;
|
7127
|
-
}
|
7251
|
+
function meta(obj) {
|
7252
|
+
var maybeMeta = peekMeta(obj);
|
7253
|
+
var parent = undefined;
|
7128
7254
|
|
7129
|
-
|
7130
|
-
|
7255
|
+
// remove this code, in-favor of explicit parent
|
7256
|
+
if (maybeMeta) {
|
7257
|
+
if (maybeMeta.source === obj) {
|
7258
|
+
return maybeMeta;
|
7259
|
+
}
|
7260
|
+
parent = maybeMeta;
|
7131
7261
|
}
|
7132
7262
|
|
7133
|
-
|
7134
|
-
|
7135
|
-
|
7136
|
-
|
7137
|
-
}
|
7263
|
+
var newMeta = new Meta(obj, parent);
|
7264
|
+
setMeta(obj, newMeta);
|
7265
|
+
return newMeta;
|
7266
|
+
}
|
7138
7267
|
|
7139
|
-
|
7140
|
-
|
7141
|
-
|
7142
|
-
if (obj.__defineNonEnumerable) {
|
7143
|
-
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
|
7144
|
-
} else {
|
7145
|
-
Object.defineProperty(obj, '__ember_meta__', META_DESC);
|
7146
|
-
}
|
7147
|
-
}
|
7148
|
-
obj.__ember_meta__ = ret;
|
7268
|
+
function peekMeta(obj) {
|
7269
|
+
return obj[META_FIELD];
|
7270
|
+
}
|
7149
7271
|
|
7150
|
-
|
7272
|
+
function deleteMeta(obj) {
|
7273
|
+
if (typeof obj[META_FIELD] !== 'object') {
|
7274
|
+
return;
|
7275
|
+
}
|
7276
|
+
obj[META_FIELD] = null;
|
7151
7277
|
}
|
7152
7278
|
});
|
7153
7279
|
enifed('ember-metal/meta_listeners', ['exports'], function (exports) {
|
@@ -7332,7 +7458,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
7332
7458
|
@module ember
|
7333
7459
|
@submodule ember-metal
|
7334
7460
|
*/
|
7335
|
-
|
7336
7461
|
exports.mixin = mixin;
|
7337
7462
|
exports.default = Mixin;
|
7338
7463
|
exports.required = required;
|
@@ -7822,6 +7947,10 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
7822
7947
|
this.mixins = undefined;
|
7823
7948
|
}
|
7824
7949
|
this.ownerConstructor = undefined;
|
7950
|
+
this._without = undefined;
|
7951
|
+
this[_emberMetalUtils.GUID_KEY] = null;
|
7952
|
+
this[_emberMetalUtils.GUID_KEY + '_name'] = null;
|
7953
|
+
_emberMetalDebug.debugSeal(this);
|
7825
7954
|
}
|
7826
7955
|
|
7827
7956
|
Mixin._apply = applyMixin;
|
@@ -7938,7 +8067,7 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
7938
8067
|
if (obj instanceof Mixin) {
|
7939
8068
|
return _detect(obj, this, {});
|
7940
8069
|
}
|
7941
|
-
var m = obj
|
8070
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
7942
8071
|
if (!m) {
|
7943
8072
|
return false;
|
7944
8073
|
}
|
@@ -7989,10 +8118,12 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
7989
8118
|
return ret;
|
7990
8119
|
};
|
7991
8120
|
|
8121
|
+
_emberMetalDebug.debugSeal(MixinPrototype);
|
8122
|
+
|
7992
8123
|
// returns the mixins currently applied to the specified object
|
7993
8124
|
// TODO: Make Ember.mixin
|
7994
8125
|
Mixin.mixins = function (obj) {
|
7995
|
-
var m = obj
|
8126
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
7996
8127
|
var ret = [];
|
7997
8128
|
if (!m) {
|
7998
8129
|
return ret;
|
@@ -8083,7 +8214,7 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
8083
8214
|
@param {String} propertyNames*
|
8084
8215
|
@param {Function} func
|
8085
8216
|
@return func
|
8086
|
-
@
|
8217
|
+
@public
|
8087
8218
|
*/
|
8088
8219
|
|
8089
8220
|
function observer() {
|
@@ -8598,10 +8729,10 @@ enifed('ember-metal/properties', ['exports', 'ember-metal/debug', 'ember-metal/f
|
|
8598
8729
|
return this;
|
8599
8730
|
}
|
8600
8731
|
});
|
8601
|
-
enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-metal/events', 'ember-metal/observer_set'], function (exports, _emberMetalUtils, _emberMetalEvents, _emberMetalObserver_set) {
|
8732
|
+
enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/symbol'], function (exports, _emberMetalUtils, _emberMetalMeta, _emberMetalEvents, _emberMetalObserver_set, _emberMetalSymbol) {
|
8602
8733
|
'use strict';
|
8603
8734
|
|
8604
|
-
var PROPERTY_DID_CHANGE =
|
8735
|
+
var PROPERTY_DID_CHANGE = _emberMetalSymbol.default('PROPERTY_DID_CHANGE');
|
8605
8736
|
|
8606
8737
|
exports.PROPERTY_DID_CHANGE = PROPERTY_DID_CHANGE;
|
8607
8738
|
var beforeObserverSet = new _emberMetalObserver_set.default();
|
@@ -8629,7 +8760,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
8629
8760
|
@private
|
8630
8761
|
*/
|
8631
8762
|
function propertyWillChange(obj, keyName) {
|
8632
|
-
var m = obj
|
8763
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
8633
8764
|
var watching = m && m.peekWatching(keyName) > 0 || keyName === 'length';
|
8634
8765
|
var proto = m && m.proto;
|
8635
8766
|
var possibleDesc = obj[keyName];
|
@@ -8669,7 +8800,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
8669
8800
|
@private
|
8670
8801
|
*/
|
8671
8802
|
function propertyDidChange(obj, keyName) {
|
8672
|
-
var m = obj
|
8803
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
8673
8804
|
var watching = m && m.peekWatching(keyName) > 0 || keyName === 'length';
|
8674
8805
|
var proto = m && m.proto;
|
8675
8806
|
var possibleDesc = obj[keyName];
|
@@ -8881,7 +9012,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
8881
9012
|
exports.endPropertyChanges = endPropertyChanges;
|
8882
9013
|
exports.changeProperties = changeProperties;
|
8883
9014
|
});
|
8884
|
-
enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/path_cache'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalPath_cache) {
|
9015
|
+
enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalPath_cache, _emberMetalMeta) {
|
8885
9016
|
/**
|
8886
9017
|
@module ember-metal
|
8887
9018
|
*/
|
@@ -8939,9 +9070,9 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
8939
9070
|
return obj;
|
8940
9071
|
}
|
8941
9072
|
|
8942
|
-
var meta = obj
|
8943
|
-
var
|
8944
|
-
var desc =
|
9073
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
9074
|
+
var value = obj[keyName];
|
9075
|
+
var desc = value !== null && typeof value === 'object' && value.isDescriptor ? value : undefined;
|
8945
9076
|
var ret;
|
8946
9077
|
|
8947
9078
|
if (desc === undefined && _emberMetalPath_cache.isPath(keyName)) {
|
@@ -8955,10 +9086,10 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
8955
9086
|
if (meta && meta.peekWatching(keyName) > 0) {
|
8956
9087
|
ret = meta.peekValues(keyName);
|
8957
9088
|
} else {
|
8958
|
-
ret =
|
9089
|
+
ret = value;
|
8959
9090
|
}
|
8960
9091
|
} else {
|
8961
|
-
ret =
|
9092
|
+
ret = value;
|
8962
9093
|
}
|
8963
9094
|
|
8964
9095
|
if (ret === undefined && 'object' === typeof obj && !(keyName in obj) && 'function' === typeof obj.unknownProperty) {
|
@@ -9042,6 +9173,23 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
9042
9173
|
return root;
|
9043
9174
|
}
|
9044
9175
|
|
9176
|
+
/**
|
9177
|
+
Retrieves the value of a property from an Object, or a default value in the
|
9178
|
+
case that the property returns `undefined`.
|
9179
|
+
|
9180
|
+
```javascript
|
9181
|
+
Ember.getWithDefault(person, 'lastName', 'Doe');
|
9182
|
+
```
|
9183
|
+
|
9184
|
+
@method getWithDefault
|
9185
|
+
@for Ember
|
9186
|
+
@param {Object} obj The object to retrieve from.
|
9187
|
+
@param {String} keyName The name of the property to retrieve
|
9188
|
+
@param {Object} defaultValue The value to return if the property value is undefined
|
9189
|
+
@return {Object} The property value or the defaultValue.
|
9190
|
+
@public
|
9191
|
+
*/
|
9192
|
+
|
9045
9193
|
function getWithDefault(root, key, defaultValue) {
|
9046
9194
|
var value = get(root, key);
|
9047
9195
|
|
@@ -9053,7 +9201,7 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
9053
9201
|
|
9054
9202
|
exports.default = get;
|
9055
9203
|
});
|
9056
|
-
enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/error', 'ember-metal/path_cache'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache) {
|
9204
|
+
enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/error', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache, _emberMetalMeta) {
|
9057
9205
|
'use strict';
|
9058
9206
|
|
9059
9207
|
exports.set = set;
|
@@ -9082,7 +9230,7 @@ enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal
|
|
9082
9230
|
|
9083
9231
|
var meta, possibleDesc, desc;
|
9084
9232
|
if (obj) {
|
9085
|
-
meta = obj
|
9233
|
+
meta = _emberMetalMeta.peekMeta(obj);
|
9086
9234
|
possibleDesc = obj[keyName];
|
9087
9235
|
desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
|
9088
9236
|
}
|
@@ -10056,7 +10204,11 @@ enifed('ember-metal/streams/dependency', ['exports', 'ember-metal/debug', 'ember
|
|
10056
10204
|
enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/observer', 'ember-metal/streams/stream', 'ember-metal/streams/utils'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalObserver, _emberMetalStreamsStream, _emberMetalStreamsUtils) {
|
10057
10205
|
'use strict';
|
10058
10206
|
|
10059
|
-
|
10207
|
+
function labelFor(source, key) {
|
10208
|
+
return source.label ? source.label + '.' + key : key;
|
10209
|
+
}
|
10210
|
+
|
10211
|
+
exports.default = _emberMetalStreamsStream.default.extend({
|
10060
10212
|
init: function (source, key) {
|
10061
10213
|
_emberMetalDebug.assert('KeyStream error: source must be a stream', _emberMetalStreamsUtils.isStream(source)); // TODO: This isn't necessary.
|
10062
10214
|
_emberMetalDebug.assert('KeyStream error: key must be a non-empty string', typeof key === 'string' && key.length > 0);
|
@@ -10073,9 +10225,17 @@ enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember
|
|
10073
10225
|
|
10074
10226
|
compute: function () {
|
10075
10227
|
var object = this.sourceDep.getValue();
|
10076
|
-
|
10228
|
+
var type = typeof object;
|
10229
|
+
|
10230
|
+
if (!object || type === 'boolean') {
|
10231
|
+
return;
|
10232
|
+
}
|
10233
|
+
|
10234
|
+
if (type === 'object') {
|
10077
10235
|
return _emberMetalProperty_get.get(object, this.key);
|
10078
10236
|
}
|
10237
|
+
|
10238
|
+
return object[this.key];
|
10079
10239
|
},
|
10080
10240
|
|
10081
10241
|
setValue: function (value) {
|
@@ -10120,12 +10280,6 @@ enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember
|
|
10120
10280
|
this._clearObservedObject();
|
10121
10281
|
}
|
10122
10282
|
});
|
10123
|
-
|
10124
|
-
function labelFor(source, key) {
|
10125
|
-
return source.label ? source.label + '.' + key : key;
|
10126
|
-
}
|
10127
|
-
|
10128
|
-
exports.default = KeyStream;
|
10129
10283
|
});
|
10130
10284
|
enifed('ember-metal/streams/proxy-stream', ['exports', 'ember-runtime/system/object', 'ember-metal/streams/stream'], function (exports, _emberRuntimeSystemObject, _emberMetalStreamsStream) {
|
10131
10285
|
'use strict';
|
@@ -10159,7 +10313,7 @@ enifed('ember-metal/streams/proxy-stream', ['exports', 'ember-runtime/system/obj
|
|
10159
10313
|
|
10160
10314
|
exports.default = ProxyStream;
|
10161
10315
|
});
|
10162
|
-
enifed('ember-metal/streams/stream', ['exports', 'ember-metal/
|
10316
|
+
enifed('ember-metal/streams/stream', ['exports', 'ember-metal/assign', 'ember-metal/debug', 'ember-metal/path_cache', 'ember-metal/observer', 'ember-metal/streams/utils', 'ember-metal/empty_object', 'ember-metal/streams/subscriber', 'ember-metal/streams/dependency', 'ember-metal/utils', 'require'], function (exports, _emberMetalAssign, _emberMetalDebug, _emberMetalPath_cache, _emberMetalObserver, _emberMetalStreamsUtils, _emberMetalEmpty_object, _emberMetalStreamsSubscriber, _emberMetalStreamsDependency, _emberMetalUtils, _require) {
|
10163
10317
|
'use strict';
|
10164
10318
|
|
10165
10319
|
exports.wrap = wrap;
|
@@ -10201,7 +10355,7 @@ enifed('ember-metal/streams/stream', ['exports', 'ember-metal/core', 'ember-meta
|
|
10201
10355
|
},
|
10202
10356
|
|
10203
10357
|
_makeChildStream: function (key) {
|
10204
|
-
KeyStream = KeyStream ||
|
10358
|
+
KeyStream = KeyStream || _require.default('ember-metal/streams/key-stream').default;
|
10205
10359
|
return new KeyStream(this, key);
|
10206
10360
|
},
|
10207
10361
|
|
@@ -10341,7 +10495,7 @@ enifed('ember-metal/streams/stream', ['exports', 'ember-metal/core', 'ember-meta
|
|
10341
10495
|
if (value !== this.observedProxy) {
|
10342
10496
|
this._clearObservedProxy();
|
10343
10497
|
|
10344
|
-
ProxyMixin = ProxyMixin ||
|
10498
|
+
ProxyMixin = ProxyMixin || _require.default('ember-runtime/mixins/-proxy').default;
|
10345
10499
|
|
10346
10500
|
if (ProxyMixin.detect(value)) {
|
10347
10501
|
_emberMetalObserver.addObserver(value, 'content', this, this.notify);
|
@@ -10936,8 +11090,18 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
10936
11090
|
}
|
10937
11091
|
}
|
10938
11092
|
});
|
10939
|
-
enifed(
|
10940
|
-
|
11093
|
+
enifed('ember-metal/symbol', ['exports', 'ember-metal/utils'], function (exports, _emberMetalUtils) {
|
11094
|
+
'use strict';
|
11095
|
+
|
11096
|
+
exports.default = symbol;
|
11097
|
+
|
11098
|
+
function symbol(debugName) {
|
11099
|
+
// TODO: Investigate using platform symbols, but we do not
|
11100
|
+
// want to require non-enumerability for this API, which
|
11101
|
+
// would introduce a large cost.
|
11102
|
+
|
11103
|
+
return _emberMetalUtils.intern(debugName + ' [id=' + _emberMetalUtils.GUID_KEY + Math.floor(Math.random() * new Date()) + ']');
|
11104
|
+
}
|
10941
11105
|
});
|
10942
11106
|
enifed('ember-metal/utils', ['exports'], function (exports) {
|
10943
11107
|
'no use strict';
|
@@ -10956,7 +11120,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
10956
11120
|
@return {Number} the uuid
|
10957
11121
|
*/
|
10958
11122
|
exports.uuid = uuid;
|
10959
|
-
exports.
|
11123
|
+
exports.intern = intern;
|
10960
11124
|
exports.generateGuid = generateGuid;
|
10961
11125
|
exports.guidFor = guidFor;
|
10962
11126
|
exports.wrap = wrap;
|
@@ -11033,6 +11197,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
11033
11197
|
@private
|
11034
11198
|
@return {String} interned version of the provided string
|
11035
11199
|
*/
|
11200
|
+
|
11036
11201
|
function intern(str) {
|
11037
11202
|
var obj = {};
|
11038
11203
|
obj[str] = 1;
|
@@ -11044,14 +11209,6 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
11044
11209
|
return str;
|
11045
11210
|
}
|
11046
11211
|
|
11047
|
-
function symbol(debugName) {
|
11048
|
-
// TODO: Investigate using platform symbols, but we do not
|
11049
|
-
// want to require non-enumerability for this API, which
|
11050
|
-
// would introduce a large cost.
|
11051
|
-
|
11052
|
-
return intern(debugName + ' [id=' + GUID_KEY + Math.floor(Math.random() * new Date()) + ']');
|
11053
|
-
}
|
11054
|
-
|
11055
11212
|
/**
|
11056
11213
|
A unique key used to assign guids and other private metadata to objects.
|
11057
11214
|
If you inspect an object in your browser debugger you will often see these.
|
@@ -11514,6 +11671,9 @@ enifed('ember-metal/watch_key', ['exports', 'ember-metal/features', 'ember-metal
|
|
11514
11671
|
exports.watchKey = watchKey;
|
11515
11672
|
exports.unwatchKey = unwatchKey;
|
11516
11673
|
|
11674
|
+
var handleMandatorySetter = undefined,
|
11675
|
+
lookupDescriptor = undefined;
|
11676
|
+
|
11517
11677
|
function watchKey(obj, keyName, meta) {
|
11518
11678
|
// can't watch length on Array - it is special...
|
11519
11679
|
if (keyName === 'length' && Array.isArray(obj)) {
|
@@ -11545,8 +11705,23 @@ enifed('ember-metal/watch_key', ['exports', 'ember-metal/features', 'ember-metal
|
|
11545
11705
|
}
|
11546
11706
|
|
11547
11707
|
if (_emberMetalFeatures.default('mandatory-setter')) {
|
11548
|
-
|
11549
|
-
var
|
11708
|
+
lookupDescriptor = function lookupDescriptor(obj, keyName) {
|
11709
|
+
var current = obj;
|
11710
|
+
while (current) {
|
11711
|
+
var descriptor = Object.getOwnPropertyDescriptor(current, keyName);
|
11712
|
+
|
11713
|
+
if (descriptor) {
|
11714
|
+
return descriptor;
|
11715
|
+
}
|
11716
|
+
|
11717
|
+
current = Object.getPrototypeOf(current);
|
11718
|
+
}
|
11719
|
+
|
11720
|
+
return null;
|
11721
|
+
};
|
11722
|
+
|
11723
|
+
handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) {
|
11724
|
+
var descriptor = lookupDescriptor(obj, keyName);
|
11550
11725
|
var configurable = descriptor ? descriptor.configurable : true;
|
11551
11726
|
var isWritable = descriptor ? descriptor.writable : true;
|
11552
11727
|
var hasValue = descriptor ? 'value' in descriptor : true;
|
@@ -11656,7 +11831,7 @@ enifed('ember-metal/watch_path', ['exports', 'ember-metal/meta', 'ember-metal/ch
|
|
11656
11831
|
}
|
11657
11832
|
}
|
11658
11833
|
});
|
11659
|
-
enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/watch_key', 'ember-metal/watch_path', 'ember-metal/path_cache'], function (exports, _emberMetalChains, _emberMetalWatch_key, _emberMetalWatch_path, _emberMetalPath_cache) {
|
11834
|
+
enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/watch_key', 'ember-metal/watch_path', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalChains, _emberMetalWatch_key, _emberMetalWatch_path, _emberMetalPath_cache, _emberMetalMeta) {
|
11660
11835
|
/**
|
11661
11836
|
@module ember-metal
|
11662
11837
|
*/
|
@@ -11696,7 +11871,7 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
11696
11871
|
exports.watch = watch;
|
11697
11872
|
|
11698
11873
|
function isWatching(obj, key) {
|
11699
|
-
var meta = obj
|
11874
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
11700
11875
|
return (meta && meta.peekWatching(key)) > 0;
|
11701
11876
|
}
|
11702
11877
|
|
@@ -11729,11 +11904,11 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
11729
11904
|
*/
|
11730
11905
|
|
11731
11906
|
function destroy(obj) {
|
11732
|
-
var meta = obj
|
11907
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
11733
11908
|
var node, nodes, key, nodeObject;
|
11734
11909
|
|
11735
11910
|
if (meta) {
|
11736
|
-
obj
|
11911
|
+
_emberMetalMeta.deleteMeta(obj);
|
11737
11912
|
// remove chainWatchers to remove circular references that would prevent GC
|
11738
11913
|
node = meta.readableChains();
|
11739
11914
|
if (node) {
|
@@ -11817,9 +11992,9 @@ enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/debug', 'embe
|
|
11817
11992
|
_emberMetalCore.default.Error = _emberMetalError.default;
|
11818
11993
|
_emberMetalCore.default.guidFor = _emberMetalUtils.guidFor;
|
11819
11994
|
_emberMetalCore.default.META_DESC = _emberMetalMeta.META_DESC;
|
11820
|
-
_emberMetalCore.default.EMPTY_META = _emberMetalMeta.EMPTY_META;
|
11821
11995
|
_emberMetalCore.default.meta = _emberMetalMeta.meta;
|
11822
11996
|
_emberMetalCore.default.inspect = _emberMetalUtils.inspect;
|
11997
|
+
|
11823
11998
|
_emberMetalCore.default.tryCatchFinally = _emberMetalUtils.deprecatedTryCatchFinally;
|
11824
11999
|
_emberMetalCore.default.makeArray = _emberMetalUtils.makeArray;
|
11825
12000
|
_emberMetalCore.default.canInvoke = _emberMetalUtils.canInvoke;
|
@@ -12097,7 +12272,7 @@ enifed('ember-runtime/compare', ['exports', 'ember-runtime/utils', 'ember-runtim
|
|
12097
12272
|
}
|
12098
12273
|
}
|
12099
12274
|
});
|
12100
|
-
enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/compare', 'ember-runtime/utils', 'ember-runtime/system/native_array'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalError, _emberMetalComputed, _emberMetalObserver, _emberRuntimeCompare, _emberRuntimeUtils, _emberRuntimeSystemNative_array) {
|
12275
|
+
enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/compare', 'ember-runtime/utils', 'ember-runtime/system/native_array', 'ember-metal/is_none', 'ember-metal/get_properties'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalError, _emberMetalComputed, _emberMetalObserver, _emberRuntimeCompare, _emberRuntimeUtils, _emberRuntimeSystemNative_array, _emberMetalIs_none, _emberMetalGet_properties) {
|
12101
12276
|
/**
|
12102
12277
|
@module ember
|
12103
12278
|
@submodule ember-runtime
|
@@ -12115,6 +12290,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal
|
|
12115
12290
|
exports.uniq = uniq;
|
12116
12291
|
exports.intersect = intersect;
|
12117
12292
|
exports.setDiff = setDiff;
|
12293
|
+
exports.collect = collect;
|
12118
12294
|
exports.sort = sort;
|
12119
12295
|
|
12120
12296
|
function reduceMacro(dependentKey, callback, initialValue) {
|
@@ -12619,6 +12795,54 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal
|
|
12619
12795
|
}).readOnly();
|
12620
12796
|
}
|
12621
12797
|
|
12798
|
+
/**
|
12799
|
+
A computed property that returns the array of values
|
12800
|
+
for the provided dependent properties.
|
12801
|
+
|
12802
|
+
Example
|
12803
|
+
|
12804
|
+
```javascript
|
12805
|
+
var Hamster = Ember.Object.extend({
|
12806
|
+
clothes: Ember.computed.collect('hat', 'shirt')
|
12807
|
+
});
|
12808
|
+
|
12809
|
+
var hamster = Hamster.create();
|
12810
|
+
|
12811
|
+
hamster.get('clothes'); // [null, null]
|
12812
|
+
hamster.set('hat', 'Camp Hat');
|
12813
|
+
hamster.set('shirt', 'Camp Shirt');
|
12814
|
+
hamster.get('clothes'); // ['Camp Hat', 'Camp Shirt']
|
12815
|
+
```
|
12816
|
+
|
12817
|
+
@method collect
|
12818
|
+
@for Ember.computed
|
12819
|
+
@param {String} dependentKey*
|
12820
|
+
@return {Ember.ComputedProperty} computed property which maps
|
12821
|
+
values of all passed in properties to an array.
|
12822
|
+
@public
|
12823
|
+
*/
|
12824
|
+
|
12825
|
+
function collect() {
|
12826
|
+
for (var _len3 = arguments.length, dependentKeys = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
12827
|
+
dependentKeys[_key3] = arguments[_key3];
|
12828
|
+
}
|
12829
|
+
|
12830
|
+
return multiArrayMacro(dependentKeys, function () {
|
12831
|
+
var properties = _emberMetalGet_properties.default(this, dependentKeys);
|
12832
|
+
var res = _emberRuntimeSystemNative_array.A();
|
12833
|
+
for (var key in properties) {
|
12834
|
+
if (properties.hasOwnProperty(key)) {
|
12835
|
+
if (_emberMetalIs_none.default(properties[key])) {
|
12836
|
+
res.push(null);
|
12837
|
+
} else {
|
12838
|
+
res.push(properties[key]);
|
12839
|
+
}
|
12840
|
+
}
|
12841
|
+
}
|
12842
|
+
return res;
|
12843
|
+
});
|
12844
|
+
}
|
12845
|
+
|
12622
12846
|
/**
|
12623
12847
|
A computed property which returns a new array with all the
|
12624
12848
|
properties from the first dependent array sorted based on a property
|
@@ -14223,13 +14447,15 @@ enifed('ember-runtime/mixins/comparable', ['exports', 'ember-metal/mixin'], func
|
|
14223
14447
|
compare: null
|
14224
14448
|
});
|
14225
14449
|
});
|
14226
|
-
enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop', 'ember-metal/mixin'], function (exports, _emberMetalRun_loop, _emberMetalMixin) {
|
14450
|
+
enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop', 'ember-metal/debug', 'ember-metal/mixin'], function (exports, _emberMetalRun_loop, _emberMetalDebug, _emberMetalMixin) {
|
14227
14451
|
/**
|
14228
14452
|
@module ember
|
14229
14453
|
@submodule ember-runtime
|
14230
14454
|
*/
|
14231
14455
|
'use strict';
|
14232
14456
|
|
14457
|
+
exports.buildFakeContainerWithDeprecations = buildFakeContainerWithDeprecations;
|
14458
|
+
|
14233
14459
|
/**
|
14234
14460
|
ContainerProxyMixin is used to provide public access to specific
|
14235
14461
|
container functionality.
|
@@ -14306,6 +14532,31 @@ enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop
|
|
14306
14532
|
return (_container__ = this.__container__)[name].apply(_container__, arguments);
|
14307
14533
|
};
|
14308
14534
|
}
|
14535
|
+
|
14536
|
+
function buildFakeContainerWithDeprecations(container) {
|
14537
|
+
var fakeContainer = {};
|
14538
|
+
var propertyMappings = {
|
14539
|
+
lookup: 'lookup',
|
14540
|
+
lookupFactory: '_lookupFactory'
|
14541
|
+
};
|
14542
|
+
|
14543
|
+
for (var containerProperty in propertyMappings) {
|
14544
|
+
fakeContainer[containerProperty] = buildFakeContainerFunction(container, containerProperty, propertyMappings[containerProperty]);
|
14545
|
+
}
|
14546
|
+
|
14547
|
+
return fakeContainer;
|
14548
|
+
}
|
14549
|
+
|
14550
|
+
function buildFakeContainerFunction(container, containerProperty, ownerProperty) {
|
14551
|
+
return function () {
|
14552
|
+
_emberMetalDebug.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper to access the owner of this object and then call `' + ownerProperty + '` instead.', false, {
|
14553
|
+
id: 'ember-application.injected-container',
|
14554
|
+
until: '3.0.0',
|
14555
|
+
url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access'
|
14556
|
+
});
|
14557
|
+
return container[containerProperty].apply(container, arguments);
|
14558
|
+
};
|
14559
|
+
}
|
14309
14560
|
});
|
14310
14561
|
enifed('ember-runtime/mixins/controller', ['exports', 'ember-metal/mixin', 'ember-metal/alias', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/controller_content_model_alias_deprecation'], function (exports, _emberMetalMixin, _emberMetalAlias, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsController_content_model_alias_deprecation) {
|
14311
14562
|
'use strict';
|
@@ -14338,8 +14589,6 @@ enifed('ember-runtime/mixins/controller', ['exports', 'ember-metal/mixin', 'embe
|
|
14338
14589
|
*/
|
14339
14590
|
target: null,
|
14340
14591
|
|
14341
|
-
container: null,
|
14342
|
-
|
14343
14592
|
parentController: null,
|
14344
14593
|
|
14345
14594
|
store: null,
|
@@ -14461,7 +14710,7 @@ enifed('ember-runtime/mixins/copyable', ['exports', 'ember-metal/debug', 'ember-
|
|
14461
14710
|
}
|
14462
14711
|
});
|
14463
14712
|
});
|
14464
|
-
enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/
|
14713
|
+
enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-metal/computed', 'ember-metal/property_events', 'ember-metal/events', 'ember-runtime/compare', 'require'], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMixin, _emberMetalComputed, _emberMetalProperty_events, _emberMetalEvents, _emberRuntimeCompare, _require) {
|
14465
14714
|
/**
|
14466
14715
|
@module ember
|
14467
14716
|
@submodule ember-runtime
|
@@ -14473,6 +14722,12 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
14473
14722
|
|
14474
14723
|
'use strict';
|
14475
14724
|
|
14725
|
+
var _emberA = undefined;
|
14726
|
+
|
14727
|
+
function emberA() {
|
14728
|
+
return (_emberA || (_emberA = _require.default('ember-runtime/system/native_array').A))();
|
14729
|
+
}
|
14730
|
+
|
14476
14731
|
var contexts = [];
|
14477
14732
|
|
14478
14733
|
function popCtx() {
|
@@ -14750,7 +15005,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
14750
15005
|
@public
|
14751
15006
|
*/
|
14752
15007
|
map: function (callback, target) {
|
14753
|
-
var ret =
|
15008
|
+
var ret = emberA();
|
14754
15009
|
|
14755
15010
|
this.forEach(function (x, idx, i) {
|
14756
15011
|
ret[idx] = callback.call(target, x, idx, i);
|
@@ -14797,7 +15052,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
14797
15052
|
@public
|
14798
15053
|
*/
|
14799
15054
|
filter: function (callback, target) {
|
14800
|
-
var ret =
|
15055
|
+
var ret = emberA();
|
14801
15056
|
|
14802
15057
|
this.forEach(function (x, idx, i) {
|
14803
15058
|
if (callback.call(target, x, idx, i)) {
|
@@ -15108,7 +15363,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
15108
15363
|
args[_key - 1] = arguments[_key];
|
15109
15364
|
}
|
15110
15365
|
|
15111
|
-
var ret =
|
15366
|
+
var ret = emberA();
|
15112
15367
|
|
15113
15368
|
this.forEach(function (x, idx) {
|
15114
15369
|
var method = x && x[methodName];
|
@@ -15129,7 +15384,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
15129
15384
|
@public
|
15130
15385
|
*/
|
15131
15386
|
toArray: function () {
|
15132
|
-
var ret =
|
15387
|
+
var ret = emberA();
|
15133
15388
|
|
15134
15389
|
this.forEach(function (o, idx) {
|
15135
15390
|
ret[idx] = o;
|
@@ -15172,7 +15427,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
15172
15427
|
return this; // nothing to do
|
15173
15428
|
}
|
15174
15429
|
|
15175
|
-
var ret =
|
15430
|
+
var ret = emberA();
|
15176
15431
|
|
15177
15432
|
this.forEach(function (k) {
|
15178
15433
|
if (k !== value) {
|
@@ -15196,7 +15451,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
15196
15451
|
@public
|
15197
15452
|
*/
|
15198
15453
|
uniq: function () {
|
15199
|
-
var ret =
|
15454
|
+
var ret = emberA();
|
15200
15455
|
|
15201
15456
|
this.forEach(function (k) {
|
15202
15457
|
if (ret.indexOf(k) < 0) {
|
@@ -17179,6 +17434,29 @@ enifed('ember-runtime/mixins/target_action_support', ['exports', 'ember-metal/co
|
|
17179
17434
|
exports.default = TargetActionSupport;
|
17180
17435
|
});
|
17181
17436
|
// Ember.lookup
|
17437
|
+
enifed("ember-runtime/string_registry", ["exports"], function (exports) {
|
17438
|
+
// STATE within a module is frowned apon, this exists
|
17439
|
+
// to support Ember.STRINGS but shield ember internals from this legacy global
|
17440
|
+
// API.
|
17441
|
+
"use strict";
|
17442
|
+
|
17443
|
+
exports.setStrings = setStrings;
|
17444
|
+
exports.getStrings = getStrings;
|
17445
|
+
exports.get = get;
|
17446
|
+
var STRINGS = {};
|
17447
|
+
|
17448
|
+
function setStrings(strings) {
|
17449
|
+
STRINGS = strings;
|
17450
|
+
}
|
17451
|
+
|
17452
|
+
function getStrings() {
|
17453
|
+
return STRINGS;
|
17454
|
+
}
|
17455
|
+
|
17456
|
+
function get(name) {
|
17457
|
+
return STRINGS[name];
|
17458
|
+
}
|
17459
|
+
});
|
17182
17460
|
enifed('ember-runtime/system/application', ['exports', 'ember-runtime/system/namespace'], function (exports, _emberRuntimeSystemNamespace) {
|
17183
17461
|
'use strict';
|
17184
17462
|
|
@@ -17545,7 +17823,7 @@ enifed('ember-runtime/system/array_proxy', ['exports', 'ember-metal/debug', 'emb
|
|
17545
17823
|
|
17546
17824
|
exports.default = ArrayProxy;
|
17547
17825
|
});
|
17548
|
-
enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set', 'container/registry', 'container/container'], function (exports, _emberMetalProperty_set, _containerRegistry, _containerContainer) {
|
17826
|
+
enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set', 'container/registry', 'container/container', 'container/owner'], function (exports, _emberMetalProperty_set, _containerRegistry, _containerContainer, _containerOwner) {
|
17549
17827
|
'use strict';
|
17550
17828
|
|
17551
17829
|
_containerRegistry.default.set = _emberMetalProperty_set.set;
|
@@ -17553,8 +17831,10 @@ enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set',
|
|
17553
17831
|
|
17554
17832
|
exports.Registry = _containerRegistry.default;
|
17555
17833
|
exports.Container = _containerContainer.default;
|
17834
|
+
exports.getOwner = _containerOwner.getOwner;
|
17835
|
+
exports.setOwner = _containerOwner.setOwner;
|
17556
17836
|
});
|
17557
|
-
enifed('ember-runtime/system/core_object', ['exports', 'ember-metal
|
17837
|
+
enifed('ember-runtime/system/core_object', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/assign', 'ember-metal/property_get', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/chains', 'ember-metal/events', 'ember-metal/mixin', 'ember-metal/error', 'ember-runtime/mixins/action_handler', 'ember-metal/properties', 'ember-metal/binding', 'ember-metal/computed', 'ember-metal/injected_property', 'ember-metal/run_loop', 'ember-metal/watching', 'ember-metal/core', 'ember-runtime/inject', 'ember-metal/symbol'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalAssign, _emberMetalProperty_get, _emberMetalUtils, _emberMetalMeta, _emberMetalChains, _emberMetalEvents, _emberMetalMixin, _emberMetalError, _emberRuntimeMixinsAction_handler, _emberMetalProperties, _emberMetalBinding, _emberMetalComputed, _emberMetalInjected_property, _emberMetalRun_loop, _emberMetalWatching, _emberMetalCore, _emberRuntimeInject, _emberMetalSymbol) {
|
17558
17838
|
'no use strict';
|
17559
17839
|
// Remove "use strict"; from transpiled module until
|
17560
17840
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
@@ -17569,7 +17849,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-metal', 'ember-met
|
|
17569
17849
|
|
17570
17850
|
var _Mixin$create;
|
17571
17851
|
|
17572
|
-
var POST_INIT =
|
17852
|
+
var POST_INIT = _emberMetalSymbol.default('POST_INIT');
|
17573
17853
|
exports.POST_INIT = POST_INIT;
|
17574
17854
|
var schedule = _emberMetalRun_loop.default.schedule;
|
17575
17855
|
var applyMixin = _emberMetalMixin.Mixin._apply;
|
@@ -18179,8 +18459,8 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-metal', 'ember-met
|
|
18179
18459
|
if (hasCachedComputedProperties === false) {
|
18180
18460
|
return;
|
18181
18461
|
}
|
18182
|
-
if (value instanceof
|
18183
|
-
var cache =
|
18462
|
+
if (value instanceof _emberMetalComputed.ComputedProperty) {
|
18463
|
+
var cache = _emberMetalMeta.meta(this.constructor).readableCache();
|
18184
18464
|
|
18185
18465
|
if (cache && cache._computedProperties !== undefined) {
|
18186
18466
|
cache._computedProperties = undefined;
|
@@ -18681,10 +18961,9 @@ enifed('ember-runtime/system/namespace', ['exports', 'ember-metal/core', 'ember-
|
|
18681
18961
|
paths[idx] = key;
|
18682
18962
|
|
18683
18963
|
// If we have found an unprocessed class
|
18684
|
-
if (obj && obj.toString === classToString) {
|
18964
|
+
if (obj && obj.toString === classToString && !obj[NAME_KEY]) {
|
18685
18965
|
// Replace the class' `toString` with the dot-separated path
|
18686
18966
|
// and set its `NAME_KEY`
|
18687
|
-
obj.toString = makeToString(paths.join('.'));
|
18688
18967
|
obj[NAME_KEY] = paths.join('.');
|
18689
18968
|
|
18690
18969
|
// Support nested namespaces
|
@@ -18943,44 +19222,21 @@ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal/core', 'emb
|
|
18943
19222
|
@return {Ember.NativeArray}
|
18944
19223
|
@public
|
18945
19224
|
*/
|
18946
|
-
var A
|
18947
|
-
if (arr === undefined) {
|
18948
|
-
arr = [];
|
18949
|
-
}
|
18950
|
-
return _emberRuntimeMixinsArray.default.detect(arr) ? arr : NativeArray.apply(arr);
|
18951
|
-
};
|
19225
|
+
var A;
|
18952
19226
|
|
18953
|
-
|
18954
|
-
Activates the mixin on the Array.prototype if not already applied. Calling
|
18955
|
-
this method more than once is safe. This will be called when ember is loaded
|
18956
|
-
unless you have `Ember.EXTEND_PROTOTYPES` or `Ember.EXTEND_PROTOTYPES.Array`
|
18957
|
-
set to `false`.
|
18958
|
-
|
18959
|
-
Example
|
18960
|
-
|
18961
|
-
```js
|
18962
|
-
if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) {
|
18963
|
-
Ember.NativeArray.activate();
|
18964
|
-
}
|
18965
|
-
```
|
18966
|
-
|
18967
|
-
@method activate
|
18968
|
-
@for Ember.NativeArray
|
18969
|
-
@static
|
18970
|
-
@return {void}
|
18971
|
-
@private
|
18972
|
-
*/
|
18973
|
-
NativeArray.activate = function () {
|
19227
|
+
if (_emberMetalCore.default.EXTEND_PROTOTYPES === true || _emberMetalCore.default.EXTEND_PROTOTYPES.Array) {
|
18974
19228
|
NativeArray.apply(Array.prototype);
|
18975
|
-
|
18976
19229
|
exports. // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles
|
18977
19230
|
A = A = function (arr) {
|
18978
19231
|
return arr || [];
|
18979
19232
|
};
|
18980
|
-
}
|
18981
|
-
|
18982
|
-
|
18983
|
-
|
19233
|
+
} else {
|
19234
|
+
exports.A = A = function (arr) {
|
19235
|
+
if (arr === undefined) {
|
19236
|
+
arr = [];
|
19237
|
+
}
|
19238
|
+
return _emberRuntimeMixinsArray.default.detect(arr) ? arr : NativeArray.apply(arr);
|
19239
|
+
};
|
18984
19240
|
}
|
18985
19241
|
|
18986
19242
|
_emberMetalCore.default.A = A;exports.A = A;
|
@@ -19137,7 +19393,7 @@ enifed('ember-runtime/system/service', ['exports', 'ember-runtime/system/object'
|
|
19137
19393
|
|
19138
19394
|
exports.default = Service;
|
19139
19395
|
});
|
19140
|
-
enifed('ember-runtime/system/string', ['exports', 'ember-metal/
|
19396
|
+
enifed('ember-runtime/system/string', ['exports', 'ember-metal/debug', 'ember-metal/utils', 'ember-runtime/utils', 'ember-runtime/string_registry', 'ember-metal/cache'], function (exports, _emberMetalDebug, _emberMetalUtils, _emberRuntimeUtils, _emberRuntimeString_registry, _emberMetalCache) {
|
19141
19397
|
/**
|
19142
19398
|
@module ember
|
19143
19399
|
@submodule ember-runtime
|
@@ -19232,7 +19488,7 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
19232
19488
|
formats = Array.prototype.slice.call(arguments, 1);
|
19233
19489
|
}
|
19234
19490
|
|
19235
|
-
str =
|
19491
|
+
str = _emberRuntimeString_registry.get(str) || str;
|
19236
19492
|
return _fmt(str, formats);
|
19237
19493
|
}
|
19238
19494
|
|
@@ -19264,18 +19520,6 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
19264
19520
|
return CAPITALIZE_CACHE.get(str);
|
19265
19521
|
}
|
19266
19522
|
|
19267
|
-
/**
|
19268
|
-
Defines the hash of localized strings for the current language. Used by
|
19269
|
-
the `Ember.String.loc()` helper. To localize, add string values to this
|
19270
|
-
hash.
|
19271
|
-
|
19272
|
-
@property STRINGS
|
19273
|
-
@for Ember
|
19274
|
-
@type Object
|
19275
|
-
@private
|
19276
|
-
*/
|
19277
|
-
_emberMetalCore.default.STRINGS = {};
|
19278
|
-
|
19279
19523
|
/**
|
19280
19524
|
Defines string helper methods including string formatting and localization.
|
19281
19525
|
Unless `Ember.EXTEND_PROTOTYPES.String` is `false` these methods will also be
|
@@ -19457,7 +19701,6 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
19457
19701
|
exports.underscore = underscore;
|
19458
19702
|
exports.capitalize = capitalize;
|
19459
19703
|
});
|
19460
|
-
// Ember.STRINGS
|
19461
19704
|
enifed('ember-runtime/utils', ['exports', 'ember-runtime/mixins/array', 'ember-runtime/system/object'], function (exports, _emberRuntimeMixinsArray, _emberRuntimeSystemObject) {
|
19462
19705
|
'use strict';
|
19463
19706
|
|
@@ -19606,7 +19849,7 @@ enifed('ember-runtime/utils', ['exports', 'ember-runtime/mixins/array', 'ember-r
|
|
19606
19849
|
return ret;
|
19607
19850
|
}
|
19608
19851
|
});
|
19609
|
-
enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'ember-runtime/compare', 'ember-runtime/copy', 'ember-runtime/inject', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/system/array_proxy', 'ember-runtime/system/object_proxy', 'ember-runtime/system/core_object', 'ember-runtime/system/native_array', 'ember-runtime/system/string', 'ember-runtime/system/lazy_load', 'ember-runtime/mixins/array', 'ember-runtime/mixins/comparable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/enumerable', 'ember-runtime/mixins/freezable', 'ember-runtime/mixins/-proxy', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/mutable_enumerable', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/target_action_support', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/promise_proxy', 'ember-runtime/computed/reduce_computed_macros', 'ember-runtime/controllers/controller', 'ember-runtime/mixins/controller', 'ember-runtime/system/service', 'ember-runtime/ext/rsvp', 'ember-runtime/ext/string', 'ember-runtime/ext/function', 'ember-runtime/utils'], function (exports, _emberMetal, _emberRuntimeIsEqual, _emberRuntimeCompare, _emberRuntimeCopy, _emberRuntimeInject, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemContainer, _emberRuntimeSystemArray_proxy, _emberRuntimeSystemObject_proxy, _emberRuntimeSystemCore_object, _emberRuntimeSystemNative_array, _emberRuntimeSystemString, _emberRuntimeSystemLazy_load, _emberRuntimeMixinsArray, _emberRuntimeMixinsComparable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsFreezable, _emberRuntimeMixinsProxy, _emberRuntimeMixinsObservable, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsTarget_action_support, _emberRuntimeMixinsEvented, _emberRuntimeMixinsPromise_proxy, _emberRuntimeComputedReduce_computed_macros, _emberRuntimeControllersController, _emberRuntimeMixinsController, _emberRuntimeSystemService, _emberRuntimeExtRsvp, _emberRuntimeExtString, _emberRuntimeExtFunction, _emberRuntimeUtils) {
|
19852
|
+
enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'ember-runtime/compare', 'ember-runtime/copy', 'ember-runtime/inject', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/system/array_proxy', 'ember-runtime/system/object_proxy', 'ember-runtime/system/core_object', 'ember-runtime/system/native_array', 'ember-runtime/system/string', 'ember-runtime/system/lazy_load', 'ember-runtime/mixins/array', 'ember-runtime/mixins/comparable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/enumerable', 'ember-runtime/mixins/freezable', 'ember-runtime/mixins/-proxy', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/mutable_enumerable', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/target_action_support', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/promise_proxy', 'ember-runtime/computed/reduce_computed_macros', 'ember-runtime/controllers/controller', 'ember-runtime/mixins/controller', 'ember-runtime/system/service', 'ember-runtime/ext/rsvp', 'ember-runtime/ext/string', 'ember-runtime/ext/function', 'ember-runtime/utils', 'ember-metal/features', 'ember-runtime/mixins/registry_proxy', 'ember-runtime/mixins/container_proxy', 'ember-runtime/string_registry'], function (exports, _emberMetal, _emberRuntimeIsEqual, _emberRuntimeCompare, _emberRuntimeCopy, _emberRuntimeInject, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemContainer, _emberRuntimeSystemArray_proxy, _emberRuntimeSystemObject_proxy, _emberRuntimeSystemCore_object, _emberRuntimeSystemNative_array, _emberRuntimeSystemString, _emberRuntimeSystemLazy_load, _emberRuntimeMixinsArray, _emberRuntimeMixinsComparable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsFreezable, _emberRuntimeMixinsProxy, _emberRuntimeMixinsObservable, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsTarget_action_support, _emberRuntimeMixinsEvented, _emberRuntimeMixinsPromise_proxy, _emberRuntimeComputedReduce_computed_macros, _emberRuntimeControllersController, _emberRuntimeMixinsController, _emberRuntimeSystemService, _emberRuntimeExtRsvp, _emberRuntimeExtString, _emberRuntimeExtFunction, _emberRuntimeUtils, _emberMetalFeatures, _emberRuntimeMixinsRegistry_proxy, _emberRuntimeMixinsContainer_proxy, _emberRuntimeString_registry) {
|
19610
19853
|
/**
|
19611
19854
|
@module ember
|
19612
19855
|
@submodule ember-runtime
|
@@ -19665,6 +19908,15 @@ enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'em
|
|
19665
19908
|
_emberMetal.default.Object = _emberRuntimeSystemObject.default;
|
19666
19909
|
_emberMetal.default.Container = _emberRuntimeSystemContainer.Container;
|
19667
19910
|
_emberMetal.default.Registry = _emberRuntimeSystemContainer.Registry;
|
19911
|
+
|
19912
|
+
if (_emberMetalFeatures.default('ember-container-inject-owner')) {
|
19913
|
+
_emberMetal.default.getOwner = _emberRuntimeSystemContainer.getOwner;
|
19914
|
+
_emberMetal.default.setOwner = _emberRuntimeSystemContainer.setOwner;
|
19915
|
+
|
19916
|
+
_emberMetal.default._RegistryProxyMixin = _emberRuntimeMixinsRegistry_proxy.default;
|
19917
|
+
_emberMetal.default._ContainerProxyMixin = _emberRuntimeMixinsContainer_proxy.default;
|
19918
|
+
}
|
19919
|
+
|
19668
19920
|
_emberMetal.default.Namespace = _emberRuntimeSystemNamespace.default;
|
19669
19921
|
_emberMetal.default.Enumerable = _emberRuntimeMixinsEnumerable.default;
|
19670
19922
|
_emberMetal.default.ArrayProxy = _emberRuntimeSystemArray_proxy.default;
|
@@ -19687,6 +19939,22 @@ enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'em
|
|
19687
19939
|
_emberMetal.default.RSVP = _emberRuntimeExtRsvp.default;
|
19688
19940
|
// END EXPORTS
|
19689
19941
|
|
19942
|
+
/**
|
19943
|
+
Defines the hash of localized strings for the current language. Used by
|
19944
|
+
the `Ember.String.loc()` helper. To localize, add string values to this
|
19945
|
+
hash.
|
19946
|
+
|
19947
|
+
@property STRINGS
|
19948
|
+
@for Ember
|
19949
|
+
@type Object
|
19950
|
+
@private
|
19951
|
+
*/
|
19952
|
+
Object.defineProperty(_emberMetal.default, 'STRINGS', {
|
19953
|
+
configurable: false,
|
19954
|
+
get: _emberRuntimeString_registry.getStrings,
|
19955
|
+
set: _emberRuntimeString_registry.setStrings
|
19956
|
+
});
|
19957
|
+
|
19690
19958
|
exports.default = _emberMetal.default;
|
19691
19959
|
});
|
19692
19960
|
// just for side effect of extending Ember.RSVP
|