/ <reference path="AtomBindingHelper.js" />
974104
function () {

    this._success = [];
    this._failed = [];
    this._cached = false;

    this._process = null;

    this._calls = 0;

    this._showProgress = true;
    this._showError = true;
    var _this = this;
    this.success = function () {
        _this.onSuccess.apply(_this, arguments);
    };

    this.error = function () {
        _this.onError.apply(_this, arguments);
    };
}
1111532
function (target, key, value) {
/*Line 40 - 'AtomBindingHelper.js' */        if (!target && value === undefined)
/*Line 41 - 'AtomBindingHelper.js' */            return;
/*Line 42 - 'AtomBindingHelper.js' */        var oldValue = AtomBinder.getValue(target, key);
/*Line 43 - 'AtomBindingHelper.js' */        if (oldValue === value)
/*Line 44 - 'AtomBindingHelper.js' */            return;
/*Line 45 - 'AtomBindingHelper.js' */        var f = target["set_" + key];
/*Line 46 - 'AtomBindingHelper.js' */        if (f) {
/*Line 47 - 'AtomBindingHelper.js' */            f.apply(target, [value]);
/*Line 48 - 'AtomBindingHelper.js' */        }
/*Line 49 - 'AtomBindingHelper.js' */        else {
/*Line 50 - 'AtomBindingHelper.js' */            target[key] = value;
/*Line 51 - 'AtomBindingHelper.js' */        }
/*Line 52 - 'AtomBindingHelper.js' */        AtomBinder.refreshValue(target, key, oldValue, value);
/*Line 53 - 'AtomBindingHelper.js' */    }
699986
function (value) {

/*Line 174 - 'AtomBinding.js' */                if (!this.pathList && this.vf) {
/*Line 175 - 'AtomBinding.js' */                    value = [value];
/*Line 176 - 'AtomBinding.js' */                }

/*Line 178 - 'AtomBinding.js' */                if (this.vf) {
/*Line 179 - 'AtomBinding.js' */                    value.push(Atom);
/*Line 180 - 'AtomBinding.js' */                    value.push(AtomPromise);
/*Line 181 - 'AtomBinding.js' */                    value.push($x);
/*Line 182 - 'AtomBinding.js' */                    value = this.vf.apply(this, value);
/*Line 183 - 'AtomBinding.js' */                }

/*Line 185 - 'AtomBinding.js' */                if (value instanceof AtomPromise) {
/*Line 186 - 'AtomBinding.js' */                    value._persist = true;
/*Line 187 - 'AtomBinding.js' */                }

/*Line 189 - 'AtomBinding.js' */                this._lastValue = value;
/*Line 190 - 'AtomBinding.js' */                this._isUpdating = true;
/*Line 191 - 'AtomBinding.js' */                this.control.setLocalValue(this.key, value, this.element, true);
/*Line 192 - 'AtomBinding.js' */                this._isUpdating = false;
/*Line 193 - 'AtomBinding.js' */            }
1334761
function () {

/*Line 139 - 'AtomAutoCompleteBox.js' */                if (!this._items || this._items.length == 0)
/*Line 140 - 'AtomAutoCompleteBox.js' */                    return;

/*Line 142 - 'AtomAutoCompleteBox.js' */                //if (this.get_selectedIndex() != -1)
/*Line 143 - 'AtomAutoCompleteBox.js' */                //    return;

/*Line 145 - 'AtomAutoCompleteBox.js' */                var ae = new AtomEnumerator(this._items);
/*Line 146 - 'AtomAutoCompleteBox.js' */                var lp = this._labelPath;

/*Line 148 - 'AtomAutoCompleteBox.js' */                var cl = this._displayLabel;

/*Line 150 - 'AtomAutoCompleteBox.js' */                if (cl)
/*Line 151 - 'AtomAutoCompleteBox.js' */                    cl = cl.toLowerCase();

/*Line 153 - 'AtomAutoCompleteBox.js' */                while (ae.next()) {
/*Line 154 - 'AtomAutoCompleteBox.js' */                    var item = ae.current();
/*Line 155 - 'AtomAutoCompleteBox.js' */                    var l = item;
/*Line 156 - 'AtomAutoCompleteBox.js' */                    if (lp)
/*Line 157 - 'AtomAutoCompleteBox.js' */                        l = l[lp];
/*Line 158 - 'AtomAutoCompleteBox.js' */                    if (l.toLowerCase().indexOf(cl)==0) {
/*Line 159 - 'AtomAutoCompleteBox.js' */                        AtomBinder.setValue(this, "selectedItem", item);
/*Line 160 - 'AtomAutoCompleteBox.js' */                        AtomBinder.setValue(this, "selectedText", l);
/*Line 161 - 'AtomAutoCompleteBox.js' */                        this.bringSelectionIntoView();
/*Line 162 - 'AtomAutoCompleteBox.js' */                        return;
/*Line 163 - 'AtomAutoCompleteBox.js' */                    }
/*Line 164 - 'AtomAutoCompleteBox.js' */                }
/*Line 165 - 'AtomAutoCompleteBox.js' */            }
7076
function (e, v) {
/*Line 95 - 'AtomControl.js' */        if (v) {
/*Line 96 - 'AtomControl.js' */            if (/http\:\/\//i.test(v)) {
/*Line 97 - 'AtomControl.js' */                v = v.substr(5);
/*Line 98 - 'AtomControl.js' */            }
/*Line 99 - 'AtomControl.js' */        }
/*Line 100 - 'AtomControl.js' */        AtomUI.attr(e, 'src', v);
/*Line 101 - 'AtomControl.js' */    }
25257
function (e) {

/*Line 162 - 'AtomUI.js' */        var t = e.target;
/*Line 163 - 'AtomUI.js' */        if (t && /input/gi.test(t.nodeName) && /checkbox/gi.test(t.type))
/*Line 164 - 'AtomUI.js' */            return;

/*Line 166 - 'AtomUI.js' */        if (e.preventDefault) { e.preventDefault(); }
/*Line 167 - 'AtomUI.js' */        else { e.stop(); }

/*Line 169 - 'AtomUI.js' */        e.returnValue = false;
/*Line 170 - 'AtomUI.js' */        e.stopPropagation();
/*Line 171 - 'AtomUI.js' */        return false;
/*Line 172 - 'AtomUI.js' */    }
170415
function () {
/*Line 153 - 'AtomBinding.js' */                if (this.twoWays) {
/*Line 154 - 'AtomBinding.js' */                    if (this.jq) {
/*Line 155 - 'AtomBinding.js' */                        this.bindEvent(this.element, "change", "onValChanged");
/*Line 156 - 'AtomBinding.js' */                        this.bindEvent(this.element, "blur", "onValChanged");
/*Line 157 - 'AtomBinding.js' */                        if (this.events) {
/*Line 158 - 'AtomBinding.js' */                            var list = new AtomEnumerator(this.events.split(","));
/*Line 159 - 'AtomBinding.js' */                            while (list.next()) {
/*Line 160 - 'AtomBinding.js' */                                this.bindEvent(this.element, list.current(), "onValChanged");
/*Line 161 - 'AtomBinding.js' */                            }
/*Line 162 - 'AtomBinding.js' */                        }
/*Line 163 - 'AtomBinding.js' */                    } else {
/*Line 164 - 'AtomBinding.js' */                        this.bindEvent(this.control, "WatchHandler", "onPropChanged", this.key);
/*Line 165 - 'AtomBinding.js' */                    }
/*Line 166 - 'AtomBinding.js' */                }

/*Line 168 - 'AtomBinding.js' */                this.onDataChanged(this, null);

/*Line 170 - 'AtomBinding.js' */            }
123186
function (element, value) {
/*Line 213 - 'AtomControl.js' */        var vf = function () {
/*Line 214 - 'AtomControl.js' */            return $(element).val();
/*Line 215 - 'AtomControl.js' */        };
/*Line 216 - 'AtomControl.js' */        var validator = function (v) {
/*Line 217 - 'AtomControl.js' */            var r = value;
/*Line 218 - 'AtomControl.js' */            if (typeof r == 'string' || r.constructor == String) {
/*Line 219 - 'AtomControl.js' */                if (!(/^\//.test(r) || /(\/)|(\/i)$/.test(r))) {
/*Line 220 - 'AtomControl.js' */                    r = "/" + r + "/";
/*Line 221 - 'AtomControl.js' */                }
/*Line 222 - 'AtomControl.js' */                r = eval(r);
/*Line 223 - 'AtomControl.js' */            }
/*Line 224 - 'AtomControl.js' */            return r.test(v) ? null : "Invalid";
/*Line 225 - 'AtomControl.js' */        };
/*Line 226 - 'AtomControl.js' */        AtomProperties.validate({
/*Line 227 - 'AtomControl.js' */            control: this,
/*Line 228 - 'AtomControl.js' */            element: element,
/*Line 229 - 'AtomControl.js' */            value: value,
/*Line 230 - 'AtomControl.js' */            key: "regex",
/*Line 231 - 'AtomControl.js' */            eventName: "change,blur",
/*Line 232 - 'AtomControl.js' */            valueFunction: vf,
/*Line 233 - 'AtomControl.js' */            validator: validator
/*Line 234 - 'AtomControl.js' */        });

/*Line 236 - 'AtomControl.js' */    }
77411
function (v) {

/*Line 486 - 'AtomControl.js' */                var vm = this._localViewModel;
/*Line 487 - 'AtomControl.js' */                if (vm && vm.dispose) {
/*Line 488 - 'AtomControl.js' */                    vm.dispose();
/*Line 489 - 'AtomControl.js' */                }

/*Line 491 - 'AtomControl.js' */                this._localViewModel = v;

/*Line 493 - 'AtomControl.js' */                function propogate(e) {
/*Line 494 - 'AtomControl.js' */                    var ae = new ChildEnumerator(e);
/*Line 495 - 'AtomControl.js' */                    while (ae.next()) {
/*Line 496 - 'AtomControl.js' */                        var child = ae.current();
/*Line 497 - 'AtomControl.js' */                        if (child.atomControl && child.atomControl._created) {
/*Line 498 - 'AtomControl.js' */                            var ctrl = child.atomControl;
/*Line 499 - 'AtomControl.js' */                            if (ctrl._localViewModel !== undefined)
/*Line 500 - 'AtomControl.js' */                                continue;
/*Line 501 - 'AtomControl.js' */                            Atom.refresh(ctrl, "localViewModel");
/*Line 502 - 'AtomControl.js' */                        }
/*Line 503 - 'AtomControl.js' */                        propogate(child);
/*Line 504 - 'AtomControl.js' */                    }
/*Line 505 - 'AtomControl.js' */                };
/*Line 506 - 'AtomControl.js' */                propogate(this._element);
/*Line 507 - 'AtomControl.js' */            }
681792
function (item) {
/*Line 244 - 'AtomItemsControl.js' */                if (item == null)
/*Line 245 - 'AtomItemsControl.js' */                    return -1;
/*Line 246 - 'AtomItemsControl.js' */                var array = this.get_dataItems();
/*Line 247 - 'AtomItemsControl.js' */                var ae = new AtomEnumerator(array);
/*Line 248 - 'AtomItemsControl.js' */                while (ae.next()) {
/*Line 249 - 'AtomItemsControl.js' */                    if (ae.current() == item)
/*Line 250 - 'AtomItemsControl.js' */                        return ae.currentIndex();
/*Line 251 - 'AtomItemsControl.js' */                }
/*Line 252 - 'AtomItemsControl.js' */                return -1;
/*Line 253 - 'AtomItemsControl.js' */            }
1265077
function () {
/*Line 30 - 'AtomYesNoCustom.js' */                this._onUIChanged = true;
/*Line 31 - 'AtomYesNoCustom.js' */                var val = $(this._input).val();
/*Line 32 - 'AtomYesNoCustom.js' */                AtomBinder.setValue(this, "value", val);
/*Line 33 - 'AtomYesNoCustom.js' */                this._onUIChanged = false;
/*Line 34 - 'AtomYesNoCustom.js' */            }
895642
function (ary, index, item) {
/*Line 140 - 'AtomBindingHelper.js' */        ary.splice(index, 0, item);
/*Line 141 - 'AtomBindingHelper.js' */        AtomBinder.invokeItemsEvent(ary, "add", index, item);
/*Line 142 - 'AtomBindingHelper.js' */    }
847345
function () {
/*Line 138 - 'AtomItemsControl.js' */                if (!this._onUIChanged)
/*Line 139 - 'AtomItemsControl.js' */                    return;

/*Line 141 - 'AtomItemsControl.js' */                if (this._confirm) {
/*Line 142 - 'AtomItemsControl.js' */                    if (!confirm(this._confirmMessage))
/*Line 143 - 'AtomItemsControl.js' */                        return;
/*Line 144 - 'AtomItemsControl.js' */                }

/*Line 146 - 'AtomItemsControl.js' */                if (!this._postUrl) {
/*Line 147 - 'AtomItemsControl.js' */                    this.invokeAction(this._next);
/*Line 148 - 'AtomItemsControl.js' */                    return;
/*Line 149 - 'AtomItemsControl.js' */                }

/*Line 151 - 'AtomItemsControl.js' */                var data = this.get_postData();

/*Line 153 - 'AtomItemsControl.js' */                if (data === null || data === undefined)
/*Line 154 - 'AtomItemsControl.js' */                    return;

/*Line 156 - 'AtomItemsControl.js' */                data = AtomBinder.getClone(data);

/*Line 158 - 'AtomItemsControl.js' */                var caller = this;
/*Line 159 - 'AtomItemsControl.js' */                var p = AtomPromise.json(this._postUrl, null, { type: "POST", data: data });
/*Line 160 - 'AtomItemsControl.js' */                p.then(function () {
/*Line 161 - 'AtomItemsControl.js' */                    caller.invokeNext();
/*Line 162 - 'AtomItemsControl.js' */                });
/*Line 163 - 'AtomItemsControl.js' */                p.invoke();
/*Line 164 - 'AtomItemsControl.js' */            }
112361
function () {
/*Line 29 - 'AtomUIComponent.js' */                if (this._localScope === undefined) {
/*Line 30 - 'AtomUIComponent.js' */                    var ap = this.get_atomParent(this._element._logicalParent || this._element.parentNode);
/*Line 31 - 'AtomUIComponent.js' */                    if (ap) {
/*Line 32 - 'AtomUIComponent.js' */                        return ap.get_localScope();
/*Line 33 - 'AtomUIComponent.js' */                    } else {
/*Line 34 - 'AtomUIComponent.js' */                        throw new Error("Local Scope does not exist");
/*Line 35 - 'AtomUIComponent.js' */                    }
/*Line 36 - 'AtomUIComponent.js' */                }
/*Line 37 - 'AtomUIComponent.js' */                return this._localScope;
/*Line 38 - 'AtomUIComponent.js' */            }
1097753
function (x, y, update, clone) {
/*Line 107 - 'Atom.js' */        //var c = AtomBinder.getClone(y);
/*Line 108 - 'Atom.js' */        if (!x)
/*Line 109 - 'Atom.js' */            return;
/*Line 110 - 'Atom.js' */        var c = clone ? AtomBinder.getClone(y) : y;
/*Line 111 - 'Atom.js' */        if (update) {
/*Line 112 - 'Atom.js' */            for (var k in c) {
/*Line 113 - 'Atom.js' */                //x[k] = c[k];
/*Line 114 - 'Atom.js' */                Atom.set(x, k, AtomBinder.getValue(c, k));
/*Line 115 - 'Atom.js' */            }
/*Line 116 - 'Atom.js' */        } else {
/*Line 117 - 'Atom.js' */            for (var k in c) {
/*Line 118 - 'Atom.js' */                x[k] = c[k];
/*Line 119 - 'Atom.js' */            }
/*Line 120 - 'Atom.js' */        }
/*Line 121 - 'Atom.js' */        return x;
/*Line 122 - 'Atom.js' */    }
1037467
function (ary, item) {
/*Line 150 - 'AtomBindingHelper.js' */        var i = ary.indexOf(item);
/*Line 151 - 'AtomBindingHelper.js' */        if (i == -1)
/*Line 152 - 'AtomBindingHelper.js' */            return;
/*Line 153 - 'AtomBindingHelper.js' */        ary.splice(i, 1);
/*Line 154 - 'AtomBindingHelper.js' */        AtomBinder.invokeItemsEvent(ary, "remove", i, item);
/*Line 155 - 'AtomBindingHelper.js' */    }
1012204
function () {
/*Line 511 - 'AtomControl.js' */                if (this._viewModel === undefined) {
/*Line 512 - 'AtomControl.js' */                    // get parent..
/*Line 513 - 'AtomControl.js' */                    var ap = this.get_atomParent(this._element._logicalParent || this._element.parentNode);
/*Line 514 - 'AtomControl.js' */                    if (ap)
/*Line 515 - 'AtomControl.js' */                        return ap.get_viewModel();
/*Line 516 - 'AtomControl.js' */                }
/*Line 517 - 'AtomControl.js' */                return this._viewModel;
/*Line 518 - 'AtomControl.js' */            }