diff --git a/vendors/knockout/build/output/knockout-latest.debug.js b/vendors/knockout/build/output/knockout-latest.debug.js
index 54db3587e..67edb4803 100644
--- a/vendors/knockout/build/output/knockout-latest.debug.js
+++ b/vendors/knockout/build/output/knockout-latest.debug.js
@@ -88,13 +88,6 @@ ko.utils = (function () {
var canSetPrototype = ({ __proto__: [] } instanceof Array);
- function isClickOnCheckableElement(element, eventType) {
- if ((element.nodeName !== "INPUT") || !element.type) return false;
- if (eventType.toLowerCase() != "click") return false;
- var inputType = element.type;
- return (inputType == "checkbox") || (inputType == "radio");
- }
-
return {
arrayForEach: function (array, action, actionOwner) {
arrayCall('forEach', array, action, actionOwner);
@@ -182,7 +175,7 @@ ko.utils = (function () {
setDomNodeChildren: function (domNode, childNodes) {
ko.utils.emptyDomNode(domNode);
if (childNodes) {
- Element.prototype.append.apply(domNode, childNodes);
+ domNode.append.apply(domNode, childNodes);
}
},
@@ -314,17 +307,7 @@ ko.utils = (function () {
if (!(element && element.nodeType))
throw new Error("element must be a DOM node when calling triggerEvent");
- // For click events on checkboxes and radio buttons, jQuery toggles the element checked state *after* the
- // event handler runs instead of *before*. (This was fixed in 1.9 for checkboxes but not for radio buttons.)
- // IE doesn't change the checked state when you trigger the click event using "fireEvent".
- // In both cases, we'll use the click method instead.
- var useClickWorkaround = isClickOnCheckableElement(element, eventType);
-
- if (!ko.options['useOnlyNativeEvents'] && jQuery && !useClickWorkaround) {
- jQuery(element)['trigger'](eventType);
- } else {
- element.dispatchEvent(new Event(eventType));
- }
+ element.dispatchEvent(new Event(eventType));
},
unwrapObservable: function (value) {
@@ -556,12 +539,6 @@ ko.exportSymbol('utils.domNodeDisposal.removeDisposeCallback', ko.utils.domNodeD
var windowContext = documentContext['parentWindow'] || documentContext['defaultView'] || window;
// Based on jQuery's "clean" function, but only accounting for table-related elements.
- // If you have referenced jQuery, this won't be used anyway - KO will use jQuery's "clean" function directly
-
- // Note that there's still an issue in IE < 9 whereby it will discard comment nodes that are the first child of
- // a descendant node. For example: "
abc
" will get parsed as "
abc
"
- // This won't affect anyone who has referenced jQuery, and there's always the workaround of inserting a dummy node
- // (possibly a text node) in front of the comment. So, KO does not attempt to workaround this IE issue automatically at present.
// Trim whitespace, otherwise indexOf won't work as expected
var tags = ko.utils.stringTrim(html).toLowerCase(), div = documentContext.createElement("div"),
@@ -696,32 +673,13 @@ ko.tasks = (function () {
nextHandle = 1,
nextIndexToProcess = 0;
- if (window['MutationObserver']) {
- // Chrome 27+, Firefox 14+, IE 11+, Opera 15+, Safari 6.1+
- // From https://github.com/petkaantonov/bluebird * Copyright (c) 2014 Petka Antonov * License: MIT
- scheduler = (function (callback) {
- var div = document.createElement("div");
- new MutationObserver(callback).observe(div, {attributes: true});
- return function () { div.classList.toggle("foo"); };
- })(scheduledProcess);
- } else if (document && "onreadystatechange" in document.createElement("script")) {
- // IE 6-10
- // From https://github.com/YuzuJS/setImmediate * Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola * License: MIT
- scheduler = function (callback) {
- var script = document.createElement("script");
- script.onreadystatechange = function () {
- script.onreadystatechange = null;
- document.documentElement.removeChild(script);
- script = null;
- callback();
- };
- document.documentElement.append(script);
- };
- } else {
- scheduler = function (callback) {
- setTimeout(callback, 0);
- };
- }
+ // Chrome 27+, Firefox 14+, IE 11+, Opera 15+, Safari 6.1+
+ // From https://github.com/petkaantonov/bluebird * Copyright (c) 2014 Petka Antonov * License: MIT
+ scheduler = (function (callback) {
+ var div = document.createElement("div");
+ new MutationObserver(callback).observe(div, {attributes: true});
+ return function () { div.classList.toggle("foo"); };
+ })(scheduledProcess);
function processTasks() {
if (taskQueueLength) {
@@ -1333,52 +1291,8 @@ ko.observableArray['fn'] = {
});
},
- 'destroy': function (valueOrPredicate) {
- var underlyingArray = this.peek();
- var predicate = typeof valueOrPredicate == "function" && !ko.isObservable(valueOrPredicate) ? valueOrPredicate : function (value) { return value === valueOrPredicate; };
- this.valueWillMutate();
- for (var i = underlyingArray.length - 1; i >= 0; i--) {
- var value = underlyingArray[i];
- if (predicate(value))
- value["_destroy"] = true;
- }
- this.valueHasMutated();
- },
-
- 'destroyAll': function (arrayOfValues) {
- // If you passed zero args, we destroy everything
- if (arrayOfValues === undefined)
- return this['destroy'](function() { return true });
-
- // If you passed an arg, we interpret it as an array of entries to destroy
- if (!arrayOfValues)
- return [];
- return this['destroy'](function (value) {
- return ko.utils.arrayIndexOf(arrayOfValues, value) >= 0;
- });
- },
-
'indexOf': function (item) {
- var underlyingArray = this();
- return ko.utils.arrayIndexOf(underlyingArray, item);
- },
-
- 'replace': function(oldItem, newItem) {
- var index = this['indexOf'](oldItem);
- if (index >= 0) {
- this.valueWillMutate();
- this.peek()[index] = newItem;
- this.valueHasMutated();
- }
- },
-
- 'sorted': function (compareFunction) {
- var arrayCopy = this().slice(0);
- return compareFunction ? arrayCopy.sort(compareFunction) : arrayCopy.sort();
- },
-
- 'reversed': function () {
- return this().slice(0).reverse();
+ return ko.utils.arrayIndexOf(this(), item);
}
};
@@ -2166,9 +2080,7 @@ ko.exportSymbol('when', ko.when);
case 'option':
if (typeof value === "string") {
ko.utils.domData.set(element, ko.bindingHandlers.options.optionValueDomDataKey, undefined);
- if (hasDomDataExpandoProperty in element) { // IE <= 8 throws errors if you delete non-existent properties from a DOM node
- delete element[hasDomDataExpandoProperty];
- }
+ delete element[hasDomDataExpandoProperty];
element.value = value;
}
else {
@@ -2428,21 +2340,16 @@ ko.exportSymbol('jsonExpressionRewriting.insertPropertyAccessorsIntoJson', ko.ex
// The point of all this is to support containerless templates (e.g., blah)
// without having to scatter special cases all over the binding and templating code.
- // IE 9 cannot reliably read the "nodeValue" property of a comment node (see https://github.com/SteveSanderson/knockout/issues/186)
- // but it does give them a nonstandard alternative property called "text" that it can read reliably. Other browsers don't have that property.
- // So, use node.text where available, and node.nodeValue elsewhere
- var commentNodesHaveTextProperty = document && document.createComment("test").text === "";
-
- var startCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*ko(?:\s+([\s\S]+))?\s*$/;
- var endCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*\/ko\s*$/;
+ var startCommentRegex = /^\s*ko(?:\s+([\s\S]+))?\s*$/;
+ var endCommentRegex = /^\s*\/ko\s*$/;
var htmlTagsWithOptionallyClosingChildren = { 'ul': true, 'ol': true };
function isStartComment(node) {
- return (node.nodeType == 8) && startCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue);
+ return (node.nodeType == 8) && startCommentRegex.test(node.nodeValue);
}
function isEndComment(node) {
- return (node.nodeType == 8) && endCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue);
+ return (node.nodeType == 8) && endCommentRegex.test(node.nodeValue);
}
function isUnmatchedEndComment(node) {
@@ -2602,37 +2509,8 @@ ko.exportSymbol('jsonExpressionRewriting.insertPropertyAccessorsIntoJson', ko.ex
hasBindingValue: isStartComment,
virtualNodeBindingValue: function(node) {
- var regexMatch = (commentNodesHaveTextProperty ? node.text : node.nodeValue).match(startCommentRegex);
+ var regexMatch = (node.nodeValue).match(startCommentRegex);
return regexMatch ? regexMatch[1] : null;
- },
-
- normaliseVirtualElementDomStructure: function(elementVerified) {
- // Workaround for https://github.com/SteveSanderson/knockout/issues/155
- // (IE <= 8 or IE 9 quirks mode parses your HTML weirdly, treating closing tags as if they don't exist, thereby moving comment nodes
- // that are direct descendants of
into the preceding
)
- if (!htmlTagsWithOptionallyClosingChildren[ko.utils.tagNameLower(elementVerified)])
- return;
-
- // Scan immediate children to see if they contain unbalanced comment tags. If they do, those comment tags
- // must be intended to appear *after* that child, so move them there.
- var childNode = elementVerified.firstChild;
- if (childNode) {
- do {
- if (childNode.nodeType === 1) {
- var unbalancedTags = getUnbalancedChildTags(childNode);
- if (unbalancedTags) {
- // Fix up the DOM by moving the unbalanced tags to where they most likely were intended to be placed - *after* the child
- var nodeToInsertBefore = childNode.nextSibling;
- for (var i = 0; i < unbalancedTags.length; i++) {
- if (nodeToInsertBefore)
- elementVerified.insertBefore(unbalancedTags[i], nodeToInsertBefore);
- else
- elementVerified.append(unbalancedTags[i]);
- }
- }
- }
- } while (childNode = childNode.nextSibling);
- }
}
};
})();
@@ -3056,8 +2934,6 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
var bindingContextForDescendants = bindingContext;
var isElement = (nodeVerified.nodeType === 1);
- if (isElement) // Workaround IE <= 8 HTML parsing weirdness
- ko.virtualElements.normaliseVirtualElementDomStructure(nodeVerified);
// Perf optimisation: Apply bindings only if...
// (1) We need to store the binding info for the node (all element nodes)
@@ -3268,8 +3144,6 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
}
ko.applyBindingAccessorsToNode = function (node, bindings, viewModelOrBindingContext) {
- if (node.nodeType === 1) // If it's an element, workaround IE <= 8 HTML parsing weirdness
- ko.virtualElements.normaliseVirtualElementDomStructure(node);
return applyBindingsToNodeInternal(node, bindings, getBindingContext(viewModelOrBindingContext));
};
@@ -3302,7 +3176,6 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
if (node && (node.nodeType === 1 || node.nodeType === 8)) {
return ko.storedBindingContextForNode(node);
}
- return undefined;
};
ko.dataFor = function(node) {
var context = ko.contextFor(node);
@@ -3317,7 +3190,6 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
ko.exportSymbol('applyBindingsToDescendants', ko.applyBindingsToDescendants);
ko.exportSymbol('applyBindingAccessorsToNode', ko.applyBindingAccessorsToNode);
ko.exportSymbol('applyBindingsToNode', ko.applyBindingsToNode);
- ko.exportSymbol('contextFor', ko.contextFor);
ko.exportSymbol('dataFor', ko.dataFor);
})();
(function(undefined) {
@@ -3621,22 +3493,14 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
}
function cloneNodesFromTemplateSourceElement(elemInstance) {
- switch (ko.utils.tagNameLower(elemInstance)) {
- case 'script':
- return ko.utils.parseHtmlFragment(elemInstance.text);
- case 'textarea':
- return ko.utils.parseHtmlFragment(elemInstance.value);
- case 'template':
- // For browsers with proper element support (i.e., where the .content property
- // gives a document fragment), use that document fragment.
- if (isDocumentFragment(elemInstance.content)) {
- return ko.utils.cloneNodes(elemInstance.content.childNodes);
- }
+ if ('template' == ko.utils.tagNameLower(elemInstance)) {
+ // For browsers with proper element support (i.e., where the .content property
+ // gives a document fragment), use that document fragment.
+ if (isDocumentFragment(elemInstance.content)) {
+ return ko.utils.cloneNodes(elemInstance.content.childNodes);
+ }
}
-
- // Regular elements such as
, and elements on old browsers that don't really
- // understand and just treat it as a regular container
- return ko.utils.cloneNodes(elemInstance.childNodes);
+ throw 'Template Source Element not a ';
}
function isDomElement(obj) {
@@ -3689,9 +3553,6 @@ ko.exportSymbol('bindingProvider', ko.bindingProvider);
// By default, the default loader is the only registered component loader
ko.components['loaders'].push(ko.components.defaultLoader);
-
- // Privately expose the underlying config registry for use in old-IE shim
- ko.components._allRegisteredComponents = defaultConfigRegistry;
})();
(function (undefined) {
// Overridable API for determining which component name applies to a given node. By overriding this,
@@ -4036,10 +3897,6 @@ ko.bindingHandlers['checked'] = {
useElementValue = isRadio || valueIsArray,
oldElemValue = valueIsArray ? checkedValue() : undefined;
- // IE 6 won't allow radio buttons to be selected unless they have a name
- if (isRadio && !element.name)
- ko.bindingHandlers['uniqueName']['init'](element, function() { return true });
-
// Set up two computeds to update the binding:
// The first responds to changes in the checkedValue value and to element clicks
@@ -4533,10 +4390,7 @@ ko.bindingHandlers['selectedOptions'] = {
if (newValue && typeof newValue.length == "number") {
ko.utils.arrayForEach(element.getElementsByTagName("option"), function(node) {
- var isSelected = ko.utils.arrayIndexOf(newValue, ko.selectExtensions.readValue(node)) >= 0;
- if (node.selected != isSelected) { // This check prevents flashing of the select element in IE
- node.selected = isSelected;
- }
+ node.selected = ko.utils.arrayIndexOf(newValue, ko.selectExtensions.readValue(node)) >= 0;
});
}
diff --git a/vendors/knockout/build/output/knockout-latest.js b/vendors/knockout/build/output/knockout-latest.js
index d6a61e01d..56c6badbe 100644
--- a/vendors/knockout/build/output/knockout-latest.js
+++ b/vendors/knockout/build/output/knockout-latest.js
@@ -4,118 +4,115 @@
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
-(function() {(function(n){var F=this||(0,eval)("this"),z=F.document,H=F.jQuery;H||"undefined"===typeof jQuery||(H=jQuery);(function(n){"function"===typeof define&&define.amd?define(["exports","require"],n):"object"===typeof exports&&"object"===typeof module?n(module.exports||exports):n(F.ko={})})(function(H,Q){function J(a,c){return null===a||typeof a in T?a===c:!1}function U(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function V(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,
-c)}}function W(a,c){c&&"change"!==c?"beforeChange"===c?this.hc(a):this.bb(a,c):this.ic(a)}function X(a,c){null!==c&&c.s&&c.s()}function Y(a,c){var d=this.bd,e=d[q];e.pa||(this.Jb&&this.ib[c]?(d.mc(c,a,this.ib[c]),this.ib[c]=null,--this.Jb):e.F[c]||d.mc(c,a,e.G?{aa:a}:d.Oc(a)),a.Ga&&a.Tc())}function L(a,c,d){if(c){var e=d?"add":"remove";c.split(/\s+/).forEach(function(c){a.classList[e](c)})}}var a="undefined"!==typeof H?H:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;fa.length?!1:a.substring(0,b.length)===b},fd:function(a,b){return b.contains(1!==a.nodeType?a.parentNode:a)},Lb:function(b){return a.a.fd(b,b.ownerDocument.documentElement)},Wc:function(b){return!!a.a.Fb(b,a.a.Lb)},$:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},rc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.rc(b),c)},xc:function(b){setTimeout(function(){a.onError&&
-a.onError(b);throw b;},0)},H:function(b,c,d){d=a.a.rc(d);if(!a.options.useOnlyNativeEvents&&jQuery)jQuery(b).on(c,d);else b.addEventListener(c,d,!1)},zb:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"INPUT"===b.nodeName&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;a.options.useOnlyNativeEvents||!jQuery||d?b.dispatchEvent(new Event(c)):jQuery(b).trigger(c)},g:function(b){return a.R(b)?b():b},Vb:function(b){return a.R(b)?
-b.v():b},xb:function(b,c){var d=a.a.g(c);if(null===d||d===n)d="";var e=a.f.firstChild(b);!e||3!=e.nodeType||a.f.nextSibling(e)?a.f.ta(b,[b.ownerDocument.createTextNode(d)]):e.data=d},Ca:function(a){return Array.from(a)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.K);a.b("utils.arrayFirst",a.a.Fb);a.b("utils.arrayFilter",a.a.fb);a.b("utils.arrayIndexOf",a.a.L);a.b("utils.arrayPushAll",a.a.Gb);a.b("utils.arrayRemoveItem",a.a.Ma);a.b("utils.cloneNodes",a.a.za);a.b("utils.extend",a.a.extend);a.b("utils.objectMap",
-a.a.Da);a.b("utils.peekObservable",a.a.Vb);a.b("utils.registerEventHandler",a.a.H);a.b("utils.stringifyJson",a.a.Hd);a.b("utils.triggerEvent",a.a.zb);a.b("utils.unwrapObservable",a.a.g);a.b("utils.objectForEach",a.a.O);a.b("utils.setTextContent",a.a.xb);a.b("unwrap",a.a.g);a.a.h=new function(){var a=0,c="__ko__"+Date.now(),d;d=function(a,b){var d=a[c];!d&&b&&(d=a[c]={});return d};return{get:function(a,b){var c=d(a,!1);return c&&c[b]},set:function(a,b,c){(a=d(a,c!==n))&&(a[b]=c)},Nb:function(a,b,c){a=
-d(a,!0);return a[b]||(a[b]=c)},clear:function(a){return a[c]?(delete a[c],!0):!1},fa:function(){return a++ +c}}};a.b("utils.domData",a.a.h);a.b("utils.domData.clear",a.a.h.clear);a.a.N=new function(){function b(b,c){var d=a.a.h.get(b,e);d===n&&c&&(d=[],a.a.h.set(b,e,d));return d}function c(c){var e=b(c,!1);if(e)for(var e=e.slice(0),k=0;k",""],d=[3,"
";for("function"==typeof h.innerShiv?e.append(h.innerShiv(n)):e.innerHTML=n;m--;)e=e.lastChild;return a.a.ya(e.lastChild.childNodes)};a.a.vd=function(b,c){var d=a.a.Ua(b,c);return d.length&&d[0].parentElement||a.a.Rb(d)};a.a.Zb=function(b,c){a.a.Mb(b);c=a.a.f(c);if(null!==c&&c!==p){"string"!=typeof c&&(c=c.toString());for(var d=a.a.Ua(c,b.ownerDocument),e=0;eb){if(5E3<=++c){g=e;a.a.wc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{h()}catch(f){a.a.wc(f)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:function(a){var b=E.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c),
+vb:function(b){e||a.la.scheduler(c);d[e++]=b;return f++},cancel:function(a){a=a-(f-e);a>=g&&ad[0]?m+d[0]:d[0]),m);for(var m=1===n?m:Math.min(c+(d[1]||
+0),m),n=c+n-2,g=Math.max(m,n),R=[],S=[],p=2;c=q){c.push(k&&w.length?{key:k,value:w.join("")}:{unknown:k||w.join("")});k=q=0;w=[];continue}}else if(58===t){if(!q&&!k&&1===w.length){k=w.pop();continue}}else if(47===t&&1arguments.length){if(b=E.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!b||1!==b.nodeType&&
+8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");h(w(a,c),b)};a.ad=function(b){if(b&&(1===b.nodeType||8===b.nodeType))return a.zd(b)};a.uc=function(b){return(b=a.ad(b))?b.$data:p};a.b("bindingHandlers",a.c);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.yb);a.b("applyBindings",a.nc);a.b("applyBindingsToDescendants",a.Ha);a.b("applyBindingAccessorsToNode",
+a.eb);a.b("applyBindingsToNode",a.Vc);a.b("dataFor",a.uc)})();(function(b){function c(c,e){var h=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,m;h?h.subscribe(e):(h=f[c]=new a.R,h.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,od:e};delete f[c];m||e?h.notifySubscribers(b):a.la.vb(function(){h.notifySubscribers(b)})}),m=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,h,f){f||(f=a.l.loaders.slice(0));
+var n=f.shift();if(n){var g=n[c];if(g){var q=!1;if(g.apply(n,d.concat(function(a){q?h(null):null!==a?h(a):e(c,d,h,f)}))!==b&&(q=!0,!n.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,h,f)}else h(null)}var f={},g={};a.l={get:function(d,e){var h=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;h?h.od?a.u.C(function(){e(h.definition)}):a.la.vb(function(){e(h.definition)}):c(d,e)},sc:function(a){delete g[a]},
+gc:e};a.l.loaders=[];a.b("components",a.l);a.b("components.get",a.l.get);a.b("components.clearCachedDefinition",a.l.sc)})();(function(){function b(b,c,d,e){function g(){0===--u&&e(k)}var k={},u=2,t=d.template;d=d.viewModel;t?f(c,t,function(c){a.l.gc("loadTemplate",[b,c],function(a){k.template=a;g()})}):g();d?f(c,d,function(c){a.l.gc("loadViewModel",[b,c],function(a){k[l]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[l])d(b[l]);
+else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){if("template"==a.a.fa(b)&&e(b.content))return a.a.La(b.content.childNodes);throw"Template Source Element not a ";}function e(a){return D.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?Q||D.require?(Q||D.require)([b.require],function(a){a&&"object"===typeof a&&a.Dd&&a["default"]&&
+(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var k={};a.l.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.l.pb(b))throw Error("Component "+b+" is already registered");k[b]=c};a.l.pb=function(a){return Object.prototype.hasOwnProperty.call(k,a)};a.l.unregister=function(b){delete k[b];a.l.sc(b)};a.l.vc={getConfig:function(b,c){c(a.l.pb(b)?k[b]:null)},loadComponent:function(a,
+c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.Ua(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.ya(c.childNodes));else if(c.element)if(c=c.element,D.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var k=E.getElementById(c);k?f(d(k)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),
+b,d)}};var l="createViewModel";a.b("components.register",a.l.register);a.b("components.isRegistered",a.l.pb);a.b("components.unregister",a.l.unregister);a.b("components.defaultLoader",a.l.vc);a.l.loaders.push(a.l.vc)})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.za(f,function(c){return a.o(c,null,{j:b})}),g=a.a.za(f,function(c){var e=c.w();return c.ia()?a.o({read:function(){return a.a.f(c())},write:a.Ta(e)&&
+function(a){c()(a)},j:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.l.getComponentNameForNode=function(b){var c=a.a.fa(b);if(a.l.pb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b))return c};a.l.lc=function(c,e,f,g){if(1===e.nodeType){var k=a.l.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:k,params:b(e,f)};c.component=g?function(){return l}:
+l}}return c};var c=new a.ca})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.La(c);a.g.sa(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,b,c):b}var d=0;a.c.component={init:function(e,f,g,k,l){function h(){var a=m&&m.dispose;"function"===typeof a&&a.call(m);w&&w.s();n=m=w=null}var m,n,w,q=a.a.ya(a.g.childNodes(e));a.g.wa(e);a.a.M.Ga(e,h);a.o(function(){var g=a.a.f(f()),k,t;"string"===typeof g?k=g:(k=a.a.f(g.name),t=a.a.f(g.params));
+if(!k)throw Error("No component name specified");var p=a.i.yb(e,l),A=n=++d;a.l.get(k,function(d){if(n===A){h();if(!d)throw Error("Unknown component '"+k+"'");b(k,d,e);var f=c(d,t,{element:e,templateNodes:q});d=p.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=q}});f&&f.koDescendantsComplete&&(w=a.i.subscribe(e,a.i.na,f.koDescendantsComplete,f));m=f;a.Ha(d,e)}})},null,{j:e});return{controlsDescendantBindings:!0}}};a.g.aa.component=!0})();a.c.attr={update:function(b,
+c){var d=a.a.f(c())||{};a.a.N(d,function(c,d){d=a.a.f(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0f?e&&b.push(d):e||b.splice(f,1)}a.c.checked={after:["value","attr"],init:function(c,d,e){function f(){var f=c.checked,g=k();
+if(!a.P.Sa()&&(f||!h&&!a.P.oa())){var m=a.u.C(d);if(n){var q=w?m.w():m,r=v;v=g;r!==g?f&&(b(q,g,!0),b(q,r,!1)):b(q,g,f);w&&a.Ta(m)&&m(q)}else l&&(g===p?g=f:f||(g=p)),a.m.$a(m,e,"checked",g,!0)}}function g(){var b=a.a.f(d()),e=k();n?(c.checked=0<=a.a.O(b,e),v=e):c.checked=l&&e===p?!!b:k()===b}var k=a.tb(function(){if(e.has("checkedValue"))return a.a.f(e.get("checkedValue"));if(q)return e.has("value")?a.a.f(e.get("value")):c.value}),l="checkbox"==c.type,h="radio"==c.type;if(l||h){var m=d(),n=l&&a.a.f(m)instanceof
+Array,w=!(n&&m.push&&m.splice),q=h||n,v=n?k():p;a.o(f,null,{j:c});a.a.H(c,"click",f);a.o(g,null,{j:c});m=p}}};a.m.ta.checked=!0;a.c.checkedValue={update:function(b,d){b.value=a.a.f(d())}}})();a.c["class"]={update:function(b,c){var d=a.a.$b(a.a.f(c()));L(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;L(b,d,!0)}};a.c.css={update:function(b,c){var d=a.a.f(c());null!==d&&"object"==typeof d?a.a.N(d,function(c,d){d=a.a.f(d);L(b,c,d)}):a.c["class"].update(b,c)}};a.c.enable={update:function(b,c){var d=a.a.f(c());
+d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.c.disable={update:function(b,c){a.c.enable.update(b,function(){return!a.a.f(c())})}};a.c.event={init:function(b,c,d,e,f){var g=c()||{};a.a.N(g,function(g){"string"==typeof g&&a.a.H(b,g,function(b){var h,m=c()[g];if(m){try{var n=a.a.ya(arguments);e=f.$data;n.unshift(e);h=m.apply(e,n)}finally{!0!==h&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};
+a.c.foreach={Fc:function(b){return function(){var c=b(),d=a.a.Vb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.Z.Fa};a.a.f(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.Z.Fa}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.Fc(c))},update:function(b,c,d,e,f){return a.c.template.update(b,
+a.c.foreach.Fc(c),d,e,f)}};a.m.Ka.foreach=!1;a.g.aa.foreach=!0;a.c.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;e=b.ownerDocument.activeElement===b;var f=c();a.m.$a(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.H(b,"focus",f);a.a.H(b,"focusin",f);a.a.H(b,"blur",g);a.a.H(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.f(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===
+d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.u.C(a.a.zb,null,[b,d?"focusin":"focusout"]))}};a.m.ta.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.m.ta.hasFocus="hasfocus";a.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Zb(b,c())}};(function(){function b(b,d,e){a.c[b]={init:function(b,c,k,l,h){var m,n,w={},q,p,u;if(d){l=k.get("as");var t=k.get("noChildContext");u=!(l&&t);w={as:l,noChildContext:t,exportDependencies:u}}p=(q=
+"render"==k.get("completeOn"))||k.has(a.i.na);a.o(function(){var k=a.a.f(c()),l=!e!==!k,t=!n,r;if(u||l!==m){p&&(h=a.i.yb(b,h));if(l){if(!d||u)w.dataDependency=a.P.o();r=d?h.createChildContext("function"==typeof k?k:c,w):a.P.oa()?h.extend(null,w):h}t&&a.P.oa()&&(n=a.a.La(a.g.childNodes(b),!0));l?(t||a.g.sa(b,a.a.La(n)),a.Ha(r,b)):(a.g.wa(b),q||a.i.ka(b,a.i.D));m=l}},null,{j:b});return{controlsDescendantBindings:!0}}};a.m.Ka[b]=!1;a.g.aa[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.c.let={init:function(b,
+c,d,e,f){c=f.extend(c);a.Ha(c,b);return{controlsDescendantBindings:!0}}};a.g.aa.let=!0;var P={};a.c.options={init:function(b){if("select"!==a.a.fa(b))throw Error("options binding applies only to SELECT elements");for(;0]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{fd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.cc.sd(b,c)},d)},sd:function(a,f){return a.replace(c,function(a,c,d,e,m){return b(m,c,d,f)}).replace(d,function(a,c){return b(c,
+"\x3c!-- ko --\x3e","#comment",f)})},Wc:function(b,c){return a.Y.Qb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.eb(l,b,k)})}}}();a.b("__tr_ambtns",a.cc.Wc);(function(){a.A={};a.A.B=function(b){if(this.B=b){var c=a.a.fa(b);this.Va="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.A.B.prototype.text=function(){var b=1===this.Va?"text":2===this.Va?"value":"innerHTML";if(0==arguments.length)return this.B[b];var c=arguments[0];"innerHTML"===
+b?a.a.Zb(this.B,c):this.B[b]=c};var b=a.a.h.ea()+"_";a.A.B.prototype.data=function(c){if(1===arguments.length)return a.a.h.get(this.B,b+c);a.a.h.set(this.B,b+c,arguments[1])};var c=a.a.h.ea();a.A.B.prototype.nodes=function(){var b=this.B;if(0==arguments.length){var e=a.a.h.get(b,c)||{},f=e.hb||(3===this.Va?b.content:4===this.Va?b:p);if(!f||e.Tc){var g=this.text();g&&g!==e.Wa&&(f=a.a.vd(g,b.ownerDocument),a.a.h.set(b,c,{hb:f,Wa:g,Tc:!0}))}return f}e=arguments[0];this.Va!==p&&this.text("");a.a.h.set(b,
+c,{hb:e})};a.A.ha=function(a){this.B=a};a.A.ha.prototype=new a.A.B;a.A.ha.prototype.constructor=a.A.ha;a.A.ha.prototype.text=function(){if(0==arguments.length){var b=a.a.h.get(this.B,c)||{};b.Wa===p&&b.hb&&(b.Wa=b.hb.innerHTML);return b.Wa}a.a.h.set(this.B,c,{Wa:arguments[0]})};a.b("templateSources",a.A);a.b("templateSources.domElement",a.A.B);a.b("templateSources.anonymousTemplate",a.A.ha)})();(function(){function b(b,c,d){var e;for(c=a.g.nextSibling(c);b&&(e=b)!==c;)b=a.g.nextSibling(e),d(e,b)}
+function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.ca.instance,l=k.preprocessNode;if(l){b(e,f,function(a,b){var c=a.previousSibling,d=l.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Oa(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.nc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Y.Oc(b,[d])});a.a.Oa(c,g)}}function d(a){return a.nodeType?a:0= 0;
- if (node.selected != isSelected) { // This check prevents flashing of the select element in IE
- node.selected = isSelected;
- }
+ node.selected = ko.utils.arrayIndexOf(newValue, ko.selectExtensions.readValue(node)) >= 0;
});
}
diff --git a/vendors/knockout/src/binding/selectExtensions.js b/vendors/knockout/src/binding/selectExtensions.js
index 69fb0e874..6d02e7310 100644
--- a/vendors/knockout/src/binding/selectExtensions.js
+++ b/vendors/knockout/src/binding/selectExtensions.js
@@ -23,9 +23,7 @@
case 'option':
if (typeof value === "string") {
ko.utils.domData.set(element, ko.bindingHandlers.options.optionValueDomDataKey, undefined);
- if (hasDomDataExpandoProperty in element) { // IE <= 8 throws errors if you delete non-existent properties from a DOM node
- delete element[hasDomDataExpandoProperty];
- }
+ delete element[hasDomDataExpandoProperty];
element.value = value;
}
else {
diff --git a/vendors/knockout/src/components/defaultLoader.js b/vendors/knockout/src/components/defaultLoader.js
index e80506843..97b0e5b83 100644
--- a/vendors/knockout/src/components/defaultLoader.js
+++ b/vendors/knockout/src/components/defaultLoader.js
@@ -157,22 +157,14 @@
}
function cloneNodesFromTemplateSourceElement(elemInstance) {
- switch (ko.utils.tagNameLower(elemInstance)) {
- case 'script':
- return ko.utils.parseHtmlFragment(elemInstance.text);
- case 'textarea':
- return ko.utils.parseHtmlFragment(elemInstance.value);
- case 'template':
- // For browsers with proper element support (i.e., where the .content property
- // gives a document fragment), use that document fragment.
- if (isDocumentFragment(elemInstance.content)) {
- return ko.utils.cloneNodes(elemInstance.content.childNodes);
- }
+ if ('template' == ko.utils.tagNameLower(elemInstance)) {
+ // For browsers with proper element support (i.e., where the .content property
+ // gives a document fragment), use that document fragment.
+ if (isDocumentFragment(elemInstance.content)) {
+ return ko.utils.cloneNodes(elemInstance.content.childNodes);
+ }
}
-
- // Regular elements such as
, and elements on old browsers that don't really
- // understand and just treat it as a regular container
- return ko.utils.cloneNodes(elemInstance.childNodes);
+ throw 'Template Source Element not a ';
}
function isDomElement(obj) {
@@ -225,7 +217,4 @@
// By default, the default loader is the only registered component loader
ko.components['loaders'].push(ko.components.defaultLoader);
-
- // Privately expose the underlying config registry for use in old-IE shim
- ko.components._allRegisteredComponents = defaultConfigRegistry;
})();
diff --git a/vendors/knockout/src/subscribables/observableArray.js b/vendors/knockout/src/subscribables/observableArray.js
index e10871144..b598118b9 100644
--- a/vendors/knockout/src/subscribables/observableArray.js
+++ b/vendors/knockout/src/subscribables/observableArray.js
@@ -52,52 +52,8 @@ ko.observableArray['fn'] = {
});
},
- 'destroy': function (valueOrPredicate) {
- var underlyingArray = this.peek();
- var predicate = typeof valueOrPredicate == "function" && !ko.isObservable(valueOrPredicate) ? valueOrPredicate : function (value) { return value === valueOrPredicate; };
- this.valueWillMutate();
- for (var i = underlyingArray.length - 1; i >= 0; i--) {
- var value = underlyingArray[i];
- if (predicate(value))
- value["_destroy"] = true;
- }
- this.valueHasMutated();
- },
-
- 'destroyAll': function (arrayOfValues) {
- // If you passed zero args, we destroy everything
- if (arrayOfValues === undefined)
- return this['destroy'](function() { return true });
-
- // If you passed an arg, we interpret it as an array of entries to destroy
- if (!arrayOfValues)
- return [];
- return this['destroy'](function (value) {
- return ko.utils.arrayIndexOf(arrayOfValues, value) >= 0;
- });
- },
-
'indexOf': function (item) {
- var underlyingArray = this();
- return ko.utils.arrayIndexOf(underlyingArray, item);
- },
-
- 'replace': function(oldItem, newItem) {
- var index = this['indexOf'](oldItem);
- if (index >= 0) {
- this.valueWillMutate();
- this.peek()[index] = newItem;
- this.valueHasMutated();
- }
- },
-
- 'sorted': function (compareFunction) {
- var arrayCopy = this().slice(0);
- return compareFunction ? arrayCopy.sort(compareFunction) : arrayCopy.sort();
- },
-
- 'reversed': function () {
- return this().slice(0).reverse();
+ return ko.utils.arrayIndexOf(this(), item);
}
};
diff --git a/vendors/knockout/src/tasks.js b/vendors/knockout/src/tasks.js
index 5475d5bff..aba13e30c 100644
--- a/vendors/knockout/src/tasks.js
+++ b/vendors/knockout/src/tasks.js
@@ -5,32 +5,13 @@ ko.tasks = (function () {
nextHandle = 1,
nextIndexToProcess = 0;
- if (window['MutationObserver']) {
- // Chrome 27+, Firefox 14+, IE 11+, Opera 15+, Safari 6.1+
- // From https://github.com/petkaantonov/bluebird * Copyright (c) 2014 Petka Antonov * License: MIT
- scheduler = (function (callback) {
- var div = document.createElement("div");
- new MutationObserver(callback).observe(div, {attributes: true});
- return function () { div.classList.toggle("foo"); };
- })(scheduledProcess);
- } else if (document && "onreadystatechange" in document.createElement("script")) {
- // IE 6-10
- // From https://github.com/YuzuJS/setImmediate * Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola * License: MIT
- scheduler = function (callback) {
- var script = document.createElement("script");
- script.onreadystatechange = function () {
- script.onreadystatechange = null;
- document.documentElement.removeChild(script);
- script = null;
- callback();
- };
- document.documentElement.append(script);
- };
- } else {
- scheduler = function (callback) {
- setTimeout(callback, 0);
- };
- }
+ // Chrome 27+, Firefox 14+, IE 11+, Opera 15+, Safari 6.1+
+ // From https://github.com/petkaantonov/bluebird * Copyright (c) 2014 Petka Antonov * License: MIT
+ scheduler = (function (callback) {
+ var div = document.createElement("div");
+ new MutationObserver(callback).observe(div, {attributes: true});
+ return function () { div.classList.toggle("foo"); };
+ })(scheduledProcess);
function processTasks() {
if (taskQueueLength) {
diff --git a/vendors/knockout/src/utils.domManipulation.js b/vendors/knockout/src/utils.domManipulation.js
index 26253cf6f..6b91dd05f 100644
--- a/vendors/knockout/src/utils.domManipulation.js
+++ b/vendors/knockout/src/utils.domManipulation.js
@@ -25,12 +25,6 @@
var windowContext = documentContext['parentWindow'] || documentContext['defaultView'] || window;
// Based on jQuery's "clean" function, but only accounting for table-related elements.
- // If you have referenced jQuery, this won't be used anyway - KO will use jQuery's "clean" function directly
-
- // Note that there's still an issue in IE < 9 whereby it will discard comment nodes that are the first child of
- // a descendant node. For example: "
abc
" will get parsed as "
abc
"
- // This won't affect anyone who has referenced jQuery, and there's always the workaround of inserting a dummy node
- // (possibly a text node) in front of the comment. So, KO does not attempt to workaround this IE issue automatically at present.
// Trim whitespace, otherwise indexOf won't work as expected
var tags = ko.utils.stringTrim(html).toLowerCase(), div = documentContext.createElement("div"),
diff --git a/vendors/knockout/src/utils.js b/vendors/knockout/src/utils.js
index 82d0b325e..247636fe5 100644
--- a/vendors/knockout/src/utils.js
+++ b/vendors/knockout/src/utils.js
@@ -26,13 +26,6 @@ ko.utils = (function () {
var canSetPrototype = ({ __proto__: [] } instanceof Array);
- function isClickOnCheckableElement(element, eventType) {
- if ((element.nodeName !== "INPUT") || !element.type) return false;
- if (eventType.toLowerCase() != "click") return false;
- var inputType = element.type;
- return (inputType == "checkbox") || (inputType == "radio");
- }
-
return {
arrayForEach: function (array, action, actionOwner) {
arrayCall('forEach', array, action, actionOwner);
@@ -120,7 +113,7 @@ ko.utils = (function () {
setDomNodeChildren: function (domNode, childNodes) {
ko.utils.emptyDomNode(domNode);
if (childNodes) {
- Element.prototype.append.apply(domNode, childNodes);
+ domNode.append.apply(domNode, childNodes);
}
},
@@ -252,17 +245,7 @@ ko.utils = (function () {
if (!(element && element.nodeType))
throw new Error("element must be a DOM node when calling triggerEvent");
- // For click events on checkboxes and radio buttons, jQuery toggles the element checked state *after* the
- // event handler runs instead of *before*. (This was fixed in 1.9 for checkboxes but not for radio buttons.)
- // IE doesn't change the checked state when you trigger the click event using "fireEvent".
- // In both cases, we'll use the click method instead.
- var useClickWorkaround = isClickOnCheckableElement(element, eventType);
-
- if (!ko.options['useOnlyNativeEvents'] && jQuery && !useClickWorkaround) {
- jQuery(element)['trigger'](eventType);
- } else {
- element.dispatchEvent(new Event(eventType));
- }
+ element.dispatchEvent(new Event(eventType));
},
unwrapObservable: function (value) {
diff --git a/vendors/knockout/src/virtualElements.js b/vendors/knockout/src/virtualElements.js
index 13db9fea1..407719c31 100644
--- a/vendors/knockout/src/virtualElements.js
+++ b/vendors/knockout/src/virtualElements.js
@@ -7,21 +7,16 @@
// The point of all this is to support containerless templates (e.g., blah)
// without having to scatter special cases all over the binding and templating code.
- // IE 9 cannot reliably read the "nodeValue" property of a comment node (see https://github.com/SteveSanderson/knockout/issues/186)
- // but it does give them a nonstandard alternative property called "text" that it can read reliably. Other browsers don't have that property.
- // So, use node.text where available, and node.nodeValue elsewhere
- var commentNodesHaveTextProperty = document && document.createComment("test").text === "";
-
- var startCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*ko(?:\s+([\s\S]+))?\s*$/;
- var endCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*\/ko\s*$/;
+ var startCommentRegex = /^\s*ko(?:\s+([\s\S]+))?\s*$/;
+ var endCommentRegex = /^\s*\/ko\s*$/;
var htmlTagsWithOptionallyClosingChildren = { 'ul': true, 'ol': true };
function isStartComment(node) {
- return (node.nodeType == 8) && startCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue);
+ return (node.nodeType == 8) && startCommentRegex.test(node.nodeValue);
}
function isEndComment(node) {
- return (node.nodeType == 8) && endCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue);
+ return (node.nodeType == 8) && endCommentRegex.test(node.nodeValue);
}
function isUnmatchedEndComment(node) {
@@ -181,37 +176,8 @@
hasBindingValue: isStartComment,
virtualNodeBindingValue: function(node) {
- var regexMatch = (commentNodesHaveTextProperty ? node.text : node.nodeValue).match(startCommentRegex);
+ var regexMatch = (node.nodeValue).match(startCommentRegex);
return regexMatch ? regexMatch[1] : null;
- },
-
- normaliseVirtualElementDomStructure: function(elementVerified) {
- // Workaround for https://github.com/SteveSanderson/knockout/issues/155
- // (IE <= 8 or IE 9 quirks mode parses your HTML weirdly, treating closing tags as if they don't exist, thereby moving comment nodes
- // that are direct descendants of
into the preceding
)
- if (!htmlTagsWithOptionallyClosingChildren[ko.utils.tagNameLower(elementVerified)])
- return;
-
- // Scan immediate children to see if they contain unbalanced comment tags. If they do, those comment tags
- // must be intended to appear *after* that child, so move them there.
- var childNode = elementVerified.firstChild;
- if (childNode) {
- do {
- if (childNode.nodeType === 1) {
- var unbalancedTags = getUnbalancedChildTags(childNode);
- if (unbalancedTags) {
- // Fix up the DOM by moving the unbalanced tags to where they most likely were intended to be placed - *after* the child
- var nodeToInsertBefore = childNode.nextSibling;
- for (var i = 0; i < unbalancedTags.length; i++) {
- if (nodeToInsertBefore)
- elementVerified.insertBefore(unbalancedTags[i], nodeToInsertBefore);
- else
- elementVerified.append(unbalancedTags[i]);
- }
- }
- }
- } while (childNode = childNode.nextSibling);
- }
}
};
})();