ember-source 1.10.0.beta.3 → 1.10.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 1.10.0-beta.3
8
+ * @version 1.10.0-beta.4
9
9
  */
10
10
 
11
11
  (function() {
@@ -3210,7 +3210,7 @@ enifed("ember-application/system/application",
3210
3210
  @deprecated
3211
3211
  */
3212
3212
  then: function() {
3213
- Ember.deprecate('Do not use `.then` on an instance of Ember.Application. Please use the `.ready` hook instead.');
3213
+ Ember.deprecate('Do not use `.then` on an instance of Ember.Application. Please use the `.ready` hook instead.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-code-then-code-on-ember-application' });
3214
3214
 
3215
3215
  this._super.apply(this, arguments);
3216
3216
  }
@@ -3984,8 +3984,10 @@ enifed("ember-debug",
3984
3984
  @param {String} message A description of the deprecation.
3985
3985
  @param {Boolean} test An optional boolean. If falsy, the deprecation
3986
3986
  will be displayed.
3987
+ @param {Object} options An optional object that can be used to pass
3988
+ in a `url` to the transition guide on the emberjs.com website.
3987
3989
  */
3988
- Ember.deprecate = function(message, test) {
3990
+ Ember.deprecate = function(message, test, options) {
3989
3991
  var noDeprecation;
3990
3992
 
3991
3993
  if (typeof test === 'function') {
@@ -4003,6 +4005,13 @@ enifed("ember-debug",
4003
4005
  // When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome
4004
4006
  try { __fail__.fail(); } catch (e) { error = e; }
4005
4007
 
4008
+ if (arguments.length === 3) {
4009
+ Ember.assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object');
4010
+ if (options.url) {
4011
+ message += ' See ' + options.url + ' for more details.';
4012
+ }
4013
+ }
4014
+
4006
4015
  if (Ember.LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
4007
4016
  var stack;
4008
4017
  var stackStr = '';
@@ -4851,8 +4860,7 @@ enifed("ember-htmlbars",
4851
4860
 
4852
4861
  Ember.HTMLBars = {
4853
4862
  helpers: helpers,
4854
- helper: helper,
4855
- _registerHelper: registerHelper,
4863
+ registerHelper: registerHelper,
4856
4864
  template: template,
4857
4865
  compile: compile,
4858
4866
  precompile: precompile,
@@ -5017,7 +5025,15 @@ enifed("ember-htmlbars/compat/helper",
5017
5025
  };
5018
5026
 
5019
5027
  function registerHandlebarsCompatibleHelper(name, value) {
5020
- helpers[name] = new HandlebarsCompatibleHelper(value);
5028
+ var helper;
5029
+
5030
+ if (value && value.isHTMLBars) {
5031
+ helper = value;
5032
+ } else {
5033
+ helper = new HandlebarsCompatibleHelper(value);
5034
+ }
5035
+
5036
+ helpers[name] = helper;
5021
5037
  }
5022
5038
 
5023
5039
  __exports__.registerHandlebarsCompatibleHelper = registerHandlebarsCompatibleHelper;function handlebarsHelper(name, value) {
@@ -5320,8 +5336,8 @@ enifed("ember-htmlbars/compat/register-bound-helper",
5320
5336
  }
5321
5337
  });
5322
5338
  enifed("ember-htmlbars/helpers",
5323
- ["ember-metal/platform","ember-views/views/view","ember-views/views/component","ember-htmlbars/system/make-view-helper","ember-htmlbars/system/helper","ember-htmlbars/system/make_bound_helper","exports"],
5324
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __exports__) {
5339
+ ["ember-metal/platform","ember-htmlbars/system/helper","exports"],
5340
+ function(__dependency1__, __dependency2__, __exports__) {
5325
5341
  "use strict";
5326
5342
  /**
5327
5343
  @module ember
@@ -5341,186 +5357,28 @@ enifed("ember-htmlbars/helpers",
5341
5357
  @submodule ember-htmlbars
5342
5358
  */
5343
5359
 
5344
- var View = __dependency2__["default"];
5345
- var Component = __dependency3__["default"];
5346
- var makeViewHelper = __dependency4__["default"];
5347
- var Helper = __dependency5__["default"];
5348
- var makeBoundHelper = __dependency6__["default"];
5360
+ var Helper = __dependency2__["default"];
5349
5361
 
5350
5362
  /**
5351
- Register a bound helper or custom view helper.
5352
-
5353
- ## Simple bound helper example
5354
-
5355
- ```javascript
5356
- Ember.HTMLBars.helper('capitalize', function(value) {
5357
- return value.toUpperCase();
5358
- });
5359
- ```
5360
-
5361
- The above bound helper can be used inside of templates as follows:
5362
-
5363
- ```handlebars
5364
- {{capitalize name}}
5365
- ```
5366
-
5367
- In this case, when the `name` property of the template's context changes,
5368
- the rendered value of the helper will update to reflect this change.
5369
-
5370
- For more examples of bound helpers, see documentation for
5371
- `Ember.HTMLBars.registerBoundHelper`.
5372
-
5373
- ## Custom view helper example
5374
-
5375
- Assuming a view subclass named `App.CalendarView` were defined, a helper
5376
- for rendering instances of this view could be registered as follows:
5377
-
5378
- ```javascript
5379
- Ember.HTMLBars.helper('calendar', App.CalendarView):
5380
- ```
5381
-
5382
- The above bound helper can be used inside of templates as follows:
5383
-
5384
- ```handlebars
5385
- {{calendar}}
5386
- ```
5387
-
5388
- Which is functionally equivalent to:
5389
-
5390
- ```handlebars
5391
- {{view 'calendar'}}
5392
- ```
5393
-
5394
- Options in the helper will be passed to the view in exactly the same
5395
- manner as with the `view` helper.
5396
-
5397
- @private
5398
- @method helper
5363
+ @public
5364
+ @method registerHelper
5399
5365
  @for Ember.HTMLBars
5400
5366
  @param {String} name
5401
- @param {Function|Ember.View} function or view class constructor
5367
+ @param {Object|Function} helperFunc the helper function to add
5402
5368
  */
5403
- function helper(name, value) {
5404
- Ember.assert("You tried to register a component named '" + name +
5405
- "', but component names must include a '-'", !Component.detect(value) || name.match(/-/));
5369
+ function registerHelper(name, helperFunc) {
5370
+ var helper;
5406
5371
 
5407
- if (View.detect(value)) {
5408
- helpers[name] = makeViewHelper(value);
5372
+ if (helperFunc && helperFunc.isHelper) {
5373
+ helper = helperFunc;
5409
5374
  } else {
5410
- registerBoundHelper(name, value);
5375
+ helper = new Helper(helperFunc);
5411
5376
  }
5412
- }
5413
5377
 
5414
- __exports__.helper = helper;/**
5415
- @private
5416
- @method registerHelper
5417
- @for Ember.HTMLBars
5418
- @param {String} name
5419
- @param {Function} helperFunc the helper function to add
5420
- */
5421
- function registerHelper(name, helperFunc, preprocessFunction) {
5422
- helpers[name] = new Helper(helperFunc, preprocessFunction);
5378
+ helpers[name] = helper;
5423
5379
  }
5424
5380
 
5425
- __exports__.registerHelper = registerHelper;/**
5426
- Register a bound helper. Bound helpers behave similarly to regular
5427
- helpers, with the added ability to re-render when the underlying data
5428
- changes.
5429
-
5430
- ## Simple example
5431
-
5432
- ```javascript
5433
- Ember.HTMLBars.registerBoundHelper('capitalize', function(params, hash, options, env) {
5434
- return Ember.String.capitalize(params[0]);
5435
- });
5436
- ```
5437
-
5438
- The above bound helper can be used inside of templates as follows:
5439
-
5440
- ```handlebars
5441
- {{capitalize name}}
5442
- ```
5443
-
5444
- In this case, when the `name` property of the template's context changes,
5445
- the rendered value of the helper will update to reflect this change.
5446
-
5447
- ## Example with hash parameters
5448
-
5449
- Like normal helpers, bound helpers have access to the hash parameters
5450
- passed into the helper call.
5451
-
5452
- ```javascript
5453
- Ember.HTMLBars.registerBoundHelper('repeat', function(params, hash) {
5454
- var count = hash.count;
5455
- var value = params[0];
5456
-
5457
- return new Array( count + 1).join( value );
5458
- });
5459
- ```
5460
-
5461
- This helper could be used in a template as follows:
5462
-
5463
- ```handlebars
5464
- {{repeat text count=3}}
5465
- ```
5466
-
5467
- ## Example with bound hash parameters
5468
-
5469
- Bound hash params are also supported. Example:
5470
-
5471
- ```handlebars
5472
- {{repeat text count=numRepeats}}
5473
- ```
5474
-
5475
- In this example, count will be bound to the value of
5476
- the `numRepeats` property on the context. If that property
5477
- changes, the helper will be re-rendered.
5478
-
5479
- ## Example with multiple bound properties
5480
-
5481
- `Ember.HTMLBars.registerBoundHelper` supports binding to
5482
- multiple properties, e.g.:
5483
-
5484
- ```javascript
5485
- Ember.HTMLBars.registerBoundHelper('concatenate', function(params) {
5486
- return params.join('||');
5487
- });
5488
- ```
5489
-
5490
- Which allows for template syntax such as `{{concatenate prop1 prop2}}` or
5491
- `{{concatenate prop1 prop2 prop3}}`. If any of the properties change,
5492
- the helper will re-render.
5493
-
5494
- ## Use with unbound helper
5495
-
5496
- The `{{unbound}}` helper can be used with bound helper invocations
5497
- to render them in their unbound form, e.g.
5498
-
5499
- ```handlebars
5500
- {{unbound capitalize name}}
5501
- ```
5502
-
5503
- In this example, if the name property changes, the helper
5504
- will not re-render.
5505
-
5506
- ## Use with blocks not supported
5507
-
5508
- Bound helpers do not support use with blocks or the addition of
5509
- child views of any kind.
5510
-
5511
- @private
5512
- @method registerBoundHelper
5513
- @for Ember.HTMLBars
5514
- @param {String} name
5515
- @param {Function} function
5516
- */
5517
- function registerBoundHelper(name, fn) {
5518
- var boundFn = makeBoundHelper(fn);
5519
-
5520
- helpers[name] = boundFn;
5521
- }
5522
-
5523
- __exports__.registerBoundHelper = registerBoundHelper;__exports__["default"] = helpers;
5381
+ __exports__.registerHelper = registerHelper;__exports__["default"] = helpers;
5524
5382
  });
5525
5383
  enifed("ember-htmlbars/helpers/bind-attr",
5526
5384
  ["ember-metal/core","ember-runtime/system/string","ember-views/attr_nodes/attr_node","ember-views/attr_nodes/legacy_bind","ember-metal/keys","ember-htmlbars/helpers","ember-metal/enumerable_utils","ember-metal/streams/utils","ember-views/streams/class_name_binding","exports"],
@@ -5683,6 +5541,13 @@ enifed("ember-htmlbars/helpers/bind-attr",
5683
5541
 
5684
5542
  var classView = new AttrNode('class', classNameBindings);
5685
5543
  classView._morph = env.dom.createAttrMorph(element, 'class');
5544
+
5545
+ Ember.assert(
5546
+ 'You cannot set `class` manually and via `{{bind-attr}}` helper on the same element. ' +
5547
+ 'Please use `{{bind-attr}}`\'s `:static-class` syntax instead.',
5548
+ !element.getAttribute('class')
5549
+ );
5550
+
5686
5551
  view.appendChild(classView);
5687
5552
  }
5688
5553
 
@@ -5708,6 +5573,12 @@ enifed("ember-htmlbars/helpers/bind-attr",
5708
5573
 
5709
5574
  attrView = new LegacyBindAttrNode(attr, lazyValue);
5710
5575
  attrView._morph = env.dom.createAttrMorph(element, attr);
5576
+
5577
+ Ember.assert(
5578
+ 'You cannot set `' + attr + '` manually and via `{{bind-attr}}` helper on the same element.',
5579
+ !element.getAttribute(attr)
5580
+ );
5581
+
5711
5582
  view.appendChild(attrView);
5712
5583
  }
5713
5584
  }
@@ -5734,8 +5605,9 @@ enifed("ember-htmlbars/helpers/bind-attr",
5734
5605
  function bindAttrHelperDeprecated() {
5735
5606
  Ember.deprecate("The 'bindAttr' view helper is deprecated in favor of 'bind-attr'");
5736
5607
 
5737
- return helpers['bind-attr'].apply(this, arguments);
5738
- }
5608
+
5609
+ return helpers['bind-attr'].helperFunction.apply(this, arguments);
5610
+ }
5739
5611
 
5740
5612
  __exports__["default"] = bindAttrHelper;
5741
5613
 
@@ -6363,13 +6235,11 @@ enifed("ember-htmlbars/helpers/each",
6363
6235
 
6364
6236
  Ember.deprecate(
6365
6237
  "Using the context switching form of {{each}} is deprecated. " +
6366
- "Please use the keyword form (`{{#each foo in bar}}`) instead. " +
6367
- "See http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope " +
6368
- "for more details.",
6369
- hash.keyword === true || typeof hash.keyword === 'string'
6238
+ "Please use the keyword form (`{{#each foo in bar}}`) instead.",
6239
+ hash.keyword === true || typeof hash.keyword === 'string',
6240
+ { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' }
6370
6241
  );
6371
6242
 
6372
- hash.emptyViewClass = Ember._MetamorphView;
6373
6243
  hash.dataSource = path;
6374
6244
  options.helperName = options.helperName || helperName;
6375
6245
 
@@ -6466,7 +6336,7 @@ enifed("ember-htmlbars/helpers/if_unless",
6466
6336
  }
6467
6337
 
6468
6338
  if (!shouldDisplayIfHelperContent(value)) {
6469
- template = options.inverse;
6339
+ template = options.inverse || EMPTY_TEMPLATE;
6470
6340
  }
6471
6341
 
6472
6342
  return template.render(this, env, options.morph.contextualElement);
@@ -7739,9 +7609,9 @@ enifed("ember-htmlbars/helpers/with",
7739
7609
  } else {
7740
7610
  Ember.deprecate(
7741
7611
  "Using the context switching form of `{{with}}` is deprecated. " +
7742
- "Please use the keyword form (`{{with foo as bar}}`) instead. " +
7743
- "See http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope " +
7744
- "for more details."
7612
+ "Please use the keyword form (`{{with foo as bar}}`) instead.",
7613
+ false,
7614
+ { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' }
7745
7615
  );
7746
7616
  preserveContext = false;
7747
7617
  }
@@ -8222,20 +8092,13 @@ enifed("ember-htmlbars/system/helper",
8222
8092
  @class Helper
8223
8093
  @namespace Ember.HTMLBars
8224
8094
  */
8225
- function Helper(helper, preprocessArguments) {
8095
+ function Helper(helper) {
8226
8096
  this.helperFunction = helper;
8227
8097
 
8228
- if (preprocessArguments) {
8229
- this.preprocessArguments = preprocessArguments;
8230
- }
8231
-
8098
+ this.isHelper = true;
8232
8099
  this.isHTMLBars = true;
8233
8100
  }
8234
8101
 
8235
- Helper.prototype = {
8236
- preprocessArguments: function() { }
8237
- };
8238
-
8239
8102
  __exports__["default"] = Helper;
8240
8103
  });
8241
8104
  enifed("ember-htmlbars/system/lookup-helper",
@@ -8477,7 +8340,7 @@ enifed("ember-htmlbars/templates/component",
8477
8340
  if (this.cachedFragment) {
8478
8341
  fragment = dom.cloneNode(this.cachedFragment, true);
8479
8342
  }
8480
- dom.repairClonedNode(fragment,[0,1]);
8343
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8481
8344
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8482
8345
  content(env, morph0, context, "yield");
8483
8346
  return fragment;
@@ -8500,7 +8363,7 @@ enifed("ember-htmlbars/templates/select",
8500
8363
  hasRendered: false,
8501
8364
  build: function build(dom) {
8502
8365
  var el0 = dom.createElement("option");
8503
- dom.setProperty(el0,"value","");
8366
+ dom.setAttribute(el0,"value","");
8504
8367
  return el0;
8505
8368
  },
8506
8369
  render: function render(context, env, contextualElement) {
@@ -8556,7 +8419,7 @@ enifed("ember-htmlbars/templates/select",
8556
8419
  if (this.cachedFragment) {
8557
8420
  fragment = dom.cloneNode(this.cachedFragment, true);
8558
8421
  }
8559
- dom.repairClonedNode(fragment,[0,1]);
8422
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8560
8423
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8561
8424
  inline(env, morph0, context, "view", [get(env, context, "view.groupView")], {"content": get(env, context, "group.content"), "label": get(env, context, "group.label")});
8562
8425
  return fragment;
@@ -8592,7 +8455,7 @@ enifed("ember-htmlbars/templates/select",
8592
8455
  if (this.cachedFragment) {
8593
8456
  fragment = dom.cloneNode(this.cachedFragment, true);
8594
8457
  }
8595
- dom.repairClonedNode(fragment,[0,1]);
8458
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8596
8459
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8597
8460
  block(env, morph0, context, "each", [get(env, context, "view.groupedContent")], {"keyword": "group"}, child0, null);
8598
8461
  return fragment;
@@ -8630,7 +8493,7 @@ enifed("ember-htmlbars/templates/select",
8630
8493
  if (this.cachedFragment) {
8631
8494
  fragment = dom.cloneNode(this.cachedFragment, true);
8632
8495
  }
8633
- dom.repairClonedNode(fragment,[0,1]);
8496
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8634
8497
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8635
8498
  inline(env, morph0, context, "view", [get(env, context, "view.optionView")], {"content": get(env, context, "item")});
8636
8499
  return fragment;
@@ -8666,7 +8529,7 @@ enifed("ember-htmlbars/templates/select",
8666
8529
  if (this.cachedFragment) {
8667
8530
  fragment = dom.cloneNode(this.cachedFragment, true);
8668
8531
  }
8669
- dom.repairClonedNode(fragment,[0,1]);
8532
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8670
8533
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8671
8534
  block(env, morph0, context, "each", [get(env, context, "view.content")], {"keyword": "item"}, child0, null);
8672
8535
  return fragment;
@@ -8704,7 +8567,7 @@ enifed("ember-htmlbars/templates/select",
8704
8567
  if (this.cachedFragment) {
8705
8568
  fragment = dom.cloneNode(this.cachedFragment, true);
8706
8569
  }
8707
- dom.repairClonedNode(fragment,[0,1]);
8570
+ if (this.cachedFragment) { dom.repairClonedNode(fragment,[0,1]); }
8708
8571
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8709
8572
  var morph1 = dom.createMorphAt(fragment,1,2,contextualElement);
8710
8573
  block(env, morph0, context, "if", [get(env, context, "view.prompt")], {}, child0, null);
@@ -11925,7 +11788,7 @@ enifed("ember-metal/core",
11925
11788
 
11926
11789
  @class Ember
11927
11790
  @static
11928
- @version 1.10.0-beta.3
11791
+ @version 1.10.0-beta.4
11929
11792
  */
11930
11793
 
11931
11794
  if ('undefined' === typeof Ember) {
@@ -11952,10 +11815,10 @@ enifed("ember-metal/core",
11952
11815
  /**
11953
11816
  @property VERSION
11954
11817
  @type String
11955
- @default '1.10.0-beta.3'
11818
+ @default '1.10.0-beta.4'
11956
11819
  @static
11957
11820
  */
11958
- Ember.VERSION = '1.10.0-beta.3';
11821
+ Ember.VERSION = '1.10.0-beta.4';
11959
11822
 
11960
11823
  /**
11961
11824
  Standard environmental variables. You can define these in a global `EmberENV`
@@ -13086,9 +12949,10 @@ enifed("ember-metal/get_properties",
13086
12949
  ```
13087
12950
 
13088
12951
  @method getProperties
13089
- @param obj
12952
+ @for Ember
12953
+ @param {Object} obj
13090
12954
  @param {String...|Array} list of keys to get
13091
- @return {Hash}
12955
+ @return {Object}
13092
12956
  */
13093
12957
  __exports__["default"] = function getProperties(obj) {
13094
12958
  var ret = {};
@@ -17627,23 +17491,61 @@ enifed("ember-metal/streams/utils",
17627
17491
  "use strict";
17628
17492
  var Stream = __dependency1__["default"];
17629
17493
 
17494
+ /**
17495
+ Check whether an object is a stream or not
17496
+
17497
+ @private
17498
+ @function isStream
17499
+ @param {Object|Stream} object object to check whether it is a stream
17500
+ @return {Boolean} `true` if the object is a stream, `false` otherwise
17501
+ */
17630
17502
  function isStream(object) {
17631
17503
  return object && object.isStream;
17632
17504
  }
17633
17505
 
17634
- __exports__.isStream = isStream;function subscribe(object, callback, context) {
17506
+ __exports__.isStream = isStream;/**
17507
+ A method of subscribing to a stream which is safe for use with a non-stream
17508
+ object. If a non-stream object is passed, the function does nothing.
17509
+
17510
+ @private
17511
+ @function subscribe
17512
+ @param {Object|Stream} object object or stream to potentially subscribe to
17513
+ @param {Function} callback function to run when stream value changes
17514
+ @param {Object} [context] the callback will be executed with this context if it
17515
+ is provided
17516
+ */
17517
+ function subscribe(object, callback, context) {
17635
17518
  if (object && object.isStream) {
17636
17519
  object.subscribe(callback, context);
17637
17520
  }
17638
17521
  }
17639
17522
 
17640
- __exports__.subscribe = subscribe;function unsubscribe(object, callback, context) {
17523
+ __exports__.subscribe = subscribe;/**
17524
+ A method of unsubscribing from a stream which is safe for use with a non-stream
17525
+ object. If a non-stream object is passed, the function does nothing.
17526
+
17527
+ @private
17528
+ @function unsubscribe
17529
+ @param {Object|Stream} object object or stream to potentially unsubscribe from
17530
+ @param {Function} callback function originally passed to `subscribe()`
17531
+ @param {Object} [context] object originally passed to `subscribe()`
17532
+ */
17533
+ function unsubscribe(object, callback, context) {
17641
17534
  if (object && object.isStream) {
17642
17535
  object.unsubscribe(callback, context);
17643
17536
  }
17644
17537
  }
17645
17538
 
17646
- __exports__.unsubscribe = unsubscribe;function read(object) {
17539
+ __exports__.unsubscribe = unsubscribe;/**
17540
+ Retrieve the value of a stream, or in the case a non-stream object is passed,
17541
+ return the object itself.
17542
+
17543
+ @private
17544
+ @function read
17545
+ @param {Object|Stream} object object to return the value of
17546
+ @return the stream's current value, or the non-stream object itself
17547
+ */
17548
+ function read(object) {
17647
17549
  if (object && object.isStream) {
17648
17550
  return object.value();
17649
17551
  } else {
@@ -17651,7 +17553,18 @@ enifed("ember-metal/streams/utils",
17651
17553
  }
17652
17554
  }
17653
17555
 
17654
- __exports__.read = read;function readArray(array) {
17556
+ __exports__.read = read;/**
17557
+ Map an array, replacing any streams with their values.
17558
+
17559
+ @private
17560
+ @function readArray
17561
+ @param {Array} array The array to read values from
17562
+ @return {Array} a new array of the same length with the values of non-stream
17563
+ objects mapped from their original positions untouched, and
17564
+ the values of stream objects retaining their original position
17565
+ and replaced with the stream's current value.
17566
+ */
17567
+ function readArray(array) {
17655
17568
  var length = array.length;
17656
17569
  var ret = new Array(length);
17657
17570
  for (var i = 0; i < length; i++) {
@@ -17660,7 +17573,19 @@ enifed("ember-metal/streams/utils",
17660
17573
  return ret;
17661
17574
  }
17662
17575
 
17663
- __exports__.readArray = readArray;function readHash(object) {
17576
+ __exports__.readArray = readArray;/**
17577
+ Map a hash, replacing any stream property values with the current value of that
17578
+ stream.
17579
+
17580
+ @private
17581
+ @function readHash
17582
+ @param {Object} object The hash to read keys and values from
17583
+ @return {Object} a new object with the same keys as the passed object. The
17584
+ property values in the new object are the original values in
17585
+ the case of non-stream objects, and the streams' current
17586
+ values in the case of stream objects.
17587
+ */
17588
+ function readHash(object) {
17664
17589
  var ret = {};
17665
17590
  for (var key in object) {
17666
17591
  ret[key] = read(object[key]);
@@ -17669,9 +17594,13 @@ enifed("ember-metal/streams/utils",
17669
17594
  }
17670
17595
 
17671
17596
  __exports__.readHash = readHash;/**
17672
- * @function scanArray
17673
- * @param array Array array given to a handlebars helper
17674
- * @return Boolean whether the array contains a stream/bound value
17597
+ Check whether an array contains any stream values
17598
+
17599
+ @private
17600
+ @function scanArray
17601
+ @param {Array} array array given to a handlebars helper
17602
+ @return {Boolean} `true` if the array contains a stream/bound value, `false`
17603
+ otherwise
17675
17604
  */
17676
17605
  function scanArray(array) {
17677
17606
  var length = array.length;
@@ -17688,10 +17617,14 @@ enifed("ember-metal/streams/utils",
17688
17617
  }
17689
17618
 
17690
17619
  __exports__.scanArray = scanArray;/**
17691
- * @function scanHash
17692
- * @param Object hash "hash" argument given to a handlebars helper
17693
- * @return Boolean whether the object contains a stream/bound value
17694
- */
17620
+ Check whether a hash has any stream property values
17621
+
17622
+ @private
17623
+ @function scanHash
17624
+ @param {Object} hash "hash" argument given to a handlebars helper
17625
+ @return {Boolean} `true` if the object contains a stream/bound value, `false`
17626
+ otherwise
17627
+ */
17695
17628
  function scanHash(hash) {
17696
17629
  var containsStream = false;
17697
17630
 
@@ -17705,14 +17638,26 @@ enifed("ember-metal/streams/utils",
17705
17638
  return containsStream;
17706
17639
  }
17707
17640
 
17708
- __exports__.scanHash = scanHash;// TODO: Create subclass ConcatStream < Stream. Defer
17709
- // subscribing to streams until the value() is called.
17710
- function concat(array, key) {
17641
+ __exports__.scanHash = scanHash;/**
17642
+ Join an array, with any streams replaced by their current values
17643
+
17644
+ @private
17645
+ @function concat
17646
+ @param {Array} array An array containing zero or more stream objects and
17647
+ zero or more non-stream objects
17648
+ @param {String} separator string to be used to join array elements
17649
+ @return {String} String with array elements concatenated and joined by the
17650
+ provided separator, and any stream array members having been
17651
+ replaced by the current value of the stream
17652
+ */
17653
+ function concat(array, separator) {
17654
+ // TODO: Create subclass ConcatStream < Stream. Defer
17655
+ // subscribing to streams until the value() is called.
17711
17656
  var hasStream = scanArray(array);
17712
17657
  if (hasStream) {
17713
17658
  var i, l;
17714
17659
  var stream = new Stream(function() {
17715
- return readArray(array).join(key);
17660
+ return readArray(array).join(separator);
17716
17661
  });
17717
17662
 
17718
17663
  for (i = 0, l=array.length; i < l; i++) {
@@ -17721,11 +17666,42 @@ enifed("ember-metal/streams/utils",
17721
17666
 
17722
17667
  return stream;
17723
17668
  } else {
17724
- return array.join(key);
17669
+ return array.join(separator);
17725
17670
  }
17726
17671
  }
17727
17672
 
17728
- __exports__.concat = concat;function chainStream(value, fn) {
17673
+ __exports__.concat = concat;/**
17674
+ Generate a new stream by providing a source stream and a function that can
17675
+ be used to transform the stream's value. In the case of a non-stream object,
17676
+ returns the result of the function.
17677
+
17678
+ The value to transform would typically be available to the function you pass
17679
+ to `chain()` via scope. For example:
17680
+
17681
+ ```javascript
17682
+ var source = ...; // stream returning a number
17683
+ // or a numeric (non-stream) object
17684
+ var result = chain(source, function(){
17685
+ var currentValue = read(source);
17686
+ return currentValue + 1;
17687
+ });
17688
+ ```
17689
+
17690
+ In the example, result is a stream if source is a stream, or a number of
17691
+ source was numeric.
17692
+
17693
+ @private
17694
+ @function chain
17695
+ @param {Object|Stream} value A stream or non-stream object
17696
+ @param {Function} fn function to be run when the stream value changes, or to
17697
+ be run once in the case of a non-stream object
17698
+ @return {Object|Stream} In the case of a stream `value` parameter, a new
17699
+ stream that will be updated with the return value of
17700
+ the provided function `fn`. In the case of a
17701
+ non-stream object, the return value of the provided
17702
+ function `fn`.
17703
+ */
17704
+ function chain(value, fn) {
17729
17705
  if (isStream(value)) {
17730
17706
  var stream = new Stream(fn);
17731
17707
  subscribe(value, stream.notify, stream);
@@ -17735,7 +17711,7 @@ enifed("ember-metal/streams/utils",
17735
17711
  }
17736
17712
  }
17737
17713
 
17738
- __exports__.chainStream = chainStream;
17714
+ __exports__.chain = chain;
17739
17715
  });
17740
17716
  enifed("ember-metal/utils",
17741
17717
  ["ember-metal/core","ember-metal/platform","ember-metal/array","exports"],
@@ -19274,6 +19250,16 @@ enifed("ember-routing-htmlbars/helpers/link-to",
19274
19250
  {{/link-to}}
19275
19251
  ```
19276
19252
 
19253
+ You can also use an inline form of `{{link-to}}` helper by
19254
+ passing the link text as the first argument
19255
+ to the helper:
19256
+
19257
+ ```handlebars
19258
+ {{link-to 'Great Hamster Photos' 'photoGallery'}}
19259
+ ```
19260
+
19261
+ Both will result in:
19262
+
19277
19263
  ```html
19278
19264
  <a href="/hamster-photos">
19279
19265
  Great Hamster Photos
@@ -23962,8 +23948,12 @@ enifed("ember-routing/system/route",
23962
23948
 
23963
23949
  var name = params[0], object = {};
23964
23950
 
23965
- if (/_id$/.test(name) && params.length === 1) {
23966
- object[name] = get(model, "id");
23951
+ if (params.length === 1) {
23952
+ if (name in model) {
23953
+ object[name] = get(model, name);
23954
+ } else if (/_id$/.test(name)) {
23955
+ object[name] = get(model, "id");
23956
+ }
23967
23957
  } else {
23968
23958
  object = getProperties(model, params);
23969
23959
  }
@@ -29917,7 +29907,7 @@ enifed("ember-runtime/mixins/deferred",
29917
29907
  },
29918
29908
 
29919
29909
  _deferred: computed(function() {
29920
- Ember.deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation);
29910
+ Ember.deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' });
29921
29911
 
29922
29912
  return RSVP.defer('Ember: DeferredMixin - ' + this);
29923
29913
  })
@@ -30685,7 +30675,7 @@ enifed("ember-runtime/mixins/enumerable",
30685
30675
  @method isAny
30686
30676
  @param {String} key the property to test
30687
30677
  @param {String} [value] optional value to test against.
30688
- @return {Boolean} `true` if the passed function returns `true` for any item
30678
+ @return {Boolean}
30689
30679
  @since 1.3.0
30690
30680
  */
30691
30681
  isAny: function(key, value) {
@@ -30696,7 +30686,7 @@ enifed("ember-runtime/mixins/enumerable",
30696
30686
  @method anyBy
30697
30687
  @param {String} key the property to test
30698
30688
  @param {String} [value] optional value to test against.
30699
- @return {Boolean} `true` if the passed function returns `true` for any item
30689
+ @return {Boolean}
30700
30690
  @deprecated Use `isAny` instead
30701
30691
  */
30702
30692
  anyBy: aliasMethod('isAny'),
@@ -30705,7 +30695,7 @@ enifed("ember-runtime/mixins/enumerable",
30705
30695
  @method someProperty
30706
30696
  @param {String} key the property to test
30707
30697
  @param {String} [value] optional value to test against.
30708
- @return {Boolean} `true` if the passed function returns `true` for any item
30698
+ @return {Boolean}
30709
30699
  @deprecated Use `isAny` instead
30710
30700
  */
30711
30701
  someProperty: aliasMethod('isAny'),
@@ -32163,7 +32153,7 @@ enifed("ember-runtime/mixins/observable",
32163
32153
  },
32164
32154
 
32165
32155
  addBeforeObserver: function(key, target, method) {
32166
- Ember.deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself. See http://emberjs.com/guides/deprecations#toc_deprecate-beforeobservers');
32156
+ Ember.deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers' });
32167
32157
  addBeforeObserver(this, key, target, method);
32168
32158
  },
32169
32159
 
@@ -33406,8 +33396,8 @@ enifed("ember-runtime/system/container",
33406
33396
  __exports__["default"] = Container;
33407
33397
  });
33408
33398
  enifed("ember-runtime/system/core_object",
33409
- ["ember-metal/core","ember-metal/property_get","ember-metal/utils","ember-metal/platform","ember-metal/chains","ember-metal/events","ember-metal/mixin","ember-metal/enumerable_utils","ember-metal/error","ember-metal/keys","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-runtime/inject","exports"],
33410
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __exports__) {
33399
+ ["ember-metal/core","ember-metal/merge","ember-metal/property_get","ember-metal/utils","ember-metal/platform","ember-metal/chains","ember-metal/events","ember-metal/mixin","ember-metal/enumerable_utils","ember-metal/error","ember-metal/keys","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-runtime/inject","exports"],
33400
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __exports__) {
33411
33401
  // Remove "use strict"; from transpiled module until
33412
33402
  // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
33413
33403
  //
@@ -33419,38 +33409,39 @@ enifed("ember-runtime/system/core_object",
33419
33409
  */
33420
33410
 
33421
33411
  var Ember = __dependency1__["default"];
33412
+ var merge = __dependency2__["default"];
33422
33413
  // Ember.assert, Ember.config
33423
33414
 
33424
33415
  // NOTE: this object should never be included directly. Instead use `Ember.Object`.
33425
33416
  // We only define this separately so that `Ember.Set` can depend on it.
33426
- var get = __dependency2__.get;
33427
- var guidFor = __dependency3__.guidFor;
33428
- var apply = __dependency3__.apply;
33429
- var o_create = __dependency4__.create;
33430
- var generateGuid = __dependency3__.generateGuid;
33431
- var GUID_KEY = __dependency3__.GUID_KEY;
33432
- var meta = __dependency3__.meta;
33433
- var makeArray = __dependency3__.makeArray;
33434
- var finishChains = __dependency5__.finishChains;
33435
- var sendEvent = __dependency6__.sendEvent;
33436
- var IS_BINDING = __dependency7__.IS_BINDING;
33437
- var Mixin = __dependency7__.Mixin;
33438
- var required = __dependency7__.required;
33439
- var indexOf = __dependency8__.indexOf;
33440
- var EmberError = __dependency9__["default"];
33441
- var o_defineProperty = __dependency4__.defineProperty;
33442
- var keys = __dependency10__["default"];
33443
- var ActionHandler = __dependency11__["default"];
33444
- var defineProperty = __dependency12__.defineProperty;
33445
- var Binding = __dependency13__.Binding;
33446
- var ComputedProperty = __dependency14__.ComputedProperty;
33447
- var computed = __dependency14__.computed;
33448
- var InjectedProperty = __dependency15__["default"];
33449
- var run = __dependency16__["default"];
33450
- var destroy = __dependency17__.destroy;
33417
+ var get = __dependency3__.get;
33418
+ var guidFor = __dependency4__.guidFor;
33419
+ var apply = __dependency4__.apply;
33420
+ var o_create = __dependency5__.create;
33421
+ var generateGuid = __dependency4__.generateGuid;
33422
+ var GUID_KEY = __dependency4__.GUID_KEY;
33423
+ var meta = __dependency4__.meta;
33424
+ var makeArray = __dependency4__.makeArray;
33425
+ var finishChains = __dependency6__.finishChains;
33426
+ var sendEvent = __dependency7__.sendEvent;
33427
+ var IS_BINDING = __dependency8__.IS_BINDING;
33428
+ var Mixin = __dependency8__.Mixin;
33429
+ var required = __dependency8__.required;
33430
+ var indexOf = __dependency9__.indexOf;
33431
+ var EmberError = __dependency10__["default"];
33432
+ var o_defineProperty = __dependency5__.defineProperty;
33433
+ var keys = __dependency11__["default"];
33434
+ var ActionHandler = __dependency12__["default"];
33435
+ var defineProperty = __dependency13__.defineProperty;
33436
+ var Binding = __dependency14__.Binding;
33437
+ var ComputedProperty = __dependency15__.ComputedProperty;
33438
+ var computed = __dependency15__.computed;
33439
+ var InjectedProperty = __dependency16__["default"];
33440
+ var run = __dependency17__["default"];
33441
+ var destroy = __dependency18__.destroy;
33451
33442
  var K = __dependency1__.K;
33452
- var hasPropertyAccessors = __dependency4__.hasPropertyAccessors;
33453
- var validatePropertyInjections = __dependency18__.validatePropertyInjections;
33443
+ var hasPropertyAccessors = __dependency5__.hasPropertyAccessors;
33444
+ var validatePropertyInjections = __dependency19__.validatePropertyInjections;
33454
33445
 
33455
33446
  var schedule = run.schedule;
33456
33447
  var applyMixin = Mixin._apply;
@@ -33502,6 +33493,7 @@ enifed("ember-runtime/system/core_object",
33502
33493
  initProperties = null;
33503
33494
 
33504
33495
  var concatenatedProperties = this.concatenatedProperties;
33496
+ var mergedProperties = this.mergedProperties;
33505
33497
 
33506
33498
  for (var i = 0, l = props.length; i < l; i++) {
33507
33499
  var properties = props[i];
@@ -33554,6 +33546,14 @@ enifed("ember-runtime/system/core_object",
33554
33546
  }
33555
33547
  }
33556
33548
 
33549
+ if (mergedProperties &&
33550
+ mergedProperties.length &&
33551
+ indexOf(mergedProperties, keyName) >= 0) {
33552
+ var originalValue = this[keyName];
33553
+
33554
+ value = merge(originalValue, value);
33555
+ }
33556
+
33557
33557
  if (desc) {
33558
33558
  desc.set(this, keyName, value);
33559
33559
  } else {
@@ -33719,8 +33719,8 @@ enifed("ember-runtime/system/core_object",
33719
33719
  view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
33720
33720
  ```
33721
33721
 
33722
- Using the `concatenatedProperties` property, we can tell to Ember that mix
33723
- the content of the properties.
33722
+ Using the `concatenatedProperties` property, we can tell Ember to mix the
33723
+ content of the properties.
33724
33724
 
33725
33725
  In `Ember.View` the `classNameBindings` and `attributeBindings` properties
33726
33726
  are also concatenated, in addition to `classNames`.
@@ -34324,7 +34324,7 @@ enifed("ember-runtime/system/deferred",
34324
34324
 
34325
34325
  var Deferred = EmberObject.extend(DeferredMixin, {
34326
34326
  init: function() {
34327
- Ember.deprecate('Usage of Ember.Deferred is deprecated.');
34327
+ Ember.deprecate('Usage of Ember.Deferred is deprecated.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' });
34328
34328
  this._super();
34329
34329
  }
34330
34330
  });
@@ -36601,6 +36601,11 @@ enifed("ember-template-compiler/plugins/transform-each-in-to-hash",
36601
36601
 
36602
36602
  walker.visit(ast, function(node) {
36603
36603
  if (pluginContext.validate(node)) {
36604
+
36605
+ if (node.program && node.program.blockParams.length) {
36606
+ throw new Error('You cannot use keyword (`{{each foo in bar}}`) and block params (`{{each bar as |foo|}}`) at the same time.');
36607
+ }
36608
+
36604
36609
  var removedParams = node.sexpr.params.splice(0, 2);
36605
36610
  var keyword = removedParams[0].original;
36606
36611
 
@@ -36672,6 +36677,11 @@ enifed("ember-template-compiler/plugins/transform-with-as-to-hash",
36672
36677
 
36673
36678
  walker.visit(ast, function(node) {
36674
36679
  if (pluginContext.validate(node)) {
36680
+
36681
+ if (node.program && node.program.blockParams.length) {
36682
+ throw new Error('You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time.');
36683
+ }
36684
+
36675
36685
  var removedParams = node.sexpr.params.splice(1, 2);
36676
36686
  var keyword = removedParams[1].original;
36677
36687
  node.program.blockParams = [ keyword ];
@@ -38729,7 +38739,7 @@ enifed("ember-views/streams/class_name_binding",
38729
38739
  ["ember-metal/streams/utils","ember-metal/property_get","ember-runtime/system/string","ember-metal/utils","exports"],
38730
38740
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
38731
38741
  "use strict";
38732
- var chainStream = __dependency1__.chainStream;
38742
+ var chain = __dependency1__.chain;
38733
38743
  var read = __dependency1__.read;
38734
38744
  var get = __dependency2__.get;
38735
38745
  var dasherize = __dependency3__.dasherize;
@@ -38857,7 +38867,7 @@ enifed("ember-views/streams/class_name_binding",
38857
38867
  );
38858
38868
  } else {
38859
38869
  var pathValue = view.getStream(prefix+parsedPath.path);
38860
- return chainStream(pathValue, function(){
38870
+ return chain(pathValue, function() {
38861
38871
  return classStringForValue(
38862
38872
  parsedPath.path,
38863
38873
  read(pathValue),
@@ -39097,7 +39107,7 @@ enifed("ember-views/streams/utils",
39097
39107
  if (typeof value === 'string') {
39098
39108
  if (isGlobal(value)) {
39099
39109
  viewClass = get(null, value);
39100
- Ember.deprecate('Resolved the view "'+value+'" on the global context. Pass a view name to be looked up on the container instead, such as {{view "select"}}. http://emberjs.com/guides/deprecations#toc_global-lookup-of-views', !viewClass);
39110
+ Ember.deprecate('Resolved the view "'+value+'" on the global context. Pass a view name to be looked up on the container instead, such as {{view "select"}}.', !viewClass, { url: 'http://emberjs.com/guides/deprecations/#toc_global-lookup-of-views' });
39101
39111
  } else {
39102
39112
  Ember.assert("View requires a container to resolve views not passed in through the context", !!container);
39103
39113
  viewClass = container.lookupFactory('view:'+value);
@@ -45157,7 +45167,7 @@ enifed("ember-views/views/view",
45157
45167
  Ember.assert("Only arrays are allowed for 'classNameBindings'", typeOf(this.classNameBindings) === 'array');
45158
45168
  this.classNameBindings = emberA(this.classNameBindings.slice());
45159
45169
 
45160
- Ember.assert("Only arrays are allowed for 'classNames'", typeOf(this.classNames) === 'array');
45170
+ Ember.assert("Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.", typeOf(this.classNames) === 'array');
45161
45171
  this.classNames = emberA(this.classNames.slice());
45162
45172
  },
45163
45173
 
@@ -45817,9 +45827,13 @@ enifed("htmlbars-compiler/fragment-javascript-compiler",
45817
45827
  this.source.push(this.indent+' return '+el+';\n');
45818
45828
  };
45819
45829
 
45820
- FragmentJavaScriptCompiler.prototype.setAttribute = function(name, value) {
45830
+ FragmentJavaScriptCompiler.prototype.setAttribute = function(name, value, namespace) {
45821
45831
  var el = 'el'+this.depth;
45822
- this.source.push(this.indent+' dom.setProperty('+el+','+string(name)+','+string(value)+');\n');
45832
+ if (namespace) {
45833
+ this.source.push(this.indent+' dom.setAttributeNS('+el+','+string(namespace)+','+string(name)+','+string(value)+');\n');
45834
+ } else {
45835
+ this.source.push(this.indent+' dom.setAttribute('+el+','+string(name)+','+string(value)+');\n');
45836
+ }
45823
45837
  };
45824
45838
 
45825
45839
  FragmentJavaScriptCompiler.prototype.appendChild = function() {
@@ -45857,6 +45871,7 @@ enifed("htmlbars-compiler/fragment-opcode-compiler",
45857
45871
  "use strict";
45858
45872
  var TemplateVisitor = __dependency1__["default"];
45859
45873
  var processOpcodes = __dependency2__.processOpcodes;
45874
+ var getNamespace = __dependency2__.getNamespace;
45860
45875
  var forEach = __dependency3__.forEach;
45861
45876
 
45862
45877
  function FragmentOpcodeCompiler() {
@@ -45916,7 +45931,10 @@ enifed("htmlbars-compiler/fragment-opcode-compiler",
45916
45931
 
45917
45932
  FragmentOpcodeCompiler.prototype.attribute = function(attr) {
45918
45933
  if (attr.value.type === 'TextNode') {
45919
- this.opcode('setAttribute', [attr.name, attr.value.chars]);
45934
+
45935
+ var namespace = getNamespace(attr.name) || null;
45936
+
45937
+ this.opcode('setAttribute', [attr.name, attr.value.chars, namespace]);
45920
45938
  }
45921
45939
  };
45922
45940
 
@@ -46136,18 +46154,18 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
46136
46154
  this.morphs.push(['morph' + morphNum, morph]);
46137
46155
  };
46138
46156
 
46139
- prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped) {
46157
+ prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped, namespace) {
46140
46158
  var morphMethod = escaped ? 'createAttrMorph' : 'createUnsafeAttrMorph';
46141
- var morph = "dom."+morphMethod+"(element"+elementNum+", '"+name+"')";
46159
+ var morph = "dom."+morphMethod+"(element"+elementNum+", '"+name+(namespace ? "', '"+namespace : '')+"')";
46142
46160
  this.morphs.push(['attrMorph' + attrMorphNum, morph]);
46143
46161
  };
46144
46162
 
46145
46163
  prototype.repairClonedNode = function(blankChildTextNodes, isElementChecked) {
46146
46164
  var parent = this.getParent(),
46147
- processing = 'dom.repairClonedNode('+parent+','+
46165
+ processing = 'if (this.cachedFragment) { dom.repairClonedNode('+parent+','+
46148
46166
  array(blankChildTextNodes)+
46149
46167
  ( isElementChecked ? ',true' : '' )+
46150
- ');';
46168
+ '); }';
46151
46169
  this.fragmentProcessing.push(
46152
46170
  processing
46153
46171
  );
@@ -46191,6 +46209,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46191
46209
  "use strict";
46192
46210
  var TemplateVisitor = __dependency1__["default"];
46193
46211
  var processOpcodes = __dependency2__.processOpcodes;
46212
+ var getNamespace = __dependency2__.getNamespace;
46194
46213
  var forEach = __dependency3__.forEach;
46195
46214
  var isHelper = __dependency4__.isHelper;
46196
46215
 
@@ -46364,6 +46383,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46364
46383
  HydrationOpcodeCompiler.prototype.attribute = function(attr) {
46365
46384
  var value = attr.value;
46366
46385
  var escaped = true;
46386
+ var namespace = getNamespace(attr.name) || null;
46367
46387
 
46368
46388
  // TODO: Introduce context specific AST nodes to avoid switching here.
46369
46389
  if (value.type === 'TextNode') {
@@ -46384,7 +46404,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46384
46404
  }
46385
46405
 
46386
46406
  var attrMorphNum = this.attrMorphNum++;
46387
- this.opcode('createAttrMorph', attrMorphNum, this.elementNum, attr.name, escaped);
46407
+ this.opcode('createAttrMorph', attrMorphNum, this.elementNum, attr.name, escaped, namespace);
46388
46408
  this.opcode('printAttributeHook', attrMorphNum, this.elementNum);
46389
46409
  };
46390
46410
 
@@ -46920,7 +46940,23 @@ enifed("htmlbars-compiler/utils",
46920
46940
  }
46921
46941
  }
46922
46942
 
46923
- __exports__.processOpcodes = processOpcodes;
46943
+ __exports__.processOpcodes = processOpcodes;// ref http://dev.w3.org/html5/spec-LC/namespaces.html
46944
+ var defaultNamespaces = {
46945
+ html: 'http://www.w3.org/1999/xhtml',
46946
+ mathml: 'http://www.w3.org/1998/Math/MathML',
46947
+ svg: 'http://www.w3.org/2000/svg',
46948
+ xlink: 'http://www.w3.org/1999/xlink',
46949
+ xml: 'http://www.w3.org/XML/1998/namespace'
46950
+ };
46951
+
46952
+ function getNamespace(attrName) {
46953
+ var parts = attrName.split(':');
46954
+ if (parts.length > 1) {
46955
+ return defaultNamespaces[parts[0]];
46956
+ }
46957
+ }
46958
+
46959
+ __exports__.getNamespace = getNamespace;
46924
46960
  });
46925
46961
  enifed("htmlbars-syntax",
46926
46962
  ["./htmlbars-syntax/walker","./htmlbars-syntax/builders","./htmlbars-syntax/parser","exports"],
@@ -48748,14 +48784,18 @@ enifed("htmlbars-syntax/token-handlers",
48748
48784
  __exports__["default"] = tokenHandlers;
48749
48785
  });
48750
48786
  enifed("htmlbars-syntax/tokenizer",
48751
- ["../simple-html-tokenizer","./utils","./builders","exports"],
48752
- function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
48787
+ ["../simple-html-tokenizer","./utils","../htmlbars-util/array-utils","./builders","exports"],
48788
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
48753
48789
  "use strict";
48754
48790
  var Tokenizer = __dependency1__.Tokenizer;
48755
48791
  var isHelper = __dependency2__.isHelper;
48756
- var builders = __dependency3__["default"];
48792
+ var map = __dependency3__.map;
48793
+ var builders = __dependency4__["default"];
48757
48794
 
48758
48795
  Tokenizer.prototype.createAttribute = function(char) {
48796
+ if (this.token.type === 'EndTag') {
48797
+ throw new Error('Invalid end tag: closing tag must not have attributes, in ' + formatTokenInfo(this) + '.');
48798
+ }
48759
48799
  this.currentAttribute = builders.attr(char.toLowerCase(), [], null);
48760
48800
  this.token.attributes.push(this.currentAttribute);
48761
48801
  this.state = 'attributeName';
@@ -48772,12 +48812,13 @@ enifed("htmlbars-syntax/tokenizer",
48772
48812
  Tokenizer.prototype.addToAttributeValue = function(char) {
48773
48813
  var value = this.currentAttribute.value;
48774
48814
 
48815
+ if (!this.currentAttribute.quoted && char === '/') {
48816
+ throw new Error("A space is required between an unquoted attribute value and `/`, in " + formatTokenInfo(this) +
48817
+ '.');
48818
+ }
48775
48819
  if (!this.currentAttribute.quoted && value.length > 0 &&
48776
48820
  (char.type === 'MustacheStatement' || value[0].type === 'MustacheStatement')) {
48777
- // Get the line number from a mustache, whether it's the one to add or the one already added
48778
- var mustache = char.type === 'MustacheStatement' ? char : value[0],
48779
- line = mustache.loc.start.line;
48780
- throw new Error("Unquoted attribute value must be a single string or mustache (line " + line + ")");
48821
+ throw new Error("Unquoted attribute value must be a single string or mustache (on line " + this.line + ")");
48781
48822
  }
48782
48823
 
48783
48824
  if (typeof char === 'object') {
@@ -48810,14 +48851,16 @@ enifed("htmlbars-syntax/tokenizer",
48810
48851
 
48811
48852
  function prepareAttributeValue(attr) {
48812
48853
  var parts = attr.value;
48813
- if (parts.length === 0) {
48854
+ var length = parts.length;
48855
+
48856
+ if (length === 0) {
48814
48857
  return builders.text('');
48815
- } else if (parts.length === 1 && parts[0].type === "TextNode") {
48858
+ } else if (length === 1 && parts[0].type === "TextNode") {
48816
48859
  return parts[0];
48817
48860
  } else if (!attr.quoted) {
48818
48861
  return parts[0];
48819
48862
  } else {
48820
- return builders.concat(parts.map(prepareConcatPart));
48863
+ return builders.concat(map(parts, prepareConcatPart));
48821
48864
  }
48822
48865
  }
48823
48866
 
@@ -48830,6 +48873,10 @@ enifed("htmlbars-syntax/tokenizer",
48830
48873
  }
48831
48874
  }
48832
48875
 
48876
+ function formatTokenInfo(tokenizer) {
48877
+ return '`' + tokenizer.token.tagName + '` (on line ' + tokenizer.line + ')';
48878
+ }
48879
+
48833
48880
  function unwrapMustache(mustache) {
48834
48881
  if (isHelper(mustache.sexpr)) {
48835
48882
  return mustache.sexpr;
@@ -49035,6 +49082,16 @@ enifed("htmlbars-test-helpers",
49035
49082
  var ie8InnerHTMLTestElement = document.createElement('div');
49036
49083
  ie8InnerHTMLTestElement.setAttribute('id', 'womp');
49037
49084
  var ie8InnerHTML = (ie8InnerHTMLTestElement.outerHTML.indexOf('id=womp') > -1);
49085
+
49086
+ // detect side-effects of cloning svg elements in IE9-11
49087
+ var ieSVGInnerHTML = (function () {
49088
+ var div = document.createElement('div');
49089
+ var node = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
49090
+ div.appendChild(node);
49091
+ var clone = div.cloneNode(true);
49092
+ return clone.innerHTML === '<svg xmlns="http://www.w3.org/2000/svg" />';
49093
+ })();
49094
+
49038
49095
  function normalizeInnerHTML(actualHTML) {
49039
49096
  if (ie8InnerHTML) {
49040
49097
  // drop newlines in IE8
@@ -49048,6 +49105,16 @@ enifed("htmlbars-test-helpers",
49048
49105
  return 'id="'+id+'"';
49049
49106
  });
49050
49107
  }
49108
+ if (ieSVGInnerHTML) {
49109
+ // Replace `<svg xmlns="http://www.w3.org/2000/svg" height="50%" />` with `<svg height="50%"></svg>`, etc.
49110
+ // drop namespace attribute
49111
+ actualHTML = actualHTML.replace(/ xmlns="[^"]+"/, '');
49112
+ // replace self-closing elements
49113
+ actualHTML = actualHTML.replace(/<([A-Z]+) [^\/>]*\/>/gi, function(tag, tagName) {
49114
+ return tag.slice(0, tag.length - 3) + '></' + tagName + '>';
49115
+ });
49116
+ }
49117
+
49051
49118
  return actualHTML;
49052
49119
  }
49053
49120
 
@@ -49076,19 +49143,30 @@ enifed("htmlbars-util/array-utils",
49076
49143
  function(__exports__) {
49077
49144
  "use strict";
49078
49145
  function forEach(array, callback, binding) {
49079
- var i;
49146
+ var i, l;
49080
49147
  if (binding === undefined) {
49081
- for (i = 0; i < array.length; i++) {
49148
+ for (i = 0, l = array.length; i < l; i++) {
49082
49149
  callback(array[i], i, array);
49083
49150
  }
49084
49151
  } else {
49085
- for (i = 0; i < array.length; i++) {
49152
+ for (i = 0, l = array.length; i < l; i++) {
49086
49153
  callback.call(binding, array[i], i, array);
49087
49154
  }
49088
49155
  }
49089
49156
  }
49090
49157
 
49091
- __exports__.forEach = forEach;
49158
+ __exports__.forEach = forEach;function map(array, callback) {
49159
+ var output = [];
49160
+ var i, l;
49161
+
49162
+ for (i = 0, l = array.length; i < l; i++) {
49163
+ output.push(callback(array[i], i, array));
49164
+ }
49165
+
49166
+ return output;
49167
+ }
49168
+
49169
+ __exports__.map = map;
49092
49170
  });
49093
49171
  enifed("htmlbars-util/handlebars/safe-string",
49094
49172
  ["exports"],
@@ -49275,6 +49353,7 @@ enifed("morph/attr-morph",
49275
49353
  function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
49276
49354
  "use strict";
49277
49355
  var sanitizeAttributeValue = __dependency1__.sanitizeAttributeValue;
49356
+ var isAttrRemovalValue = __dependency2__.isAttrRemovalValue;
49278
49357
  var normalizeProperty = __dependency2__.normalizeProperty;
49279
49358
  var svgNamespace = __dependency3__.svgNamespace;
49280
49359
 
@@ -49283,34 +49362,48 @@ enifed("morph/attr-morph",
49283
49362
  }
49284
49363
 
49285
49364
  function updateAttribute(value) {
49286
- if (value === null) {
49365
+ if (isAttrRemovalValue(value)) {
49287
49366
  this.domHelper.removeAttribute(this.element, this.attrName);
49288
49367
  } else {
49289
49368
  this.domHelper.setAttribute(this.element, this.attrName, value);
49290
49369
  }
49291
49370
  }
49292
49371
 
49293
- function AttrMorph(element, attrName, domHelper) {
49372
+ function updateAttributeNS(value) {
49373
+ if (isAttrRemovalValue(value)) {
49374
+ this.domHelper.removeAttribute(this.element, this.attrName);
49375
+ } else {
49376
+ this.domHelper.setAttributeNS(this.element, this.namespace, this.attrName, value);
49377
+ }
49378
+ }
49379
+
49380
+ function AttrMorph(element, attrName, domHelper, namespace) {
49294
49381
  this.element = element;
49295
49382
  this.domHelper = domHelper;
49383
+ this.namespace = namespace || null;
49296
49384
  this.escaped = true;
49297
49385
 
49298
49386
  var normalizedAttrName = normalizeProperty(this.element, attrName);
49299
- if (element.namespaceURI === svgNamespace || attrName === 'style' || !normalizedAttrName) {
49387
+ if (this.namespace) {
49388
+ this._update = updateAttributeNS;
49300
49389
  this.attrName = attrName;
49301
- this._update = updateAttribute;
49302
49390
  } else {
49303
- this.attrName = normalizedAttrName;
49304
- this._update = updateProperty;
49391
+ if (element.namespaceURI === svgNamespace || attrName === 'style' || !normalizedAttrName) {
49392
+ this.attrName = attrName;
49393
+ this._update = updateAttribute;
49394
+ } else {
49395
+ this.attrName = normalizedAttrName;
49396
+ this._update = updateProperty;
49397
+ }
49305
49398
  }
49306
49399
  }
49307
49400
 
49308
49401
  AttrMorph.prototype.setContent = function (value) {
49309
49402
  if (this.escaped) {
49310
49403
  var sanitized = sanitizeAttributeValue(this.element, this.attrName, value);
49311
- this._update(sanitized);
49404
+ this._update(sanitized, this.namespace);
49312
49405
  } else {
49313
- this._update(value);
49406
+ this._update(value, this.namespace);
49314
49407
  }
49315
49408
  };
49316
49409
 
@@ -49384,6 +49477,7 @@ enifed("morph/dom-helper",
49384
49477
  var addClasses = __dependency4__.addClasses;
49385
49478
  var removeClasses = __dependency4__.removeClasses;
49386
49479
  var normalizeProperty = __dependency5__.normalizeProperty;
49480
+ var isAttrRemovalValue = __dependency5__.isAttrRemovalValue;
49387
49481
 
49388
49482
  var doc = typeof document === 'undefined' ? false : document;
49389
49483
 
@@ -49401,10 +49495,6 @@ enifed("morph/dom-helper",
49401
49495
  return !clonedElement.checked;
49402
49496
  })(doc);
49403
49497
 
49404
- function isSVG(ns){
49405
- return ns === svgNamespace;
49406
- }
49407
-
49408
49498
  // This is not the namespace of the element, but of
49409
49499
  // the elements inside that elements.
49410
49500
  function interiorNamespace(element){
@@ -49510,18 +49600,26 @@ enifed("morph/dom-helper",
49510
49600
  var child = element;
49511
49601
 
49512
49602
  for (var i = 0; i < indices.length; i++) {
49513
- child = child.childNodes[indices[i]];
49603
+ child = child.childNodes.item(indices[i]);
49514
49604
  }
49515
49605
 
49516
49606
  return child;
49517
49607
  };
49518
49608
 
49609
+ prototype.childAtIndex = function(element, index) {
49610
+ return element.childNodes.item(index);
49611
+ };
49612
+
49519
49613
  prototype.appendText = function(element, text) {
49520
49614
  return element.appendChild(this.document.createTextNode(text));
49521
49615
  };
49522
49616
 
49523
49617
  prototype.setAttribute = function(element, name, value) {
49524
- element.setAttribute(name, value);
49618
+ element.setAttribute(name, String(value));
49619
+ };
49620
+
49621
+ prototype.setAttributeNS = function(element, namespace, name, value) {
49622
+ element.setAttributeNS(namespace, name, String(value));
49525
49623
  };
49526
49624
 
49527
49625
  prototype.removeAttribute = function(element, name) {
@@ -49532,23 +49630,31 @@ enifed("morph/dom-helper",
49532
49630
  element[name] = value;
49533
49631
  };
49534
49632
 
49535
- prototype.setProperty = function(element, name, value) {
49633
+ prototype.setProperty = function(element, name, value, namespace) {
49536
49634
  var lowercaseName = name.toLowerCase();
49537
49635
  if (element.namespaceURI === svgNamespace || lowercaseName === 'style') {
49538
- if (value === null) {
49636
+ if (isAttrRemovalValue(value)) {
49539
49637
  element.removeAttribute(name);
49540
49638
  } else {
49541
- element.setAttribute(name, value);
49639
+ if (namespace) {
49640
+ element.setAttributeNS(namespace, name, value);
49641
+ } else {
49642
+ element.setAttribute(name, value);
49643
+ }
49542
49644
  }
49543
49645
  } else {
49544
49646
  var normalized = normalizeProperty(element, name);
49545
49647
  if (normalized) {
49546
49648
  element[normalized] = value;
49547
49649
  } else {
49548
- if (value === null) {
49650
+ if (isAttrRemovalValue(value)) {
49549
49651
  element.removeAttribute(name);
49550
49652
  } else {
49551
- element.setAttribute(name, value);
49653
+ if (namespace) {
49654
+ element.setAttributeNS(namespace, name, value);
49655
+ } else {
49656
+ element.setAttribute(name, value);
49657
+ }
49552
49658
  }
49553
49659
  }
49554
49660
  }
@@ -49606,7 +49712,7 @@ enifed("morph/dom-helper",
49606
49712
  for (var i=0, len=blankChildTextNodes.length;i<len;i++){
49607
49713
  var textNode = this.document.createTextNode(''),
49608
49714
  offset = blankChildTextNodes[i],
49609
- before = element.childNodes[offset];
49715
+ before = this.childAtIndex(element, offset);
49610
49716
  if (before) {
49611
49717
  element.insertBefore(textNode, before);
49612
49718
  } else {
@@ -49624,12 +49730,12 @@ enifed("morph/dom-helper",
49624
49730
  return clone;
49625
49731
  };
49626
49732
 
49627
- prototype.createAttrMorph = function(element, attrName){
49628
- return new AttrMorph(element, attrName, this);
49733
+ prototype.createAttrMorph = function(element, attrName, namespace){
49734
+ return new AttrMorph(element, attrName, this, namespace);
49629
49735
  };
49630
49736
 
49631
- prototype.createUnsafeAttrMorph = function(element, attrName){
49632
- var morph = this.createAttrMorph(element, attrName);
49737
+ prototype.createUnsafeAttrMorph = function(element, attrName, namespace){
49738
+ var morph = this.createAttrMorph(element, attrName, namespace);
49633
49739
  morph.escaped = false;
49634
49740
  return morph;
49635
49741
  };
@@ -49650,9 +49756,8 @@ enifed("morph/dom-helper",
49650
49756
  // This helper is just to keep the templates good looking,
49651
49757
  // passing integers instead of element references.
49652
49758
  prototype.createMorphAt = function(parent, startIndex, endIndex, contextualElement){
49653
- var childNodes = parent.childNodes,
49654
- start = startIndex === -1 ? null : childNodes[startIndex],
49655
- end = endIndex === -1 ? null : childNodes[endIndex];
49759
+ var start = startIndex === -1 ? null : this.childAtIndex(parent, startIndex),
49760
+ end = endIndex === -1 ? null : this.childAtIndex(parent, endIndex);
49656
49761
  return this.createMorph(parent, start, end, contextualElement);
49657
49762
  };
49658
49763
 
@@ -49679,12 +49784,7 @@ enifed("morph/dom-helper",
49679
49784
  };
49680
49785
 
49681
49786
  prototype.parseHTML = function(html, contextualElement) {
49682
- var isSVGContent = (
49683
- isSVG(this.namespace) &&
49684
- !svgHTMLIntegrationPoints[contextualElement.tagName]
49685
- );
49686
-
49687
- if (isSVGContent) {
49787
+ if (interiorNamespace(contextualElement) === svgNamespace) {
49688
49788
  return buildSVGDOM(html, this);
49689
49789
  } else {
49690
49790
  var nodes = buildHTMLDOM(html, contextualElement, this);
@@ -50121,7 +50221,11 @@ enifed("morph/dom-helper/prop",
50121
50221
  ["exports"],
50122
50222
  function(__exports__) {
50123
50223
  "use strict";
50124
- // TODO should this be an o_create kind of thing?
50224
+ function isAttrRemovalValue(value) {
50225
+ return value === null || value === undefined;
50226
+ }
50227
+
50228
+ __exports__.isAttrRemovalValue = isAttrRemovalValue;// TODO should this be an o_create kind of thing?
50125
50229
  var propertyCaches = {};
50126
50230
  __exports__.propertyCaches = propertyCaches;
50127
50231
  function normalizeProperty(element, attrName) {
@@ -51713,8 +51817,9 @@ enifed("router/router",
51713
51817
  return intent.applyToState(state, this.recognizer, this.getHandler);
51714
51818
  },
51715
51819
 
51716
- isActiveIntent: function(handlerName, contexts, queryParams) {
51717
- var targetHandlerInfos = this.state.handlerInfos,
51820
+ isActiveIntent: function(handlerName, contexts, queryParams, _state) {
51821
+ var state = _state || this.state,
51822
+ targetHandlerInfos = state.handlerInfos,
51718
51823
  found = false, names, object, handlerInfo, handlerObj, i, len;
51719
51824
 
51720
51825
  if (!targetHandlerInfos.length) { return false; }
@@ -51733,8 +51838,8 @@ enifed("router/router",
51733
51838
  return false;
51734
51839
  }
51735
51840
 
51736
- var state = new TransitionState();
51737
- state.handlerInfos = targetHandlerInfos.slice(0, index + 1);
51841
+ var testState = new TransitionState();
51842
+ testState.handlerInfos = targetHandlerInfos.slice(0, index + 1);
51738
51843
  recogHandlers = recogHandlers.slice(0, index + 1);
51739
51844
 
51740
51845
  var intent = new NamedTransitionIntent({
@@ -51742,9 +51847,9 @@ enifed("router/router",
51742
51847
  contexts: contexts
51743
51848
  });
51744
51849
 
51745
- var newState = intent.applyToHandlers(state, recogHandlers, this.getHandler, targetHandler, true, true);
51850
+ var newState = intent.applyToHandlers(testState, recogHandlers, this.getHandler, targetHandler, true, true);
51746
51851
 
51747
- var handlersEqual = handlerInfosEqual(newState.handlerInfos, state.handlerInfos);
51852
+ var handlersEqual = handlerInfosEqual(newState.handlerInfos, testState.handlerInfos);
51748
51853
  if (!queryParams || !handlersEqual) {
51749
51854
  return handlersEqual;
51750
51855
  }
@@ -51753,7 +51858,7 @@ enifed("router/router",
51753
51858
  var activeQPsOnNewHandler = {};
51754
51859
  merge(activeQPsOnNewHandler, queryParams);
51755
51860
 
51756
- var activeQueryParams = this.state.queryParams;
51861
+ var activeQueryParams = state.queryParams;
51757
51862
  for (var key in activeQueryParams) {
51758
51863
  if (activeQueryParams.hasOwnProperty(key) &&
51759
51864
  activeQPsOnNewHandler.hasOwnProperty(key)) {
@@ -51852,32 +51957,33 @@ enifed("router/router",
51852
51957
  */
51853
51958
  function setupContexts(router, newState, transition) {
51854
51959
  var partition = partitionHandlers(router.state, newState);
51960
+ var i, l, handler;
51855
51961
 
51856
- forEach(partition.exited, function(handlerInfo) {
51857
- var handler = handlerInfo.handler;
51962
+ for (i=0, l=partition.exited.length; i<l; i++) {
51963
+ handler = partition.exited[i].handler;
51858
51964
  delete handler.context;
51859
51965
 
51860
51966
  callHook(handler, 'reset', true, transition);
51861
51967
  callHook(handler, 'exit', transition);
51862
- });
51968
+ }
51863
51969
 
51864
51970
  var oldState = router.oldState = router.state;
51865
51971
  router.state = newState;
51866
51972
  var currentHandlerInfos = router.currentHandlerInfos = partition.unchanged.slice();
51867
51973
 
51868
51974
  try {
51869
- forEach(partition.reset, function(handlerInfo) {
51870
- var handler = handlerInfo.handler;
51975
+ for (i=0, l=partition.reset.length; i<l; i++) {
51976
+ handler = partition.reset[i].handler;
51871
51977
  callHook(handler, 'reset', false, transition);
51872
- });
51978
+ }
51873
51979
 
51874
- forEach(partition.updatedContext, function(handlerInfo) {
51875
- return handlerEnteredOrUpdated(currentHandlerInfos, handlerInfo, false, transition);
51876
- });
51980
+ for (i=0, l=partition.updatedContext.length; i<l; i++) {
51981
+ handlerEnteredOrUpdated(currentHandlerInfos, partition.updatedContext[i], false, transition);
51982
+ }
51877
51983
 
51878
- forEach(partition.entered, function(handlerInfo) {
51879
- return handlerEnteredOrUpdated(currentHandlerInfos, handlerInfo, true, transition);
51880
- });
51984
+ for (i=0, l=partition.entered.length; i<l; i++) {
51985
+ handlerEnteredOrUpdated(currentHandlerInfos, partition.entered[i], true, transition);
51986
+ }
51881
51987
  } catch(e) {
51882
51988
  router.state = oldState;
51883
51989
  router.currentHandlerInfos = oldState.handlerInfos;
@@ -53148,15 +53254,23 @@ enifed("router/utils",
53148
53254
  obj[hookName] && hookName;
53149
53255
  }
53150
53256
 
53151
- function callHook(obj, hookName) {
53152
- var args = slice.call(arguments, 2);
53153
- return applyHook(obj, hookName, args);
53257
+ function callHook(obj, _hookName, arg1, arg2) {
53258
+ var hookName = resolveHook(obj, _hookName);
53259
+ return hookName && obj[hookName].call(obj, arg1, arg2);
53154
53260
  }
53155
53261
 
53156
53262
  function applyHook(obj, _hookName, args) {
53157
53263
  var hookName = resolveHook(obj, _hookName);
53158
53264
  if (hookName) {
53159
- return obj[hookName].apply(obj, args);
53265
+ if (args.length === 0) {
53266
+ return obj[hookName].call(obj);
53267
+ } else if (args.length === 1) {
53268
+ return obj[hookName].call(obj, args[0]);
53269
+ } else if (args.length === 2) {
53270
+ return obj[hookName].call(obj, args[0], args[1]);
53271
+ } else {
53272
+ return obj[hookName].apply(obj, args);
53273
+ }
53160
53274
  }
53161
53275
  }
53162
53276