Check if binding value is changed in alternative backing value.
@param {Immutable.Map} alternativeBackingValue alternative backing value
@param {Function} [compare] alternative compare function, does reference equality check if omitted
180487
function (alternativeBackingValue, compare) {
    var value = this.get();
    var alternativeValue = alternativeBackingValue ? alternativeBackingValue.getIn(this._path) : undefined;
    return compare ?
        !compare(value, alternativeValue) :
        !(value === alternativeValue || (Util.undefinedOrNull(value) && Util.undefinedOrNull(alternativeValue)));
  }
725524
function isArguments(value) {
        // fallback check is for IE
        return toString.call(value) === '[object Arguments]' || value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && 'callee' in value;
    }
1098151
function compareAscending(value, other) {
  if (value !== other) {
    var valIsDefined = value !== undefined,
        valIsNull = value === null,
        valIsReflexive = value === value,
        valIsSymbol = isSymbol_1(value);

    var othIsDefined = other !== undefined,
        othIsNull = other === null,
        othIsReflexive = other === other,
        othIsSymbol = isSymbol_1(other);

    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
        (valIsNull && othIsDefined && othIsReflexive) ||
        (!valIsDefined && othIsReflexive) ||
        !valIsReflexive) {
      return 1;
    }
    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
        (othIsNull && valIsDefined && valIsReflexive) ||
        (!othIsDefined && valIsReflexive) ||
        !othIsReflexive) {
      return -1;
    }
  }
  return 0;
}
1070092
function (name, value, oldValue) {
                this.$Element.onbind.apply(this, arguments);
                this.onDisabledBind(name, value, oldValue);
            }
1345663
function compare(a, b) {
    if (Type.isString(a)) {
        return a === b;
    } else if (Type.isNumber(a)) {
        if (isNaN(a) || isNaN(b)) {
            return isNaN(a) === isNaN(b);
        }
        return a === b;
    } else if (Type.isBoolean(a)) {
        return a === b;
    } else if (Type.isDate(a) && Type.isDate(b)) {
        return a.getTime() === b.getTime();
    } else if (Type.isRegExp(a) && Type.isRegExp(b)) {
        return a.source === b.source;
    } else if (Type.isArray(a) && Type.isArray(b)) {
        // check references first
        if (a === b) {
            return true;
        }
        return a.every(function (item, index) {
            try {
                return compare(item, b[index]);
            } catch (e) {
                throw e;
            }
        });
    } else if (Type.isObject(a) && Type.isObject(b)) {
        var equal = [];
        // check references first
        if (a === b) {
            return true;
        }

        try {
            for (var key in a) {
                equal.push(compare(a[key], b[key]));
            }
        } catch (e) {
            throw e;
        }
        return equal.every(function (item) {
            return item === true;
        });
        /// compare undefined and nulls and nans
    } else if (a === b) {
        return true;
    }

    return false;
}
534045
function bindingUpdated4(exp1, exp2, exp3, exp4) {
    var different = bindingUpdated2(exp1, exp2);
    return bindingUpdated2(exp3, exp4) || different;
}
371766
function (name, value, oldValue) {
            // it doesn't make sense to bind both index and value,
            // so we just state that the index takes precedence on the value

            if (name === "selectedIndex") {
                this._domElt.selectedIndex = value;
                this.setValueInDataModel();
                if (!this.isIndexValid(value)) {
                    this.setIndexInDataModel();
                }
            } else if (name === "value") {
                this._domElt.selectedIndex = this.getIndex(value);
                this.setIndexInDataModel();
                // if selectedIndex is set to -1 and value is bound we modify the data model to change the value to ''
                if (this._domElt.selectedIndex === -1) {
                    this.setValueInDataModel();
                }
            }
            this.onDisabledBind(name, value, oldValue);
        }
414022
function (name, value, oldValue) {
                this.$InputElement.onbind.apply(this, arguments);
                if (name === "checked") {
                    this._domElt.checked = value;
                }
            }
108650
function defaultComparer(a, b) {
    if (typeof a === typeof b
        && (typeof a === "number" || typeof a === "string")) {
        return compareNumberOrString(a, b);
    }
    else if (isComparable(a) && isComparable(b)) {
        return b.compareTo(a);
    }
    throw new Error(`cannot compare ${typeof a} with ${typeof b}`);
}
904368
def __compare_helper(self, other, condition, notimpl_target):
        
        if not isinstance(other, self.__class__):
            return NotImplemented

        cmp_res = self.__cmp__(other)
        if cmp_res is NotImplemented:
            return notimpl_target

        return condition(cmp_res)
935333
function(a, b, aParent, bParent, prop, compares, options){
		if(typeof compares === "function") {
			var compareResult = compares(a, b, aParent, bParent, prop, options);
			if(typeof compareResult === "boolean") {
				return compareResult;
			} else if(compareResult && typeof compareResult === "object"){
				if( compareResult.getSubset ) {
					if(h.indexOf.call(options.getSubsets, compareResult.getSubset) === -1) {
						options.getSubsets.push(compareResult.getSubset);
					}
				}
				if(compareResult.intersection === h.ignoreType || compareResult.difference === h.ignoreType) { // as in the case of a sort props
					return true;
				}
				// A \ B subset intersects in both directions
				// but does not diff from
				if( ("intersection" in compareResult) && !("difference" in compareResult)) {
					var reverseResult =  compares(b, a,bParent, aParent, prop, options);
					return ("intersection" in reverseResult);
				}
				return false;
			}
			return compareResult;
		}
	}
299327
function( a, b, aParent, bParent, parentProp, compares, options ){
		var bType = typeof b;
		var hasAdditionalProp = false;
		if(bType === 'object' || bType === 'function') {
			var aCopy = assign({}, a);
			if(options.deep === false) {
				options.deep = -1;
			}
			// Check that everything in B is the same as whats in A, or
			// isn't in A.
			for (var prop in b) {
				var compare = compares[prop] === undefined ? compares['*'] : compares[prop];
				// run the comparison no matter what
				var compareResult = loop(a[prop], b[prop], a, b, prop, compare, options );
				// if there wasn't a prop (and we didn't run through a compare)
				if(compareResult === h.ignoreType) {
					// do nothing
				} else if(!(prop in a) ||  options.performedDifference ) {
					hasAdditionalProp = true;
				} else if(!compareResult) {
					return false;
				}
				delete aCopy[prop];
			}
			// go through aCopy props ... if there is no compare .. return false
			for (prop in aCopy) {
				if (compares[prop] === undefined || !loop(a[prop], undefined, a, b, prop, compares[prop], options) ) {
					return false;
				}
			}
			return hasAdditionalProp;
		}

	}
402649
function (value) {
        if (value === null || value === undefined || value === defaultComparer) {
            return defaultComparer;
        }

        else if (value instanceof Comparer) {
            return value;
        }

        else if (isFunction(value)) {
            return new Comparer(value);
        }

        else if (isFunction(value.compare)) {
            return new Comparer(value.compare);
        }

        else {
            return defaultComparer;
        }
    }
251931
function() {
    var value = this.get();

    // Don't call the callback if `skipNextSync` was called on the observer
    if (this.skip || !this.callback) {
      this.skip = false;

      if (this.getChangeRecords) {
        // Store an immutable version of the value, allowing for arrays and objects to change instance but not content and
        // still refrain from dispatching callbacks (e.g. when using an object in bind-class or when using array formatters
        // in bind-each)
        this.oldValue = diff.clone(value);
      } else {
        this.oldValue = value;
      }
    } else {
      var change;
      var useCompareBy = this.getChangeRecords &&
                         this.compareBy &&
                         Array.isArray(value) &&
                         Array.isArray(this.oldValue);

      if (useCompareBy) {
        var compareExpression = this.compareBy;
        var name = this.compareByName;
        var index = this.compareByIndex || '__index__';
        var ctx = this.context;
        var globals = this.observations.globals;
        var formatters = this.observations.formatters;
        var oldValue = this.oldValue;
        if (!name) {
          name = '__item__';
          // Turn "id" into "__item__.id"
          compareExpression = name + '.' + compareExpression;
        }

        var getCompareValue = expressions.parse(compareExpression, globals, formatters, name, index);
        changed = diff.values(value.map(getCompareValue, ctx), oldValue.map(getCompareValue, ctx));
      } else if (this.getChangeRecords) {
        changed = diff.values(value, this.oldValue);
      } else {
        changed = diff.basic(value, this.oldValue);
      }

      var oldValue = this.oldValue;

      if (this.getChangeRecords) {
        // Store an immutable version of the value, allowing for arrays and objects to change instance but not content and
        // still refrain from dispatching callbacks (e.g. when using an object in bind-class or when using array formatters
        // in bind-each)
        this.oldValue = diff.clone(value);
      } else {
        this.oldValue = value;
      }

      // If an array has changed calculate the splices and call the callback.
      if (!changed && !this.forceUpdateNextSync) return;
      this.forceUpdateNextSync = false;
      if (Array.isArray(changed)) {
        this.callback.call(this.callbackContext, value, oldValue, changed);
      } else {
        this.callback.call(this.callbackContext, value, oldValue);
      }
    }
  }
1288453
function (propertyName, newValue, oldValue) {
            if (propertyName === 'value') {
                this._checkValue();// checks the value changed in the data model is a valid value from the select
                // options
                if (this.controller) {
                    var report = this.controller.checkValue(newValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : true
                    });
                } else {
                    this._selectValue(newValue);
                }
            } else if (propertyName === 'mandatory') {
                this._updateState();
            } else if (propertyName === 'readOnly' || propertyName === 'disabled') {
                var selectField = this.getSelectField();
                var disabledOrReadonly = this.getProperty("disabled") || this.getProperty("readOnly");
                if (this._skinObj.simpleHTML) {
                    selectField.disabled = disabledOrReadonly ? "disabled" : "";
                }
                var tabIndex = disabledOrReadonly ? -1 : this._calculateTabIndex();
                selectField.tabIndex = tabIndex;
                this._updateState();
            } else if (propertyName === 'options') {
                if (this.controller) {
                    var selectValue = this.controller.getDataModel().value;
                    this.controller.setListOptions(newValue);
                    var report = this.controller.checkValue(selectValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : false
                    });
                } else {
                    // markup for the options
                    var optionsMarkup = [];
                    var stringUtils = ariaUtilsString;
                    for (var i = 0, l = newValue.length; i < l; i++) {
                        // string cast, otherwise encoding will fail
                        var optValue = '' + newValue[i].value;
                        optionsMarkup.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '">', stringUtils.escapeHTML(newValue[i].label), '</option>');
                    }

                    var selectField = this.getSelectField();
                    var currentValue = selectField.value;
                    // update the options list
                    var optionsListString = optionsMarkup.join('');
                    if (ariaCoreBrowser.isIE9 || ariaCoreBrowser.isIE8 || ariaCoreBrowser.isIE7) {
                        // innerHTML replacing in IE truncates the first element and breaks the whole select...
                        selectField.innerHTML = '';
                        var helperDiv = Aria.$window.document.createElement('div');
                        helperDiv.innerHTML = '<select>' + optionsListString + '</select>';
                        var options = helperDiv.children[0].children;
                        while (options.length) {
                            selectField.appendChild(options[0]);
                        }
                    } else {
                        selectField.innerHTML = optionsListString;
                    }
                    this._selectValue(currentValue);
                }

            } else if (propertyName === 'formatError' || propertyName === 'formatErrorMessages'
                    || propertyName === 'error' || propertyName === 'errorMessages') {
                this._cfg[propertyName] = newValue;
                this._updateState();
            } else {
                this.$DropDownInput._onBoundPropertyChange.apply(this, arguments);
            }
        }
295314
function (applySwitchMargins) {
            var value;
            var binding = this._binding;
            if (!binding) {
                return;
            }

            value = binding.inside[binding.to];
            if (value == null) {
                value = 0;
            }
            if (value < 0) {
                value = 0;
            }
            if (value > 1) {
                value = 1;
            }
            if (this._isSwitch && applySwitchMargins) {
                if (value >= this._switchThreshold) {
                    value = 1;
                } else {
                    value = 0;
                }
            }
            this._value = value;
            this._storeValue();
        }
1155620
function (newBackingValue) {
    var newSharedInternals = {};
    Util.assign(newSharedInternals, this._sharedInternals);
    newSharedInternals.backingValue = newBackingValue;
    return new Binding(this._path, newSharedInternals);
  }