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

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.2
8
+ * @version 1.10.0-beta.3
9
9
  */
10
10
 
11
11
  (function() {
@@ -3954,7 +3954,9 @@ enifed("ember-debug",
3954
3954
  Ember.warn = function(message, test) {
3955
3955
  if (!test) {
3956
3956
  Logger.warn("WARNING: "+message);
3957
- if ('trace' in Logger) Logger.trace();
3957
+ if ('trace' in Logger) {
3958
+ Logger.trace();
3959
+ }
3958
3960
  }
3959
3961
  };
3960
3962
 
@@ -4769,8 +4771,8 @@ enifed("ember-extension-support/data_adapter",
4769
4771
  });
4770
4772
  });
4771
4773
  enifed("ember-htmlbars",
4772
- ["ember-metal/core","ember-template-compiler","ember-htmlbars/hooks/content","ember-htmlbars/hooks/component","ember-htmlbars/hooks/element","ember-htmlbars/hooks/subexpr","ember-htmlbars/hooks/attribute","ember-htmlbars/hooks/concat","ember-htmlbars/hooks/get","ember-htmlbars/hooks/set","morph","ember-htmlbars/system/make-view-helper","ember-htmlbars/system/make_bound_helper","ember-htmlbars/helpers","ember-htmlbars/helpers/binding","ember-htmlbars/helpers/view","ember-htmlbars/helpers/yield","ember-htmlbars/helpers/with","ember-htmlbars/helpers/log","ember-htmlbars/helpers/debugger","ember-htmlbars/helpers/bind-attr","ember-htmlbars/helpers/if_unless","ember-htmlbars/helpers/loc","ember-htmlbars/helpers/partial","ember-htmlbars/helpers/template","ember-htmlbars/helpers/input","ember-htmlbars/helpers/text_area","ember-htmlbars/helpers/collection","ember-htmlbars/helpers/each","ember-htmlbars/helpers/unbound","ember-htmlbars/system/bootstrap","ember-htmlbars/compat","exports"],
4773
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __dependency20__, __dependency21__, __dependency22__, __dependency23__, __dependency24__, __dependency25__, __dependency26__, __dependency27__, __dependency28__, __dependency29__, __dependency30__, __dependency31__, __dependency32__, __exports__) {
4774
+ ["ember-metal/core","ember-template-compiler","ember-htmlbars/hooks/inline","ember-htmlbars/hooks/content","ember-htmlbars/hooks/component","ember-htmlbars/hooks/block","ember-htmlbars/hooks/element","ember-htmlbars/hooks/subexpr","ember-htmlbars/hooks/attribute","ember-htmlbars/hooks/concat","ember-htmlbars/hooks/get","ember-htmlbars/hooks/set","morph","ember-htmlbars/system/make-view-helper","ember-htmlbars/system/make_bound_helper","ember-htmlbars/helpers","ember-htmlbars/helpers/binding","ember-htmlbars/helpers/view","ember-htmlbars/helpers/yield","ember-htmlbars/helpers/with","ember-htmlbars/helpers/log","ember-htmlbars/helpers/debugger","ember-htmlbars/helpers/bind-attr","ember-htmlbars/helpers/if_unless","ember-htmlbars/helpers/loc","ember-htmlbars/helpers/partial","ember-htmlbars/helpers/template","ember-htmlbars/helpers/input","ember-htmlbars/helpers/text_area","ember-htmlbars/helpers/collection","ember-htmlbars/helpers/each","ember-htmlbars/helpers/unbound","ember-htmlbars/system/bootstrap","ember-htmlbars/compat","exports"],
4775
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __dependency20__, __dependency21__, __dependency22__, __dependency23__, __dependency24__, __dependency25__, __dependency26__, __dependency27__, __dependency28__, __dependency29__, __dependency30__, __dependency31__, __dependency32__, __dependency33__, __dependency34__, __exports__) {
4774
4776
  "use strict";
4775
4777
  var Ember = __dependency1__["default"];
4776
4778
 
@@ -4779,41 +4781,43 @@ enifed("ember-htmlbars",
4779
4781
  var template = __dependency2__.template;
4780
4782
  var registerPlugin = __dependency2__.registerPlugin;
4781
4783
 
4782
- var content = __dependency3__["default"];
4783
- var component = __dependency4__["default"];
4784
- var element = __dependency5__["default"];
4785
- var subexpr = __dependency6__["default"];
4786
- var attribute = __dependency7__["default"];
4787
- var concat = __dependency8__["default"];
4788
- var get = __dependency9__["default"];
4789
- var set = __dependency10__["default"];
4790
- var DOMHelper = __dependency11__.DOMHelper;
4791
- var makeViewHelper = __dependency12__["default"];
4792
- var makeBoundHelper = __dependency13__["default"];
4793
-
4794
- var registerHelper = __dependency14__.registerHelper;
4795
- var helper = __dependency14__.helper;
4796
- var helpers = __dependency14__["default"];
4797
- var bindHelper = __dependency15__.bindHelper;
4798
- var viewHelper = __dependency16__.viewHelper;
4799
- var yieldHelper = __dependency17__.yieldHelper;
4800
- var withHelper = __dependency18__.withHelper;
4801
- var logHelper = __dependency19__.logHelper;
4802
- var debuggerHelper = __dependency20__.debuggerHelper;
4803
- var bindAttrHelper = __dependency21__.bindAttrHelper;
4804
- var bindAttrHelperDeprecated = __dependency21__.bindAttrHelperDeprecated;
4805
- var ifHelper = __dependency22__.ifHelper;
4806
- var unlessHelper = __dependency22__.unlessHelper;
4807
- var unboundIfHelper = __dependency22__.unboundIfHelper;
4808
- var boundIfHelper = __dependency22__.boundIfHelper;
4809
- var locHelper = __dependency23__.locHelper;
4810
- var partialHelper = __dependency24__.partialHelper;
4811
- var templateHelper = __dependency25__.templateHelper;
4812
- var inputHelper = __dependency26__.inputHelper;
4813
- var textareaHelper = __dependency27__.textareaHelper;
4814
- var collectionHelper = __dependency28__.collectionHelper;
4815
- var eachHelper = __dependency29__.eachHelper;
4816
- var unboundHelper = __dependency30__.unboundHelper;
4784
+ var inline = __dependency3__["default"];
4785
+ var content = __dependency4__["default"];
4786
+ var component = __dependency5__["default"];
4787
+ var block = __dependency6__["default"];
4788
+ var element = __dependency7__["default"];
4789
+ var subexpr = __dependency8__["default"];
4790
+ var attribute = __dependency9__["default"];
4791
+ var concat = __dependency10__["default"];
4792
+ var get = __dependency11__["default"];
4793
+ var set = __dependency12__["default"];
4794
+ var DOMHelper = __dependency13__.DOMHelper;
4795
+ var makeViewHelper = __dependency14__["default"];
4796
+ var makeBoundHelper = __dependency15__["default"];
4797
+
4798
+ var registerHelper = __dependency16__.registerHelper;
4799
+ var helper = __dependency16__.helper;
4800
+ var helpers = __dependency16__["default"];
4801
+ var bindHelper = __dependency17__.bindHelper;
4802
+ var viewHelper = __dependency18__.viewHelper;
4803
+ var yieldHelper = __dependency19__.yieldHelper;
4804
+ var withHelper = __dependency20__.withHelper;
4805
+ var logHelper = __dependency21__.logHelper;
4806
+ var debuggerHelper = __dependency22__.debuggerHelper;
4807
+ var bindAttrHelper = __dependency23__.bindAttrHelper;
4808
+ var bindAttrHelperDeprecated = __dependency23__.bindAttrHelperDeprecated;
4809
+ var ifHelper = __dependency24__.ifHelper;
4810
+ var unlessHelper = __dependency24__.unlessHelper;
4811
+ var unboundIfHelper = __dependency24__.unboundIfHelper;
4812
+ var boundIfHelper = __dependency24__.boundIfHelper;
4813
+ var locHelper = __dependency25__.locHelper;
4814
+ var partialHelper = __dependency26__.partialHelper;
4815
+ var templateHelper = __dependency27__.templateHelper;
4816
+ var inputHelper = __dependency28__.inputHelper;
4817
+ var textareaHelper = __dependency29__.textareaHelper;
4818
+ var collectionHelper = __dependency30__.collectionHelper;
4819
+ var eachHelper = __dependency31__.eachHelper;
4820
+ var unboundHelper = __dependency32__.unboundHelper;
4817
4821
 
4818
4822
  // importing adds template bootstrapping
4819
4823
  // initializer to enable embedded templates
@@ -4865,7 +4869,9 @@ enifed("ember-htmlbars",
4865
4869
  hooks: {
4866
4870
  get: get,
4867
4871
  set: set,
4872
+ inline: inline,
4868
4873
  content: content,
4874
+ block: block,
4869
4875
  element: element,
4870
4876
  subexpr: subexpr,
4871
4877
  component: component,
@@ -4877,308 +4883,6 @@ enifed("ember-htmlbars",
4877
4883
  };
4878
4884
  __exports__.defaultEnv = defaultEnv;
4879
4885
  });
4880
- enifed("ember-htmlbars/attr_nodes",
4881
- ["ember-htmlbars/attr_nodes/quoted","ember-htmlbars/attr_nodes/unquoted","ember-htmlbars/attr_nodes/unquoted_nonproperty","ember-views/system/sanitize_attribute_value","ember-htmlbars/attr_nodes/sanitized","ember-metal/platform","ember-htmlbars/attr_nodes/utils","exports"],
4882
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __exports__) {
4883
- "use strict";
4884
- /**
4885
- @module ember
4886
- @submodule ember-htmlbars
4887
- */
4888
-
4889
- var QuotedAttrNode = __dependency1__["default"];
4890
- var UnquotedAttrNode = __dependency2__["default"];
4891
- var UnquotedNonpropertyAttrNode = __dependency3__["default"];
4892
- var badAttributes = __dependency4__.badAttributes;
4893
- var SanitizedAttrNode = __dependency5__["default"];
4894
- var o_create = __dependency6__.create;
4895
- var normalizeProperty = __dependency7__.normalizeProperty;
4896
-
4897
- var svgNamespaceURI = 'http://www.w3.org/2000/svg';
4898
-
4899
- var unquotedAttrNodeTypes = o_create(null);
4900
- unquotedAttrNodeTypes['class'] = UnquotedNonpropertyAttrNode;
4901
-
4902
- var quotedAttrNodeTypes = o_create(null);
4903
-
4904
- for (var attrName in badAttributes) {
4905
- unquotedAttrNodeTypes[attrName] = SanitizedAttrNode;
4906
- quotedAttrNodeTypes[attrName] = SanitizedAttrNode;
4907
- }
4908
-
4909
- __exports__["default"] = function attrNodeTypeFor(attrName, element, quoted) {
4910
- var result;
4911
- if (quoted) {
4912
- result = quotedAttrNodeTypes[attrName];
4913
- if (!result) {
4914
- result = QuotedAttrNode;
4915
- quotedAttrNodeTypes[attrName] = result;
4916
- }
4917
- } else {
4918
- result = unquotedAttrNodeTypes[attrName];
4919
- if (!result) {
4920
- if (element.namespaceURI === svgNamespaceURI) {
4921
- result = UnquotedNonpropertyAttrNode;
4922
- } else {
4923
- var normalized = normalizeProperty(element, attrName);
4924
- if (normalized) {
4925
- result = UnquotedAttrNode;
4926
- } else {
4927
- result = UnquotedNonpropertyAttrNode;
4928
- }
4929
- }
4930
- unquotedAttrNodeTypes[attrName] = result;
4931
- }
4932
- }
4933
-
4934
- return result;
4935
- }
4936
- });
4937
- enifed("ember-htmlbars/attr_nodes/legacy_bind",
4938
- ["ember-runtime/system/string","ember-metal/utils","ember-metal/is_none","./simple","ember-metal/platform","exports"],
4939
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
4940
- "use strict";
4941
- /**
4942
- @module ember
4943
- @submodule ember-htmlbars
4944
- */
4945
-
4946
- var fmt = __dependency1__.fmt;
4947
- var typeOf = __dependency2__.typeOf;
4948
- var isNone = __dependency3__["default"];
4949
- var SimpleAttrNode = __dependency4__["default"];
4950
- var o_create = __dependency5__.create;
4951
-
4952
- function LegacyBindAttrNode(element, attrName, attrValue, dom) {
4953
- this.init(element, attrName, attrValue, dom);
4954
- }
4955
-
4956
- LegacyBindAttrNode.prototype = o_create(SimpleAttrNode.prototype);
4957
-
4958
- LegacyBindAttrNode.prototype.super$init = SimpleAttrNode.prototype.init;
4959
-
4960
- LegacyBindAttrNode.prototype.render = function render() {
4961
- var name = this.attrName;
4962
- var value = this.currentValue;
4963
- var type = typeOf(value);
4964
-
4965
- Ember.assert(fmt("Attributes must be numbers, strings or booleans, not %@", [value]),
4966
- value === null || value === undefined || type === 'number' || type === 'string' || type === 'boolean');
4967
-
4968
- // if this changes, also change the logic in ember-handlebars/lib/helpers/binding.js
4969
- if (name !== 'value' && (type === 'string' || (type === 'number' && !isNaN(value)))) {
4970
- this.dom.setAttribute(this.element, name, value);
4971
- } else if (name === 'value' || type === 'boolean') {
4972
- if (isNone(value) || value === false) {
4973
- // `null`, `undefined` or `false` should remove attribute
4974
- this.dom.removeAttribute(this.element, name);
4975
- // In IE8 `prop` couldn't remove attribute when name is `required`.
4976
- if (name === 'required') {
4977
- this.dom.setProperty(this.element, name, null);
4978
- } else {
4979
- this.dom.setProperty(this.element, name, '');
4980
- }
4981
- } else {
4982
- // value should always be properties
4983
- this.dom.setProperty(this.element, name, value);
4984
- }
4985
- } else if (!value) {
4986
- if (this.lastValue !== null) {
4987
- this.dom.removeAttribute(this.element, name);
4988
- }
4989
- }
4990
- };
4991
-
4992
- __exports__["default"] = LegacyBindAttrNode;
4993
- });
4994
- enifed("ember-htmlbars/attr_nodes/quoted",
4995
- ["./simple","ember-metal/platform","exports"],
4996
- function(__dependency1__, __dependency2__, __exports__) {
4997
- "use strict";
4998
- /**
4999
- @module ember
5000
- @submodule ember-htmlbars
5001
- */
5002
-
5003
- var SimpleAttrNode = __dependency1__["default"];
5004
- var o_create = __dependency2__.create;
5005
-
5006
- function QuotedAttrNode(element, attrName, attrValue, dom) {
5007
- this.init(element, attrName, attrValue, dom);
5008
- }
5009
-
5010
- QuotedAttrNode.prototype = o_create(SimpleAttrNode.prototype);
5011
-
5012
- QuotedAttrNode.prototype.render = function render(){
5013
- this.dom.setAttribute(this.element, this.attrName, this.currentValue);
5014
- };
5015
-
5016
- __exports__["default"] = QuotedAttrNode;
5017
- });
5018
- enifed("ember-htmlbars/attr_nodes/sanitized",
5019
- ["./simple","ember-metal/platform","ember-metal/streams/utils","ember-views/system/sanitize_attribute_value","exports"],
5020
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
5021
- "use strict";
5022
- /**
5023
- @module ember
5024
- @submodule ember-htmlbars
5025
- */
5026
-
5027
- var SimpleAttrNode = __dependency1__["default"];
5028
- var o_create = __dependency2__.create;
5029
- var chainStream = __dependency3__.chainStream;
5030
- var read = __dependency3__.read;
5031
- var sanitizeAttributeValue = __dependency4__["default"];
5032
-
5033
- function SanitizedAttrNode(element, attrName, attrValue, dom) {
5034
- var sanitizedValue = chainStream(attrValue, function(){
5035
- var unsafeValue = read(attrValue);
5036
- var safeValue = sanitizeAttributeValue(element, attrName, unsafeValue);
5037
-
5038
- return safeValue;
5039
- });
5040
-
5041
- this.init(element, attrName, sanitizedValue, dom);
5042
- }
5043
-
5044
- SanitizedAttrNode.prototype = o_create(SimpleAttrNode.prototype);
5045
-
5046
- __exports__["default"] = SanitizedAttrNode;
5047
- });
5048
- enifed("ember-htmlbars/attr_nodes/simple",
5049
- ["ember-metal/run_loop","exports"],
5050
- function(__dependency1__, __exports__) {
5051
- "use strict";
5052
- /**
5053
- @module ember
5054
- @submodule ember-htmlbars
5055
- */
5056
-
5057
- var run = __dependency1__["default"];
5058
-
5059
- function SimpleAttrNode() {
5060
- // abstract class
5061
- }
5062
-
5063
- SimpleAttrNode.prototype.init = function init(element, attrName, simpleAttrValue, dom){
5064
- this.element = element;
5065
- this.attrName = attrName;
5066
- this.attrValue = simpleAttrValue;
5067
- this.dom = dom;
5068
- this.isDirty = true;
5069
- this.lastValue = null;
5070
- this.currentValue = null;
5071
-
5072
- if (this.attrValue.isStream) {
5073
- this.attrValue.subscribe(this.markDirty, this);
5074
- this.renderIfDirty();
5075
- } else {
5076
- this.currentValue = simpleAttrValue;
5077
- this.render();
5078
- }
5079
- };
5080
-
5081
- SimpleAttrNode.prototype.markDirty = function markDirty(){
5082
- this.isDirty = true;
5083
- run.schedule('render', this, this.renderIfDirty);
5084
- };
5085
-
5086
- SimpleAttrNode.prototype.renderIfDirty = function renderIfDirty(){
5087
- if (this.isDirty) {
5088
- this.isDirty = false;
5089
- var value = this.attrValue.value();
5090
- if (value !== this.currentValue) {
5091
- this.lastValue = this.currentValue;
5092
- this.currentValue = value;
5093
- this.render();
5094
- }
5095
- }
5096
- };
5097
-
5098
- SimpleAttrNode.prototype.render = function render(){
5099
- this.dom.setProperty(this.element, this.attrName, this.currentValue);
5100
- };
5101
-
5102
- __exports__["default"] = SimpleAttrNode;
5103
- });
5104
- enifed("ember-htmlbars/attr_nodes/unquoted",
5105
- ["./simple","ember-metal/platform","ember-htmlbars/attr_nodes/utils","exports"],
5106
- function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
5107
- "use strict";
5108
- /**
5109
- @module ember
5110
- @submodule ember-htmlbars
5111
- */
5112
-
5113
- var SimpleAttrNode = __dependency1__["default"];
5114
- var o_create = __dependency2__.create;
5115
- var normalizeProperty = __dependency3__.normalizeProperty;
5116
-
5117
- function UnquotedAttrNode(element, attrName, attrValue, dom) {
5118
- var normalizedAttrName = normalizeProperty(element, attrName) || attrName;
5119
- this.init(element, normalizedAttrName, attrValue, dom);
5120
- }
5121
-
5122
- UnquotedAttrNode.prototype = o_create(SimpleAttrNode.prototype);
5123
-
5124
- __exports__["default"] = UnquotedAttrNode;
5125
- });
5126
- enifed("ember-htmlbars/attr_nodes/unquoted_nonproperty",
5127
- ["./simple","ember-metal/platform","exports"],
5128
- function(__dependency1__, __dependency2__, __exports__) {
5129
- "use strict";
5130
- /**
5131
- @module ember
5132
- @submodule ember-htmlbars
5133
- */
5134
-
5135
- var SimpleAttrNode = __dependency1__["default"];
5136
- var o_create = __dependency2__.create;
5137
-
5138
- function UnquotedNonpropertyAttrNode(element, attrName, attrValue, dom) {
5139
- this.init(element, attrName, attrValue, dom);
5140
- }
5141
-
5142
- UnquotedNonpropertyAttrNode.prototype = o_create(SimpleAttrNode.prototype);
5143
-
5144
- UnquotedNonpropertyAttrNode.prototype.render = function render(){
5145
- if (this.currentValue === null) {
5146
- if (this.lastValue !== null) {
5147
- this.dom.removeAttribute(this.element, this.attrName);
5148
- }
5149
- } else {
5150
- this.dom.setAttribute(this.element, this.attrName, this.currentValue);
5151
- }
5152
- };
5153
-
5154
- __exports__["default"] = UnquotedNonpropertyAttrNode;
5155
- });
5156
- enifed("ember-htmlbars/attr_nodes/utils",
5157
- ["ember-metal/platform","ember-metal/keys","exports"],
5158
- function(__dependency1__, __dependency2__, __exports__) {
5159
- "use strict";
5160
- var o_create = __dependency1__.create;
5161
- var keys = __dependency2__["default"];
5162
-
5163
- var propertyCaches = o_create(null);
5164
- __exports__.propertyCaches = propertyCaches;
5165
- function normalizeProperty(element, attrName) {
5166
- var tagName = element.tagName;
5167
- var cache = propertyCaches[tagName];
5168
- if (!cache) {
5169
- cache = o_create(null);
5170
- var properties = keys(element);
5171
- for (var i=0, l=properties.length;i<l;i++) {
5172
- cache[properties[i].toLowerCase()] = properties[i];
5173
- }
5174
- propertyCaches[tagName] = cache;
5175
- }
5176
-
5177
- return cache[attrName.toLowerCase()];
5178
- }
5179
-
5180
- __exports__.normalizeProperty = normalizeProperty;
5181
- });
5182
4886
  enifed("ember-htmlbars/compat",
5183
4887
  ["ember-metal/core","ember-htmlbars/helpers","ember-template-compiler","ember-htmlbars/compat/helper","ember-htmlbars/compat/handlebars-get","ember-htmlbars/compat/make-bound-helper","ember-htmlbars/compat/register-bound-helper","ember-htmlbars/compat/precompile","ember-htmlbars/system/make-view-helper","ember-htmlbars/utils/string","exports"],
5184
4888
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __exports__) {
@@ -5819,8 +5523,8 @@ enifed("ember-htmlbars/helpers",
5819
5523
  __exports__.registerBoundHelper = registerBoundHelper;__exports__["default"] = helpers;
5820
5524
  });
5821
5525
  enifed("ember-htmlbars/helpers/bind-attr",
5822
- ["ember-metal/core","ember-runtime/system/string","ember-htmlbars/attr_nodes/quoted","ember-htmlbars/attr_nodes/legacy_bind","ember-views/system/sanitize_attribute_value","ember-htmlbars/attr_nodes/sanitized","ember-metal/keys","ember-htmlbars/helpers","ember-metal/enumerable_utils","ember-metal/streams/utils","ember-views/streams/class_name_binding","exports"],
5823
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __exports__) {
5526
+ ["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"],
5527
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __exports__) {
5824
5528
  "use strict";
5825
5529
  /**
5826
5530
  @module ember
@@ -5831,16 +5535,14 @@ enifed("ember-htmlbars/helpers/bind-attr",
5831
5535
  // Ember.assert
5832
5536
 
5833
5537
  var fmt = __dependency2__.fmt;
5834
- var QuotedAttrNode = __dependency3__["default"];
5538
+ var AttrNode = __dependency3__["default"];
5835
5539
  var LegacyBindAttrNode = __dependency4__["default"];
5836
- var badAttributes = __dependency5__.badAttributes;
5837
- var SanitizedAttrNode = __dependency6__["default"];
5838
- var keys = __dependency7__["default"];
5839
- var helpers = __dependency8__["default"];
5840
- var map = __dependency9__.map;
5841
- var isStream = __dependency10__.isStream;
5842
- var concat = __dependency10__.concat;
5843
- var streamifyClassNameBinding = __dependency11__.streamifyClassNameBinding;
5540
+ var keys = __dependency5__["default"];
5541
+ var helpers = __dependency6__["default"];
5542
+ var map = __dependency7__.map;
5543
+ var isStream = __dependency8__.isStream;
5544
+ var concat = __dependency8__.concat;
5545
+ var streamifyClassNameBinding = __dependency9__.streamifyClassNameBinding;
5844
5546
 
5845
5547
  /**
5846
5548
  `bind-attr` allows you to create a binding between DOM element attributes and
@@ -5975,20 +5677,23 @@ enifed("ember-htmlbars/helpers/bind-attr",
5975
5677
  // Handle classes differently, as we can bind multiple classes
5976
5678
  var classNameBindings = hash['class'];
5977
5679
  if (classNameBindings !== null && classNameBindings !== undefined) {
5978
- if (isStream(classNameBindings)) {
5979
- new QuotedAttrNode(element, 'class', classNameBindings, env.dom);
5980
- } else {
5981
- var classNameBindingsStream = applyClassNameBindings(classNameBindings, view);
5982
- new QuotedAttrNode(element, 'class', classNameBindingsStream, env.dom);
5680
+ if (!isStream(classNameBindings)) {
5681
+ classNameBindings = applyClassNameBindings(classNameBindings, view);
5983
5682
  }
5984
- delete hash['class'];
5683
+
5684
+ var classView = new AttrNode('class', classNameBindings);
5685
+ classView._morph = env.dom.createAttrMorph(element, 'class');
5686
+ view.appendChild(classView);
5985
5687
  }
5986
5688
 
5987
5689
  var attrKeys = keys(hash);
5988
5690
 
5989
- var attr, path, lazyValue;
5691
+ var attr, path, lazyValue, attrView;
5990
5692
  for (var i=0, l=attrKeys.length;i<l;i++) {
5991
5693
  attr = attrKeys[i];
5694
+ if (attr === 'class') {
5695
+ continue;
5696
+ }
5992
5697
  path = hash[attr];
5993
5698
  if (isStream(path)) {
5994
5699
  lazyValue = path;
@@ -6000,11 +5705,10 @@ enifed("ember-htmlbars/helpers/bind-attr",
6000
5705
  );
6001
5706
  lazyValue = view.getStream(path);
6002
5707
  }
6003
- if (badAttributes[attr]) {
6004
- new SanitizedAttrNode(element, attr, lazyValue, env.dom);
6005
- } else {
6006
- new LegacyBindAttrNode(element, attr, lazyValue, env.dom);
6007
- }
5708
+
5709
+ attrView = new LegacyBindAttrNode(attr, lazyValue);
5710
+ attrView._morph = env.dom.createAttrMorph(element, attr);
5711
+ view.appendChild(attrView);
6008
5712
  }
6009
5713
  }
6010
5714
 
@@ -6150,6 +5854,8 @@ enifed("ember-htmlbars/helpers/binding",
6150
5854
  Ember.deprecate("The block form of bind, {{#bind foo}}{{/bind}}, has been deprecated and will be removed.");
6151
5855
  bind.call(this, property, hash, options, env, false, exists);
6152
5856
  } else {
5857
+ Ember.deprecate("The `{{bind}}` helper has been deprecated and will be removed.");
5858
+
6153
5859
  return property;
6154
5860
  }
6155
5861
  }
@@ -6312,14 +6018,15 @@ enifed("ember-htmlbars/helpers/collection",
6312
6018
 
6313
6019
  Ember.assert("You cannot pass more than one argument to the collection helper", params.length <= 1);
6314
6020
 
6315
- var data = env.data,
6316
- template = options.template,
6317
- inverse = options.inverse,
6318
- view = data.view,
6319
- // This should be deterministic, and should probably come from a
6320
- // parent view and not the controller.
6321
- controller = get(view, 'controller'),
6322
- container = (controller && controller.container ? controller.container : view.container);
6021
+ var data = env.data;
6022
+ var template = options.template;
6023
+ var inverse = options.inverse;
6024
+ var view = data.view;
6025
+
6026
+ // This should be deterministic, and should probably come from a
6027
+ // parent view and not the controller.
6028
+ var controller = get(view, 'controller');
6029
+ var container = (controller && controller.container ? controller.container : view.container);
6323
6030
 
6324
6031
  // If passed a path string, convert that into an object.
6325
6032
  // Otherwise, just default to the standard class.
@@ -6650,7 +6357,7 @@ enifed("ember-htmlbars/helpers/each",
6650
6357
  params.length <= 1
6651
6358
  );
6652
6359
 
6653
- if (options.blockParams) {
6360
+ if (options.template && options.template.blockParams) {
6654
6361
  hash.keyword = true;
6655
6362
  }
6656
6363
 
@@ -8027,7 +7734,7 @@ enifed("ember-htmlbars/helpers/with",
8027
7734
 
8028
7735
  var preserveContext;
8029
7736
 
8030
- if (options.blockParams) {
7737
+ if (options.template.blockParams) {
8031
7738
  preserveContext = true;
8032
7739
  } else {
8033
7740
  Ember.deprecate(
@@ -8161,7 +7868,7 @@ enifed("ember-htmlbars/helpers/yield",
8161
7868
  __exports__.yieldHelper = yieldHelper;
8162
7869
  });
8163
7870
  enifed("ember-htmlbars/hooks/attribute",
8164
- ["ember-htmlbars/attr_nodes","ember-metal/error","ember-metal/streams/utils","ember-views/system/sanitize_attribute_value","exports"],
7871
+ ["ember-views/attr_nodes/attr_node","ember-metal/error","ember-metal/streams/utils","ember-views/system/sanitize_attribute_value","exports"],
8165
7872
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
8166
7873
  "use strict";
8167
7874
  /**
@@ -8169,7 +7876,7 @@ enifed("ember-htmlbars/hooks/attribute",
8169
7876
  @submodule ember-htmlbars
8170
7877
  */
8171
7878
 
8172
- var attrNodeTypeFor = __dependency1__["default"];
7879
+ var AttrNode = __dependency1__["default"];
8173
7880
  var EmberError = __dependency2__["default"];
8174
7881
  var isStream = __dependency3__.isStream;
8175
7882
  var sanitizeAttributeValue = __dependency4__["default"];
@@ -8177,20 +7884,52 @@ enifed("ember-htmlbars/hooks/attribute",
8177
7884
  var boundAttributesEnabled = false;
8178
7885
 
8179
7886
 
8180
- __exports__["default"] = function attribute(element, attrName, quoted, view, attrValue, options, env) {
7887
+ __exports__["default"] = function attribute(env, morph, element, attrName, attrValue) {
8181
7888
  if (boundAttributesEnabled) {
8182
- var AttrNode = attrNodeTypeFor(attrName, element, quoted);
8183
- new AttrNode(element, attrName, attrValue, env.dom);
7889
+ var attrNode = new AttrNode(attrName, attrValue);
7890
+ attrNode._morph = morph;
7891
+ env.data.view.appendChild(attrNode);
8184
7892
  } else {
8185
7893
  if (isStream(attrValue)) {
8186
7894
  throw new EmberError('Bound attributes are not yet supported in Ember.js');
8187
7895
  } else {
8188
7896
  var sanitizedValue = sanitizeAttributeValue(element, attrName, attrValue);
8189
- env.dom.setAttribute(element, attrName, sanitizedValue);
7897
+ env.dom.setProperty(element, attrName, sanitizedValue);
8190
7898
  }
8191
7899
  }
8192
7900
  }
8193
7901
  });
7902
+ enifed("ember-htmlbars/hooks/block",
7903
+ ["ember-views/views/simple_bound_view","ember-metal/streams/utils","ember-htmlbars/system/lookup-helper","exports"],
7904
+ function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
7905
+ "use strict";
7906
+ /**
7907
+ @module ember
7908
+ @submodule ember-htmlbars
7909
+ */
7910
+
7911
+ var appendSimpleBoundView = __dependency1__.appendSimpleBoundView;
7912
+ var isStream = __dependency2__.isStream;
7913
+ var lookupHelper = __dependency3__["default"];
7914
+
7915
+ __exports__["default"] = function block(env, morph, view, path, params, hash, template, inverse) {
7916
+ var helper = lookupHelper(path, view, env);
7917
+
7918
+ var options = {
7919
+ morph: morph,
7920
+ template: template,
7921
+ inverse: inverse,
7922
+ isBlock: true
7923
+ };
7924
+ var result = helper.helperFunction.call(view, params, hash, options, env);
7925
+
7926
+ if (isStream(result)) {
7927
+ appendSimpleBoundView(view, morph, result);
7928
+ } else {
7929
+ morph.setContent(result);
7930
+ }
7931
+ }
7932
+ });
8194
7933
  enifed("ember-htmlbars/hooks/component",
8195
7934
  ["ember-metal/core","ember-htmlbars/system/lookup-helper","exports"],
8196
7935
  function(__dependency1__, __dependency2__, __exports__) {
@@ -8203,13 +7942,12 @@ enifed("ember-htmlbars/hooks/component",
8203
7942
  var Ember = __dependency1__["default"];
8204
7943
  var lookupHelper = __dependency2__["default"];
8205
7944
 
8206
- __exports__["default"] = function component(morph, tagName, view, hash, options, env) {
8207
- var params = [];
7945
+ __exports__["default"] = function component(env, morph, view, tagName, attrs, template) {
8208
7946
  var helper = lookupHelper(tagName, view, env);
8209
7947
 
8210
7948
  Ember.assert('You specified `' + tagName + '` in your template, but a component for `' + tagName + '` could not be found.', !!helper);
8211
7949
 
8212
- return helper.helperFunction.call(view, params, hash, options, env);
7950
+ return helper.helperFunction.call(view, [], attrs, {morph: morph, template: template}, env);
8213
7951
  }
8214
7952
  });
8215
7953
  enifed("ember-htmlbars/hooks/concat",
@@ -8223,12 +7961,12 @@ enifed("ember-htmlbars/hooks/concat",
8223
7961
 
8224
7962
  var streamConcat = __dependency1__.concat;
8225
7963
 
8226
- __exports__["default"] = function concat(params) {
8227
- return streamConcat(params, '');
7964
+ __exports__["default"] = function concat(env, parts) {
7965
+ return streamConcat(parts, '');
8228
7966
  }
8229
7967
  });
8230
7968
  enifed("ember-htmlbars/hooks/content",
8231
- ["ember-htmlbars/hooks/subexpr","ember-views/views/simple_bound_view","ember-metal/streams/utils","exports"],
7969
+ ["ember-views/views/simple_bound_view","ember-metal/streams/utils","ember-htmlbars/system/lookup-helper","exports"],
8232
7970
  function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
8233
7971
  "use strict";
8234
7972
  /**
@@ -8236,17 +7974,28 @@ enifed("ember-htmlbars/hooks/content",
8236
7974
  @submodule ember-htmlbars
8237
7975
  */
8238
7976
 
8239
- var subexpr = __dependency1__["default"];
8240
- var appendSimpleBoundView = __dependency2__.appendSimpleBoundView;
8241
- var isStream = __dependency3__.isStream;
7977
+ var appendSimpleBoundView = __dependency1__.appendSimpleBoundView;
7978
+ var isStream = __dependency2__.isStream;
7979
+ var lookupHelper = __dependency3__["default"];
8242
7980
 
8243
- __exports__["default"] = function content(morph, path, view, params, hash, options, env) {
8244
- var result = subexpr(path, view, params, hash, options, env);
7981
+ __exports__["default"] = function content(env, morph, view, path) {
7982
+ var helper = lookupHelper(path, view, env);
7983
+ var result;
7984
+
7985
+ if (helper) {
7986
+ var options = {
7987
+ morph: morph,
7988
+ isInline: true
7989
+ };
7990
+ result = helper.helperFunction.call(view, [], {}, options, env);
7991
+ } else {
7992
+ result = view.getStream(path);
7993
+ }
8245
7994
 
8246
7995
  if (isStream(result)) {
8247
7996
  appendSimpleBoundView(view, morph, result);
8248
7997
  } else {
8249
- morph.update(result);
7998
+ morph.setContent(result);
8250
7999
  }
8251
8000
  }
8252
8001
  });
@@ -8261,10 +8010,13 @@ enifed("ember-htmlbars/hooks/element",
8261
8010
 
8262
8011
  var lookupHelper = __dependency1__["default"];
8263
8012
 
8264
- __exports__["default"] = function element(domElement, path, view, params, hash, options, env) { //jshint ignore:line
8013
+ __exports__["default"] = function element(env, domElement, view, path, params, hash) { //jshint ignore:line
8265
8014
  var helper = lookupHelper(path, view, env);
8266
8015
 
8267
8016
  if (helper) {
8017
+ var options = {
8018
+ element: domElement
8019
+ };
8268
8020
  return helper.helperFunction.call(view, params, hash, options, env);
8269
8021
  } else {
8270
8022
  return view.getStream(path);
@@ -8280,10 +8032,37 @@ enifed("ember-htmlbars/hooks/get",
8280
8032
  @submodule ember-htmlbars
8281
8033
  */
8282
8034
 
8283
- __exports__["default"] = function get(view, path) {
8035
+ __exports__["default"] = function get(env, view, path) {
8284
8036
  return view.getStream(path);
8285
8037
  }
8286
8038
  });
8039
+ enifed("ember-htmlbars/hooks/inline",
8040
+ ["ember-views/views/simple_bound_view","ember-metal/streams/utils","ember-htmlbars/system/lookup-helper","exports"],
8041
+ function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
8042
+ "use strict";
8043
+ /**
8044
+ @module ember
8045
+ @submodule ember-htmlbars
8046
+ */
8047
+
8048
+ var appendSimpleBoundView = __dependency1__.appendSimpleBoundView;
8049
+ var isStream = __dependency2__.isStream;
8050
+ var lookupHelper = __dependency3__["default"];
8051
+
8052
+ __exports__["default"] = function inline(env, morph, view, path, params, hash) {
8053
+ var helper = lookupHelper(path, view, env);
8054
+
8055
+ Ember.assert("A helper named '"+path+"' could not be found", helper);
8056
+
8057
+ var result = helper.helperFunction.call(view, params, hash, {morph: morph}, env);
8058
+
8059
+ if (isStream(result)) {
8060
+ appendSimpleBoundView(view, morph, result);
8061
+ } else {
8062
+ morph.setContent(result);
8063
+ }
8064
+ }
8065
+ });
8287
8066
  enifed("ember-htmlbars/hooks/set",
8288
8067
  ["ember-metal/core","ember-metal/error","exports"],
8289
8068
  function(__dependency1__, __dependency2__, __exports__) {
@@ -8296,7 +8075,7 @@ enifed("ember-htmlbars/hooks/set",
8296
8075
  var Ember = __dependency1__["default"];
8297
8076
  var EmberError = __dependency2__["default"];
8298
8077
 
8299
- __exports__["default"] = function set(view, name, value) {
8078
+ __exports__["default"] = function set(env, view, name, value) {
8300
8079
 
8301
8080
  view._keywords[name] = value;
8302
8081
  }
@@ -8312,14 +8091,15 @@ enifed("ember-htmlbars/hooks/subexpr",
8312
8091
 
8313
8092
  var lookupHelper = __dependency1__["default"];
8314
8093
 
8315
- __exports__["default"] = function subexpr(path, view, params, hash, options, env) {
8094
+ __exports__["default"] = function subexpr(env, view, path, params, hash) {
8316
8095
  var helper = lookupHelper(path, view, env);
8317
8096
 
8318
- if (helper) {
8319
- return helper.helperFunction.call(view, params, hash, options, env);
8320
- } else {
8321
- return view.getStream(path);
8322
- }
8097
+ Ember.assert("A helper named '"+path+"' could not be found", helper);
8098
+
8099
+ var options = {
8100
+ isInline: true
8101
+ };
8102
+ return helper.helperFunction.call(view, params, hash, options, env);
8323
8103
  }
8324
8104
  });
8325
8105
  enifed("ember-htmlbars/system/bootstrap",
@@ -8670,7 +8450,9 @@ enifed("ember-htmlbars/templates/component",
8670
8450
  var t = (function() {
8671
8451
  return {
8672
8452
  isHTMLBars: true,
8453
+ blockParams: 0,
8673
8454
  cachedFragment: null,
8455
+ hasRendered: false,
8674
8456
  build: function build(dom) {
8675
8457
  var el0 = dom.createDocumentFragment();
8676
8458
  var el1 = dom.createTextNode("");
@@ -8683,13 +8465,21 @@ enifed("ember-htmlbars/templates/component",
8683
8465
  var dom = env.dom;
8684
8466
  var hooks = env.hooks, content = hooks.content;
8685
8467
  dom.detectNamespace(contextualElement);
8468
+ var fragment;
8686
8469
  if (this.cachedFragment === null) {
8687
- this.cachedFragment = this.build(dom);
8470
+ fragment = this.build(dom);
8471
+ if (this.hasRendered) {
8472
+ this.cachedFragment = fragment;
8473
+ } else {
8474
+ this.hasRendered = true;
8475
+ }
8476
+ }
8477
+ if (this.cachedFragment) {
8478
+ fragment = dom.cloneNode(this.cachedFragment, true);
8688
8479
  }
8689
- var fragment = dom.cloneNode(this.cachedFragment, true);
8690
8480
  dom.repairClonedNode(fragment,[0,1]);
8691
8481
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8692
- content(morph0, "yield", context, [], {}, {morph: morph0}, env);
8482
+ content(env, morph0, context, "yield");
8693
8483
  return fragment;
8694
8484
  }
8695
8485
  };
@@ -8705,22 +8495,32 @@ enifed("ember-htmlbars/templates/select",
8705
8495
  var child0 = (function() {
8706
8496
  return {
8707
8497
  isHTMLBars: true,
8498
+ blockParams: 0,
8708
8499
  cachedFragment: null,
8500
+ hasRendered: false,
8709
8501
  build: function build(dom) {
8710
8502
  var el0 = dom.createElement("option");
8711
- dom.setAttribute(el0,"value","");
8503
+ dom.setProperty(el0,"value","");
8712
8504
  return el0;
8713
8505
  },
8714
8506
  render: function render(context, env, contextualElement) {
8715
8507
  var dom = env.dom;
8716
8508
  var hooks = env.hooks, content = hooks.content;
8717
8509
  dom.detectNamespace(contextualElement);
8510
+ var fragment;
8718
8511
  if (this.cachedFragment === null) {
8719
- this.cachedFragment = this.build(dom);
8512
+ fragment = this.build(dom);
8513
+ if (this.hasRendered) {
8514
+ this.cachedFragment = fragment;
8515
+ } else {
8516
+ this.hasRendered = true;
8517
+ }
8518
+ }
8519
+ if (this.cachedFragment) {
8520
+ fragment = dom.cloneNode(this.cachedFragment, true);
8720
8521
  }
8721
- var fragment = dom.cloneNode(this.cachedFragment, true);
8722
8522
  var morph0 = dom.createMorphAt(fragment,-1,-1);
8723
- content(morph0, "view.prompt", context, [], {}, {morph: morph0}, env);
8523
+ content(env, morph0, context, "view.prompt");
8724
8524
  return fragment;
8725
8525
  }
8726
8526
  };
@@ -8729,7 +8529,9 @@ enifed("ember-htmlbars/templates/select",
8729
8529
  var child0 = (function() {
8730
8530
  return {
8731
8531
  isHTMLBars: true,
8532
+ blockParams: 0,
8732
8533
  cachedFragment: null,
8534
+ hasRendered: false,
8733
8535
  build: function build(dom) {
8734
8536
  var el0 = dom.createDocumentFragment();
8735
8537
  var el1 = dom.createTextNode("");
@@ -8740,22 +8542,32 @@ enifed("ember-htmlbars/templates/select",
8740
8542
  },
8741
8543
  render: function render(context, env, contextualElement) {
8742
8544
  var dom = env.dom;
8743
- var hooks = env.hooks, get = hooks.get, content = hooks.content;
8545
+ var hooks = env.hooks, get = hooks.get, inline = hooks.inline;
8744
8546
  dom.detectNamespace(contextualElement);
8547
+ var fragment;
8745
8548
  if (this.cachedFragment === null) {
8746
- this.cachedFragment = this.build(dom);
8549
+ fragment = this.build(dom);
8550
+ if (this.hasRendered) {
8551
+ this.cachedFragment = fragment;
8552
+ } else {
8553
+ this.hasRendered = true;
8554
+ }
8555
+ }
8556
+ if (this.cachedFragment) {
8557
+ fragment = dom.cloneNode(this.cachedFragment, true);
8747
8558
  }
8748
- var fragment = dom.cloneNode(this.cachedFragment, true);
8749
8559
  dom.repairClonedNode(fragment,[0,1]);
8750
8560
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8751
- content(morph0, "view", context, [get(context, "view.groupView", env)], {"content": get(context, "group.content", env), "label": get(context, "group.label", env)}, {morph: morph0}, env);
8561
+ inline(env, morph0, context, "view", [get(env, context, "view.groupView")], {"content": get(env, context, "group.content"), "label": get(env, context, "group.label")});
8752
8562
  return fragment;
8753
8563
  }
8754
8564
  };
8755
8565
  }());
8756
8566
  return {
8757
8567
  isHTMLBars: true,
8568
+ blockParams: 0,
8758
8569
  cachedFragment: null,
8570
+ hasRendered: false,
8759
8571
  build: function build(dom) {
8760
8572
  var el0 = dom.createDocumentFragment();
8761
8573
  var el1 = dom.createTextNode("");
@@ -8766,15 +8578,23 @@ enifed("ember-htmlbars/templates/select",
8766
8578
  },
8767
8579
  render: function render(context, env, contextualElement) {
8768
8580
  var dom = env.dom;
8769
- var hooks = env.hooks, get = hooks.get, content = hooks.content;
8581
+ var hooks = env.hooks, get = hooks.get, block = hooks.block;
8770
8582
  dom.detectNamespace(contextualElement);
8583
+ var fragment;
8771
8584
  if (this.cachedFragment === null) {
8772
- this.cachedFragment = this.build(dom);
8585
+ fragment = this.build(dom);
8586
+ if (this.hasRendered) {
8587
+ this.cachedFragment = fragment;
8588
+ } else {
8589
+ this.hasRendered = true;
8590
+ }
8591
+ }
8592
+ if (this.cachedFragment) {
8593
+ fragment = dom.cloneNode(this.cachedFragment, true);
8773
8594
  }
8774
- var fragment = dom.cloneNode(this.cachedFragment, true);
8775
8595
  dom.repairClonedNode(fragment,[0,1]);
8776
8596
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8777
- content(morph0, "each", context, [get(context, "view.groupedContent", env)], {"keyword": "group"}, {morph: morph0, template: child0}, env);
8597
+ block(env, morph0, context, "each", [get(env, context, "view.groupedContent")], {"keyword": "group"}, child0, null);
8778
8598
  return fragment;
8779
8599
  }
8780
8600
  };
@@ -8783,7 +8603,9 @@ enifed("ember-htmlbars/templates/select",
8783
8603
  var child0 = (function() {
8784
8604
  return {
8785
8605
  isHTMLBars: true,
8606
+ blockParams: 0,
8786
8607
  cachedFragment: null,
8608
+ hasRendered: false,
8787
8609
  build: function build(dom) {
8788
8610
  var el0 = dom.createDocumentFragment();
8789
8611
  var el1 = dom.createTextNode("");
@@ -8794,22 +8616,32 @@ enifed("ember-htmlbars/templates/select",
8794
8616
  },
8795
8617
  render: function render(context, env, contextualElement) {
8796
8618
  var dom = env.dom;
8797
- var hooks = env.hooks, get = hooks.get, content = hooks.content;
8619
+ var hooks = env.hooks, get = hooks.get, inline = hooks.inline;
8798
8620
  dom.detectNamespace(contextualElement);
8621
+ var fragment;
8799
8622
  if (this.cachedFragment === null) {
8800
- this.cachedFragment = this.build(dom);
8623
+ fragment = this.build(dom);
8624
+ if (this.hasRendered) {
8625
+ this.cachedFragment = fragment;
8626
+ } else {
8627
+ this.hasRendered = true;
8628
+ }
8629
+ }
8630
+ if (this.cachedFragment) {
8631
+ fragment = dom.cloneNode(this.cachedFragment, true);
8801
8632
  }
8802
- var fragment = dom.cloneNode(this.cachedFragment, true);
8803
8633
  dom.repairClonedNode(fragment,[0,1]);
8804
8634
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8805
- content(morph0, "view", context, [get(context, "view.optionView", env)], {"content": get(context, "item", env)}, {morph: morph0}, env);
8635
+ inline(env, morph0, context, "view", [get(env, context, "view.optionView")], {"content": get(env, context, "item")});
8806
8636
  return fragment;
8807
8637
  }
8808
8638
  };
8809
8639
  }());
8810
8640
  return {
8811
8641
  isHTMLBars: true,
8642
+ blockParams: 0,
8812
8643
  cachedFragment: null,
8644
+ hasRendered: false,
8813
8645
  build: function build(dom) {
8814
8646
  var el0 = dom.createDocumentFragment();
8815
8647
  var el1 = dom.createTextNode("");
@@ -8820,22 +8652,32 @@ enifed("ember-htmlbars/templates/select",
8820
8652
  },
8821
8653
  render: function render(context, env, contextualElement) {
8822
8654
  var dom = env.dom;
8823
- var hooks = env.hooks, get = hooks.get, content = hooks.content;
8655
+ var hooks = env.hooks, get = hooks.get, block = hooks.block;
8824
8656
  dom.detectNamespace(contextualElement);
8657
+ var fragment;
8825
8658
  if (this.cachedFragment === null) {
8826
- this.cachedFragment = this.build(dom);
8659
+ fragment = this.build(dom);
8660
+ if (this.hasRendered) {
8661
+ this.cachedFragment = fragment;
8662
+ } else {
8663
+ this.hasRendered = true;
8664
+ }
8665
+ }
8666
+ if (this.cachedFragment) {
8667
+ fragment = dom.cloneNode(this.cachedFragment, true);
8827
8668
  }
8828
- var fragment = dom.cloneNode(this.cachedFragment, true);
8829
8669
  dom.repairClonedNode(fragment,[0,1]);
8830
8670
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8831
- content(morph0, "each", context, [get(context, "view.content", env)], {"keyword": "item"}, {morph: morph0, template: child0}, env);
8671
+ block(env, morph0, context, "each", [get(env, context, "view.content")], {"keyword": "item"}, child0, null);
8832
8672
  return fragment;
8833
8673
  }
8834
8674
  };
8835
8675
  }());
8836
8676
  return {
8837
8677
  isHTMLBars: true,
8678
+ blockParams: 0,
8838
8679
  cachedFragment: null,
8680
+ hasRendered: false,
8839
8681
  build: function build(dom) {
8840
8682
  var el0 = dom.createDocumentFragment();
8841
8683
  var el1 = dom.createTextNode("");
@@ -8848,17 +8690,25 @@ enifed("ember-htmlbars/templates/select",
8848
8690
  },
8849
8691
  render: function render(context, env, contextualElement) {
8850
8692
  var dom = env.dom;
8851
- var hooks = env.hooks, get = hooks.get, content = hooks.content;
8693
+ var hooks = env.hooks, get = hooks.get, block = hooks.block;
8852
8694
  dom.detectNamespace(contextualElement);
8695
+ var fragment;
8853
8696
  if (this.cachedFragment === null) {
8854
- this.cachedFragment = this.build(dom);
8697
+ fragment = this.build(dom);
8698
+ if (this.hasRendered) {
8699
+ this.cachedFragment = fragment;
8700
+ } else {
8701
+ this.hasRendered = true;
8702
+ }
8703
+ }
8704
+ if (this.cachedFragment) {
8705
+ fragment = dom.cloneNode(this.cachedFragment, true);
8855
8706
  }
8856
- var fragment = dom.cloneNode(this.cachedFragment, true);
8857
8707
  dom.repairClonedNode(fragment,[0,1]);
8858
8708
  var morph0 = dom.createMorphAt(fragment,0,1,contextualElement);
8859
8709
  var morph1 = dom.createMorphAt(fragment,1,2,contextualElement);
8860
- content(morph0, "if", context, [get(context, "view.prompt", env)], {}, {morph: morph0, template: child0}, env);
8861
- content(morph1, "if", context, [get(context, "view.optionGroupPath", env)], {}, {morph: morph1, template: child1, inverse: child2}, env);
8710
+ block(env, morph0, context, "if", [get(env, context, "view.prompt")], {}, child0, null);
8711
+ block(env, morph1, context, "if", [get(env, context, "view.optionGroupPath")], {}, child1, child2);
8862
8712
  return fragment;
8863
8713
  }
8864
8714
  };
@@ -9003,7 +8853,6 @@ enifed("ember-metal-views/renderer",
9003
8853
  // was previously called on a view.
9004
8854
  contextualElement = document.body;
9005
8855
  }
9006
- Ember.assert("Required contextualElement for view "+_view+" is missing", contextualElement);
9007
8856
  element = this.createElement(view, contextualElement);
9008
8857
 
9009
8858
  parents[level++] = parentIndex;
@@ -9172,7 +9021,7 @@ enifed("ember-metal-views/renderer",
9172
9021
  }
9173
9022
 
9174
9023
  if (view._morph) {
9175
- view._morph.update(element);
9024
+ view._morph.setContent(element);
9176
9025
  } else if (parentView) {
9177
9026
  if (index === -1) {
9178
9027
  view._morph = parentView._childViewsMorph.append(element);
@@ -12076,7 +11925,7 @@ enifed("ember-metal/core",
12076
11925
 
12077
11926
  @class Ember
12078
11927
  @static
12079
- @version 1.10.0-beta.2
11928
+ @version 1.10.0-beta.3
12080
11929
  */
12081
11930
 
12082
11931
  if ('undefined' === typeof Ember) {
@@ -12103,10 +11952,10 @@ enifed("ember-metal/core",
12103
11952
  /**
12104
11953
  @property VERSION
12105
11954
  @type String
12106
- @default '1.10.0-beta.2'
11955
+ @default '1.10.0-beta.3'
12107
11956
  @static
12108
11957
  */
12109
- Ember.VERSION = '1.10.0-beta.2';
11958
+ Ember.VERSION = '1.10.0-beta.3';
12110
11959
 
12111
11960
  /**
12112
11961
  Standard environmental variables. You can define these in a global `EmberENV`
@@ -18821,9 +18670,11 @@ enifed("ember-metal/watch_key",
18821
18670
  var handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) {
18822
18671
  var descriptor = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, keyName);
18823
18672
  var configurable = descriptor ? descriptor.configurable : true;
18673
+ var isWritable = descriptor ? descriptor.writable : true;
18674
+ var hasValue = descriptor ? 'value' in descriptor : true;
18824
18675
 
18825
18676
  // this x in Y deopts, so keeping it in this function is better;
18826
- if (configurable && keyName in obj) {
18677
+ if (configurable && isWritable && hasValue && keyName in obj) {
18827
18678
  m.values[keyName] = obj[keyName];
18828
18679
  o_defineProperty(obj, keyName, {
18829
18680
  configurable: true,
@@ -21125,7 +20976,8 @@ enifed("ember-routing/ext/controller",
21125
20976
  var ALL_PERIODS_REGEX = /\./g;
21126
20977
 
21127
20978
  function accumulateQueryParamDescriptors(_desc, accum) {
21128
- var desc = _desc, tmp;
20979
+ var desc = _desc;
20980
+ var tmp;
21129
20981
  if (typeOf(desc) === 'string') {
21130
20982
  tmp = {};
21131
20983
  tmp[desc] = { as: null };
@@ -23682,7 +23534,7 @@ enifed("ember-routing/system/route",
23682
23534
 
23683
23535
  ```javascript
23684
23536
  App.Router.map(function() {
23685
- this.route("index");
23537
+ this.route('index');
23686
23538
  });
23687
23539
 
23688
23540
  App.ApplicationRoute = Ember.Route.extend({
@@ -24624,7 +24476,8 @@ enifed("ember-routing/system/route",
24624
24476
  function handlerInfoFor(route, handlerInfos, _offset) {
24625
24477
  if (!handlerInfos) { return; }
24626
24478
 
24627
- var offset = _offset || 0, current;
24479
+ var offset = _offset || 0;
24480
+ var current;
24628
24481
  for (var i=0, l=handlerInfos.length; i<l; i++) {
24629
24482
  current = handlerInfos[i].handler;
24630
24483
  if (current === route) { return handlerInfos[i+offset]; }
@@ -24632,7 +24485,8 @@ enifed("ember-routing/system/route",
24632
24485
  }
24633
24486
 
24634
24487
  function parentTemplate(route) {
24635
- var parent = parentRoute(route), template;
24488
+ var parent = parentRoute(route);
24489
+ var template;
24636
24490
 
24637
24491
  if (!parent) { return; }
24638
24492
 
@@ -24941,7 +24795,8 @@ enifed("ember-routing/system/router",
24941
24795
  },
24942
24796
 
24943
24797
  transitionTo: function() {
24944
- var args = slice.call(arguments), queryParams;
24798
+ var args = slice.call(arguments);
24799
+ var queryParams;
24945
24800
  if (resemblesURL(args[0])) {
24946
24801
  return this._doURLTransition('transitionTo', args[0]);
24947
24802
  }
@@ -27291,14 +27146,15 @@ enifed("ember-runtime/computed/reduce_computed_macros",
27291
27146
  The callback method you provide should have the following signature.
27292
27147
  `item` is the current item in the iteration.
27293
27148
  `index` is the integer index of the current item in the iteration.
27149
+ `array` is the dependant array itself.
27294
27150
 
27295
27151
  ```javascript
27296
- function(item, index);
27152
+ function(item, index, array);
27297
27153
  ```
27298
27154
 
27299
27155
  ```javascript
27300
27156
  var Hamster = Ember.Object.extend({
27301
- remainingChores: Ember.computed.filter('chores', function(chore, index) {
27157
+ remainingChores: Ember.computed.filter('chores', function(chore, index, array) {
27302
27158
  return !chore.done;
27303
27159
  })
27304
27160
  });
@@ -27327,7 +27183,7 @@ enifed("ember-runtime/computed/reduce_computed_macros",
27327
27183
  },
27328
27184
 
27329
27185
  addedItem: function (array, item, changeMeta, instanceMeta) {
27330
- var match = !!callback.call(this, item, changeMeta.index);
27186
+ var match = !!callback.call(this, item, changeMeta.index, changeMeta.arrayChanged);
27331
27187
  var filterIndex = instanceMeta.filteredArrayIndexes.addItem(changeMeta.index, match);
27332
27188
 
27333
27189
  if (match) {
@@ -38261,6 +38117,109 @@ enifed("ember-views",
38261
38117
 
38262
38118
  __exports__["default"] = Ember;
38263
38119
  });
38120
+ enifed("ember-views/attr_nodes/attr_node",
38121
+ ["ember-metal/streams/utils","ember-metal/run_loop","exports"],
38122
+ function(__dependency1__, __dependency2__, __exports__) {
38123
+ "use strict";
38124
+ /**
38125
+ @module ember
38126
+ @submodule ember-htmlbars
38127
+ */
38128
+
38129
+ var read = __dependency1__.read;
38130
+ var subscribe = __dependency1__.subscribe;
38131
+ var unsubscribe = __dependency1__.unsubscribe;
38132
+ var run = __dependency2__["default"];
38133
+
38134
+ function AttrNode(attrName, attrValue) {
38135
+ this.init(attrName, attrValue);
38136
+ }
38137
+
38138
+ AttrNode.prototype.init = function init(attrName, simpleAttrValue){
38139
+ this.isView = true;
38140
+
38141
+ // That these semantics are used is very unfortunate.
38142
+ this.tagName = '';
38143
+ this.classNameBindings = [];
38144
+
38145
+ this.attrName = attrName;
38146
+ this.attrValue = simpleAttrValue;
38147
+ this.isDirty = true;
38148
+ this.lastValue = null;
38149
+
38150
+ subscribe(this.attrValue, this.rerender, this);
38151
+ };
38152
+
38153
+ AttrNode.prototype.renderIfDirty = function renderIfDirty(){
38154
+ if (this.isDirty) {
38155
+ var value = read(this.attrValue);
38156
+ if (value !== this.lastValue) {
38157
+ this._renderer.renderTree(this, this._parentView);
38158
+ } else {
38159
+ this.isDirty = false;
38160
+ }
38161
+ }
38162
+ };
38163
+
38164
+ AttrNode.prototype.render = function render(buffer) {
38165
+ this.isDirty = false;
38166
+ var value = read(this.attrValue);
38167
+
38168
+ this._morph.setContent(value);
38169
+
38170
+ this.lastValue = value;
38171
+ };
38172
+
38173
+ AttrNode.prototype.rerender = function render() {
38174
+ this.isDirty = true;
38175
+ run.schedule('render', this, this.renderIfDirty);
38176
+ };
38177
+
38178
+ AttrNode.prototype.destroy = function render() {
38179
+ this.isDirty = false;
38180
+ unsubscribe(this.attrValue, this.rerender, this);
38181
+
38182
+ var parent = this._parentView;
38183
+ if (parent) { parent.removeChild(this); }
38184
+ };
38185
+
38186
+ __exports__["default"] = AttrNode;
38187
+ });
38188
+ enifed("ember-views/attr_nodes/legacy_bind",
38189
+ ["./attr_node","ember-runtime/system/string","ember-metal/utils","ember-metal/streams/utils","exports"],
38190
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
38191
+ "use strict";
38192
+ /**
38193
+ @module ember
38194
+ @submodule ember-htmlbars
38195
+ */
38196
+
38197
+ var AttrNode = __dependency1__["default"];
38198
+ var fmt = __dependency2__.fmt;
38199
+ var typeOf = __dependency3__.typeOf;
38200
+ var read = __dependency4__.read;
38201
+
38202
+ function LegacyBindAttrNode(attrName, attrValue) {
38203
+ this.init(attrName, attrValue);
38204
+ }
38205
+
38206
+ LegacyBindAttrNode.prototype = AttrNode.prototype;
38207
+
38208
+ LegacyBindAttrNode.prototype.render = function render(buffer) {
38209
+ this.isDirty = false;
38210
+ var value = read(this.attrValue);
38211
+ var type = typeOf(value);
38212
+
38213
+ Ember.assert(fmt("Attributes must be numbers, strings or booleans, not %@", [value]),
38214
+ value === null || value === undefined || type === 'number' || type === 'string' || type === 'boolean');
38215
+
38216
+ this._morph.setContent(value);
38217
+
38218
+ this.lastValue = value;
38219
+ };
38220
+
38221
+ __exports__["default"] = LegacyBindAttrNode;
38222
+ });
38264
38223
  enifed("ember-views/component_lookup",
38265
38224
  ["ember-runtime/system/object","exports"],
38266
38225
  function(__dependency1__, __exports__) {
@@ -40013,7 +39972,7 @@ enifed("ember-views/system/render_buffer",
40013
39972
 
40014
39973
  if (props) {
40015
39974
  for (prop in props) {
40016
- this.dom.setProperty(element, prop, props[prop]);
39975
+ this.dom.setPropertyStrict(element, prop, props[prop]);
40017
39976
  }
40018
39977
 
40019
39978
  this.elementProperties = null;
@@ -42895,7 +42854,7 @@ enifed("ember-views/views/simple_bound_view",
42895
42854
  // doesn't diff SafeString instances
42896
42855
  if (value !== this._lastNormalizedValue) {
42897
42856
  this._lastNormalizedValue = value;
42898
- this._morph.update(value);
42857
+ this._morph.setContent(value);
42899
42858
  }
42900
42859
  },
42901
42860
 
@@ -45800,6 +45759,11 @@ enifed("htmlbars-compiler/fragment-javascript-compiler",
45800
45759
  var processOpcodes = __dependency1__.processOpcodes;
45801
45760
  var string = __dependency2__.string;
45802
45761
 
45762
+ var svgNamespace = "http://www.w3.org/2000/svg",
45763
+ // http://www.w3.org/html/wg/drafts/html/master/syntax.html#html-integration-point
45764
+ svgHTMLIntegrationPoints = {'foreignObject':true, 'desc':true, 'title':true};
45765
+
45766
+
45803
45767
  function FragmentJavaScriptCompiler() {
45804
45768
  this.source = [];
45805
45769
  this.depth = -1;
@@ -45811,6 +45775,8 @@ enifed("htmlbars-compiler/fragment-javascript-compiler",
45811
45775
  this.source.length = 0;
45812
45776
  this.depth = -1;
45813
45777
  this.indent = (options && options.indent) || "";
45778
+ this.namespaceFrameStack = [{namespace: null, depth: null}];
45779
+ this.domNamespace = null;
45814
45780
 
45815
45781
  this.source.push('function build(dom) {\n');
45816
45782
  processOpcodes(this, opcodes);
@@ -45826,7 +45792,14 @@ enifed("htmlbars-compiler/fragment-javascript-compiler",
45826
45792
 
45827
45793
  FragmentJavaScriptCompiler.prototype.createElement = function(tagName) {
45828
45794
  var el = 'el'+(++this.depth);
45795
+ if (tagName === 'svg') {
45796
+ this.pushNamespaceFrame({namespace: svgNamespace, depth: this.depth});
45797
+ }
45798
+ this.ensureNamespace();
45829
45799
  this.source.push(this.indent+' var '+el+' = dom.createElement('+string(tagName)+');\n');
45800
+ if (svgHTMLIntegrationPoints[tagName]) {
45801
+ this.pushNamespaceFrame({namespace: null, depth: this.depth});
45802
+ }
45830
45803
  };
45831
45804
 
45832
45805
  FragmentJavaScriptCompiler.prototype.createText = function(str) {
@@ -45846,17 +45819,36 @@ enifed("htmlbars-compiler/fragment-javascript-compiler",
45846
45819
 
45847
45820
  FragmentJavaScriptCompiler.prototype.setAttribute = function(name, value) {
45848
45821
  var el = 'el'+this.depth;
45849
- this.source.push(this.indent+' dom.setAttribute('+el+','+string(name)+','+string(value)+');\n');
45822
+ this.source.push(this.indent+' dom.setProperty('+el+','+string(name)+','+string(value)+');\n');
45850
45823
  };
45851
45824
 
45852
45825
  FragmentJavaScriptCompiler.prototype.appendChild = function() {
45826
+ if (this.depth === this.getCurrentNamespaceFrame().depth) {
45827
+ this.popNamespaceFrame();
45828
+ }
45853
45829
  var child = 'el'+(this.depth--);
45854
45830
  var el = 'el'+this.depth;
45855
45831
  this.source.push(this.indent+' dom.appendChild('+el+', '+child+');\n');
45856
45832
  };
45857
45833
 
45858
- FragmentJavaScriptCompiler.prototype.setNamespace = function(namespace) {
45859
- this.source.push(this.indent+' dom.setNamespace('+(namespace ? string(namespace) : 'null')+');\n');
45834
+ FragmentJavaScriptCompiler.prototype.getCurrentNamespaceFrame = function() {
45835
+ return this.namespaceFrameStack[this.namespaceFrameStack.length-1];
45836
+ };
45837
+
45838
+ FragmentJavaScriptCompiler.prototype.pushNamespaceFrame = function(frame) {
45839
+ this.namespaceFrameStack.push(frame);
45840
+ };
45841
+
45842
+ FragmentJavaScriptCompiler.prototype.popNamespaceFrame = function() {
45843
+ return this.namespaceFrameStack.pop();
45844
+ };
45845
+
45846
+ FragmentJavaScriptCompiler.prototype.ensureNamespace = function() {
45847
+ var correctNamespace = this.getCurrentNamespaceFrame().namespace;
45848
+ if (this.domNamespace !== correctNamespace) {
45849
+ this.source.push(this.indent+' dom.setNamespace('+(correctNamespace ? string(correctNamespace) : 'null')+');\n');
45850
+ this.domNamespace = correctNamespace;
45851
+ }
45860
45852
  };
45861
45853
  });
45862
45854
  enifed("htmlbars-compiler/fragment-opcode-compiler",
@@ -45938,14 +45930,13 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
45938
45930
  "use strict";
45939
45931
  var processOpcodes = __dependency1__.processOpcodes;
45940
45932
  var string = __dependency2__.string;
45941
- var quoteHash = __dependency2__.hash;
45942
45933
  var array = __dependency2__.array;
45943
45934
 
45944
45935
  function HydrationJavaScriptCompiler() {
45945
45936
  this.stack = [];
45946
45937
  this.source = [];
45947
45938
  this.mustaches = [];
45948
- this.parents = ['fragment'];
45939
+ this.parents = [['fragment']];
45949
45940
  this.parentCount = 0;
45950
45941
  this.morphs = [];
45951
45942
  this.fragmentProcessing = [];
@@ -45961,7 +45952,7 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
45961
45952
  this.mustaches.length = 0;
45962
45953
  this.source.length = 0;
45963
45954
  this.parents.length = 1;
45964
- this.parents[0] = 'fragment';
45955
+ this.parents[0] = ['fragment'];
45965
45956
  this.morphs.length = 0;
45966
45957
  this.fragmentProcessing.length = 0;
45967
45958
  this.parentCount = 0;
@@ -46023,124 +46014,113 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
46023
46014
  }
46024
46015
  };
46025
46016
 
46017
+ prototype.pushHook = function(name, args) {
46018
+ this.hooks[name] = true;
46019
+ this.stack.push(name + '(' + args.join(', ') + ')');
46020
+ };
46021
+
46026
46022
  prototype.pushGetHook = function(path) {
46027
- this.hooks.get = true;
46028
- this.stack.push('get(context, ' + string(path) + ', env)');
46023
+ this.pushHook('get', [
46024
+ 'env',
46025
+ 'context',
46026
+ string(path)
46027
+ ]);
46029
46028
  };
46030
46029
 
46031
46030
  prototype.pushSexprHook = function() {
46032
- this.hooks.subexpr = true;
46033
- var path = this.stack.pop();
46034
- var params = this.stack.pop();
46035
- var hash = this.stack.pop();
46036
- this.stack.push('subexpr(' + path + ', context, ' + params + ', ' + hash + ', {}, env)');
46031
+ this.pushHook('subexpr', [
46032
+ 'env',
46033
+ 'context',
46034
+ this.stack.pop(), // path
46035
+ this.stack.pop(), // params
46036
+ this.stack.pop() // hash
46037
+ ]);
46037
46038
  };
46038
46039
 
46039
46040
  prototype.pushConcatHook = function() {
46040
- this.hooks.concat = true;
46041
- var parts = this.stack.pop();
46042
- this.stack.push('concat(' + parts + ', env)');
46043
- };
46044
-
46045
- prototype.printSetHook = function(name, index) {
46046
- this.hooks.set = true;
46047
- this.source.push(this.indent + ' set(context, ' + string(name) +', blockArguments[' + index + ']);\n');
46048
- };
46049
-
46050
- prototype.printContentHookForBlockHelper = function(morphNum, templateId, inverseId, blockParamsLength) {
46051
- var path = this.stack.pop();
46052
- var params = this.stack.pop();
46053
- var hash = this.stack.pop();
46054
-
46055
- var options = [];
46056
-
46057
- options.push('morph: morph' + morphNum);
46058
-
46059
- if (templateId !== null) {
46060
- options.push('template: child' + templateId);
46061
- }
46062
-
46063
- if (inverseId !== null) {
46064
- options.push('inverse: child' + inverseId);
46065
- }
46066
-
46067
- if (blockParamsLength) {
46068
- options.push('blockParams: ' + blockParamsLength);
46069
- }
46070
-
46071
- this.printContentHook(morphNum, path, params, hash, options);
46072
- };
46073
-
46074
- prototype.printContentHookForInlineHelper = function(morphNum) {
46075
- var path = this.stack.pop();
46076
- var params = this.stack.pop();
46077
- var hash = this.stack.pop();
46078
-
46079
- var options = [];
46080
- options.push('morph: morph' + morphNum);
46081
-
46082
- this.printContentHook(morphNum, path, params, hash, options);
46083
- };
46084
-
46085
- prototype.printContentHookForAmbiguous = function(morphNum) {
46086
- var path = this.stack.pop();
46087
-
46088
- var options = [];
46089
- options.push('morph: morph' + morphNum);
46090
-
46091
- this.printContentHook(morphNum, path, '[]', '{}', options);
46092
- };
46093
-
46094
- prototype.printContentHook = function(morphNum, path, params, hash, pairs) {
46095
- this.hooks.content = true;
46096
-
46097
- var args = ['morph' + morphNum, path, 'context', params, hash, quoteHash(pairs), 'env'];
46098
- this.source.push(this.indent+' content(' + args.join(', ') + ');\n');
46041
+ this.pushHook('concat', [
46042
+ 'env',
46043
+ this.stack.pop() // parts
46044
+ ]);
46099
46045
  };
46100
46046
 
46101
- prototype.printComponentHook = function(morphNum, templateId, blockParamsLength) {
46102
- this.hooks.component = true;
46103
-
46104
- var path = this.stack.pop();
46105
- var hash = this.stack.pop();
46106
-
46107
- var options = [];
46108
-
46109
- options.push('morph: morph' + morphNum);
46110
-
46111
- if (templateId !== null) {
46112
- options.push('template: child' + templateId);
46113
- }
46114
-
46115
- if (blockParamsLength) {
46116
- options.push('blockParams: ' + blockParamsLength);
46117
- }
46118
-
46119
- var args = ['morph' + morphNum, path, 'context', hash, quoteHash(options), 'env'];
46120
- this.source.push(this.indent+' component(' + args.join(', ') + ');\n');
46047
+ prototype.printHook = function(name, args) {
46048
+ this.hooks[name] = true;
46049
+ this.source.push(this.indent + ' ' + name + '(' + args.join(', ') + ');\n');
46121
46050
  };
46122
46051
 
46123
- prototype.printAttributeHook = function(elementNum, quoted) {
46124
- this.hooks.attribute = true;
46125
-
46126
- var name = this.stack.pop();
46127
- var value = this.stack.pop();
46128
-
46129
- this.source.push(this.indent + ' attribute(element' + elementNum + ', ' + name + ', ' + quoted + ', context, ' + value + ', {}, env);\n');
46052
+ prototype.printSetHook = function(name, index) {
46053
+ this.printHook('set', [
46054
+ 'env',
46055
+ 'context',
46056
+ string(name),
46057
+ 'blockArguments[' + index + ']'
46058
+ ]);
46059
+ };
46060
+
46061
+ prototype.printBlockHook = function(morphNum, templateId, inverseId) {
46062
+ this.printHook('block', [
46063
+ 'env',
46064
+ 'morph' + morphNum,
46065
+ 'context',
46066
+ this.stack.pop(), // path
46067
+ this.stack.pop(), // params
46068
+ this.stack.pop(), // hash
46069
+ templateId === null ? 'null' : 'child' + templateId,
46070
+ inverseId === null ? 'null' : 'child' + inverseId
46071
+ ]);
46072
+ };
46073
+
46074
+ prototype.printInlineHook = function(morphNum) {
46075
+ this.printHook('inline', [
46076
+ 'env',
46077
+ 'morph' + morphNum,
46078
+ 'context',
46079
+ this.stack.pop(), // path
46080
+ this.stack.pop(), // params
46081
+ this.stack.pop() // hash
46082
+ ]);
46083
+ };
46084
+
46085
+ prototype.printContentHook = function(morphNum) {
46086
+ this.printHook('content', [
46087
+ 'env',
46088
+ 'morph' + morphNum,
46089
+ 'context',
46090
+ this.stack.pop() // path
46091
+ ]);
46092
+ };
46093
+
46094
+ prototype.printComponentHook = function(morphNum, templateId) {
46095
+ this.printHook('component', [
46096
+ 'env',
46097
+ 'morph' + morphNum,
46098
+ 'context',
46099
+ this.stack.pop(), // path
46100
+ this.stack.pop(), // attrs
46101
+ templateId === null ? 'null' : 'child' + templateId
46102
+ ]);
46103
+ };
46104
+
46105
+ prototype.printAttributeHook = function(attrMorphNum, elementNum) {
46106
+ this.printHook('attribute', [
46107
+ 'env',
46108
+ 'attrMorph' + attrMorphNum,
46109
+ 'element' + elementNum,
46110
+ this.stack.pop(), // name
46111
+ this.stack.pop() // value
46112
+ ]);
46130
46113
  };
46131
46114
 
46132
46115
  prototype.printElementHook = function(elementNum) {
46133
- this.hooks.element = true;
46134
-
46135
- var path = this.stack.pop();
46136
- var params = this.stack.pop();
46137
- var hash = this.stack.pop();
46138
-
46139
- var options = [];
46140
- options.push('element: element' + elementNum);
46141
-
46142
- var args = ['element' + elementNum, path, 'context', params, hash, quoteHash(options), 'env'];
46143
- this.source.push(this.indent+' element(' + args.join(', ') + ');\n');
46116
+ this.printHook('element', [
46117
+ 'env',
46118
+ 'element' + elementNum,
46119
+ 'context',
46120
+ this.stack.pop(), // path
46121
+ this.stack.pop(), // params
46122
+ this.stack.pop() // hash
46123
+ ]);
46144
46124
  };
46145
46125
 
46146
46126
  prototype.createMorph = function(morphNum, parentPath, startIndex, endIndex, escaped) {
@@ -46156,6 +46136,12 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
46156
46136
  this.morphs.push(['morph' + morphNum, morph]);
46157
46137
  };
46158
46138
 
46139
+ prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped) {
46140
+ var morphMethod = escaped ? 'createAttrMorph' : 'createUnsafeAttrMorph';
46141
+ var morph = "dom."+morphMethod+"(element"+elementNum+", '"+name+"')";
46142
+ this.morphs.push(['attrMorph' + attrMorphNum, morph]);
46143
+ };
46144
+
46159
46145
  prototype.repairClonedNode = function(blankChildTextNodes, isElementChecked) {
46160
46146
  var parent = this.getParent(),
46161
46147
  processing = 'dom.repairClonedNode('+parent+','+
@@ -46170,11 +46156,14 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
46170
46156
  prototype.shareElement = function(elementNum){
46171
46157
  var elementNodesName = "element" + elementNum;
46172
46158
  this.fragmentProcessing.push('var '+elementNodesName+' = '+this.getParent()+';');
46173
- this.parents[this.parents.length-1] = elementNodesName;
46159
+ this.parents[this.parents.length-1] = [elementNodesName];
46174
46160
  };
46175
46161
 
46176
46162
  prototype.consumeParent = function(i) {
46177
- this.parents.push(this.getParent() + '.childNodes[' + i + ']');
46163
+ var newParent = this.lastParent().slice();
46164
+ newParent.push(i);
46165
+
46166
+ this.parents.push(newParent);
46178
46167
  };
46179
46168
 
46180
46169
  prototype.popParent = function() {
@@ -46182,6 +46171,17 @@ enifed("htmlbars-compiler/hydration-javascript-compiler",
46182
46171
  };
46183
46172
 
46184
46173
  prototype.getParent = function() {
46174
+ var last = this.lastParent().slice();
46175
+ var frag = last.shift();
46176
+
46177
+ if (!last.length) {
46178
+ return frag;
46179
+ }
46180
+
46181
+ return 'dom.childAt(' + frag + ', [' + last.join(', ') + '])';
46182
+ };
46183
+
46184
+ prototype.lastParent = function() {
46185
46185
  return this.parents[this.parents.length-1];
46186
46186
  };
46187
46187
  });
@@ -46218,6 +46218,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46218
46218
  this.currentDOMChildIndex = 0;
46219
46219
  this.morphs = [];
46220
46220
  this.morphNum = 0;
46221
+ this.attrMorphNum = 0;
46221
46222
  this.element = null;
46222
46223
  this.elementNum = -1;
46223
46224
  }
@@ -46249,6 +46250,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46249
46250
  this.templateId = 0;
46250
46251
  this.currentDOMChildIndex = -1;
46251
46252
  this.morphNum = 0;
46253
+ this.attrMorphNum = 0;
46252
46254
 
46253
46255
  var blockParams = program.blockParams || [];
46254
46256
 
@@ -46310,8 +46312,6 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46310
46312
 
46311
46313
  HydrationOpcodeCompiler.prototype.block = function(block, childIndex, childrenLength) {
46312
46314
  var sexpr = block.sexpr;
46313
- var program = block.program || {};
46314
- var blockParams = program.blockParams || [];
46315
46315
 
46316
46316
  var currentDOMChildIndex = this.currentDOMChildIndex;
46317
46317
  var start = (currentDOMChildIndex < 0) ? null : currentDOMChildIndex;
@@ -46324,7 +46324,7 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46324
46324
  var inverseId = block.inverse === null ? null : this.templateId++;
46325
46325
 
46326
46326
  prepareSexpr(this, sexpr);
46327
- this.opcode('printContentHookForBlockHelper', morphNum, templateId, inverseId, blockParams.length);
46327
+ this.opcode('printBlockHook', morphNum, templateId, inverseId);
46328
46328
  };
46329
46329
 
46330
46330
  HydrationOpcodeCompiler.prototype.component = function(component, childIndex, childrenLength) {
@@ -46363,16 +46363,15 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46363
46363
 
46364
46364
  HydrationOpcodeCompiler.prototype.attribute = function(attr) {
46365
46365
  var value = attr.value;
46366
- var quoted;
46367
-
46366
+ var escaped = true;
46367
+
46368
46368
  // TODO: Introduce context specific AST nodes to avoid switching here.
46369
46369
  if (value.type === 'TextNode') {
46370
46370
  return;
46371
46371
  } else if (value.type === 'MustacheStatement') {
46372
- quoted = false;
46372
+ escaped = value.escaped;
46373
46373
  this.accept(unwrapMustache(value));
46374
46374
  } else if (value.type === 'ConcatStatement') {
46375
- quoted = true;
46376
46375
  prepareParams(this, value.parts);
46377
46376
  this.opcode('pushConcatHook');
46378
46377
  }
@@ -46384,7 +46383,9 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46384
46383
  this.element = null;
46385
46384
  }
46386
46385
 
46387
- this.opcode('printAttributeHook', this.elementNum, value.type === 'ConcatStatement');
46386
+ var attrMorphNum = this.attrMorphNum++;
46387
+ this.opcode('createAttrMorph', attrMorphNum, this.elementNum, attr.name, escaped);
46388
+ this.opcode('printAttributeHook', attrMorphNum, this.elementNum);
46388
46389
  };
46389
46390
 
46390
46391
  HydrationOpcodeCompiler.prototype.elementHelper = function(sexpr) {
@@ -46411,10 +46412,10 @@ enifed("htmlbars-compiler/hydration-opcode-compiler",
46411
46412
 
46412
46413
  if (isHelper(sexpr)) {
46413
46414
  prepareSexpr(this, sexpr);
46414
- this.opcode('printContentHookForInlineHelper', morphNum);
46415
+ this.opcode('printInlineHook', morphNum);
46415
46416
  } else {
46416
46417
  preparePath(this, sexpr.path);
46417
- this.opcode('printContentHookForAmbiguous', morphNum);
46418
+ this.opcode('printContentHook', morphNum);
46418
46419
  }
46419
46420
  };
46420
46421
 
@@ -46593,16 +46594,26 @@ enifed("htmlbars-compiler/template-compiler",
46593
46594
  this.getChildTemplateVars(indent + ' ') +
46594
46595
  indent+' return {\n' +
46595
46596
  indent+' isHTMLBars: true,\n' +
46597
+ indent+' blockParams: ' + blockParams.length + ',\n' +
46596
46598
  indent+' cachedFragment: null,\n' +
46599
+ indent+' hasRendered: false,\n' +
46597
46600
  indent+' build: ' + fragmentProgram + ',\n' +
46598
46601
  indent+' render: function render(' + templateSignature + ') {\n' +
46599
46602
  indent+' var dom = env.dom;\n' +
46600
46603
  this.getHydrationHooks(indent + ' ', this.hydrationCompiler.hooks) +
46601
46604
  indent+' dom.detectNamespace(contextualElement);\n' +
46605
+ indent+' var fragment;\n' +
46602
46606
  indent+' if (this.cachedFragment === null) {\n' +
46603
- indent+' this.cachedFragment = this.build(dom);\n' +
46607
+ indent+' fragment = this.build(dom);\n' +
46608
+ indent+' if (this.hasRendered) {\n' +
46609
+ indent+' this.cachedFragment = fragment;\n' +
46610
+ indent+' } else {\n' +
46611
+ indent+' this.hasRendered = true;\n' +
46612
+ indent+' }\n' +
46613
+ indent+' }\n' +
46614
+ indent+' if (this.cachedFragment) {\n' +
46615
+ indent+' fragment = dom.cloneNode(this.cachedFragment, true);\n' +
46604
46616
  indent+' }\n' +
46605
- indent+' var fragment = dom.cloneNode(this.cachedFragment, true);\n' +
46606
46617
  hydrationProgram +
46607
46618
  indent+' return fragment;\n' +
46608
46619
  indent+' }\n' +
@@ -46657,17 +46668,6 @@ enifed("htmlbars-compiler/template-visitor",
46657
46668
  "use strict";
46658
46669
  var push = Array.prototype.push;
46659
46670
 
46660
- function elementIntroducesNamespace(element, parentElement){
46661
- return (
46662
- // Root element. Those that have a namespace are entered.
46663
- (!parentElement && element.namespaceURI) ||
46664
- // Inner elements to a namespace
46665
- ( parentElement &&
46666
- ( !element.isHTMLIntegrationPoint && parentElement.namespaceURI !== element.namespaceURI )
46667
- )
46668
- );
46669
- }
46670
-
46671
46671
  function Frame() {
46672
46672
  this.parentNode = null;
46673
46673
  this.children = null;
@@ -46788,15 +46788,7 @@ enifed("htmlbars-compiler/template-visitor",
46788
46788
  parentNode.type === 'Program' && parentFrame.childCount === 1
46789
46789
  ];
46790
46790
 
46791
- var lastNode = parentFrame.childIndex === parentFrame.childCount-1,
46792
- introducesNamespace = elementIntroducesNamespace(element, parentFrame.parentNode);
46793
- if ( !lastNode && introducesNamespace ) {
46794
- elementFrame.actions.push(['setNamespace', [parentNode.namespaceURI]]);
46795
- }
46796
46791
  elementFrame.actions.push(['closeElement', actionArgs]);
46797
- if ( !lastNode && element.isHTMLIntergrationPoint ) {
46798
- elementFrame.actions.push(['setNamespace', []]);
46799
- }
46800
46792
 
46801
46793
  for (var i = element.attributes.length - 1; i >= 0; i--) {
46802
46794
  this.visit(element.attributes[i]);
@@ -46807,14 +46799,8 @@ enifed("htmlbars-compiler/template-visitor",
46807
46799
  this.visit(element.children[i]);
46808
46800
  }
46809
46801
 
46810
- if ( element.isHTMLIntergrationPoint ) {
46811
- elementFrame.actions.push(['setNamespace', []]);
46812
- }
46813
46802
  elementFrame.actions.push(['openElement', actionArgs.concat([
46814
46803
  elementFrame.mustacheCount, elementFrame.blankChildTextNodes.reverse() ])]);
46815
- if ( introducesNamespace ) {
46816
- elementFrame.actions.push(['setNamespace', [element.namespaceURI]]);
46817
- }
46818
46804
  this.popFrame();
46819
46805
 
46820
46806
  // Propagate the element's frame state to the parent frame
@@ -46982,7 +46968,7 @@ enifed("htmlbars-syntax/builders",
46982
46968
  __exports__.buildPartial = buildPartial;function buildComment(value) {
46983
46969
  return {
46984
46970
  type: "CommentStatement",
46985
- value: value,
46971
+ value: value
46986
46972
  };
46987
46973
  }
46988
46974
 
@@ -48356,16 +48342,15 @@ enifed("htmlbars-syntax/handlebars/utils",
48356
48342
  __exports__.appendContextPath = appendContextPath;
48357
48343
  });
48358
48344
  enifed("htmlbars-syntax/node-handlers",
48359
- ["./builders","./tokens","../htmlbars-util/array-utils","./utils","exports"],
48360
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
48345
+ ["./builders","../htmlbars-util/array-utils","./utils","exports"],
48346
+ function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
48361
48347
  "use strict";
48362
48348
  var buildProgram = __dependency1__.buildProgram;
48363
48349
  var buildBlock = __dependency1__.buildBlock;
48364
48350
  var buildHash = __dependency1__.buildHash;
48365
- var Chars = __dependency2__.Chars;
48366
- var forEach = __dependency3__.forEach;
48367
- var appendChild = __dependency4__.appendChild;
48368
- var postprocessProgram = __dependency4__.postprocessProgram;
48351
+ var forEach = __dependency2__.forEach;
48352
+ var appendChild = __dependency3__.appendChild;
48353
+ var postprocessProgram = __dependency3__.postprocessProgram;
48369
48354
 
48370
48355
  var nodeHandlers = {
48371
48356
 
@@ -48401,7 +48386,7 @@ enifed("htmlbars-syntax/node-handlers",
48401
48386
  delete block.closeStrip;
48402
48387
 
48403
48388
  if (this.tokenizer.state === 'comment') {
48404
- this.tokenizer.token.addChar('{{' + this.sourceForMustache(block) + '}}');
48389
+ this.tokenizer.addChar('{{' + this.sourceForMustache(block) + '}}');
48405
48390
  return;
48406
48391
  }
48407
48392
 
@@ -48421,7 +48406,7 @@ enifed("htmlbars-syntax/node-handlers",
48421
48406
  delete mustache.strip;
48422
48407
 
48423
48408
  if (this.tokenizer.state === 'comment') {
48424
- this.tokenizer.token.addChar('{{' + this.sourceForMustache(mustache) + '}}');
48409
+ this.tokenizer.addChar('{{' + this.sourceForMustache(mustache) + '}}');
48425
48410
  return;
48426
48411
  }
48427
48412
 
@@ -48499,8 +48484,7 @@ enifed("htmlbars-syntax/node-handlers",
48499
48484
  function switchToHandlebars(processor) {
48500
48485
  var token = processor.tokenizer.token;
48501
48486
 
48502
- // TODO: Monkey patch Chars.addChar like attributes
48503
- if (token instanceof Chars) {
48487
+ if (token && token.type === 'Chars') {
48504
48488
  processor.acceptToken(token);
48505
48489
  processor.tokenizer.token = null;
48506
48490
  }
@@ -48524,7 +48508,7 @@ enifed("htmlbars-syntax/node-handlers",
48524
48508
  __exports__["default"] = nodeHandlers;
48525
48509
  });
48526
48510
  enifed("htmlbars-syntax/parser",
48527
- ["./handlebars/compiler/base","../simple-html-tokenizer","../simple-html-tokenizer/entity-parser","../simple-html-tokenizer/char-refs/full","./node-handlers","./token-handlers","../htmlbars-syntax","exports"],
48511
+ ["./handlebars/compiler/base","./tokenizer","../simple-html-tokenizer/entity-parser","../simple-html-tokenizer/char-refs/full","./node-handlers","./token-handlers","../htmlbars-syntax","exports"],
48528
48512
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __exports__) {
48529
48513
  "use strict";
48530
48514
  var parse = __dependency1__.parse;
@@ -48641,28 +48625,6 @@ enifed("htmlbars-syntax/token-handlers",
48641
48625
  voidMap[tagName] = true;
48642
48626
  });
48643
48627
 
48644
- var svgNamespace = "http://www.w3.org/2000/svg",
48645
- // http://www.w3.org/html/wg/drafts/html/master/syntax.html#html-integration-point
48646
- svgHTMLIntegrationPoints = {'foreignObject':true, 'desc':true, 'title':true};
48647
-
48648
- function applyNamespace(tag, element, currentElement){
48649
- if (tag.tagName === 'svg') {
48650
- element.namespaceURI = svgNamespace;
48651
- } else if (
48652
- currentElement.type === 'ElementNode' &&
48653
- currentElement.namespaceURI &&
48654
- !currentElement.isHTMLIntegrationPoint
48655
- ) {
48656
- element.namespaceURI = currentElement.namespaceURI;
48657
- }
48658
- }
48659
-
48660
- function applyHTMLIntegrationPoint(tag, element){
48661
- if (svgHTMLIntegrationPoints[tag.tagName]) {
48662
- element.isHTMLIntegrationPoint = true;
48663
- }
48664
- }
48665
-
48666
48628
  // Except for `mustache`, all tokens are only allowed outside of
48667
48629
  // a start or end tag.
48668
48630
  var tokenHandlers = {
@@ -48685,8 +48647,6 @@ enifed("htmlbars-syntax/token-handlers",
48685
48647
  end: { line: null, column: null}
48686
48648
  };
48687
48649
 
48688
- applyNamespace(tag, element, this.currentElement());
48689
- applyHTMLIntegrationPoint(tag, element);
48690
48650
  this.elementStack.push(element);
48691
48651
  if (voidMap.hasOwnProperty(tag.tagName) || tag.selfClosing) {
48692
48652
  tokenHandlers.EndTag.call(this, tag);
@@ -48702,39 +48662,38 @@ enifed("htmlbars-syntax/token-handlers",
48702
48662
  },
48703
48663
 
48704
48664
  MustacheStatement: function(mustache) {
48705
- var state = this.tokenizer.state;
48706
- var token = this.tokenizer.token;
48665
+ var tokenizer = this.tokenizer;
48707
48666
 
48708
- switch(state) {
48667
+ switch(tokenizer.state) {
48709
48668
  // Tag helpers
48710
48669
  case "tagName":
48711
- token.addTagHelper(mustache.sexpr);
48712
- this.tokenizer.state = "beforeAttributeName";
48670
+ tokenizer.addTagHelper(mustache.sexpr);
48671
+ tokenizer.state = "beforeAttributeName";
48713
48672
  return;
48714
48673
  case "beforeAttributeName":
48715
- token.addTagHelper(mustache.sexpr);
48674
+ tokenizer.addTagHelper(mustache.sexpr);
48716
48675
  return;
48717
48676
  case "attributeName":
48718
48677
  case "afterAttributeName":
48719
- this.tokenizer.finalizeAttributeValue();
48720
- token.addTagHelper(mustache.sexpr);
48721
- this.tokenizer.state = "beforeAttributeName";
48678
+ tokenizer.finalizeAttributeValue();
48679
+ tokenizer.addTagHelper(mustache.sexpr);
48680
+ tokenizer.state = "beforeAttributeName";
48722
48681
  return;
48723
48682
  case "afterAttributeValueQuoted":
48724
- token.addTagHelper(mustache.sexpr);
48725
- this.tokenizer.state = "beforeAttributeName";
48683
+ tokenizer.addTagHelper(mustache.sexpr);
48684
+ tokenizer.state = "beforeAttributeName";
48726
48685
  return;
48727
48686
 
48728
48687
  // Attribute values
48729
48688
  case "beforeAttributeValue":
48730
- token.markAttributeQuoted(false);
48731
- token.addToAttributeValue(mustache);
48732
- this.tokenizer.state = 'attributeValueUnquoted';
48689
+ tokenizer.markAttributeQuoted(false);
48690
+ tokenizer.addToAttributeValue(mustache);
48691
+ tokenizer.state = 'attributeValueUnquoted';
48733
48692
  return;
48734
48693
  case "attributeValueDoubleQuoted":
48735
48694
  case "attributeValueSingleQuoted":
48736
48695
  case "attributeValueUnquoted":
48737
- token.addToAttributeValue(mustache);
48696
+ tokenizer.addToAttributeValue(mustache);
48738
48697
  return;
48739
48698
 
48740
48699
  // TODO: Only append child when the tokenizer state makes
@@ -48749,12 +48708,7 @@ enifed("htmlbars-syntax/token-handlers",
48749
48708
  var parent = this.currentElement();
48750
48709
  var disableComponentGeneration = this.options.disableComponentGeneration === true;
48751
48710
 
48752
- if (element.tag !== tag.tagName) {
48753
- throw new Error(
48754
- "Closing tag `" + tag.tagName + "` (on line " + tag.lastLine + ") " +
48755
- "did not match last open tag `" + element.tag + "` (on line " + element.loc.start.line + ")."
48756
- );
48757
- }
48711
+ validateEndTag(tag, element);
48758
48712
 
48759
48713
  if (disableComponentGeneration || element.tag.indexOf("-") === -1) {
48760
48714
  appendChild(parent, element);
@@ -48770,32 +48724,52 @@ enifed("htmlbars-syntax/token-handlers",
48770
48724
 
48771
48725
  };
48772
48726
 
48727
+ function validateEndTag(tag, element) {
48728
+ var error;
48729
+
48730
+ if (voidMap[tag.tagName] && element.tag === undefined) {
48731
+ // For void elements, we check element.tag is undefined because endTag is called by the startTag token handler in
48732
+ // the normal case, so checking only voidMap[tag.tagName] would lead to an error being thrown on the opening tag.
48733
+ error = "Invalid end tag " + formatEndTagInfo(tag) + " (void elements cannot have end tags).";
48734
+ } else if (element.tag === undefined) {
48735
+ error = "Closing tag " + formatEndTagInfo(tag) + " without an open tag.";
48736
+ } else if (element.tag !== tag.tagName) {
48737
+ error = "Closing tag " + formatEndTagInfo(tag) + " did not match last open tag `" + element.tag + "` (on line " +
48738
+ element.loc.start.line + ").";
48739
+ }
48740
+
48741
+ if (error) { throw new Error(error); }
48742
+ }
48743
+
48744
+ function formatEndTagInfo(tag) {
48745
+ return "`" + tag.tagName + "` (on line " + tag.lastLine + ")";
48746
+ }
48747
+
48773
48748
  __exports__["default"] = tokenHandlers;
48774
48749
  });
48775
- enifed("htmlbars-syntax/tokens",
48750
+ enifed("htmlbars-syntax/tokenizer",
48776
48751
  ["../simple-html-tokenizer","./utils","./builders","exports"],
48777
48752
  function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
48778
48753
  "use strict";
48779
- var Chars = __dependency1__.Chars;
48780
- var StartTag = __dependency1__.StartTag;
48781
- var EndTag = __dependency1__.EndTag;
48754
+ var Tokenizer = __dependency1__.Tokenizer;
48782
48755
  var isHelper = __dependency2__.isHelper;
48783
48756
  var builders = __dependency3__["default"];
48784
48757
 
48785
- StartTag.prototype.startAttribute = function(char) {
48758
+ Tokenizer.prototype.createAttribute = function(char) {
48786
48759
  this.currentAttribute = builders.attr(char.toLowerCase(), [], null);
48787
- this.attributes.push(this.currentAttribute);
48760
+ this.token.attributes.push(this.currentAttribute);
48761
+ this.state = 'attributeName';
48788
48762
  };
48789
48763
 
48790
- StartTag.prototype.markAttributeQuoted = function(value) {
48764
+ Tokenizer.prototype.markAttributeQuoted = function(value) {
48791
48765
  this.currentAttribute.quoted = value;
48792
48766
  };
48793
48767
 
48794
- StartTag.prototype.addToAttributeName = function(char) {
48768
+ Tokenizer.prototype.addToAttributeName = function(char) {
48795
48769
  this.currentAttribute.name += char;
48796
48770
  };
48797
48771
 
48798
- StartTag.prototype.addToAttributeValue = function(char) {
48772
+ Tokenizer.prototype.addToAttributeValue = function(char) {
48799
48773
  var value = this.currentAttribute.value;
48800
48774
 
48801
48775
  if (!this.currentAttribute.quoted && value.length > 0 &&
@@ -48821,12 +48795,7 @@ enifed("htmlbars-syntax/tokens",
48821
48795
  }
48822
48796
  };
48823
48797
 
48824
- StartTag.prototype.finalize = function() {
48825
- this.finalizeAttributeValue();
48826
- return this;
48827
- };
48828
-
48829
- StartTag.prototype.finalizeAttributeValue = function() {
48798
+ Tokenizer.prototype.finalizeAttributeValue = function() {
48830
48799
  if (this.currentAttribute) {
48831
48800
  this.currentAttribute.value = prepareAttributeValue(this.currentAttribute);
48832
48801
  delete this.currentAttribute.quoted;
@@ -48834,8 +48803,8 @@ enifed("htmlbars-syntax/tokens",
48834
48803
  }
48835
48804
  };
48836
48805
 
48837
- StartTag.prototype.addTagHelper = function(helper) {
48838
- var helpers = this.helpers = this.helpers || [];
48806
+ Tokenizer.prototype.addTagHelper = function(helper) {
48807
+ var helpers = this.token.helpers = this.token.helpers || [];
48839
48808
  helpers.push(helper);
48840
48809
  };
48841
48810
 
@@ -48869,9 +48838,7 @@ enifed("htmlbars-syntax/tokens",
48869
48838
  }
48870
48839
  }
48871
48840
 
48872
- __exports__.unwrapMustache = unwrapMustache;__exports__.Chars = Chars;
48873
- __exports__.StartTag = StartTag;
48874
- __exports__.EndTag = EndTag;
48841
+ __exports__.unwrapMustache = unwrapMustache;__exports__.Tokenizer = Tokenizer;
48875
48842
  });
48876
48843
  enifed("htmlbars-syntax/utils",
48877
48844
  ["./builders","exports"],
@@ -49292,26 +49259,131 @@ enifed("htmlbars-util/safe-string",
49292
49259
  __exports__["default"] = SafeString;
49293
49260
  });
49294
49261
  enifed("morph",
49295
- ["./morph/morph","./morph/dom-helper","exports"],
49296
- function(__dependency1__, __dependency2__, __exports__) {
49262
+ ["./morph/morph","./morph/attr-morph","./morph/dom-helper","exports"],
49263
+ function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
49297
49264
  "use strict";
49298
49265
  var Morph = __dependency1__["default"];
49299
- var DOMHelper = __dependency2__["default"];
49266
+ var AttrMorph = __dependency2__["default"];
49267
+ var DOMHelper = __dependency3__["default"];
49300
49268
 
49301
49269
  __exports__.Morph = Morph;
49270
+ __exports__.AttrMorph = AttrMorph;
49302
49271
  __exports__.DOMHelper = DOMHelper;
49303
49272
  });
49304
- enifed("morph/dom-helper",
49305
- ["../morph/morph","./dom-helper/build-html-dom","./dom-helper/classes","exports"],
49273
+ enifed("morph/attr-morph",
49274
+ ["./attr-morph/sanitize-attribute-value","./dom-helper/prop","./dom-helper/build-html-dom","exports"],
49306
49275
  function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
49307
49276
  "use strict";
49308
- /* global window:false */
49277
+ var sanitizeAttributeValue = __dependency1__.sanitizeAttributeValue;
49278
+ var normalizeProperty = __dependency2__.normalizeProperty;
49279
+ var svgNamespace = __dependency3__.svgNamespace;
49280
+
49281
+ function updateProperty(value) {
49282
+ this.domHelper.setPropertyStrict(this.element, this.attrName, value);
49283
+ }
49284
+
49285
+ function updateAttribute(value) {
49286
+ if (value === null) {
49287
+ this.domHelper.removeAttribute(this.element, this.attrName);
49288
+ } else {
49289
+ this.domHelper.setAttribute(this.element, this.attrName, value);
49290
+ }
49291
+ }
49292
+
49293
+ function AttrMorph(element, attrName, domHelper) {
49294
+ this.element = element;
49295
+ this.domHelper = domHelper;
49296
+ this.escaped = true;
49297
+
49298
+ var normalizedAttrName = normalizeProperty(this.element, attrName);
49299
+ if (element.namespaceURI === svgNamespace || attrName === 'style' || !normalizedAttrName) {
49300
+ this.attrName = attrName;
49301
+ this._update = updateAttribute;
49302
+ } else {
49303
+ this.attrName = normalizedAttrName;
49304
+ this._update = updateProperty;
49305
+ }
49306
+ }
49307
+
49308
+ AttrMorph.prototype.setContent = function (value) {
49309
+ if (this.escaped) {
49310
+ var sanitized = sanitizeAttributeValue(this.element, this.attrName, value);
49311
+ this._update(sanitized);
49312
+ } else {
49313
+ this._update(value);
49314
+ }
49315
+ };
49316
+
49317
+ __exports__["default"] = AttrMorph;
49318
+ });
49319
+ enifed("morph/attr-morph/sanitize-attribute-value",
49320
+ ["exports"],
49321
+ function(__exports__) {
49322
+ "use strict";
49323
+ /* jshint scripturl:true */
49324
+
49325
+ var parsingNode;
49326
+ var badProtocols = {
49327
+ 'javascript:': true,
49328
+ 'vbscript:': true
49329
+ };
49330
+
49331
+ var badTags = {
49332
+ 'A': true,
49333
+ 'BODY': true,
49334
+ 'LINK': true,
49335
+ 'IMG': true,
49336
+ 'IFRAME': true
49337
+ };
49338
+
49339
+ var badAttributes = {
49340
+ 'href': true,
49341
+ 'src': true,
49342
+ 'background': true
49343
+ };
49344
+ __exports__.badAttributes = badAttributes;
49345
+ function sanitizeAttributeValue(element, attribute, value) {
49346
+ var tagName;
49347
+
49348
+ if (!parsingNode) {
49349
+ parsingNode = document.createElement('a');
49350
+ }
49351
+
49352
+ if (!element) {
49353
+ tagName = null;
49354
+ } else {
49355
+ tagName = element.tagName;
49356
+ }
49357
+
49358
+ if (value && value.toHTML) {
49359
+ return value.toHTML();
49360
+ }
49361
+
49362
+ if ((tagName === null || badTags[tagName]) && badAttributes[attribute]) {
49363
+ parsingNode.href = value;
49364
+
49365
+ if (badProtocols[parsingNode.protocol] === true) {
49366
+ return 'unsafe:' + value;
49367
+ }
49368
+ }
49369
+
49370
+ return value;
49371
+ }
49372
+
49373
+ __exports__.sanitizeAttributeValue = sanitizeAttributeValue;
49374
+ });
49375
+ enifed("morph/dom-helper",
49376
+ ["../morph/morph","../morph/attr-morph","./dom-helper/build-html-dom","./dom-helper/classes","./dom-helper/prop","exports"],
49377
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
49378
+ "use strict";
49309
49379
  var Morph = __dependency1__["default"];
49310
- var buildHTMLDOM = __dependency2__.buildHTMLDOM;
49311
- var svgNamespace = __dependency2__.svgNamespace;
49312
- var svgHTMLIntegrationPoints = __dependency2__.svgHTMLIntegrationPoints;
49313
- var addClasses = __dependency3__.addClasses;
49314
- var removeClasses = __dependency3__.removeClasses;
49380
+ var AttrMorph = __dependency2__["default"];
49381
+ var buildHTMLDOM = __dependency3__.buildHTMLDOM;
49382
+ var svgNamespace = __dependency3__.svgNamespace;
49383
+ var svgHTMLIntegrationPoints = __dependency3__.svgHTMLIntegrationPoints;
49384
+ var addClasses = __dependency4__.addClasses;
49385
+ var removeClasses = __dependency4__.removeClasses;
49386
+ var normalizeProperty = __dependency5__.normalizeProperty;
49315
49387
 
49316
49388
  var doc = typeof document === 'undefined' ? false : document;
49317
49389
 
@@ -49411,15 +49483,19 @@ enifed("morph/dom-helper",
49411
49483
  * @param {HTMLDocument} _document The document DOM methods are proxied to
49412
49484
  */
49413
49485
  function DOMHelper(_document){
49414
- this.document = _document || window.document;
49486
+ this.document = _document || document;
49487
+ if (!this.document) {
49488
+ throw new Error("A document object must be passed to the DOMHelper, or available on the global scope");
49489
+ }
49415
49490
  this.namespace = null;
49416
49491
  }
49417
49492
 
49418
49493
  var prototype = DOMHelper.prototype;
49419
49494
  prototype.constructor = DOMHelper;
49420
49495
 
49421
- prototype.getElementById = function(id) {
49422
- return this.document.getElementById(id);
49496
+ prototype.getElementById = function(id, rootNode) {
49497
+ rootNode = rootNode || this.document;
49498
+ return rootNode.getElementById(id);
49423
49499
  };
49424
49500
 
49425
49501
  prototype.insertBefore = function(element, childElement, referenceChild) {
@@ -49430,6 +49506,16 @@ enifed("morph/dom-helper",
49430
49506
  return element.appendChild(childElement);
49431
49507
  };
49432
49508
 
49509
+ prototype.childAt = function(element, indices) {
49510
+ var child = element;
49511
+
49512
+ for (var i = 0; i < indices.length; i++) {
49513
+ child = child.childNodes[indices[i]];
49514
+ }
49515
+
49516
+ return child;
49517
+ };
49518
+
49433
49519
  prototype.appendText = function(element, text) {
49434
49520
  return element.appendChild(this.document.createTextNode(text));
49435
49521
  };
@@ -49442,10 +49528,32 @@ enifed("morph/dom-helper",
49442
49528
  element.removeAttribute(name);
49443
49529
  };
49444
49530
 
49445
- prototype.setProperty = function(element, name, value) {
49531
+ prototype.setPropertyStrict = function(element, name, value) {
49446
49532
  element[name] = value;
49447
49533
  };
49448
49534
 
49535
+ prototype.setProperty = function(element, name, value) {
49536
+ var lowercaseName = name.toLowerCase();
49537
+ if (element.namespaceURI === svgNamespace || lowercaseName === 'style') {
49538
+ if (value === null) {
49539
+ element.removeAttribute(name);
49540
+ } else {
49541
+ element.setAttribute(name, value);
49542
+ }
49543
+ } else {
49544
+ var normalized = normalizeProperty(element, name);
49545
+ if (normalized) {
49546
+ element[normalized] = value;
49547
+ } else {
49548
+ if (value === null) {
49549
+ element.removeAttribute(name);
49550
+ } else {
49551
+ element.setAttribute(name, value);
49552
+ }
49553
+ }
49554
+ }
49555
+ };
49556
+
49449
49557
  if (doc && doc.createElementNS) {
49450
49558
  // Only opt into namespace detection if a contextualElement
49451
49559
  // is passed.
@@ -49516,6 +49624,16 @@ enifed("morph/dom-helper",
49516
49624
  return clone;
49517
49625
  };
49518
49626
 
49627
+ prototype.createAttrMorph = function(element, attrName){
49628
+ return new AttrMorph(element, attrName, this);
49629
+ };
49630
+
49631
+ prototype.createUnsafeAttrMorph = function(element, attrName){
49632
+ var morph = this.createAttrMorph(element, attrName);
49633
+ morph.escaped = false;
49634
+ return morph;
49635
+ };
49636
+
49519
49637
  prototype.createMorph = function(parent, start, end, contextualElement){
49520
49638
  if (!contextualElement && parent.nodeType === 1) {
49521
49639
  contextualElement = parent;
@@ -49999,6 +50117,32 @@ enifed("morph/dom-helper/classes",
49999
50117
  __exports__.addClasses = addClasses;
50000
50118
  __exports__.removeClasses = removeClasses;
50001
50119
  });
50120
+ enifed("morph/dom-helper/prop",
50121
+ ["exports"],
50122
+ function(__exports__) {
50123
+ "use strict";
50124
+ // TODO should this be an o_create kind of thing?
50125
+ var propertyCaches = {};
50126
+ __exports__.propertyCaches = propertyCaches;
50127
+ function normalizeProperty(element, attrName) {
50128
+ var tagName = element.tagName;
50129
+ var key;
50130
+ var cache = propertyCaches[tagName];
50131
+ if (!cache) {
50132
+ // TODO should this be an o_create kind of thing?
50133
+ cache = {};
50134
+ for (key in element) {
50135
+ cache[key.toLowerCase()] = key;
50136
+ }
50137
+ propertyCaches[tagName] = cache;
50138
+ }
50139
+
50140
+ // presumes that the attrName has been lowercased.
50141
+ return cache[attrName];
50142
+ }
50143
+
50144
+ __exports__.normalizeProperty = normalizeProperty;
50145
+ });
50002
50146
  enifed("morph/morph",
50003
50147
  ["exports"],
50004
50148
  function(__exports__) {
@@ -50075,7 +50219,7 @@ enifed("morph/morph",
50075
50219
  }
50076
50220
  };
50077
50221
 
50078
- Morph.prototype.update = function (nodeOrString) {
50222
+ Morph.prototype.setContent = function (nodeOrString) {
50079
50223
  this._update(this.element || this.parent(), nodeOrString);
50080
50224
  };
50081
50225
 
@@ -58152,39 +58296,50 @@ enifed("simple-html-tokenizer/tokenizer",
58152
58296
  }
58153
58297
  },
58154
58298
 
58155
- tag: function(Type, char) {
58299
+ createTag: function(Type, char) {
58156
58300
  var lastToken = this.token;
58157
58301
  this.token = new Type(char);
58158
58302
  this.state = 'tagName';
58159
58303
  return lastToken;
58160
58304
  },
58161
58305
 
58306
+ addToTagName: function(char) {
58307
+ this.token.tagName += char;
58308
+ },
58309
+
58162
58310
  selfClosing: function() {
58163
58311
  this.token.selfClosing = true;
58164
58312
  },
58165
58313
 
58166
- attribute: function(char) {
58167
- this.token.startAttribute(char);
58314
+ createAttribute: function(char) {
58315
+ this._currentAttribute = [char.toLowerCase(), "", null];
58316
+ this.token.attributes.push(this._currentAttribute);
58168
58317
  this.state = 'attributeName';
58169
58318
  },
58170
58319
 
58171
58320
  addToAttributeName: function(char) {
58172
- this.token.addToAttributeName(char);
58321
+ this._currentAttribute[0] += char;
58173
58322
  },
58174
58323
 
58175
58324
  markAttributeQuoted: function(value) {
58176
- this.token.markAttributeQuoted(value);
58325
+ this._currentAttribute[2] = value;
58177
58326
  },
58178
58327
 
58179
58328
  finalizeAttributeValue: function() {
58180
- this.token.finalizeAttributeValue();
58329
+ if (this._currentAttribute) {
58330
+ if (this._currentAttribute[2] === null) {
58331
+ this._currentAttribute[2] = false;
58332
+ }
58333
+ this._currentAttribute = undefined;
58334
+ }
58181
58335
  },
58182
58336
 
58183
58337
  addToAttributeValue: function(char) {
58184
- this.token.addToAttributeValue(char);
58338
+ this._currentAttribute[1] = this._currentAttribute[1] || "";
58339
+ this._currentAttribute[1] += char;
58185
58340
  },
58186
58341
 
58187
- commentStart: function() {
58342
+ createComment: function() {
58188
58343
  var lastToken = this.token;
58189
58344
  this.token = new Comment();
58190
58345
  this.state = 'commentStart';
@@ -58192,7 +58347,18 @@ enifed("simple-html-tokenizer/tokenizer",
58192
58347
  },
58193
58348
 
58194
58349
  addToComment: function(char) {
58195
- this.token.addChar(char);
58350
+ this.addChar(char);
58351
+ },
58352
+
58353
+ addChar: function(char) {
58354
+ this.token.chars += char;
58355
+ },
58356
+
58357
+ finalizeToken: function() {
58358
+ if (this.token.type === 'StartTag') {
58359
+ this.finalizeAttributeValue();
58360
+ }
58361
+ return this.token;
58196
58362
  },
58197
58363
 
58198
58364
  emitData: function() {
@@ -58205,7 +58371,7 @@ enifed("simple-html-tokenizer/tokenizer",
58205
58371
 
58206
58372
  emitToken: function() {
58207
58373
  this.addLocInfo();
58208
- var lastToken = this.token.finalize();
58374
+ var lastToken = this.finalizeToken();
58209
58375
  this.token = null;
58210
58376
  this.state = 'data';
58211
58377
  return lastToken;
@@ -58217,7 +58383,7 @@ enifed("simple-html-tokenizer/tokenizer",
58217
58383
  this.markFirst();
58218
58384
  }
58219
58385
 
58220
- this.token.addChar(char);
58386
+ this.addChar(char);
58221
58387
  },
58222
58388
 
58223
58389
  markFirst: function(line, column) {
@@ -58249,7 +58415,6 @@ enifed("simple-html-tokenizer/tokenizer",
58249
58415
  } else {
58250
58416
  this.column++;
58251
58417
  }
58252
- // console.log(this.state, char);
58253
58418
  return this.states[this.state].call(this, char);
58254
58419
  } else {
58255
58420
  this.addLocInfo(this.line, this.column);
@@ -58276,14 +58441,14 @@ enifed("simple-html-tokenizer/tokenizer",
58276
58441
  } else if (char === "/") {
58277
58442
  this.state = 'endTagOpen';
58278
58443
  } else if (isAlpha(char)) {
58279
- return this.tag(StartTag, char.toLowerCase());
58444
+ return this.createTag(StartTag, char.toLowerCase());
58280
58445
  }
58281
58446
  },
58282
58447
 
58283
58448
  markupDeclaration: function(char) {
58284
58449
  if (char === "-" && this.input.charAt(this["char"]) === "-") {
58285
58450
  this["char"]++;
58286
- this.commentStart();
58451
+ this.createComment();
58287
58452
  }
58288
58453
  },
58289
58454
 
@@ -58343,7 +58508,7 @@ enifed("simple-html-tokenizer/tokenizer",
58343
58508
  } else if (char === ">") {
58344
58509
  return this.emitToken();
58345
58510
  } else {
58346
- this.token.addToTagName(char);
58511
+ this.addToTagName(char);
58347
58512
  }
58348
58513
  },
58349
58514
 
@@ -58355,7 +58520,7 @@ enifed("simple-html-tokenizer/tokenizer",
58355
58520
  } else if (char === ">") {
58356
58521
  return this.emitToken();
58357
58522
  } else {
58358
- this.attribute(char);
58523
+ this.createAttribute(char);
58359
58524
  }
58360
58525
  },
58361
58526
 
@@ -58384,7 +58549,7 @@ enifed("simple-html-tokenizer/tokenizer",
58384
58549
  return this.emitToken();
58385
58550
  } else {
58386
58551
  this.finalizeAttributeValue();
58387
- this.attribute(char);
58552
+ this.createAttribute(char);
58388
58553
  }
58389
58554
  },
58390
58555
 
@@ -58466,7 +58631,7 @@ enifed("simple-html-tokenizer/tokenizer",
58466
58631
 
58467
58632
  endTagOpen: function(char) {
58468
58633
  if (isAlpha(char)) {
58469
- this.tag(EndTag, char.toLowerCase());
58634
+ this.createTag(EndTag, char.toLowerCase());
58470
58635
  }
58471
58636
  }
58472
58637
  }
@@ -58483,84 +58648,24 @@ enifed("simple-html-tokenizer/tokens",
58483
58648
  this.tagName = tagName || '';
58484
58649
  this.attributes = attributes || [];
58485
58650
  this.selfClosing = selfClosing === true;
58486
- this._currentAttribute = undefined;
58487
58651
  }
58488
58652
 
58489
- __exports__.StartTag = StartTag;StartTag.prototype = {
58490
- addToTagName: function(char) {
58491
- this.tagName += char;
58492
- },
58493
-
58494
- startAttribute: function(char) {
58495
- this._currentAttribute = [char.toLowerCase(), "", null];
58496
- this.attributes.push(this._currentAttribute);
58497
- },
58498
-
58499
- addToAttributeName: function(char) {
58500
- this._currentAttribute[0] += char;
58501
- },
58502
-
58503
- markAttributeQuoted: function(value) {
58504
- this._currentAttribute[2] = value;
58505
- },
58506
-
58507
- addToAttributeValue: function(char) {
58508
- this._currentAttribute[1] = this._currentAttribute[1] || "";
58509
- this._currentAttribute[1] += char;
58510
- },
58511
-
58512
- finalizeAttributeValue: function() {
58513
- if (this._currentAttribute) {
58514
- if (this._currentAttribute[2] === null) {
58515
- this._currentAttribute[2] = false;
58516
- }
58517
- this._currentAttribute = undefined;
58518
- }
58519
- },
58520
-
58521
- finalize: function() {
58522
- this.finalizeAttributeValue();
58523
- return this;
58524
- }
58525
- };
58526
-
58527
- function EndTag(tagName) {
58653
+ __exports__.StartTag = StartTag;function EndTag(tagName) {
58528
58654
  this.type = 'EndTag';
58529
58655
  this.tagName = tagName || '';
58530
58656
  }
58531
58657
 
58532
- __exports__.EndTag = EndTag;EndTag.prototype = {
58533
- addToTagName: function(char) {
58534
- this.tagName += char;
58535
- },
58536
- finalize: function () {
58537
- return this;
58538
- }
58539
- };
58540
-
58541
- function Chars(chars) {
58658
+ __exports__.EndTag = EndTag;function Chars(chars) {
58542
58659
  this.type = 'Chars';
58543
58660
  this.chars = chars || "";
58544
58661
  }
58545
58662
 
58546
- __exports__.Chars = Chars;Chars.prototype = {
58547
- addChar: function(char) {
58548
- this.chars += char;
58549
- }
58550
- };
58551
-
58552
- function Comment(chars) {
58663
+ __exports__.Chars = Chars;function Comment(chars) {
58553
58664
  this.type = 'Comment';
58554
58665
  this.chars = chars || '';
58555
58666
  }
58556
58667
 
58557
- __exports__.Comment = Comment;Comment.prototype = {
58558
- addChar: function(char) {
58559
- this.chars += char;
58560
- },
58561
-
58562
- finalize: function() { return this; }
58563
- };
58668
+ __exports__.Comment = Comment;
58564
58669
  });
58565
58670
  enifed("simple-html-tokenizer/utils",
58566
58671
  ["exports"],